diff --git a/.codespellrc b/.codespellrc index c608d03bc..843a0b502 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,3 +1,3 @@ [codespell] -ignore-words-list: crate,everytime,inout,co-ordinate,ot +ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo skip: **/target,node_modules,build,**/Cargo.lock,./src-tauri/gen/schemas diff --git a/.github/workflows/announce_release.yml b/.github/workflows/announce_release.yml deleted file mode 100644 index 3e4bab9f0..000000000 --- a/.github/workflows/announce_release.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Announce Release - -on: - release: - types: [published] - -jobs: - announce_release: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install requests - - - name: Announce Release - env: - DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} - RELEASE_VERSION: ${{ github.event.release.tag_name }} - RELEASE_BODY: ${{ github.event.release.body}} - run: python public/announce_release.py \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e5014070..3583edce6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,8 +86,6 @@ jobs: - run: yarn test:nowatch - - run: yarn test:cov - prepare-json-files: runs-on: ubuntu-latest # seperate job on Ubuntu for easy string manipulations (compared to Windows) @@ -126,7 +124,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-14, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 @@ -188,10 +186,10 @@ jobs: - name: Fix format run: yarn fmt - - name: Install Universal target (MacOS only) - if: matrix.os == 'macos-latest' + - name: Install x86 target for Universal builds (MacOS only) + if: matrix.os == 'macos-14' run: | - rustup target add aarch64-apple-darwin + rustup target add x86_64-apple-darwin - name: Prepare certificate and variables (Windows only) if: ${{ matrix.os == 'windows-latest' && env.BUILD_RELEASE == 'true' }} @@ -225,7 +223,7 @@ jobs: with: includeRelease: false includeDebug: true - args: ${{ matrix.os == 'macos-latest' && '--target universal-apple-darwin' || '' }} + args: ${{ matrix.os == 'macos-14' && '--target universal-apple-darwin' || '' }} - name: Build the app (release) and sign uses: tauri-apps/tauri-action@v0 @@ -241,12 +239,12 @@ jobs: APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} TAURI_CONF_ARGS: "--config ${{ matrix.os == 'windows-latest' && 'src-tauri\\tauri.release.conf.json' || 'src-tauri/tauri.release.conf.json' }}" with: - args: "${{ matrix.os == 'macos-latest' && '--target universal-apple-darwin' || '' }} ${{ env.TAURI_CONF_ARGS }}" + args: "${{ matrix.os == 'macos-14' && '--target universal-apple-darwin' || '' }} ${{ env.TAURI_CONF_ARGS }}" - uses: actions/upload-artifact@v3 if: matrix.os != 'ubuntu-latest' env: - PREFIX: ${{ matrix.os == 'macos-latest' && 'src-tauri/target/universal-apple-darwin' || 'src-tauri/target' }} + PREFIX: ${{ matrix.os == 'macos-14' && 'src-tauri/target/universal-apple-darwin' || 'src-tauri/target' }} MODE: ${{ env.BUILD_RELEASE == 'true' && 'release' || 'debug' }} with: path: "${{ env.PREFIX }}/${{ env.MODE }}/bundle/*/*" @@ -371,3 +369,27 @@ jobs: uses: softprops/action-gh-release@v1 with: files: 'artifact/*/Zoo*' + + announce_release: + needs: [publish-apps-release] + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install requests + + - name: Announce Release + env: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + RELEASE_VERSION: ${{ github.event.release.tag_name }} + RELEASE_BODY: ${{ github.event.release.body}} + run: python public/announce_release.py \ No newline at end of file diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 4dfdd75fd..e470bf6d9 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -79,7 +79,7 @@ jobs: playwright-macos: timeout-minutes: 60 - runs-on: macos-latest + runs-on: macos-14 needs: playwright-ubuntu steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index e9c883373..c2fc6c012 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,11 @@ Before you submit a contribution PR to this repo, please ensure that: VERSION=x.y.z yarn run bump-jsons ``` +Alternatively you can try the experimental `make-release.sh` bash script that will create the branch with the updated json files for you. +run `./make-release.sh` for a patch update +run `./make-release.sh "minor"` for minor +run `./make-release.sh "major"` for major + The PR may serve as a place to discuss the human-readable changelog and extra QA. A quick way of getting PR's merged since the last bump is to [use this PR filter](https://github.com/KittyCAD/modeling-app/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+), open up the browser console and past in the following ```typescript diff --git a/docs/kcl/std.json b/docs/kcl/std.json index 23f593e1c..fdf16c9c0 100644 --- a/docs/kcl/std.json +++ b/docs/kcl/std.json @@ -87,6 +87,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -131,6 +132,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -719,6 +1009,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -763,6 +1054,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -1379,6 +1959,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -1423,6 +2004,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -1976,6 +2846,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -2020,6 +2891,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -2626,6 +3786,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -2670,6 +3831,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -3223,6 +4673,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -3267,6 +4718,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -3873,6 +5613,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -3917,6 +5658,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -4470,6 +6500,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -4514,6 +6545,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -5110,6 +7430,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -5154,6 +7475,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -5707,6 +8317,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -5751,6 +8362,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -6357,6 +9257,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -6401,6 +9302,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -6954,6 +10144,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -6998,6 +10189,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -7604,6 +11084,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -7648,6 +11129,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -8201,6 +11971,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -8245,6 +12016,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -8950,6 +13010,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -8994,6 +13055,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -9547,6 +13897,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -9591,6 +13942,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -10305,6 +14945,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -10349,6 +14990,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -10902,6 +15832,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -10946,6 +15877,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -11535,6 +16755,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -11579,6 +16800,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -12132,6 +17642,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -12176,6 +17687,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -12792,6 +18592,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -12836,6 +18637,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -13967,6 +20057,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -14012,6 +20103,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -14570,6 +20950,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -14614,6 +20995,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -15180,6 +21850,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -15224,6 +21895,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -15777,6 +22737,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -15821,6 +22782,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -17032,6 +24282,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -17076,6 +24327,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -17647,6 +25187,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -17691,6 +25232,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -18417,6 +26247,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -18461,6 +26292,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -19014,6 +27134,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -19058,6 +27179,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -19663,6 +28073,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -19707,6 +28118,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -20260,6 +28960,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -20304,6 +29005,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -21104,6 +30094,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -21149,6 +30140,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -21952,6 +31232,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -21996,6 +31277,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -22855,6 +32425,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -22900,6 +32471,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -23703,6 +33563,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -23747,6 +33608,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -24629,6 +34779,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -24673,6 +34824,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -25252,6 +35692,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -25296,6 +35737,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -25875,6 +36605,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -25919,6 +36650,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -26498,6 +37518,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -26542,6 +37563,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -27113,6 +38423,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -27157,6 +38468,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -27815,8 +39415,8 @@ "name": "sketch_surface", "type": "SketchSurface", "schema": { - "description": "A plane or a face.", - "anyOf": [ + "description": "A sketch group type.", + "oneOf": [ { "description": "A plane.", "type": "object", @@ -27824,6 +39424,7 @@ "__meta", "id", "origin", + "type", "value", "xAxis", "yAxis", @@ -27881,6 +39482,12 @@ } } }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, "value": { "description": "Type for a plane.", "oneOf": [ @@ -27978,6 +39585,7 @@ "required": [ "__meta", "id", + "type", "value", "xAxis", "yAxis", @@ -28012,6 +39620,12 @@ "type": "string", "format": "uuid" }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, "value": { "description": "The tag of the face.", "type": "string" @@ -28101,6 +39715,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -28145,6 +39760,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -28751,6 +40655,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -28795,6 +40700,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -29782,8 +41976,8 @@ "name": "", "type": "SketchSurface", "schema": { - "description": "A plane or a face.", - "anyOf": [ + "description": "A sketch group type.", + "oneOf": [ { "description": "A plane.", "type": "object", @@ -29791,6 +41985,7 @@ "__meta", "id", "origin", + "type", "value", "xAxis", "yAxis", @@ -29848,6 +42043,12 @@ } } }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, "value": { "description": "Type for a plane.", "oneOf": [ @@ -29945,6 +42146,7 @@ "required": [ "__meta", "id", + "type", "value", "xAxis", "yAxis", @@ -29979,6 +42181,12 @@ "type": "string", "format": "uuid" }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, "value": { "description": "The tag of the face.", "type": "string" @@ -30167,6 +42375,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -30211,6 +42420,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -30764,6 +43262,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -30808,6 +43307,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -31383,6 +44171,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -31427,6 +44216,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -31989,6 +45067,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -32033,6 +45112,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -32646,6 +46014,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -32690,6 +46059,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -33243,6 +46901,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -33287,6 +46946,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -33882,6 +47830,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -33926,6 +47875,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -34479,6 +48717,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -34523,6 +48762,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -35118,6 +49646,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -35162,6 +49691,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -35715,6 +50533,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -35759,6 +50578,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -36354,6 +51462,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -36398,6 +51507,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", @@ -36951,6 +52349,7 @@ "required": [ "__meta", "id", + "on", "position", "rotation", "start", @@ -36995,6 +52394,295 @@ "type": "string", "format": "uuid" }, + "on": { + "description": "What the sketch is on (can be a plane or a face).", + "oneOf": [ + { + "description": "A plane.", + "type": "object", + "required": [ + "__meta", + "id", + "origin", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the plane.", + "type": "string", + "format": "uuid" + }, + "origin": { + "description": "Origin of the plane.", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "type": { + "type": "string", + "enum": [ + "plane" + ] + }, + "value": { + "description": "Type for a plane.", + "oneOf": [ + { + "type": "string", + "enum": [ + "XY", + "XZ", + "YZ" + ] + }, + { + "description": "A custom plane.", + "type": "string", + "enum": [ + "Custom" + ] + } + ] + }, + "xAxis": { + "description": "What should the plane’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the plane’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + }, + { + "description": "A face.", + "type": "object", + "required": [ + "__meta", + "id", + "type", + "value", + "xAxis", + "yAxis", + "zAxis" + ], + "properties": { + "__meta": { + "type": "array", + "items": { + "description": "Metadata.", + "type": "object", + "required": [ + "sourceRange" + ], + "properties": { + "sourceRange": { + "description": "The source range.", + "type": "array", + "items": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "maxItems": 2, + "minItems": 2 + } + } + } + }, + "id": { + "description": "The id of the face.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "face" + ] + }, + "value": { + "description": "The tag of the face.", + "type": "string" + }, + "xAxis": { + "description": "What should the face’s X axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "yAxis": { + "description": "What should the face’s Y axis be?", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + }, + "zAxis": { + "description": "The z-axis (normal).", + "type": "object", + "required": [ + "x", + "y", + "z" + ], + "properties": { + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "z": { + "type": "number", + "format": "double" + } + } + } + } + } + ] + }, "position": { "description": "The position of the sketch group.", "type": "array", diff --git a/docs/kcl/std.md b/docs/kcl/std.md index 02e4f24f1..542110f4e 100644 --- a/docs/kcl/std.md +++ b/docs/kcl/std.md @@ -128,6 +128,63 @@ angleToMatchLengthX(segment_name: string, to: number, sketch_group: SketchGroup) entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -245,6 +302,63 @@ angleToMatchLengthY(segment_name: string, to: number, sketch_group: SketchGroup) entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -372,6 +486,63 @@ angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -471,6 +642,63 @@ angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -594,6 +822,63 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -693,6 +978,63 @@ angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -816,6 +1158,63 @@ angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -915,6 +1314,63 @@ angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGr entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -1039,6 +1495,63 @@ angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: Sketc entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -1138,6 +1651,63 @@ angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: Sketc entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -1261,6 +1831,63 @@ angledLineToX(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -1360,6 +1987,63 @@ angledLineToX(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -1483,6 +2167,63 @@ angledLineToY(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -1582,6 +2323,63 @@ angledLineToY(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -1732,6 +2530,63 @@ arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -1831,6 +2686,63 @@ arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -2003,6 +2915,63 @@ bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -2102,6 +3071,63 @@ bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -2233,6 +3259,63 @@ close(sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -2332,6 +3415,63 @@ close(sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -2483,6 +3623,63 @@ extrude(length: number, sketch_group: SketchGroup) -> ExtrudeGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -2745,6 +3942,63 @@ hole(hole_sketch_group: SketchGroupSet, sketch_group: SketchGroup) -> SketchGrou entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -2845,6 +4099,63 @@ hole(hole_sketch_group: SketchGroupSet, sketch_group: SketchGroup) -> SketchGrou entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -2944,6 +4255,63 @@ hole(hole_sketch_group: SketchGroupSet, sketch_group: SketchGroup) -> SketchGrou entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -3164,6 +4532,63 @@ lastSegX(sketch_group: SketchGroup) -> number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -3279,6 +4704,63 @@ lastSegY(sketch_group: SketchGroup) -> number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -3467,6 +4949,63 @@ line(data: LineData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -3566,6 +5105,63 @@ line(data: LineData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -3687,6 +5283,63 @@ lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -3786,6 +5439,63 @@ lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -4033,6 +5743,63 @@ patternCircular(data: CircularPatternData, geometry: Geometry) -> Geometries entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -4217,6 +5984,63 @@ patternLinear(data: LinearPatternData, geometry: Geometry) -> Geometries entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -4431,6 +6255,63 @@ segAng(segment_name: string, sketch_group: SketchGroup) -> number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -4547,6 +6428,63 @@ segEndX(segment_name: string, sketch_group: SketchGroup) -> number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -4663,6 +6601,63 @@ segEndY(segment_name: string, sketch_group: SketchGroup) -> number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -4779,6 +6774,63 @@ segLen(segment_name: string, sketch_group: SketchGroup) -> number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -4894,6 +6946,63 @@ show(sketch: SketchGroup) entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -5048,7 +7157,7 @@ startProfileAt(data: LineData, sketch_surface: SketchSurface) -> SketchGroup } | [number, number] ``` -* `sketch_surface`: `SketchSurface` - A plane or a face. +* `sketch_surface`: `SketchSurface` - A sketch group type. ``` { // The id of the plane. @@ -5059,6 +7168,7 @@ startProfileAt(data: LineData, sketch_surface: SketchSurface) -> SketchGroup y: number, z: number, }, + type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? @@ -5083,6 +7193,7 @@ startProfileAt(data: LineData, sketch_surface: SketchSurface) -> SketchGroup { // The id of the face. id: uuid, + type: "face", // The tag of the face. value: string, // What should the face’s X axis be? @@ -5115,6 +7226,63 @@ startProfileAt(data: LineData, sketch_surface: SketchSurface) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -5239,6 +7407,63 @@ startSketchAt(data: LineData) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -5436,7 +7661,7 @@ string #### Returns -* `SketchSurface` - A plane or a face. +* `SketchSurface` - A sketch group type. ``` { // The id of the plane. @@ -5447,6 +7672,7 @@ string y: number, z: number, }, + type: "plane", // Type for a plane. value: "XY" | "XZ" | "YZ" | "Custom", // What should the plane’s X axis be? @@ -5471,6 +7697,7 @@ string { // The id of the face. id: uuid, + type: "face", // The tag of the face. value: string, // What should the face’s X axis be? @@ -5551,6 +7778,63 @@ tangentialArc(data: TangentialArcData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -5650,6 +7934,63 @@ tangentialArc(data: TangentialArcData, sketch_group: SketchGroup) -> SketchGroup entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -5762,6 +8103,63 @@ tangentialArcTo(to: [number], sketch_group: SketchGroup, tag: String) -> SketchG entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -5862,6 +8260,63 @@ tangentialArcTo(to: [number], sketch_group: SketchGroup, tag: String) -> SketchG entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -6002,6 +8457,63 @@ number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -6101,6 +8613,63 @@ number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -6222,6 +8791,63 @@ number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -6321,6 +8947,63 @@ number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -6442,6 +9125,63 @@ number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -6541,6 +9281,63 @@ number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -6662,6 +9459,63 @@ number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. @@ -6761,6 +9615,63 @@ number entityId: uuid, // The id of the sketch group. id: uuid, + // What the sketch is on (can be a plane or a face). + on: { + // The id of the plane. + id: uuid, + // Origin of the plane. + origin: { + x: number, + y: number, + z: number, +}, + type: "plane", + // Type for a plane. + value: "XY" | "XZ" | "YZ" | "Custom", + // What should the plane’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the plane’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +} | +{ + // The id of the face. + id: uuid, + type: "face", + // The tag of the face. + value: string, + // What should the face’s X axis be? + xAxis: { + x: number, + y: number, + z: number, +}, + // What should the face’s Y axis be? + yAxis: { + x: number, + y: number, + z: number, +}, + // The z-axis (normal). + zAxis: { + x: number, + y: number, + z: number, +}, +}, // The position of the sketch group. position: [number, number, number], // The rotation of the sketch group base plane. diff --git a/e2e/playwright/export-snapshots/gltf-binary.png b/e2e/playwright/export-snapshots/gltf-binary.png index 92a3c5938..aa42dc8e0 100644 Binary files a/e2e/playwright/export-snapshots/gltf-binary.png and b/e2e/playwright/export-snapshots/gltf-binary.png differ diff --git a/e2e/playwright/export-snapshots/gltf-embedded.png b/e2e/playwright/export-snapshots/gltf-embedded.png index 92a3c5938..aa42dc8e0 100644 Binary files a/e2e/playwright/export-snapshots/gltf-embedded.png and b/e2e/playwright/export-snapshots/gltf-embedded.png differ diff --git a/e2e/playwright/export-snapshots/gltf-standard-2.gltf b/e2e/playwright/export-snapshots/gltf-standard-2.gltf index ffaf92e17..c2ea5eafc 100644 --- a/e2e/playwright/export-snapshots/gltf-standard-2.gltf +++ b/e2e/playwright/export-snapshots/gltf-standard-2.gltf @@ -8,13 +8,13 @@ "type": "VEC3", "min": [ 0, - -0.02539999969303608, + -0.6451600193977356, -0 ], "max": [ 0, 0, - 0.10159999877214432 + 2.5806400775909424 ] }, { @@ -39,13 +39,13 @@ "type": "VEC3", "min": [ 0, - -0.02539999969303608, + -0.6451600193977356, -0 ], "max": [ - 0.07861346751451492, - -0.02539999969303608, - 0.10159999877214432 + 1.9967820644378664, + -0.6451600193977356, + 2.5806400775909424 ] }, { @@ -69,14 +69,14 @@ "componentType": 5126, "type": "VEC3", "min": [ - 0.07861346751451492, - -0.07620000094175339, + 1.9967820644378664, + -1.935479998588562, -0 ], "max": [ - 0.15116338431835177, - -0.02539999969303608, - 0.10159999877214432 + 3.839550018310547, + -0.6451600193977356, + 2.5806400775909424 ] }, { @@ -100,14 +100,14 @@ "componentType": 5126, "type": "VEC3", "min": [ - 0.15116338431835177, - -0.07620000094175339, + 3.839550018310547, + -1.935479998588562, -0 ], "max": [ - 0.24130000174045563, - -0.07620000094175339, - 0.10159999877214432 + 6.1290202140808105, + -1.935479998588562, + 2.5806400775909424 ] }, { @@ -131,14 +131,14 @@ "componentType": 5126, "type": "VEC3", "min": [ - 0.24130000174045563, - -0.07620000094175339, + 6.1290202140808105, + -1.935479998588562, -0 ], "max": [ - 0.24130000174045563, - -0.06350000202655792, - 0.10159999877214432 + 6.1290202140808105, + -1.6129000186920166, + 2.5806400775909424 ] }, { @@ -162,14 +162,14 @@ "componentType": 5126, "type": "VEC3", "min": [ - 0.15516768395900726, - -0.06350000202655792, + 3.9412591457366943, + -1.6129000186920166, -0 ], "max": [ - 0.24130000174045563, - -0.06350000202655792, - 0.10159999877214432 + 6.1290202140808105, + -1.6129000186920166, + 2.5806400775909424 ] }, { @@ -193,14 +193,14 @@ "componentType": 5126, "type": "VEC3", "min": [ - 0.06448028236627579, - -0.06350000202655792, + 1.6377992630004885, + -1.6129000186920166, 0 ], "max": [ - 0.15516768395900726, + 3.9412591457366943, 0, - 0.10159999877214432 + 2.5806400775909424 ] }, { @@ -224,14 +224,14 @@ "componentType": 5126, "type": "VEC3", "min": [ - 0.06448028236627579, + 1.6377992630004885, 0, -0 ], "max": [ - 0.1461859941482544, - 0.038100000470876694, - 0.10159999877214432 + 3.713124275207519, + 0.967739999294281, + 2.5806400775909424 ] }, { @@ -255,14 +255,14 @@ "componentType": 5126, "type": "VEC3", "min": [ - 0.1461859941482544, - 0.038100000470876694, + 3.713124275207519, + 0.967739999294281, -0 ], "max": [ - 0.24130000174045563, - 0.038100000470876694, - 0.10159999877214432 + 6.1290202140808105, + 0.967739999294281, + 2.5806400775909424 ] }, { @@ -286,14 +286,14 @@ "componentType": 5126, "type": "VEC3", "min": [ - 0.24130000174045563, - 0.038100000470876694, + 6.1290202140808105, + 0.967739999294281, -0 ], "max": [ - 0.24130000174045563, - 0.05079999938607216, - 0.10159999877214432 + 6.1290202140808105, + 1.2903200387954712, + 2.5806400775909424 ] }, { @@ -317,14 +317,14 @@ "componentType": 5126, "type": "VEC3", "min": [ - 0.14337047934532166, - 0.05079999938607216, + 3.641610145568848, + 1.2903200387954712, -0 ], "max": [ - 0.24130000174045563, - 0.05079999938607216, - 0.10159999877214432 + 6.1290202140808105, + 1.2903200387954712, + 2.5806400775909424 ] }, { @@ -348,14 +348,14 @@ "componentType": 5126, "type": "VEC3", "min": [ - 0.08889999985694885, - 0.02539999969303608, + 2.2580599784851074, + 0.6451600193977356, -0 ], "max": [ - 0.14337047934532166, - 0.05079999938607216, - 0.10159999877214432 + 3.641610145568848, + 1.2903200387954712, + 2.5806400775909424 ] }, { @@ -380,13 +380,13 @@ "type": "VEC3", "min": [ 0, - 0.02539999969303608, + 0.6451600193977356, -0 ], "max": [ - 0.08889999985694885, - 0.02539999969303608, - 0.10159999877214432 + 2.2580599784851074, + 0.6451600193977356, + 2.5806400775909424 ] }, { @@ -416,8 +416,8 @@ ], "max": [ 0, - 0.02539999969303608, - 0.10159999877214432 + 0.6451600193977356, + 2.5806400775909424 ] }, { @@ -442,12 +442,12 @@ "type": "VEC3", "min": [ 0, - -0.07620000094175339, + -1.935479998588562, 0 ], "max": [ - 0.24130000174045563, - 0.05079999938607216, + 6.1290202140808105, + 1.2903200387954712, 0 ] }, @@ -473,13 +473,13 @@ "type": "VEC3", "min": [ 0, - -0.07620000094175339, - 0.10159999877214432 + -1.935479998588562, + 2.5806400775909424 ], "max": [ - 0.24130000174045563, - 0.05079999938607216, - 0.10159999877214432 + 6.1290202140808105, + 1.2903200387954712, + 2.5806400775909424 ] }, { @@ -1311,7 +1311,7 @@ "end": 1, "t": [ 0, - 0.0254 + 0.6451600000000001 ] }, { @@ -1323,7 +1323,7 @@ "end": 2, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1335,7 +1335,7 @@ "end": 2, "t": [ 0, - 0.0254 + 0.6451600000000001 ] }, { @@ -1347,7 +1347,7 @@ "end": 3, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1359,7 +1359,7 @@ "end": 4, "t": [ 0, - 0.07861000000000001 + 1.99678 ] }, { @@ -1371,7 +1371,7 @@ "end": 5, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1383,7 +1383,7 @@ "end": 5, "t": [ 0, - 0.07861000000000001 + 1.99678 ] }, { @@ -1395,7 +1395,7 @@ "end": 6, "t": [ 0, - 0.08857000000000001 + 2.2496 ] }, { @@ -1407,7 +1407,7 @@ "end": 7, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1419,7 +1419,7 @@ "end": 7, "t": [ 0, - 0.08857000000000001 + 2.2496 ] }, { @@ -1431,7 +1431,7 @@ "end": 8, "t": [ 0, - 0.09014 + 2.28947 ] }, { @@ -1443,7 +1443,7 @@ "end": 9, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1455,7 +1455,7 @@ "end": 9, "t": [ 0, - 0.09014 + 2.28947 ] }, { @@ -1467,7 +1467,7 @@ "end": 10, "t": [ 0, - 0.0127 + 0.32258000000000003 ] }, { @@ -1479,7 +1479,7 @@ "end": 11, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1491,7 +1491,7 @@ "end": 11, "t": [ 0, - 0.0127 + 0.32258000000000003 ] }, { @@ -1503,7 +1503,7 @@ "end": 12, "t": [ 0, - 0.08613000000000001 + 2.1877600000000004 ] }, { @@ -1515,7 +1515,7 @@ "end": 13, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1527,7 +1527,7 @@ "end": 13, "t": [ 0, - 0.08613000000000001 + 2.1877600000000004 ] }, { @@ -1539,7 +1539,7 @@ "end": 14, "t": [ 0, - 0.11071 + 2.8120100000000003 ] }, { @@ -1551,7 +1551,7 @@ "end": 15, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1563,7 +1563,7 @@ "end": 15, "t": [ 0, - 0.11071 + 2.8120100000000003 ] }, { @@ -1575,7 +1575,7 @@ "end": 16, "t": [ 0, - 0.09015 + 2.28987 ] }, { @@ -1587,7 +1587,7 @@ "end": 17, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1599,7 +1599,7 @@ "end": 17, "t": [ 0, - 0.09015 + 2.28987 ] }, { @@ -1611,7 +1611,7 @@ "end": 18, "t": [ 0, - 0.09511 + 2.4159 ] }, { @@ -1623,7 +1623,7 @@ "end": 19, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1635,7 +1635,7 @@ "end": 19, "t": [ 0, - 0.09511 + 2.4159 ] }, { @@ -1647,7 +1647,7 @@ "end": 20, "t": [ 0, - 0.0127 + 0.32258000000000003 ] }, { @@ -1659,7 +1659,7 @@ "end": 21, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1671,7 +1671,7 @@ "end": 21, "t": [ 0, - 0.0127 + 0.32258000000000003 ] }, { @@ -1683,7 +1683,7 @@ "end": 22, "t": [ 0, - 0.09793 + 2.48741 ] }, { @@ -1695,7 +1695,7 @@ "end": 23, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1707,7 +1707,7 @@ "end": 23, "t": [ 0, - 0.09793 + 2.48741 ] }, { @@ -1719,7 +1719,7 @@ "end": 24, "t": [ 0, - 0.06010000000000001 + 1.52658 ] }, { @@ -1731,7 +1731,7 @@ "end": 25, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1743,7 +1743,7 @@ "end": 25, "t": [ 0, - 0.06010000000000001 + 1.52658 ] }, { @@ -1755,7 +1755,7 @@ "end": 26, "t": [ 0, - 0.0889 + 2.2580600000000004 ] }, { @@ -1767,7 +1767,7 @@ "end": 27, "t": [ 0, - 0.1016 + 2.5806400000000003 ] }, { @@ -1779,7 +1779,7 @@ "end": 27, "t": [ 0, - 0.0889 + 2.2580600000000004 ] }, { @@ -1791,7 +1791,7 @@ "end": 0, "t": [ 0, - 0.0254 + 0.6451600000000001 ] }, { @@ -1803,7 +1803,7 @@ "end": 3, "t": [ 0, - 0.0254 + 0.6451600000000001 ] } ], @@ -1815,138 +1815,138 @@ ], [ 0, - -0.0254, + -0.6451600000000001, -0 ], [ 0, - -0.0254, - 0.1016 + -0.6451600000000001, + 2.5806400000000003 ], [ 0, 0, - 0.1016 + 2.5806400000000003 ], [ - 0.07861000000000001, - -0.0254, + 1.99678, + -0.6451600000000001, -0 ], [ - 0.07861000000000001, - -0.0254, - 0.1016 + 1.99678, + -0.6451600000000001, + 2.5806400000000003 ], [ - 0.15116000000000002, - -0.0762, + 3.839550000000001, + -1.93548, -0 ], [ - 0.15116000000000002, - -0.0762, - 0.1016 + 3.839550000000001, + -1.93548, + 2.5806400000000003 ], [ - 0.2413, - -0.0762, + 6.129020000000001, + -1.93548, -0 ], [ - 0.2413, - -0.0762, - 0.1016 + 6.129020000000001, + -1.93548, + 2.5806400000000003 ], [ - 0.2413, - -0.0635, + 6.129020000000001, + -1.6129000000000002, -0 ], [ - 0.2413, - -0.0635, - 0.1016 + 6.129020000000001, + -1.6129000000000002, + 2.5806400000000003 ], [ - 0.15517, - -0.0635, + 3.94126, + -1.6129000000000002, -0 ], [ - 0.15517, - -0.0635, - 0.1016 + 3.94126, + -1.6129000000000002, + 2.5806400000000003 ], [ - 0.06448000000000001, + 1.6378, 0, -0 ], [ - 0.06448000000000001, + 1.6378, 0, - 0.1016 + 2.5806400000000003 ], [ - 0.14619, - 0.0381, + 3.71312, + 0.96774, -0 ], [ - 0.14619, - 0.0381, - 0.1016 + 3.71312, + 0.96774, + 2.5806400000000003 ], [ - 0.2413, - 0.0381, + 6.129020000000001, + 0.96774, -0 ], [ - 0.2413, - 0.0381, - 0.1016 + 6.129020000000001, + 0.96774, + 2.5806400000000003 ], [ - 0.2413, - 0.050800000000000005, + 6.129020000000001, + 1.29032, -0 ], [ - 0.2413, - 0.050800000000000005, - 0.1016 + 6.129020000000001, + 1.29032, + 2.5806400000000003 ], [ - 0.14337000000000005, - 0.050800000000000005, + 3.641610000000001, + 1.29032, -0 ], [ - 0.14337000000000005, - 0.050800000000000005, - 0.1016 + 3.641610000000001, + 1.29032, + 2.5806400000000003 ], [ - 0.0889, - 0.0254, + 2.2580600000000004, + 0.6451600000000001, -0 ], [ - 0.0889, - 0.0254, - 0.1016 + 2.2580600000000004, + 0.6451600000000001, + 2.5806400000000003 ], [ 0, - 0.0254, + 0.6451600000000001, -0 ], [ 0, - 0.0254, - 0.1016 + 0.6451600000000001, + 2.5806400000000003 ] ], "surfaces": [ @@ -1965,8 +1965,8 @@ ], "origin": [ 0, - -0.0127, - 0.050800000000000005 + -0.32258000000000003, + 1.29032 ] } }, @@ -1984,9 +1984,9 @@ 1 ], "origin": [ - 0.039310000000000005, - -0.0254, - 0.050800000000000005 + 0.99839, + -0.6451600000000001, + 1.29032 ] } }, @@ -2004,9 +2004,9 @@ 1 ], "origin": [ - 0.11489, - -0.050800000000000005, - 0.050800000000000005 + 2.9181700000000004, + -1.29032, + 1.29032 ] } }, @@ -2024,9 +2024,9 @@ 1 ], "origin": [ - 0.19623, - -0.0762, - 0.050800000000000005 + 4.9842900000000006, + -1.93548, + 1.29032 ] } }, @@ -2044,9 +2044,9 @@ 1 ], "origin": [ - 0.2413, - -0.06985000000000001, - 0.050800000000000005 + 6.129020000000001, + -1.7741900000000002, + 1.29032 ] } }, @@ -2064,9 +2064,9 @@ -1 ], "origin": [ - 0.19823, - -0.0635, - 0.050800000000000005 + 5.03514, + -1.6129000000000002, + 1.29032 ] } }, @@ -2084,9 +2084,9 @@ -1 ], "origin": [ - 0.10982, - -0.03175, - 0.050800000000000005 + 2.78953, + -0.8064500000000001, + 1.29032 ] } }, @@ -2104,9 +2104,9 @@ 1 ], "origin": [ - 0.10533, - 0.01905, - 0.050800000000000005 + 2.67546, + 0.48387, + 1.29032 ] } }, @@ -2124,9 +2124,9 @@ 1 ], "origin": [ - 0.19374, - 0.0381, - 0.050800000000000005 + 4.92107, + 0.96774, + 1.29032 ] } }, @@ -2144,9 +2144,9 @@ 1 ], "origin": [ - 0.2413, - 0.04445, - 0.050800000000000005 + 6.129020000000001, + 1.1290300000000002, + 1.29032 ] } }, @@ -2164,9 +2164,9 @@ -1 ], "origin": [ - 0.19234, - 0.050800000000000005, - 0.050800000000000005 + 4.88532, + 1.29032, + 1.29032 ] } }, @@ -2184,9 +2184,9 @@ -1 ], "origin": [ - 0.11614, - 0.0381, - 0.050800000000000005 + 2.9498400000000005, + 0.96774, + 1.29032 ] } }, @@ -2204,9 +2204,9 @@ -1 ], "origin": [ - 0.04445, - 0.0254, - 0.050800000000000005 + 1.1290300000000002, + 0.6451600000000001, + 1.29032 ] } }, @@ -2225,8 +2225,8 @@ ], "origin": [ 0, - 0.0127, - 0.050800000000000005 + 0.32258000000000003, + 1.29032 ] } }, @@ -2266,7 +2266,7 @@ "origin": [ 0, 0, - 0.1016 + 2.5806400000000003 ] } } @@ -2292,7 +2292,7 @@ "line": { "origin": [ 0, - -0.0254, + -0.6451600000000001, -0 ], "direction": [ @@ -2308,7 +2308,7 @@ "origin": [ 0, 0, - 0.1016 + 2.5806400000000003 ], "direction": [ 0, @@ -2337,7 +2337,7 @@ "line": { "origin": [ 0, - -0.0254, + -0.6451600000000001, -0 ], "direction": [ @@ -2351,8 +2351,8 @@ "type": "line", "line": { "origin": [ - 0.07861000000000001, - -0.0254, + 1.99678, + -0.6451600000000001, -0 ], "direction": [ @@ -2367,8 +2367,8 @@ "line": { "origin": [ 0, - -0.0254, - 0.1016 + -0.6451600000000001, + 2.5806400000000003 ], "direction": [ 1, @@ -2381,8 +2381,8 @@ "type": "line", "line": { "origin": [ - 0.07861000000000001, - -0.0254, + 1.99678, + -0.6451600000000001, -0 ], "direction": [ @@ -2396,8 +2396,8 @@ "type": "line", "line": { "origin": [ - 0.15116000000000002, - -0.0762, + 3.839550000000001, + -1.93548, -0 ], "direction": [ @@ -2411,9 +2411,9 @@ "type": "line", "line": { "origin": [ - 0.07861000000000001, - -0.0254, - 0.1016 + 1.99678, + -0.6451600000000001, + 2.5806400000000003 ], "direction": [ 0.81915, @@ -2426,8 +2426,8 @@ "type": "line", "line": { "origin": [ - 0.15116000000000002, - -0.0762, + 3.839550000000001, + -1.93548, -0 ], "direction": [ @@ -2441,8 +2441,8 @@ "type": "line", "line": { "origin": [ - 0.2413, - -0.0762, + 6.129020000000001, + -1.93548, -0 ], "direction": [ @@ -2456,9 +2456,9 @@ "type": "line", "line": { "origin": [ - 0.15116000000000002, - -0.0762, - 0.1016 + 3.839550000000001, + -1.93548, + 2.5806400000000003 ], "direction": [ 1, @@ -2471,8 +2471,8 @@ "type": "line", "line": { "origin": [ - 0.2413, - -0.0762, + 6.129020000000001, + -1.93548, -0 ], "direction": [ @@ -2486,8 +2486,8 @@ "type": "line", "line": { "origin": [ - 0.2413, - -0.0635, + 6.129020000000001, + -1.6129000000000002, -0 ], "direction": [ @@ -2501,9 +2501,9 @@ "type": "line", "line": { "origin": [ - 0.2413, - -0.0762, - 0.1016 + 6.129020000000001, + -1.93548, + 2.5806400000000003 ], "direction": [ 0, @@ -2516,8 +2516,8 @@ "type": "line", "line": { "origin": [ - 0.2413, - -0.0635, + 6.129020000000001, + -1.6129000000000002, -0 ], "direction": [ @@ -2531,8 +2531,8 @@ "type": "line", "line": { "origin": [ - 0.15517, - -0.0635, + 3.94126, + -1.6129000000000002, -0 ], "direction": [ @@ -2546,9 +2546,9 @@ "type": "line", "line": { "origin": [ - 0.2413, - -0.0635, - 0.1016 + 6.129020000000001, + -1.6129000000000002, + 2.5806400000000003 ], "direction": [ -1, @@ -2561,8 +2561,8 @@ "type": "line", "line": { "origin": [ - 0.15517, - -0.0635, + 3.94126, + -1.6129000000000002, -0 ], "direction": [ @@ -2576,7 +2576,7 @@ "type": "line", "line": { "origin": [ - 0.06448000000000001, + 1.6378, 0, -0 ], @@ -2591,9 +2591,9 @@ "type": "line", "line": { "origin": [ - 0.15517, - -0.0635, - 0.1016 + 3.94126, + -1.6129000000000002, + 2.5806400000000003 ], "direction": [ -0.81915, @@ -2606,7 +2606,7 @@ "type": "line", "line": { "origin": [ - 0.06448000000000001, + 1.6378, 0, -0 ], @@ -2621,8 +2621,8 @@ "type": "line", "line": { "origin": [ - 0.14619, - 0.0381, + 3.71312, + 0.96774, -0 ], "direction": [ @@ -2636,9 +2636,9 @@ "type": "line", "line": { "origin": [ - 0.06448000000000001, + 1.6378, 0, - 0.1016 + 2.5806400000000003 ], "direction": [ 0.90631, @@ -2651,8 +2651,8 @@ "type": "line", "line": { "origin": [ - 0.14619, - 0.0381, + 3.71312, + 0.96774, -0 ], "direction": [ @@ -2666,8 +2666,8 @@ "type": "line", "line": { "origin": [ - 0.2413, - 0.0381, + 6.129020000000001, + 0.96774, -0 ], "direction": [ @@ -2681,9 +2681,9 @@ "type": "line", "line": { "origin": [ - 0.14619, - 0.0381, - 0.1016 + 3.71312, + 0.96774, + 2.5806400000000003 ], "direction": [ 1, @@ -2696,8 +2696,8 @@ "type": "line", "line": { "origin": [ - 0.2413, - 0.0381, + 6.129020000000001, + 0.96774, -0 ], "direction": [ @@ -2711,8 +2711,8 @@ "type": "line", "line": { "origin": [ - 0.2413, - 0.050800000000000005, + 6.129020000000001, + 1.29032, -0 ], "direction": [ @@ -2726,9 +2726,9 @@ "type": "line", "line": { "origin": [ - 0.2413, - 0.0381, - 0.1016 + 6.129020000000001, + 0.96774, + 2.5806400000000003 ], "direction": [ 0, @@ -2741,8 +2741,8 @@ "type": "line", "line": { "origin": [ - 0.2413, - 0.050800000000000005, + 6.129020000000001, + 1.29032, -0 ], "direction": [ @@ -2756,8 +2756,8 @@ "type": "line", "line": { "origin": [ - 0.14337000000000005, - 0.050800000000000005, + 3.641610000000001, + 1.29032, -0 ], "direction": [ @@ -2771,9 +2771,9 @@ "type": "line", "line": { "origin": [ - 0.2413, - 0.050800000000000005, - 0.1016 + 6.129020000000001, + 1.29032, + 2.5806400000000003 ], "direction": [ -1, @@ -2786,8 +2786,8 @@ "type": "line", "line": { "origin": [ - 0.14337000000000005, - 0.050800000000000005, + 3.641610000000001, + 1.29032, -0 ], "direction": [ @@ -2801,8 +2801,8 @@ "type": "line", "line": { "origin": [ - 0.0889, - 0.0254, + 2.2580600000000004, + 0.6451600000000001, -0 ], "direction": [ @@ -2816,9 +2816,9 @@ "type": "line", "line": { "origin": [ - 0.14337000000000005, - 0.050800000000000005, - 0.1016 + 3.641610000000001, + 1.29032, + 2.5806400000000003 ], "direction": [ -0.90631, @@ -2831,8 +2831,8 @@ "type": "line", "line": { "origin": [ - 0.0889, - 0.0254, + 2.2580600000000004, + 0.6451600000000001, -0 ], "direction": [ @@ -2847,7 +2847,7 @@ "line": { "origin": [ 0, - 0.0254, + 0.6451600000000001, -0 ], "direction": [ @@ -2861,9 +2861,9 @@ "type": "line", "line": { "origin": [ - 0.0889, - 0.0254, - 0.1016 + 2.2580600000000004, + 0.6451600000000001, + 2.5806400000000003 ], "direction": [ -1, @@ -2877,7 +2877,7 @@ "line": { "origin": [ 0, - 0.0254, + 0.6451600000000001, -0 ], "direction": [ @@ -2892,8 +2892,8 @@ "line": { "origin": [ 0, - 0.0254, - 0.1016 + 0.6451600000000001, + 2.5806400000000003 ], "direction": [ 0, diff --git a/e2e/playwright/export-snapshots/gltf-standard.gltf b/e2e/playwright/export-snapshots/gltf-standard.gltf index 41b8ac71e..cc491ece1 100644 Binary files a/e2e/playwright/export-snapshots/gltf-standard.gltf and b/e2e/playwright/export-snapshots/gltf-standard.gltf differ diff --git a/e2e/playwright/export-snapshots/obj-.png b/e2e/playwright/export-snapshots/obj-.png index 755c9a010..67afab68a 100644 Binary files a/e2e/playwright/export-snapshots/obj-.png and b/e2e/playwright/export-snapshots/obj-.png differ diff --git a/e2e/playwright/export-snapshots/ply-ascii.png b/e2e/playwright/export-snapshots/ply-ascii.png index fd6c5f867..69ce9bfef 100644 Binary files a/e2e/playwright/export-snapshots/ply-ascii.png and b/e2e/playwright/export-snapshots/ply-ascii.png differ diff --git a/e2e/playwright/export-snapshots/ply-binary_big_endian.png b/e2e/playwright/export-snapshots/ply-binary_big_endian.png index fd6c5f867..69ce9bfef 100644 Binary files a/e2e/playwright/export-snapshots/ply-binary_big_endian.png and b/e2e/playwright/export-snapshots/ply-binary_big_endian.png differ diff --git a/e2e/playwright/export-snapshots/ply-binary_little_endian.png b/e2e/playwright/export-snapshots/ply-binary_little_endian.png index fd6c5f867..69ce9bfef 100644 Binary files a/e2e/playwright/export-snapshots/ply-binary_little_endian.png and b/e2e/playwright/export-snapshots/ply-binary_little_endian.png differ diff --git a/e2e/playwright/export-snapshots/step-.png b/e2e/playwright/export-snapshots/step-.png index 92a3c5938..aa42dc8e0 100644 Binary files a/e2e/playwright/export-snapshots/step-.png and b/e2e/playwright/export-snapshots/step-.png differ diff --git a/e2e/playwright/export-snapshots/step-.step b/e2e/playwright/export-snapshots/step-.step index ccef5e532..f8dfcdd83 100644 --- a/e2e/playwright/export-snapshots/step-.step +++ b/e2e/playwright/export-snapshots/step-.step @@ -19,59 +19,59 @@ DATA; ); #4 = CARTESIAN_POINT('NONE', (0, 0, -0)); #5 = VERTEX_POINT('NONE', #4); -#6 = CARTESIAN_POINT('NONE', (0, -0.0254, -0)); +#6 = CARTESIAN_POINT('NONE', (0, -0.64516, -0)); #7 = VERTEX_POINT('NONE', #6); -#8 = CARTESIAN_POINT('NONE', (0, -0.0254, 0.1016)); +#8 = CARTESIAN_POINT('NONE', (0, -0.64516, 2.58064)); #9 = VERTEX_POINT('NONE', #8); -#10 = CARTESIAN_POINT('NONE', (0, 0, 0.1016)); +#10 = CARTESIAN_POINT('NONE', (0, 0, 2.58064)); #11 = VERTEX_POINT('NONE', #10); -#12 = CARTESIAN_POINT('NONE', (0.07861346939195568, -0.0254, -0)); +#12 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, -0)); #13 = VERTEX_POINT('NONE', #12); -#14 = CARTESIAN_POINT('NONE', (0.07861346939195568, -0.0254, 0.1016)); +#14 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, 2.58064)); #15 = VERTEX_POINT('NONE', #14); -#16 = CARTESIAN_POINT('NONE', (0.1511633881344551, -0.07619999999999998, -0)); +#16 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, -0)); #17 = VERTEX_POINT('NONE', #16); -#18 = CARTESIAN_POINT('NONE', (0.1511633881344551, -0.07619999999999998, 0.1016)); +#18 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, 2.58064)); #19 = VERTEX_POINT('NONE', #18); -#20 = CARTESIAN_POINT('NONE', (0.2413, -0.0762, -0)); +#20 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, -0)); #21 = VERTEX_POINT('NONE', #20); -#22 = CARTESIAN_POINT('NONE', (0.2413, -0.0762, 0.1016)); +#22 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, 2.58064)); #23 = VERTEX_POINT('NONE', #22); -#24 = CARTESIAN_POINT('NONE', (0.2413, -0.0635, -0)); +#24 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, -0)); #25 = VERTEX_POINT('NONE', #24); -#26 = CARTESIAN_POINT('NONE', (0.2413, -0.0635, 0.1016)); +#26 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, 2.58064)); #27 = VERTEX_POINT('NONE', #26); -#28 = CARTESIAN_POINT('NONE', (0.1551676827532182, -0.0635, -0)); +#28 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, -0)); #29 = VERTEX_POINT('NONE', #28); -#30 = CARTESIAN_POINT('NONE', (0.1551676827532182, -0.0635, 0.1016)); +#30 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, 2.58064)); #31 = VERTEX_POINT('NONE', #30); -#32 = CARTESIAN_POINT('NONE', (0.06448028432509392, 0, -0)); +#32 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, -0)); #33 = VERTEX_POINT('NONE', #32); -#34 = CARTESIAN_POINT('NONE', (0.06448028432509392, 0, 0.1016)); +#34 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, 2.58064)); #35 = VERTEX_POINT('NONE', #34); -#36 = CARTESIAN_POINT('NONE', (0.14618599799650817, 0.03810000000000001, -0)); +#36 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, -0)); #37 = VERTEX_POINT('NONE', #36); -#38 = CARTESIAN_POINT('NONE', (0.14618599799650817, 0.03810000000000001, 0.1016)); +#38 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, 2.58064)); #39 = VERTEX_POINT('NONE', #38); -#40 = CARTESIAN_POINT('NONE', (0.2413, 0.0381, -0)); +#40 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, -0)); #41 = VERTEX_POINT('NONE', #40); -#42 = CARTESIAN_POINT('NONE', (0.2413, 0.0381, 0.1016)); +#42 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, 2.58064)); #43 = VERTEX_POINT('NONE', #42); -#44 = CARTESIAN_POINT('NONE', (0.2413, 0.0508, -0)); +#44 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, -0)); #45 = VERTEX_POINT('NONE', #44); -#46 = CARTESIAN_POINT('NONE', (0.2413, 0.0508, 0.1016)); +#46 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, 2.58064)); #47 = VERTEX_POINT('NONE', #46); -#48 = CARTESIAN_POINT('NONE', (0.14337047578094278, 0.0508, -0)); +#48 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, -0)); #49 = VERTEX_POINT('NONE', #48); -#50 = CARTESIAN_POINT('NONE', (0.14337047578094278, 0.0508, 0.1016)); +#50 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, 2.58064)); #51 = VERTEX_POINT('NONE', #50); -#52 = CARTESIAN_POINT('NONE', (0.08889999999999999, 0.0254, -0)); +#52 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, -0)); #53 = VERTEX_POINT('NONE', #52); -#54 = CARTESIAN_POINT('NONE', (0.08889999999999999, 0.0254, 0.1016)); +#54 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, 2.58064)); #55 = VERTEX_POINT('NONE', #54); -#56 = CARTESIAN_POINT('NONE', (0, 0.0254, -0)); +#56 = CARTESIAN_POINT('NONE', (0, 0.64516, -0)); #57 = VERTEX_POINT('NONE', #56); -#58 = CARTESIAN_POINT('NONE', (0, 0.0254, 0.1016)); +#58 = CARTESIAN_POINT('NONE', (0, 0.64516, 2.58064)); #59 = VERTEX_POINT('NONE', #58); #60 = DIRECTION('NONE', (0, -1, 0)); #61 = VECTOR('NONE', #60, 1); @@ -79,11 +79,11 @@ DATA; #63 = LINE('NONE', #62, #61); #64 = DIRECTION('NONE', (0, 0, 1)); #65 = VECTOR('NONE', #64, 1); -#66 = CARTESIAN_POINT('NONE', (0, -0.0254, -0)); +#66 = CARTESIAN_POINT('NONE', (0, -0.64516, -0)); #67 = LINE('NONE', #66, #65); #68 = DIRECTION('NONE', (0, -1, 0)); #69 = VECTOR('NONE', #68, 1); -#70 = CARTESIAN_POINT('NONE', (0, 0, 0.1016)); +#70 = CARTESIAN_POINT('NONE', (0, 0, 2.58064)); #71 = LINE('NONE', #70, #69); #72 = DIRECTION('NONE', (0, 0, 1)); #73 = VECTOR('NONE', #72, 1); @@ -91,155 +91,155 @@ DATA; #75 = LINE('NONE', #74, #73); #76 = DIRECTION('NONE', (1, 0, 0)); #77 = VECTOR('NONE', #76, 1); -#78 = CARTESIAN_POINT('NONE', (0, -0.0254, -0)); +#78 = CARTESIAN_POINT('NONE', (0, -0.64516, -0)); #79 = LINE('NONE', #78, #77); #80 = DIRECTION('NONE', (0, 0, 1)); #81 = VECTOR('NONE', #80, 1); -#82 = CARTESIAN_POINT('NONE', (0.07861346939195568, -0.0254, -0)); +#82 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, -0)); #83 = LINE('NONE', #82, #81); #84 = DIRECTION('NONE', (1, 0, 0)); #85 = VECTOR('NONE', #84, 1); -#86 = CARTESIAN_POINT('NONE', (0, -0.0254, 0.1016)); +#86 = CARTESIAN_POINT('NONE', (0, -0.64516, 2.58064)); #87 = LINE('NONE', #86, #85); -#88 = DIRECTION('NONE', (0.8191520442889919, -0.5735764363510459, 0)); +#88 = DIRECTION('NONE', (0.819152044288992, -0.5735764363510459, 0)); #89 = VECTOR('NONE', #88, 1); -#90 = CARTESIAN_POINT('NONE', (0.07861346939195568, -0.0254, -0)); +#90 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, -0)); #91 = LINE('NONE', #90, #89); #92 = DIRECTION('NONE', (0, 0, 1)); #93 = VECTOR('NONE', #92, 1); -#94 = CARTESIAN_POINT('NONE', (0.1511633881344551, -0.07619999999999998, -0)); +#94 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, -0)); #95 = LINE('NONE', #94, #93); -#96 = DIRECTION('NONE', (0.8191520442889919, -0.5735764363510459, 0)); +#96 = DIRECTION('NONE', (0.819152044288992, -0.5735764363510459, 0)); #97 = VECTOR('NONE', #96, 1); -#98 = CARTESIAN_POINT('NONE', (0.07861346939195568, -0.0254, 0.1016)); +#98 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, 2.58064)); #99 = LINE('NONE', #98, #97); -#100 = DIRECTION('NONE', (1, -0.0000000000000003079278779307945, 0)); +#100 = DIRECTION('NONE', (1, -0.00000000000000038794063361359933, 0)); #101 = VECTOR('NONE', #100, 1); -#102 = CARTESIAN_POINT('NONE', (0.1511633881344551, -0.07619999999999998, -0)); +#102 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, -0)); #103 = LINE('NONE', #102, #101); #104 = DIRECTION('NONE', (0, 0, 1)); #105 = VECTOR('NONE', #104, 1); -#106 = CARTESIAN_POINT('NONE', (0.2413, -0.0762, -0)); +#106 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, -0)); #107 = LINE('NONE', #106, #105); -#108 = DIRECTION('NONE', (1, -0.0000000000000003079278779307945, 0)); +#108 = DIRECTION('NONE', (1, -0.00000000000000038794063361359933, 0)); #109 = VECTOR('NONE', #108, 1); -#110 = CARTESIAN_POINT('NONE', (0.1511633881344551, -0.07619999999999998, 0.1016)); +#110 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, 2.58064)); #111 = LINE('NONE', #110, #109); #112 = DIRECTION('NONE', (0, 1, 0)); #113 = VECTOR('NONE', #112, 1); -#114 = CARTESIAN_POINT('NONE', (0.2413, -0.0762, -0)); +#114 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, -0)); #115 = LINE('NONE', #114, #113); #116 = DIRECTION('NONE', (0, 0, 1)); #117 = VECTOR('NONE', #116, 1); -#118 = CARTESIAN_POINT('NONE', (0.2413, -0.0635, -0)); +#118 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, -0)); #119 = LINE('NONE', #118, #117); #120 = DIRECTION('NONE', (0, 1, 0)); #121 = VECTOR('NONE', #120, 1); -#122 = CARTESIAN_POINT('NONE', (0.2413, -0.0762, 0.1016)); +#122 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, 2.58064)); #123 = LINE('NONE', #122, #121); #124 = DIRECTION('NONE', (-1, 0, 0)); #125 = VECTOR('NONE', #124, 1); -#126 = CARTESIAN_POINT('NONE', (0.2413, -0.0635, -0)); +#126 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, -0)); #127 = LINE('NONE', #126, #125); #128 = DIRECTION('NONE', (0, 0, 1)); #129 = VECTOR('NONE', #128, 1); -#130 = CARTESIAN_POINT('NONE', (0.1551676827532182, -0.0635, -0)); +#130 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, -0)); #131 = LINE('NONE', #130, #129); #132 = DIRECTION('NONE', (-1, 0, 0)); #133 = VECTOR('NONE', #132, 1); -#134 = CARTESIAN_POINT('NONE', (0.2413, -0.0635, 0.1016)); +#134 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, 2.58064)); #135 = LINE('NONE', #134, #133); #136 = DIRECTION('NONE', (-0.8191520442889919, 0.573576436351046, 0)); #137 = VECTOR('NONE', #136, 1); -#138 = CARTESIAN_POINT('NONE', (0.1551676827532182, -0.0635, -0)); +#138 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, -0)); #139 = LINE('NONE', #138, #137); #140 = DIRECTION('NONE', (0, 0, 1)); #141 = VECTOR('NONE', #140, 1); -#142 = CARTESIAN_POINT('NONE', (0.06448028432509392, 0, -0)); +#142 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, -0)); #143 = LINE('NONE', #142, #141); #144 = DIRECTION('NONE', (-0.8191520442889919, 0.573576436351046, 0)); #145 = VECTOR('NONE', #144, 1); -#146 = CARTESIAN_POINT('NONE', (0.1551676827532182, -0.0635, 0.1016)); +#146 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, 2.58064)); #147 = LINE('NONE', #146, #145); -#148 = DIRECTION('NONE', (0.90630778703665, 0.4226182617406993, 0)); +#148 = DIRECTION('NONE', (0.90630778703665, 0.4226182617406992, 0)); #149 = VECTOR('NONE', #148, 1); -#150 = CARTESIAN_POINT('NONE', (0.06448028432509392, 0, -0)); +#150 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, -0)); #151 = LINE('NONE', #150, #149); #152 = DIRECTION('NONE', (0, 0, 1)); #153 = VECTOR('NONE', #152, 1); -#154 = CARTESIAN_POINT('NONE', (0.14618599799650817, 0.03810000000000001, -0)); +#154 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, -0)); #155 = LINE('NONE', #154, #153); -#156 = DIRECTION('NONE', (0.90630778703665, 0.4226182617406993, 0)); +#156 = DIRECTION('NONE', (0.90630778703665, 0.4226182617406992, 0)); #157 = VECTOR('NONE', #156, 1); -#158 = CARTESIAN_POINT('NONE', (0.06448028432509392, 0, 0.1016)); +#158 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, 2.58064)); #159 = LINE('NONE', #158, #157); -#160 = DIRECTION('NONE', (1, -0.00000000000000007295344279228718, 0)); +#160 = DIRECTION('NONE', (1, -0.0000000000000001378647737807002, 0)); #161 = VECTOR('NONE', #160, 1); -#162 = CARTESIAN_POINT('NONE', (0.14618599799650817, 0.03810000000000001, -0)); +#162 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, -0)); #163 = LINE('NONE', #162, #161); #164 = DIRECTION('NONE', (0, 0, 1)); #165 = VECTOR('NONE', #164, 1); -#166 = CARTESIAN_POINT('NONE', (0.2413, 0.0381, -0)); +#166 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, -0)); #167 = LINE('NONE', #166, #165); -#168 = DIRECTION('NONE', (1, -0.00000000000000007295344279228718, 0)); +#168 = DIRECTION('NONE', (1, -0.0000000000000001378647737807002, 0)); #169 = VECTOR('NONE', #168, 1); -#170 = CARTESIAN_POINT('NONE', (0.14618599799650817, 0.03810000000000001, 0.1016)); +#170 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, 2.58064)); #171 = LINE('NONE', #170, #169); #172 = DIRECTION('NONE', (0, 1, 0)); #173 = VECTOR('NONE', #172, 1); -#174 = CARTESIAN_POINT('NONE', (0.2413, 0.0381, -0)); +#174 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, -0)); #175 = LINE('NONE', #174, #173); #176 = DIRECTION('NONE', (0, 0, 1)); #177 = VECTOR('NONE', #176, 1); -#178 = CARTESIAN_POINT('NONE', (0.2413, 0.0508, -0)); +#178 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, -0)); #179 = LINE('NONE', #178, #177); #180 = DIRECTION('NONE', (0, 1, 0)); #181 = VECTOR('NONE', #180, 1); -#182 = CARTESIAN_POINT('NONE', (0.2413, 0.0381, 0.1016)); +#182 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, 2.58064)); #183 = LINE('NONE', #182, #181); #184 = DIRECTION('NONE', (-1, 0, 0)); #185 = VECTOR('NONE', #184, 1); -#186 = CARTESIAN_POINT('NONE', (0.2413, 0.0508, -0)); +#186 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, -0)); #187 = LINE('NONE', #186, #185); #188 = DIRECTION('NONE', (0, 0, 1)); #189 = VECTOR('NONE', #188, 1); -#190 = CARTESIAN_POINT('NONE', (0.14337047578094278, 0.0508, -0)); +#190 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, -0)); #191 = LINE('NONE', #190, #189); #192 = DIRECTION('NONE', (-1, 0, 0)); #193 = VECTOR('NONE', #192, 1); -#194 = CARTESIAN_POINT('NONE', (0.2413, 0.0508, 0.1016)); +#194 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, 2.58064)); #195 = LINE('NONE', #194, #193); -#196 = DIRECTION('NONE', (-0.90630778703665, -0.42261826174069944, 0)); +#196 = DIRECTION('NONE', (-0.90630778703665, -0.4226182617406995, 0)); #197 = VECTOR('NONE', #196, 1); -#198 = CARTESIAN_POINT('NONE', (0.14337047578094278, 0.0508, -0)); +#198 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, -0)); #199 = LINE('NONE', #198, #197); #200 = DIRECTION('NONE', (0, 0, 1)); #201 = VECTOR('NONE', #200, 1); -#202 = CARTESIAN_POINT('NONE', (0.08889999999999999, 0.0254, -0)); +#202 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, -0)); #203 = LINE('NONE', #202, #201); -#204 = DIRECTION('NONE', (-0.90630778703665, -0.42261826174069944, 0)); +#204 = DIRECTION('NONE', (-0.90630778703665, -0.4226182617406995, 0)); #205 = VECTOR('NONE', #204, 1); -#206 = CARTESIAN_POINT('NONE', (0.14337047578094278, 0.0508, 0.1016)); +#206 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, 2.58064)); #207 = LINE('NONE', #206, #205); #208 = DIRECTION('NONE', (-1, 0, 0)); #209 = VECTOR('NONE', #208, 1); -#210 = CARTESIAN_POINT('NONE', (0.08889999999999999, 0.0254, -0)); +#210 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, -0)); #211 = LINE('NONE', #210, #209); #212 = DIRECTION('NONE', (0, 0, 1)); #213 = VECTOR('NONE', #212, 1); -#214 = CARTESIAN_POINT('NONE', (0, 0.0254, -0)); +#214 = CARTESIAN_POINT('NONE', (0, 0.64516, -0)); #215 = LINE('NONE', #214, #213); #216 = DIRECTION('NONE', (-1, 0, 0)); #217 = VECTOR('NONE', #216, 1); -#218 = CARTESIAN_POINT('NONE', (0.08889999999999999, 0.0254, 0.1016)); +#218 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, 2.58064)); #219 = LINE('NONE', #218, #217); #220 = DIRECTION('NONE', (0, -1, 0)); #221 = VECTOR('NONE', #220, 1); -#222 = CARTESIAN_POINT('NONE', (0, 0.0254, -0)); +#222 = CARTESIAN_POINT('NONE', (0, 0.64516, -0)); #223 = LINE('NONE', #222, #221); #224 = DIRECTION('NONE', (0, -1, 0)); #225 = VECTOR('NONE', #224, 1); -#226 = CARTESIAN_POINT('NONE', (0, 0.0254, 0.1016)); +#226 = CARTESIAN_POINT('NONE', (0, 0.64516, 2.58064)); #227 = LINE('NONE', #226, #225); #228 = EDGE_CURVE('NONE', #5, #7, #63, .T.); #229 = EDGE_CURVE('NONE', #7, #9, #67, .T.); @@ -383,59 +383,59 @@ DATA; #367 = ORIENTED_EDGE('NONE', *, *, #267, .T.); #368 = ORIENTED_EDGE('NONE', *, *, #269, .T.); #369 = EDGE_LOOP('NONE', (#355, #356, #357, #358, #359, #360, #361, #362, #363, #364, #365, #366, #367, #368)); -#370 = CARTESIAN_POINT('NONE', (0, -0.0127, 0.0508)); +#370 = CARTESIAN_POINT('NONE', (0, -0.3225799999999985, 1.2903199999999995)); #371 = DIRECTION('NONE', (-1, -0, 0)); #372 = AXIS2_PLACEMENT_3D('NONE', #370, #371, $); #373 = PLANE('NONE', #372); -#374 = CARTESIAN_POINT('NONE', (0.039306734695977924, -0.025399999999999995, 0.0508)); +#374 = CARTESIAN_POINT('NONE', (0.9983910612778368, -0.6451599999999998, 1.2903199999999997)); #375 = DIRECTION('NONE', (0, -1, 0)); #376 = AXIS2_PLACEMENT_3D('NONE', #374, #375, $); #377 = PLANE('NONE', #376); -#378 = CARTESIAN_POINT('NONE', (0.11488842876320533, -0.05079999999999996, 0.05079999999999999)); +#378 = CARTESIAN_POINT('NONE', (2.918166090585415, -1.2903199999999988, 1.2903199999999997)); #379 = DIRECTION('NONE', (-0.5735764363510459, -0.8191520442889919, 0)); #380 = AXIS2_PLACEMENT_3D('NONE', #378, #379, $); #381 = PLANE('NONE', #380); -#382 = CARTESIAN_POINT('NONE', (0.19623169406722757, -0.07619999999999999, 0.0508)); +#382 = CARTESIAN_POINT('NONE', (4.984285029307579, -1.9354799999999992, 1.2903199999999997)); #383 = DIRECTION('NONE', (0, -1, 0)); #384 = AXIS2_PLACEMENT_3D('NONE', #382, #383, $); #385 = PLANE('NONE', #384); -#386 = CARTESIAN_POINT('NONE', (0.2413, -0.06985, 0.0508)); +#386 = CARTESIAN_POINT('NONE', (6.129019999999999, -1.7741899999999997, 1.2903199999999997)); #387 = DIRECTION('NONE', (1, -0, 0)); #388 = AXIS2_PLACEMENT_3D('NONE', #386, #387, $); #389 = PLANE('NONE', #388); -#390 = CARTESIAN_POINT('NONE', (0.19823384137660915, -0.0635, 0.0508)); +#390 = CARTESIAN_POINT('NONE', (5.035139570965871, -1.6128999999999998, 1.2903199999999997)); #391 = DIRECTION('NONE', (0, 1, -0)); #392 = AXIS2_PLACEMENT_3D('NONE', #390, #391, $); #393 = PLANE('NONE', #392); -#394 = CARTESIAN_POINT('NONE', (0.10982398353915601, -0.03174999999999997, 0.0508)); -#395 = DIRECTION('NONE', (0.5735764363510459, 0.8191520442889917, -0)); +#394 = CARTESIAN_POINT('NONE', (2.7895291818945633, -0.8064499999999998, 1.2903199999999995)); +#395 = DIRECTION('NONE', (0.5735764363510459, 0.8191520442889918, -0)); #396 = AXIS2_PLACEMENT_3D('NONE', #394, #395, $); #397 = PLANE('NONE', #396); -#398 = CARTESIAN_POINT('NONE', (0.105333141160801, 0.019049999999999987, 0.0508)); -#399 = DIRECTION('NONE', (0.4226182617406993, -0.90630778703665, 0)); +#398 = CARTESIAN_POINT('NONE', (2.6754617854843468, 0.4838700000000003, 1.2903199999999997)); +#399 = DIRECTION('NONE', (0.4226182617406992, -0.90630778703665, 0)); #400 = AXIS2_PLACEMENT_3D('NONE', #398, #399, $); #401 = PLANE('NONE', #400); -#402 = CARTESIAN_POINT('NONE', (0.19374299899825406, 0.0381, 0.0508)); +#402 = CARTESIAN_POINT('NONE', (4.921072174555653, 0.9677399999999998, 1.2903199999999995)); #403 = DIRECTION('NONE', (0, -1, 0)); #404 = AXIS2_PLACEMENT_3D('NONE', #402, #403, $); #405 = PLANE('NONE', #404); -#406 = CARTESIAN_POINT('NONE', (0.2413, 0.044449999999999996, 0.0508)); +#406 = CARTESIAN_POINT('NONE', (6.129019999999998, 1.1290299999999989, 1.2903199999999995)); #407 = DIRECTION('NONE', (1, -0, 0)); #408 = AXIS2_PLACEMENT_3D('NONE', #406, #407, $); #409 = PLANE('NONE', #408); -#410 = CARTESIAN_POINT('NONE', (0.19233523789047138, 0.0508, 0.0508)); +#410 = CARTESIAN_POINT('NONE', (4.8853150424179725, 1.2903199999999997, 1.2903199999999997)); #411 = DIRECTION('NONE', (0, 1, -0)); #412 = AXIS2_PLACEMENT_3D('NONE', #410, #411, $); #413 = PLANE('NONE', #412); -#414 = CARTESIAN_POINT('NONE', (0.11613523789047137, 0.0381, 0.05079999999999999)); -#415 = DIRECTION('NONE', (-0.42261826174069966, 0.90630778703665, -0)); +#414 = CARTESIAN_POINT('NONE', (2.9498350424179733, 0.9677399999999998, 1.2903199999999997)); +#415 = DIRECTION('NONE', (-0.42261826174069933, 0.9063077870366499, -0)); #416 = AXIS2_PLACEMENT_3D('NONE', #414, #415, $); #417 = PLANE('NONE', #416); -#418 = CARTESIAN_POINT('NONE', (0.044449999999999996, 0.0254, 0.0508)); +#418 = CARTESIAN_POINT('NONE', (1.1290299999999998, 0.6451599999999998, 1.29032)); #419 = DIRECTION('NONE', (0, 1, -0)); #420 = AXIS2_PLACEMENT_3D('NONE', #418, #419, $); #421 = PLANE('NONE', #420); -#422 = CARTESIAN_POINT('NONE', (0, 0.0127, 0.0508)); +#422 = CARTESIAN_POINT('NONE', (0, 0.32257999999999987, 1.2903199999999995)); #423 = DIRECTION('NONE', (-1, -0, 0)); #424 = AXIS2_PLACEMENT_3D('NONE', #422, #423, $); #425 = PLANE('NONE', #424); @@ -443,7 +443,7 @@ DATA; #427 = DIRECTION('NONE', (0, 0, 1)); #428 = AXIS2_PLACEMENT_3D('NONE', #426, #427, $); #429 = PLANE('NONE', #428); -#430 = CARTESIAN_POINT('NONE', (0, 0, 0.1016)); +#430 = CARTESIAN_POINT('NONE', (0, 0, 2.58064)); #431 = DIRECTION('NONE', (0, 0, 1)); #432 = AXIS2_PLACEMENT_3D('NONE', #430, #431, $); #433 = PLANE('NONE', #432); diff --git a/e2e/playwright/export-snapshots/stl-ascii.png b/e2e/playwright/export-snapshots/stl-ascii.png index c1b146fe9..39fac8f85 100644 Binary files a/e2e/playwright/export-snapshots/stl-ascii.png and b/e2e/playwright/export-snapshots/stl-ascii.png differ diff --git a/e2e/playwright/export-snapshots/stl-ascii.stl b/e2e/playwright/export-snapshots/stl-ascii.stl index 00213e5f6..40370c8a8 100644 --- a/e2e/playwright/export-snapshots/stl-ascii.stl +++ b/e2e/playwright/export-snapshots/stl-ascii.stl @@ -1,478 +1,478 @@ solid unnamed facet normal -1 0 0 outer loop - vertex 0 -4 0 + vertex 0 -101.600006 0 vertex 0 -0 0 - vertex 0 -4 -1 + vertex 0 -101.600006 -25.400002 endloop endfacet facet normal -1 0 0 outer loop - vertex 0 -4 -1 + vertex 0 -101.600006 -25.400002 vertex 0 -0 0 - vertex 0 -0 -1 + vertex 0 -0 -25.400002 endloop endfacet facet normal 0 0 -1 outer loop - vertex 0 -4 -1 - vertex 0 -0 -1 - vertex 3.0950184 -4 -1 + vertex 0 -101.600006 -25.400002 + vertex 0 -0 -25.400002 + vertex 78.613464 -101.600006 -25.400002 endloop endfacet facet normal 0 0 -1 outer loop - vertex 3.0950184 -4 -1 - vertex 0 -0 -1 - vertex 3.0950184 -0 -1 + vertex 78.613464 -101.600006 -25.400002 + vertex 0 -0 -25.400002 + vertex 78.613464 -0 -25.400002 endloop endfacet -facet normal -0.57357645 0 -0.81915206 +facet normal -0.5735764 0 -0.8191522 outer loop - vertex 3.0950184 -4 -1 - vertex 3.0950184 -0 -1 - vertex 5.9513144 -4 -3 + vertex 78.613464 -101.600006 -25.400002 + vertex 78.613464 -0 -25.400002 + vertex 151.16339 -101.600006 -76.2 endloop endfacet -facet normal -0.57357645 0 -0.81915206 +facet normal -0.5735764 0 -0.8191522 outer loop - vertex 5.9513144 -4 -3 - vertex 3.0950184 -0 -1 - vertex 5.9513144 -0 -3 + vertex 151.16339 -101.600006 -76.2 + vertex 78.613464 -0 -25.400002 + vertex 151.16339 -0 -76.2 endloop endfacet facet normal 0 0 -1 outer loop - vertex 5.9513144 -4 -3 - vertex 5.9513144 -0 -3 - vertex 9.5 -4 -3 + vertex 151.16339 -101.600006 -76.2 + vertex 151.16339 -0 -76.2 + vertex 241.3 -101.600006 -76.2 endloop endfacet facet normal 0 0 -1 outer loop - vertex 9.5 -4 -3 - vertex 5.9513144 -0 -3 - vertex 9.5 -0 -3 + vertex 241.3 -101.600006 -76.2 + vertex 151.16339 -0 -76.2 + vertex 241.3 -0 -76.2 endloop endfacet facet normal 1 0 0 outer loop - vertex 9.5 -4 -3 - vertex 9.5 -0 -3 - vertex 9.5 -4 -2.5 + vertex 241.3 -101.600006 -76.2 + vertex 241.3 -0 -76.2 + vertex 241.3 -101.600006 -63.5 endloop endfacet facet normal 1 -0 0 outer loop - vertex 9.5 -4 -2.5 - vertex 9.5 -0 -3 - vertex 9.5 -0 -2.5 + vertex 241.3 -101.600006 -63.5 + vertex 241.3 -0 -76.2 + vertex 241.3 -0 -63.5 + endloop +endfacet +facet normal 0 -0 1 + outer loop + vertex 241.3 -101.600006 -63.5 + vertex 241.3 -0 -63.5 + vertex 155.16768 -101.600006 -63.5 + endloop +endfacet +facet normal 0 0 1 + outer loop + vertex 155.16768 -101.600006 -63.5 + vertex 241.3 -0 -63.5 + vertex 155.16768 -0 -63.5 + endloop +endfacet +facet normal 0.5735765 0 0.81915194 + outer loop + vertex 87.15214 -101.600006 -15.875 + vertex 109.82398 -101.600006 -31.75 + vertex 109.82398 -0 -31.75 + endloop +endfacet +facet normal 0.57357645 0 0.819152 + outer loop + vertex 109.82398 -101.600006 -31.75 + vertex 155.16768 -101.600006 -63.5 + vertex 155.16768 -0 -63.5 + endloop +endfacet +facet normal 0.57357645 0 0.81915206 + outer loop + vertex 87.15214 -0 -15.875 + vertex 64.480286 -101.600006 0 + vertex 87.15214 -101.600006 -15.875 + endloop +endfacet +facet normal 0.5735765 0 0.81915194 + outer loop + vertex 109.82398 -0 -31.75 + vertex 87.15214 -0 -15.875 + vertex 87.15214 -101.600006 -15.875 + endloop +endfacet +facet normal 0.57357645 -0 0.819152 + outer loop + vertex 109.82398 -101.600006 -31.75 + vertex 155.16768 -0 -63.5 + vertex 109.82398 -0 -31.75 + endloop +endfacet +facet normal 0.57357645 -0 0.81915206 + outer loop + vertex 64.480286 -101.600006 0 + vertex 87.15214 -0 -15.875 + vertex 64.480286 -0 0 + endloop +endfacet +facet normal 0.4226182 0 -0.9063078 + outer loop + vertex 84.906715 -101.600006 9.525 + vertex 64.480286 -101.600006 0 + vertex 64.480286 -0 0 + endloop +endfacet +facet normal 0.42261833 0 -0.90630776 + outer loop + vertex 105.33314 -101.600006 19.05 + vertex 84.906715 -101.600006 9.525 + vertex 84.906715 -0 9.525 + endloop +endfacet +facet normal 0.4226182 0 -0.9063078 + outer loop + vertex 84.906715 -0 9.525 + vertex 84.906715 -101.600006 9.525 + vertex 64.480286 -0 0 + endloop +endfacet +facet normal 0.4226183 0 -0.9063078 + outer loop + vertex 105.33314 -0 19.05 + vertex 146.18599 -101.600006 38.1 + vertex 105.33314 -101.600006 19.05 + endloop +endfacet +facet normal 0.42261833 0 -0.90630776 + outer loop + vertex 105.33314 -101.600006 19.05 + vertex 84.906715 -0 9.525 + vertex 105.33314 -0 19.05 + endloop +endfacet +facet normal 0.4226183 0 -0.9063078 + outer loop + vertex 146.18599 -101.600006 38.1 + vertex 105.33314 -0 19.05 + vertex 146.18599 -0 38.1 + endloop +endfacet +facet normal 0 0 -1 + outer loop + vertex 146.18599 -101.600006 38.1 + vertex 146.18599 -0 38.1 + vertex 241.3 -101.600006 38.1 + endloop +endfacet +facet normal 0 0 -1 + outer loop + vertex 241.3 -101.600006 38.1 + vertex 146.18599 -0 38.1 + vertex 241.3 -0 38.1 + endloop +endfacet +facet normal 1 0 0 + outer loop + vertex 241.3 -101.600006 38.1 + vertex 241.3 -0 38.1 + vertex 241.3 -101.600006 50.800003 + endloop +endfacet +facet normal 1 -0 0 + outer loop + vertex 241.3 -101.600006 50.800003 + vertex 241.3 -0 38.1 + vertex 241.3 -0 50.800003 endloop endfacet facet normal 0 -0 0.99999994 outer loop - vertex 9.5 -4 -2.5 - vertex 9.5 -0 -2.5 - vertex 6.108964 -4 -2.5 + vertex 241.3 -101.600006 50.800003 + vertex 241.3 -0 50.800003 + vertex 143.37048 -101.600006 50.800003 endloop endfacet facet normal 0 0 0.99999994 outer loop - vertex 6.108964 -4 -2.5 - vertex 9.5 -0 -2.5 - vertex 6.108964 -0 -2.5 + vertex 143.37048 -101.600006 50.800003 + vertex 241.3 -0 50.800003 + vertex 143.37048 -0 50.800003 endloop endfacet -facet normal 0.5735763 0 0.8191522 +facet normal -0.42261827 0 0.9063078 outer loop - vertex 3.4311862 -4 -0.625 - vertex 4.323779 -4 -1.25 - vertex 4.323779 -0 -1.25 + vertex 143.37048 -101.600006 50.800003 + vertex 143.37048 -0 50.800003 + vertex 88.9 -101.600006 25.400002 endloop endfacet -facet normal 0.57357645 0 0.819152 +facet normal -0.42261827 0 0.9063078 outer loop - vertex 4.323779 -4 -1.25 - vertex 6.108964 -4 -2.5 - vertex 6.108964 -0 -2.5 - endloop -endfacet -facet normal 0.57357645 0 0.819152 - outer loop - vertex 3.4311862 -0 -0.625 - vertex 2.5385938 -4 0 - vertex 3.4311862 -4 -0.625 - endloop -endfacet -facet normal 0.5735763 0 0.8191522 - outer loop - vertex 4.323779 -0 -1.25 - vertex 3.4311862 -0 -0.625 - vertex 3.4311862 -4 -0.625 - endloop -endfacet -facet normal 0.57357645 -0 0.819152 - outer loop - vertex 4.323779 -4 -1.25 - vertex 6.108964 -0 -2.5 - vertex 4.323779 -0 -1.25 - endloop -endfacet -facet normal 0.57357645 -0 0.819152 - outer loop - vertex 2.5385938 -4 0 - vertex 3.4311862 -0 -0.625 - vertex 2.5385938 -0 0 - endloop -endfacet -facet normal 0.42261824 0 -0.9063078 - outer loop - vertex 3.342784 -4 0.375 - vertex 2.5385938 -4 0 - vertex 2.5385938 -0 0 - endloop -endfacet -facet normal 0.42261824 0 -0.9063078 - outer loop - vertex 4.146974 -4 0.75 - vertex 3.342784 -4 0.375 - vertex 3.342784 -0 0.375 - endloop -endfacet -facet normal 0.42261824 0 -0.9063078 - outer loop - vertex 3.342784 -0 0.375 - vertex 3.342784 -4 0.375 - vertex 2.5385938 -0 0 - endloop -endfacet -facet normal 0.42261833 0 -0.90630776 - outer loop - vertex 4.146974 -0 0.75 - vertex 5.755354 -4 1.5 - vertex 4.146974 -4 0.75 - endloop -endfacet -facet normal 0.42261824 0 -0.9063078 - outer loop - vertex 4.146974 -4 0.75 - vertex 3.342784 -0 0.375 - vertex 4.146974 -0 0.75 - endloop -endfacet -facet normal 0.42261833 0 -0.90630776 - outer loop - vertex 5.755354 -4 1.5 - vertex 4.146974 -0 0.75 - vertex 5.755354 -0 1.5 - endloop -endfacet -facet normal 0 0 -1 - outer loop - vertex 5.755354 -4 1.5 - vertex 5.755354 -0 1.5 - vertex 9.5 -4 1.5 - endloop -endfacet -facet normal 0 0 -1 - outer loop - vertex 9.5 -4 1.5 - vertex 5.755354 -0 1.5 - vertex 9.5 -0 1.5 - endloop -endfacet -facet normal 1 0 0 - outer loop - vertex 9.5 -4 1.5 - vertex 9.5 -0 1.5 - vertex 9.5 -4 2 - endloop -endfacet -facet normal 1 -0 0 - outer loop - vertex 9.5 -4 2 - vertex 9.5 -0 1.5 - vertex 9.5 -0 2 + vertex 88.9 -101.600006 25.400002 + vertex 143.37048 -0 50.800003 + vertex 88.9 -0 25.400002 endloop endfacet facet normal 0 -0 1 outer loop - vertex 9.5 -4 2 - vertex 9.5 -0 2 - vertex 5.644507 -4 2 + vertex 88.9 -101.600006 25.400002 + vertex 88.9 -0 25.400002 + vertex 0 -101.600006 25.400002 endloop endfacet facet normal 0 0 1 outer loop - vertex 5.644507 -4 2 - vertex 9.5 -0 2 - vertex 5.644507 -0 2 - endloop -endfacet -facet normal -0.42261824 0 0.90630776 - outer loop - vertex 5.644507 -4 2 - vertex 5.644507 -0 2 - vertex 3.5 -4 1 - endloop -endfacet -facet normal -0.42261824 0 0.90630776 - outer loop - vertex 3.5 -4 1 - vertex 5.644507 -0 2 - vertex 3.5 -0 1 - endloop -endfacet -facet normal 0 -0 1 - outer loop - vertex 3.5 -4 1 - vertex 3.5 -0 1 - vertex 0 -4 1 - endloop -endfacet -facet normal 0 0 1 - outer loop - vertex 0 -4 1 - vertex 3.5 -0 1 - vertex 0 -0 1 + vertex 0 -101.600006 25.400002 + vertex 88.9 -0 25.400002 + vertex 0 -0 25.400002 endloop endfacet facet normal -1 0 0 outer loop - vertex 0 -4 1 - vertex 0 -0 1 - vertex 0 -4 0 + vertex 0 -101.600006 25.400002 + vertex 0 -0 25.400002 + vertex 0 -101.600006 0 endloop endfacet facet normal -1 0 0 outer loop - vertex 0 -4 0 - vertex 0 -0 1 + vertex 0 -101.600006 0 + vertex 0 -0 25.400002 vertex 0 -0 0 endloop endfacet facet normal 0 1 -0 outer loop - vertex 3.342784 -0 0.375 - vertex 2.5385938 -0 0 - vertex 3.5 -0 1 + vertex 84.906715 -0 9.525 + vertex 64.480286 -0 0 + vertex 88.9 -0 25.400002 endloop endfacet facet normal 0 1 0 outer loop - vertex 4.146974 -0 0.75 - vertex 3.342784 -0 0.375 - vertex 3.5 -0 1 + vertex 105.33314 -0 19.05 + vertex 84.906715 -0 9.525 + vertex 88.9 -0 25.400002 endloop endfacet facet normal 0 1 0 outer loop - vertex 3.4311862 -0 -0.625 - vertex 4.323779 -0 -1.25 - vertex 3.0950184 -0 -1 + vertex 87.15214 -0 -15.875 + vertex 109.82398 -0 -31.75 + vertex 78.613464 -0 -25.400002 endloop endfacet -facet normal 0 0.99999994 0 +facet normal 0 1 0 outer loop - vertex 4.146974 -0 0.75 - vertex 5.644507 -0 2 - vertex 5.755354 -0 1.5 + vertex 105.33314 -0 19.05 + vertex 143.37048 -0 50.800003 + vertex 146.18599 -0 38.1 endloop endfacet facet normal -0 1 0 outer loop - vertex 0 -0 1 - vertex 3.5 -0 1 - vertex 2.5385938 -0 0 + vertex 0 -0 25.400002 + vertex 88.9 -0 25.400002 + vertex 64.480286 -0 0 endloop endfacet facet normal 0 1 0 outer loop - vertex 0 -0 1 - vertex 2.5385938 -0 0 + vertex 0 -0 25.400002 + vertex 64.480286 -0 0 vertex 0 -0 0 endloop endfacet facet normal -0 1 0 outer loop - vertex 5.644507 -0 2 - vertex 9.5 -0 2 - vertex 5.755354 -0 1.5 + vertex 143.37048 -0 50.800003 + vertex 241.3 -0 50.800003 + vertex 146.18599 -0 38.1 endloop endfacet facet normal 0 1 0 outer loop - vertex 9.5 -0 2 - vertex 9.5 -0 1.5 - vertex 5.755354 -0 1.5 + vertex 241.3 -0 50.800003 + vertex 241.3 -0 38.1 + vertex 146.18599 -0 38.1 endloop endfacet facet normal 0 1 -0 outer loop - vertex 4.146974 -0 0.75 - vertex 3.5 -0 1 - vertex 5.644507 -0 2 + vertex 105.33314 -0 19.05 + vertex 88.9 -0 25.400002 + vertex 143.37048 -0 50.800003 endloop endfacet facet normal 0 0.99999994 0 outer loop - vertex 2.5385938 -0 0 - vertex 3.4311862 -0 -0.625 - vertex 3.0950184 -0 -1 - endloop -endfacet -facet normal 0 0.99999994 0 - outer loop - vertex 4.323779 -0 -1.25 - vertex 5.9513144 -0 -3 - vertex 3.0950184 -0 -1 + vertex 64.480286 -0 0 + vertex 87.15214 -0 -15.875 + vertex 78.613464 -0 -25.400002 endloop endfacet facet normal 0 1 0 outer loop - vertex 6.108964 -0 -2.5 - vertex 5.9513144 -0 -3 - vertex 4.323779 -0 -1.25 - endloop -endfacet -facet normal 0 0.99999994 0 - outer loop - vertex 9.5 -0 -2.5 - vertex 9.5 -0 -3 - vertex 6.108964 -0 -2.5 + vertex 109.82398 -0 -31.75 + vertex 151.16339 -0 -76.2 + vertex 78.613464 -0 -25.400002 endloop endfacet facet normal 0 1 0 outer loop - vertex 6.108964 -0 -2.5 - vertex 9.5 -0 -3 - vertex 5.9513144 -0 -3 + vertex 155.16768 -0 -63.5 + vertex 151.16339 -0 -76.2 + vertex 109.82398 -0 -31.75 endloop endfacet facet normal 0 1 0 outer loop - vertex 2.5385938 -0 0 - vertex 3.0950184 -0 -1 - vertex 0 -0 -1 + vertex 241.3 -0 -63.5 + vertex 241.3 -0 -76.2 + vertex 155.16768 -0 -63.5 endloop endfacet facet normal 0 1 0 outer loop - vertex 0 -0 -1 + vertex 155.16768 -0 -63.5 + vertex 241.3 -0 -76.2 + vertex 151.16339 -0 -76.2 + endloop +endfacet +facet normal 0 1 0 + outer loop + vertex 64.480286 -0 0 + vertex 78.613464 -0 -25.400002 + vertex 0 -0 -25.400002 + endloop +endfacet +facet normal 0 1 0 + outer loop + vertex 0 -0 -25.400002 vertex 0 -0 0 - vertex 2.5385938 -0 0 + vertex 64.480286 -0 0 endloop endfacet facet normal -0 -1 0 outer loop - vertex 3.342784 -4 0.375 - vertex 3.5 -4 1 - vertex 2.5385938 -4 0 + vertex 84.906715 -101.600006 9.525 + vertex 88.9 -101.600006 25.400002 + vertex 64.480286 -101.600006 0 endloop endfacet facet normal -0 -1 0 outer loop - vertex 4.146974 -4 0.75 - vertex 3.5 -4 1 - vertex 3.342784 -4 0.375 + vertex 105.33314 -101.600006 19.05 + vertex 88.9 -101.600006 25.400002 + vertex 84.906715 -101.600006 9.525 endloop endfacet facet normal 0 -1 -0 outer loop - vertex 3.4311862 -4 -0.625 - vertex 3.0950184 -4 -1 - vertex 4.323779 -4 -1.25 + vertex 87.15214 -101.600006 -15.875 + vertex 78.613464 -101.600006 -25.400002 + vertex 109.82398 -101.600006 -31.75 + endloop +endfacet +facet normal 0 -1 0 + outer loop + vertex 105.33314 -101.600006 19.05 + vertex 146.18599 -101.600006 38.1 + vertex 143.37048 -101.600006 50.800003 + endloop +endfacet +facet normal 0 -1 0 + outer loop + vertex 0 -101.600006 25.400002 + vertex 64.480286 -101.600006 0 + vertex 88.9 -101.600006 25.400002 + endloop +endfacet +facet normal 0 -1 0 + outer loop + vertex 0 -101.600006 25.400002 + vertex 0 -101.600006 0 + vertex 64.480286 -101.600006 0 + endloop +endfacet +facet normal 0 -1 0 + outer loop + vertex 143.37048 -101.600006 50.800003 + vertex 146.18599 -101.600006 38.1 + vertex 241.3 -101.600006 50.800003 + endloop +endfacet +facet normal 0 -1 -0 + outer loop + vertex 241.3 -101.600006 50.800003 + vertex 146.18599 -101.600006 38.1 + vertex 241.3 -101.600006 38.1 + endloop +endfacet +facet normal 0 -1 0 + outer loop + vertex 105.33314 -101.600006 19.05 + vertex 143.37048 -101.600006 50.800003 + vertex 88.9 -101.600006 25.400002 endloop endfacet facet normal 0 -0.99999994 0 outer loop - vertex 4.146974 -4 0.75 - vertex 5.755354 -4 1.5 - vertex 5.644507 -4 2 + vertex 64.480286 -101.600006 0 + vertex 78.613464 -101.600006 -25.400002 + vertex 87.15214 -101.600006 -15.875 endloop endfacet -facet normal 0 -1 0 +facet normal -0 -1 -0 outer loop - vertex 0 -4 1 - vertex 2.5385938 -4 0 - vertex 3.5 -4 1 - endloop -endfacet -facet normal 0 -1 0 - outer loop - vertex 0 -4 1 - vertex 0 -4 0 - vertex 2.5385938 -4 0 - endloop -endfacet -facet normal 0 -1 0 - outer loop - vertex 5.644507 -4 2 - vertex 5.755354 -4 1.5 - vertex 9.5 -4 2 - endloop -endfacet -facet normal 0 -1 -0 - outer loop - vertex 9.5 -4 2 - vertex 5.755354 -4 1.5 - vertex 9.5 -4 1.5 - endloop -endfacet -facet normal 0 -1 0 - outer loop - vertex 4.146974 -4 0.75 - vertex 5.644507 -4 2 - vertex 3.5 -4 1 - endloop -endfacet -facet normal 0 -0.99999994 0 - outer loop - vertex 2.5385938 -4 0 - vertex 3.0950184 -4 -1 - vertex 3.4311862 -4 -0.625 - endloop -endfacet -facet normal -0 -0.99999994 -0 - outer loop - vertex 4.323779 -4 -1.25 - vertex 3.0950184 -4 -1 - vertex 5.9513144 -4 -3 + vertex 109.82398 -101.600006 -31.75 + vertex 78.613464 -101.600006 -25.400002 + vertex 151.16339 -101.600006 -76.2 endloop endfacet facet normal -0 -1 0 outer loop - vertex 6.108964 -4 -2.5 - vertex 4.323779 -4 -1.25 - vertex 5.9513144 -4 -3 + vertex 155.16768 -101.600006 -63.5 + vertex 109.82398 -101.600006 -31.75 + vertex 151.16339 -101.600006 -76.2 endloop endfacet -facet normal -0 -0.99999994 -0 +facet normal -0 -1 -0 outer loop - vertex 9.5 -4 -2.5 - vertex 6.108964 -4 -2.5 - vertex 9.5 -4 -3 + vertex 241.3 -101.600006 -63.5 + vertex 155.16768 -101.600006 -63.5 + vertex 241.3 -101.600006 -76.2 endloop endfacet facet normal 0 -1 -0 outer loop - vertex 6.108964 -4 -2.5 - vertex 5.9513144 -4 -3 - vertex 9.5 -4 -3 + vertex 155.16768 -101.600006 -63.5 + vertex 151.16339 -101.600006 -76.2 + vertex 241.3 -101.600006 -76.2 endloop endfacet facet normal 0 -1 -0 outer loop - vertex 2.5385938 -4 0 - vertex 0 -4 -1 - vertex 3.0950184 -4 -1 + vertex 64.480286 -101.600006 0 + vertex 0 -101.600006 -25.400002 + vertex 78.613464 -101.600006 -25.400002 endloop endfacet facet normal 0 -1 0 outer loop - vertex 0 -4 -1 - vertex 2.5385938 -4 0 - vertex 0 -4 0 + vertex 0 -101.600006 -25.400002 + vertex 64.480286 -101.600006 0 + vertex 0 -101.600006 0 endloop endfacet endsolid unnamed diff --git a/e2e/playwright/export-snapshots/stl-binary.png b/e2e/playwright/export-snapshots/stl-binary.png index c1b146fe9..39fac8f85 100644 Binary files a/e2e/playwright/export-snapshots/stl-binary.png and b/e2e/playwright/export-snapshots/stl-binary.png differ diff --git a/e2e/playwright/export-snapshots/stl-binary.stl b/e2e/playwright/export-snapshots/stl-binary.stl index 451173e65..cd0b2f820 100644 Binary files a/e2e/playwright/export-snapshots/stl-binary.stl and b/e2e/playwright/export-snapshots/stl-binary.stl differ diff --git a/e2e/playwright/flow-tests.spec.ts b/e2e/playwright/flow-tests.spec.ts index 349f6a83c..29f4c78e1 100644 --- a/e2e/playwright/flow-tests.spec.ts +++ b/e2e/playwright/flow-tests.spec.ts @@ -68,11 +68,11 @@ test('Basic sketch', async ({ page }) => { `const part001 = startSketchOn('-XZ')` ) - await page.waitForTimeout(500) // TODO detect animation ending, or disable animation + await page.waitForTimeout(300) // TODO detect animation ending, or disable animation const startXPx = 600 await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10) - const startAt = '[23.89, -32.23]' + const startAt = '[23.74, -32.03]' await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %)`) @@ -82,7 +82,7 @@ test('Basic sketch', async ({ page }) => { await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) await page.waitForTimeout(100) - const num = 24.11 + const num = 23.97 await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) @@ -93,14 +93,14 @@ test('Basic sketch', async ({ page }) => { .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) |> line([${num}, 0], %) - |> line([0, ${num + 0.01}], %)`) + |> line([0, ${num}], %)`) await page.mouse.click(startXPx, 500 - PUR * 20) await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) |> line([${num}, 0], %) - |> line([0, ${num + 0.01}], %) - |> line([-48, 0], %)`) + |> line([0, ${num}], %) + |> line([-47.71, 0], %)`) // deselect line tool await page.getByRole('button', { name: 'Line' }).click() @@ -124,7 +124,7 @@ test('Basic sketch', async ({ page }) => { .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) |> line({ to: [${num}, 0], tag: 'seg01' }, %) - |> line([0, ${num + 0.01}], %) + |> line([0, ${num}], %) |> angledLine([180, segLen('seg01', %)], %)`) }) @@ -197,7 +197,7 @@ test('if you write invalid kcl you get inlined errors', async ({ page }) => { test('executes on load', async ({ page, context }) => { const u = getUtils(page) - await context.addInitScript(async (token) => { + await context.addInitScript(async () => { localStorage.setItem( 'persistCode', `const part001 = startSketchOn('-XZ') @@ -306,9 +306,10 @@ test('Can create sketches on all planes and their back sides', async ({ const codeTemplate = ( plane = 'XY', - rounded = false + rounded = false, + otherThing = '1' ) => `const part001 = startSketchOn('${plane}') - |> startProfileAt([28.91, -39${rounded ? '' : '.01'}], %)` + |> startProfileAt([28.9${otherThing}, -39${rounded ? '' : '.01'}], %)` await TestSinglePlane({ viewCmd: camPos, expectedCode: codeTemplate('XY'), @@ -328,7 +329,7 @@ test('Can create sketches on all planes and their back sides', async ({ const camCmdBackSide: [number, number, number] = [-100, -100, -100] await TestSinglePlane({ viewCmd: camCmdBackSide, - expectedCode: codeTemplate('-XY', true), + expectedCode: codeTemplate('-XY', false, '3'), clickCoords: { x: 601, y: 118 }, // back of red plane }) await TestSinglePlane({ @@ -366,6 +367,7 @@ test('Auto complete works', async ({ page }) => { await page.keyboard.type(' |> startProfi') // expect there be a single auto complete option that we can just hit enter on await expect(page.locator('.cm-completionLabel')).toBeVisible() + await page.waitForTimeout(100) await page.keyboard.press('Enter') // accepting the auto complete, not a new line await page.keyboard.type('([0,0], %)') @@ -373,6 +375,7 @@ test('Auto complete works', async ({ page }) => { await page.keyboard.type(' |> lin') await expect(page.locator('.cm-tooltip-autocomplete')).toBeVisible() + await page.waitForTimeout(100) // press arrow down twice then enter to accept xLine await page.keyboard.press('ArrowDown') await page.keyboard.press('ArrowDown') @@ -458,7 +461,7 @@ test('Selections work on fresh and edited sketch', async ({ page }) => { const startXPx = 600 await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10) - const startAt = '[23.89, -32.23]' + const startAt = '[23.74, -32.03]' await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %)`) @@ -467,8 +470,8 @@ test('Selections work on fresh and edited sketch', async ({ page }) => { await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) - const num = 24.11 - const num2 = '48' + const num = 23.97 + const num2 = '47.71' await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) @@ -479,13 +482,13 @@ test('Selections work on fresh and edited sketch', async ({ page }) => { .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) |> line([${num}, 0], %) - |> line([0, ${num + 0.01}], %)`) + |> line([0, ${num}], %)`) await page.mouse.click(startXPx, 500 - PUR * 20) await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) |> line([${num}, 0], %) - |> line([0, ${num + 0.01}], %) + |> line([0, ${num}], %) |> line([-${num2}, 0], %)`) // deselect line tool @@ -571,12 +574,13 @@ test('Selections work on fresh and edited sketch', async ({ page }) => { await u.closeDebugPanel() // select a line - await topHorzSegmentClick() - await page.waitForTimeout(200) + // await topHorzSegmentClick() + await page.getByText(startAt).click() // TODO remove this and reinstate // await topHorzSegmentClick() + await page.waitForTimeout(100) // enter sketch again - await page.getByRole('button', { name: 'Start Sketch' }).click() - await page.waitForTimeout(700) // wait for animation + await page.getByRole('button', { name: 'Edit Sketch' }).click() + await page.waitForTimeout(300) // wait for animation // hover again and check it works await selectionSequence() @@ -712,7 +716,7 @@ test('Can add multiple sketches', async ({ page }) => { const startXPx = 600 await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10) - const startAt = '[23.89, -32.23]' + const startAt = '[23.74, -32.03]' await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %)`) @@ -722,7 +726,7 @@ test('Can add multiple sketches', async ({ page }) => { await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) await page.waitForTimeout(100) - const num = 24.11 + const num = 23.97 await expect(page.locator('.cm-content')) .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) @@ -733,13 +737,13 @@ test('Can add multiple sketches', async ({ page }) => { .toHaveText(`const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) |> line([${num}, 0], %) - |> line([0, ${num + 0.01}], %)`) + |> line([0, ${num}], %)`) await page.mouse.click(startXPx, 500 - PUR * 20) const finalCodeFirstSketch = `const part001 = startSketchOn('-XZ') |> startProfileAt(${startAt}, %) |> line([${num}, 0], %) - |> line([0, ${num + 0.01}], %) - |> line([-48, 0], %)` + |> line([0, ${num}], %) + |> line([-47.71, 0], %)` await expect(page.locator('.cm-content')).toHaveText(finalCodeFirstSketch) // exit the sketch @@ -810,7 +814,7 @@ const part002 = startSketchOn('XY') test('ProgramMemory can be serialised', async ({ page, context }) => { const u = getUtils(page) - await context.addInitScript(async (token) => { + await context.addInitScript(async () => { localStorage.setItem( 'persistCode', `const part = startSketchOn('XY') @@ -846,3 +850,167 @@ test('ProgramMemory can be serialised', async ({ page, context }) => { }) }) }) + +test("Various pipe expressions should and shouldn't allow edit and or extrude", async ({ + page, + context, +}) => { + const u = getUtils(page) + const selectionsSnippets = { + extrudeAndEditBlocked: '|> startProfileAt([10.81, 32.99], %)', + extrudeAndEditBlockedInFunction: '|> startProfileAt(pos, %)', + extrudeAndEditAllowed: '|> startProfileAt([15.72, 4.7], %)', + editOnly: '|> startProfileAt([15.79, -14.6], %)', + } + await context.addInitScript( + async ({ + extrudeAndEditBlocked, + extrudeAndEditBlockedInFunction, + extrudeAndEditAllowed, + editOnly, + }: any) => { + localStorage.setItem( + 'persistCode', + `const part001 = startSketchOn('-XZ') + ${extrudeAndEditBlocked} + |> line([25.96, 2.93], %) + |> line([5.25, -5.72], %) + |> line([-2.01, -10.35], %) + |> line([-27.65, -2.78], %) + |> close(%) + |> extrude(5, %) +const part002 = startSketchOn('-XZ') + ${extrudeAndEditAllowed} + |> line([10.32, 6.47], %) + |> line([9.71, -6.16], %) + |> line([-3.08, -9.86], %) + |> line([-12.02, -1.54], %) + |> close(%) +const part003 = startSketchOn('-XZ') + ${editOnly} + |> line([27.55, -1.65], %) + |> line([4.95, -8], %) + |> line([-20.38, -10.12], %) + |> line([-15.79, 17.08], %) + +fn yohey = (pos) => { + const part004 = startSketchOn('-XZ') + ${extrudeAndEditBlockedInFunction} + |> line([27.55, -1.65], %) + |> line([4.95, -10.53], %) + |> line([-20.38, -8], %) + |> line([-15.79, 17.08], %) + return '' +} + + yohey([15.79, -34.6]) +` + ) + }, + selectionsSnippets + ) + await page.setViewportSize({ width: 1200, height: 500 }) + await page.goto('/') + await u.waitForAuthSkipAppStart() + + // wait for execution done + await u.openDebugPanel() + await u.expectCmdLog('[data-message-type="execution-done"]') + await u.closeDebugPanel() + + await page.getByText(selectionsSnippets.extrudeAndEditBlocked).click() + await expect(page.getByRole('button', { name: 'Extrude' })).toBeDisabled() + await expect( + page.getByRole('button', { name: 'Edit Sketch' }) + ).not.toBeVisible() + + await page.getByText(selectionsSnippets.extrudeAndEditAllowed).click() + await expect(page.getByRole('button', { name: 'Extrude' })).not.toBeDisabled() + await expect( + page.getByRole('button', { name: 'Edit Sketch' }) + ).not.toBeDisabled() + + await page.getByText(selectionsSnippets.editOnly).click() + await expect(page.getByRole('button', { name: 'Extrude' })).toBeDisabled() + await expect( + page.getByRole('button', { name: 'Edit Sketch' }) + ).not.toBeDisabled() + + await page + .getByText(selectionsSnippets.extrudeAndEditBlockedInFunction) + .click() + await expect(page.getByRole('button', { name: 'Extrude' })).toBeDisabled() + await expect( + page.getByRole('button', { name: 'Edit Sketch' }) + ).not.toBeVisible() + + // selecting an editable sketch but clicking "start sktech" should start a new sketch and not edit the existing one + await page.getByText(selectionsSnippets.extrudeAndEditAllowed).click() + await page.getByRole('button', { name: 'Start Sketch' }).click() + await page.mouse.click(700, 200) + // expect main content to contain `part005` i.e. started a new sketch + await expect(page.locator('.cm-content')).toHaveText( + /part005 = startSketchOn\('-XZ'\)/ + ) +}) + +test('Deselecting line tool should mean nothing happens on click', async ({ + page, +}) => { + const u = getUtils(page) + await page.setViewportSize({ width: 1200, height: 500 }) + const PUR = 400 / 37.5 //pixeltoUnitRatio + await page.goto('/') + await u.waitForAuthSkipAppStart() + await u.openDebugPanel() + + await expect(page.getByRole('button', { name: 'Start Sketch' })).toBeVisible() + + // click on "Start Sketch" button + await u.clearCommandLogs() + await u.doAndWaitForImageDiff( + () => page.getByRole('button', { name: 'Start Sketch' }).click(), + 200 + ) + + await page.mouse.click(700, 200) + + await expect(page.locator('.cm-content')).toHaveText( + `const part001 = startSketchOn('-XZ')` + ) + + await page.waitForTimeout(300) + + let previousCodeContent = await page.locator('.cm-content').innerText() + + // deselect the line tool by clicking it + await page.getByRole('button', { name: 'Line' }).click() + + await page.mouse.click(700, 200) + await page.waitForTimeout(100) + await page.mouse.click(700, 250) + await page.waitForTimeout(100) + await page.mouse.click(750, 200) + await page.waitForTimeout(100) + + // expect no change + await expect(page.locator('.cm-content')).toHaveText(previousCodeContent) + + // select line tool again + await page.getByRole('button', { name: 'Line' }).click() + + await u.closeDebugPanel() + + // line tool should work as expected again + await page.mouse.click(700, 200) + await expect(page.locator('.cm-content')).not.toHaveText(previousCodeContent) + previousCodeContent = await page.locator('.cm-content').innerText() + + await page.mouse.click(700, 300) + await expect(page.locator('.cm-content')).not.toHaveText(previousCodeContent) + previousCodeContent = await page.locator('.cm-content').innerText() + + await page.mouse.click(750, 300) + await expect(page.locator('.cm-content')).not.toHaveText(previousCodeContent) + previousCodeContent = await page.locator('.cm-content').innerText() +}) diff --git a/e2e/playwright/snapshot-tests.spec.ts b/e2e/playwright/snapshot-tests.spec.ts index 7976fd173..309f3fd86 100644 --- a/e2e/playwright/snapshot-tests.spec.ts +++ b/e2e/playwright/snapshot-tests.spec.ts @@ -1,7 +1,5 @@ import { test, expect } from '@playwright/test' import { secrets } from './secrets' -import { EngineCommand } from '../../src/lang/std/engineConnection' -import { v4 as uuidv4 } from 'uuid' import { getUtils } from './test-utils' import { Models } from '@kittycad/lib' import fsp from 'fs/promises' @@ -364,3 +362,118 @@ const part001 = startSketchOn('-XZ') }) } }) + +test('extrude on each default plane should be stable', async ({ + page, + context, +}) => { + const u = getUtils(page) + const makeCode = (plane = 'XY') => `const part001 = startSketchOn('${plane}') + |> startProfileAt([0.70, 0.44], %) + |> line([0.66, -0.02], %) + |> line([0.28, 0.50], %) + |> line([-0.56, 0.44], %) + |> line([-0.54, -0.38], %) + |> close(%) + |> extrude(1.00, %) +` + await context.addInitScript(async (code) => { + localStorage.setItem('persistCode', code) + }, makeCode('XY')) + await page.setViewportSize({ width: 1200, height: 500 }) + await page.goto('/') + await u.waitForAuthSkipAppStart() + + // wait for execution done + await u.openDebugPanel() + await u.expectCmdLog('[data-message-type="execution-done"]') + await u.clearAndCloseDebugPanel() + + await page.getByText('Code').click() + await expect(page).toHaveScreenshot({ + maxDiffPixels: 100, + }) + await page.getByText('Code').click() + + const runSnapshotsForOtherPlanes = async (plane = 'XY') => { + // clear code + await u.removeCurrentCode() + // add makeCode('XZ') + await page.locator('.cm-content').fill(makeCode(plane)) + // wait for execution done + await u.openDebugPanel() + await u.expectCmdLog('[data-message-type="execution-done"]') + await u.clearAndCloseDebugPanel() + + await page.getByText('Code').click() + await expect(page).toHaveScreenshot({ + maxDiffPixels: 100, + }) + await page.getByText('Code').click() + } + await runSnapshotsForOtherPlanes('-XY') + + await runSnapshotsForOtherPlanes('XZ') + await runSnapshotsForOtherPlanes('-XZ') + + await runSnapshotsForOtherPlanes('YZ') + await runSnapshotsForOtherPlanes('-YZ') +}) + +test('Draft segments should look right', async ({ page }) => { + const u = getUtils(page) + await page.setViewportSize({ width: 1200, height: 500 }) + const PUR = 400 / 37.5 //pixeltoUnitRatio + await page.goto('/') + await u.waitForAuthSkipAppStart() + await u.openDebugPanel() + + await expect(page.getByRole('button', { name: 'Start Sketch' })).toBeVisible() + + // click on "Start Sketch" button + await u.clearCommandLogs() + await u.doAndWaitForImageDiff( + () => page.getByRole('button', { name: 'Start Sketch' }).click(), + 200 + ) + + // select a plane + await page.mouse.click(700, 200) + + await expect(page.locator('.cm-content')).toHaveText( + `const part001 = startSketchOn('-XZ')` + ) + + await page.waitForTimeout(300) // TODO detect animation ending, or disable animation + + const startXPx = 600 + await page.mouse.click(startXPx + PUR * 10, 500 - PUR * 10) + const startAt = '[23.74, -32.03]' + await expect(page.locator('.cm-content')) + .toHaveText(`const part001 = startSketchOn('-XZ') + |> startProfileAt(${startAt}, %)`) + await page.waitForTimeout(100) + + await u.closeDebugPanel() + await page.mouse.move(startXPx + PUR * 20, 500 - PUR * 10) + await expect(page).toHaveScreenshot({ + maxDiffPixels: 100, + }) + + await page.mouse.click(startXPx + PUR * 20, 500 - PUR * 10) + await page.waitForTimeout(100) + + const num = 23.97 + await expect(page.locator('.cm-content')) + .toHaveText(`const part001 = startSketchOn('-XZ') + |> startProfileAt(${startAt}, %) + |> line([${num}, 0], %)`) + + await page.getByRole('button', { name: 'Tangential Arc' }).click() + + await page.mouse.move(startXPx + PUR * 30, 500 - PUR * 20, { steps: 10 }) + + await expect(page).toHaveScreenshot({ + maxDiffPixels: 100, + }) +}) diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png new file mode 100644 index 000000000..b346acf08 Binary files /dev/null and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png new file mode 100644 index 000000000..ac86c5469 Binary files /dev/null and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-1-Google-Chrome-linux.png index 234bc23a6..17598eb53 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-2-Google-Chrome-linux.png index 7abf0724e..d202d2164 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-3-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-3-Google-Chrome-linux.png index 6a2c9fc07..bd8d06da3 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-3-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/change-camera-show-planes-3-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-1-Google-Chrome-linux.png new file mode 100644 index 000000000..61768ecea Binary files /dev/null and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-2-Google-Chrome-linux.png new file mode 100644 index 000000000..d284b68a6 Binary files /dev/null and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-3-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-3-Google-Chrome-linux.png new file mode 100644 index 000000000..0574023b3 Binary files /dev/null and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-3-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-4-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-4-Google-Chrome-linux.png new file mode 100644 index 000000000..9cefe62c2 Binary files /dev/null and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-4-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-5-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-5-Google-Chrome-linux.png new file mode 100644 index 000000000..0c31a3367 Binary files /dev/null and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-5-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-6-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-6-Google-Chrome-linux.png new file mode 100644 index 000000000..c4f0221b3 Binary files /dev/null and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-each-default-plane-should-be-stable-6-Google-Chrome-linux.png differ diff --git a/make-release.sh b/make-release.sh new file mode 100755 index 000000000..663f59e56 --- /dev/null +++ b/make-release.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +if ! git diff-index --quiet HEAD --; then + echo "Please stash uncommitted changes before running release script" + exit 1 +fi + +git checkout main +git pull +git fetch --all + +# Get the latest semver tag from git +latest_tag=$(jq -r '.version' package.json) +latest_tag="v$latest_tag" + +# Print the latest semver tag +echo "Latest semver tag: $latest_tag" + +# Function to bump version numbers +bump_version() { + local version=$1 + local bump_type=$2 + local major=$(echo $version | cut -d '.' -f 1 | sed 's/v//') + local minor=$(echo $version | cut -d '.' -f 2) + local patch=$(echo $version | cut -d '.' -f 3) + + case "$bump_type" in + major) + major=$((major + 1)) + minor=0 + patch=0 + ;; + minor) + minor=$((minor + 1)) + patch=0 + ;; + *) + patch=$((patch + 1)) + ;; + esac + + echo "v${major}.${minor}.${patch}" +} + +# Determine the type of bump based on the argument +bump_type=${1:-patch} + +# Bump the version +new_version=$(bump_version $latest_tag $bump_type) + +# Print the new semver tag +echo "New semver tag: $new_version" +new_version_number=${new_version:1} +echo "New version number without 'v': $new_version_number" + + +git checkout -b "cut-release-$new_version" + +echo "$(jq --arg v "$new_version_number" '.version=$v' package.json --indent 2)" > package.json +echo "$(jq --arg v "$new_version_number" '.package.version=$v' src-tauri/tauri.conf.json --indent 2)" > src-tauri/tauri.conf.json + +git add package.json src-tauri/tauri.conf.json +git commit -m "Cut release $new_version" + +echo "" +echo "Versions has been bumped in relevant json files, a branch has been created and committed to." +echo "" +echo "What's left for you to do is, push the branch and make the release PR." +echo "" diff --git a/package.json b/package.json index 3a4852228..de8369ca1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "untitled-app", - "version": "0.14.0", + "version": "0.15.2", "private": true, "dependencies": { "@codemirror/autocomplete": "^6.10.2", @@ -10,7 +10,7 @@ "@fortawesome/react-fontawesome": "^0.2.0", "@headlessui/react": "^1.7.17", "@headlessui/tailwindcss": "^0.2.0", - "@kittycad/lib": "^0.0.50", + "@kittycad/lib": "^0.0.53", "@lezer/javascript": "^1.4.9", "@open-rpc/client-js": "^1.8.1", "@react-hook/resize-observer": "^1.2.6", @@ -37,6 +37,7 @@ "fuse.js": "^7.0.0", "http-server": "^14.1.1", "json-rpc-2.0": "^1.6.0", + "node-fetch": "^3.3.2", "re-resizable": "^6.9.11", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -53,7 +54,7 @@ "ts-node": "^10.9.1", "typescript": "^5.2.2", "uuid": "^9.0.1", - "vitest": "^0.34.6", + "vitest": "^1.3.1", "vscode-jsonrpc": "^8.1.0", "vscode-languageserver-protocol": "^3.17.5", "wasm-pack": "^0.12.1", @@ -74,7 +75,6 @@ "test": "vitest --mode development", "test:nowatch": "vitest run --mode development", "test:rust": "(cd src/wasm-lib && cargo test --all && cargo clippy --all --tests --benches)", - "test:cov": "vitest run --coverage --mode development", "test:e2e:tauri": "E2E_TAURI_ENABLED=true TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' wdio run wdio.conf.ts", "simpleserver:ci": "yarn pretest && http-server ./public --cors -p 3000 &", "simpleserver": "yarn pretest && http-server ./public --cors -p 3000", @@ -115,7 +115,6 @@ "@tauri-apps/cli": "^2.0.0-beta.1", "@types/crypto-js": "^4.1.1", "@types/debounce-promise": "^3.1.8", - "@types/isomorphic-fetch": "^0.0.36", "@types/pixelmatch": "^5.2.6", "@types/pngjs": "^6.0.4", "@types/react-modal": "^3.16.3", @@ -124,8 +123,7 @@ "@types/wait-on": "^5.3.4", "@types/wicg-file-system-access": "^2020.9.6", "@types/ws": "^8.5.5", - "@vitejs/plugin-react": "^4.1.1", - "@vitest/coverage-istanbul": "^0.34.6", + "@vitejs/plugin-react": "^4.2.1", "@wdio/cli": "^8.24.3", "@wdio/globals": "^8.24.3", "@wdio/local-runner": "^8.24.3", @@ -146,10 +144,10 @@ "prettier": "^2.8.0", "setimmediate": "^1.0.5", "tailwindcss": "^3.3.6", - "vite": "^4.5.2", + "vite": "^5.1.3", "vite-plugin-eslint": "^1.8.1", "vite-plugin-package-version": "^1.1.0", - "vite-tsconfig-paths": "^4.2.1", + "vite-tsconfig-paths": "^4.3.1", "vitest-webgl-canvas-mock": "^1.1.0", "wait-on": "^7.2.0", "yarn": "^1.22.19" diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index d4964043a..a46fcd332 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -69,9 +69,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "app" @@ -101,13 +101,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" [[package]] -name = "async-broadcast" -version = "0.5.1" +name = "ashpd" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +checksum = "1b22517ee647547c01a687cf9b76074e1c91334032a4324f7243c6ee0f949390" dependencies = [ - "event-listener 2.5.3", + "enumflags2", + "futures-channel", + "futures-util", + "rand 0.8.5", + "serde", + "serde_repr", + "tokio", + "url", + "zbus", +] + +[[package]] +name = "async-broadcast" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" +dependencies = [ + "event-listener 5.1.0", + "event-listener-strategy 0.5.0", "futures-core", + "pin-project-lite", ] [[package]] @@ -117,58 +136,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener 5.0.0", + "event-listener 5.1.0", "event-listener-strategy 0.5.0", "futures-core", "pin-project-lite", ] -[[package]] -name = "async-executor" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" -dependencies = [ - "async-lock 3.3.0", - "async-task", - "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.2.0", - "slab", -] - -[[package]] -name = "async-fs" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "blocking", - "futures-lite 1.13.0", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", -] - [[package]] name = "async-io" version = "2.3.1" @@ -179,10 +152,10 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.2.0", + "futures-lite", "parking", - "polling 3.4.0", - "rustix 0.38.31", + "polling", + "rustix", "slab", "tracing", "windows-sys 0.52.0", @@ -210,19 +183,20 @@ dependencies = [ [[package]] name = "async-process" -version = "1.8.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +checksum = "451e3cf68011bd56771c79db04a9e333095ab6349f7e47592b788e9b98720cc8" dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", + "async-channel", + "async-io", + "async-lock 3.3.0", "async-signal", "blocking", "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.31", - "windows-sys 0.48.0", + "event-listener 5.1.0", + "futures-lite", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -233,7 +207,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -242,13 +216,13 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.3.1", + "async-io", "async-lock 2.8.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.31", + "rustix", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -268,7 +242,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -407,9 +381,9 @@ dependencies = [ "async-channel", "async-lock 3.3.0", "async-task", - "fastrand 2.0.1", + "fastrand", "futures-io", - "futures-lite 2.2.0", + "futures-lite", "piper", "tracing", ] @@ -437,9 +411,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "a3b1be7772ee4501dba05acbe66bb1e8760f6a6c474a36035631638e4415f130" [[package]] name = "bytemuck" @@ -458,7 +432,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -566,11 +540,10 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "7f9fa1897e4325be0d68d48df6aa1a71ac2ed4d27723887e7754192705350730" dependencies = [ - "jobserver", "libc", ] @@ -828,7 +801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -838,14 +811,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "darling" -version = "0.20.5" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc5d6b04b3fd0ba9926f945895de7d806260a2d7431ba82e7edaecb043c4c6b8" +checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955" dependencies = [ "darling_core", "darling_macro", @@ -853,27 +826,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.5" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3" +checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "darling_macro" -version = "0.20.5" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" +checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be" dependencies = [ "darling_core", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -969,6 +942,29 @@ dependencies = [ "libloading 0.8.1", ] +[[package]] +name = "dlopen2" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi 0.3.9", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.50", +] + [[package]] name = "downcast-rs" version = "1.2.0" @@ -985,7 +981,7 @@ dependencies = [ "bytemuck", "drm-ffi", "drm-fourcc", - "rustix 0.38.31", + "rustix", ] [[package]] @@ -995,7 +991,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" dependencies = [ "drm-sys", - "rustix 0.38.31", + "rustix", ] [[package]] @@ -1076,6 +1072,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + [[package]] name = "enumflags2" version = "0.7.9" @@ -1094,7 +1096,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1119,17 +1121,6 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - [[package]] name = "event-listener" version = "4.0.3" @@ -1143,9 +1134,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.0.0" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b72557800024fabbaa2449dd4bf24e37b93702d457a4d4f2b0dd1f0f039f20c1" +checksum = "b7ad6fd685ce13acd6d9541a30f6db6567a7a24c9ffd4ba2955d29e3f22c8b27" dependencies = [ "concurrent-queue", "parking", @@ -1168,19 +1159,10 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" dependencies = [ - "event-listener 5.0.0", + "event-listener 5.1.0", "pin-project-lite", ] -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.0.1" @@ -1202,7 +1184,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ - "memoffset 0.9.0", + "memoffset", "rustc_version", ] @@ -1252,7 +1234,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1341,28 +1323,13 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - [[package]] name = "futures-lite" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ - "fastrand 2.0.1", + "fastrand", "futures-core", "futures-io", "parking", @@ -1377,7 +1344,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1697,7 +1664,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1797,7 +1764,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1923,7 +1890,7 @@ dependencies = [ "httpdate", "itoa 1.0.10", "pin-project-lite", - "socket2 0.5.5", + "socket2", "tokio", "tower-service", "tracing", @@ -2057,17 +2024,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -2168,15 +2124,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" -[[package]] -name = "jobserver" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.68" @@ -2221,9 +2168,9 @@ dependencies = [ [[package]] name = "kittycad" -version = "0.2.51" +version = "0.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efba556f5c49bdc922c380ac0e102b773c5d78a351a06d66bfbc8dc2db06195b" +checksum = "13958174d876353f429ea8230dc92fe86f164819cea2e51bbf22e01a4c2a496e" dependencies = [ "anyhow", "async-trait", @@ -2357,12 +2304,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -2483,15 +2424,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -2552,9 +2484,9 @@ dependencies = [ [[package]] name = "muda" -version = "0.11.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e406691fa7749604bbc7964bde28a300572d52621bb84540f6907c0f8fe08737" +checksum = "4c47e7625990fc1af2226ea4f34fb2412b03c12639fcb91868581eb3a6893453" dependencies = [ "cocoa", "crossbeam-channel", @@ -2605,14 +2537,14 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] name = "nix" -version = "0.26.4" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "cfg-if", "libc", - "memoffset 0.7.1", + "memoffset", ] [[package]] @@ -2956,7 +2888,7 @@ dependencies = [ "regex", "regex-syntax 0.7.5", "structmeta", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -3098,7 +3030,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -3166,7 +3098,7 @@ checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -3188,7 +3120,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand", "futures-io", ] @@ -3214,9 +3146,9 @@ dependencies = [ [[package]] name = "png" -version = "0.17.11" +version = "0.17.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f6c3c3e617595665b8ea2ff95a86066be38fb121ff920a9c0eb282abcd1da5a" +checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" dependencies = [ "bitflags 1.3.2", "crc32fast", @@ -3227,30 +3159,14 @@ dependencies = [ [[package]] name = "polling" -version = "2.8.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - -[[package]] -name = "polling" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30054e72317ab98eddd8561db0f6524df3367636884b7b21b703e4b280a84a14" +checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.31", + "rustix", "tracing", "windows-sys 0.52.0", ] @@ -3668,10 +3584,11 @@ dependencies = [ [[package]] name = "rfd" -version = "0.12.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241a0deb168c88050d872294f7b3106c1dfa8740942bcc97bc91b98e97b5c501" +checksum = "373d2fc6310e2d14943d4e66ebed5b774a2b6b3b1610e7377edf124fb2760d6b" dependencies = [ + "ashpd", "block", "dispatch", "glib-sys 0.18.1", @@ -3682,7 +3599,7 @@ dependencies = [ "objc", "objc-foundation", "objc_id", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3691,16 +3608,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom 0.2.12", "libc", "spin", "untrusted", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3718,20 +3636,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - [[package]] name = "rustix" version = "0.38.31" @@ -3784,9 +3688,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "safemem" @@ -3887,18 +3791,18 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -3914,13 +3818,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -3936,9 +3840,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa 1.0.10", "ryu", @@ -3963,7 +3867,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -4014,7 +3918,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -4138,16 +4042,6 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi 0.3.9", -] - [[package]] name = "socket2" version = "0.5.5" @@ -4170,7 +4064,7 @@ dependencies = [ "cocoa", "core-graphics", "drm", - "fastrand 2.0.1", + "fastrand", "foreign-types", "js-sys", "log", @@ -4178,7 +4072,7 @@ dependencies = [ "objc", "raw-window-handle 0.6.0", "redox_syscall 0.4.1", - "rustix 0.38.31", + "rustix", "tiny-xlib", "wasm-bindgen", "wayland-backend", @@ -4283,7 +4177,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -4294,7 +4188,7 @@ checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -4349,9 +4243,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" dependencies = [ "proc-macro2", "quote", @@ -4409,17 +4303,17 @@ dependencies = [ [[package]] name = "tao" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa7ba6ee5b8908ba3a62e6a4f3683490ed732fca614cdd3f4c989bba548f9a9" +checksum = "29d9325da2dd7ebd48a8a433c64240079b15dbe1249da04c72557611bcd08d1c" dependencies = [ "bitflags 1.3.2", - "cc", "cocoa", "core-foundation", "core-graphics", "crossbeam-channel", "dispatch", + "dlopen2", "gdkwayland-sys", "gdkx11-sys", "gtk", @@ -4436,7 +4330,6 @@ dependencies = [ "once_cell", "parking_lot 0.12.1", "png", - "raw-window-handle 0.5.2", "raw-window-handle 0.6.0", "scopeguard", "tao-macros", @@ -4446,7 +4339,6 @@ dependencies = [ "windows-implement", "windows-version", "x11-dl", - "zbus", ] [[package]] @@ -4473,9 +4365,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.13" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "task-local-extensions" @@ -4488,9 +4380,9 @@ dependencies = [ [[package]] name = "tauri" -version = "2.0.0-beta.2" +version = "2.0.0-beta.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a584d146c38bf174398dee0ec2cdd8f8fce142daee0306c370cf78f050304c60" +checksum = "bb6b10809e932ed85813fff9ac748cbcc0cf4c78209433b1b6e025660619f2e4" dependencies = [ "anyhow", "bytes", @@ -4508,10 +4400,9 @@ dependencies = [ "log", "mime", "muda", - "nix", "objc", "percent-encoding", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "reqwest", "serde", "serde_json", @@ -4537,9 +4428,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-beta.1" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "314089a25d92a62f33f60d2a19c277f465e9088ee3ea251032ae914d6f2b1ce0" +checksum = "e4ea663cde4862231178215d364b3650dade8cb159fc84a1bea5c365689dacd0" dependencies = [ "anyhow", "cargo_toml", @@ -4559,9 +4450,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-beta.1" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6ff13874390499976f01decf75103f28e7609abc5c155c6bfb56cf574a5628" +checksum = "94a770b18aa021b0c8568c8f0d347044a72d349b6a13dd1db28c558832e8e681" dependencies = [ "base64 0.21.7", "brotli", @@ -4575,6 +4466,7 @@ dependencies = [ "serde", "serde_json", "sha2", + "syn 2.0.50", "tauri-utils", "thiserror", "time", @@ -4585,23 +4477,23 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-beta.1" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18707774f70a8ec20dbf653f07d12af1e0d7c1e3a625b7bd5a2cfe72c2b2549b" +checksum = "85b100bf9f05a013719fa6c9bf096da42511888b3671d9c22bffa12a030d76a9" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "tauri-codegen", "tauri-utils", ] [[package]] name = "tauri-plugin" -version = "2.0.0-beta.1" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb732726fec855b56e4a238464f1b0c10006f618180ef402ce5f394d840e61b" +checksum = "140c010cfb7120c9276e6e0b0c271dabb7988be2998011f918b669e766224e55" dependencies = [ "anyhow", "glob", @@ -4616,13 +4508,13 @@ dependencies = [ [[package]] name = "tauri-plugin-dialog" -version = "2.0.0-beta.0" +version = "2.0.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83705ba8d776f1c147b14a48845ac614c6e96e401a6a65e80430f3346f389287" +checksum = "4ed2ac81ffb8fd76d854578784491bbf8d8baba274fa9e18c0bbdc4ba00b0013" dependencies = [ "glib 0.16.9", "log", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "rfd", "serde", "serde_json", @@ -4634,9 +4526,9 @@ dependencies = [ [[package]] name = "tauri-plugin-fs" -version = "2.0.0-beta.0" +version = "2.0.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd40ca5f99e9a4cbfcbd33de0f0b024caef6475f2652f1707cba72d877398a0" +checksum = "c4a556b50d761ec405087bf67e82b3936ddeaf39d4d602a443e2a0d2df6cdb2a" dependencies = [ "anyhow", "glob", @@ -4653,9 +4545,9 @@ dependencies = [ [[package]] name = "tauri-plugin-http" -version = "2.0.0-beta.0" +version = "2.0.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e427755fd9229027cc859ae0d19a5d2952a314792c16a25ce50c50eccd4a2db6" +checksum = "7f5c00ebdfdab74d9669460665a1158dacd0cc692bf95a3b7d7e5160ebbd8ad0" dependencies = [ "data-url", "glob", @@ -4673,9 +4565,9 @@ dependencies = [ [[package]] name = "tauri-plugin-os" -version = "2.0.0-beta.0" +version = "2.0.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afef676918e519499ff7ec52aa93ba002bf3bf37ee81d36d3767121c12b85f62" +checksum = "1f9bd936030047ce0143dda585f908f4e8433089c4aa95ef182959283483abfb" dependencies = [ "gethostname", "log", @@ -4691,9 +4583,9 @@ dependencies = [ [[package]] name = "tauri-plugin-shell" -version = "2.0.0-beta.0" +version = "2.0.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfaeb1d7afaff06304737abddd29cdada33419241d14eec85689d82675fc529e" +checksum = "bb42a100bd4b6adad6f07455f54c5916d32be79d81e5914478ece45a04560cad" dependencies = [ "encoding_rs", "log", @@ -4711,9 +4603,9 @@ dependencies = [ [[package]] name = "tauri-plugin-updater" -version = "2.0.0-beta.0" +version = "2.0.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca006f95bd7ff80eb2749172c0faf9dc1e27eea20f289a759235753b8a0aabf8" +checksum = "587dfbe753c43e5db6c7f82b399c7c9f548c744ce7485d0f41a55ad7bb31d23c" dependencies = [ "base64 0.21.7", "dirs-next", @@ -4739,14 +4631,14 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.0.0-beta.1" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d72194de56e885dbd9fd8c493ccf95012e584c928900188da248f9ea4223b23" +checksum = "dc687ef6571127f0ad9a9bef141ca3f8d9597b7f99949047d5c69ed731cf36c4" dependencies = [ "gtk", "http", "jni", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "serde", "serde_json", "tauri-utils", @@ -4757,17 +4649,16 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.0.0-beta.1" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a71bd248a7ce857835b1f65845a9de22171e30d8129e018b42961502565efb" +checksum = "a07b1d76d4159aec5c2cff742e30b0f5b3675a2520b979acbbc66c5f92c99491" dependencies = [ "cocoa", "gtk", "http", "jni", - "nix", "percent-encoding", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "softbuffer", "tao", "tauri-runtime", @@ -4780,9 +4671,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-beta.1" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7104f0639a1f3a7ebd7aac793be47d7924f569e7c10c6853083529bf9bb3fe6" +checksum = "2729b59832a96dd05f4f2ced33e2ab976ca60c58c1d675afe6aabc486eb51143" dependencies = [ "brotli", "cargo_metadata", @@ -4828,8 +4719,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ "cfg-if", - "fastrand 2.0.1", - "rustix 0.38.31", + "fastrand", + "rustix", "windows-sys 0.52.0", ] @@ -4867,14 +4758,14 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -4950,7 +4841,9 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2 0.5.5", + "signal-hook-registry", + "socket2", + "tracing", "windows-sys 0.48.0", ] @@ -5062,7 +4955,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -5176,7 +5069,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ - "memoffset 0.9.0", + "memoffset", "tempfile", "winapi 0.3.9", ] @@ -5204,9 +5097,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -5290,12 +5183,6 @@ dependencies = [ "libc", ] -[[package]] -name = "waker-fn" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" - [[package]] name = "walkdir" version = "1.0.7" @@ -5359,7 +5246,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "wasm-bindgen-shared", ] @@ -5393,7 +5280,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5440,7 +5327,7 @@ checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" dependencies = [ "cc", "downcast-rs", - "rustix 0.38.31", + "rustix", "scoped-tls", "smallvec", "wayland-sys", @@ -5453,7 +5340,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" dependencies = [ "bitflags 2.4.2", - "rustix 0.38.31", + "rustix", "wayland-backend", "wayland-scanner", ] @@ -5563,7 +5450,7 @@ checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -5622,13 +5509,13 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window-vibrancy" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af6abc2b9c56bd95887825a1ce56cde49a2a97c07e28db465d541f5098a2656c" +checksum = "33082acd404763b315866e14a0d5193f3422c81086657583937a750cdd3ec340" dependencies = [ "cocoa", "objc", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "windows-sys 0.52.0", "windows-version", ] @@ -5671,7 +5558,7 @@ checksum = "12168c33176773b86799be25e2a2ba07c7aab9968b37541f1094dbd7a60c8946" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -5682,7 +5569,7 @@ checksum = "9d8dc32e0095a7eeccebd0e3f09e9509365ecb3fc6ac4d6f5f14a3f6392942d1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -5923,9 +5810,9 @@ dependencies = [ [[package]] name = "wry" -version = "0.35.2" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3016c47c9b6f7029a9da7cd48af8352327226bba0e955f3c92e2966651365a9" +checksum = "3a9e7b81968555303086ef882a0c213896a76099de4ed0b86a798775c2d54304" dependencies = [ "base64 0.21.7", "block", @@ -5949,7 +5836,7 @@ dependencies = [ "objc", "objc_id", "once_cell", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "serde", "serde_json", "sha2", @@ -5998,7 +5885,7 @@ dependencies = [ "libc", "libloading 0.8.1", "once_cell", - "rustix 0.38.31", + "rustix", "x11rb-protocol", ] @@ -6016,7 +5903,7 @@ checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", "linux-raw-sys 0.4.13", - "rustix 0.38.31", + "rustix", ] [[package]] @@ -6040,39 +5927,32 @@ dependencies = [ [[package]] name = "zbus" -version = "3.15.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c45d06ae3b0f9ba1fb2671268b975557d8f5a84bb5ec6e43964f87e763d8bca8" +checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030" dependencies = [ "async-broadcast", - "async-executor", - "async-fs", - "async-io 1.13.0", - "async-lock 2.8.0", "async-process", "async-recursion", - "async-task", "async-trait", - "blocking", - "byteorder", "derivative", "enumflags2", - "event-listener 2.5.3", + "event-listener 5.1.0", "futures-core", "futures-sink", "futures-util", "hex", "nix", - "once_cell", "ordered-stream", "rand 0.8.5", "serde", "serde_repr", "sha1", "static_assertions", + "tokio", "tracing", "uds_windows", - "winapi 0.3.9", + "windows-sys 0.52.0", "xdg-home", "zbus_macros", "zbus_names", @@ -6081,9 +5961,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.15.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a1ba45ed0ad344b85a2bb5a1fe9830aed23d67812ea39a586e7d0136439c7d" +checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -6095,9 +5975,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "2.6.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", @@ -6155,23 +6035,23 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.15.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" +checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65" dependencies = [ - "byteorder", + "endi", "enumflags2", - "libc", "serde", "static_assertions", + "url", "zvariant_derive", ] [[package]] name = "zvariant_derive" -version = "3.15.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" +checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -6182,9 +6062,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" dependencies = [ "proc-macro2", "quote", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index aa9f297a5..3ac439ce0 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -16,7 +16,7 @@ tauri-build = { version = "2.0.0-beta", features = [] } [dependencies] anyhow = "1" -kittycad = "0.2.50" +kittycad = "0.2.53" oauth2 = "4.4.2" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index c75b9e920..161119994 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -59,5 +59,5 @@ } }, "productName": "zoo-modeling-app", - "version": "0.14.0" + "version": "0.15.2" } diff --git a/src/App.tsx b/src/App.tsx index 344f1edc4..e7993c948 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -73,6 +73,9 @@ export function App() { useHotkeys('shift + e', () => togglePane('kclErrors')) useHotkeys('shift + d', () => togglePane('debug')) useHotkeys('esc', () => send('Cancel')) + useHotkeys('backspace', (e) => { + e.preventDefault() + }) useHotkeys( isTauri() ? 'mod + ,' : 'shift + mod + ,', () => navigate(filePath + paths.SETTINGS), diff --git a/src/Toolbar.tsx b/src/Toolbar.tsx index 75be23b70..64a0a0123 100644 --- a/src/Toolbar.tsx +++ b/src/Toolbar.tsx @@ -5,6 +5,8 @@ import { useModelingContext } from 'hooks/useModelingContext' import { useCommandsContext } from 'hooks/useCommandsContext' import { ActionButton } from 'components/ActionButton' import usePlatform from 'hooks/usePlatform' +import { isSingleCursorInPipe } from 'lang/queryAst' +import { kclManager } from 'lang/KclSingleton' export const Toolbar = () => { const platform = usePlatform() @@ -13,14 +15,15 @@ export const Toolbar = () => { const toolbarButtonsRef = useRef(null) const bgClassName = 'group-enabled:group-hover:bg-energy-10 group-pressed:bg-energy-10 dark:group-enabled:group-hover:bg-chalkboard-80 dark:group-pressed:bg-chalkboard-80' - const pathId = useMemo( - () => - isCursorInSketchCommandRange( - engineCommandManager.artifactMap, - context.selectionRanges - ), - [engineCommandManager.artifactMap, context.selectionRanges] - ) + const pathId = useMemo(() => { + if (!isSingleCursorInPipe(context.selectionRanges, kclManager.ast)) { + return false + } + return isCursorInSketchCommandRange( + engineCommandManager.artifactMap, + context.selectionRanges + ) + }, [engineCommandManager.artifactMap, context.selectionRanges]) function handleToolbarButtonsWheelEvent(ev: WheelEvent) { const span = toolbarButtonsRef.current @@ -50,7 +53,9 @@ export const Toolbar = () => {
  • send({ type: 'Enter sketch' })} + onClick={() => + send({ type: 'Enter sketch', data: { forceNewSketch: true } }) + } icon={{ icon: 'sketch', bgClassName, @@ -119,7 +124,7 @@ export const Toolbar = () => { aria-pressed={state.matches('Sketch.Tangential arc to')} className="pressed:bg-energy-10/20 dark:pressed:bg-energy-80" icon={{ - icon: 'line', + icon: 'arc', bgClassName, }} disabled={ diff --git a/src/clientSideScene/ClientSideSceneComp.tsx b/src/clientSideScene/ClientSideSceneComp.tsx index 7325336aa..f243942dd 100644 --- a/src/clientSideScene/ClientSideSceneComp.tsx +++ b/src/clientSideScene/ClientSideSceneComp.tsx @@ -26,7 +26,7 @@ function useShouldHideScene(): { hideClient: boolean; hideServer: boolean } { if (DEBUG_SHOW_BOTH_SCENES || !isCamMoving) return { hideClient: false, hideServer: false } - let hideServer = state.matches('Sketch') || state.matches('Sketch no face') + let hideServer = state.matches('Sketch') if (isTween) { hideServer = false } diff --git a/src/clientSideScene/sceneEntities.ts b/src/clientSideScene/sceneEntities.ts index e971a07f7..d3d3d080e 100644 --- a/src/clientSideScene/sceneEntities.ts +++ b/src/clientSideScene/sceneEntities.ts @@ -22,6 +22,7 @@ import { DEFAULT_PLANES, DefaultPlane, defaultPlaneColor, + getSceneScale, INTERSECTION_PLANE_LAYER, isQuaternionVertical, RAYCASTABLE_PLANE, @@ -195,11 +196,18 @@ class SceneEntities { this.axisGroup = new Group() const gridHelper = createGridHelper({ size: 100, divisions: 10 }) gridHelper.renderOrder = -3 // is this working? + gridHelper.name = 'gridHelper' + const sceneScale = getSceneScale( + sceneInfra.camera, + sceneInfra.controls.target + ) + gridHelper.scale.set(sceneScale, sceneScale, sceneScale) this.axisGroup.add(xAxisMesh, yAxisMesh, gridHelper) this.currentSketchQuaternion && this.axisGroup.setRotationFromQuaternion(this.currentSketchQuaternion) this.axisGroup.userData = { type: AXIS_GROUP } + this.axisGroup.name = AXIS_GROUP this.axisGroup.layers.set(SKETCH_LAYER) this.axisGroup.traverse((child) => { child.layers.set(SKETCH_LAYER) @@ -230,7 +238,17 @@ class SceneEntities { ast?: Program draftSegment?: DraftSegment }) { + sceneInfra.resetMouseListeners() this.createIntersectionPlane() + const distance = sceneInfra.controls.target.distanceTo( + sceneInfra.camera.position + ) + // TODO this should probably be distance to the sketch group, more important after sketch on face + // since sketches won't always so close to the origin + // is this the best place to adjust camera far? + if (sceneInfra.camera.far < distance * 1.5) { + sceneInfra.camera.far = distance * 2 + } const { truncatedAst, programMemoryOverride, variableDeclarationName } = this.prepareTruncatedMemoryAndAst( @@ -315,6 +333,7 @@ class SceneEntities { if (!draftSegment) { sceneInfra.setCallbacks({ onDrag: (args) => { + if (args.event.which !== 1) return this.onDragSegment({ ...args, sketchPathToNode, @@ -322,6 +341,7 @@ class SceneEntities { }, onMove: () => {}, onClick: (args) => { + if (args?.event.which !== 1) return if (!args || !args.object) { sceneInfra.modelingSend({ type: 'Set selection', @@ -379,6 +399,7 @@ class SceneEntities { onDrag: () => {}, onClick: async (args) => { if (!args) return + if (args.event.which !== 1) return const { intersection2d } = args if (!intersection2d) return @@ -775,8 +796,10 @@ class SceneEntities { }, onClick: (args) => { if (!args || !args.object) return + if (args.event.which !== 1) return const { object, intersection } = args const type = object?.userData?.type || '' + console.log('intersection.normal?.z', intersection) const posNorm = Number(intersection.normal?.z) > 0 let planeString: DefaultPlaneStr = posNorm ? 'XY' : '-XY' let normal: [number, number, number] = posNorm ? [0, 0, 1] : [0, 0, -1] diff --git a/src/clientSideScene/sceneInfra.ts b/src/clientSideScene/sceneInfra.ts index 3b9410237..82e7745e1 100644 --- a/src/clientSideScene/sceneInfra.ts +++ b/src/clientSideScene/sceneInfra.ts @@ -14,17 +14,15 @@ import { Vector2, Group, PlaneGeometry, - EdgesGeometry, MeshBasicMaterial, Mesh, - LineSegments, DoubleSide, Intersection, Object3D, Object3DEventMap, } from 'three' import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls' -import { engineCommandManager } from 'lang/std/engineConnection' +import { EngineCommand, engineCommandManager } from 'lang/std/engineConnection' import { v4 as uuidv4 } from 'uuid' import { isReducedMotion, roundOff, throttle } from 'lib/utils' import { compareVec2Epsilon2 } from 'lang/std/sketch' @@ -34,7 +32,7 @@ import * as TWEEN from '@tweenjs/tween.js' import { MouseGuard, cameraMouseDragGuards } from 'lib/cameraControls' import { SourceRange } from 'lang/wasm' import { Axis } from 'lib/selections' -import { createGridHelper } from './helpers' +import { BaseUnit, SETTINGS_PERSIST_KEY } from 'machines/settingsMachine' type SendType = ReturnType['send'] @@ -66,11 +64,12 @@ interface ThreeCamValues { quaternion: Quaternion zoom: number isPerspective: boolean + target: Vector3 } const lastCmdDelay = 50 -let lastCmd: any = null +let lastCmd: EngineCommand | null = null let lastCmdTime: number = Date.now() let lastCmdTimeoutId: number | null = null @@ -82,14 +81,14 @@ const sendLastReliableChannel = () => { } const throttledUpdateEngineCamera = throttle((threeValues: ThreeCamValues) => { - const cmd = { + const cmd: EngineCommand = { type: 'modeling_cmd_req', cmd_id: uuidv4(), cmd: { type: 'default_camera_look_at', ...convertThreeCamValuesToEngineCam(threeValues), }, - } as any + } engineCommandManager.sendSceneCommand(cmd) lastCmd = cmd lastCmdTime = Date.now() @@ -103,7 +102,7 @@ const throttledUpdateEngineCamera = throttle((threeValues: ThreeCamValues) => { ) as any as number }, 1000 / 30) -let lastPerspectiveCmd: any = null +let lastPerspectiveCmd: EngineCommand | null = null let lastPerspectiveCmdTime: number = Date.now() let lastPerspectiveCmdTimeoutId: number | null = null @@ -123,8 +122,9 @@ const throttledUpdateEngineFov = throttle( quaternion: Quaternion zoom: number fov: number + target: Vector3 }) => { - const cmd = { + const cmd: EngineCommand = { type: 'modeling_cmd_req', cmd_id: uuidv4(), cmd: { @@ -136,7 +136,7 @@ const throttledUpdateEngineFov = throttle( fov_y: vals.fov, ...calculateNearFarFromFOV(vals.fov), }, - } as any + } engineCommandManager.sendSceneCommand(cmd) lastPerspectiveCmd = cmd lastPerspectiveCmdTime = Date.now() @@ -225,6 +225,15 @@ class SceneInfra { this.onMouseLeave = callbacks.onMouseLeave || this.onMouseLeave this.selected = null // following selections between callbacks being set is too tricky } + resetMouseListeners = () => { + sceneInfra.setCallbacks({ + onDrag: () => {}, + onMove: () => {}, + onClick: () => {}, + onMouseEnter: () => {}, + onMouseLeave: () => {}, + }) + } highlightCallback: (a: SourceRange) => void = () => {} setHighlightCallback(cb: (a: SourceRange) => void) { this.highlightCallback = cb @@ -297,8 +306,17 @@ class SceneInfra { this.scene.background = null // CAMERA + const camHeightDistanceRatio = 0.5 + const baseUnit: BaseUnit = + JSON.parse(localStorage?.getItem(SETTINGS_PERSIST_KEY) || ('{}' as any)) + .baseUnit || 'mm' + const baseRadius = 5.6 + const length = baseUnitTomm(baseUnit) * baseRadius + const ang = Math.atan(camHeightDistanceRatio) + const x = Math.cos(ang) * length + const y = Math.sin(ang) * length this.camera = this.createPerspectiveCamera() - this.camera.position.set(0, -128, 64) + this.camera.position.set(0, -x, y) if (DEBUG_SHOW_INTERSECTION_PLANE) this.camera.layers.enable(INTERSECTION_PLANE_LAYER) @@ -402,12 +420,20 @@ class SceneInfra { }, 200) onCameraChange = () => { - this.camera.position.distanceTo(this.controls.target) + const scale = getSceneScale(this.camera, this.controls.target) + const planesGroup = this.scene.getObjectByName(DEFAULT_PLANES) + const axisGroup = this.scene + .getObjectByName(AXIS_GROUP) + ?.getObjectByName('gridHelper') + planesGroup && planesGroup.scale.set(scale, scale, scale) + axisGroup?.name === 'gridHelper' && axisGroup.scale.set(scale, scale, scale) + throttledUpdateEngineCamera({ quaternion: this.camera.quaternion, position: this.camera.position, zoom: this.camera.zoom, isPerspective: this.isPerspective, + target: this.controls.target, }) this.deferReactUpdate({ type: @@ -453,9 +479,27 @@ class SceneInfra { if (!this.isFovAnimationInProgress) this.renderer.render(this.scene, this.camera) } - tweenCameraToQuaternion( + async tweenCameraToQuaternion( targetQuaternion: Quaternion, - duration: number = 500 + duration = 500, + toOrthographic = true + ): Promise { + const isVertical = isQuaternionVertical(targetQuaternion) + let _duration = duration + if (isVertical) { + _duration = duration * 0.6 + await this._tweenCameraToQuaternion(new Quaternion(), _duration, false) + } + await this._tweenCameraToQuaternion( + targetQuaternion, + _duration, + toOrthographic + ) + } + _tweenCameraToQuaternion( + targetQuaternion: Quaternion, + duration = 500, + toOrthographic = false ): Promise { return new Promise((resolve) => { const camera = this.camera @@ -489,10 +533,10 @@ class SceneInfra { } const onComplete = async () => { - if (isReducedMotion()) { + if (isReducedMotion() && toOrthographic) { cameraAtTime(0.99) this.useOrthographicCamera() - } else { + } else if (toOrthographic) { await this.animateToOrthographic() } if (isVertical) cameraAtTime(1) @@ -626,10 +670,21 @@ class SceneInfra { const { x: px, y: py, z: pz } = this.camera.position const { x: qx, y: qy, z: qz, w: qw } = this.camera.quaternion const { x: tx, y: ty, z: tz } = this.controls.target + const zoom = this.camera.zoom this.camera = this.createPerspectiveCamera() this.camera.position.set(px, py, pz) this.camera.quaternion.set(qx, qy, qz, qw) + const zoomFudgeFactor = 2280 + const distance = zoomFudgeFactor / (zoom * this.fov) + const direction = new Vector3().subVectors( + this.camera.position, + this.controls.target + ) + direction.normalize() + this.camera.position + .copy(this.controls.target) + .addScaledVector(direction, distance) this.setupOrbitControls([tx, ty, tz]) @@ -704,6 +759,7 @@ class SceneInfra { position: newPosition, quaternion: this.camera.quaternion, zoom: this.camera.zoom, + target: this.controls.target, }) } getPlaneIntersectPoint = (): { @@ -929,21 +985,14 @@ class SceneInfra { type: DefaultPlane ): Mesh => { const planeGeometry = new PlaneGeometry(100, 100) - const planeEdges = new EdgesGeometry(planeGeometry) - const lineMaterial = new LineBasicMaterial({ - color: defaultPlaneColor(type, 0.45, 1), - opacity: 0.9, - }) const planeMaterial = new MeshBasicMaterial({ color: defaultPlaneColor(type), transparent: true, - opacity: 0.35, + opacity: 0.0, side: DoubleSide, depthTest: false, // needed to avoid transparency issues }) const plane = new Mesh(planeGeometry, planeMaterial) - const edges = new LineSegments(planeEdges, lineMaterial) - plane.add(edges) plane.rotation.x = rotation.x plane.rotation.y = rotation.y plane.rotation.z = rotation.z @@ -951,15 +1000,14 @@ class SceneInfra { plane.name = type return plane } - const gridHelper = createGridHelper({ size: 100, divisions: 10 }) const planes = [ addPlane({ x: 0, y: Math.PI / 2, z: 0 }, YZ_PLANE), addPlane({ x: 0, y: 0, z: 0 }, XY_PLANE), addPlane({ x: -Math.PI / 2, y: 0, z: 0 }, XZ_PLANE), - gridHelper, ] const planesGroup = new Group() planesGroup.userData.type = DEFAULT_PLANES + planesGroup.name = DEFAULT_PLANES planesGroup.add(...planes) planesGroup.traverse((child) => { if (child instanceof Mesh) { @@ -967,6 +1015,8 @@ class SceneInfra { } }) planesGroup.layers.enable(SKETCH_LAYER) + const sceneScale = getSceneScale(this.camera, this.controls.target) + planesGroup.scale.set(sceneScale, sceneScale, sceneScale) this.scene.add(planesGroup) } removeDefaultPlanes() { @@ -1001,6 +1051,7 @@ class SceneInfra { export const sceneInfra = new SceneInfra() function convertThreeCamValuesToEngineCam({ + target, position, quaternion, zoom, @@ -1023,7 +1074,7 @@ function convertThreeCamValuesToEngineCam({ const upVector = new Vector3(0, 1, 0).applyEuler(euler).normalize() if (isPerspective) { return { - center: lookAtVector, + center: target, up: upVector, vantage: position, } @@ -1045,6 +1096,41 @@ function calculateNearFarFromFOV(fov: number) { return { z_near: 0.1, z_far } } +export function getSceneScale( + camera: PerspectiveCamera | OrthographicCamera, + target: Vector3 +): number { + const distance = + camera instanceof PerspectiveCamera + ? camera.position.distanceTo(target) + : 63.7942123 / camera.zoom + + if (distance <= 20) return 0.1 + else if (distance > 20 && distance <= 200) return 1 + else if (distance > 200 && distance <= 2000) return 10 + else if (distance > 2000 && distance <= 20000) return 100 + else if (distance > 20000) return 1000 + + return 1 +} + +function baseUnitTomm(baseUnit: BaseUnit) { + switch (baseUnit) { + case 'mm': + return 1 + case 'cm': + return 10 + case 'm': + return 1000 + case 'in': + return 25.4 + case 'ft': + return 304.8 + case 'yd': + return 914.4 + } +} + export function isQuaternionVertical(q: Quaternion) { const v = new Vector3(0, 0, 1).applyQuaternion(q) // no x or y components means it's vertical diff --git a/src/components/CommandBar/CommandBar.tsx b/src/components/CommandBar/CommandBar.tsx index 06c956534..2d0d5ff40 100644 --- a/src/components/CommandBar/CommandBar.tsx +++ b/src/components/CommandBar/CommandBar.tsx @@ -27,6 +27,7 @@ export const CommandBarProvider = ({ }) => { const { pathname } = useLocation() const [commandBarState, commandBarSend] = useMachine(commandBarMachine, { + devTools: true, guards: { 'Arguments are ready': (context, _) => { return context.selectedCommand?.args diff --git a/src/components/CommandComboBox.tsx b/src/components/CommandComboBox.tsx index da4ef9396..e9a45d14f 100644 --- a/src/components/CommandComboBox.tsx +++ b/src/components/CommandComboBox.tsx @@ -48,6 +48,7 @@ function CommandComboBox({ (event.metaKey && event.key === 'k') || (event.key === 'Backspace' && !event.currentTarget.value) ) { + event.preventDefault() commandBarSend({ type: 'Close' }) } }} diff --git a/src/components/CustomIcon.tsx b/src/components/CustomIcon.tsx index 922c13689..61772843c 100644 --- a/src/components/CustomIcon.tsx +++ b/src/components/CustomIcon.tsx @@ -1,4 +1,5 @@ export type CustomIconName = + | 'arc' | 'arrowDown' | 'arrowLeft' | 'arrowRight' @@ -22,6 +23,7 @@ export type CustomIconName = | 'networkCrossedOut' | 'parallel' | 'search' + | 'settings' | 'sketch' | 'vertical' @@ -32,6 +34,22 @@ export const CustomIcon = ({ name: CustomIconName } & React.SVGProps) => { switch (name) { + case 'arc': + return ( + + + + ) case 'arrowDown': return ( @@ -137,8 +155,8 @@ export const CustomIcon = ({ xmlns="http://www.w3.org/2000/svg" > @@ -295,8 +313,8 @@ export const CustomIcon = ({ xmlns="http://www.w3.org/2000/svg" > @@ -343,8 +361,8 @@ export const CustomIcon = ({ xmlns="http://www.w3.org/2000/svg" > @@ -359,8 +377,8 @@ export const CustomIcon = ({ xmlns="http://www.w3.org/2000/svg" > @@ -398,6 +416,22 @@ export const CustomIcon = ({ /> ) + case 'settings': + return ( + + + + ) case 'sketch': return ( } +// a little hacky for sure, open to changing it +// this implies that we should only even have one instance of this provider mounted at any one time +// but I think that's a safe assumption +let settingsStateRef: (typeof settingsMachine)['context'] | undefined +export const getSettingsState = () => settingsStateRef + export const GlobalStateContext = createContext({} as GlobalContext) export const GlobalStateProvider = ({ @@ -71,6 +77,7 @@ export const GlobalStateProvider = ({ }, }, }) + settingsStateRef = settingsState.context useStateMachineCommands({ machineId: 'settings', diff --git a/src/components/ModelingMachineProvider.tsx b/src/components/ModelingMachineProvider.tsx index 70ff6b94e..0a6956b32 100644 --- a/src/components/ModelingMachineProvider.tsx +++ b/src/components/ModelingMachineProvider.tsx @@ -37,6 +37,7 @@ import { sceneInfra } from 'clientSideScene/sceneInfra' import { getSketchQuaternion } from 'clientSideScene/sceneEntities' import { startSketchOnDefault } from 'lang/modifyAst' import { Program } from 'lang/wasm' +import { isSingleCursorInPipe } from 'lang/queryAst' type MachineContext = { state: StateFrom @@ -182,7 +183,10 @@ export const ModelingMachineProvider = ({ return canExtrudeSelection(selectionRanges) }, - 'Selection is one face': ({ selectionRanges }) => { + 'Selection is on face': ({ selectionRanges }, { data }) => { + if (data?.forceNewSketch) return false + if (!isSingleCursorInPipe(selectionRanges, kclManager.ast)) + return false return !!isCursorInSketchCommandRange( engineCommandManager.artifactMap, selectionRanges @@ -199,6 +203,7 @@ export const ModelingMachineProvider = ({ await kclManager.executeAstMock(newAst, { updates: 'code' }) sceneInfra.setCallbacks({ onClick: () => {}, + onDrag: () => {}, }) }, 'animate-to-face': async (_, { data: { plane, normal } }) => { diff --git a/src/components/TextEditor.tsx b/src/components/TextEditor.tsx index f630246df..da552dea1 100644 --- a/src/components/TextEditor.tsx +++ b/src/components/TextEditor.tsx @@ -3,9 +3,9 @@ import ReactCodeMirror, { ViewUpdate, keymap, } from '@uiw/react-codemirror' -import { FromServer, IntoServer } from 'editor/lsp/codec' -import Server from '../editor/lsp/server' -import Client from '../editor/lsp/client' +import { FromServer, IntoServer } from 'editor/plugins/lsp/codec' +import Server from '../editor/plugins/lsp/server' +import Client from '../editor/plugins/lsp/client' import { TEST } from 'env' import { useCommandsContext } from 'hooks/useCommandsContext' import { useGlobalStateContext } from 'hooks/useGlobalStateContext' @@ -15,8 +15,8 @@ import { useMemo, useRef } from 'react' import { linter, lintGutter } from '@codemirror/lint' import { useStore } from 'useStore' import { processCodeMirrorRanges } from 'lib/selections' -import { LanguageServerClient } from 'editor/lsp' -import kclLanguage from 'editor/lsp/language' +import { LanguageServerClient } from 'editor/plugins/lsp' +import kclLanguage from 'editor/plugins/lsp/kcl/language' import { EditorView, lineHighlightField } from 'editor/highlightextension' import { roundOff } from 'lib/utils' import { kclErrToDiagnostic } from 'lang/errors' @@ -27,6 +27,9 @@ import { engineCommandManager } from '../lang/std/engineConnection' import { kclManager, useKclContext } from 'lang/KclSingleton' import { ModelingMachineEvent } from 'machines/modelingMachine' import { sceneInfra } from 'clientSideScene/sceneInfra' +import { copilotPlugin } from 'editor/plugins/lsp/copilot' +import { isTauri } from 'lib/isTauri' +import type * as LSP from 'vscode-languageserver-protocol' export const editorShortcutMeta = { formatCode: { @@ -39,6 +42,15 @@ export const editorShortcutMeta = { }, } +function getWorkspaceFolders(): LSP.WorkspaceFolder[] { + // We only use workspace folders in Tauri since that is where we use more than + // one file. + if (isTauri()) { + return [{ uri: 'file://', name: 'ProjectRoot' }] + } + return [] +} + export const TextEditor = ({ theme, }: { @@ -46,15 +58,19 @@ export const TextEditor = ({ }) => { const { editorView, - isLSPServerReady, + isKclLspServerReady, + isCopilotLspServerReady, setEditorView, - setIsLSPServerReady, + setIsKclLspServerReady, + setIsCopilotLspServerReady, isShiftDown, } = useStore((s) => ({ editorView: s.editorView, - isLSPServerReady: s.isLSPServerReady, + isKclLspServerReady: s.isKclLspServerReady, + isCopilotLspServerReady: s.isCopilotLspServerReady, setEditorView: s.setEditorView, - setIsLSPServerReady: s.setIsLSPServerReady, + setIsKclLspServerReady: s.setIsKclLspServerReady, + setIsCopilotLspServerReady: s.setIsCopilotLspServerReady, isShiftDown: s.isShiftDown, })) const { code, errors } = useKclContext() @@ -66,7 +82,7 @@ export const TextEditor = ({ state, } = useModelingContext() - const { settings: { context: { textWrapping } = {} } = {} } = + const { settings: { context: { textWrapping } = {} } = {}, auth } = useGlobalStateContext() const { commandBarSend } = useCommandsContext() const { enable: convertEnabled, handleClick: convertCallback } = @@ -75,20 +91,20 @@ export const TextEditor = ({ // So this is a bit weird, we need to initialize the lsp server and client. // But the server happens async so we break this into two parts. // Below is the client and server promise. - const { lspClient } = useMemo(() => { + const { lspClient: kclLspClient } = useMemo(() => { const intoServer: IntoServer = new IntoServer() const fromServer: FromServer = FromServer.create() const client = new Client(fromServer, intoServer) if (!TEST) { Server.initialize(intoServer, fromServer).then((lspServer) => { - lspServer.start() - setIsLSPServerReady(true) + lspServer.start('kcl') + setIsKclLspServerReady(true) }) } - const lspClient = new LanguageServerClient({ client }) + const lspClient = new LanguageServerClient({ client, name: 'kcl' }) return { lspClient } - }, [setIsLSPServerReady]) + }, [setIsKclLspServerReady]) // Here we initialize the plugin which will start the client. // When we have multi-file support the name of the file will be a dep of @@ -97,19 +113,57 @@ export const TextEditor = ({ // We do not want to restart the server, its just wasteful. const kclLSP = useMemo(() => { let plugin = null - if (isLSPServerReady && !TEST) { + if (isKclLspServerReady && !TEST) { // Set up the lsp plugin. const lsp = kclLanguage({ // When we have more than one file, we'll need to change this. documentUri: `file:///we-just-have-one-file-for-now.kcl`, - workspaceFolders: null, - client: lspClient, + workspaceFolders: getWorkspaceFolders(), + client: kclLspClient, }) plugin = lsp } return plugin - }, [lspClient, isLSPServerReady]) + }, [kclLspClient, isKclLspServerReady]) + + const { lspClient: copilotLspClient } = useMemo(() => { + const intoServer: IntoServer = new IntoServer() + const fromServer: FromServer = FromServer.create() + const client = new Client(fromServer, intoServer) + if (!TEST) { + Server.initialize(intoServer, fromServer).then((lspServer) => { + const token = auth?.context?.token + lspServer.start('copilot', token) + setIsCopilotLspServerReady(true) + }) + } + + const lspClient = new LanguageServerClient({ client, name: 'copilot' }) + return { lspClient } + }, [setIsCopilotLspServerReady]) + + // Here we initialize the plugin which will start the client. + // When we have multi-file support the name of the file will be a dep of + // this use memo, as well as the directory structure, which I think is + // a good setup because it will restart the client but not the server :) + // We do not want to restart the server, its just wasteful. + const copilotLSP = useMemo(() => { + let plugin = null + if (isCopilotLspServerReady && !TEST) { + // Set up the lsp plugin. + const lsp = copilotPlugin({ + // When we have more than one file, we'll need to change this. + documentUri: `file:///we-just-have-one-file-for-now.kcl`, + workspaceFolders: getWorkspaceFolders(), + client: copilotLspClient, + allowHTMLContent: true, + }) + + plugin = lsp + } + return plugin + }, [copilotLspClient, isCopilotLspServerReady]) // const onChange = React.useCallback((value: string, viewUpdate: ViewUpdate) => { const onChange = (newCode: string) => { @@ -184,6 +238,7 @@ export const TextEditor = ({ ] as Extension[] if (kclLSP) extensions.push(kclLSP) + if (copilotLSP) extensions.push(copilotLSP) // These extensions have proven to mess with vitest if (!TEST) { diff --git a/src/components/UserSidebarMenu.tsx b/src/components/UserSidebarMenu.tsx index 5b170020f..31be6da60 100644 --- a/src/components/UserSidebarMenu.tsx +++ b/src/components/UserSidebarMenu.tsx @@ -117,7 +117,7 @@ const UserSidebarMenu = ({ user }: { user?: User }) => {
    { // since /settings is a nested route the sidebar doesn't close diff --git a/src/editor/lsp/client.ts b/src/editor/plugins/lsp/client.ts similarity index 95% rename from src/editor/lsp/client.ts rename to src/editor/plugins/lsp/client.ts index 075126787..9b542faac 100644 --- a/src/editor/lsp/client.ts +++ b/src/editor/plugins/lsp/client.ts @@ -65,6 +65,7 @@ export default class Client extends jsrpc.JSONRPCServerAndClient { afterInitializedHooks: (() => Promise)[] = [] #fromServer: FromServer private serverCapabilities: LSP.ServerCapabilities = {} + private notifyFn: ((message: LSP.NotificationMessage) => void) | null = null constructor(fromServer: FromServer, intoServer: IntoServer) { super( @@ -167,9 +168,15 @@ export default class Client extends jsrpc.JSONRPCServerAndClient { return this.serverCapabilities } + setNotifyFn(fn: (message: LSP.NotificationMessage) => void): void { + this.notifyFn = fn + } + async processNotifications(): Promise { for await (const notification of this.#fromServer.notifications) { - await this.receiveAndSend(notification) + if (this.notifyFn) { + this.notifyFn(notification) + } } } diff --git a/src/editor/lsp/codec.ts b/src/editor/plugins/lsp/codec.ts similarity index 100% rename from src/editor/lsp/codec.ts rename to src/editor/plugins/lsp/codec.ts diff --git a/src/editor/lsp/codec/bytes.ts b/src/editor/plugins/lsp/codec/bytes.ts similarity index 100% rename from src/editor/lsp/codec/bytes.ts rename to src/editor/plugins/lsp/codec/bytes.ts diff --git a/src/editor/lsp/codec/demuxer.ts b/src/editor/plugins/lsp/codec/demuxer.ts similarity index 100% rename from src/editor/lsp/codec/demuxer.ts rename to src/editor/plugins/lsp/codec/demuxer.ts diff --git a/src/editor/lsp/codec/headers.ts b/src/editor/plugins/lsp/codec/headers.ts similarity index 100% rename from src/editor/lsp/codec/headers.ts rename to src/editor/plugins/lsp/codec/headers.ts diff --git a/src/editor/lsp/codec/map.ts b/src/editor/plugins/lsp/codec/map.ts similarity index 100% rename from src/editor/lsp/codec/map.ts rename to src/editor/plugins/lsp/codec/map.ts diff --git a/src/editor/lsp/codec/queue.ts b/src/editor/plugins/lsp/codec/queue.ts similarity index 100% rename from src/editor/lsp/codec/queue.ts rename to src/editor/plugins/lsp/codec/queue.ts diff --git a/src/editor/plugins/lsp/copilot/index.ts b/src/editor/plugins/lsp/copilot/index.ts new file mode 100644 index 000000000..c181bc812 --- /dev/null +++ b/src/editor/plugins/lsp/copilot/index.ts @@ -0,0 +1,496 @@ +/// Thanks to the Cursor folks for their heavy lifting here. +import { indentUnit } from '@codemirror/language' +import { + Decoration, + DecorationSet, + EditorView, + ViewPlugin, + ViewUpdate, +} from '@codemirror/view' +import { + Annotation, + EditorState, + Extension, + Prec, + StateEffect, + StateField, + Transaction, +} from '@codemirror/state' +import { completionStatus } from '@codemirror/autocomplete' +import { offsetToPos, posToOffset } from 'editor/plugins/lsp/util' +import { LanguageServerOptions, LanguageServerClient } from 'editor/plugins/lsp' +import { + LanguageServerPlugin, + documentUri, + languageId, + workspaceFolders, +} from 'editor/plugins/lsp/plugin' + +const ghostMark = Decoration.mark({ class: 'cm-ghostText' }) + +interface Suggestion { + text: string + displayText: string + cursorPos: number + startPos: number + endPos: number + endReplacement: number + uuid: string +} + +// Effects to tell StateEffect what to do with GhostText +const addSuggestion = StateEffect.define() +const acceptSuggestion = StateEffect.define() +const clearSuggestion = StateEffect.define() +const typeFirst = StateEffect.define() + +interface CompletionState { + ghostText: GhostText | null +} +interface GhostText { + text: string + displayText: string + displayPos: number + startPos: number + endGhostText: number + endReplacement: number + endPos: number + decorations: DecorationSet + weirdInsert: boolean + uuid: string +} + +export const completionDecoration = StateField.define({ + create(_state: EditorState) { + return { ghostText: null } + }, + update(state: CompletionState, transaction: Transaction) { + for (const effect of transaction.effects) { + if (effect.is(addSuggestion)) { + // When adding a suggestion, we set th ghostText + const { + text, + displayText, + endReplacement, + cursorPos, + startPos, + endPos, + uuid, + } = effect.value + const endGhostText = cursorPos + displayText.length + const decorations = Decoration.set([ + ghostMark.range(cursorPos, endGhostText), + ]) + return { + ghostText: { + text, + displayText, + startPos, + endPos, + decorations, + displayPos: cursorPos, + endReplacement, + endGhostText, + weirdInsert: false, + uuid, + }, + } + } else if (effect.is(acceptSuggestion)) { + if (state.ghostText) { + return { ghostText: null } + } + } else if (effect.is(typeFirst)) { + const numChars = effect.value + if (state.ghostText && !state.ghostText.weirdInsert) { + let { + text, + displayText, + displayPos, + startPos, + endPos, + endGhostText, + decorations, + endReplacement, + uuid, + } = state.ghostText + + displayPos += numChars + + displayText = displayText.slice(numChars) + + if (startPos === endGhostText) { + return { ghostText: null } + } else { + decorations = Decoration.set([ + ghostMark.range(displayPos, endGhostText), + ]) + return { + ghostText: { + text, + displayText, + startPos, + endPos, + decorations, + endGhostText, + endReplacement, + uuid, + displayPos, + weirdInsert: false, + }, + } + } + } + } else if (effect.is(clearSuggestion)) { + return { ghostText: null } + } + } + + // if (transaction.docChanged && state.ghostText) { + // if (transaction. + // onsole.log({changes: transaction.changes, transaction}) + // const newGhostText = state.ghostText.decorations.map(transaction.changes) + // return {ghostText: {...state.ghostText, decorations: newGhostText}}; + // } + + return state + }, + provide: (field) => + EditorView.decorations.from(field, (value) => + value.ghostText ? value.ghostText.decorations : Decoration.none + ), +}) + +const copilotEvent = Annotation.define() + +/**************************************************************************** + ************************* COMMANDS ****************************************** + *****************************************************************************/ + +const acceptSuggestionCommand = ( + copilotClient: LanguageServerClient, + view: EditorView +) => { + // We delete the ghost text and insert the suggestion. + // We also set the cursor to the end of the suggestion. + const ghostText = view.state.field(completionDecoration)!.ghostText + if (!ghostText) { + return false + } + + const ghostTextStart = ghostText.displayPos + const ghostTextEnd = ghostText.endGhostText + + const actualTextStart = ghostText.startPos + const actualTextEnd = ghostText.endPos + + const replacementEnd = ghostText.endReplacement + + const suggestion = ghostText.text + + view.dispatch({ + changes: { + from: ghostTextStart, + to: ghostTextEnd, + insert: '', + }, + // selection: {anchor: actualTextEnd}, + effects: acceptSuggestion.of(null), + annotations: [copilotEvent.of(null), Transaction.addToHistory.of(false)], + }) + + const tmpTextEnd = replacementEnd - (ghostTextEnd - ghostTextStart) + + view.dispatch({ + changes: { + from: actualTextStart, + to: tmpTextEnd, + insert: suggestion, + }, + selection: { anchor: actualTextEnd }, + annotations: [copilotEvent.of(null), Transaction.addToHistory.of(true)], + }) + + copilotClient.accept(ghostText.uuid) + return true +} +export const rejectSuggestionCommand = ( + copilotClient: LanguageServerClient, + view: EditorView +) => { + // We delete the suggestion, then carry through with the original keypress + const ghostText = view.state.field(completionDecoration)!.ghostText + if (!ghostText) { + return false + } + + const ghostTextStart = ghostText.displayPos + const ghostTextEnd = ghostText.endGhostText + + view.dispatch({ + changes: { + from: ghostTextStart, + to: ghostTextEnd, + insert: '', + }, + effects: clearSuggestion.of(null), + annotations: [copilotEvent.of(null), Transaction.addToHistory.of(false)], + }) + + copilotClient.reject() + return false +} + +const sameKeyCommand = ( + copilotClient: LanguageServerClient, + view: EditorView, + key: string +) => { + // When we type a key that is the same as the first letter of the suggestion, we delete the first letter of the suggestion and carry through with the original keypress + const ghostText = view.state.field(completionDecoration)!.ghostText + if (!ghostText) { + return false + } + const ghostTextStart = ghostText.displayPos + const indent = view.state.facet(indentUnit) + + if (key === 'Tab' && ghostText.displayText.startsWith(indent)) { + view.dispatch({ + selection: { anchor: ghostTextStart + indent.length }, + effects: typeFirst.of(indent.length), + annotations: [copilotEvent.of(null), Transaction.addToHistory.of(false)], + }) + return true + } else if (key === 'Tab') { + return acceptSuggestionCommand(copilotClient, view) + } else if (ghostText.weirdInsert || key !== ghostText.displayText[0]) { + return rejectSuggestionCommand(copilotClient, view) + } else if (ghostText.displayText.length === 1) { + return acceptSuggestionCommand(copilotClient, view) + } else { + // Use this to delete the first letter of the suggestion + view.dispatch({ + selection: { anchor: ghostTextStart + 1 }, + effects: typeFirst.of(1), + annotations: [copilotEvent.of(null), Transaction.addToHistory.of(false)], + }) + + return true + } +} + +const completionPlugin = (copilotClient: LanguageServerClient) => + EditorView.domEventHandlers({ + keydown(event, view) { + if ( + event.key !== 'Shift' && + event.key !== 'Control' && + event.key !== 'Alt' && + event.key !== 'Meta' + ) { + return sameKeyCommand(copilotClient, view, event.key) + } else { + return false + } + }, + mousedown(event, view) { + return rejectSuggestionCommand(copilotClient, view) + }, + }) + +const viewCompletionPlugin = (copilotClient: LanguageServerClient) => + EditorView.updateListener.of((update) => { + if (update.focusChanged) { + rejectSuggestionCommand(copilotClient, update.view) + } + }) +// A view plugin that requests completions from the server after a delay +const completionRequester = (client: LanguageServerClient) => { + let timeout: any = null + let lastPos = 0 + + const badUpdate = (update: ViewUpdate) => { + for (const tr of update.transactions) { + if (tr.annotation(copilotEvent) !== undefined) { + return true + } + } + return false + } + const containsGhostText = (update: ViewUpdate) => { + return update.state.field(completionDecoration).ghostText != null + } + const autocompleting = (update: ViewUpdate) => { + return completionStatus(update.state) === 'active' + } + const notFocused = (update: ViewUpdate) => { + return !update.view.hasFocus + } + + return EditorView.updateListener.of((update: ViewUpdate) => { + if ( + update.docChanged && + !update.transactions.some((tr) => + tr.effects.some((e) => e.is(acceptSuggestion) || e.is(clearSuggestion)) + ) + ) { + // Cancel the previous timeout + if (timeout) { + clearTimeout(timeout) + } + if ( + badUpdate(update) || + containsGhostText(update) || + autocompleting(update) || + notFocused(update) + ) { + return + } + + // Get the current position and source + const state = update.state + const pos = state.selection.main.head + const source = state.doc.toString() + + const dUri = state.facet(documentUri) + const path = dUri.split('/').pop()! + const relativePath = dUri.replace('file://', '') + + // Set a new timeout to request completion + timeout = setTimeout(async () => { + // Check if the position has changed + if (pos === lastPos) { + // Request completion from the server + try { + const completionResult = await client.getCompletion({ + doc: { + source, + tabSize: state.facet(EditorState.tabSize), + indentSize: 1, + insertSpaces: true, + path, + uri: dUri, + relativePath, + languageId: state.facet(languageId), + position: offsetToPos(state.doc, pos), + }, + }) + + if (completionResult.completions.length === 0) { + return + } + + let { + text, + displayText, + range: { start }, + position, + uuid, + } = completionResult.completions[0] + + const startPos = posToOffset(state.doc, { + line: start.line, + character: start.character, + })! + + const endGhostPos = + posToOffset(state.doc, { + line: position.line, + character: position.character, + })! + displayText.length + // EndPos is the position that marks the complete end + // of what is to be replaced when we accept a completion + // result + const endPos = startPos + text.length + + // Check if the position is still the same + if ( + pos === lastPos && + completionStatus(update.view.state) !== 'active' && + update.view.hasFocus + ) { + // Dispatch an effect to add the suggestion + // If the completion starts before the end of the line, check the end of the line with the end of the completion + const line = update.view.state.doc.lineAt(pos) + if (line.to !== pos) { + const ending = update.view.state.doc.sliceString(pos, line.to) + if (displayText.endsWith(ending)) { + displayText = displayText.slice( + 0, + displayText.length - ending.length + ) + } else if (displayText.includes(ending)) { + // Remove the ending + update.view.dispatch({ + changes: { + from: pos, + to: line.to, + insert: '', + }, + selection: { anchor: pos }, + effects: typeFirst.of(ending.length), + annotations: [ + copilotEvent.of(null), + Transaction.addToHistory.of(false), + ], + }) + } + } + update.view.dispatch({ + changes: { + from: pos, + to: pos, + insert: displayText, + }, + effects: [ + addSuggestion.of({ + displayText, + endReplacement: endGhostPos, + text, + cursorPos: pos, + startPos, + endPos, + uuid, + }), + ], + annotations: [ + copilotEvent.of(null), + Transaction.addToHistory.of(false), + ], + }) + } + } catch (error) { + console.warn('copilot completion failed', error) + // Javascript wait for 500ms for some reason is necessary here. + // TODO - FIGURE OUT WHY THIS RESOLVES THE BUG + + await new Promise((resolve) => setTimeout(resolve, 300)) + } + } + }, 150) + // Update the last position + lastPos = pos + } + }) +} + +export const copilotPlugin = (options: LanguageServerOptions): Extension => { + let plugin: LanguageServerPlugin | null = null + + return [ + documentUri.of(options.documentUri), + languageId.of('kcl'), + workspaceFolders.of(options.workspaceFolders), + ViewPlugin.define( + (view) => + (plugin = new LanguageServerPlugin( + options.client, + view, + options.allowHTMLContent + )) + ), + completionDecoration, + Prec.highest(completionPlugin(options.client)), + Prec.highest(viewCompletionPlugin(options.client)), + completionRequester(options.client), + ] +} diff --git a/src/editor/lsp/index.ts b/src/editor/plugins/lsp/index.ts similarity index 52% rename from src/editor/lsp/index.ts rename to src/editor/plugins/lsp/index.ts index 1b2cb8c39..fa5267462 100644 --- a/src/editor/lsp/index.ts +++ b/src/editor/plugins/lsp/index.ts @@ -1,7 +1,68 @@ import type * as LSP from 'vscode-languageserver-protocol' import Client from './client' -import { LanguageServerPlugin } from './plugin' -import { SemanticToken, deserializeTokens } from './semantic_tokens' +import { SemanticToken, deserializeTokens } from './kcl/semantic_tokens' +import { LanguageServerPlugin } from 'editor/plugins/lsp/plugin' + +export interface CopilotGetCompletionsParams { + doc: { + source: string + tabSize: number + indentSize: number + insertSpaces: boolean + path: string + uri: string + relativePath: string + languageId: string + position: { + line: number + character: number + } + } +} + +interface CopilotGetCompletionsResult { + completions: { + text: string + position: { + line: number + character: number + } + uuid: string + range: { + start: { + line: number + character: number + } + end: { + line: number + character: number + } + } + displayText: string + point: { + line: number + character: number + } + region: { + start: { + line: number + character: number + } + end: { + line: number + character: number + } + } + }[] +} + +interface CopilotAcceptCompletionParams { + uuid: string +} + +interface CopilotRejectCompletionParams { + uuids: string[] +} // https://microsoft.github.io/language-server-protocol/specifications/specification-current/ @@ -17,6 +78,9 @@ interface LSPRequestMap { LSP.SemanticTokensParams, LSP.SemanticTokens ] + getCompletions: [CopilotGetCompletionsParams, CopilotGetCompletionsResult] + notifyAccepted: [CopilotAcceptCompletionParams, any] + notifyRejected: [CopilotRejectCompletionParams, any] } // Client to server @@ -26,26 +90,22 @@ interface LSPNotifyMap { 'textDocument/didOpen': LSP.DidOpenTextDocumentParams } -// Server to client -interface LSPEventMap { - 'textDocument/publishDiagnostics': LSP.PublishDiagnosticsParams -} - -export type Notification = { - [key in keyof LSPEventMap]: { - jsonrpc: '2.0' - id?: null | undefined - method: key - params: LSPEventMap[key] - } -}[keyof LSPEventMap] - export interface LanguageServerClientOptions { client: Client + name: string +} + +export interface LanguageServerOptions { + // We assume this is the main project directory, we are currently working in. + workspaceFolders: LSP.WorkspaceFolder[] + documentUri: string + allowHTMLContent: boolean + client: LanguageServerClient } export class LanguageServerClient { private client: Client + private name: string public ready: boolean @@ -55,23 +115,31 @@ export class LanguageServerClient { private isUpdatingSemanticTokens: boolean = false private semanticTokens: SemanticToken[] = [] + private queuedUids: string[] = [] constructor(options: LanguageServerClientOptions) { this.plugins = [] this.client = options.client + this.name = options.name this.ready = false + this.queuedUids = [] this.initializePromise = this.initialize() } async initialize() { // Start the client in the background. + this.client.setNotifyFn(this.processNotifications.bind(this)) this.client.start() this.ready = true } + getName(): string { + return this.name + } + getServerCapabilities(): LSP.ServerCapabilities { return this.client.getServerCapabilities() } @@ -90,6 +158,11 @@ export class LanguageServerClient { } async updateSemanticTokens(uri: string) { + const serverCapabilities = this.getServerCapabilities() + if (!serverCapabilities.semanticTokensProvider) { + return + } + // Make sure we can only run, if we aren't already running. if (!this.isUpdatingSemanticTokens) { this.isUpdatingSemanticTokens = true @@ -114,10 +187,18 @@ export class LanguageServerClient { } async textDocumentHover(params: LSP.HoverParams) { + const serverCapabilities = this.getServerCapabilities() + if (!serverCapabilities.hoverProvider) { + return + } return await this.request('textDocument/hover', params) } async textDocumentCompletion(params: LSP.CompletionParams) { + const serverCapabilities = this.getServerCapabilities() + if (!serverCapabilities.completionProvider) { + return + } return await this.request('textDocument/completion', params) } @@ -145,7 +226,35 @@ export class LanguageServerClient { return this.client.notify(method, params) } - private processNotification(notification: Notification) { + async getCompletion(params: CopilotGetCompletionsParams) { + const response = await this.request('getCompletions', params) + // + this.queuedUids = [...response.completions.map((c) => c.uuid)] + return response + } + + async accept(uuid: string) { + const badUids = this.queuedUids.filter((u) => u !== uuid) + this.queuedUids = [] + await this.acceptCompletion({ uuid }) + await this.rejectCompletions({ uuids: badUids }) + } + + async reject() { + const badUids = this.queuedUids + this.queuedUids = [] + return await this.rejectCompletions({ uuids: badUids }) + } + + async acceptCompletion(params: CopilotAcceptCompletionParams) { + return await this.request('notifyAccepted', params) + } + + async rejectCompletions(params: CopilotRejectCompletionParams) { + return await this.request('notifyRejected', params) + } + + private processNotifications(notification: LSP.NotificationMessage) { for (const plugin of this.plugins) plugin.processNotification(notification) } } diff --git a/src/editor/plugins/lsp/kcl/index.ts b/src/editor/plugins/lsp/kcl/index.ts new file mode 100644 index 000000000..91cb54116 --- /dev/null +++ b/src/editor/plugins/lsp/kcl/index.ts @@ -0,0 +1,75 @@ +import { autocompletion } from '@codemirror/autocomplete' +import { Extension } from '@codemirror/state' +import { ViewPlugin, hoverTooltip, tooltips } from '@codemirror/view' +import { CompletionTriggerKind } from 'vscode-languageserver-protocol' +import { offsetToPos } from 'editor/plugins/lsp/util' +import { LanguageServerOptions } from 'editor/plugins/lsp' +import { + LanguageServerPlugin, + documentUri, + languageId, + workspaceFolders, +} from 'editor/plugins/lsp/plugin' + +export function kclPlugin(options: LanguageServerOptions): Extension { + let plugin: LanguageServerPlugin | null = null + + return [ + documentUri.of(options.documentUri), + languageId.of('kcl'), + workspaceFolders.of(options.workspaceFolders), + ViewPlugin.define( + (view) => + (plugin = new LanguageServerPlugin( + options.client, + view, + options.allowHTMLContent + )) + ), + hoverTooltip( + (view, pos) => + plugin?.requestHoverTooltip(view, offsetToPos(view.state.doc, pos)) ?? + null + ), + tooltips({ + position: 'absolute', + }), + autocompletion({ + override: [ + async (context) => { + if (plugin == null) return null + + const { state, pos, explicit } = context + const line = state.doc.lineAt(pos) + let trigKind: CompletionTriggerKind = CompletionTriggerKind.Invoked + let trigChar: string | undefined + if ( + !explicit && + plugin.client + .getServerCapabilities() + .completionProvider?.triggerCharacters?.includes( + line.text[pos - line.from - 1] + ) + ) { + trigKind = CompletionTriggerKind.TriggerCharacter + trigChar = line.text[pos - line.from - 1] + } + if ( + trigKind === CompletionTriggerKind.Invoked && + !context.matchBefore(/\w+$/) + ) { + return null + } + return await plugin.requestCompletion( + context, + offsetToPos(state.doc, pos), + { + triggerKind: trigKind, + triggerCharacter: trigChar, + } + ) + }, + ], + }), + ] +} diff --git a/src/editor/lsp/language.ts b/src/editor/plugins/lsp/kcl/language.ts similarity index 90% rename from src/editor/lsp/language.ts rename to src/editor/plugins/lsp/kcl/language.ts index 7291f1a7c..89ef7d84e 100644 --- a/src/editor/lsp/language.ts +++ b/src/editor/plugins/lsp/kcl/language.ts @@ -5,8 +5,8 @@ import { defineLanguageFacet, LanguageSupport, } from '@codemirror/language' -import { LanguageServerClient } from '.' -import { kclPlugin } from './plugin' +import { LanguageServerClient } from 'editor/plugins/lsp' +import { kclPlugin } from '.' import type * as LSP from 'vscode-languageserver-protocol' import { parser as jsParser } from '@lezer/javascript' import { EditorState } from '@uiw/react-codemirror' @@ -14,7 +14,7 @@ import { EditorState } from '@uiw/react-codemirror' const data = defineLanguageFacet({}) export interface LanguageOptions { - workspaceFolders: LSP.WorkspaceFolder[] | null + workspaceFolders: LSP.WorkspaceFolder[] documentUri: string client: LanguageServerClient } diff --git a/src/editor/lsp/parser.ts b/src/editor/plugins/lsp/kcl/parser.ts similarity index 97% rename from src/editor/lsp/parser.ts rename to src/editor/plugins/lsp/kcl/parser.ts index bbe74f557..50a5daf4a 100644 --- a/src/editor/lsp/parser.ts +++ b/src/editor/plugins/lsp/kcl/parser.ts @@ -9,8 +9,8 @@ import { NodeType, NodeSet, } from '@lezer/common' -import { LanguageServerClient } from '.' -import { posToOffset } from './plugin' +import { LanguageServerClient } from 'editor/plugins/lsp' +import { posToOffset } from 'editor/plugins/lsp/util' import { SemanticToken } from './semantic_tokens' import { DocInput } from '@codemirror/language' import { tags, styleTags } from '@lezer/highlight' diff --git a/src/editor/lsp/semantic_tokens.ts b/src/editor/plugins/lsp/kcl/semantic_tokens.ts similarity index 100% rename from src/editor/lsp/semantic_tokens.ts rename to src/editor/plugins/lsp/kcl/semantic_tokens.ts diff --git a/src/editor/lsp/plugin.ts b/src/editor/plugins/lsp/plugin.ts similarity index 71% rename from src/editor/lsp/plugin.ts rename to src/editor/plugins/lsp/plugin.ts index 8e292173f..64341c9c8 100644 --- a/src/editor/lsp/plugin.ts +++ b/src/editor/plugins/lsp/plugin.ts @@ -1,13 +1,7 @@ -import { autocompletion, completeFromList } from '@codemirror/autocomplete' +import { completeFromList } from '@codemirror/autocomplete' import { setDiagnostics } from '@codemirror/lint' import { Facet } from '@codemirror/state' -import { - EditorView, - ViewPlugin, - Tooltip, - hoverTooltip, - tooltips, -} from '@codemirror/view' +import { EditorView, Tooltip } from '@codemirror/view' import { DiagnosticSeverity, CompletionItemKind, @@ -22,10 +16,18 @@ import type { } from '@codemirror/autocomplete' import type { PublishDiagnosticsParams } from 'vscode-languageserver-protocol' import type { ViewUpdate, PluginValue } from '@codemirror/view' -import type { Text } from '@codemirror/state' import type * as LSP from 'vscode-languageserver-protocol' -import { LanguageServerClient, Notification } from '.' +import { LanguageServerClient } from 'editor/plugins/lsp' import { Marked } from '@ts-stack/markdown' +import { posToOffset } from 'editor/plugins/lsp/util' + +const useLast = (values: readonly any[]) => values.reduce((_, v) => v, '') +export const documentUri = Facet.define({ combine: useLast }) +export const languageId = Facet.define({ combine: useLast }) +export const workspaceFolders = Facet.define< + LSP.WorkspaceFolder[], + LSP.WorkspaceFolder[] +>({ combine: useLast }) const changesDelay = 500 @@ -33,31 +35,22 @@ const CompletionItemKindMap = Object.fromEntries( Object.entries(CompletionItemKind).map(([key, value]) => [value, key]) ) as Record -const useLast = (values: readonly any[]) => values.reduce((_, v) => v, '') -const documentUri = Facet.define({ combine: useLast }) -const languageId = Facet.define({ combine: useLast }) -const client = Facet.define({ - combine: useLast, -}) - -export interface LanguageServerOptions { - workspaceFolders: LSP.WorkspaceFolder[] | null - documentUri: string - allowHTMLContent: boolean - client: LanguageServerClient -} - export class LanguageServerPlugin implements PluginValue { public client: LanguageServerClient - private documentUri: string private languageId: string + private workspaceFolders: LSP.WorkspaceFolder[] private documentVersion: number - constructor(private view: EditorView, private allowHTMLContent: boolean) { - this.client = this.view.state.facet(client) + constructor( + client: LanguageServerClient, + private view: EditorView, + private allowHTMLContent: boolean + ) { + this.client = client this.documentUri = this.view.state.facet(documentUri) this.languageId = this.view.state.facet(languageId) + this.workspaceFolders = this.view.state.facet(workspaceFolders) this.documentVersion = 0 this.client.attachPlugin(this) @@ -238,11 +231,28 @@ export class LanguageServerPlugin implements PluginValue { return completeFromList(options)(context) } - processNotification(notification: Notification) { + processNotification(notification: LSP.NotificationMessage) { try { switch (notification.method) { case 'textDocument/publishDiagnostics': - this.processDiagnostics(notification.params) + this.processDiagnostics( + notification.params as PublishDiagnosticsParams + ) + break + case 'window/logMessage': + console.log( + '[lsp] [window/logMessage]', + this.client.getName(), + notification.params + ) + break + case 'window/showMessage': + console.log( + '[lsp] [window/showMessage]', + this.client.getName(), + notification.params + ) + break } } catch (error) { console.error(error) @@ -284,83 +294,6 @@ export class LanguageServerPlugin implements PluginValue { } } -export function kclPlugin(options: LanguageServerOptions) { - let plugin: LanguageServerPlugin | null = null - - return [ - client.of(options.client), - documentUri.of(options.documentUri), - languageId.of('kcl'), - ViewPlugin.define( - (view) => - (plugin = new LanguageServerPlugin(view, options.allowHTMLContent)) - ), - hoverTooltip( - (view, pos) => - plugin?.requestHoverTooltip(view, offsetToPos(view.state.doc, pos)) ?? - null - ), - tooltips({ - position: 'absolute', - }), - autocompletion({ - override: [ - async (context) => { - if (plugin == null) return null - - const { state, pos, explicit } = context - const line = state.doc.lineAt(pos) - let trigKind: CompletionTriggerKind = CompletionTriggerKind.Invoked - let trigChar: string | undefined - if ( - !explicit && - plugin.client - .getServerCapabilities() - .completionProvider?.triggerCharacters?.includes( - line.text[pos - line.from - 1] - ) - ) { - trigKind = CompletionTriggerKind.TriggerCharacter - trigChar = line.text[pos - line.from - 1] - } - if ( - trigKind === CompletionTriggerKind.Invoked && - !context.matchBefore(/\w+$/) - ) { - return null - } - return await plugin.requestCompletion( - context, - offsetToPos(state.doc, pos), - { - triggerKind: trigKind, - triggerCharacter: trigChar, - } - ) - }, - ], - }), - ] -} - -export function posToOffset( - doc: Text, - pos: { line: number; character: number } -): number | undefined { - if (pos.line >= doc.lines) return - const offset = doc.line(pos.line + 1).from + pos.character - if (offset > doc.length) return - return offset -} - -function offsetToPos(doc: Text, offset: number) { - const line = doc.lineAt(offset) - return { - line: line.number - 1, - character: offset - line.from, - } -} - function formatContents( contents: LSP.MarkupContent | LSP.MarkedString | LSP.MarkedString[] ): string { diff --git a/src/editor/lsp/server-capability-registration.ts b/src/editor/plugins/lsp/server-capability-registration.ts similarity index 95% rename from src/editor/lsp/server-capability-registration.ts rename to src/editor/plugins/lsp/server-capability-registration.ts index 780e77edb..a31370c9e 100644 --- a/src/editor/lsp/server-capability-registration.ts +++ b/src/editor/plugins/lsp/server-capability-registration.ts @@ -34,6 +34,8 @@ const ServerCapabilitiesProviders: IMethodServerCapabilityProviderDictionary = { 'textDocument/foldingRange': 'foldingRangeProvider', 'textDocument/declaration': 'declarationProvider', 'textDocument/executeCommand': 'executeCommandProvider', + 'textDocument/semanticTokens/full': 'semanticTokensProvider', + 'textDocument/publishDiagnostics': 'diagnosticsProvider', } function registerServerCapability( diff --git a/src/editor/lsp/server.ts b/src/editor/plugins/lsp/server.ts similarity index 55% rename from src/editor/lsp/server.ts rename to src/editor/plugins/lsp/server.ts index 4ca4ab080..cf550e92a 100644 --- a/src/editor/lsp/server.ts +++ b/src/editor/plugins/lsp/server.ts @@ -1,9 +1,11 @@ import init, { + copilot_lsp_run, InitOutput, - lsp_run, + kcl_lsp_run, ServerConfig, -} from '../../wasm-lib/pkg/wasm_lib' +} from 'wasm-lib/pkg/wasm_lib' import { FromServer, IntoServer } from './codec' +import { fileSystemManager } from 'lang/std/fileSystemManager' export default class Server { readonly initOutput: InitOutput @@ -29,8 +31,19 @@ export default class Server { return server } - async start(): Promise { - const config = new ServerConfig(this.#intoServer, this.#fromServer) - await lsp_run(config) + async start(type_: 'kcl' | 'copilot', token?: string): Promise { + const config = new ServerConfig( + this.#intoServer, + this.#fromServer, + fileSystemManager + ) + if (type_ === 'copilot') { + if (!token) { + throw new Error('auth token is required for copilot') + } + await copilot_lsp_run(config, token) + } else if (type_ === 'kcl') { + await kcl_lsp_run(config) + } } } diff --git a/src/editor/lsp/tracer.ts b/src/editor/plugins/lsp/tracer.ts similarity index 100% rename from src/editor/lsp/tracer.ts rename to src/editor/plugins/lsp/tracer.ts diff --git a/src/editor/plugins/lsp/util.ts b/src/editor/plugins/lsp/util.ts new file mode 100644 index 000000000..7726597cf --- /dev/null +++ b/src/editor/plugins/lsp/util.ts @@ -0,0 +1,19 @@ +import { Text } from '@codemirror/state' + +export function posToOffset( + doc: Text, + pos: { line: number; character: number } +): number | undefined { + if (pos.line >= doc.lines) return + const offset = doc.line(pos.line + 1).from + pos.character + if (offset > doc.length) return + return offset +} + +export function offsetToPos(doc: Text, offset: number) { + const line = doc.lineAt(offset) + return { + line: line.number - 1, + character: offset - line.from, + } +} diff --git a/src/index.css b/src/index.css index 771033edb..f2e7dfa57 100644 --- a/src/index.css +++ b/src/index.css @@ -219,3 +219,8 @@ code { word-break: normal; word-wrap: break-word; } + +.cm-ghostText, +.cm-ghostText * { + color: rgb(120, 120, 120, 0.8) !important; +} diff --git a/src/lang/KclSingleton.tsx b/src/lang/KclSingleton.tsx index a7ac99484..85b1b9dc2 100644 --- a/src/lang/KclSingleton.tsx +++ b/src/lang/KclSingleton.tsx @@ -211,7 +211,7 @@ class KclManager { console.error('error parsing code', e) if (e instanceof KCLError) { this.kclErrors = [e] - if (e.msg === 'file is empty') engineCommandManager.endSession() + if (e.msg === 'file is empty') engineCommandManager?.endSession() } return null } @@ -228,7 +228,17 @@ class KclManager { } } - async executeAst(ast: Program = this._ast, updateCode = false) { + private _cancelTokens: Map = new Map() + + async executeAst( + ast: Program = this._ast, + updateCode = false, + executionId?: number + ) { + console.trace('executeAst') + const currentExecutionId = executionId || Date.now() + this._cancelTokens.set(currentExecutionId, false) + await this.ensureWasmInit() this.isExecuting = true const { logs, errors, programMemory } = await executeAst({ @@ -236,6 +246,11 @@ class KclManager { engineCommandManager: this.engineCommandManager, }) this.isExecuting = false + // Check the cancellation token for this execution before applying side effects + if (this._cancelTokens.get(currentExecutionId)) { + this._cancelTokens.delete(currentExecutionId) + return + } this.logs = logs this.kclErrors = errors this.programMemory = programMemory @@ -248,6 +263,7 @@ class KclManager { type: 'execution-done', data: null, }) + this._cancelTokens.delete(currentExecutionId) } async executeAstMock( ast: Program = this._ast, @@ -295,7 +311,13 @@ class KclManager { } ) } - async executeCode(code?: string) { + async executeCode(code?: string, executionId?: number) { + const currentExecutionId = executionId || Date.now() + this._cancelTokens.set(currentExecutionId, false) + if (this._cancelTokens.get(currentExecutionId)) { + this._cancelTokens.delete(currentExecutionId) + return + } await this.ensureWasmInit() await this?.engineCommandManager?.waitForReady const result = await executeCode({ @@ -304,6 +326,11 @@ class KclManager { lastAst: this._ast, force: false, }) + // Check the cancellation token for this execution before applying side effects + if (this._cancelTokens.get(currentExecutionId)) { + this._cancelTokens.delete(currentExecutionId) + return + } if (!result.isChange) return const { logs, errors, programMemory, ast } = result this.logs = logs @@ -311,6 +338,12 @@ class KclManager { this.programMemory = programMemory this.ast = ast if (code) this.code = code + this._cancelTokens.delete(currentExecutionId) + } + cancelAllExecutions() { + this._cancelTokens.forEach((_, key) => { + this._cancelTokens.set(key, true) + }) } setCode(code: string, shouldWriteFile = true) { if (shouldWriteFile) { @@ -391,6 +424,26 @@ class KclManager { } return returnVal } + + get defaultPlanes() { + return this?.engineCommandManager?.defaultPlanes + } + + getPlaneId(axis: 'xy' | 'xz' | 'yz'): string { + return this.defaultPlanes[axis] + } + + showPlanes() { + void this.engineCommandManager.setPlaneHidden(this.defaultPlanes.xy, false) + void this.engineCommandManager.setPlaneHidden(this.defaultPlanes.yz, false) + void this.engineCommandManager.setPlaneHidden(this.defaultPlanes.xz, false) + } + + hidePlanes() { + void this.engineCommandManager.setPlaneHidden(this.defaultPlanes.xy, true) + void this.engineCommandManager.setPlaneHidden(this.defaultPlanes.yz, true) + void this.engineCommandManager.setPlaneHidden(this.defaultPlanes.xz, true) + } } export const kclManager = new KclManager(engineCommandManager) diff --git a/src/lang/abstractSyntaxTree.test.ts b/src/lang/abstractSyntaxTree.test.ts index 911846137..297de89a7 100644 --- a/src/lang/abstractSyntaxTree.test.ts +++ b/src/lang/abstractSyntaxTree.test.ts @@ -1653,7 +1653,7 @@ describe('parsing errors', () => { let _theError try { - const result = expect(parse(code)) + let _ = expect(parse(code)) } catch (e) { _theError = e } diff --git a/src/lang/artifact.test.ts b/src/lang/artifact.test.ts index 9c81f9c6e..3ca329f8d 100644 --- a/src/lang/artifact.test.ts +++ b/src/lang/artifact.test.ts @@ -22,6 +22,7 @@ show(mySketch001)` expect(shown).toEqual([ { type: 'SketchGroup', + on: expect.any(Object), start: { to: [0, 0], from: [0, 0], diff --git a/src/lang/executor.test.ts b/src/lang/executor.test.ts index d1966d59d..a71a48c2b 100644 --- a/src/lang/executor.test.ts +++ b/src/lang/executor.test.ts @@ -143,6 +143,7 @@ show(mySketch) const { root } = await exe(code) expect(root.mySk1).toEqual({ type: 'SketchGroup', + on: expect.any(Object), start: { to: [0, 0], from: [0, 0], diff --git a/src/lang/queryAst.ts b/src/lang/queryAst.ts index d46b23418..9d1c238bc 100644 --- a/src/lang/queryAst.ts +++ b/src/lang/queryAst.ts @@ -1,5 +1,5 @@ import { ToolTip } from '../useStore' -import { Selection } from 'lib/selections' +import { Selection, Selections } from 'lib/selections' import { BinaryExpression, Program, @@ -558,3 +558,24 @@ export function hasExtrudeSketchGroup({ const varValue = programMemory?.root[varName] return varValue?.type === 'ExtrudeGroup' || varValue?.type === 'SketchGroup' } + +export function isSingleCursorInPipe( + selectionRanges: Selections, + ast: Program +) { + if (selectionRanges.codeBasedSelections.length !== 1) return false + if ( + doesPipeHaveCallExp({ + ast, + selection: selectionRanges.codeBasedSelections[0], + calleeName: 'extrude', + }) + ) + return false + const selection = selectionRanges.codeBasedSelections[0] + const pathToNode = getNodePathFromSourceRange(ast, selection.range) + const nodeTypes = pathToNode.map(([, type]) => type) + if (nodeTypes.includes('FunctionExpression')) return false + if (nodeTypes.includes('PipeExpression')) return true + return false +} diff --git a/src/lang/std/engineConnection.ts b/src/lang/std/engineConnection.ts index 4509e4516..76e323d6b 100644 --- a/src/lang/std/engineConnection.ts +++ b/src/lang/std/engineConnection.ts @@ -920,6 +920,11 @@ export class EngineCommandManager { outSequence = 1 inSequence = 1 engineConnection?: EngineConnection + defaultPlanes: { xy: string; yz: string; xz: string } = { + xy: '', + yz: '', + xz: '', + } _commandLogs: CommandLog[] = [] _commandLogCallBack: (command: CommandLog[]) => void = () => {} // Folks should realize that wait for ready does not get called _everytime_ @@ -1014,7 +1019,9 @@ export class EngineCommandManager { }) sceneInfra.onStreamStart() - executeCode(undefined, true) + this.initPlanes().then(() => { + executeCode(undefined, true) + }) }, onClose: () => { setIsStreamReady(false) @@ -1142,7 +1149,10 @@ export class EngineCommandManager { raw: message, } as const this.artifactMap[id] = artifact - if (command.commandType === 'entity_linear_pattern') { + if ( + command.commandType === 'entity_linear_pattern' || + command.commandType === 'entity_circular_pattern' + ) { const entities = (modelingResponse as any)?.data?.entity_ids entities?.forEach((entity: string) => { this.artifactMap[entity] = artifact @@ -1289,10 +1299,16 @@ export class EngineCommandManager { // Using an array is the list is likely to grow. 'start_path', 'entity_linear_pattern', + 'entity_circular_pattern', ] if (artifactTypesToDelete.includes(artifact.commandType)) { artifactsToDelete[id] = artifact } + if (artifact.commandType === 'import_files') { + // TODO why is this handled differently from other artifacts, i.e. why does it not use the id from the + // modeling command? We're having to do special clean up for this one special object. + artifactsToDelete[(artifact as any)?.data?.data?.object_id] = artifact + } }) Object.keys(artifactsToDelete).forEach((id) => { const deleteCmd: EngineCommand = { @@ -1555,6 +1571,102 @@ export class EngineCommandManager { artifactMap: this.artifactMap, } } + private async initPlanes() { + const [xy, yz, xz] = [ + await this.createPlane({ + x_axis: { x: 1, y: 0, z: 0 }, + y_axis: { x: 0, y: 1, z: 0 }, + color: { r: 0.7, g: 0.28, b: 0.28, a: 0.4 }, + }), + await this.createPlane({ + x_axis: { x: 0, y: 1, z: 0 }, + y_axis: { x: 0, y: 0, z: 1 }, + color: { r: 0.28, g: 0.7, b: 0.28, a: 0.4 }, + }), + await this.createPlane({ + x_axis: { x: 1, y: 0, z: 0 }, + y_axis: { x: 0, y: 0, z: 1 }, + color: { r: 0.28, g: 0.28, b: 0.7, a: 0.4 }, + }), + ] + this.defaultPlanes = { xy, yz, xz } + + this.subscribeTo({ + event: 'select_with_point', + callback: ({ data }) => { + if (!data?.entity_id) return + if ( + ![ + this.defaultPlanes.xy, + this.defaultPlanes.yz, + this.defaultPlanes.xz, + ].includes(data.entity_id) + ) + return + this.onPlaneSelectCallback(data.entity_id) + }, + }) + } + planesInitialized(): boolean { + return ( + this.defaultPlanes.xy !== '' && + this.defaultPlanes.yz !== '' && + this.defaultPlanes.xz !== '' + ) + } + + onPlaneSelectCallback = (id: string) => {} + onPlaneSelected(callback: (id: string) => void) { + this.onPlaneSelectCallback = callback + } + + async setPlaneHidden(id: string, hidden: boolean): Promise { + return await this.sendSceneCommand({ + type: 'modeling_cmd_req', + cmd_id: uuidv4(), + cmd: { + type: 'object_visible', + object_id: id, + hidden: hidden, + }, + }) + } + + private async createPlane({ + x_axis, + y_axis, + color, + }: { + x_axis: Models['Point3d_type'] + y_axis: Models['Point3d_type'] + color: Models['Color_type'] + }): Promise { + const planeId = uuidv4() + await this.sendSceneCommand({ + type: 'modeling_cmd_req', + cmd: { + type: 'make_plane', + size: 100, + origin: { x: 0, y: 0, z: 0 }, + x_axis, + y_axis, + clobber: false, + hide: true, + }, + cmd_id: planeId, + }) + await this.sendSceneCommand({ + type: 'modeling_cmd_req', + cmd: { + type: 'plane_set_color', + plane_id: planeId, + color, + }, + cmd_id: uuidv4(), + }) + await this.setPlaneHidden(planeId, true) + return planeId + } } export const engineCommandManager = new EngineCommandManager() diff --git a/src/lang/std/fileSystemManager.ts b/src/lang/std/fileSystemManager.ts index 79a31b807..e6067113a 100644 --- a/src/lang/std/fileSystemManager.ts +++ b/src/lang/std/fileSystemManager.ts @@ -1,6 +1,8 @@ import { readFile, exists as tauriExists } from '@tauri-apps/plugin-fs' import { isTauri } from 'lib/isTauri' import { join } from '@tauri-apps/api/path' +import { invoke } from '@tauri-apps/api/core' +import { FileEntry } from 'lib/types' /// FileSystemManager is a class that provides a way to read files from the local file system. /// It assumes that you are in a project since it is solely used by the std lib @@ -53,6 +55,32 @@ class FileSystemManager { return tauriExists(file) }) } + + getAllFiles(path: string): Promise { + // Using local file system only works from Tauri. + if (!isTauri()) { + throw new Error( + 'This function can only be called from a Tauri application' + ) + } + + return join(this.dir, path) + .catch((error) => { + throw new Error(`Error joining dir: ${error}`) + }) + .then((p) => { + invoke('read_dir_recursive', { + path: p, + }) + .catch((error) => { + throw new Error(`Error reading dir: ${error}`) + }) + + .then((files) => { + return files.map((file) => file.path) + }) + }) + } } export const fileSystemManager = new FileSystemManager() diff --git a/src/lang/wasm.ts b/src/lang/wasm.ts index b53092b6a..f724b4d40 100644 --- a/src/lang/wasm.ts +++ b/src/lang/wasm.ts @@ -136,15 +136,21 @@ export const executor = async ( return _programMemory } +const getSettingsState = import('components/GlobalStateProvider').then( + (module) => module.getSettingsState +) + export const _executor = async ( node: Program, programMemory: ProgramMemory = { root: {}, return: null }, engineCommandManager: EngineCommandManager ): Promise => { try { + const baseUnit = (await getSettingsState)()?.baseUnit || 'mm' const memory: ProgramMemory = await execute_wasm( JSON.stringify(node), JSON.stringify(programMemory), + baseUnit, engineCommandManager, fileSystemManager ) diff --git a/src/lib/commandBarConfigs/settingsCommandConfig.ts b/src/lib/commandBarConfigs/settingsCommandConfig.ts index 15b092f03..e8a9c955a 100644 --- a/src/lib/commandBarConfigs/settingsCommandConfig.ts +++ b/src/lib/commandBarConfigs/settingsCommandConfig.ts @@ -36,7 +36,7 @@ export const settingsCommandBarConfig: CommandSetConfig< SettingsCommandSchema > = { 'Set Base Unit': { - icon: 'gear', + icon: 'settings', args: { baseUnit: { inputType: 'options', @@ -52,7 +52,7 @@ export const settingsCommandBarConfig: CommandSetConfig< }, }, 'Set Camera Controls': { - icon: 'gear', + icon: 'settings', args: { cameraControls: { inputType: 'options', @@ -68,7 +68,7 @@ export const settingsCommandBarConfig: CommandSetConfig< }, }, 'Set Default Project Name': { - icon: 'gear', + icon: 'settings', hide: 'web', args: { defaultProjectName: { @@ -79,7 +79,7 @@ export const settingsCommandBarConfig: CommandSetConfig< }, }, 'Set Text Wrapping': { - icon: 'gear', + icon: 'settings', args: { textWrapping: { inputType: 'options', @@ -101,7 +101,7 @@ export const settingsCommandBarConfig: CommandSetConfig< }, }, 'Set Theme': { - icon: 'gear', + icon: 'settings', args: { theme: { inputType: 'options', @@ -117,7 +117,7 @@ export const settingsCommandBarConfig: CommandSetConfig< }, }, 'Set Unit System': { - icon: 'gear', + icon: 'settings', args: { unitSystem: { inputType: 'options', diff --git a/src/lib/selections.ts b/src/lib/selections.ts index d7db5727d..4ef430433 100644 --- a/src/lib/selections.ts +++ b/src/lib/selections.ts @@ -9,7 +9,11 @@ import { SelectionRange } from '@uiw/react-codemirror' import { isOverlap } from 'lib/utils' import { isCursorInSketchCommandRange } from 'lang/util' import { Program } from 'lang/wasm' -import { doesPipeHaveCallExp, getNodeFromPath } from 'lang/queryAst' +import { + doesPipeHaveCallExp, + getNodeFromPath, + isSingleCursorInPipe, +} from 'lang/queryAst' import { CommandArgument } from './commandTypes' import { STRAIGHT_SEGMENT, @@ -455,6 +459,7 @@ function resetAndSetEngineEntitySelectionCmds( } export function isSketchPipe(selectionRanges: Selections) { + if (!isSingleCursorInPipe(selectionRanges, kclManager.ast)) return false return isCursorInSketchCommandRange( engineCommandManager.artifactMap, selectionRanges diff --git a/src/machines/authMachine.ts b/src/machines/authMachine.ts index 427b1eb8a..0d5a92032 100644 --- a/src/machines/authMachine.ts +++ b/src/machines/authMachine.ts @@ -37,7 +37,10 @@ export type Events = } export const TOKEN_PERSIST_KEY = 'TOKEN_PERSIST_KEY' -const persistedToken = localStorage?.getItem(TOKEN_PERSIST_KEY) || '' +const persistedToken = + localStorage?.getItem(TOKEN_PERSIST_KEY) || + getCookie('__Secure-next-auth.session-token') || + '' export const authMachine = createMachine( { @@ -135,3 +138,23 @@ async function getUser(context: UserContext) { return user } + +function getCookie(cname: string): string { + if (isTauri()) { + return '' + } + + let name = cname + '=' + let decodedCookie = decodeURIComponent(document.cookie) + let ca = decodedCookie.split(';') + for (let i = 0; i < ca.length; i++) { + let c = ca[i] + while (c.charAt(0) === ' ') { + c = c.substring(1) + } + if (c.indexOf(name) === 0) { + return c.substring(name.length, c.length) + } + } + return '' +} diff --git a/src/machines/modelingMachine.ts b/src/machines/modelingMachine.ts index fbf637b6d..713c422e9 100644 --- a/src/machines/modelingMachine.ts +++ b/src/machines/modelingMachine.ts @@ -71,7 +71,12 @@ export type SetSelections = } export type ModelingMachineEvent = - | { type: 'Enter sketch' } + | { + type: 'Enter sketch' + data?: { + forceNewSketch?: boolean + } + } | { type: 'Select default plane' data: { plane: DefaultPlaneStr; normal: [number, number, number] } @@ -114,7 +119,7 @@ export type MoveDesc = { line: number; snippet: string } export const modelingMachine = createMachine( { - /** @xstate-layout N4IgpgJg5mDOIC5QFkD2EwBsCWA7KAxAMICGuAxlgNoAMAuoqAA6qzYAu2qujIAHogC0AdgCsAZgB04gEyjhADnEA2GgoUAWJQBoQAT0QBGGuICckmoZkbTM42YWKAvk91oMOfAQDKYdgAJYLDByTm5aBiQQFjYwniiBBFtpGhlxDRphGg1ZURlhXQMEcRLDSVF5UwV84XEK8Rc3dCw8KElsCEwwHz9A4NCuXAjeGI5B3kTBDOFJYWVlQ2UlY3UrQsQFUQVy0Q00w3FLGVNTBtcQdxb8ds7ugFFcdjAAJ0CAaz9yAAthqNG4iZCdKiWZpcQKEyHTKmTLrYrCGb5DRaGHKBGiYzKRoXZqeNodLoEB5PV6wD7sb5UQyRZisMbcQEIQRLGiSdRmfIqUxLCpw5QqcrQ4SGTTWUx5bGXPE3Ql3PjsZ4AVwwv1psXGCSEMjkkhkNFE-MNBxo4vEcM22wqOQxikMKwUktxrUk3nJ32IZEomFdnx+9BGdIBmoQdoUykkxmEyIhELMsjhobKoYUdsOIq2jo8zp9FK+LrdXwAkrcegEgl0BuF-X9AxrQIlDHspPzRKYbAsttYzfojCYZBYaEs5uCaCZuZmrm0c99877i4TkCQPn0oABbMCPfwANxenHIJEwquitYZwaspiT1U0c00qQKPZDGgOKVHcgk+SUGgn0uned-8+6RdlyCNcNwCL5UGebAAC9uHYA8j3+Ot+CMJFJFUMN9TtfI0RkBNxDtcoNHkSx+WMCoZG-bMC1nXMAOIbhYAVEg8H8CCoNgx4D38CBsCYz0wEQk94nrVDdgsJsTU-C91DhNJuQsCpRFHYiLwOKjrl-WjvnoohGOY1id2ePduN4-iKEE6s1XpESUJDGQlkkcUZE2RYnzUPY5M5cprBFDQEWEBzdg0qcaP-Es9NwJjnhY3B-AAQQAIW8fwAA0hPVU9RPszZJByMRG1Oc80jk8UNCcg1FFfVtajOJos00sKC10-SYtYpKUoATQymzGSsXLrDsZQ5EMA0DTwh9DnUUElMWNQoy-c4pWo31tKLCLWti-wyCgLoeqDbKDhyaQlCveQU2EUw5OUxEtnkdE0ROYQQrWtaWqigy4q6fB2D9Glj0y2yGxKGYVANE0Dn2UQ5IWbY5jbQxLujFRnqWp1GtW8LCUi6KtqYF58dwXjyEVTASFeMz4Is-bkIbbVthsIrrEsTDlDklNyuFKpTARaxkTEF6tKx7occ+tjIJguCD0wPRtpwKAhisgHerPBz+wtLQJGIjJ+QTDFw2OLZ-MCsR+TqnEGtCzHmo2j62rioyTMwGW5ewBWaayuyrEuvLZEccVFjMDEE2GkEth5qolmORxzeWjHcze23cdY2BcBIJh-HYVA0o9oGjAIqQHJHBQeeqMw5OyfttQNeZVC2QLKLRy3XuFhi7a21P08z7PuqVpDPeB59MjIhFxGFbI5MbGZdkcOQLyjZQckFpq5yTsWwAAR0VbjvqgX7c7644pAxY2ef1OQx4TWpWRyExR31ZQDVMZfrdX7HNtYphyel6g++EvrZAzFSEXUapwnxRgTKcIBpQFgnEyGoUQL8E6t1FvbfwzwwCrlQDufw5AP6PFgAfVWWh0JWGIsNTQo0dAPhFARCwixbDZBKGoYaSCZytwAEpgEEGAPgIRFRPCIYdOoUgDiGFOKkdIYhg4PnUP2dIqQ0S1yUAsNhf4bayi3tgDOAAZPAYBu6oEPH-QGfVUSCnqLYMQ1CiiBXDMiAi2o1CKPHE3ScLcNH3C0RnKmMBHjYG4uTcg3chF2SGtscEBoCKP0UCIhMxgyg3jrrE5Ei81GSHigAdxYuBCWnF4KYB4nxKmlB-B4AAGaoAIBAbgYB2i4C3KgD4kgYDsEEOxSWXFMCCAqagUJiQ0jZDyhoReJpahPVqHJJ85hNguX2MoWwlV0lZJyeLDiUtCmUwEmU3AlSCAvGeJBSQTAybsEqc8VcLS-DtLyRsnpuy+kmJVtlQZII7TIlTMRFyPM5Lgn7NkQco46g4UMMs7JHBty7mwPuTZxTtm9OqbU+pjTmmtMEI7aFB57mVP6YgfY-YDi2hMGicR+QvJKDZGIOQdhSiBTBasjFMKinmVKQig5RyTkkDOZBS5aLGVYt6bihA+K2T6jEPPI2Xk9gRkfqoNIcj2T0ohR1NKOy9k1NwHUvAKK6lopIAAI1gIIPg2LHn-X7nnYV0TZjDVfBfLYpVhoRgyE+Reshhq1CVQEFVqU1VVPZc8Y5pzzm8uuQao1JrBVPIOmEgiMwcjgiUK2fUWhSqLGkFsR+BFshRmfm4n8NEVnKuSv4TqfrEWauRU03VYbDWCD0KaoV8yM3yAqLYKBxE4SHDRHlbmyktiHGCvmlaCci3epLWWtlzxDmBs5dyi5Vy2nhvrY26NtM8VxosDhMeDl+Suq7W5CwCz5jV0JY3eq7itJju2vgLo5aNVaoadWxdggdpdFXea-+wZ9ig0sAcPIrYA7XQNE5Qdf6KhhgRF6m9u0DFTpnUGrlIaX1vu4VGz9pjv0EThtkfqVg1Dz2uojCM-6shyHPmiaDu9fr3qRdq59aLqNfA-QGTDLyCIghyPJcBew7ww1yoOWlKhEZWCoxuPeXxy0BsQ-O0NbSmMsZrGx2N6bjAmC2Isa8E0igOWlSelE-l7oGmg-jZ4hNiak3JsykpcGHkVsfTql9pnzPQss88QQWyLKKesjGgZasKpKGsMNBy1RoYPjmSCMejZ5iAYA7HdGVtR3goCM5jcFmyYUzhRZKT06OXBp5U5gmaXXMZY81lyg3nla+bxf58UgWRnaijmFnTAVpDChGY-E4cX0l6M1YYzApY+gVjiE2vU5gnx6hFJkdMJVws8wjHVk01hMLVB6-o-rRJvGZx2mBAJhSgkhLXQPPFCJyqjTMKOdQ3M2YPh5vGkGjgsiuIvQW1avWDFZyMZIQsuAOAEFGxIaQ3aITpn8pfB8JL0Il0uhzfUjhQXDvjjOd7-Xvu-fYP96krHnlhJctsE4NhFDKT9ioOE8MnKNgcHUbkpo1t9c+5gSQuAeUHkG+WEII2juWuW-j1suxhTQ7DGTmEGbSULL-XaPNL2R3I-WwzyQAA5bOAAFVAeB2CwAIPFCAEBAjwWMv4Fg6um3zHKjCMabYXKDg0HyBZvsI5ZEUKddJP2-tCoSfYzYWQVDnxNDbmhYI8pKIcoC3TCPpdI7zK7jHVIMM44bFhNkMIYQjNkKORsCZjiJM2OkBYunThYkR4lmcAAVHb-jAnPGCVnNn-ROdx+q8K4a5gFlKFNEt44menxsjcnqSwxEMxF9emX-Au3K-V6qXcLbKOGcm+RL7TImxxSDm04gNs4ZeZpBItbyjQ+tKKiJtnfixlfwAHlcD2arc0+K3gS+CAPzUwQx-2Bn8Vg39dIYoQVQWhiem+o4RGyzALRhguRkJPhqL+DM7+DlIkCUA9DDY8RgAwGkwpZkyapCqCCFQnTE4YiIzEQERXQQ46htjcjRZHAVCowR5tBkDYCrhcqtDdyG5oHdAPpX51I0F0FPCCBZyCAwGUBCoVCXiL4ArAKwhEERJWDMLfJRjqAvQcH0H4CMGcqaq17DaDBNqBQkbUqtgYQQIPgzwRh1DDRqb8g1ByG-acEMFZz+C8LFIMFki+iX70bNLyFcE8EOG5gCGPykKcgnDahpAIhwhPiRZ5AQiLx2ANaaB04faoBfZK7+Cq7q6a6kAWTGLv7HbCpja9piCHA5CIwmBwinDqziKKATbupVAuDnDM4YDwBRBxxQDY6N6CAg7SByCxIYSaA2JCDiQQjTI8x6gORIyIJD4EhgCNEf7MgkKVQ8zgjETXjmgpjlBTTnaSGWBS4WyXoFjjEZHcgMxe7Eq+5thdr9gLKVCHBRaOD8jpLCzbGWoHAnC6iLwphjyhZ1DxLJAHBjypDVAXi-HQYdL5KmTla2aVK3F9RhgMwZClzCg1CpC-LJDAhQjzBWLh4bGvZJYMpQpMqeasoPJglnhyIyrp4iLN6GBeTKRbpPgcwxYYjQY+p+r4mHQlxSBqCOIF52CjiEE6ZFR5SVSYRzSdh0kToMlKbx5GAlz9ihF5G9Gr7FCDggjVwUGthyLrH1GvTXqoYik+Yf4ijijoRQgJpVB5CnDXRqBsjyoVCqBzBb5iY-SSa9KMlewlw3zqaPwpgF7zAwwCiXTiKXFDFXF76FrJaG5FZEwlZWY4kgmoCOkNibAb7cjKS3jtglByS2izC+mtijSVCF5UGvQz6xGYAxl4r2AWC1SbA2DqBLAAGLGnB3Y1AlC7ColqlaT5lfbR5FnCqjRlCZAlDllVAQl8gfHzDpCp4p4LLRGo7M4XIHgdlijxqjzHDOKyCylZBlDtjiKlAuSmETny7xGJEEKznzCIinCyCNgZDQg3a2IIhsh-IUTuqKDnpoky5R7o4dnkQt7azMzghmAZ40IihJgigpjGjpgOiBmrQj5+KcDj7dyzmAG8yGguSVBcm9h5CPFhg8hZC-7DG5n76H567kwv4Fjn5vkLDxp6gLCEqSEAFbDoSXYqAxa3zYVPmR6QHZx8FjGilNF7BhzpDiKqB1CXTDR8g6hPj2D9paB+zmG0EKFQBKHMEkVSA8zi42DyD4aXmIDDThgmDqBzAzxTSUHMXUEWEyWMG2FMT2FbGcU6mOC6gIiYRjzcg0pdpzCCj2AQhRiBQXiLQuBAA */ + /** @xstate-layout N4IgpgJg5mDOIC5QFkD2EwBsCWA7KAxAMICGuAxlgNoAMAuoqAA6qzYAu2qujIAHogC0AdgCsAZgB04gEyjhADnEA2GgoUAWJQBoQAT0QBGGuICckmoZkbTM42YWKAvk91oMOfAQDKYdgAJYLDByTm5aBiQQFjYwniiBBFtpGhlxDRphGg1ZURlhXQMEcRLDSVF5UwV84XEK8Rc3dCw8KElsCEwwHz9A4NCuXAjeGI5B3kTBLWFJDWV5hVSZZTrlBUKjS1FZiUrDeWVDasaQdxb8ds7ugFFcdjAAJ0CAaz9yAAthqNG4iaF07bCNLiRYlGiZUyZDbFYQzfIaLSQ5Sw0TGZQnM6eNodLoEW73J6wV7sD5UQyRZisMbcP4IQRrGiSdRmfIqUxrCrQlbKcoQ4RHDTWUx5DHNLGXXHXPjsB4AVwwX0psXGCSEohWO3Uh2UOSsmmhhn2jPyNGUolMhjWwvZoo8rUk3mJH2IZEomEdb0+9BGVN+qoQhoUPOMwgRi1BplkBqOZUDCkN4ksClEClt5zaHpJ7wdTveAEkrj0AkEugNwt7vr6VaBEoZQ2UKsIOcmrPMDRCLIKaOa6oKU6I0+LMx8c56C7jkCRXn0oABbMB3fwAN0enHIJEwiuiVZp-qsFskRxkmibmlSBX0Rg0hikifBcgk+SUGkH9uH2ff4+6k+nQTnC4Cd5UAebAAC9uHYDctx+at+CMeFJFUINu0NfJkRkA1xENcoNHkSwVmMCoZFfC531HLMv2IbhYBlEg8H8ICQPAu4N38CBsBo10wGgnd4hreDRA0Ts0hoKp0gtdRoTSdkLAqURwVwi0bxIjNc3Ij5KKIajaPolcHjXVj2M4ihuIrJVqT4uCA2WBRJGFY9UR1YxNAwy8EBkVlymsAVYSBM0X1cU4xTfNTP0LLTcBoh46NwfwAEEACFvH8AANHjlV3fjrOTWZxDEQwbCwmRbHEKThSE4VkUWVJzVqBpAsxELPXU-Nwu06L6MS5KAE10os2k9W2aw7GUOR9jNUboUTdRJCBOTLTUUMAqaO1SNC3NNPamL-DIKAuj6v0spvHJpCUapk0UOtTCk+S4X7Xz1WEUxTGEFSWpazbIp02KunwdgvQpbcMss2sShmFR1VEm80n2KTDlsptTGvJ6wxUV6GuCtbmrC3EIqi7amEeQncHY8hZUwEgniMyCTIO2Daw82ybEjKwMiOVRlCk+MhP5KoXqBBENDEN6yJx7o8e+hjgLAiCN0wPQdpwKAhjMoH+r3ZYZCZFMtAkXCMhWA1HMkYqddhfJ1RKEX1rHNqvo62K9IMzB5cV7BlbpzKrKsJ7cuPJ7HLMVEDVG7YUxeqo1mKxx6pW9N3rFqj7e22BcBIJh-HYVBUs9kGjCwqRlhBNQXuqMwpOyLWPPVeZVBTIFiIx1bVOxja7fx+jU-TzPs961WYK90GbwsJssNhPLjA0KSCpmQTHDkC1Qx1WOgubhO29xrb6LAABHWVWN+qB-tzgbiqkVEhaerI8gkC8ijrRNcpMcFuwm0xrdb23N+T+imEpuXqD914gNWQMwlgER7MjKeblDCRjAaUQ4z1MhqAHE3eOosN7iy3rFB4YBZyoBXP4cg2D2CwBPhrLQiFWbqmPNeFMpUYFKDKPhWw2QwRBkbnHIcNsKKFgAEpgEEGAPgIRZT3HIUdOoUgbywMTGkIWFRDDQnUFrdIqRkS1yUIcD+WYPqFmuHvbAGcAAyeAwA91QJuIBwMBoKBkhIFQzM9aSTckoMOmRhpyDmKiQwOiRyJwMbKIxmddoAWwKxSm5Ae4SKsiNWyIJLaWnkG4hh99jBlFPHXRQ6Q5jLVXugtScUADudFALS2YpBTAbEOI00oP4PAAAzVABAIDcDAO0XAS5UCvEkDAdgghGIyxYpgQQjTUAxMSCJISCIdSiVqM9ceUlrzmGTMeGGyhbCPT8dmYppSpZMVllU6mXF6m4CaQQR4DxgKSCYBTdgTSHizl6X4AZ5TDmjLOeM6x6ssoiW2IaBECZcLHhelJEEWtsimnBHUNCvi0HcOarsjgy5VzYHXEcmpJyxktLaR0rpPS+mCCdmijcHymkTMQDDLWN5LomGRLA-IUljxSEcDfOwpQgTbMkEigIxL0XVOMnU7Flzrm3JIPc4CTzCV8tJWMil7kipMm7GIReOsmWCkPBNVIIJzpKC5Ty+KSVUqnPOa03A7S8D4vaYSkgAAjWAgg+Bkq+YDAeecFWWlmqNe8cg6jrDcsVUah4MjXmXprWo+qSnIq6sa4VDwrkPBuXch5UqXl2odU6uV3zDqxLHrlHVdRIRzzKp6v1ZosLZFDO-eFTVdEGpjd1E1zSzUWs6d061ab7WCD0M6+V6zpCNgqLYOBuEpqmhmDYOx8l6HdjyY1LGdao0BAbU2i58bRXJslc8-p6bu29uzfTSlebzwrD8isUNU1LRCVNOyUaY08qcPyQixdezdpdFXS2vF7bt2CDfYIrNrrgH+hhuDSwN4b7PWDgGioPJIzdjAxUIMsJI2vvwO+uNCak3ipTT+v9+7AM2OA1hBG2Q9RWBLnWG6dZDzgayHIbsyx0ZcNrSOA1h9-oftxZa79hL2PvHwz6QjvysLbByNJKBMhzxwxyqaDlKg6xWBQ8ivjq6RWJrFRKx5P6+MCcrEJ3NnrjAmBTJaE8rkijLA1fMawdiFEonRDWhdrGl3+EJg8YmpNyaUwFbU8x2LP3cYJS8tzHm0VeYeIIY5JldPmRzZMzWdl6HWDvVHUQXM5DSH5HMM0kHfVKYCCFhcnmKZU0xSZVT671Obq04SwrJMwslci2VygMW1ZxcpQl4UShkseVS1JXymWCrzHNPZCQXLTHmosZgIsfRSxxD7ZJ8w15JNHEyEcPIqTKUvUPF10SNmkKPvnS3XRE3zFZ0sXiQxGcaYwDuOEqpkTokHsHpS2EQl9hmHBOoPmnM3L83zYoWEokHPMac9mU7U3JB5lwBwAgC2VBMgSatpGC8uTxhNiCSMkI8pPTSONsxkPoew7JARn5sT8ha3kseK95GNnQlhEtlYEhNkbPBKg0Hx2RwQ-O5gSQuBJUbhmyWEI83nvuusLUaQx54wcIyDXLkQtZrXgUdza8WF8eTZ55IAActnAACqgPApCCBxQgBAQIkF9KucN3cPt8wKqv3NIKRYOouQbNyhHLIigzoa7O6gSxOv9c2+N6QEyVjSftYDJocwJg0jVFErrFxRQshlBsIg0ox4VhcqJ+wOHYuBr4VmBdOlDGE8GmBLMDRywoWWbhRz96Oe4fkkE2T2sKEmSQkhHMWQ4ICrl4PIoPWhxLORhB0+lj2YAAqoS7sRIeFErOQv+ii4j4e9yo1zAbKUMKRMthirl+vEyK9knLC4RTFy6f+Awlz4X80wJwTuf+-Dy3yPlnpmJkH8KU05nEBIx5ObNIPCU0OYJjcfMHSQWUEmbOTifSd8AAeVwBxXNS-R6Tim8En0EEgNaUEBgPYHgJVlXxewDFkCkDmBMFwlEkyEWDvkQHNFshbEQxpScW2X8H538AaRIEoB6DmzYjAA4PJgKwpnNXlUEAKnMASWM0NFDAkFgS5AyyRnZCG0sAfFAKO0kDIGwFnHFVaB7lcyEO6ACzbR6Q0K0PuEECzkEA4MoHlUUUPGoMWAyCWChDclGniSsDBBBVDHUDehMO0PwF0LFXNSXzm0GD7SBBozkAXiQlDGhDnkPFWDsHBBWBqB8Jh1MJ0Kzn8GERqR0KJE9CQNbStXULSPFUEQsLyKzBsLNCoVZGeg8jSFhGhDoQHWPGALsDmFoRcECn5wwHgCiCOxfzX0EEWDKFyGySQk0B0DckEEEiVSgX2DyFGktDehxDAEGKIPpEoUehehBFwhPGUXRwkDUA+3cMsGrXr3fHWPdXZCZmLxUFLyRimi1g2UqEDmcnZzAM5w-EwSuJAWehNh1HjDymqF2GjGSBvDylSGqAtBhPy32SGUqR8yxU+V+L3CDCZgyFLn5BqFSDBWSABDvHmFsH5DhJlQxUFT8xRL01byMBUU1V7ykQ3yUQDXowsG8m5mG1RDhJjRSibVRKOjsSkDUCKlH0SNEjKiwh2CqlUAWhTEO0xi+O5RcxXTGX5O9jsUp1oWI0rjHWqOrkHSqGhLhL-T5OpMjyOGFEQjvByAcDyEjBujUCZDjxg0yFGjqDhJU1VLNLXwtMZAyFWBM1HzbADW5FmhhMcGRCRktjhLq2K28yiyFSpNix9OTH-3ZHkjPDTxKH63R15mTAtEbBtEc0VMf0sTVMmXsBHhKGTEnXRNiNUBNmVxWBl1wmRF90Jxh3YHLMpX2GYTqhrMNLWC5HBPmByRWC7w2XbK1350eQ3G7PchsAnXHmKjUFjx-wQBT1mEUMjCKiDFkCnKf0D38ANyNz6OTKIOsAkBNiYS0HsDSENjcibCrnjATCOCbFvOz07PnMIk331msBMG3z7xgRjBo3UATCTHP2LPekv1u04Bvx7nnLkE0Fmj8hUAciemuhgQYwBKDA5GvisA+LULIiwOgMtzwNzAQO-KtHKF7FTL9VkEwqKEEh5DmAZTPyqnVBYLYKsLWO9I2L7BouWVUDqCekmhcIy2vHsGnS0FkFTCgt8M4H8MyMCN4vPPdUtCkBelZxsHkFpzkJ5AAojLnmmlUIVOKM0L8KgF0OyJolyNzG-McBNlhGQjynZHZSmibF5HsGoKFmKgKi6KcCAA */ id: 'Modeling', tsTypes: {} as import('./modelingMachine.typegen').Typegen0, @@ -153,7 +158,7 @@ export const modelingMachine = createMachine( 'Enter sketch': [ { target: 'animating to existing sketch', - cond: 'Selection is one face', + cond: 'Selection is on face', actions: ['set sketch metadata'], }, 'Sketch no face', @@ -166,6 +171,8 @@ export const modelingMachine = createMachine( internal: true, }, }, + + entry: 'reset client scene mouse handlers', }, Sketch: { @@ -378,10 +385,7 @@ export const modelingMachine = createMachine( }, 'Line tool': { - exit: [ - // 'tear down client sketch', - // 'setup client side sketch segments', - ], + exit: [], on: { 'Set selection': { @@ -605,7 +609,10 @@ export const modelingMachine = createMachine( if (!sketchPathToNode) return {} return getSketchMetadataFromPathToNode(sketchPathToNode) }), - 'hide default planes': () => sceneInfra.removeDefaultPlanes(), + 'hide default planes': () => { + sceneInfra.removeDefaultPlanes() + kclManager.hidePlanes() + }, 'reset sketch metadata': assign({ sketchPathToNode: null, sketchEnginePathId: '', @@ -783,6 +790,7 @@ export const modelingMachine = createMachine( 'show default planes': () => { sceneInfra.showDefaultPlanes() sceneEntitiesManager.setupDefaultPlaneHover() + kclManager.showPlanes() }, 'setup noPoints onClick listener': ({ sketchPathToNode }) => { sceneEntitiesManager.createIntersectionPlane() @@ -799,6 +807,7 @@ export const modelingMachine = createMachine( sceneInfra.setCallbacks({ onClick: async (args) => { if (!args) return + if (args.event.which !== 1) return const { intersection2d } = args if (!intersection2d || !sketchPathToNode) return const { modifiedAst } = addStartProfileAt( @@ -814,6 +823,11 @@ export const modelingMachine = createMachine( }, 'add axis n grid': ({ sketchPathToNode }) => sceneEntitiesManager.createSketchAxis(sketchPathToNode || []), + 'reset client scene mouse handlers': () => { + // when not in sketch mode we don't need any mouse listeners + // (note the orbit controls are always active though) + sceneInfra.resetMouseListeners() + }, }, // end actions } diff --git a/src/machines/settingsMachine.ts b/src/machines/settingsMachine.ts index 08649aadc..036377d8f 100644 --- a/src/machines/settingsMachine.ts +++ b/src/machines/settingsMachine.ts @@ -3,6 +3,10 @@ import { Themes, getSystemTheme, setThemeClass } from '../lib/theme' import { CameraSystem } from 'lib/cameraControls' import { Models } from '@kittycad/lib' +const kclManagerPromise = import('lang/KclSingleton').then( + (module) => module.kclManager +) + export const DEFAULT_PROJECT_NAME = 'project-$nnn' export enum UnitSystem { @@ -29,7 +33,7 @@ export const settingsMachine = createMachine( id: 'Settings', predictableActionArguments: true, context: { - baseUnit: 'in' as BaseUnit, + baseUnit: 'mm' as BaseUnit, cameraControls: 'KittyCAD' as CameraSystem, defaultDirectory: '', defaultProjectName: DEFAULT_PROJECT_NAME, @@ -37,7 +41,7 @@ export const settingsMachine = createMachine( showDebugPanel: false, textWrapping: 'On' as Toggle, theme: Themes.System, - unitSystem: UnitSystem.Imperial, + unitSystem: UnitSystem.Metric, }, initial: 'idle', states: { @@ -47,13 +51,13 @@ export const settingsMachine = createMachine( 'Set Base Unit': { actions: [ assign({ - baseUnit: (_, event) => { - console.log('event', event) - return event.data.baseUnit - }, + baseUnit: (_, event) => event.data.baseUnit, }), 'persistSettings', 'toastSuccess', + async () => { + ;(await kclManagerPromise).executeAst() + }, ], target: 'idle', internal: true, @@ -134,6 +138,9 @@ export const settingsMachine = createMachine( }), 'persistSettings', 'toastSuccess', + async () => { + ;(await kclManagerPromise).executeAst() + }, ], target: 'idle', internal: true, diff --git a/src/routes/Home.tsx b/src/routes/Home.tsx index 85ee68c20..40494d79b 100644 --- a/src/routes/Home.tsx +++ b/src/routes/Home.tsx @@ -36,6 +36,7 @@ import { sep } from '@tauri-apps/api/path' import { homeCommandBarConfig } from 'lib/commandBarConfigs/homeCommandConfig' import { useHotkeys } from 'react-hotkeys-hook' import { isTauri } from 'lib/isTauri' +import { kclManager } from 'lang/KclSingleton' // This route only opens in the Tauri desktop context for now, // as defined in Router.tsx, so we can use the Tauri APIs and types. @@ -55,6 +56,7 @@ const Home = () => { // during the loading of the home page. This is wrapped // in a single-use effect to avoid a potential infinite loop. useEffect(() => { + kclManager.cancelAllExecutions() if (newDefaultDirectory) { sendToSettings({ type: 'Set Default Directory', diff --git a/src/setupTests.ts b/src/setupTests.ts index 3df2cf0aa..2c9bd3b0f 100644 --- a/src/setupTests.ts +++ b/src/setupTests.ts @@ -3,6 +3,11 @@ import { WebSocket } from 'ws' import { vi } from 'vitest' import 'vitest-webgl-canvas-mock' +import fetch from 'node-fetch' + +// @ts-ignore +globalThis.fetch = fetch + class MockRTCPeerConnection { createDataChannel() { return diff --git a/src/useStore.ts b/src/useStore.ts index 0508b80be..e3ed2d120 100644 --- a/src/useStore.ts +++ b/src/useStore.ts @@ -66,8 +66,10 @@ export interface StoreState { setMediaStream: (mediaStream: MediaStream) => void isStreamReady: boolean setIsStreamReady: (isStreamReady: boolean) => void - isLSPServerReady: boolean - setIsLSPServerReady: (isLSPServerReady: boolean) => void + isKclLspServerReady: boolean + isCopilotLspServerReady: boolean + setIsKclLspServerReady: (isKclLspServerReady: boolean) => void + setIsCopilotLspServerReady: (isCopilotLspServerReady: boolean) => void buttonDownInStream: number | undefined setButtonDownInStream: (buttonDownInStream: number | undefined) => void didDragInStream: boolean @@ -120,8 +122,12 @@ export const useStore = create()( setMediaStream: (mediaStream) => set({ mediaStream }), isStreamReady: false, setIsStreamReady: (isStreamReady) => set({ isStreamReady }), - isLSPServerReady: false, - setIsLSPServerReady: (isLSPServerReady) => set({ isLSPServerReady }), + isKclLspServerReady: false, + isCopilotLspServerReady: false, + setIsKclLspServerReady: (isKclLspServerReady) => + set({ isKclLspServerReady }), + setIsCopilotLspServerReady: (isCopilotLspServerReady) => + set({ isCopilotLspServerReady }), buttonDownInStream: undefined, setButtonDownInStream: (buttonDownInStream) => { set({ buttonDownInStream }) diff --git a/src/wasm-lib/Cargo.lock b/src/wasm-lib/Cargo.lock index 35a4457a2..af5c655f3 100644 --- a/src/wasm-lib/Cargo.lock +++ b/src/wasm-lib/Cargo.lock @@ -246,7 +246,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -257,7 +257,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -522,9 +522,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", @@ -532,7 +532,7 @@ dependencies = [ "num-traits 0.2.17", "serde", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] @@ -606,7 +606,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -856,7 +856,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -897,7 +897,7 @@ checksum = "377af281d8f23663862a7c84623bc5dcf7f8c44b13c7496a590bdc157f941a43" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", "synstructure 0.13.0", ] @@ -949,7 +949,23 @@ dependencies = [ "regex", "serde", "serde_tokenstream", - "syn 2.0.48", + "syn 2.0.49", +] + +[[package]] +name = "derive-docs" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "834580a8bd697658876ed8c9f7727e49f01d34f5b859ca921ac5b99ffc6adf77" +dependencies = [ + "convert_case", + "once_cell", + "proc-macro2", + "quote", + "regex", + "serde", + "serde_tokenstream", + "syn 2.0.49", ] [[package]] @@ -961,7 +977,7 @@ dependencies = [ "diesel_table_macro_syntax", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -970,7 +986,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" dependencies = [ - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -1020,7 +1036,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -1102,7 +1118,7 @@ checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -1319,7 +1335,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -1424,7 +1440,7 @@ dependencies = [ "inflections", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -1877,7 +1893,7 @@ dependencies = [ [[package]] name = "kcl-lib" -version = "0.1.40" +version = "0.1.42" dependencies = [ "anyhow", "approx 0.5.1", @@ -1888,7 +1904,7 @@ dependencies = [ "criterion", "dashmap", "databake", - "derive-docs", + "derive-docs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "expectorate", "futures", "gltf-json", @@ -1902,6 +1918,7 @@ dependencies = [ "parse-display 0.9.0", "pretty_assertions", "reqwest", + "ropey", "schemars", "serde", "serde_json", @@ -1926,14 +1943,14 @@ dependencies = [ "pretty_assertions", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] name = "kittycad" -version = "0.2.50" +version = "0.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "441d8af990a3aab738f985328aa914a9eee5856131c4c6f1fd2bd61ba9d07f98" +checksum = "13958174d876353f429ea8230dc92fe86f164819cea2e51bbf22e01a4c2a496e" dependencies = [ "anyhow", "async-trait", @@ -1969,7 +1986,7 @@ dependencies = [ [[package]] name = "kittycad-execution-plan" version = "0.1.0" -source = "git+https://github.com/KittyCAD/modeling-api?branch=main#632b75a0242400fa34373d7973b9149b0e08aa3f" +source = "git+https://github.com/KittyCAD/modeling-api?branch=main#08f05d91062380fe3a69f4baa1f1301532d31977" dependencies = [ "bytes", "insta", @@ -1993,7 +2010,7 @@ checksum = "71d31b689c944d00aadda2ef83d8422a6efff97e1be5654a61f9d95496f0c19e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -2003,7 +2020,7 @@ source = "git+https://github.com/KittyCAD/modeling-api?branch=main#632b75a024240 dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -2019,8 +2036,8 @@ dependencies = [ [[package]] name = "kittycad-modeling-cmds" -version = "0.1.17" -source = "git+https://github.com/KittyCAD/modeling-api?branch=main#632b75a0242400fa34373d7973b9149b0e08aa3f" +version = "0.1.18" +source = "git+https://github.com/KittyCAD/modeling-api?branch=main#08f05d91062380fe3a69f4baa1f1301532d31977" dependencies = [ "anyhow", "chrono", @@ -2047,7 +2064,7 @@ dependencies = [ [[package]] name = "kittycad-modeling-session" version = "0.1.0" -source = "git+https://github.com/KittyCAD/modeling-api?branch=main#632b75a0242400fa34373d7973b9149b0e08aa3f" +source = "git+https://github.com/KittyCAD/modeling-api?branch=main#08f05d91062380fe3a69f4baa1f1301532d31977" dependencies = [ "futures", "kittycad", @@ -2406,7 +2423,7 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openapitor" version = "0.0.9" -source = "git+https://github.com/KittyCAD/kittycad.rs?branch=main#88b05a638f594c0bf51faf6f4ab57d3327d4d845" +source = "git+https://github.com/KittyCAD/kittycad.rs?branch=main#8db292eaa7be0292512a2cdbef09f2d37af7c79c" dependencies = [ "Inflector", "anyhow", @@ -2479,7 +2496,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -2636,7 +2653,7 @@ dependencies = [ "regex", "regex-syntax 0.7.5", "structmeta 0.2.0", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -2650,7 +2667,7 @@ dependencies = [ "regex", "regex-syntax 0.8.2", "structmeta 0.3.0", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -2716,7 +2733,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -3130,10 +3147,12 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls 0.24.1", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "webpki-roots", "winreg", @@ -3257,6 +3276,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ropey" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93411e420bcd1a75ddd1dc3caf18c23155eda2c090631a85af21ba19e97093b5" +dependencies = [ + "smallvec", + "str_indices", +] + [[package]] name = "rtcp" version = "0.10.0" @@ -3572,7 +3601,7 @@ checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -3606,7 +3635,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -3627,7 +3656,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -3863,6 +3892,12 @@ dependencies = [ "der", ] +[[package]] +name = "str_indices" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9557cb6521e8d009c51a8666f09356f4b817ba9ba0981a305bd86aee47bd35c" + [[package]] name = "strsim" version = "0.11.0" @@ -3878,7 +3913,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive 0.2.0", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -3890,7 +3925,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive 0.3.0", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -3901,7 +3936,7 @@ checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -3912,7 +3947,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -3984,9 +4019,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" dependencies = [ "proc-macro2", "quote", @@ -4019,7 +4054,7 @@ checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", "unicode-xid", ] @@ -4149,7 +4184,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -4256,7 +4291,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -4419,7 +4454,7 @@ checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -4447,7 +4482,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -4531,7 +4566,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", "termcolor", ] @@ -4778,7 +4813,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", "wasm-bindgen-shared", ] @@ -4813,7 +4848,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5431,7 +5466,7 @@ checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -5451,7 +5486,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] diff --git a/src/wasm-lib/Cargo.toml b/src/wasm-lib/Cargo.toml index 2226c9554..b0727496b 100644 --- a/src/wasm-lib/Cargo.toml +++ b/src/wasm-lib/Cargo.toml @@ -58,7 +58,7 @@ members = [ ] [workspace.dependencies] -kittycad = { version = "0.2.50", default-features = false, features = ["js"] } +kittycad = { version = "0.2.54", default-features = false, features = ["js", "requests"] } kittycad-execution-plan = { git = "https://github.com/KittyCAD/modeling-api", branch = "main" } kittycad-execution-plan-traits = "0.1.10" kittycad-modeling-session = { git = "https://github.com/KittyCAD/modeling-api", branch = "main" } diff --git a/src/wasm-lib/derive-docs/Cargo.toml b/src/wasm-lib/derive-docs/Cargo.toml index 366fdf871..f872c3268 100644 --- a/src/wasm-lib/derive-docs/Cargo.toml +++ b/src/wasm-lib/derive-docs/Cargo.toml @@ -19,7 +19,7 @@ quote = "1" regex = "1.10" serde = { version = "1.0.193", features = ["derive"] } serde_tokenstream = "0.2" -syn = { version = "2.0.39", features = ["full"] } +syn = { version = "2.0.49", features = ["full"] } [dev-dependencies] expectorate = "1.1.0" diff --git a/src/wasm-lib/grackle/src/lib.rs b/src/wasm-lib/grackle/src/lib.rs index 85895c0eb..06726ed85 100644 --- a/src/wasm-lib/grackle/src/lib.rs +++ b/src/wasm-lib/grackle/src/lib.rs @@ -202,12 +202,8 @@ impl Planner { ast::types::BinaryOperator::Sub => ep::BinaryOperation::Sub, ast::types::BinaryOperator::Mul => ep::BinaryOperation::Mul, ast::types::BinaryOperator::Div => ep::BinaryOperation::Div, - ast::types::BinaryOperator::Mod => { - todo!("execution plan instruction set doesn't support Mod yet") - } - ast::types::BinaryOperator::Pow => { - todo!("execution plan instruction set doesn't support Pow yet") - } + ast::types::BinaryOperator::Mod => ep::BinaryOperation::Mod, + ast::types::BinaryOperator::Pow => ep::BinaryOperation::Pow, }, operand0: ep::Operand::Reference(l_binding), operand1: ep::Operand::Reference(r_binding), diff --git a/src/wasm-lib/grackle/src/tests.rs b/src/wasm-lib/grackle/src/tests.rs index 761088bf5..d56608aee 100644 --- a/src/wasm-lib/grackle/src/tests.rs +++ b/src/wasm-lib/grackle/src/tests.rs @@ -1145,3 +1145,54 @@ fn arrays_as_parameters() { } ) } + +#[test] +fn mod_and_pow() { + let program = " + let x = 2 + let y = x^3 + let z = y % 5 + "; + let (plan, _bindings) = must_plan(program); + let addr0 = Address::ZERO; + let addr1 = Address::ZERO.offset(1); + let addr2 = Address::ZERO.offset(2); + let addr3 = Address::ZERO.offset(3); + let addr4 = Address::ZERO.offset(4); + print!("{:?}", plan); + assert_eq!( + plan, + vec![ + Instruction::SetPrimitive { + address: addr0, + value: 2i64.into(), + }, + Instruction::SetPrimitive { + address: addr1, + value: 3i64.into(), + }, + // x ^ 3, where x = 2 + Instruction::BinaryArithmetic { + arithmetic: ep::BinaryArithmetic { + operation: ep::BinaryOperation::Pow, + operand0: ep::Operand::Reference(addr0), + operand1: ep::Operand::Reference(addr1), + }, + destination: Destination::Address(addr2), + }, + Instruction::SetPrimitive { + address: addr3, + value: 5i64.into(), + }, + // y % 5, where y is 2^3 + Instruction::BinaryArithmetic { + arithmetic: ep::BinaryArithmetic { + operation: ep::BinaryOperation::Mod, + operand0: ep::Operand::Reference(addr2), + operand1: ep::Operand::Reference(addr3), + }, + destination: Destination::Address(addr4), + } + ] + ); +} diff --git a/src/wasm-lib/kcl-macros/Cargo.toml b/src/wasm-lib/kcl-macros/Cargo.toml index 10c93e1da..2b5d9c33a 100644 --- a/src/wasm-lib/kcl-macros/Cargo.toml +++ b/src/wasm-lib/kcl-macros/Cargo.toml @@ -15,7 +15,7 @@ databake = "0.1.7" kcl-lib = { path = "../kcl" } proc-macro2 = "1" quote = "1" -syn = { version = "2.0.39", features = ["full"] } +syn = { version = "2.0.49", features = ["full"] } [dev-dependencies] pretty_assertions = "1.4.0" diff --git a/src/wasm-lib/kcl/Cargo.toml b/src/wasm-lib/kcl/Cargo.toml index b4455962c..4003216b9 100644 --- a/src/wasm-lib/kcl/Cargo.toml +++ b/src/wasm-lib/kcl/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kcl-lib" description = "KittyCAD Language implementation and tools" -version = "0.1.40" +version = "0.1.42" edition = "2021" license = "MIT" repository = "https://github.com/KittyCAD/modeling-app" @@ -17,14 +17,17 @@ async-trait = "0.1.77" clap = { version = "4.5.0", features = ["cargo", "derive", "env", "unicode"], optional = true } dashmap = "5.5.3" databake = { version = "0.1.7", features = ["derive"] } -#derive-docs = { version = "0.1.6" } -derive-docs = { path = "../derive-docs" } +derive-docs = { version = "0.1.6" } +#derive-docs = { path = "../derive-docs" } +futures = { version = "0.3.30" } gltf-json = "1.4.0" kittycad = { workspace = true } kittycad-execution-plan-macros = { workspace = true } kittycad-execution-plan-traits = { workspace = true } lazy_static = "1.4.0" parse-display = "0.9.0" +reqwest = { version = "0.11.24", default-features = false, features = ["stream", "rustls-tls"] } +ropey = "1.6.1" schemars = { version = "0.8.16", features = ["impl_json_schema", "url", "uuid1"] } serde = { version = "1.0.193", features = ["derive"] } serde_json = "1.0.108" @@ -43,8 +46,6 @@ web-sys = { version = "0.3.68", features = ["console"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] approx = "0.5" bson = { version = "2.9.0", features = ["uuid-1", "chrono"] } -futures = { version = "0.3.30" } -reqwest = { version = "0.11.24", default-features = false } tokio = { version = "1.36.0", features = ["full"] } tokio-tungstenite = { version = "0.21.0", features = ["rustls-tls-native-roots"] } tower-lsp = { version = "0.20.0", features = ["proposed"] } diff --git a/src/wasm-lib/kcl/src/ast/types.rs b/src/wasm-lib/kcl/src/ast/types.rs index d33bc711c..1b27fc9d3 100644 --- a/src/wasm-lib/kcl/src/ast/types.rs +++ b/src/wasm-lib/kcl/src/ast/types.rs @@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize}; use serde_json::{Map, Value as JValue}; use tower_lsp::lsp_types::{CompletionItem, CompletionItemKind, DocumentSymbol, Range as LspRange, SymbolKind}; -pub use self::{literal_value::LiteralValue, none::KclNone}; +pub use crate::ast::types::{literal_value::LiteralValue, none::KclNone}; use crate::{ docs::StdLibFn, errors::{KclError, KclErrorDetails}, diff --git a/src/wasm-lib/kcl/src/executor.rs b/src/wasm-lib/kcl/src/executor.rs index 36533c9ea..52c026601 100644 --- a/src/wasm-lib/kcl/src/executor.rs +++ b/src/wasm-lib/kcl/src/executor.rs @@ -13,7 +13,7 @@ use tower_lsp::lsp_types::{Position as LspPosition, Range as LspRange}; use crate::{ ast::types::{BodyItem, FunctionExpression, KclNone, Value}, - engine::EngineConnection, + engine::{EngineConnection, EngineManager}, errors::{KclError, KclErrorDetails}, fs::FileManager, std::{FunctionKind, StdLib}, @@ -418,6 +418,8 @@ pub struct SketchGroup { pub id: uuid::Uuid, /// The paths in the sketch group. pub value: Vec, + /// What the sketch is on (can be a plane or a face). + pub on: SketchSurface, /// The starting path. pub start: BasePath, /// The position of the sketch group. @@ -437,6 +439,42 @@ pub struct SketchGroup { pub meta: Vec, } +/// A sketch group type. +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)] +#[ts(export)] +#[serde(tag = "type", rename_all = "camelCase")] +pub enum SketchSurface { + Plane(Box), + Face(Box), +} + +impl SketchSurface { + pub fn id(&self) -> uuid::Uuid { + match self { + SketchSurface::Plane(plane) => plane.id, + SketchSurface::Face(face) => face.id, + } + } + pub fn x_axis(&self) -> Point3d { + match self { + SketchSurface::Plane(plane) => plane.x_axis.clone(), + SketchSurface::Face(face) => face.x_axis.clone(), + } + } + pub fn y_axis(&self) -> Point3d { + match self { + SketchSurface::Plane(plane) => plane.y_axis.clone(), + SketchSurface::Face(face) => face.y_axis.clone(), + } + } + pub fn z_axis(&self) -> Point3d { + match self { + SketchSurface::Plane(plane) => plane.z_axis.clone(), + SketchSurface::Face(face) => face.z_axis.clone(), + } + } +} + pub struct GetTangentialInfoFromPathsResult { pub center_or_tangent_point: [f64; 2], pub is_center: bool, @@ -912,27 +950,30 @@ pub struct ExecutorContext { pub engine: EngineConnection, pub fs: FileManager, pub stdlib: Arc, + pub units: kittycad::types::UnitLength, } impl ExecutorContext { /// Create a new default executor context. #[cfg(test)] - pub async fn new() -> Result { + pub async fn new(units: kittycad::types::UnitLength) -> Result { Ok(Self { engine: EngineConnection::new().await?, fs: FileManager::new(), stdlib: Arc::new(StdLib::new()), + units, }) } /// Create a new default executor context. #[cfg(not(test))] #[cfg(not(target_arch = "wasm32"))] - pub async fn new(ws: reqwest::Upgraded) -> Result { + pub async fn new(ws: reqwest::Upgraded, units: kittycad::types::UnitLength) -> Result { Ok(Self { engine: EngineConnection::new(ws).await?, fs: FileManager::new(), stdlib: Arc::new(StdLib::new()), + units, }) } } @@ -945,6 +986,17 @@ pub async fn execute( options: BodyType, ctx: &ExecutorContext, ) -> Result { + // Before we even start executing the program, set the units. + ctx.engine + .send_modeling_cmd( + uuid::Uuid::new_v4(), + SourceRange::default(), + kittycad::types::ModelingCmd::SetSceneUnits { + unit: ctx.units.clone(), + }, + ) + .await?; + let mut pipe_info = PipeInfo::default(); // Iterate over the body of the program. @@ -1231,7 +1283,7 @@ mod tests { let parser = crate::parser::Parser::new(tokens); let program = parser.ast()?; let mut mem: ProgramMemory = Default::default(); - let ctx = ExecutorContext::new().await?; + let ctx = ExecutorContext::new(kittycad::types::UnitLength::Mm).await?; let memory = execute(program, &mut mem, BodyType::Root, &ctx).await?; Ok(memory) diff --git a/src/wasm-lib/kcl/src/fs/local.rs b/src/wasm-lib/kcl/src/fs/local.rs index f563859a3..7bfb53f89 100644 --- a/src/wasm-lib/kcl/src/fs/local.rs +++ b/src/wasm-lib/kcl/src/fs/local.rs @@ -53,4 +53,38 @@ impl FileSystem for FileManager { } }) } + + async fn get_all_files>( + &self, + path: P, + source_range: crate::executor::SourceRange, + ) -> Result, crate::errors::KclError> { + let mut files = vec![]; + let mut stack = vec![path.as_ref().to_path_buf()]; + + while let Some(path) = stack.pop() { + if !path.is_dir() { + continue; + } + + let mut read_dir = tokio::fs::read_dir(&path).await.map_err(|e| { + KclError::Engine(KclErrorDetails { + message: format!("Failed to read directory `{}`: {}", path.display(), e), + source_ranges: vec![source_range], + }) + })?; + + while let Ok(Some(entry)) = read_dir.next_entry().await { + let path = entry.path(); + if path.is_dir() { + // Iterate over the directory. + stack.push(path); + } else { + files.push(path); + } + } + } + + Ok(files) + } } diff --git a/src/wasm-lib/kcl/src/fs/mod.rs b/src/wasm-lib/kcl/src/fs/mod.rs index b321bb523..5cdb9e740 100644 --- a/src/wasm-lib/kcl/src/fs/mod.rs +++ b/src/wasm-lib/kcl/src/fs/mod.rs @@ -28,4 +28,11 @@ pub trait FileSystem: Clone { path: P, source_range: crate::executor::SourceRange, ) -> Result; + + /// Get all the files in a directory recursively. + async fn get_all_files>( + &self, + path: P, + source_range: crate::executor::SourceRange, + ) -> Result, crate::errors::KclError>; } diff --git a/src/wasm-lib/kcl/src/fs/wasm.rs b/src/wasm-lib/kcl/src/fs/wasm.rs index 9ad6ec866..16e872d31 100644 --- a/src/wasm-lib/kcl/src/fs/wasm.rs +++ b/src/wasm-lib/kcl/src/fs/wasm.rs @@ -18,6 +18,9 @@ extern "C" { #[wasm_bindgen(method, js_name = exists, catch)] fn exists(this: &FileSystemManager, path: String) -> Result; + + #[wasm_bindgen(method, js_name = getAllFiles, catch)] + fn get_all_files(this: &FileSystemManager, path: String) -> Result; } #[derive(Debug, Clone)] @@ -31,6 +34,9 @@ impl FileManager { } } +unsafe impl Send for FileManager {} +unsafe impl Sync for FileManager {} + #[async_trait::async_trait(?Send)] impl FileSystem for FileManager { async fn read>( @@ -112,4 +118,53 @@ impl FileSystem for FileManager { Ok(it_exists) } + + async fn get_all_files>( + &self, + path: P, + source_range: crate::executor::SourceRange, + ) -> Result, crate::errors::KclError> { + let promise = self + .manager + .get_all_files( + path.as_ref() + .to_str() + .ok_or_else(|| { + KclError::Engine(KclErrorDetails { + message: "Failed to convert path to string".to_string(), + source_ranges: vec![source_range], + }) + })? + .to_string(), + ) + .map_err(|e| { + KclError::Engine(KclErrorDetails { + message: e.to_string().into(), + source_ranges: vec![source_range], + }) + })?; + + let value = wasm_bindgen_futures::JsFuture::from(promise).await.map_err(|e| { + KclError::Engine(KclErrorDetails { + message: format!("Failed to wait for promise from javascript: {:?}", e), + source_ranges: vec![source_range], + }) + })?; + + let s = value.as_string().ok_or_else(|| { + KclError::Engine(KclErrorDetails { + message: format!("Failed to get string from response from javascript: `{:?}`", value), + source_ranges: vec![source_range], + }) + })?; + + let files: Vec = serde_json::from_str(&s).map_err(|e| { + KclError::Engine(KclErrorDetails { + message: format!("Failed to parse json from javascript: `{}` `{:?}`", s, e), + source_ranges: vec![source_range], + }) + })?; + + Ok(files.into_iter().map(|s| std::path::PathBuf::from(s)).collect()) + } } diff --git a/src/wasm-lib/kcl/src/lib.rs b/src/wasm-lib/kcl/src/lib.rs index a1101ebf2..92ff9bb1f 100644 --- a/src/wasm-lib/kcl/src/lib.rs +++ b/src/wasm-lib/kcl/src/lib.rs @@ -10,7 +10,7 @@ pub mod engine; pub mod errors; pub mod executor; pub mod fs; +pub mod lsp; pub mod parser; -pub mod server; pub mod std; pub mod token; diff --git a/src/wasm-lib/kcl/src/lsp/backend.rs b/src/wasm-lib/kcl/src/lsp/backend.rs new file mode 100644 index 000000000..78d104b0f --- /dev/null +++ b/src/wasm-lib/kcl/src/lsp/backend.rs @@ -0,0 +1,121 @@ +//! A shared backend trait for lsp servers memory and behavior. + +use dashmap::DashMap; +use tower_lsp::lsp_types::{ + CreateFilesParams, DeleteFilesParams, DidChangeConfigurationParams, DidChangeTextDocumentParams, + DidChangeWatchedFilesParams, DidChangeWorkspaceFoldersParams, DidCloseTextDocumentParams, + DidOpenTextDocumentParams, DidSaveTextDocumentParams, InitializedParams, MessageType, RenameFilesParams, + TextDocumentItem, +}; + +/// A trait for the backend of the language server. +#[async_trait::async_trait] +pub trait Backend { + fn client(&self) -> tower_lsp::Client; + + fn fs(&self) -> crate::fs::FileManager; + + /// Get the current code map. + fn current_code_map(&self) -> DashMap; + + /// Insert a new code map. + fn insert_current_code_map(&self, uri: String, text: String); + + /// On change event. + async fn on_change(&self, params: TextDocumentItem); + + async fn update_memory(&self, params: TextDocumentItem) { + // Lets update the tokens. + self.insert_current_code_map(params.uri.to_string(), params.text.clone()); + } + + async fn do_initialized(&self, params: InitializedParams) { + self.client() + .log_message(MessageType::INFO, format!("initialized: {:?}", params)) + .await; + } + + async fn do_shutdown(&self) -> tower_lsp::jsonrpc::Result<()> { + self.client() + .log_message(MessageType::INFO, "shutdown".to_string()) + .await; + Ok(()) + } + + async fn do_did_change_workspace_folders(&self, params: DidChangeWorkspaceFoldersParams) { + self.client() + .log_message(MessageType::INFO, format!("workspace folders changed: {:?}", params)) + .await; + } + + async fn do_did_change_configuration(&self, params: DidChangeConfigurationParams) { + self.client() + .log_message(MessageType::INFO, format!("configuration changed: {:?}", params)) + .await; + } + + async fn do_did_change_watched_files(&self, params: DidChangeWatchedFilesParams) { + self.client() + .log_message(MessageType::INFO, format!("watched files changed: {:?}", params)) + .await; + } + + async fn do_did_create_files(&self, params: CreateFilesParams) { + self.client() + .log_message(MessageType::INFO, format!("files created: {:?}", params)) + .await; + } + + async fn do_did_rename_files(&self, params: RenameFilesParams) { + self.client() + .log_message(MessageType::INFO, format!("files renamed: {:?}", params)) + .await; + } + + async fn do_did_delete_files(&self, params: DeleteFilesParams) { + self.client() + .log_message(MessageType::INFO, format!("files deleted: {:?}", params)) + .await; + } + + async fn do_did_open(&self, params: DidOpenTextDocumentParams) { + let new_params = TextDocumentItem { + uri: params.text_document.uri, + text: params.text_document.text, + version: params.text_document.version, + language_id: params.text_document.language_id, + }; + self.update_memory(new_params.clone()).await; + self.on_change(new_params).await; + } + + async fn do_did_change(&self, mut params: DidChangeTextDocumentParams) { + let new_params = TextDocumentItem { + uri: params.text_document.uri, + text: std::mem::take(&mut params.content_changes[0].text), + version: params.text_document.version, + language_id: Default::default(), + }; + self.update_memory(new_params.clone()).await; + self.on_change(new_params).await; + } + + async fn do_did_save(&self, params: DidSaveTextDocumentParams) { + if let Some(text) = params.text { + let new_params = TextDocumentItem { + uri: params.text_document.uri, + text, + version: Default::default(), + language_id: Default::default(), + }; + self.update_memory(new_params.clone()).await; + self.on_change(new_params).await; + } + } + + async fn do_did_close(&self, params: DidCloseTextDocumentParams) { + self.client() + .log_message(MessageType::INFO, format!("document closed: {:?}", params)) + .await; + } +} diff --git a/src/wasm-lib/kcl/src/lsp/copilot/cache.rs b/src/wasm-lib/kcl/src/lsp/copilot/cache.rs new file mode 100644 index 000000000..ad7fce8dd --- /dev/null +++ b/src/wasm-lib/kcl/src/lsp/copilot/cache.rs @@ -0,0 +1,111 @@ +//! The cache. + +use std::{ + collections::HashMap, + fmt::Debug, + sync::{Mutex, RwLock}, +}; + +use crate::lsp::copilot::types::CopilotCompletionResponse; + +// if file changes, keep the cache. +// if line number is different for an existing file, clean. +#[derive(Debug)] +pub struct CopilotCache { + inner: RwLock>>, + last_line: RwLock>>, +} + +impl Default for CopilotCache { + fn default() -> Self { + Self::new() + } +} + +impl CopilotCache { + pub fn new() -> Self { + Self { + inner: RwLock::new(HashMap::new()), + last_line: RwLock::new(HashMap::new()), + } + } + + fn get_last_line(&self, uri: &String) -> Option { + let Ok(inner) = self.last_line.read() else { + return None; + }; + let last_line = inner.get(uri); + match last_line { + Some(last_line) => { + let Ok(last_line) = last_line.lock() else { + return None; + }; + Some(*last_line) + } + None => None, + } + } + + fn get_cached_response(&self, uri: &String, _lnum: u32) -> Option { + let Ok(inner) = self.inner.read() else { + return None; + }; + let cache = inner.get(uri); + match cache { + Some(completion_response) => { + let Ok(completion_response) = completion_response.lock() else { + return None; + }; + Some(completion_response.clone()) + } + None => None, + } + } + + fn set_file_cache(&self, uri: &str, completion_response: CopilotCompletionResponse) { + let Ok(mut inner) = self.inner.write() else { + return; + }; + inner.insert(uri.to_string(), Mutex::new(completion_response)); + } + + fn set_last_line(&self, uri: &str, last_line: u32) { + let Ok(mut inner) = self.last_line.write() else { + return; + }; + inner.insert(uri.to_string(), Mutex::new(last_line)); + } + + pub fn get_cached_result(&self, uri: &String, last_line: u32) -> Option { + let Some(cached_line) = self.get_last_line(uri) else { + return None; + }; + if last_line != cached_line { + return None; + }; + self.get_cached_response(uri, last_line) + } + + pub fn set_cached_result( + &self, + uri: &String, + lnum: &u32, + completion_response: &CopilotCompletionResponse, + ) -> Option { + self.set_file_cache(uri, completion_response.clone()); + self.set_last_line(uri, *lnum); + let Ok(inner) = self.inner.write() else { + return None; + }; + let cache = inner.get(uri); + match cache { + Some(completion_response) => { + let Ok(completion_response) = completion_response.lock() else { + return None; + }; + Some(completion_response.clone()) + } + None => None, + } + } +} diff --git a/src/wasm-lib/kcl/src/lsp/copilot/mod.rs b/src/wasm-lib/kcl/src/lsp/copilot/mod.rs new file mode 100644 index 000000000..62d836e7c --- /dev/null +++ b/src/wasm-lib/kcl/src/lsp/copilot/mod.rs @@ -0,0 +1,265 @@ +//! The copilot lsp server for ghost text. + +pub mod cache; +pub mod types; + +use std::{ + borrow::Cow, + fmt::Debug, + sync::{Arc, RwLock}, +}; + +use dashmap::DashMap; +use serde::{Deserialize, Serialize}; +use tower_lsp::{ + jsonrpc::{Error, Result}, + lsp_types::{ + CreateFilesParams, DeleteFilesParams, DidChangeConfigurationParams, DidChangeTextDocumentParams, + DidChangeWatchedFilesParams, DidChangeWorkspaceFoldersParams, DidCloseTextDocumentParams, + DidOpenTextDocumentParams, DidSaveTextDocumentParams, InitializeParams, InitializeResult, InitializedParams, + MessageType, OneOf, RenameFilesParams, ServerCapabilities, TextDocumentItem, TextDocumentSyncCapability, + TextDocumentSyncKind, TextDocumentSyncOptions, WorkspaceFoldersServerCapabilities, WorkspaceServerCapabilities, + }, + LanguageServer, +}; + +use crate::lsp::{ + backend::Backend as _, + copilot::types::{CopilotCompletionResponse, CopilotEditorInfo, CopilotLspCompletionParams, DocParams}, +}; + +#[derive(Deserialize, Serialize, Debug)] +pub struct Success { + success: bool, +} +impl Success { + pub fn new(success: bool) -> Self { + Self { success } + } +} + +#[derive(Debug)] +pub struct Backend { + /// The client is used to send notifications and requests to the client. + pub client: tower_lsp::Client, + /// The file system client to use. + pub fs: crate::fs::FileManager, + /// Current code. + pub current_code_map: DashMap, + /// The token is used to authenticate requests to the API server. + pub token: String, + /// The editor info is used to store information about the editor. + pub editor_info: Arc>, + /// The cache is used to store the results of previous requests. + pub cache: cache::CopilotCache, +} + +// Implement the shared backend trait for the language server. +#[async_trait::async_trait] +impl crate::lsp::backend::Backend for Backend { + fn client(&self) -> tower_lsp::Client { + self.client.clone() + } + + fn fs(&self) -> crate::fs::FileManager { + self.fs.clone() + } + + fn current_code_map(&self) -> DashMap { + self.current_code_map.clone() + } + + fn insert_current_code_map(&self, uri: String, text: String) { + self.current_code_map.insert(uri, text); + } + + async fn on_change(&self, _params: TextDocumentItem) { + // We don't need to do anything here. + } +} + +impl Backend { + /// Get completions from the kittycad api. + pub async fn get_completions(&self, language: String, prompt: String, suffix: String) -> Result> { + let body = kittycad::types::KclCodeCompletionRequest { + prompt: Some(prompt.clone()), + suffix: Some(suffix.clone()), + max_tokens: Some(500), + temperature: Some(1.0), + top_p: Some(1.0), + // We only handle one completion at a time, for now so don't even waste the tokens. + n: Some(1), + stop: Some(["unset".to_string()].to_vec()), + nwo: None, + // We haven't implemented streaming yet. + stream: None, + extra: Some(kittycad::types::KclCodeCompletionParams { + language: Some(language.to_string()), + next_indent: None, + trim_by_indentation: Some(true), + prompt_tokens: Some(prompt.len() as u32), + suffix_tokens: Some(suffix.len() as u32), + }), + }; + + let kc_client = kittycad::Client::new(&self.token); + let resp = kc_client + .ai() + .create_kcl_code_completions(&body) + .await + .map_err(|err| Error { + code: tower_lsp::jsonrpc::ErrorCode::from(69), + data: None, + message: Cow::from(format!("Failed to get completions from zoo api: {}", err)), + })?; + Ok(resp.completions) + } + + pub async fn set_editor_info(&self, params: CopilotEditorInfo) -> Result { + self.client.log_message(MessageType::INFO, "setEditorInfo").await; + let copy = Arc::clone(&self.editor_info); + let mut lock = copy.write().map_err(|err| Error { + code: tower_lsp::jsonrpc::ErrorCode::from(69), + data: None, + message: Cow::from(format!("Failed lock: {}", err)), + })?; + *lock = params; + Ok(Success::new(true)) + } + + pub fn get_doc_params(&self, params: &CopilotLspCompletionParams) -> Result { + let pos = params.doc.position; + let uri = params.doc.uri.to_string(); + let rope = ropey::Rope::from_str(¶ms.doc.source); + let offset = crate::lsp::util::position_to_offset(pos, &rope).unwrap_or_default(); + + Ok(DocParams { + uri: uri.to_string(), + pos, + language: params.doc.language_id.to_string(), + prefix: crate::lsp::util::get_text_before(offset, &rope).unwrap_or_default(), + suffix: crate::lsp::util::get_text_after(offset, &rope).unwrap_or_default(), + line_before: crate::lsp::util::get_line_before(pos, &rope).unwrap_or_default(), + rope, + }) + } + + pub async fn get_completions_cycling( + &self, + params: CopilotLspCompletionParams, + ) -> Result { + let doc_params = self.get_doc_params(¶ms)?; + let cached_result = self.cache.get_cached_result(&doc_params.uri, doc_params.pos.line); + if let Some(cached_result) = cached_result { + return Ok(cached_result); + } + + let doc_params = self.get_doc_params(¶ms)?; + let line_before = doc_params.line_before.to_string(); + + // Let's not call it yet since it's not our model. + /*let completion_list = self + .get_completions(doc_params.language, doc_params.prefix, doc_params.suffix) + .await + .map_err(|err| Error { + code: tower_lsp::jsonrpc::ErrorCode::from(69), + data: None, + message: Cow::from(format!("Failed to get completions: {}", err)), + })?;*/ + let completion_list = vec![]; + + let response = CopilotCompletionResponse::from_str_vec(completion_list, line_before, doc_params.pos); + self.cache + .set_cached_result(&doc_params.uri, &doc_params.pos.line, &response); + + Ok(response) + } + + pub async fn accept_completions(&self, params: Vec) { + self.client + .log_message(MessageType::INFO, format!("Accepted completions: {:?}", params)) + .await; + + // TODO: send telemetry data back out that we accepted the completions + } + + pub async fn reject_completions(&self, params: Vec) { + self.client + .log_message(MessageType::INFO, format!("Rejected completions: {:?}", params)) + .await; + + // TODO: send telemetry data back out that we rejected the completions + } +} + +#[tower_lsp::async_trait] +impl LanguageServer for Backend { + async fn initialize(&self, _: InitializeParams) -> Result { + Ok(InitializeResult { + capabilities: ServerCapabilities { + text_document_sync: Some(TextDocumentSyncCapability::Options(TextDocumentSyncOptions { + open_close: Some(true), + change: Some(TextDocumentSyncKind::FULL), + ..Default::default() + })), + workspace: Some(WorkspaceServerCapabilities { + workspace_folders: Some(WorkspaceFoldersServerCapabilities { + supported: Some(true), + change_notifications: Some(OneOf::Left(true)), + }), + file_operations: None, + }), + ..ServerCapabilities::default() + }, + ..Default::default() + }) + } + + async fn initialized(&self, params: InitializedParams) { + self.do_initialized(params).await + } + + async fn shutdown(&self) -> tower_lsp::jsonrpc::Result<()> { + self.do_shutdown().await + } + + async fn did_change_workspace_folders(&self, params: DidChangeWorkspaceFoldersParams) { + self.do_did_change_workspace_folders(params).await + } + + async fn did_change_configuration(&self, params: DidChangeConfigurationParams) { + self.do_did_change_configuration(params).await + } + + async fn did_change_watched_files(&self, params: DidChangeWatchedFilesParams) { + self.do_did_change_watched_files(params).await + } + + async fn did_create_files(&self, params: CreateFilesParams) { + self.do_did_create_files(params).await + } + + async fn did_rename_files(&self, params: RenameFilesParams) { + self.do_did_rename_files(params).await + } + + async fn did_delete_files(&self, params: DeleteFilesParams) { + self.do_did_delete_files(params).await + } + + async fn did_open(&self, params: DidOpenTextDocumentParams) { + self.do_did_open(params).await + } + + async fn did_change(&self, params: DidChangeTextDocumentParams) { + self.do_did_change(params.clone()).await; + } + + async fn did_save(&self, params: DidSaveTextDocumentParams) { + self.do_did_save(params).await + } + + async fn did_close(&self, params: DidCloseTextDocumentParams) { + self.do_did_close(params).await + } +} diff --git a/src/wasm-lib/kcl/src/lsp/copilot/types.rs b/src/wasm-lib/kcl/src/lsp/copilot/types.rs new file mode 100644 index 000000000..f5752523c --- /dev/null +++ b/src/wasm-lib/kcl/src/lsp/copilot/types.rs @@ -0,0 +1,130 @@ +//! Types we need for communication with the server. + +use ropey::Rope; +use serde::{Deserialize, Serialize}; +use tower_lsp::lsp_types::{Position, Range}; + +#[derive(Debug, Serialize, Deserialize, Clone)] +#[serde(rename_all = "camelCase")] +pub struct CopilotCyclingCompletion { + pub display_text: String, // partial text + pub text: String, // fulltext + pub range: Range, // start char always 0 + pub position: Position, +} + +#[derive(Debug, Serialize, Deserialize)] +pub struct Choices { + pub text: String, + pub index: i16, + pub finish_reason: Option, + pub logprobs: Option, +} + +#[derive(Debug, Serialize, Deserialize, Clone)] +pub struct CopilotCompletionResponse { + pub completions: Vec, + pub cancellation_reason: Option, +} + +impl CopilotCompletionResponse { + pub fn from_str_vec(str_vec: Vec, line_before: String, pos: Position) -> Self { + let completions = str_vec + .iter() + .map(|x| CopilotCyclingCompletion::new(x.to_string(), line_before.to_string(), pos)) + .collect(); + Self { + completions, + cancellation_reason: None, + } + } +} + +impl CopilotCyclingCompletion { + pub fn new(text: String, line_before: String, position: Position) -> Self { + let display_text = text.clone(); + let text = format!("{}{}", line_before, text); + let end_char = text.find('\n').unwrap_or(text.len()) as u32; + Self { + display_text, // partial text + text, // fulltext + range: Range { + start: Position { + character: 0, + line: position.line, + }, + end: Position { + character: end_char, + line: position.line, + }, + }, // start char always 0 + position, + } + } +} + +#[derive(Debug, Serialize, Deserialize, Clone)] +#[serde(rename_all = "camelCase")] +struct LanguageEntry { + language_id: String, +} + +#[derive(Debug, Serialize, Deserialize, Clone)] +#[serde(rename_all = "camelCase")] +struct EditorConfiguration { + disabled_languages: Vec, + enable_auto_completions: bool, +} + +impl Default for EditorConfiguration { + fn default() -> Self { + Self { + disabled_languages: vec![], + enable_auto_completions: true, + } + } +} +#[derive(Debug, Default, Serialize, Deserialize, Clone)] +#[serde(rename_all = "camelCase")] +struct EditorInfo { + name: String, + version: String, +} + +#[derive(Debug, Default, Serialize, Deserialize, Clone)] +#[serde(rename_all = "camelCase")] +pub struct CopilotEditorInfo { + editor_configuration: EditorConfiguration, + editor_info: EditorInfo, + editor_plugin_info: EditorInfo, +} + +pub struct DocParams { + pub rope: Rope, + pub uri: String, + pub pos: Position, + pub language: String, + pub line_before: String, + pub prefix: String, + pub suffix: String, +} + +#[derive(Debug, Default, Serialize, Deserialize, Clone)] +#[serde(rename_all = "camelCase")] +pub struct CopilotLspCompletionParams { + pub doc: CopilotDocParams, +} + +#[derive(Debug, Default, Serialize, Deserialize, Clone)] +#[serde(rename_all = "camelCase")] +pub struct CopilotDocParams { + pub indent_size: u32, + pub insert_spaces: bool, + pub language_id: String, + pub path: String, + pub position: Position, + pub relative_path: String, + pub source: String, + pub tab_size: u32, + pub uri: String, +} diff --git a/src/wasm-lib/kcl/src/server/mod.rs b/src/wasm-lib/kcl/src/lsp/kcl/mod.rs similarity index 86% rename from src/wasm-lib/kcl/src/server/mod.rs rename to src/wasm-lib/kcl/src/lsp/kcl/mod.rs index 4011c7f51..c8e4e939b 100644 --- a/src/wasm-lib/kcl/src/server/mod.rs +++ b/src/wasm-lib/kcl/src/lsp/kcl/mod.rs @@ -6,9 +6,30 @@ use anyhow::Result; #[cfg(feature = "cli")] use clap::Parser; use dashmap::DashMap; -use tower_lsp::{jsonrpc::Result as RpcResult, lsp_types::*, Client, LanguageServer}; +use tower_lsp::{ + jsonrpc::Result as RpcResult, + lsp_types::{ + CompletionItem, CompletionItemKind, CompletionOptions, CompletionParams, CompletionResponse, CreateFilesParams, + DeleteFilesParams, DiagnosticOptions, DiagnosticServerCapabilities, DidChangeConfigurationParams, + DidChangeTextDocumentParams, DidChangeWatchedFilesParams, DidChangeWorkspaceFoldersParams, + DidCloseTextDocumentParams, DidOpenTextDocumentParams, DidSaveTextDocumentParams, DocumentDiagnosticParams, + DocumentDiagnosticReport, DocumentDiagnosticReportResult, DocumentFilter, DocumentFormattingParams, + DocumentSymbol, DocumentSymbolParams, DocumentSymbolResponse, Documentation, FullDocumentDiagnosticReport, + Hover, HoverContents, HoverParams, HoverProviderCapability, InitializeParams, InitializeResult, + InitializedParams, InlayHint, InlayHintParams, InsertTextFormat, MarkupContent, MarkupKind, MessageType, OneOf, + ParameterInformation, ParameterLabel, Position, RelatedFullDocumentDiagnosticReport, RenameFilesParams, + RenameParams, SemanticToken, SemanticTokenType, SemanticTokens, SemanticTokensFullOptions, + SemanticTokensLegend, SemanticTokensOptions, SemanticTokensParams, SemanticTokensRegistrationOptions, + SemanticTokensResult, SemanticTokensServerCapabilities, ServerCapabilities, SignatureHelp, + SignatureHelpOptions, SignatureHelpParams, SignatureInformation, StaticRegistrationOptions, TextDocumentItem, + TextDocumentRegistrationOptions, TextDocumentSyncCapability, TextDocumentSyncKind, TextDocumentSyncOptions, + TextEdit, WorkDoneProgressOptions, WorkspaceEdit, WorkspaceFoldersServerCapabilities, + WorkspaceServerCapabilities, + }, + Client, LanguageServer, +}; -use crate::{ast::types::VariableKind, executor::SourceRange, parser::PIPE_OPERATOR}; +use crate::{ast::types::VariableKind, executor::SourceRange, lsp::backend::Backend as _, parser::PIPE_OPERATOR}; /// A subcommand for running the server. #[derive(Clone, Debug)] @@ -27,6 +48,8 @@ pub struct Server { pub struct Backend { /// The client for the backend. pub client: Client, + /// The file system client to use. + pub fs: crate::fs::FileManager, /// The stdlib completions for the language. pub stdlib_completions: HashMap, /// The stdlib signatures for the language. @@ -47,15 +70,29 @@ pub struct Backend { pub semantic_tokens_map: DashMap>, } -impl Backend { - fn get_semantic_token_type_index(&self, token_type: SemanticTokenType) -> Option { - self.token_types.iter().position(|x| *x == token_type) +// Implement the shared backend trait for the language server. +#[async_trait::async_trait] +impl crate::lsp::backend::Backend for Backend { + fn client(&self) -> Client { + self.client.clone() + } + + fn fs(&self) -> crate::fs::FileManager { + self.fs.clone() + } + + fn current_code_map(&self) -> DashMap { + self.current_code_map.clone() + } + + fn insert_current_code_map(&self, uri: String, text: String) { + self.current_code_map.insert(uri, text); } async fn on_change(&self, params: TextDocumentItem) { + // We already updated the code map in the shared backend. + // Lets update the tokens. - self.current_code_map - .insert(params.uri.to_string(), params.text.clone()); let tokens = crate::token::lexer(¶ms.text); self.token_map.insert(params.uri.to_string(), tokens.clone()); @@ -160,6 +197,12 @@ impl Backend { // If the client supports it. self.client.publish_diagnostics(params.uri.clone(), vec![], None).await; } +} + +impl Backend { + fn get_semantic_token_type_index(&self, token_type: SemanticTokenType) -> Option { + self.token_types.iter().position(|x| *x == token_type) + } async fn completions_get_variables_from_ast(&self, file_name: &str) -> Vec { let mut completions = vec![]; @@ -281,68 +324,51 @@ impl LanguageServer for Backend { } async fn initialized(&self, params: InitializedParams) { - self.client - .log_message(MessageType::INFO, format!("initialized: {:?}", params)) - .await; + self.do_initialized(params).await } async fn shutdown(&self) -> RpcResult<()> { - self.client.log_message(MessageType::INFO, "shutdown".to_string()).await; - Ok(()) + self.do_shutdown().await } - async fn did_change_workspace_folders(&self, _: DidChangeWorkspaceFoldersParams) { - self.client - .log_message(MessageType::INFO, "workspace folders changed!") - .await; + async fn did_change_workspace_folders(&self, params: DidChangeWorkspaceFoldersParams) { + self.do_did_change_workspace_folders(params).await } - async fn did_change_configuration(&self, _: DidChangeConfigurationParams) { - self.client - .log_message(MessageType::INFO, "configuration changed!") - .await; + async fn did_change_configuration(&self, params: DidChangeConfigurationParams) { + self.do_did_change_configuration(params).await } - async fn did_change_watched_files(&self, _: DidChangeWatchedFilesParams) { - self.client - .log_message(MessageType::INFO, "watched files have changed!") - .await; + async fn did_change_watched_files(&self, params: DidChangeWatchedFilesParams) { + self.do_did_change_watched_files(params).await + } + + async fn did_create_files(&self, params: CreateFilesParams) { + self.do_did_create_files(params).await + } + + async fn did_rename_files(&self, params: RenameFilesParams) { + self.do_did_rename_files(params).await + } + + async fn did_delete_files(&self, params: DeleteFilesParams) { + self.do_did_delete_files(params).await } async fn did_open(&self, params: DidOpenTextDocumentParams) { - self.on_change(TextDocumentItem { - uri: params.text_document.uri, - text: params.text_document.text, - version: params.text_document.version, - language_id: params.text_document.language_id, - }) - .await + self.do_did_open(params).await } - async fn did_change(&self, mut params: DidChangeTextDocumentParams) { - self.on_change(TextDocumentItem { - uri: params.text_document.uri, - text: std::mem::take(&mut params.content_changes[0].text), - version: params.text_document.version, - language_id: Default::default(), - }) - .await + async fn did_change(&self, params: DidChangeTextDocumentParams) { + self.do_did_change(params.clone()).await; } async fn did_save(&self, params: DidSaveTextDocumentParams) { - if let Some(text) = params.text { - self.on_change(TextDocumentItem { - uri: params.text_document.uri, - text, - version: Default::default(), - language_id: Default::default(), - }) - .await - } + self.do_did_save(params).await } - async fn did_close(&self, _: DidCloseTextDocumentParams) { - self.client.log_message(MessageType::INFO, "file closed!").await; + async fn did_close(&self, params: DidCloseTextDocumentParams) { + self.do_did_close(params).await } async fn hover(&self, params: HoverParams) -> RpcResult> { diff --git a/src/wasm-lib/kcl/src/lsp/mod.rs b/src/wasm-lib/kcl/src/lsp/mod.rs new file mode 100644 index 000000000..4069f036d --- /dev/null +++ b/src/wasm-lib/kcl/src/lsp/mod.rs @@ -0,0 +1,6 @@ +//! The servers that power the text editor. + +mod backend; +pub mod copilot; +pub mod kcl; +mod util; diff --git a/src/wasm-lib/kcl/src/lsp/util.rs b/src/wasm-lib/kcl/src/lsp/util.rs new file mode 100644 index 000000000..c945e676a --- /dev/null +++ b/src/wasm-lib/kcl/src/lsp/util.rs @@ -0,0 +1,33 @@ +//! Utility functions for working with ropes and positions. + +use ropey::Rope; +use tower_lsp::lsp_types::Position; + +pub fn position_to_offset(position: Position, rope: &Rope) -> Option { + Some(rope.try_line_to_char(position.line as usize).ok()? + position.character as usize) +} + +pub fn get_text_before(offset: usize, rope: &Rope) -> Option { + if offset == 0 { + return Some("".to_string()); + } + Some(rope.slice(0..offset).to_string()) +} + +pub fn get_text_after(offset: usize, rope: &Rope) -> Option { + let end_idx = rope.len_chars(); + if offset == end_idx { + return Some("".to_string()); + } + Some(rope.slice(offset..end_idx).to_string()) +} + +pub fn get_line_before(pos: Position, rope: &Rope) -> Option { + let char_offset = pos.character as usize; + let offset = position_to_offset(pos, rope).unwrap(); + if char_offset == 0 { + return Some("".to_string()); + } + let line_start = offset - char_offset; + Some(rope.slice(line_start..offset).to_string()) +} diff --git a/src/wasm-lib/kcl/src/parser/parser_impl.rs b/src/wasm-lib/kcl/src/parser/parser_impl.rs index fecc9269f..3c9c7ab5f 100644 --- a/src/wasm-lib/kcl/src/parser/parser_impl.rs +++ b/src/wasm-lib/kcl/src/parser/parser_impl.rs @@ -267,6 +267,7 @@ fn binary_operator(i: TokenSlice) -> PResult { "/" => BinaryOperator::Div, "*" => BinaryOperator::Mul, "%" => BinaryOperator::Mod, + "^" => BinaryOperator::Pow, _ => { return Err(KclError::Syntax(KclErrorDetails { source_ranges: token.as_source_ranges(), diff --git a/src/wasm-lib/kcl/src/std/extrude.rs b/src/wasm-lib/kcl/src/std/extrude.rs index 686da0ea3..6057cf708 100644 --- a/src/wasm-lib/kcl/src/std/extrude.rs +++ b/src/wasm-lib/kcl/src/std/extrude.rs @@ -6,7 +6,7 @@ use schemars::JsonSchema; use crate::{ errors::{KclError, KclErrorDetails}, - executor::{ExtrudeGroup, ExtrudeSurface, ExtrudeTransform, GeoMeta, MemoryItem, Path, SketchGroup}, + executor::{ExtrudeGroup, ExtrudeSurface, ExtrudeTransform, GeoMeta, MemoryItem, Path, SketchGroup, SketchSurface}, std::Args, }; @@ -36,6 +36,13 @@ async fn inner_extrude(length: f64, sketch_group: Box, args: Args) ) .await?; + // We need to do this after extrude for sketch on face. + if let SketchSurface::Face(_) = sketch_group.on { + // Disable the sketch mode. + args.send_modeling_cmd(uuid::Uuid::new_v4(), kittycad::types::ModelingCmd::SketchModeDisable {}) + .await?; + } + // Bring the object to the front of the scene. // See: https://github.com/KittyCAD/modeling-app/issues/806 args.send_modeling_cmd( diff --git a/src/wasm-lib/kcl/src/std/mod.rs b/src/wasm-lib/kcl/src/std/mod.rs index 115c222da..082924497 100644 --- a/src/wasm-lib/kcl/src/std/mod.rs +++ b/src/wasm-lib/kcl/src/std/mod.rs @@ -20,16 +20,16 @@ use parse_display::{Display, FromStr}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use self::{kcl_stdlib::KclStdLibFn, sketch::SketchOnFaceTag}; use crate::{ ast::types::parse_json_number_as_f64, docs::StdLibFn, engine::EngineManager, errors::{KclError, KclErrorDetails}, executor::{ - ExecutorContext, ExtrudeGroup, Geometry, MemoryItem, Metadata, SketchGroup, SketchGroupSet, SourceRange, + ExecutorContext, ExtrudeGroup, Geometry, MemoryItem, Metadata, SketchGroup, SketchGroupSet, SketchSurface, + SourceRange, }, - std::sketch::SketchSurface, + std::{kcl_stdlib::KclStdLibFn, sketch::SketchOnFaceTag}, }; pub type StdFn = fn(Args) -> std::pin::Pin>>>; diff --git a/src/wasm-lib/kcl/src/std/sketch.rs b/src/wasm-lib/kcl/src/std/sketch.rs index e5d247571..7d63e0be9 100644 --- a/src/wasm-lib/kcl/src/std/sketch.rs +++ b/src/wasm-lib/kcl/src/std/sketch.rs @@ -12,7 +12,7 @@ use crate::{ errors::{KclError, KclErrorDetails}, executor::{ BasePath, ExtrudeGroup, ExtrudeSurface, Face, GeoMeta, MemoryItem, Path, Plane, PlaneType, Point2d, Point3d, - Position, Rotation, SketchGroup, SketchGroupSet, SourceRange, + Position, Rotation, SketchGroup, SketchGroupSet, SketchSurface, SourceRange, }, std::{ utils::{ @@ -774,44 +774,6 @@ impl From for Plane { } } -/// A plane or a face. -#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)] -#[ts(export)] -#[serde(rename_all = "camelCase", untagged)] -pub enum SketchSurface { - /// A plane. - Plane(Box), - /// A face. - Face(Box), -} - -impl SketchSurface { - pub fn id(&self) -> uuid::Uuid { - match self { - SketchSurface::Plane(plane) => plane.id, - SketchSurface::Face(face) => face.id, - } - } - pub fn x_axis(&self) -> Point3d { - match self { - SketchSurface::Plane(plane) => plane.x_axis.clone(), - SketchSurface::Face(face) => face.x_axis.clone(), - } - } - pub fn y_axis(&self) -> Point3d { - match self { - SketchSurface::Plane(plane) => plane.y_axis.clone(), - SketchSurface::Face(face) => face.y_axis.clone(), - } - } - pub fn z_axis(&self) -> Point3d { - match self { - SketchSurface::Plane(plane) => plane.z_axis.clone(), - SketchSurface::Face(face) => face.z_axis.clone(), - } - } -} - /// Start a sketch on a specific plane or face. pub async fn start_sketch_on(args: Args) -> Result { let (data, tag): (SketchData, Option) = args.get_data_and_optional_tag()?; @@ -918,6 +880,7 @@ async fn start_sketch_on_face( animated: false, ortho: false, entity_id: extrude_plane_id, + adjust_camera: false, }, ) .await?; @@ -1085,6 +1048,7 @@ async fn inner_start_profile_at( let sketch_group = SketchGroup { id: path_id, + on: sketch_surface.clone(), position: Position([0.0, 0.0, 0.0]), rotation: Rotation([0.0, 0.0, 0.0, 1.0]), x_axis: sketch_surface.x_axis(), @@ -1125,10 +1089,10 @@ async fn inner_close(sketch_group: Box, args: Args) -> Result f64 { + match base_unit { + kittycad::types::UnitLength::Mm => 1.0, + kittycad::types::UnitLength::Cm => 10.0, + kittycad::types::UnitLength::M => 1000.0, + kittycad::types::UnitLength::In => 25.4, + kittycad::types::UnitLength::Ft => 304.8, + kittycad::types::UnitLength::Yd => 914.4, + } +} + +pub fn get_camera_zoom_magnitude_per_unit_length(unit: kittycad::types::UnitLength) -> (f64, f64) { + let base_radius = 5.6_f64; + let cam_height_distance_ratio = 0.5_f64; + let length = unit_length_to_mm(unit) * base_radius * 20.0; + let ang = cam_height_distance_ratio.atan(); + let x = ang.cos() * length; + let y = ang.sin() * length; + (x, y) +} diff --git a/src/wasm-lib/src/lib.rs b/src/wasm-lib/src/lib.rs index 118f81f1f..ca3c34b8e 100644 --- a/src/wasm-lib/src/lib.rs +++ b/src/wasm-lib/src/lib.rs @@ -1,267 +1,7 @@ //! Wasm bindings for `kcl`. #[cfg(target_arch = "wasm32")] -use futures::stream::TryStreamExt; -use gloo_utils::format::JsValueSerdeExt; -#[cfg(target_arch = "wasm32")] -use kcl_lib::server::{get_completions_from_stdlib, get_signatures_from_stdlib, Backend}; -#[cfg(target_arch = "wasm32")] -use kcl_lib::std::utils; -#[cfg(target_arch = "wasm32")] -use tower_lsp::{LspService, Server}; -use wasm_bindgen::prelude::*; - -// wasm_bindgen wrapper for execute -#[cfg(target_arch = "wasm32")] -#[wasm_bindgen] -pub async fn execute_wasm( - program_str: &str, - memory_str: &str, - engine_manager: kcl_lib::engine::conn_wasm::EngineCommandManager, - fs_manager: kcl_lib::fs::wasm::FileSystemManager, -) -> Result { - // deserialize the ast from a stringified json - - use kcl_lib::executor::ExecutorContext; - let program: kcl_lib::ast::types::Program = serde_json::from_str(program_str).map_err(|e| e.to_string())?; - let mut mem: kcl_lib::executor::ProgramMemory = serde_json::from_str(memory_str).map_err(|e| e.to_string())?; - - let engine = kcl_lib::engine::EngineConnection::new(engine_manager) - .await - .map_err(|e| format!("{:?}", e))?; - let fs = kcl_lib::fs::FileManager::new(fs_manager); - let ctx = ExecutorContext { - engine, - fs, - stdlib: std::sync::Arc::new(kcl_lib::std::StdLib::new()), - }; - - let memory = kcl_lib::executor::execute(program, &mut mem, kcl_lib::executor::BodyType::Root, &ctx) - .await - .map_err(String::from)?; - // The serde-wasm-bindgen does not work here because of weird HashMap issues so we use the - // gloo-serialize crate instead. - JsValue::from_serde(&memory).map_err(|e| e.to_string()) -} - -// wasm_bindgen wrapper for execute -#[cfg(target_arch = "wasm32")] -#[wasm_bindgen] -pub async fn modify_ast_for_sketch_wasm( - manager: kcl_lib::engine::conn_wasm::EngineCommandManager, - program_str: &str, - sketch_name: &str, - plane_type: &str, - sketch_id: &str, -) -> Result { - // deserialize the ast from a stringified json - let mut program: kcl_lib::ast::types::Program = serde_json::from_str(program_str).map_err(|e| e.to_string())?; - - let plane: kcl_lib::executor::PlaneType = serde_json::from_str(plane_type).map_err(|e| e.to_string())?; - - let mut engine = kcl_lib::engine::EngineConnection::new(manager) - .await - .map_err(|e| format!("{:?}", e))?; - - let _ = kcl_lib::ast::modify::modify_ast_for_sketch( - &mut engine, - &mut program, - sketch_name, - plane, - uuid::Uuid::parse_str(sketch_id).map_err(|e| e.to_string())?, - ) - .await - .map_err(String::from)?; - - // The serde-wasm-bindgen does not work here because of weird HashMap issues so we use the - // gloo-serialize crate instead. - JsValue::from_serde(&program).map_err(|e| e.to_string()) -} - -#[wasm_bindgen] -pub fn deserialize_files(data: &[u8]) -> Result { - let ws_resp: kittycad::types::WebSocketResponse = bson::from_slice(data)?; - - if let Some(success) = ws_resp.success { - if !success { - return Err(JsError::new(&format!("Server returned error: {:?}", ws_resp.errors))); - } - } - - if let Some(kittycad::types::OkWebSocketResponseData::Export { files }) = ws_resp.resp { - return Ok(JsValue::from_serde(&files)?); - } - - Err(JsError::new(&format!("Invalid response type, got: {:?}", ws_resp))) -} - -// wasm_bindgen wrapper for lexer -// test for this function and by extension lexer are done in javascript land src/lang/tokeniser.test.ts -#[wasm_bindgen] -pub fn lexer_wasm(js: &str) -> Result { - let tokens = kcl_lib::token::lexer(js); - Ok(JsValue::from_serde(&tokens)?) -} - -#[wasm_bindgen] -pub fn parse_wasm(js: &str) -> Result { - let tokens = kcl_lib::token::lexer(js); - let parser = kcl_lib::parser::Parser::new(tokens); - let program = parser.ast().map_err(String::from)?; - // The serde-wasm-bindgen does not work here because of weird HashMap issues so we use the - // gloo-serialize crate instead. - JsValue::from_serde(&program).map_err(|e| e.to_string()) -} - -// wasm_bindgen wrapper for recast -// test for this function and by extension the recaster are done in javascript land src/lang/recast.test.ts -#[wasm_bindgen] -pub fn recast_wasm(json_str: &str) -> Result { - // deserialize the ast from a stringified json - let program: kcl_lib::ast::types::Program = serde_json::from_str(json_str).map_err(JsError::from)?; - - // Use the default options until we integrate into the UI the ability to change them. - let result = program.recast(&Default::default(), 0); - Ok(JsValue::from_serde(&result)?) -} +mod wasm; #[cfg(target_arch = "wasm32")] -#[wasm_bindgen] -pub struct ServerConfig { - into_server: js_sys::AsyncIterator, - from_server: web_sys::WritableStream, -} - -#[cfg(target_arch = "wasm32")] -#[wasm_bindgen] -impl ServerConfig { - #[wasm_bindgen(constructor)] - pub fn new(into_server: js_sys::AsyncIterator, from_server: web_sys::WritableStream) -> Self { - Self { - into_server, - from_server, - } - } -} - -/// Run the `kcl` lsp server. -// -// NOTE: we don't use web_sys::ReadableStream for input here because on the -// browser side we need to use a ReadableByteStreamController to construct it -// and so far only Chromium-based browsers support that functionality. - -// NOTE: input needs to be an AsyncIterator specifically -#[cfg(target_arch = "wasm32")] -#[wasm_bindgen] -pub async fn lsp_run(config: ServerConfig) -> Result<(), JsValue> { - let ServerConfig { - into_server, - from_server, - } = config; - - let stdlib = kcl_lib::std::StdLib::new(); - let stdlib_completions = get_completions_from_stdlib(&stdlib).map_err(|e| e.to_string())?; - let stdlib_signatures = get_signatures_from_stdlib(&stdlib).map_err(|e| e.to_string())?; - // We can unwrap here because we know the tokeniser is valid, since - // we have a test for it. - let token_types = kcl_lib::token::TokenType::all_semantic_token_types().unwrap(); - - let (service, socket) = LspService::new(|client| Backend { - client, - stdlib_completions, - stdlib_signatures, - token_types, - token_map: Default::default(), - ast_map: Default::default(), - current_code_map: Default::default(), - diagnostics_map: Default::default(), - symbols_map: Default::default(), - semantic_tokens_map: Default::default(), - }); - - let input = wasm_bindgen_futures::stream::JsStream::from(into_server); - let input = input - .map_ok(|value| { - value - .dyn_into::() - .expect("could not cast stream item to Uint8Array") - .to_vec() - }) - .map_err(|_err| std::io::Error::from(std::io::ErrorKind::Other)) - .into_async_read(); - - let output = wasm_bindgen::JsCast::unchecked_into::(from_server); - let output = wasm_streams::WritableStream::from_raw(output); - let output = output.try_into_async_write().map_err(|err| err.0)?; - - Server::new(input, output, socket).serve(service).await; - - Ok(()) -} - -#[cfg(target_arch = "wasm32")] -#[wasm_bindgen] -pub fn is_points_ccw(points: &[f64]) -> i32 { - utils::is_points_ccw_wasm(points) -} - -#[cfg(target_arch = "wasm32")] -#[wasm_bindgen] -pub struct TangentialArcInfoOutputWasm { - /// The geometric center of the arc x. - pub center_x: f64, - /// The geometric center of the arc y. - pub center_y: f64, - /// The midpoint of the arc x. - pub arc_mid_point_x: f64, - /// The midpoint of the arc y. - pub arc_mid_point_y: f64, - /// The radius of the arc. - pub radius: f64, - /// Start angle of the arc in radians. - pub start_angle: f64, - /// End angle of the arc in radians. - pub end_angle: f64, - /// Flag to determine if the arc is counter clockwise. - pub ccw: i32, -} - -#[cfg(target_arch = "wasm32")] -#[wasm_bindgen] -pub fn get_tangential_arc_to_info( - arc_start_point_x: f64, - arc_start_point_y: f64, - arc_end_point_x: f64, - arc_end_point_y: f64, - tan_previous_point_x: f64, - tan_previous_point_y: f64, - obtuse: bool, -) -> TangentialArcInfoOutputWasm { - let result = utils::get_tangential_arc_to_info(utils::TangentialArcInfoInput { - arc_start_point: [arc_start_point_x, arc_start_point_y], - arc_end_point: [arc_end_point_x, arc_end_point_y], - tan_previous_point: [tan_previous_point_x, tan_previous_point_y], - obtuse: obtuse, - }); - TangentialArcInfoOutputWasm { - center_x: result.center[0], - center_y: result.center[1], - arc_mid_point_x: result.arc_mid_point[0], - arc_mid_point_y: result.arc_mid_point[1], - radius: result.radius, - start_angle: result.start_angle, - end_angle: result.end_angle, - ccw: result.ccw, - } -} - -/// Create the default program memory. -#[cfg(target_arch = "wasm32")] -#[wasm_bindgen] -pub fn program_memory_init() -> Result { - let memory = kcl_lib::executor::ProgramMemory::default(); - - // The serde-wasm-bindgen does not work here because of weird HashMap issues so we use the - // gloo-serialize crate instead. - JsValue::from_serde(&memory).map_err(|e| e.to_string()) -} +pub use wasm::*; diff --git a/src/wasm-lib/src/wasm.rs b/src/wasm-lib/src/wasm.rs new file mode 100644 index 000000000..b50945e16 --- /dev/null +++ b/src/wasm-lib/src/wasm.rs @@ -0,0 +1,320 @@ +//! Wasm bindings for `kcl`. + +use std::{ + str::FromStr, + sync::{Arc, RwLock}, +}; + +use futures::stream::TryStreamExt; +use gloo_utils::format::JsValueSerdeExt; +use tower_lsp::{LspService, Server}; +use wasm_bindgen::prelude::*; + +// wasm_bindgen wrapper for execute +#[wasm_bindgen] +pub async fn execute_wasm( + program_str: &str, + memory_str: &str, + units: &str, + engine_manager: kcl_lib::engine::conn_wasm::EngineCommandManager, + fs_manager: kcl_lib::fs::wasm::FileSystemManager, +) -> Result { + // deserialize the ast from a stringified json + + use kcl_lib::executor::ExecutorContext; + let program: kcl_lib::ast::types::Program = serde_json::from_str(program_str).map_err(|e| e.to_string())?; + let mut mem: kcl_lib::executor::ProgramMemory = serde_json::from_str(memory_str).map_err(|e| e.to_string())?; + let units = kittycad::types::UnitLength::from_str(units).map_err(|e| e.to_string())?; + + let engine = kcl_lib::engine::EngineConnection::new(engine_manager) + .await + .map_err(|e| format!("{:?}", e))?; + let fs = kcl_lib::fs::FileManager::new(fs_manager); + let ctx = ExecutorContext { + engine, + fs, + stdlib: std::sync::Arc::new(kcl_lib::std::StdLib::new()), + units, + }; + + let memory = kcl_lib::executor::execute(program, &mut mem, kcl_lib::executor::BodyType::Root, &ctx) + .await + .map_err(String::from)?; + // The serde-wasm-bindgen does not work here because of weird HashMap issues so we use the + // gloo-serialize crate instead. + JsValue::from_serde(&memory).map_err(|e| e.to_string()) +} + +// wasm_bindgen wrapper for execute +#[wasm_bindgen] +pub async fn modify_ast_for_sketch_wasm( + manager: kcl_lib::engine::conn_wasm::EngineCommandManager, + program_str: &str, + sketch_name: &str, + plane_type: &str, + sketch_id: &str, +) -> Result { + // deserialize the ast from a stringified json + let mut program: kcl_lib::ast::types::Program = serde_json::from_str(program_str).map_err(|e| e.to_string())?; + + let plane: kcl_lib::executor::PlaneType = serde_json::from_str(plane_type).map_err(|e| e.to_string())?; + + let mut engine = kcl_lib::engine::EngineConnection::new(manager) + .await + .map_err(|e| format!("{:?}", e))?; + + let _ = kcl_lib::ast::modify::modify_ast_for_sketch( + &mut engine, + &mut program, + sketch_name, + plane, + uuid::Uuid::parse_str(sketch_id).map_err(|e| e.to_string())?, + ) + .await + .map_err(String::from)?; + + // The serde-wasm-bindgen does not work here because of weird HashMap issues so we use the + // gloo-serialize crate instead. + JsValue::from_serde(&program).map_err(|e| e.to_string()) +} + +#[wasm_bindgen] +pub fn deserialize_files(data: &[u8]) -> Result { + let ws_resp: kittycad::types::WebSocketResponse = bson::from_slice(data)?; + + if let Some(success) = ws_resp.success { + if !success { + return Err(JsError::new(&format!("Server returned error: {:?}", ws_resp.errors))); + } + } + + if let Some(kittycad::types::OkWebSocketResponseData::Export { files }) = ws_resp.resp { + return Ok(JsValue::from_serde(&files)?); + } + + Err(JsError::new(&format!("Invalid response type, got: {:?}", ws_resp))) +} + +// wasm_bindgen wrapper for lexer +// test for this function and by extension lexer are done in javascript land src/lang/tokeniser.test.ts +#[wasm_bindgen] +pub fn lexer_wasm(js: &str) -> Result { + let tokens = kcl_lib::token::lexer(js); + Ok(JsValue::from_serde(&tokens)?) +} + +#[wasm_bindgen] +pub fn parse_wasm(js: &str) -> Result { + let tokens = kcl_lib::token::lexer(js); + let parser = kcl_lib::parser::Parser::new(tokens); + let program = parser.ast().map_err(String::from)?; + // The serde-wasm-bindgen does not work here because of weird HashMap issues so we use the + // gloo-serialize crate instead. + JsValue::from_serde(&program).map_err(|e| e.to_string()) +} + +// wasm_bindgen wrapper for recast +// test for this function and by extension the recaster are done in javascript land src/lang/recast.test.ts +#[wasm_bindgen] +pub fn recast_wasm(json_str: &str) -> Result { + // deserialize the ast from a stringified json + let program: kcl_lib::ast::types::Program = serde_json::from_str(json_str).map_err(JsError::from)?; + + // Use the default options until we integrate into the UI the ability to change them. + let result = program.recast(&Default::default(), 0); + Ok(JsValue::from_serde(&result)?) +} + +#[wasm_bindgen] +pub struct ServerConfig { + into_server: js_sys::AsyncIterator, + from_server: web_sys::WritableStream, + fs: kcl_lib::fs::wasm::FileSystemManager, +} + +#[wasm_bindgen] +impl ServerConfig { + #[wasm_bindgen(constructor)] + pub fn new( + into_server: js_sys::AsyncIterator, + from_server: web_sys::WritableStream, + fs: kcl_lib::fs::wasm::FileSystemManager, + ) -> Self { + Self { + into_server, + from_server, + fs, + } + } +} + +/// Run the `kcl` lsp server. +// +// NOTE: we don't use web_sys::ReadableStream for input here because on the +// browser side we need to use a ReadableByteStreamController to construct it +// and so far only Chromium-based browsers support that functionality. + +// NOTE: input needs to be an AsyncIterator specifically +#[wasm_bindgen] +pub async fn kcl_lsp_run(config: ServerConfig) -> Result<(), JsValue> { + let ServerConfig { + into_server, + from_server, + fs, + } = config; + + let stdlib = kcl_lib::std::StdLib::new(); + let stdlib_completions = kcl_lib::lsp::kcl::get_completions_from_stdlib(&stdlib).map_err(|e| e.to_string())?; + let stdlib_signatures = kcl_lib::lsp::kcl::get_signatures_from_stdlib(&stdlib).map_err(|e| e.to_string())?; + // We can unwrap here because we know the tokeniser is valid, since + // we have a test for it. + let token_types = kcl_lib::token::TokenType::all_semantic_token_types().unwrap(); + + let (service, socket) = LspService::new(|client| kcl_lib::lsp::kcl::Backend { + client, + fs: kcl_lib::fs::FileManager::new(fs), + stdlib_completions, + stdlib_signatures, + token_types, + token_map: Default::default(), + ast_map: Default::default(), + current_code_map: Default::default(), + diagnostics_map: Default::default(), + symbols_map: Default::default(), + semantic_tokens_map: Default::default(), + }); + + let input = wasm_bindgen_futures::stream::JsStream::from(into_server); + let input = input + .map_ok(|value| { + value + .dyn_into::() + .expect("could not cast stream item to Uint8Array") + .to_vec() + }) + .map_err(|_err| std::io::Error::from(std::io::ErrorKind::Other)) + .into_async_read(); + + let output = wasm_bindgen::JsCast::unchecked_into::(from_server); + let output = wasm_streams::WritableStream::from_raw(output); + let output = output.try_into_async_write().map_err(|err| err.0)?; + + Server::new(input, output, socket).serve(service).await; + + Ok(()) +} + +/// Run the `copilot` lsp server. +// +// NOTE: we don't use web_sys::ReadableStream for input here because on the +// browser side we need to use a ReadableByteStreamController to construct it +// and so far only Chromium-based browsers support that functionality. + +// NOTE: input needs to be an AsyncIterator specifically +#[wasm_bindgen] +pub async fn copilot_lsp_run(config: ServerConfig, token: String) -> Result<(), JsValue> { + let ServerConfig { + into_server, + from_server, + fs, + } = config; + + let (service, socket) = LspService::build(|client| kcl_lib::lsp::copilot::Backend { + client, + fs: kcl_lib::fs::FileManager::new(fs), + current_code_map: Default::default(), + editor_info: Arc::new(RwLock::new(kcl_lib::lsp::copilot::types::CopilotEditorInfo::default())), + cache: kcl_lib::lsp::copilot::cache::CopilotCache::new(), + token, + }) + .custom_method("setEditorInfo", kcl_lib::lsp::copilot::Backend::set_editor_info) + .custom_method( + "getCompletions", + kcl_lib::lsp::copilot::Backend::get_completions_cycling, + ) + .custom_method("notifyAccepted", kcl_lib::lsp::copilot::Backend::accept_completions) + .custom_method("notifyRejected", kcl_lib::lsp::copilot::Backend::reject_completions) + .finish(); + + let input = wasm_bindgen_futures::stream::JsStream::from(into_server); + let input = input + .map_ok(|value| { + value + .dyn_into::() + .expect("could not cast stream item to Uint8Array") + .to_vec() + }) + .map_err(|_err| std::io::Error::from(std::io::ErrorKind::Other)) + .into_async_read(); + + let output = wasm_bindgen::JsCast::unchecked_into::(from_server); + let output = wasm_streams::WritableStream::from_raw(output); + let output = output.try_into_async_write().map_err(|err| err.0)?; + + Server::new(input, output, socket).serve(service).await; + + Ok(()) +} + +#[wasm_bindgen] +pub fn is_points_ccw(points: &[f64]) -> i32 { + kcl_lib::std::utils::is_points_ccw_wasm(points) +} + +#[wasm_bindgen] +pub struct TangentialArcInfoOutputWasm { + /// The geometric center of the arc x. + pub center_x: f64, + /// The geometric center of the arc y. + pub center_y: f64, + /// The midpoint of the arc x. + pub arc_mid_point_x: f64, + /// The midpoint of the arc y. + pub arc_mid_point_y: f64, + /// The radius of the arc. + pub radius: f64, + /// Start angle of the arc in radians. + pub start_angle: f64, + /// End angle of the arc in radians. + pub end_angle: f64, + /// Flag to determine if the arc is counter clockwise. + pub ccw: i32, +} + +#[wasm_bindgen] +pub fn get_tangential_arc_to_info( + arc_start_point_x: f64, + arc_start_point_y: f64, + arc_end_point_x: f64, + arc_end_point_y: f64, + tan_previous_point_x: f64, + tan_previous_point_y: f64, + obtuse: bool, +) -> TangentialArcInfoOutputWasm { + let result = kcl_lib::std::utils::get_tangential_arc_to_info(kcl_lib::std::utils::TangentialArcInfoInput { + arc_start_point: [arc_start_point_x, arc_start_point_y], + arc_end_point: [arc_end_point_x, arc_end_point_y], + tan_previous_point: [tan_previous_point_x, tan_previous_point_y], + obtuse: obtuse, + }); + TangentialArcInfoOutputWasm { + center_x: result.center[0], + center_y: result.center[1], + arc_mid_point_x: result.arc_mid_point[0], + arc_mid_point_y: result.arc_mid_point[1], + radius: result.radius, + start_angle: result.start_angle, + end_angle: result.end_angle, + ccw: result.ccw, + } +} + +/// Create the default program memory. +#[wasm_bindgen] +pub fn program_memory_init() -> Result { + let memory = kcl_lib::executor::ProgramMemory::default(); + + // The serde-wasm-bindgen does not work here because of weird HashMap issues so we use the + // gloo-serialize crate instead. + JsValue::from_serde(&memory).map_err(|e| e.to_string()) +} diff --git a/src/wasm-lib/tests/executor/main.rs b/src/wasm-lib/tests/executor/main.rs index cb2a54c00..8a7058935 100644 --- a/src/wasm-lib/tests/executor/main.rs +++ b/src/wasm-lib/tests/executor/main.rs @@ -3,7 +3,7 @@ use kcl_lib::engine::EngineManager; /// Executes a kcl program and takes a snapshot of the result. /// This returns the bytes of the snapshot. -async fn execute_and_snapshot(code: &str) -> Result { +async fn execute_and_snapshot(code: &str, units: kittycad::types::UnitLength) -> Result { let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),); let http_client = reqwest::Client::builder() .user_agent(user_agent) @@ -24,7 +24,7 @@ async fn execute_and_snapshot(code: &str) -> Result { // Create the client. let client = kittycad::Client::new_from_reqwest(token, http_client, ws_client); // uncomment to use a local server - // client.set_base_url("http://your-local-server:8080/"); + //client.set_base_url("http://system76-pc:8080/"); let ws = client .modeling() @@ -38,9 +38,25 @@ async fn execute_and_snapshot(code: &str) -> Result { let parser = kcl_lib::parser::Parser::new(tokens); let program = parser.ast()?; let mut mem: kcl_lib::executor::ProgramMemory = Default::default(); - let ctx = kcl_lib::executor::ExecutorContext::new(ws).await?; + let ctx = kcl_lib::executor::ExecutorContext::new(ws, units.clone()).await?; + let _ = kcl_lib::executor::execute(program, &mut mem, kcl_lib::executor::BodyType::Root, &ctx).await?; + let (x, y) = kcl_lib::std::utils::get_camera_zoom_magnitude_per_unit_length(units); + + ctx.engine + .send_modeling_cmd( + uuid::Uuid::new_v4(), + kcl_lib::executor::SourceRange::default(), + kittycad::types::ModelingCmd::DefaultCameraLookAt { + center: kittycad::types::Point3D { x: 0.0, y: 0.0, z: 0.0 }, + up: kittycad::types::Point3D { x: 0.0, y: 0.0, z: 1.0 }, + vantage: kittycad::types::Point3D { x: 0.0, y: -x, z: y }, + sequence: None, + }, + ) + .await?; + // Send a snapshot request to the engine. let resp = ctx .engine @@ -87,7 +103,9 @@ const part002 = startSketchOn(part001, "here") |> extrude(5, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/sketch_on_face.png", &result, 0.999); } @@ -115,7 +133,9 @@ const part002 = startSketchOn(part001, "start") |> extrude(5, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/sketch_on_face_start.png", &result, 0.999); } @@ -143,7 +163,9 @@ const part002 = startSketchOn(part001, "END") |> extrude(5, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/sketch_on_face_end.png", &result, 0.999); } @@ -162,10 +184,11 @@ async fn serial_test_execute_with_function_sketch() { } const fnBox = box(3, 6, 10) +"#; -show(fnBox)"#; - - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/function_sketch.png", &result, 0.999); } @@ -183,9 +206,11 @@ async fn serial_test_execute_with_function_sketch_with_position() { return myBox } -show(box([0,0], 3, 6, 10))"#; +const thing = box([0,0], 3, 6, 10)"#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image( "tests/executor/outputs/function_sketch_with_position.png", &result, @@ -204,10 +229,11 @@ async fn serial_test_execute_with_angled_line() { |> line([-13.02, 10.03], %) |> close(%) |> extrude(4, %) +"#; -show(part001)"#; - - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/angled_line.png", &result, 0.999); } @@ -231,10 +257,11 @@ const bracket = startSketchOn('XY') |> line([0, -leg1 + thickness], %) |> close(%) |> extrude(width, %) +"#; -show(bracket)"#; - - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/parametric.png", &result, 0.999); } @@ -266,10 +293,11 @@ const bracket = startSketchAt([0, 0]) |> line([0, -wallMountL], %) |> close(%) |> extrude(width, %) +"#; -show(bracket)"#; - - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/parametric_with_tan_arc.png", &result, 0.999); } @@ -284,7 +312,7 @@ async fn serial_test_execute_engine_error_return() { |> extrude(4, %) "#; - let result = execute_and_snapshot(code).await; + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm).await; assert!(result.is_err()); assert_eq!( result.err().unwrap().to_string(), @@ -297,7 +325,9 @@ async fn serial_test_execute_engine_error_return() { async fn serial_test_execute_pipes_on_pipes() { let code = include_str!("inputs/pipes_on_pipes.kcl"); - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/pipes_on_pipes.png", &result, 0.999); } @@ -305,7 +335,9 @@ async fn serial_test_execute_pipes_on_pipes() { async fn serial_test_execute_cylinder() { let code = include_str!("inputs/cylinder.kcl"); - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/cylinder.png", &result, 0.999); } @@ -314,7 +346,9 @@ async fn serial_test_execute_cylinder() { async fn serial_test_execute_kittycad_svg() { let code = include_str!("inputs/kittycad_svg.kcl"); - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/kittycad_svg.png", &result, 0.999); } @@ -335,11 +369,11 @@ const b2 = cube([3,3], 4) const pt1 = b1.value[0] const pt2 = b2.value[0] +"#; -show(b1) -show(b2)"#; - - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image( "tests/executor/outputs/member_expression_sketch_group.png", &result, @@ -358,10 +392,11 @@ const body = startSketchOn('XY') |> arc({angle_end: 360, angle_start: 0, radius: radius}, %) |> close(%) |> extrude(height, %) +"#; -show(body)"#; - - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/close_arc.png", &result, 0.999); } @@ -387,7 +422,9 @@ box(10, 23, 8) let thing = box(-12, -15, 10) box(-20, -5, 10)"#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/negative_args.png", &result, 0.999); } @@ -400,7 +437,9 @@ async fn serial_test_basic_tangential_arc() { |> extrude(10, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/tangential_arc.png", &result, 0.999); } @@ -413,7 +452,9 @@ async fn serial_test_basic_tangential_arc_with_point() { |> extrude(10, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/tangential_arc_with_point.png", &result, 0.999); } @@ -426,7 +467,9 @@ async fn serial_test_basic_tangential_arc_to() { |> extrude(10, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/tangential_arc_to.png", &result, 0.999); } @@ -453,7 +496,9 @@ box(30, 43, 18, '-xy') let thing = box(-12, -15, 10, 'yz') box(-20, -5, 10, 'xy')"#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image( "tests/executor/outputs/different_planes_same_drawing.png", &result, @@ -488,7 +533,6 @@ const bracket = startSketchOn('XY') |> close(%) |> extrude(width, %) -show(bracket) const part001 = startSketchOn('XY') |> startProfileAt([-15.53, -10.28], %) |> line([10.49, -2.08], %) @@ -516,7 +560,9 @@ const part004 = startSketchOn('YZ') |> close(%) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/lots_of_planes.png", &result, 0.999); } @@ -540,11 +586,11 @@ const square = startSketchOn('XY') |> hole(circle([2, 2], .5), %) |> hole(circle([2, 8], .5), %) |> extrude(2, %) - -show(square) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/holes.png", &result, 0.999); } @@ -560,9 +606,11 @@ async fn optional_params() { return sg } - show(circle([2, 2], 20)) +const thing = circle([2, 2], 20) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/optional_params.png", &result, 0.999); } @@ -608,10 +656,11 @@ const part = roundedRectangle([0, 0], 20, 20, 4) |> hole(circle([-holeIndex, -holeIndex], holeRadius), %) |> hole(circle([holeIndex, -holeIndex], holeRadius), %) |> extrude(2, %) +"#; -show(part)"#; - - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/rounded_with_holes.png", &result, 0.999); } @@ -631,7 +680,9 @@ async fn serial_test_top_level_expression() { circle([0,0], 22) |> extrude(14, %)"#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/top_level_expression.png", &result, 0.999); } @@ -653,7 +704,9 @@ const part = circle([0,0], 2) |> patternLinear({axis: [0,0,1], repetitions: 12, distance: 2}, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/patterns_linear_basic.png", &result, 0.999); } @@ -681,7 +734,9 @@ const part = startSketchOn('XY') |> patternLinear({axis: [1, 0,1], repetitions: 3, distance: 6}, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/patterns_linear_basic_3d.png", &result, 0.999); } @@ -703,7 +758,9 @@ const part = circle([0,0], 2) |> patternLinear({axis: [0,0,1], repetitions: 12, distance: -2}, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image( "tests/executor/outputs/patterns_linear_basic_negative_distance.png", &result, @@ -729,7 +786,9 @@ const part = circle([0,0], 2) |> patternLinear({axis: [0,0,-1], repetitions: 12, distance: 2}, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image( "tests/executor/outputs/patterns_linear_basic_negative_axis.png", &result, @@ -764,7 +823,9 @@ const rectangle = startSketchOn('XY') "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/patterns_linear_basic_holes.png", &result, 0.999); } @@ -786,7 +847,9 @@ const part = circle([0,0], 2) |> patternCircular({axis: [0,0,1], center: [20, 20, 20], repetitions: 12, arcDegrees: 210, rotateDuplicates: true}, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/patterns_circular_basic_2d.png", &result, 0.999); } @@ -814,7 +877,9 @@ const part = startSketchOn('XY') |> patternCircular({axis: [0,1,0], center: [-20, -20, -20], repetitions: 40, arcDegrees: 360, rotateDuplicates: false}, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/patterns_circular_basic_3d.png", &result, 0.999); } @@ -842,7 +907,9 @@ const part = startSketchOn('XY') |> patternCircular({axis: [1,1,-1], center: [10, 0, 10], repetitions: 10, arcDegrees: 360, rotateDuplicates: true}, %) "#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image( "tests/executor/outputs/patterns_circular_3d_tilted_axis.png", &result, @@ -854,7 +921,7 @@ const part = startSketchOn('XY') async fn serial_test_import_file_doesnt_exist() { let code = r#"const model = import("thing.obj")"#; - let result = execute_and_snapshot(code).await; + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm).await; assert!(result.is_err()); assert_eq!( result.err().unwrap().to_string(), @@ -866,7 +933,9 @@ async fn serial_test_import_file_doesnt_exist() { async fn serial_test_import_obj_with_mtl() { let code = r#"const model = import("tests/executor/inputs/cube.obj")"#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/import_obj_with_mtl.png", &result, 0.999); } @@ -874,7 +943,9 @@ async fn serial_test_import_obj_with_mtl() { async fn serial_test_import_obj_with_mtl_units() { let code = r#"const model = import("tests/executor/inputs/cube.obj", {type: "obj", units: "m"})"#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/import_obj_with_mtl_units.png", &result, 0.999); } @@ -882,7 +953,9 @@ async fn serial_test_import_obj_with_mtl_units() { async fn serial_test_import_gltf_with_bin() { let code = r#"const model = import("tests/executor/inputs/cube.gltf")"#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/import_gltf_with_bin.png", &result, 0.999); } @@ -890,7 +963,9 @@ async fn serial_test_import_gltf_with_bin() { async fn serial_test_import_gltf_embedded() { let code = r#"const model = import("tests/executor/inputs/cube-embedded.gltf")"#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/import_gltf_embedded.png", &result, 0.999); } @@ -898,7 +973,9 @@ async fn serial_test_import_gltf_embedded() { async fn serial_test_import_glb() { let code = r#"const model = import("tests/executor/inputs/cube.glb")"#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/import_glb.png", &result, 0.999); } @@ -906,7 +983,9 @@ async fn serial_test_import_glb() { async fn serial_test_import_glb_no_assign() { let code = r#"import("tests/executor/inputs/cube.glb")"#; - let result = execute_and_snapshot(code).await.unwrap(); + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); twenty_twenty::assert_image("tests/executor/outputs/import_glb_no_assign.png", &result, 0.999); } @@ -914,10 +993,148 @@ async fn serial_test_import_glb_no_assign() { async fn serial_test_import_ext_doesnt_match() { let code = r#"const model = import("tests/executor/inputs/cube.gltf", {type: "obj", units: "m"})"#; - let result = execute_and_snapshot(code).await; + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm).await; assert!(result.is_err()); assert_eq!( result.err().unwrap().to_string(), r#"semantic: KclErrorDetails { source_ranges: [SourceRange([14, 82])], message: "The given format does not match the file extension. Expected: `gltf`, Given: `obj`" }"# ); } + +#[tokio::test(flavor = "multi_thread")] +async fn serial_test_cube_mm() { + let code = r#"fn cube = (pos, scale) => { + const sg = startSketchOn('XY') + |> startProfileAt(pos, %) + |> line([0, scale], %) + |> line([scale, 0], %) + |> line([0, -scale], %) + |> close(%) + |> extrude(scale, %) + + return sg +} + +const myCube = cube([0,0], 10) +"#; + + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) + .await + .unwrap(); + twenty_twenty::assert_image("tests/executor/outputs/cube_mm.png", &result, 1.0); +} + +#[tokio::test(flavor = "multi_thread")] +async fn serial_test_cube_cm() { + let code = r#"fn cube = (pos, scale) => { + const sg = startSketchOn('XY') + |> startProfileAt(pos, %) + |> line([0, scale], %) + |> line([scale, 0], %) + |> line([0, -scale], %) + |> close(%) + |> extrude(scale, %) + + return sg +} + +const myCube = cube([0,0], 10) +"#; + + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Cm) + .await + .unwrap(); + twenty_twenty::assert_image("tests/executor/outputs/cube_cm.png", &result, 1.0); +} + +#[tokio::test(flavor = "multi_thread")] +async fn serial_test_cube_m() { + let code = r#"fn cube = (pos, scale) => { + const sg = startSketchOn('XY') + |> startProfileAt(pos, %) + |> line([0, scale], %) + |> line([scale, 0], %) + |> line([0, -scale], %) + |> close(%) + |> extrude(scale, %) + + return sg +} + +const myCube = cube([0,0], 10) +"#; + + let result = execute_and_snapshot(code, kittycad::types::UnitLength::M) + .await + .unwrap(); + twenty_twenty::assert_image("tests/executor/outputs/cube_m.png", &result, 1.0); +} + +#[tokio::test(flavor = "multi_thread")] +async fn serial_test_cube_in() { + let code = r#"fn cube = (pos, scale) => { + const sg = startSketchOn('XY') + |> startProfileAt(pos, %) + |> line([0, scale], %) + |> line([scale, 0], %) + |> line([0, -scale], %) + |> close(%) + |> extrude(scale, %) + + return sg +} + +const myCube = cube([0,0], 10) +"#; + + let result = execute_and_snapshot(code, kittycad::types::UnitLength::In) + .await + .unwrap(); + twenty_twenty::assert_image("tests/executor/outputs/cube_in.png", &result, 1.0); +} + +#[tokio::test(flavor = "multi_thread")] +async fn serial_test_cube_ft() { + let code = r#"fn cube = (pos, scale) => { + const sg = startSketchOn('XY') + |> startProfileAt(pos, %) + |> line([0, scale], %) + |> line([scale, 0], %) + |> line([0, -scale], %) + |> close(%) + |> extrude(scale, %) + + return sg +} + +const myCube = cube([0,0], 10) +"#; + + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Ft) + .await + .unwrap(); + twenty_twenty::assert_image("tests/executor/outputs/cube_ft.png", &result, 1.0); +} + +#[tokio::test(flavor = "multi_thread")] +async fn serial_test_cube_yd() { + let code = r#"fn cube = (pos, scale) => { + const sg = startSketchOn('XY') + |> startProfileAt(pos, %) + |> line([0, scale], %) + |> line([scale, 0], %) + |> line([0, -scale], %) + |> close(%) + |> extrude(scale, %) + + return sg +} + +const myCube = cube([0,0], 10) +"#; + + let result = execute_and_snapshot(code, kittycad::types::UnitLength::Yd) + .await + .unwrap(); + twenty_twenty::assert_image("tests/executor/outputs/cube_yd.png", &result, 1.0); +} diff --git a/src/wasm-lib/tests/executor/outputs/angled_line.png b/src/wasm-lib/tests/executor/outputs/angled_line.png index 46024d661..0845ce68e 100644 Binary files a/src/wasm-lib/tests/executor/outputs/angled_line.png and b/src/wasm-lib/tests/executor/outputs/angled_line.png differ diff --git a/src/wasm-lib/tests/executor/outputs/close_arc.png b/src/wasm-lib/tests/executor/outputs/close_arc.png index 58d66c45d..fa50ea171 100644 Binary files a/src/wasm-lib/tests/executor/outputs/close_arc.png and b/src/wasm-lib/tests/executor/outputs/close_arc.png differ diff --git a/src/wasm-lib/tests/executor/outputs/cube_cm.png b/src/wasm-lib/tests/executor/outputs/cube_cm.png new file mode 100644 index 000000000..ed56b3c5f Binary files /dev/null and b/src/wasm-lib/tests/executor/outputs/cube_cm.png differ diff --git a/src/wasm-lib/tests/executor/outputs/cube_ft.png b/src/wasm-lib/tests/executor/outputs/cube_ft.png new file mode 100644 index 000000000..5a7f5ae18 Binary files /dev/null and b/src/wasm-lib/tests/executor/outputs/cube_ft.png differ diff --git a/src/wasm-lib/tests/executor/outputs/cube_in.png b/src/wasm-lib/tests/executor/outputs/cube_in.png new file mode 100644 index 000000000..2cc0b5e01 Binary files /dev/null and b/src/wasm-lib/tests/executor/outputs/cube_in.png differ diff --git a/src/wasm-lib/tests/executor/outputs/cube_m.png b/src/wasm-lib/tests/executor/outputs/cube_m.png new file mode 100644 index 000000000..09b28b3fc Binary files /dev/null and b/src/wasm-lib/tests/executor/outputs/cube_m.png differ diff --git a/src/wasm-lib/tests/executor/outputs/cube_mm.png b/src/wasm-lib/tests/executor/outputs/cube_mm.png new file mode 100644 index 000000000..86405543b Binary files /dev/null and b/src/wasm-lib/tests/executor/outputs/cube_mm.png differ diff --git a/src/wasm-lib/tests/executor/outputs/cube_yd.png b/src/wasm-lib/tests/executor/outputs/cube_yd.png new file mode 100644 index 000000000..462fef08c Binary files /dev/null and b/src/wasm-lib/tests/executor/outputs/cube_yd.png differ diff --git a/src/wasm-lib/tests/executor/outputs/cylinder.png b/src/wasm-lib/tests/executor/outputs/cylinder.png index 0cad1968d..f3185636a 100644 Binary files a/src/wasm-lib/tests/executor/outputs/cylinder.png and b/src/wasm-lib/tests/executor/outputs/cylinder.png differ diff --git a/src/wasm-lib/tests/executor/outputs/different_planes_same_drawing.png b/src/wasm-lib/tests/executor/outputs/different_planes_same_drawing.png index 9c1987ad5..3de2e9487 100644 Binary files a/src/wasm-lib/tests/executor/outputs/different_planes_same_drawing.png and b/src/wasm-lib/tests/executor/outputs/different_planes_same_drawing.png differ diff --git a/src/wasm-lib/tests/executor/outputs/function_sketch.png b/src/wasm-lib/tests/executor/outputs/function_sketch.png index ef9cad152..0cb656e58 100644 Binary files a/src/wasm-lib/tests/executor/outputs/function_sketch.png and b/src/wasm-lib/tests/executor/outputs/function_sketch.png differ diff --git a/src/wasm-lib/tests/executor/outputs/function_sketch_with_position.png b/src/wasm-lib/tests/executor/outputs/function_sketch_with_position.png index ef9cad152..0cb656e58 100644 Binary files a/src/wasm-lib/tests/executor/outputs/function_sketch_with_position.png and b/src/wasm-lib/tests/executor/outputs/function_sketch_with_position.png differ diff --git a/src/wasm-lib/tests/executor/outputs/holes.png b/src/wasm-lib/tests/executor/outputs/holes.png index d5775d753..75cd2820f 100644 Binary files a/src/wasm-lib/tests/executor/outputs/holes.png and b/src/wasm-lib/tests/executor/outputs/holes.png differ diff --git a/src/wasm-lib/tests/executor/outputs/import_glb.png b/src/wasm-lib/tests/executor/outputs/import_glb.png index 7eeb08f28..a34b01cb3 100644 Binary files a/src/wasm-lib/tests/executor/outputs/import_glb.png and b/src/wasm-lib/tests/executor/outputs/import_glb.png differ diff --git a/src/wasm-lib/tests/executor/outputs/import_glb_no_assign.png b/src/wasm-lib/tests/executor/outputs/import_glb_no_assign.png index 7eeb08f28..a34b01cb3 100644 Binary files a/src/wasm-lib/tests/executor/outputs/import_glb_no_assign.png and b/src/wasm-lib/tests/executor/outputs/import_glb_no_assign.png differ diff --git a/src/wasm-lib/tests/executor/outputs/import_gltf_embedded.png b/src/wasm-lib/tests/executor/outputs/import_gltf_embedded.png index 7eeb08f28..a34b01cb3 100644 Binary files a/src/wasm-lib/tests/executor/outputs/import_gltf_embedded.png and b/src/wasm-lib/tests/executor/outputs/import_gltf_embedded.png differ diff --git a/src/wasm-lib/tests/executor/outputs/import_gltf_with_bin.png b/src/wasm-lib/tests/executor/outputs/import_gltf_with_bin.png index 7eeb08f28..a34b01cb3 100644 Binary files a/src/wasm-lib/tests/executor/outputs/import_gltf_with_bin.png and b/src/wasm-lib/tests/executor/outputs/import_gltf_with_bin.png differ diff --git a/src/wasm-lib/tests/executor/outputs/import_obj_with_mtl.png b/src/wasm-lib/tests/executor/outputs/import_obj_with_mtl.png index 0a4ac8b71..27d69bd9d 100644 Binary files a/src/wasm-lib/tests/executor/outputs/import_obj_with_mtl.png and b/src/wasm-lib/tests/executor/outputs/import_obj_with_mtl.png differ diff --git a/src/wasm-lib/tests/executor/outputs/import_obj_with_mtl_units.png b/src/wasm-lib/tests/executor/outputs/import_obj_with_mtl_units.png index 7eeb08f28..a34b01cb3 100644 Binary files a/src/wasm-lib/tests/executor/outputs/import_obj_with_mtl_units.png and b/src/wasm-lib/tests/executor/outputs/import_obj_with_mtl_units.png differ diff --git a/src/wasm-lib/tests/executor/outputs/lots_of_planes.png b/src/wasm-lib/tests/executor/outputs/lots_of_planes.png index 1d09f114a..d6040dca8 100644 Binary files a/src/wasm-lib/tests/executor/outputs/lots_of_planes.png and b/src/wasm-lib/tests/executor/outputs/lots_of_planes.png differ diff --git a/src/wasm-lib/tests/executor/outputs/member_expression_sketch_group.png b/src/wasm-lib/tests/executor/outputs/member_expression_sketch_group.png index 34dfbda04..7a2674b4a 100644 Binary files a/src/wasm-lib/tests/executor/outputs/member_expression_sketch_group.png and b/src/wasm-lib/tests/executor/outputs/member_expression_sketch_group.png differ diff --git a/src/wasm-lib/tests/executor/outputs/negative_args.png b/src/wasm-lib/tests/executor/outputs/negative_args.png index 349f36d51..1a82c85a8 100644 Binary files a/src/wasm-lib/tests/executor/outputs/negative_args.png and b/src/wasm-lib/tests/executor/outputs/negative_args.png differ diff --git a/src/wasm-lib/tests/executor/outputs/optional_params.png b/src/wasm-lib/tests/executor/outputs/optional_params.png index ed37a993a..6c7ad1d00 100644 Binary files a/src/wasm-lib/tests/executor/outputs/optional_params.png and b/src/wasm-lib/tests/executor/outputs/optional_params.png differ diff --git a/src/wasm-lib/tests/executor/outputs/parametric.png b/src/wasm-lib/tests/executor/outputs/parametric.png index b86c421bb..28378da77 100644 Binary files a/src/wasm-lib/tests/executor/outputs/parametric.png and b/src/wasm-lib/tests/executor/outputs/parametric.png differ diff --git a/src/wasm-lib/tests/executor/outputs/parametric_with_tan_arc.png b/src/wasm-lib/tests/executor/outputs/parametric_with_tan_arc.png index 52f1eff92..010739f39 100644 Binary files a/src/wasm-lib/tests/executor/outputs/parametric_with_tan_arc.png and b/src/wasm-lib/tests/executor/outputs/parametric_with_tan_arc.png differ diff --git a/src/wasm-lib/tests/executor/outputs/patterns_circular_3d_tilted_axis.png b/src/wasm-lib/tests/executor/outputs/patterns_circular_3d_tilted_axis.png index beced47ee..449215385 100644 Binary files a/src/wasm-lib/tests/executor/outputs/patterns_circular_3d_tilted_axis.png and b/src/wasm-lib/tests/executor/outputs/patterns_circular_3d_tilted_axis.png differ diff --git a/src/wasm-lib/tests/executor/outputs/patterns_circular_basic_2d.png b/src/wasm-lib/tests/executor/outputs/patterns_circular_basic_2d.png index ef8b773ba..e685878fd 100644 Binary files a/src/wasm-lib/tests/executor/outputs/patterns_circular_basic_2d.png and b/src/wasm-lib/tests/executor/outputs/patterns_circular_basic_2d.png differ diff --git a/src/wasm-lib/tests/executor/outputs/patterns_circular_basic_3d.png b/src/wasm-lib/tests/executor/outputs/patterns_circular_basic_3d.png index a946751d4..e00f90870 100644 Binary files a/src/wasm-lib/tests/executor/outputs/patterns_circular_basic_3d.png and b/src/wasm-lib/tests/executor/outputs/patterns_circular_basic_3d.png differ diff --git a/src/wasm-lib/tests/executor/outputs/patterns_linear_basic.png b/src/wasm-lib/tests/executor/outputs/patterns_linear_basic.png index b5e6cca26..5b9355b1c 100644 Binary files a/src/wasm-lib/tests/executor/outputs/patterns_linear_basic.png and b/src/wasm-lib/tests/executor/outputs/patterns_linear_basic.png differ diff --git a/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_3d.png b/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_3d.png index 0deb03869..a52b09d87 100644 Binary files a/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_3d.png and b/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_3d.png differ diff --git a/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_holes.png b/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_holes.png index 770e2b4ea..454f9ae12 100644 Binary files a/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_holes.png and b/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_holes.png differ diff --git a/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_negative_axis.png b/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_negative_axis.png index 0f6e47dee..7721f0178 100644 Binary files a/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_negative_axis.png and b/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_negative_axis.png differ diff --git a/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_negative_distance.png b/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_negative_distance.png index 0f6e47dee..7721f0178 100644 Binary files a/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_negative_distance.png and b/src/wasm-lib/tests/executor/outputs/patterns_linear_basic_negative_distance.png differ diff --git a/src/wasm-lib/tests/executor/outputs/rounded_with_holes.png b/src/wasm-lib/tests/executor/outputs/rounded_with_holes.png index c0b6991dc..d941b1649 100644 Binary files a/src/wasm-lib/tests/executor/outputs/rounded_with_holes.png and b/src/wasm-lib/tests/executor/outputs/rounded_with_holes.png differ diff --git a/src/wasm-lib/tests/executor/outputs/sketch_on_face.png b/src/wasm-lib/tests/executor/outputs/sketch_on_face.png index 739046c54..857b2ef27 100644 Binary files a/src/wasm-lib/tests/executor/outputs/sketch_on_face.png and b/src/wasm-lib/tests/executor/outputs/sketch_on_face.png differ diff --git a/src/wasm-lib/tests/executor/outputs/sketch_on_face_end.png b/src/wasm-lib/tests/executor/outputs/sketch_on_face_end.png index c51b5d312..a189152a5 100644 Binary files a/src/wasm-lib/tests/executor/outputs/sketch_on_face_end.png and b/src/wasm-lib/tests/executor/outputs/sketch_on_face_end.png differ diff --git a/src/wasm-lib/tests/executor/outputs/sketch_on_face_start.png b/src/wasm-lib/tests/executor/outputs/sketch_on_face_start.png index 894b3db10..a641057c3 100644 Binary files a/src/wasm-lib/tests/executor/outputs/sketch_on_face_start.png and b/src/wasm-lib/tests/executor/outputs/sketch_on_face_start.png differ diff --git a/src/wasm-lib/tests/executor/outputs/tangential_arc.png b/src/wasm-lib/tests/executor/outputs/tangential_arc.png index c8a1136be..962ad16b9 100644 Binary files a/src/wasm-lib/tests/executor/outputs/tangential_arc.png and b/src/wasm-lib/tests/executor/outputs/tangential_arc.png differ diff --git a/src/wasm-lib/tests/executor/outputs/tangential_arc_to.png b/src/wasm-lib/tests/executor/outputs/tangential_arc_to.png index c8a1136be..962ad16b9 100644 Binary files a/src/wasm-lib/tests/executor/outputs/tangential_arc_to.png and b/src/wasm-lib/tests/executor/outputs/tangential_arc_to.png differ diff --git a/src/wasm-lib/tests/executor/outputs/tangential_arc_with_point.png b/src/wasm-lib/tests/executor/outputs/tangential_arc_with_point.png index c8a1136be..962ad16b9 100644 Binary files a/src/wasm-lib/tests/executor/outputs/tangential_arc_with_point.png and b/src/wasm-lib/tests/executor/outputs/tangential_arc_with_point.png differ diff --git a/src/wasm-lib/tests/executor/outputs/top_level_expression.png b/src/wasm-lib/tests/executor/outputs/top_level_expression.png index 0cad1968d..f3185636a 100644 Binary files a/src/wasm-lib/tests/executor/outputs/top_level_expression.png and b/src/wasm-lib/tests/executor/outputs/top_level_expression.png differ diff --git a/src/wasm-lib/tests/modify/main.rs b/src/wasm-lib/tests/modify/main.rs index fd2b08632..c03239c12 100644 --- a/src/wasm-lib/tests/modify/main.rs +++ b/src/wasm-lib/tests/modify/main.rs @@ -37,7 +37,7 @@ async fn setup(code: &str, name: &str) -> Result<(ExecutorContext, Program, uuid let parser = kcl_lib::parser::Parser::new(tokens); let program = parser.ast()?; let mut mem: kcl_lib::executor::ProgramMemory = Default::default(); - let ctx = kcl_lib::executor::ExecutorContext::new(ws).await?; + let ctx = kcl_lib::executor::ExecutorContext::new(ws, kittycad::types::UnitLength::Mm).await?; let memory = kcl_lib::executor::execute(program.clone(), &mut mem, kcl_lib::executor::BodyType::Root, &ctx).await?; // We need to get the sketch ID. diff --git a/vite.config.ts b/vite.config.ts index 645b504ce..ab2bb0c9d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -35,7 +35,7 @@ const config = defineConfig({ viteTsconfigPaths(), eslint(), version(), - ] + ], }) export default config \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index fe22adadd..ce2385d0a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -66,7 +66,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== -"@babel/core@^7.12.3", "@babel/core@^7.16.0", "@babel/core@^7.23.2": +"@babel/core@^7.16.0": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.2.tgz#ed10df0d580fff67c5f3ee70fd22e2e4c90a9f94" integrity sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ== @@ -87,7 +87,7 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/core@^7.21.4": +"@babel/core@^7.21.4", "@babel/core@^7.23.5": version "7.23.9" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.9.tgz#b028820718000f267870822fec434820e9b1e4d1" integrity sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw== @@ -450,16 +450,16 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== -"@babel/parser@^7.14.7", "@babel/parser@^7.22.5": - version "7.22.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae" - integrity sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q== - "@babel/parser@^7.21.4", "@babel/parser@^7.23.9": version "7.23.9" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.9.tgz#7b903b6149b0f8fa7ad564af646c4c38a77fc44b" integrity sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA== +"@babel/parser@^7.22.5": + version "7.22.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae" + integrity sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz#5cd1c87ba9380d0afb78469292c954fee5d2411a" @@ -1034,17 +1034,17 @@ dependencies: "@babel/plugin-transform-react-jsx" "^7.22.5" -"@babel/plugin-transform-react-jsx-self@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.22.5.tgz#ca2fdc11bc20d4d46de01137318b13d04e481d8e" - integrity sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g== +"@babel/plugin-transform-react-jsx-self@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.23.3.tgz#ed3e7dadde046cce761a8e3cf003a13d1a7972d9" + integrity sha512-qXRvbeKDSfwnlJnanVRp0SfuWE5DQhwQr5xtLBzp56Wabyo+4CMosF6Kfp+eOD/4FYpql64XVJ2W0pVLlJZxOQ== dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-react-jsx-source@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.22.5.tgz#49af1615bfdf6ed9d3e9e43e425e0b2b65d15b6c" - integrity sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w== +"@babel/plugin-transform-react-jsx-source@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.23.3.tgz#03527006bdc8775247a78643c51d4e715fe39a3e" + integrity sha512-91RS0MDnAWDNvGC6Wio5XYkyWI39FMFO+JK9+4AlgaTH+yWwVTsw7/sn6LK0lH7c5F+TFkpv/3LfCJ1Ydwof/g== dependencies: "@babel/helper-plugin-utils" "^7.22.5" @@ -1459,115 +1459,120 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@esbuild/android-arm64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.17.tgz#9e00eb6865ed5f2dbe71a1e96f2c52254cd92903" - integrity sha512-9np+YYdNDed5+Jgr1TdWBsozZ85U1Oa3xW0c7TWqH0y2aGghXtZsuT8nYRbzOMcl0bXZXjOGbksoTtVOlWrRZg== +"@esbuild/aix-ppc64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz#d1bc06aedb6936b3b6d313bf809a5a40387d2b7f" + integrity sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA== -"@esbuild/android-arm@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.17.tgz#1aa013b65524f4e9f794946b415b32ae963a4618" - integrity sha512-wHsmJG/dnL3OkpAcwbgoBTTMHVi4Uyou3F5mf58ZtmUyIKfcdA7TROav/6tCzET4A3QW2Q2FC+eFneMU+iyOxg== +"@esbuild/android-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz#7ad65a36cfdb7e0d429c353e00f680d737c2aed4" + integrity sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA== -"@esbuild/android-x64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.17.tgz#c2bd0469b04ded352de011fae34a7a1d4dcecb79" - integrity sha512-O+FeWB/+xya0aLg23hHEM2E3hbfwZzjqumKMSIqcHbNvDa+dza2D0yLuymRBQQnC34CWrsJUXyH2MG5VnLd6uw== +"@esbuild/android-arm@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.12.tgz#b0c26536f37776162ca8bde25e42040c203f2824" + integrity sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w== -"@esbuild/darwin-arm64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.17.tgz#0c21a59cb5bd7a2cec66c7a42431dca42aefeddd" - integrity sha512-M9uJ9VSB1oli2BE/dJs3zVr9kcCBBsE883prage1NWz6pBS++1oNn/7soPNS3+1DGj0FrkSvnED4Bmlu1VAE9g== +"@esbuild/android-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.12.tgz#cb13e2211282012194d89bf3bfe7721273473b3d" + integrity sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew== -"@esbuild/darwin-x64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.17.tgz#92f8763ff6f97dff1c28a584da7b51b585e87a7b" - integrity sha512-XDre+J5YeIJDMfp3n0279DFNrGCXlxOuGsWIkRb1NThMZ0BsrWXoTg23Jer7fEXQ9Ye5QjrvXpxnhzl3bHtk0g== +"@esbuild/darwin-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz#cbee41e988020d4b516e9d9e44dd29200996275e" + integrity sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g== -"@esbuild/freebsd-arm64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.17.tgz#934f74bdf4022e143ba2f21d421b50fd0fead8f8" - integrity sha512-cjTzGa3QlNfERa0+ptykyxs5A6FEUQQF0MuilYXYBGdBxD3vxJcKnzDlhDCa1VAJCmAxed6mYhA2KaJIbtiNuQ== +"@esbuild/darwin-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz#e37d9633246d52aecf491ee916ece709f9d5f4cd" + integrity sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A== -"@esbuild/freebsd-x64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.17.tgz#16b6e90ba26ecc865eab71c56696258ec7f5d8bf" - integrity sha512-sOxEvR8d7V7Kw8QqzxWc7bFfnWnGdaFBut1dRUYtu+EIRXefBc/eIsiUiShnW0hM3FmQ5Zf27suDuHsKgZ5QrA== +"@esbuild/freebsd-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz#1ee4d8b682ed363b08af74d1ea2b2b4dbba76487" + integrity sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA== -"@esbuild/linux-arm64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.17.tgz#179a58e8d4c72116eb068563629349f8f4b48072" - integrity sha512-c9w3tE7qA3CYWjT+M3BMbwMt+0JYOp3vCMKgVBrCl1nwjAlOMYzEo+gG7QaZ9AtqZFj5MbUc885wuBBmu6aADQ== +"@esbuild/freebsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz#37a693553d42ff77cd7126764b535fb6cc28a11c" + integrity sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg== -"@esbuild/linux-arm@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.17.tgz#9d78cf87a310ae9ed985c3915d5126578665c7b5" - integrity sha512-2d3Lw6wkwgSLC2fIvXKoMNGVaeY8qdN0IC3rfuVxJp89CRfA3e3VqWifGDfuakPmp90+ZirmTfye1n4ncjv2lg== +"@esbuild/linux-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz#be9b145985ec6c57470e0e051d887b09dddb2d4b" + integrity sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA== -"@esbuild/linux-ia32@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.17.tgz#6fed202602d37361bca376c9d113266a722a908c" - integrity sha512-1DS9F966pn5pPnqXYz16dQqWIB0dmDfAQZd6jSSpiT9eX1NzKh07J6VKR3AoXXXEk6CqZMojiVDSZi1SlmKVdg== +"@esbuild/linux-arm@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz#207ecd982a8db95f7b5279207d0ff2331acf5eef" + integrity sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w== -"@esbuild/linux-loong64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.17.tgz#cdc60304830be1e74560c704bfd72cab8a02fa06" - integrity sha512-EvLsxCk6ZF0fpCB6w6eOI2Fc8KW5N6sHlIovNe8uOFObL2O+Mr0bflPHyHwLT6rwMg9r77WOAWb2FqCQrVnwFg== +"@esbuild/linux-ia32@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz#d0d86b5ca1562523dc284a6723293a52d5860601" + integrity sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA== -"@esbuild/linux-mips64el@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.17.tgz#c367b2855bb0902f5576291a2049812af2088086" - integrity sha512-e0bIdHA5p6l+lwqTE36NAW5hHtw2tNRmHlGBygZC14QObsA3bD4C6sXLJjvnDIjSKhW1/0S3eDy+QmX/uZWEYQ== +"@esbuild/linux-loong64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz#9a37f87fec4b8408e682b528391fa22afd952299" + integrity sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA== -"@esbuild/linux-ppc64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.17.tgz#7fdc0083d42d64a4651711ee0a7964f489242f45" - integrity sha512-BAAilJ0M5O2uMxHYGjFKn4nJKF6fNCdP1E0o5t5fvMYYzeIqy2JdAP88Az5LHt9qBoUa4tDaRpfWt21ep5/WqQ== +"@esbuild/linux-mips64el@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz#4ddebd4e6eeba20b509d8e74c8e30d8ace0b89ec" + integrity sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w== -"@esbuild/linux-riscv64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.17.tgz#5198a417f3f5b86b10c95647b8bc032e5b6b2b1c" - integrity sha512-Wh/HW2MPnC3b8BqRSIme/9Zhab36PPH+3zam5pqGRH4pE+4xTrVLx2+XdGp6fVS3L2x+DrsIcsbMleex8fbE6g== +"@esbuild/linux-ppc64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz#adb67dadb73656849f63cd522f5ecb351dd8dee8" + integrity sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg== -"@esbuild/linux-s390x@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.17.tgz#7459c2fecdee2d582f0697fb76a4041f4ad1dd1e" - integrity sha512-j/34jAl3ul3PNcK3pfI0NSlBANduT2UO5kZ7FCaK33XFv3chDhICLY8wJJWIhiQ+YNdQ9dxqQctRg2bvrMlYgg== +"@esbuild/linux-riscv64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz#11bc0698bf0a2abf8727f1c7ace2112612c15adf" + integrity sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg== -"@esbuild/linux-x64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.17.tgz#948cdbf46d81c81ebd7225a7633009bc56a4488c" - integrity sha512-QM50vJ/y+8I60qEmFxMoxIx4de03pGo2HwxdBeFd4nMh364X6TIBZ6VQ5UQmPbQWUVWHWws5MmJXlHAXvJEmpQ== +"@esbuild/linux-s390x@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz#e86fb8ffba7c5c92ba91fc3b27ed5a70196c3cc8" + integrity sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg== -"@esbuild/netbsd-x64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.17.tgz#6bb89668c0e093c5a575ded08e1d308bd7fd63e7" - integrity sha512-/jGlhWR7Sj9JPZHzXyyMZ1RFMkNPjC6QIAan0sDOtIo2TYk3tZn5UDrkE0XgsTQCxWTTOcMPf9p6Rh2hXtl5TQ== +"@esbuild/linux-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz#5f37cfdc705aea687dfe5dfbec086a05acfe9c78" + integrity sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg== -"@esbuild/openbsd-x64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.17.tgz#abac2ae75fef820ef6c2c48da4666d092584c79d" - integrity sha512-rSEeYaGgyGGf4qZM2NonMhMOP/5EHp4u9ehFiBrg7stH6BYEEjlkVREuDEcQ0LfIl53OXLxNbfuIj7mr5m29TA== +"@esbuild/netbsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz#29da566a75324e0d0dd7e47519ba2f7ef168657b" + integrity sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA== -"@esbuild/sunos-x64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.17.tgz#74a45fe1db8ea96898f1a9bb401dcf1dadfc8371" - integrity sha512-Y7ZBbkLqlSgn4+zot4KUNYst0bFoO68tRgI6mY2FIM+b7ZbyNVtNbDP5y8qlu4/knZZ73fgJDlXID+ohY5zt5g== +"@esbuild/openbsd-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz#306c0acbdb5a99c95be98bdd1d47c916e7dc3ff0" + integrity sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw== -"@esbuild/win32-arm64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.17.tgz#fd95ffd217995589058a4ed8ac17ee72a3d7f615" - integrity sha512-bwPmTJsEQcbZk26oYpc4c/8PvTY3J5/QK8jM19DVlEsAB41M39aWovWoHtNm78sd6ip6prilxeHosPADXtEJFw== +"@esbuild/sunos-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz#0933eaab9af8b9b2c930236f62aae3fc593faf30" + integrity sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA== -"@esbuild/win32-ia32@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.17.tgz#9b7ef5d0df97593a80f946b482e34fcba3fa4aaf" - integrity sha512-H/XaPtPKli2MhW+3CQueo6Ni3Avggi6hP/YvgkEe1aSaxw+AeO8MFjq8DlgfTd9Iz4Yih3QCZI6YLMoyccnPRg== +"@esbuild/win32-arm64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz#773bdbaa1971b36db2f6560088639ccd1e6773ae" + integrity sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A== -"@esbuild/win32-x64@0.18.17": - version "0.18.17" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.17.tgz#bcb2e042631b3c15792058e189ed879a22b2968b" - integrity sha512-fGEb8f2BSA3CW7riJVurug65ACLuQAzKq0SSqkY2b2yHHH0MzDfbLyKIGzHwOI/gkHcxM/leuSW6D5w/LMNitA== +"@esbuild/win32-ia32@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz#000516cad06354cc84a73f0943a4aa690ef6fd67" + integrity sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ== + +"@esbuild/win32-x64@0.19.12": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz#c57c8afbb4054a3ab8317591a0b7320360b444ae" + integrity sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA== "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" @@ -1689,11 +1694,6 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - "@jest/expect-utils@^29.6.2": version "29.6.2" resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.6.2.tgz#1b97f290d0185d264dd9fdec7567a14a38a90534" @@ -1801,10 +1801,10 @@ resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60" integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA== -"@kittycad/lib@^0.0.50": - version "0.0.50" - resolved "https://registry.yarnpkg.com/@kittycad/lib/-/lib-0.0.50.tgz#d80890af317d413bddc3f2c212d941b196d8f027" - integrity sha512-kiwfN8ybR8v8XuskZ64CF20Y9B+1gdDL7vj6xy56Uw0hxcqUmTqu9t1U5BIzWCTsMimL6e9+moZmN6leNOXIEA== +"@kittycad/lib@^0.0.53": + version "0.0.53" + resolved "https://registry.yarnpkg.com/@kittycad/lib/-/lib-0.0.53.tgz#32f10f63428c5f3bb6a435507dbfa72c1e7ba10d" + integrity sha512-a0WTVVGKE+J7I1bERn8pcr8cC5/X14dFi78Y7wAsu8ok/SuHVTPoPHVCZ8bUmcWzY1iWpLC/HCIIHigXjkF3ZA== dependencies: node-fetch "3.3.2" openapi-types "^12.0.0" @@ -1960,6 +1960,71 @@ estree-walker "^2.0.1" picomatch "^2.2.2" +"@rollup/rollup-android-arm-eabi@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz#38c3abd1955a3c21d492af6b1a1dca4bb1d894d6" + integrity sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w== + +"@rollup/rollup-android-arm64@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.0.tgz#3822e929f415627609e53b11cec9a4be806de0e2" + integrity sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ== + +"@rollup/rollup-darwin-arm64@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.0.tgz#6c082de71f481f57df6cfa3701ab2a7afde96f69" + integrity sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ== + +"@rollup/rollup-darwin-x64@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.0.tgz#c34ca0d31f3c46a22c9afa0e944403eea0edcfd8" + integrity sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg== + +"@rollup/rollup-linux-arm-gnueabihf@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.0.tgz#48e899c1e438629c072889b824a98787a7c2362d" + integrity sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA== + +"@rollup/rollup-linux-arm64-gnu@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.0.tgz#788c2698a119dc229062d40da6ada8a090a73a68" + integrity sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA== + +"@rollup/rollup-linux-arm64-musl@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.0.tgz#3882a4e3a564af9e55804beeb67076857b035ab7" + integrity sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ== + +"@rollup/rollup-linux-riscv64-gnu@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.0.tgz#0c6ad792e1195c12bfae634425a3d2aa0fe93ab7" + integrity sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw== + +"@rollup/rollup-linux-x64-gnu@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.0.tgz#9d62485ea0f18d8674033b57aa14fb758f6ec6e3" + integrity sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA== + +"@rollup/rollup-linux-x64-musl@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.0.tgz#50e8167e28b33c977c1f813def2b2074d1435e05" + integrity sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw== + +"@rollup/rollup-win32-arm64-msvc@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.0.tgz#68d233272a2004429124494121a42c4aebdc5b8e" + integrity sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw== + +"@rollup/rollup-win32-ia32-msvc@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.0.tgz#366ca62221d1689e3b55a03f4ae12ae9ba595d40" + integrity sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA== + +"@rollup/rollup-win32-x64-msvc@4.12.0": + version "4.12.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.0.tgz#9ffdf9ed133a7464f4ae187eb9e1294413fab235" + integrity sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg== + "@rushstack/eslint-patch@^1.1.0": version "1.3.2" resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.3.2.tgz#31b9c510d8cada9683549e1dbb4284cca5001faf" @@ -2236,10 +2301,10 @@ resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.1.tgz#3286741fb8f1e1580ac28784add4c7a1d49bdfbc" integrity sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q== -"@types/babel__core@^7.20.3": - version "7.20.4" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.4.tgz#26a87347e6c6f753b3668398e34496d6d9ac6ac0" - integrity sha512-mLnSC22IC4vcWiuObSRjrLd9XcBTGf59vUSoq2jkQDJ/QQ8PMI9rSuzE+aEV8karUMbskw07bKYoUJCKTUaygg== +"@types/babel__core@^7.20.5": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== dependencies: "@babel/parser" "^7.20.7" "@babel/types" "^7.20.7" @@ -2269,18 +2334,6 @@ dependencies: "@babel/types" "^7.20.7" -"@types/chai-subset@^1.3.3": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@types/chai-subset/-/chai-subset-1.3.3.tgz#97893814e92abd2c534de422cb377e0e0bdaac94" - integrity sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw== - dependencies: - "@types/chai" "*" - -"@types/chai@*", "@types/chai@^4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.5.tgz#ae69bcbb1bebb68c4ac0b11e9d8ed04526b3562b" - integrity sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng== - "@types/crypto-js@^4.1.1": version "4.1.1" resolved "https://registry.yarnpkg.com/@types/crypto-js/-/crypto-js-4.1.1.tgz#602859584cecc91894eb23a4892f38cfa927890d" @@ -2304,16 +2357,16 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== +"@types/estree@1.0.5", "@types/estree@^1.0.0": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + "@types/http-cache-semantics@^4.0.2": version "4.0.4" resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4" integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA== -"@types/isomorphic-fetch@^0.0.36": - version "0.0.36" - resolved "https://registry.yarnpkg.com/@types/isomorphic-fetch/-/isomorphic-fetch-0.0.36.tgz#3a6d8f63974baf26b10fd1314db910633108a769" - integrity sha512-ulw4d+vW1HKn4oErSmNN2HYEcHGq0N1C5exlrMM0CRqX1UUpFhGb5lwiom5j9KN3LBJJDLRmYIZz1ghm7FIzZw== - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" @@ -2638,72 +2691,60 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@vitejs/plugin-react@^4.1.1": - version "4.1.1" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.1.1.tgz#a10254dc76778027407d01b6ddbca53b23852a72" - integrity sha512-Jie2HERK+uh27e+ORXXwEP5h0Y2lS9T2PRGbfebiHGlwzDO0dEnd2aNtOR/qjBlPb1YgxwAONeblL1xqLikLag== +"@vitejs/plugin-react@^4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz#744d8e4fcb120fc3dbaa471dadd3483f5a304bb9" + integrity sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ== dependencies: - "@babel/core" "^7.23.2" - "@babel/plugin-transform-react-jsx-self" "^7.22.5" - "@babel/plugin-transform-react-jsx-source" "^7.22.5" - "@types/babel__core" "^7.20.3" + "@babel/core" "^7.23.5" + "@babel/plugin-transform-react-jsx-self" "^7.23.3" + "@babel/plugin-transform-react-jsx-source" "^7.23.3" + "@types/babel__core" "^7.20.5" react-refresh "^0.14.0" -"@vitest/coverage-istanbul@^0.34.6": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/coverage-istanbul/-/coverage-istanbul-0.34.6.tgz#4fc91eac4d7cfc5b91850e9f82bcb986990b79a4" - integrity sha512-5KaBNZPDSk2ybavC3rZ1pWGniw7sJ5usuwVGRUYzJwiBfWvnLpuUer7bjw7qUCRGdKJXrBgb/Dsgif9rkwMX/A== +"@vitest/expect@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.3.1.tgz#d4c14b89c43a25fd400a6b941f51ba27fe0cb918" + integrity sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw== dependencies: - istanbul-lib-coverage "^3.2.0" - istanbul-lib-instrument "^6.0.0" - istanbul-lib-report "^3.0.1" - istanbul-lib-source-maps "^4.0.1" - istanbul-reports "^3.1.5" - picocolors "^1.0.0" - test-exclude "^6.0.0" - -"@vitest/expect@0.34.6": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.34.6.tgz#608a7b7a9aa3de0919db99b4cc087340a03ea77e" - integrity sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw== - dependencies: - "@vitest/spy" "0.34.6" - "@vitest/utils" "0.34.6" + "@vitest/spy" "1.3.1" + "@vitest/utils" "1.3.1" chai "^4.3.10" -"@vitest/runner@0.34.6": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.34.6.tgz#6f43ca241fc96b2edf230db58bcde5b974b8dcaf" - integrity sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ== +"@vitest/runner@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-1.3.1.tgz#e7f96cdf74842934782bfd310eef4b8695bbfa30" + integrity sha512-5FzF9c3jG/z5bgCnjr8j9LNq/9OxV2uEBAITOXfoe3rdZJTdO7jzThth7FXv/6b+kdY65tpRQB7WaKhNZwX+Kg== dependencies: - "@vitest/utils" "0.34.6" - p-limit "^4.0.0" + "@vitest/utils" "1.3.1" + p-limit "^5.0.0" pathe "^1.1.1" -"@vitest/snapshot@0.34.6": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-0.34.6.tgz#b4528cf683b60a3e8071cacbcb97d18b9d5e1d8b" - integrity sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w== +"@vitest/snapshot@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-1.3.1.tgz#193a5d7febf6ec5d22b3f8c5a093f9e4322e7a88" + integrity sha512-EF++BZbt6RZmOlE3SuTPu/NfwBF6q4ABS37HHXzs2LUVPBLx2QoY/K0fKpRChSo8eLiuxcbCVfqKgx/dplCDuQ== dependencies: - magic-string "^0.30.1" + magic-string "^0.30.5" pathe "^1.1.1" - pretty-format "^29.5.0" + pretty-format "^29.7.0" -"@vitest/spy@0.34.6": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.34.6.tgz#b5e8642a84aad12896c915bce9b3cc8cdaf821df" - integrity sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ== +"@vitest/spy@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-1.3.1.tgz#814245d46d011b99edd1c7528f5725c64e85a88b" + integrity sha512-xAcW+S099ylC9VLU7eZfdT9myV67Nor9w9zhf0mGCYJSO+zM2839tOeROTdikOi/8Qeusffvxb/MyBSOja1Uig== dependencies: - tinyspy "^2.1.1" + tinyspy "^2.2.0" -"@vitest/utils@0.34.6": - version "0.34.6" - resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.34.6.tgz#38a0a7eedddb8e7291af09a2409cb8a189516968" - integrity sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A== +"@vitest/utils@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-1.3.1.tgz#7b05838654557544f694a372de767fcc9594d61a" + integrity sha512-d3Waie/299qqRyHTm2DjADeTaNdNSVsnwHPWrs20JMpjh6eiVq7ggggweO8rc4arhf6rRkWuHKwvxGvejUXZZQ== dependencies: - diff-sequences "^29.4.3" - loupe "^2.3.6" - pretty-format "^29.5.0" + diff-sequences "^29.6.3" + estree-walker "^3.0.3" + loupe "^2.3.7" + pretty-format "^29.7.0" "@wdio/cli@^8.24.3": version "8.24.3" @@ -2928,12 +2969,22 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^8.1.1, acorn-walk@^8.2.0: +acorn-walk@^8.1.1: version "8.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.10.0, acorn@^8.4.1, acorn@^8.9.0: +acorn-walk@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== + +acorn@^8.11.3: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + +acorn@^8.4.1, acorn@^8.9.0: version "8.10.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== @@ -4293,33 +4344,34 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild@^0.18.10: - version "0.18.17" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.17.tgz#2aaf6bc6759b0c605777fdc435fea3969e091cad" - integrity sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg== +esbuild@^0.19.3: + version "0.19.12" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.12.tgz#dc82ee5dc79e82f5a5c3b4323a2a641827db3e04" + integrity sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg== optionalDependencies: - "@esbuild/android-arm" "0.18.17" - "@esbuild/android-arm64" "0.18.17" - "@esbuild/android-x64" "0.18.17" - "@esbuild/darwin-arm64" "0.18.17" - "@esbuild/darwin-x64" "0.18.17" - "@esbuild/freebsd-arm64" "0.18.17" - "@esbuild/freebsd-x64" "0.18.17" - "@esbuild/linux-arm" "0.18.17" - "@esbuild/linux-arm64" "0.18.17" - "@esbuild/linux-ia32" "0.18.17" - "@esbuild/linux-loong64" "0.18.17" - "@esbuild/linux-mips64el" "0.18.17" - "@esbuild/linux-ppc64" "0.18.17" - "@esbuild/linux-riscv64" "0.18.17" - "@esbuild/linux-s390x" "0.18.17" - "@esbuild/linux-x64" "0.18.17" - "@esbuild/netbsd-x64" "0.18.17" - "@esbuild/openbsd-x64" "0.18.17" - "@esbuild/sunos-x64" "0.18.17" - "@esbuild/win32-arm64" "0.18.17" - "@esbuild/win32-ia32" "0.18.17" - "@esbuild/win32-x64" "0.18.17" + "@esbuild/aix-ppc64" "0.19.12" + "@esbuild/android-arm" "0.19.12" + "@esbuild/android-arm64" "0.19.12" + "@esbuild/android-x64" "0.19.12" + "@esbuild/darwin-arm64" "0.19.12" + "@esbuild/darwin-x64" "0.19.12" + "@esbuild/freebsd-arm64" "0.19.12" + "@esbuild/freebsd-x64" "0.19.12" + "@esbuild/linux-arm" "0.19.12" + "@esbuild/linux-arm64" "0.19.12" + "@esbuild/linux-ia32" "0.19.12" + "@esbuild/linux-loong64" "0.19.12" + "@esbuild/linux-mips64el" "0.19.12" + "@esbuild/linux-ppc64" "0.19.12" + "@esbuild/linux-riscv64" "0.19.12" + "@esbuild/linux-s390x" "0.19.12" + "@esbuild/linux-x64" "0.19.12" + "@esbuild/netbsd-x64" "0.19.12" + "@esbuild/openbsd-x64" "0.19.12" + "@esbuild/sunos-x64" "0.19.12" + "@esbuild/win32-arm64" "0.19.12" + "@esbuild/win32-ia32" "0.19.12" + "@esbuild/win32-x64" "0.19.12" escalade@^3.1.1: version "3.1.1" @@ -4608,6 +4660,13 @@ estree-walker@^2.0.1: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== +estree-walker@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d" + integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== + dependencies: + "@types/estree" "^1.0.0" + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -4975,7 +5034,7 @@ fsevents@2.3.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== -fsevents@~2.3.2: +fsevents@~2.3.2, fsevents@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== @@ -5051,7 +5110,7 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-func-name@^2.0.0, get-func-name@^2.0.2: +get-func-name@^2.0.0, get-func-name@^2.0.1, get-func-name@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== @@ -5165,7 +5224,7 @@ glob@^10.2.2: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" -glob@^7.1.3, glob@^7.1.4: +glob@^7.1.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -5418,11 +5477,6 @@ html-encoding-sniffer@^3.0.0: dependencies: whatwg-encoding "^2.0.0" -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - http-cache-semantics@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" @@ -5872,48 +5926,6 @@ isomorphic-ws@^5.0.0: resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" integrity sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw== -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.0.tgz#7a8af094cbfff1d5bb280f62ce043695ae8dd5b8" - integrity sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^7.5.4" - -istanbul-lib-report@^3.0.0, istanbul-lib-report@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" - integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^4.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.1.5: - version "3.1.6" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.6.tgz#2544bcab4768154281a2f0870471902704ccaa1a" - integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - jackspeak@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" @@ -6058,6 +6070,11 @@ joi@^17.11.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== +js-tokens@^8.0.2: + version "8.0.3" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-8.0.3.tgz#1c407ec905643603b38b6be6977300406ec48775" + integrity sha512-UfJMcSJc+SEXEl9lH/VLHSZbThQyLpw1vLO1Lb+j4RWDvG3N2f7yj3PVQA3cmkTBNldJ9eFnM+xEXxHIXrYiJw== + js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -6229,10 +6246,13 @@ listenercount@~1.0.1: resolved "https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937" integrity sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ== -local-pkg@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963" - integrity sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g== +local-pkg@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.0.tgz#093d25a346bae59a99f80e75f6e9d36d7e8c925c" + integrity sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg== + dependencies: + mlly "^1.4.2" + pkg-types "^1.0.3" locate-app@^2.1.0: version "2.1.0" @@ -6349,6 +6369,13 @@ loupe@^2.3.6: dependencies: get-func-name "^2.0.0" +loupe@^2.3.7: + version "2.3.7" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== + dependencies: + get-func-name "^2.0.1" + lowercase-keys@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2" @@ -6383,20 +6410,13 @@ lz-string@^1.5.0: resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== -magic-string@^0.30.1: - version "0.30.2" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.2.tgz#dcf04aad3d0d1314bc743d076c50feb29b3c7aca" - integrity sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug== +magic-string@^0.30.5: + version "0.30.7" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.7.tgz#0cecd0527d473298679da95a2d7aeb8c64048505" + integrity sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA== dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" -make-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" - integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== - dependencies: - semver "^7.5.3" - make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" @@ -6554,7 +6574,7 @@ mkdirp@^1.0.3: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mlly@^1.2.0, mlly@^1.4.0: +mlly@^1.2.0: version "1.4.0" resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.4.0.tgz#830c10d63f1f97bd8785377b24dc2a15d972832b" integrity sha512-ua8PAThnTwpprIaU47EPeZ/bPUVp2QYBbWMphUQpVdBI3Lgqzm5KZQ45Agm3YJedHXaIHl6pBGabaLSUPPSptg== @@ -6564,6 +6584,16 @@ mlly@^1.2.0, mlly@^1.4.0: pkg-types "^1.0.3" ufo "^1.1.2" +mlly@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.5.0.tgz#8428a4617d54cc083d3009030ac79739a0e5447a" + integrity sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ== + dependencies: + acorn "^8.11.3" + pathe "^1.1.2" + pkg-types "^1.0.3" + ufo "^1.3.2" + mocha@^10.0.0: version "10.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" @@ -6630,6 +6660,11 @@ nanoid@^3.3.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + natural-compare-lite@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" @@ -6900,6 +6935,13 @@ p-limit@^4.0.0: dependencies: yocto-queue "^1.0.0" +p-limit@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-5.0.0.tgz#6946d5b7140b649b7a33a027d89b4c625b3a5985" + integrity sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ== + dependencies: + yocto-queue "^1.0.0" + p-locate@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" @@ -7046,6 +7088,11 @@ pathe@^1.1.0, pathe@^1.1.1: resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.1.tgz#1dd31d382b974ba69809adc9a7a347e65d84829a" integrity sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q== +pathe@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -7169,7 +7216,7 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.4.23, postcss@^8.4.27, postcss@^8.4.31: +postcss@^8.4.23, postcss@^8.4.31: version "8.4.31" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== @@ -7178,6 +7225,15 @@ postcss@^8.4.23, postcss@^8.4.27, postcss@^8.4.31: picocolors "^1.0.0" source-map-js "^1.0.2" +postcss@^8.4.35: + version "8.4.35" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.35.tgz#60997775689ce09011edf083a549cea44aabe2f7" + integrity sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.0.2" + postinstall-postinstall@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" @@ -7202,7 +7258,7 @@ pretty-format@^27.0.2: ansi-styles "^5.0.0" react-is "^17.0.1" -pretty-format@^29.0.0, pretty-format@^29.5.0, pretty-format@^29.6.2: +pretty-format@^29.0.0, pretty-format@^29.6.2: version "29.6.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.6.2.tgz#3d5829261a8a4d89d8b9769064b29c50ed486a47" integrity sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg== @@ -7702,11 +7758,26 @@ rollup@^2.77.2: optionalDependencies: fsevents "~2.3.2" -rollup@^3.27.1: - version "3.29.4" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.4.tgz#4d70c0f9834146df8705bfb69a9a19c9e1109981" - integrity sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw== +rollup@^4.2.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.12.0.tgz#0b6d1e5f3d46bbcf244deec41a7421dc54cc45b5" + integrity sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q== + dependencies: + "@types/estree" "1.0.5" optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.12.0" + "@rollup/rollup-android-arm64" "4.12.0" + "@rollup/rollup-darwin-arm64" "4.12.0" + "@rollup/rollup-darwin-x64" "4.12.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.12.0" + "@rollup/rollup-linux-arm64-gnu" "4.12.0" + "@rollup/rollup-linux-arm64-musl" "4.12.0" + "@rollup/rollup-linux-riscv64-gnu" "4.12.0" + "@rollup/rollup-linux-x64-gnu" "4.12.0" + "@rollup/rollup-linux-x64-musl" "4.12.0" + "@rollup/rollup-win32-arm64-msvc" "4.12.0" + "@rollup/rollup-win32-ia32-msvc" "4.12.0" + "@rollup/rollup-win32-x64-msvc" "4.12.0" fsevents "~2.3.2" run-async@^3.0.0: @@ -7784,7 +7855,7 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: +semver@^7.3.5, semver@^7.3.7, semver@^7.5.3: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -7899,7 +7970,7 @@ source-map-js@^1.0.2: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -source-map@^0.6.1, source-map@~0.6.1: +source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -7947,10 +8018,10 @@ stackback@0.0.2: resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== -std-env@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.3.3.tgz#a54f06eb245fdcfef53d56f3c0251f1d5c3d01fe" - integrity sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg== +std-env@^3.5.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" + integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== stop-iteration-iterator@^1.0.0: version "1.0.0" @@ -8096,12 +8167,12 @@ strip-json-comments@3.1.1, strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -strip-literal@^1.0.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-1.3.0.tgz#db3942c2ec1699e6836ad230090b84bb458e3a07" - integrity sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg== +strip-literal@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-2.0.0.tgz#5d063580933e4e03ebb669b12db64d2200687527" + integrity sha512-f9vHgsCWBq2ugHAkGMiiYY+AYG0D/cbloKKg0nhaaaSNsujdGIpVXCNsrJpCKr5M0f4aI31mr13UjY6GAuXCKA== dependencies: - acorn "^8.10.0" + js-tokens "^8.0.2" style-mod@^4.0.0: version "4.0.3" @@ -8218,15 +8289,6 @@ tar@^6.1.11: mkdirp "^1.0.3" yallist "^4.0.0" -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -8261,20 +8323,20 @@ tiny-warning@^1.0.2: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== -tinybench@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.5.0.tgz#4711c99bbf6f3e986f67eb722fed9cddb3a68ba5" - integrity sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA== +tinybench@^2.5.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.6.0.tgz#1423284ee22de07c91b3752c048d2764714b341b" + integrity sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA== -tinypool@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.7.0.tgz#88053cc99b4a594382af23190c609d93fddf8021" - integrity sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww== +tinypool@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.8.2.tgz#84013b03dc69dacb322563a475d4c0a9be00f82a" + integrity sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ== -tinyspy@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-2.1.1.tgz#9e6371b00c259e5c5b301917ca18c01d40ae558c" - integrity sha512-XPJL2uSzcOyBMky6OFrusqWlzfFrXtE0hPuMgW8A2HmaqrPo4ZQHRN/V0QXN3FSjKxpsbRrFc5LI7KOwBsT1/w== +tinyspy@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-2.2.1.tgz#117b2342f1f38a0dbdcc73a50a454883adf861d1" + integrity sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A== tmp@^0.0.33: version "0.0.33" @@ -8334,10 +8396,10 @@ ts-node@^10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tsconfck@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-2.1.2.tgz#f667035874fa41d908c1fe4d765345fcb1df6e35" - integrity sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg== +tsconfck@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-3.0.2.tgz#d8e279f7a049d55f207f528d13fa493e1d8e7ceb" + integrity sha512-6lWtFjwuhS3XI4HsX4Zg0izOI3FU/AI9EGVlPEUMDIhvLPMD4wkiof0WCoDgW7qY+Dy198g4d9miAqUHWHFH6Q== tsconfig-paths@^3.14.2: version "3.14.2" @@ -8472,6 +8534,11 @@ ufo@^1.1.2: resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.2.0.tgz#28d127a087a46729133fdc89cb1358508b3f80ba" integrity sha512-RsPyTbqORDNDxqAdQPQBpgqhWle1VcTSou/FraClYlHf6TZnQcGslpLcAphNR+sQW4q5lLWLbOsRlh9j24baQg== +ufo@^1.3.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.4.0.tgz#39845b31be81b4f319ab1d99fd20c56cac528d32" + integrity sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ== + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -8640,17 +8707,16 @@ validate-npm-package-license@^3.0.4: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -vite-node@0.34.6: - version "0.34.6" - resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.34.6.tgz#34d19795de1498562bf21541a58edcd106328a17" - integrity sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA== +vite-node@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-1.3.1.tgz#a93f7372212f5d5df38e945046b945ac3f4855d2" + integrity sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng== dependencies: cac "^6.7.14" debug "^4.3.4" - mlly "^1.4.0" pathe "^1.1.1" picocolors "^1.0.0" - vite "^3.0.0 || ^4.0.0 || ^5.0.0-0" + vite "^5.0.0" vite-plugin-eslint@^1.8.1: version "1.8.1" @@ -8666,25 +8732,25 @@ vite-plugin-package-version@^1.1.0: resolved "https://registry.yarnpkg.com/vite-plugin-package-version/-/vite-plugin-package-version-1.1.0.tgz#7d8088955aa21e4ec93353c98992b3f58c4bf13c" integrity sha512-TPoFZXNanzcaKCIrC3e2L/TVRkkRLB6l4RPN/S7KbG7rWfyLcCEGsnXvxn6qR7fyZwXalnnSN/I9d6pSFjHpEA== -vite-tsconfig-paths@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-4.2.1.tgz#e53b89096b91d31a6d1e26f75999ea8c336a89ed" - integrity sha512-GNUI6ZgPqT3oervkvzU+qtys83+75N/OuDaQl7HmOqFTb0pjZsuARrRipsyJhJ3enqV8beI1xhGbToR4o78nSQ== +vite-tsconfig-paths@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.1.tgz#28762938151e7c80aec9d70c57e65ddce43a576f" + integrity sha512-cfgJwcGOsIxXOLU/nELPny2/LUD/lcf1IbfyeKTv2bsupVbTH/xpFtdQlBmIP1GEK2CjjLxYhFfB+QODFAx5aw== dependencies: debug "^4.1.1" globrex "^0.1.2" - tsconfck "^2.1.0" + tsconfck "^3.0.1" -"vite@^3.0.0 || ^4.0.0 || ^5.0.0-0", "vite@^3.1.0 || ^4.0.0 || ^5.0.0-0", vite@^4.5.2: - version "4.5.2" - resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.2.tgz#d6ea8610e099851dad8c7371599969e0f8b97e82" - integrity sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w== +vite@^5.0.0, vite@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.1.3.tgz#dd072653a80225702265550a4700561740dfde55" + integrity sha512-UfmUD36DKkqhi/F75RrxvPpry+9+tTkrXfMNZD+SboZqBCMsxKtO52XeGzzuh7ioz+Eo/SYDBbdb0Z7vgcDJew== dependencies: - esbuild "^0.18.10" - postcss "^8.4.27" - rollup "^3.27.1" + esbuild "^0.19.3" + postcss "^8.4.35" + rollup "^4.2.0" optionalDependencies: - fsevents "~2.3.2" + fsevents "~2.3.3" vitest-webgl-canvas-mock@^1.1.0: version "1.1.0" @@ -8694,34 +8760,30 @@ vitest-webgl-canvas-mock@^1.1.0: cssfontparser "^1.2.1" parse-color "^1.0.0" -vitest@^0.34.6: - version "0.34.6" - resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.34.6.tgz#44880feeeef493c04b7f795ed268f24a543250d7" - integrity sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q== +vitest@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-1.3.1.tgz#2d7e9861f030d88a4669392a4aecb40569d90937" + integrity sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ== dependencies: - "@types/chai" "^4.3.5" - "@types/chai-subset" "^1.3.3" - "@types/node" "*" - "@vitest/expect" "0.34.6" - "@vitest/runner" "0.34.6" - "@vitest/snapshot" "0.34.6" - "@vitest/spy" "0.34.6" - "@vitest/utils" "0.34.6" - acorn "^8.9.0" - acorn-walk "^8.2.0" - cac "^6.7.14" + "@vitest/expect" "1.3.1" + "@vitest/runner" "1.3.1" + "@vitest/snapshot" "1.3.1" + "@vitest/spy" "1.3.1" + "@vitest/utils" "1.3.1" + acorn-walk "^8.3.2" chai "^4.3.10" debug "^4.3.4" - local-pkg "^0.4.3" - magic-string "^0.30.1" + execa "^8.0.1" + local-pkg "^0.5.0" + magic-string "^0.30.5" pathe "^1.1.1" picocolors "^1.0.0" - std-env "^3.3.3" - strip-literal "^1.0.1" - tinybench "^2.5.0" - tinypool "^0.7.0" - vite "^3.1.0 || ^4.0.0 || ^5.0.0-0" - vite-node "0.34.6" + std-env "^3.5.0" + strip-literal "^2.0.0" + tinybench "^2.5.1" + tinypool "^0.8.2" + vite "^5.0.0" + vite-node "1.3.1" why-is-node-running "^2.2.2" vscode-jsonrpc@8.2.0, vscode-jsonrpc@^8.1.0: