diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba477d2e7..f7f9a06a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -394,4 +394,4 @@ jobs: 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 + run: python public/announce_release.py diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index af9b5a92c..c2e629cd9 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -12,14 +12,14 @@ concurrency: jobs: playwright-ubuntu: timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-latest-8-cores steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'yarn' - - uses: KittyCAD/action-install-cli@v0.2.21 + - uses: KittyCAD/action-install-cli@main - name: Install dependencies run: yarn - name: Install Playwright Browsers diff --git a/.gitignore b/.gitignore index 353024d3a..5d36eaabb 100644 --- a/.gitignore +++ b/.gitignore @@ -38,13 +38,9 @@ src/wasm-lib/grackle/test_json_output e2e/playwright/playwright-secrets.env e2e/playwright/temp1.png e2e/playwright/temp2.png -# exports from snapshot-tests.spec.ts -e2e/playwright/export-snapshots/*.ply -e2e/playwright/export-snapshots/*.obj -e2e/playwright/export-snapshots/*.step -e2e/playwright/export-snapshots/*.stl -e2e/playwright/export-snapshots/*binary.gltf -e2e/playwright/export-snapshots/*embedded.gltf +# exports from snapshot-tests.spec.ts "exports of each format should work" +e2e/playwright/export-snapshots/* +!e2e/playwright/export-snapshots/*.png /test-results/ diff --git a/e2e/playwright/export-snapshots/gltf-standard-2.gltf b/e2e/playwright/export-snapshots/gltf-standard-2.gltf deleted file mode 100644 index c2ea5eafc..000000000 --- a/e2e/playwright/export-snapshots/gltf-standard-2.gltf +++ /dev/null @@ -1,3056 +0,0 @@ -{ - "accessors": [ - { - "bufferView": 0, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 0, - -0.6451600193977356, - -0 - ], - "max": [ - 0, - 0, - 2.5806400775909424 - ] - }, - { - "bufferView": 0, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 0, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 1, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 0, - -0.6451600193977356, - -0 - ], - "max": [ - 1.9967820644378664, - -0.6451600193977356, - 2.5806400775909424 - ] - }, - { - "bufferView": 1, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 1, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 2, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 1.9967820644378664, - -1.935479998588562, - -0 - ], - "max": [ - 3.839550018310547, - -0.6451600193977356, - 2.5806400775909424 - ] - }, - { - "bufferView": 2, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 2, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 3, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 3.839550018310547, - -1.935479998588562, - -0 - ], - "max": [ - 6.1290202140808105, - -1.935479998588562, - 2.5806400775909424 - ] - }, - { - "bufferView": 3, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 3, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 4, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 6.1290202140808105, - -1.935479998588562, - -0 - ], - "max": [ - 6.1290202140808105, - -1.6129000186920166, - 2.5806400775909424 - ] - }, - { - "bufferView": 4, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 4, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 5, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 3.9412591457366943, - -1.6129000186920166, - -0 - ], - "max": [ - 6.1290202140808105, - -1.6129000186920166, - 2.5806400775909424 - ] - }, - { - "bufferView": 5, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 5, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 6, - "byteOffset": 0, - "count": 18, - "componentType": 5126, - "type": "VEC3", - "min": [ - 1.6377992630004885, - -1.6129000186920166, - 0 - ], - "max": [ - 3.9412591457366943, - 0, - 2.5806400775909424 - ] - }, - { - "bufferView": 6, - "byteOffset": 12, - "count": 18, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 6, - "byteOffset": 24, - "count": 18, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 7, - "byteOffset": 0, - "count": 18, - "componentType": 5126, - "type": "VEC3", - "min": [ - 1.6377992630004885, - 0, - -0 - ], - "max": [ - 3.713124275207519, - 0.967739999294281, - 2.5806400775909424 - ] - }, - { - "bufferView": 7, - "byteOffset": 12, - "count": 18, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 7, - "byteOffset": 24, - "count": 18, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 8, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 3.713124275207519, - 0.967739999294281, - -0 - ], - "max": [ - 6.1290202140808105, - 0.967739999294281, - 2.5806400775909424 - ] - }, - { - "bufferView": 8, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 8, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 9, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 6.1290202140808105, - 0.967739999294281, - -0 - ], - "max": [ - 6.1290202140808105, - 1.2903200387954712, - 2.5806400775909424 - ] - }, - { - "bufferView": 9, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 9, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 10, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 3.641610145568848, - 1.2903200387954712, - -0 - ], - "max": [ - 6.1290202140808105, - 1.2903200387954712, - 2.5806400775909424 - ] - }, - { - "bufferView": 10, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 10, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 11, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 2.2580599784851074, - 0.6451600193977356, - -0 - ], - "max": [ - 3.641610145568848, - 1.2903200387954712, - 2.5806400775909424 - ] - }, - { - "bufferView": 11, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 11, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 12, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 0, - 0.6451600193977356, - -0 - ], - "max": [ - 2.2580599784851074, - 0.6451600193977356, - 2.5806400775909424 - ] - }, - { - "bufferView": 12, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 12, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 13, - "byteOffset": 0, - "count": 6, - "componentType": 5126, - "type": "VEC3", - "min": [ - 0, - 0, - -0 - ], - "max": [ - 0, - 0.6451600193977356, - 2.5806400775909424 - ] - }, - { - "bufferView": 13, - "byteOffset": 12, - "count": 6, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 13, - "byteOffset": 24, - "count": 6, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 14, - "byteOffset": 0, - "count": 48, - "componentType": 5126, - "type": "VEC3", - "min": [ - 0, - -1.935479998588562, - 0 - ], - "max": [ - 6.1290202140808105, - 1.2903200387954712, - 0 - ] - }, - { - "bufferView": 14, - "byteOffset": 12, - "count": 48, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 14, - "byteOffset": 24, - "count": 48, - "componentType": 5126, - "type": "VEC2" - }, - { - "bufferView": 15, - "byteOffset": 0, - "count": 48, - "componentType": 5126, - "type": "VEC3", - "min": [ - 0, - -1.935479998588562, - 2.5806400775909424 - ], - "max": [ - 6.1290202140808105, - 1.2903200387954712, - 2.5806400775909424 - ] - }, - { - "bufferView": 15, - "byteOffset": 12, - "count": 48, - "componentType": 5126, - "type": "VEC3" - }, - { - "bufferView": 15, - "byteOffset": 24, - "count": 48, - "componentType": 5126, - "type": "VEC2" - } - ], - "asset": { - "generator": "zoo.dev", - "version": "2.0" - }, - "buffers": [ - { - "byteLength": 6528, - "uri": "gltf-standard.gltf" - } - ], - "bufferViews": [ - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 0, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 192, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 384, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 576, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 768, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 960, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 576, - "byteOffset": 1152, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 576, - "byteOffset": 1728, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 2304, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 2496, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 2688, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 2880, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 3072, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 192, - "byteOffset": 3264, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 1536, - "byteOffset": 3456, - "byteStride": 32, - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 1536, - "byteOffset": 4992, - "byteStride": 32, - "target": 34962 - } - ], - "scene": 0, - "extensions": { - "KITTYCAD_boundary_representation": { - "solids": [ - { - "shells": [ - [ - 0, - 1 - ] - ], - "mesh": 0 - } - ], - "shells": [ - { - "faces": [ - [ - 0, - 1 - ], - [ - 1, - 1 - ], - [ - 2, - 1 - ], - [ - 3, - 1 - ], - [ - 4, - 1 - ], - [ - 5, - 1 - ], - [ - 6, - 1 - ], - [ - 7, - 1 - ], - [ - 8, - 1 - ], - [ - 9, - 1 - ], - [ - 10, - 1 - ], - [ - 11, - 1 - ], - [ - 12, - 1 - ], - [ - 13, - 1 - ], - [ - 14, - 1 - ], - [ - 15, - 1 - ] - ] - } - ], - "faces": [ - { - "surface": [ - 0, - 1 - ], - "loops": [ - [ - 0, - 1 - ] - ] - }, - { - "surface": [ - 1, - 1 - ], - "loops": [ - [ - 1, - 1 - ] - ] - }, - { - "surface": [ - 2, - 1 - ], - "loops": [ - [ - 2, - 1 - ] - ] - }, - { - "surface": [ - 3, - 1 - ], - "loops": [ - [ - 3, - 1 - ] - ] - }, - { - "surface": [ - 4, - 1 - ], - "loops": [ - [ - 4, - 1 - ] - ] - }, - { - "surface": [ - 5, - 1 - ], - "loops": [ - [ - 5, - 1 - ] - ] - }, - { - "surface": [ - 6, - 1 - ], - "loops": [ - [ - 6, - 1 - ] - ] - }, - { - "surface": [ - 7, - 1 - ], - "loops": [ - [ - 7, - 1 - ] - ] - }, - { - "surface": [ - 8, - 1 - ], - "loops": [ - [ - 8, - 1 - ] - ] - }, - { - "surface": [ - 9, - 1 - ], - "loops": [ - [ - 9, - 1 - ] - ] - }, - { - "surface": [ - 10, - 1 - ], - "loops": [ - [ - 10, - 1 - ] - ] - }, - { - "surface": [ - 11, - 1 - ], - "loops": [ - [ - 11, - 1 - ] - ] - }, - { - "surface": [ - 12, - 1 - ], - "loops": [ - [ - 12, - 1 - ] - ] - }, - { - "surface": [ - 13, - 1 - ], - "loops": [ - [ - 13, - 1 - ] - ] - }, - { - "surface": [ - 14, - -1 - ], - "loops": [ - [ - 14, - 1 - ] - ] - }, - { - "surface": [ - 15, - 1 - ], - "loops": [ - [ - 15, - 1 - ] - ] - } - ], - "loops": [ - { - "edges": [ - [ - 0, - 1 - ], - [ - 1, - 1 - ], - [ - 2, - -1 - ], - [ - 3, - -1 - ] - ] - }, - { - "edges": [ - [ - 4, - 1 - ], - [ - 5, - 1 - ], - [ - 6, - -1 - ], - [ - 1, - -1 - ] - ] - }, - { - "edges": [ - [ - 7, - 1 - ], - [ - 8, - 1 - ], - [ - 9, - -1 - ], - [ - 5, - -1 - ] - ] - }, - { - "edges": [ - [ - 10, - 1 - ], - [ - 11, - 1 - ], - [ - 12, - -1 - ], - [ - 8, - -1 - ] - ] - }, - { - "edges": [ - [ - 13, - 1 - ], - [ - 14, - 1 - ], - [ - 15, - -1 - ], - [ - 11, - -1 - ] - ] - }, - { - "edges": [ - [ - 16, - 1 - ], - [ - 17, - 1 - ], - [ - 18, - -1 - ], - [ - 14, - -1 - ] - ] - }, - { - "edges": [ - [ - 19, - 1 - ], - [ - 20, - 1 - ], - [ - 21, - -1 - ], - [ - 17, - -1 - ] - ] - }, - { - "edges": [ - [ - 22, - 1 - ], - [ - 23, - 1 - ], - [ - 24, - -1 - ], - [ - 20, - -1 - ] - ] - }, - { - "edges": [ - [ - 25, - 1 - ], - [ - 26, - 1 - ], - [ - 27, - -1 - ], - [ - 23, - -1 - ] - ] - }, - { - "edges": [ - [ - 28, - 1 - ], - [ - 29, - 1 - ], - [ - 30, - -1 - ], - [ - 26, - -1 - ] - ] - }, - { - "edges": [ - [ - 31, - 1 - ], - [ - 32, - 1 - ], - [ - 33, - -1 - ], - [ - 29, - -1 - ] - ] - }, - { - "edges": [ - [ - 34, - 1 - ], - [ - 35, - 1 - ], - [ - 36, - -1 - ], - [ - 32, - -1 - ] - ] - }, - { - "edges": [ - [ - 37, - 1 - ], - [ - 38, - 1 - ], - [ - 39, - -1 - ], - [ - 35, - -1 - ] - ] - }, - { - "edges": [ - [ - 40, - 1 - ], - [ - 3, - 1 - ], - [ - 41, - -1 - ], - [ - 38, - -1 - ] - ] - }, - { - "edges": [ - [ - 0, - 1 - ], - [ - 4, - 1 - ], - [ - 7, - 1 - ], - [ - 10, - 1 - ], - [ - 13, - 1 - ], - [ - 16, - 1 - ], - [ - 19, - 1 - ], - [ - 22, - 1 - ], - [ - 25, - 1 - ], - [ - 28, - 1 - ], - [ - 31, - 1 - ], - [ - 34, - 1 - ], - [ - 37, - 1 - ], - [ - 40, - 1 - ] - ] - }, - { - "edges": [ - [ - 2, - 1 - ], - [ - 6, - 1 - ], - [ - 9, - 1 - ], - [ - 12, - 1 - ], - [ - 15, - 1 - ], - [ - 18, - 1 - ], - [ - 21, - 1 - ], - [ - 24, - 1 - ], - [ - 27, - 1 - ], - [ - 30, - 1 - ], - [ - 33, - 1 - ], - [ - 36, - 1 - ], - [ - 39, - 1 - ], - [ - 41, - 1 - ] - ] - } - ], - "edges": [ - { - "curve": [ - 0, - 1 - ], - "start": 0, - "end": 1, - "t": [ - 0, - 0.6451600000000001 - ] - }, - { - "curve": [ - 1, - 1 - ], - "start": 1, - "end": 2, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 2, - 1 - ], - "start": 3, - "end": 2, - "t": [ - 0, - 0.6451600000000001 - ] - }, - { - "curve": [ - 3, - 1 - ], - "start": 0, - "end": 3, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 4, - 1 - ], - "start": 1, - "end": 4, - "t": [ - 0, - 1.99678 - ] - }, - { - "curve": [ - 5, - 1 - ], - "start": 4, - "end": 5, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 6, - 1 - ], - "start": 2, - "end": 5, - "t": [ - 0, - 1.99678 - ] - }, - { - "curve": [ - 7, - 1 - ], - "start": 4, - "end": 6, - "t": [ - 0, - 2.2496 - ] - }, - { - "curve": [ - 8, - 1 - ], - "start": 6, - "end": 7, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 9, - 1 - ], - "start": 5, - "end": 7, - "t": [ - 0, - 2.2496 - ] - }, - { - "curve": [ - 10, - 1 - ], - "start": 6, - "end": 8, - "t": [ - 0, - 2.28947 - ] - }, - { - "curve": [ - 11, - 1 - ], - "start": 8, - "end": 9, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 12, - 1 - ], - "start": 7, - "end": 9, - "t": [ - 0, - 2.28947 - ] - }, - { - "curve": [ - 13, - 1 - ], - "start": 8, - "end": 10, - "t": [ - 0, - 0.32258000000000003 - ] - }, - { - "curve": [ - 14, - 1 - ], - "start": 10, - "end": 11, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 15, - 1 - ], - "start": 9, - "end": 11, - "t": [ - 0, - 0.32258000000000003 - ] - }, - { - "curve": [ - 16, - 1 - ], - "start": 10, - "end": 12, - "t": [ - 0, - 2.1877600000000004 - ] - }, - { - "curve": [ - 17, - 1 - ], - "start": 12, - "end": 13, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 18, - 1 - ], - "start": 11, - "end": 13, - "t": [ - 0, - 2.1877600000000004 - ] - }, - { - "curve": [ - 19, - 1 - ], - "start": 12, - "end": 14, - "t": [ - 0, - 2.8120100000000003 - ] - }, - { - "curve": [ - 20, - 1 - ], - "start": 14, - "end": 15, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 21, - 1 - ], - "start": 13, - "end": 15, - "t": [ - 0, - 2.8120100000000003 - ] - }, - { - "curve": [ - 22, - 1 - ], - "start": 14, - "end": 16, - "t": [ - 0, - 2.28987 - ] - }, - { - "curve": [ - 23, - 1 - ], - "start": 16, - "end": 17, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 24, - 1 - ], - "start": 15, - "end": 17, - "t": [ - 0, - 2.28987 - ] - }, - { - "curve": [ - 25, - 1 - ], - "start": 16, - "end": 18, - "t": [ - 0, - 2.4159 - ] - }, - { - "curve": [ - 26, - 1 - ], - "start": 18, - "end": 19, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 27, - 1 - ], - "start": 17, - "end": 19, - "t": [ - 0, - 2.4159 - ] - }, - { - "curve": [ - 28, - 1 - ], - "start": 18, - "end": 20, - "t": [ - 0, - 0.32258000000000003 - ] - }, - { - "curve": [ - 29, - 1 - ], - "start": 20, - "end": 21, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 30, - 1 - ], - "start": 19, - "end": 21, - "t": [ - 0, - 0.32258000000000003 - ] - }, - { - "curve": [ - 31, - 1 - ], - "start": 20, - "end": 22, - "t": [ - 0, - 2.48741 - ] - }, - { - "curve": [ - 32, - 1 - ], - "start": 22, - "end": 23, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 33, - 1 - ], - "start": 21, - "end": 23, - "t": [ - 0, - 2.48741 - ] - }, - { - "curve": [ - 34, - 1 - ], - "start": 22, - "end": 24, - "t": [ - 0, - 1.52658 - ] - }, - { - "curve": [ - 35, - 1 - ], - "start": 24, - "end": 25, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 36, - 1 - ], - "start": 23, - "end": 25, - "t": [ - 0, - 1.52658 - ] - }, - { - "curve": [ - 37, - 1 - ], - "start": 24, - "end": 26, - "t": [ - 0, - 2.2580600000000004 - ] - }, - { - "curve": [ - 38, - 1 - ], - "start": 26, - "end": 27, - "t": [ - 0, - 2.5806400000000003 - ] - }, - { - "curve": [ - 39, - 1 - ], - "start": 25, - "end": 27, - "t": [ - 0, - 2.2580600000000004 - ] - }, - { - "curve": [ - 40, - 1 - ], - "start": 26, - "end": 0, - "t": [ - 0, - 0.6451600000000001 - ] - }, - { - "curve": [ - 41, - 1 - ], - "start": 27, - "end": 3, - "t": [ - 0, - 0.6451600000000001 - ] - } - ], - "vertices": [ - [ - 0, - 0, - -0 - ], - [ - 0, - -0.6451600000000001, - -0 - ], - [ - 0, - -0.6451600000000001, - 2.5806400000000003 - ], - [ - 0, - 0, - 2.5806400000000003 - ], - [ - 1.99678, - -0.6451600000000001, - -0 - ], - [ - 1.99678, - -0.6451600000000001, - 2.5806400000000003 - ], - [ - 3.839550000000001, - -1.93548, - -0 - ], - [ - 3.839550000000001, - -1.93548, - 2.5806400000000003 - ], - [ - 6.129020000000001, - -1.93548, - -0 - ], - [ - 6.129020000000001, - -1.93548, - 2.5806400000000003 - ], - [ - 6.129020000000001, - -1.6129000000000002, - -0 - ], - [ - 6.129020000000001, - -1.6129000000000002, - 2.5806400000000003 - ], - [ - 3.94126, - -1.6129000000000002, - -0 - ], - [ - 3.94126, - -1.6129000000000002, - 2.5806400000000003 - ], - [ - 1.6378, - 0, - -0 - ], - [ - 1.6378, - 0, - 2.5806400000000003 - ], - [ - 3.71312, - 0.96774, - -0 - ], - [ - 3.71312, - 0.96774, - 2.5806400000000003 - ], - [ - 6.129020000000001, - 0.96774, - -0 - ], - [ - 6.129020000000001, - 0.96774, - 2.5806400000000003 - ], - [ - 6.129020000000001, - 1.29032, - -0 - ], - [ - 6.129020000000001, - 1.29032, - 2.5806400000000003 - ], - [ - 3.641610000000001, - 1.29032, - -0 - ], - [ - 3.641610000000001, - 1.29032, - 2.5806400000000003 - ], - [ - 2.2580600000000004, - 0.6451600000000001, - -0 - ], - [ - 2.2580600000000004, - 0.6451600000000001, - 2.5806400000000003 - ], - [ - 0, - 0.6451600000000001, - -0 - ], - [ - 0, - 0.6451600000000001, - 2.5806400000000003 - ] - ], - "surfaces": [ - { - "type": "plane", - "plane": { - "xAxis": [ - 0, - 1, - 0 - ], - "yAxis": [ - 0, - 0, - -1 - ], - "origin": [ - 0, - -0.32258000000000003, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 1, - 0, - 0 - ], - "yAxis": [ - -0, - 0, - 1 - ], - "origin": [ - 0.99839, - -0.6451600000000001, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 0.81915, - -0.5735800000000001, - 0 - ], - "yAxis": [ - 0, - 0, - 1 - ], - "origin": [ - 2.9181700000000004, - -1.29032, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 1, - 0, - 0 - ], - "yAxis": [ - -0, - 0, - 1 - ], - "origin": [ - 4.9842900000000006, - -1.93548, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 0, - 1, - 0 - ], - "yAxis": [ - -0, - 0, - 1 - ], - "origin": [ - 6.129020000000001, - -1.7741900000000002, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 1, - 0, - 0 - ], - "yAxis": [ - 0, - -0, - -1 - ], - "origin": [ - 5.03514, - -1.6129000000000002, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 0.81915, - -0.5735800000000001, - 0 - ], - "yAxis": [ - 0, - 0, - -1 - ], - "origin": [ - 2.78953, - -0.8064500000000001, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 0.90631, - 0.4226200000000001, - 0 - ], - "yAxis": [ - -0, - 0, - 1 - ], - "origin": [ - 2.67546, - 0.48387, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 1, - 0, - 0 - ], - "yAxis": [ - -0, - 0, - 1 - ], - "origin": [ - 4.92107, - 0.96774, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 0, - 1, - 0 - ], - "yAxis": [ - -0, - 0, - 1 - ], - "origin": [ - 6.129020000000001, - 1.1290300000000002, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 1, - 0, - 0 - ], - "yAxis": [ - 0, - -0, - -1 - ], - "origin": [ - 4.88532, - 1.29032, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 0.90631, - 0.4226200000000001, - 0 - ], - "yAxis": [ - 0, - 0, - -1 - ], - "origin": [ - 2.9498400000000005, - 0.96774, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 1, - 0, - 0 - ], - "yAxis": [ - 0, - -0, - -1 - ], - "origin": [ - 1.1290300000000002, - 0.6451600000000001, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 0, - 1, - 0 - ], - "yAxis": [ - 0, - 0, - -1 - ], - "origin": [ - 0, - 0.32258000000000003, - 1.29032 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 1, - 0, - 0 - ], - "yAxis": [ - 0, - 1, - 0 - ], - "origin": [ - 0, - 0, - 0 - ] - } - }, - { - "type": "plane", - "plane": { - "xAxis": [ - 1, - 0, - -0 - ], - "yAxis": [ - -0, - 1, - 0 - ], - "origin": [ - 0, - 0, - 2.5806400000000003 - ] - } - } - ], - "curves3D": [ - { - "type": "line", - "line": { - "origin": [ - 0, - 0, - -0 - ], - "direction": [ - 0, - -1, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 0, - -0.6451600000000001, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 0, - 0, - 2.5806400000000003 - ], - "direction": [ - 0, - -1, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 0, - 0, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 0, - -0.6451600000000001, - -0 - ], - "direction": [ - 1, - 0, - -0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 1.99678, - -0.6451600000000001, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 0, - -0.6451600000000001, - 2.5806400000000003 - ], - "direction": [ - 1, - 0, - -0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 1.99678, - -0.6451600000000001, - -0 - ], - "direction": [ - 0.81915, - -0.5735800000000001, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.839550000000001, - -1.93548, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 1.99678, - -0.6451600000000001, - 2.5806400000000003 - ], - "direction": [ - 0.81915, - -0.5735800000000001, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.839550000000001, - -1.93548, - -0 - ], - "direction": [ - 1, - -0, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - -1.93548, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.839550000000001, - -1.93548, - 2.5806400000000003 - ], - "direction": [ - 1, - -0, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - -1.93548, - -0 - ], - "direction": [ - 0, - 1, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - -1.6129000000000002, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - -1.93548, - 2.5806400000000003 - ], - "direction": [ - 0, - 1, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - -1.6129000000000002, - -0 - ], - "direction": [ - -1, - 0, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.94126, - -1.6129000000000002, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - -1.6129000000000002, - 2.5806400000000003 - ], - "direction": [ - -1, - 0, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.94126, - -1.6129000000000002, - -0 - ], - "direction": [ - -0.81915, - 0.5735800000000001, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 1.6378, - 0, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.94126, - -1.6129000000000002, - 2.5806400000000003 - ], - "direction": [ - -0.81915, - 0.5735800000000001, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 1.6378, - 0, - -0 - ], - "direction": [ - 0.90631, - 0.4226200000000001, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.71312, - 0.96774, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 1.6378, - 0, - 2.5806400000000003 - ], - "direction": [ - 0.90631, - 0.4226200000000001, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.71312, - 0.96774, - -0 - ], - "direction": [ - 1, - -0, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - 0.96774, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.71312, - 0.96774, - 2.5806400000000003 - ], - "direction": [ - 1, - -0, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - 0.96774, - -0 - ], - "direction": [ - 0, - 1, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - 1.29032, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - 0.96774, - 2.5806400000000003 - ], - "direction": [ - 0, - 1, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - 1.29032, - -0 - ], - "direction": [ - -1, - 0, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.641610000000001, - 1.29032, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 6.129020000000001, - 1.29032, - 2.5806400000000003 - ], - "direction": [ - -1, - 0, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.641610000000001, - 1.29032, - -0 - ], - "direction": [ - -0.90631, - -0.4226200000000001, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 2.2580600000000004, - 0.6451600000000001, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 3.641610000000001, - 1.29032, - 2.5806400000000003 - ], - "direction": [ - -0.90631, - -0.4226200000000001, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 2.2580600000000004, - 0.6451600000000001, - -0 - ], - "direction": [ - -1, - 0, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 0, - 0.6451600000000001, - -0 - ], - "direction": [ - 0, - 0, - 1 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 2.2580600000000004, - 0.6451600000000001, - 2.5806400000000003 - ], - "direction": [ - -1, - 0, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 0, - 0.6451600000000001, - -0 - ], - "direction": [ - 0, - -1, - 0 - ] - } - }, - { - "type": "line", - "line": { - "origin": [ - 0, - 0.6451600000000001, - 2.5806400000000003 - ], - "direction": [ - 0, - -1, - 0 - ] - } - } - ] - } - }, - "extensionsUsed": [ - "KITTYCAD_boundary_representation" - ], - "meshes": [ - { - "primitives": [ - { - "attributes": { - "POSITION": 0, - "NORMAL": 1, - "TEXCOORD_0": 2 - } - }, - { - "attributes": { - "POSITION": 3, - "NORMAL": 4, - "TEXCOORD_0": 5 - } - }, - { - "attributes": { - "POSITION": 6, - "NORMAL": 7, - "TEXCOORD_0": 8 - } - }, - { - "attributes": { - "POSITION": 9, - "NORMAL": 10, - "TEXCOORD_0": 11 - } - }, - { - "attributes": { - "POSITION": 12, - "NORMAL": 13, - "TEXCOORD_0": 14 - } - }, - { - "attributes": { - "POSITION": 15, - "NORMAL": 16, - "TEXCOORD_0": 17 - } - }, - { - "attributes": { - "POSITION": 18, - "NORMAL": 19, - "TEXCOORD_0": 20 - } - }, - { - "attributes": { - "POSITION": 21, - "NORMAL": 22, - "TEXCOORD_0": 23 - } - }, - { - "attributes": { - "POSITION": 24, - "NORMAL": 25, - "TEXCOORD_0": 26 - } - }, - { - "attributes": { - "POSITION": 27, - "NORMAL": 28, - "TEXCOORD_0": 29 - } - }, - { - "attributes": { - "POSITION": 30, - "NORMAL": 31, - "TEXCOORD_0": 32 - } - }, - { - "attributes": { - "POSITION": 33, - "NORMAL": 34, - "TEXCOORD_0": 35 - } - }, - { - "attributes": { - "POSITION": 36, - "NORMAL": 37, - "TEXCOORD_0": 38 - } - }, - { - "attributes": { - "POSITION": 39, - "NORMAL": 40, - "TEXCOORD_0": 41 - } - }, - { - "attributes": { - "POSITION": 42, - "NORMAL": 43, - "TEXCOORD_0": 44 - } - }, - { - "attributes": { - "POSITION": 45, - "NORMAL": 46, - "TEXCOORD_0": 47 - } - } - ] - } - ], - "nodes": [ - { - "children": [ - 1 - ] - }, - { - "children": [ - 2 - ] - }, - { - "extensions": { - "KITTYCAD_boundary_representation": { - "solid": 0 - } - }, - "mesh": 0 - } - ], - "scenes": [ - { - "nodes": [ - 0 - ] - } - ] -} \ No newline at end of file diff --git a/e2e/playwright/export-snapshots/gltf-standard.gltf b/e2e/playwright/export-snapshots/gltf-standard.gltf deleted file mode 100644 index cc491ece1..000000000 Binary files a/e2e/playwright/export-snapshots/gltf-standard.gltf and /dev/null differ diff --git a/e2e/playwright/export-snapshots/gltf-standard.png b/e2e/playwright/export-snapshots/gltf-standard.png new file mode 100644 index 000000000..aa42dc8e0 Binary files /dev/null and b/e2e/playwright/export-snapshots/gltf-standard.png differ diff --git a/e2e/playwright/export-snapshots/step-.step b/e2e/playwright/export-snapshots/step-.step deleted file mode 100644 index f8dfcdd83..000000000 --- a/e2e/playwright/export-snapshots/step-.step +++ /dev/null @@ -1,494 +0,0 @@ -ISO-10303-21; -HEADER; -FILE_DESCRIPTION((('zoo.dev export')), '2;1'); -FILE_NAME('dump.step', '1970-01-01T00:00:00.0+00:00', ('Author unknown'), ('Organization unknown'), 'zoo.dev beta', 'zoo.dev', 'Authorization unknown'); -FILE_SCHEMA(('AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LF')); -ENDSEC; -DATA; -#1 = ( - LENGTH_UNIT() - NAMED_UNIT(*) - SI_UNIT($, .METRE.) -); -#2 = UNCERTAINTY_MEASURE_WITH_UNIT(0.00001, #1, 'DISTANCE_ACCURACY_VALUE', $); -#3 = ( - GEOMETRIC_REPRESENTATION_CONTEXT(3) - GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#2)) - GLOBAL_UNIT_ASSIGNED_CONTEXT((#1)) - REPRESENTATION_CONTEXT('', '3D') -); -#4 = CARTESIAN_POINT('NONE', (0, 0, -0)); -#5 = VERTEX_POINT('NONE', #4); -#6 = CARTESIAN_POINT('NONE', (0, -0.64516, -0)); -#7 = VERTEX_POINT('NONE', #6); -#8 = CARTESIAN_POINT('NONE', (0, -0.64516, 2.58064)); -#9 = VERTEX_POINT('NONE', #8); -#10 = CARTESIAN_POINT('NONE', (0, 0, 2.58064)); -#11 = VERTEX_POINT('NONE', #10); -#12 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, -0)); -#13 = VERTEX_POINT('NONE', #12); -#14 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, 2.58064)); -#15 = VERTEX_POINT('NONE', #14); -#16 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, -0)); -#17 = VERTEX_POINT('NONE', #16); -#18 = CARTESIAN_POINT('NONE', (3.839550058615159, -1.9354799999999992, 2.58064)); -#19 = VERTEX_POINT('NONE', #18); -#20 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, -0)); -#21 = VERTEX_POINT('NONE', #20); -#22 = CARTESIAN_POINT('NONE', (6.12902, -1.93548, 2.58064)); -#23 = VERTEX_POINT('NONE', #22); -#24 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, -0)); -#25 = VERTEX_POINT('NONE', #24); -#26 = CARTESIAN_POINT('NONE', (6.12902, -1.6129, 2.58064)); -#27 = VERTEX_POINT('NONE', #26); -#28 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, -0)); -#29 = VERTEX_POINT('NONE', #28); -#30 = CARTESIAN_POINT('NONE', (3.9412591419317424, -1.6129, 2.58064)); -#31 = VERTEX_POINT('NONE', #30); -#32 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, -0)); -#33 = VERTEX_POINT('NONE', #32); -#34 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, 2.58064)); -#35 = VERTEX_POINT('NONE', #34); -#36 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, -0)); -#37 = VERTEX_POINT('NONE', #36); -#38 = CARTESIAN_POINT('NONE', (3.7131243491113075, 0.9677400000000002, 2.58064)); -#39 = VERTEX_POINT('NONE', #38); -#40 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, -0)); -#41 = VERTEX_POINT('NONE', #40); -#42 = CARTESIAN_POINT('NONE', (6.12902, 0.9677399999999998, 2.58064)); -#43 = VERTEX_POINT('NONE', #42); -#44 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, -0)); -#45 = VERTEX_POINT('NONE', #44); -#46 = CARTESIAN_POINT('NONE', (6.12902, 1.29032, 2.58064)); -#47 = VERTEX_POINT('NONE', #46); -#48 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, -0)); -#49 = VERTEX_POINT('NONE', #48); -#50 = CARTESIAN_POINT('NONE', (3.6416100848359463, 1.29032, 2.58064)); -#51 = VERTEX_POINT('NONE', #50); -#52 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, -0)); -#53 = VERTEX_POINT('NONE', #52); -#54 = CARTESIAN_POINT('NONE', (2.2580599999999995, 0.64516, 2.58064)); -#55 = VERTEX_POINT('NONE', #54); -#56 = CARTESIAN_POINT('NONE', (0, 0.64516, -0)); -#57 = VERTEX_POINT('NONE', #56); -#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); -#62 = CARTESIAN_POINT('NONE', (0, 0, -0)); -#63 = LINE('NONE', #62, #61); -#64 = DIRECTION('NONE', (0, 0, 1)); -#65 = VECTOR('NONE', #64, 1); -#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, 2.58064)); -#71 = LINE('NONE', #70, #69); -#72 = DIRECTION('NONE', (0, 0, 1)); -#73 = VECTOR('NONE', #72, 1); -#74 = CARTESIAN_POINT('NONE', (0, 0, -0)); -#75 = LINE('NONE', #74, #73); -#76 = DIRECTION('NONE', (1, 0, 0)); -#77 = VECTOR('NONE', #76, 1); -#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', (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.64516, 2.58064)); -#87 = LINE('NONE', #86, #85); -#88 = DIRECTION('NONE', (0.819152044288992, -0.5735764363510459, 0)); -#89 = VECTOR('NONE', #88, 1); -#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', (3.839550058615159, -1.9354799999999992, -0)); -#95 = LINE('NONE', #94, #93); -#96 = DIRECTION('NONE', (0.819152044288992, -0.5735764363510459, 0)); -#97 = VECTOR('NONE', #96, 1); -#98 = CARTESIAN_POINT('NONE', (1.996782122555674, -0.64516, 2.58064)); -#99 = LINE('NONE', #98, #97); -#100 = DIRECTION('NONE', (1, -0.00000000000000038794063361359933, 0)); -#101 = VECTOR('NONE', #100, 1); -#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', (6.12902, -1.93548, -0)); -#107 = LINE('NONE', #106, #105); -#108 = DIRECTION('NONE', (1, -0.00000000000000038794063361359933, 0)); -#109 = VECTOR('NONE', #108, 1); -#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', (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', (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', (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', (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', (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', (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', (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', (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', (3.9412591419317424, -1.6129, 2.58064)); -#147 = LINE('NONE', #146, #145); -#148 = DIRECTION('NONE', (0.90630778703665, 0.4226182617406992, 0)); -#149 = VECTOR('NONE', #148, 1); -#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', (3.7131243491113075, 0.9677400000000002, -0)); -#155 = LINE('NONE', #154, #153); -#156 = DIRECTION('NONE', (0.90630778703665, 0.4226182617406992, 0)); -#157 = VECTOR('NONE', #156, 1); -#158 = CARTESIAN_POINT('NONE', (1.6377992218573856, 0, 2.58064)); -#159 = LINE('NONE', #158, #157); -#160 = DIRECTION('NONE', (1, -0.0000000000000001378647737807002, 0)); -#161 = VECTOR('NONE', #160, 1); -#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', (6.12902, 0.9677399999999998, -0)); -#167 = LINE('NONE', #166, #165); -#168 = DIRECTION('NONE', (1, -0.0000000000000001378647737807002, 0)); -#169 = VECTOR('NONE', #168, 1); -#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', (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', (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', (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', (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', (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', (6.12902, 1.29032, 2.58064)); -#195 = LINE('NONE', #194, #193); -#196 = DIRECTION('NONE', (-0.90630778703665, -0.4226182617406995, 0)); -#197 = VECTOR('NONE', #196, 1); -#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', (2.2580599999999995, 0.64516, -0)); -#203 = LINE('NONE', #202, #201); -#204 = DIRECTION('NONE', (-0.90630778703665, -0.4226182617406995, 0)); -#205 = VECTOR('NONE', #204, 1); -#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', (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.64516, -0)); -#215 = LINE('NONE', #214, #213); -#216 = DIRECTION('NONE', (-1, 0, 0)); -#217 = VECTOR('NONE', #216, 1); -#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.64516, -0)); -#223 = LINE('NONE', #222, #221); -#224 = DIRECTION('NONE', (0, -1, 0)); -#225 = VECTOR('NONE', #224, 1); -#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.); -#230 = EDGE_CURVE('NONE', #11, #9, #71, .T.); -#231 = EDGE_CURVE('NONE', #5, #11, #75, .T.); -#232 = EDGE_CURVE('NONE', #7, #13, #79, .T.); -#233 = EDGE_CURVE('NONE', #13, #15, #83, .T.); -#234 = EDGE_CURVE('NONE', #9, #15, #87, .T.); -#235 = EDGE_CURVE('NONE', #13, #17, #91, .T.); -#236 = EDGE_CURVE('NONE', #17, #19, #95, .T.); -#237 = EDGE_CURVE('NONE', #15, #19, #99, .T.); -#238 = EDGE_CURVE('NONE', #17, #21, #103, .T.); -#239 = EDGE_CURVE('NONE', #21, #23, #107, .T.); -#240 = EDGE_CURVE('NONE', #19, #23, #111, .T.); -#241 = EDGE_CURVE('NONE', #21, #25, #115, .T.); -#242 = EDGE_CURVE('NONE', #25, #27, #119, .T.); -#243 = EDGE_CURVE('NONE', #23, #27, #123, .T.); -#244 = EDGE_CURVE('NONE', #25, #29, #127, .T.); -#245 = EDGE_CURVE('NONE', #29, #31, #131, .T.); -#246 = EDGE_CURVE('NONE', #27, #31, #135, .T.); -#247 = EDGE_CURVE('NONE', #29, #33, #139, .T.); -#248 = EDGE_CURVE('NONE', #33, #35, #143, .T.); -#249 = EDGE_CURVE('NONE', #31, #35, #147, .T.); -#250 = EDGE_CURVE('NONE', #33, #37, #151, .T.); -#251 = EDGE_CURVE('NONE', #37, #39, #155, .T.); -#252 = EDGE_CURVE('NONE', #35, #39, #159, .T.); -#253 = EDGE_CURVE('NONE', #37, #41, #163, .T.); -#254 = EDGE_CURVE('NONE', #41, #43, #167, .T.); -#255 = EDGE_CURVE('NONE', #39, #43, #171, .T.); -#256 = EDGE_CURVE('NONE', #41, #45, #175, .T.); -#257 = EDGE_CURVE('NONE', #45, #47, #179, .T.); -#258 = EDGE_CURVE('NONE', #43, #47, #183, .T.); -#259 = EDGE_CURVE('NONE', #45, #49, #187, .T.); -#260 = EDGE_CURVE('NONE', #49, #51, #191, .T.); -#261 = EDGE_CURVE('NONE', #47, #51, #195, .T.); -#262 = EDGE_CURVE('NONE', #49, #53, #199, .T.); -#263 = EDGE_CURVE('NONE', #53, #55, #203, .T.); -#264 = EDGE_CURVE('NONE', #51, #55, #207, .T.); -#265 = EDGE_CURVE('NONE', #53, #57, #211, .T.); -#266 = EDGE_CURVE('NONE', #57, #59, #215, .T.); -#267 = EDGE_CURVE('NONE', #55, #59, #219, .T.); -#268 = EDGE_CURVE('NONE', #57, #5, #223, .T.); -#269 = EDGE_CURVE('NONE', #59, #11, #227, .T.); -#270 = ORIENTED_EDGE('NONE', *, *, #228, .T.); -#271 = ORIENTED_EDGE('NONE', *, *, #229, .T.); -#272 = ORIENTED_EDGE('NONE', *, *, #230, .F.); -#273 = ORIENTED_EDGE('NONE', *, *, #231, .F.); -#274 = EDGE_LOOP('NONE', (#270, #271, #272, #273)); -#275 = ORIENTED_EDGE('NONE', *, *, #232, .T.); -#276 = ORIENTED_EDGE('NONE', *, *, #233, .T.); -#277 = ORIENTED_EDGE('NONE', *, *, #234, .F.); -#278 = ORIENTED_EDGE('NONE', *, *, #229, .F.); -#279 = EDGE_LOOP('NONE', (#275, #276, #277, #278)); -#280 = ORIENTED_EDGE('NONE', *, *, #235, .T.); -#281 = ORIENTED_EDGE('NONE', *, *, #236, .T.); -#282 = ORIENTED_EDGE('NONE', *, *, #237, .F.); -#283 = ORIENTED_EDGE('NONE', *, *, #233, .F.); -#284 = EDGE_LOOP('NONE', (#280, #281, #282, #283)); -#285 = ORIENTED_EDGE('NONE', *, *, #238, .T.); -#286 = ORIENTED_EDGE('NONE', *, *, #239, .T.); -#287 = ORIENTED_EDGE('NONE', *, *, #240, .F.); -#288 = ORIENTED_EDGE('NONE', *, *, #236, .F.); -#289 = EDGE_LOOP('NONE', (#285, #286, #287, #288)); -#290 = ORIENTED_EDGE('NONE', *, *, #241, .T.); -#291 = ORIENTED_EDGE('NONE', *, *, #242, .T.); -#292 = ORIENTED_EDGE('NONE', *, *, #243, .F.); -#293 = ORIENTED_EDGE('NONE', *, *, #239, .F.); -#294 = EDGE_LOOP('NONE', (#290, #291, #292, #293)); -#295 = ORIENTED_EDGE('NONE', *, *, #244, .T.); -#296 = ORIENTED_EDGE('NONE', *, *, #245, .T.); -#297 = ORIENTED_EDGE('NONE', *, *, #246, .F.); -#298 = ORIENTED_EDGE('NONE', *, *, #242, .F.); -#299 = EDGE_LOOP('NONE', (#295, #296, #297, #298)); -#300 = ORIENTED_EDGE('NONE', *, *, #247, .T.); -#301 = ORIENTED_EDGE('NONE', *, *, #248, .T.); -#302 = ORIENTED_EDGE('NONE', *, *, #249, .F.); -#303 = ORIENTED_EDGE('NONE', *, *, #245, .F.); -#304 = EDGE_LOOP('NONE', (#300, #301, #302, #303)); -#305 = ORIENTED_EDGE('NONE', *, *, #250, .T.); -#306 = ORIENTED_EDGE('NONE', *, *, #251, .T.); -#307 = ORIENTED_EDGE('NONE', *, *, #252, .F.); -#308 = ORIENTED_EDGE('NONE', *, *, #248, .F.); -#309 = EDGE_LOOP('NONE', (#305, #306, #307, #308)); -#310 = ORIENTED_EDGE('NONE', *, *, #253, .T.); -#311 = ORIENTED_EDGE('NONE', *, *, #254, .T.); -#312 = ORIENTED_EDGE('NONE', *, *, #255, .F.); -#313 = ORIENTED_EDGE('NONE', *, *, #251, .F.); -#314 = EDGE_LOOP('NONE', (#310, #311, #312, #313)); -#315 = ORIENTED_EDGE('NONE', *, *, #256, .T.); -#316 = ORIENTED_EDGE('NONE', *, *, #257, .T.); -#317 = ORIENTED_EDGE('NONE', *, *, #258, .F.); -#318 = ORIENTED_EDGE('NONE', *, *, #254, .F.); -#319 = EDGE_LOOP('NONE', (#315, #316, #317, #318)); -#320 = ORIENTED_EDGE('NONE', *, *, #259, .T.); -#321 = ORIENTED_EDGE('NONE', *, *, #260, .T.); -#322 = ORIENTED_EDGE('NONE', *, *, #261, .F.); -#323 = ORIENTED_EDGE('NONE', *, *, #257, .F.); -#324 = EDGE_LOOP('NONE', (#320, #321, #322, #323)); -#325 = ORIENTED_EDGE('NONE', *, *, #262, .T.); -#326 = ORIENTED_EDGE('NONE', *, *, #263, .T.); -#327 = ORIENTED_EDGE('NONE', *, *, #264, .F.); -#328 = ORIENTED_EDGE('NONE', *, *, #260, .F.); -#329 = EDGE_LOOP('NONE', (#325, #326, #327, #328)); -#330 = ORIENTED_EDGE('NONE', *, *, #265, .T.); -#331 = ORIENTED_EDGE('NONE', *, *, #266, .T.); -#332 = ORIENTED_EDGE('NONE', *, *, #267, .F.); -#333 = ORIENTED_EDGE('NONE', *, *, #263, .F.); -#334 = EDGE_LOOP('NONE', (#330, #331, #332, #333)); -#335 = ORIENTED_EDGE('NONE', *, *, #268, .T.); -#336 = ORIENTED_EDGE('NONE', *, *, #231, .T.); -#337 = ORIENTED_EDGE('NONE', *, *, #269, .F.); -#338 = ORIENTED_EDGE('NONE', *, *, #266, .F.); -#339 = EDGE_LOOP('NONE', (#335, #336, #337, #338)); -#340 = ORIENTED_EDGE('NONE', *, *, #228, .T.); -#341 = ORIENTED_EDGE('NONE', *, *, #232, .T.); -#342 = ORIENTED_EDGE('NONE', *, *, #235, .T.); -#343 = ORIENTED_EDGE('NONE', *, *, #238, .T.); -#344 = ORIENTED_EDGE('NONE', *, *, #241, .T.); -#345 = ORIENTED_EDGE('NONE', *, *, #244, .T.); -#346 = ORIENTED_EDGE('NONE', *, *, #247, .T.); -#347 = ORIENTED_EDGE('NONE', *, *, #250, .T.); -#348 = ORIENTED_EDGE('NONE', *, *, #253, .T.); -#349 = ORIENTED_EDGE('NONE', *, *, #256, .T.); -#350 = ORIENTED_EDGE('NONE', *, *, #259, .T.); -#351 = ORIENTED_EDGE('NONE', *, *, #262, .T.); -#352 = ORIENTED_EDGE('NONE', *, *, #265, .T.); -#353 = ORIENTED_EDGE('NONE', *, *, #268, .T.); -#354 = EDGE_LOOP('NONE', (#340, #341, #342, #343, #344, #345, #346, #347, #348, #349, #350, #351, #352, #353)); -#355 = ORIENTED_EDGE('NONE', *, *, #230, .T.); -#356 = ORIENTED_EDGE('NONE', *, *, #234, .T.); -#357 = ORIENTED_EDGE('NONE', *, *, #237, .T.); -#358 = ORIENTED_EDGE('NONE', *, *, #240, .T.); -#359 = ORIENTED_EDGE('NONE', *, *, #243, .T.); -#360 = ORIENTED_EDGE('NONE', *, *, #246, .T.); -#361 = ORIENTED_EDGE('NONE', *, *, #249, .T.); -#362 = ORIENTED_EDGE('NONE', *, *, #252, .T.); -#363 = ORIENTED_EDGE('NONE', *, *, #255, .T.); -#364 = ORIENTED_EDGE('NONE', *, *, #258, .T.); -#365 = ORIENTED_EDGE('NONE', *, *, #261, .T.); -#366 = ORIENTED_EDGE('NONE', *, *, #264, .T.); -#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.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.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', (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', (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', (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', (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', (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', (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', (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', (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', (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', (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', (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.32257999999999987, 1.2903199999999995)); -#423 = DIRECTION('NONE', (-1, -0, 0)); -#424 = AXIS2_PLACEMENT_3D('NONE', #422, #423, $); -#425 = PLANE('NONE', #424); -#426 = CARTESIAN_POINT('NONE', (0, 0, -0)); -#427 = DIRECTION('NONE', (0, 0, 1)); -#428 = AXIS2_PLACEMENT_3D('NONE', #426, #427, $); -#429 = PLANE('NONE', #428); -#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); -#434 = FACE_OUTER_BOUND('NONE', #274, .T.); -#435 = ADVANCED_FACE('NONE', (#434), #373, .T.); -#436 = FACE_OUTER_BOUND('NONE', #279, .T.); -#437 = ADVANCED_FACE('NONE', (#436), #377, .T.); -#438 = FACE_OUTER_BOUND('NONE', #284, .T.); -#439 = ADVANCED_FACE('NONE', (#438), #381, .T.); -#440 = FACE_OUTER_BOUND('NONE', #289, .T.); -#441 = ADVANCED_FACE('NONE', (#440), #385, .T.); -#442 = FACE_OUTER_BOUND('NONE', #294, .T.); -#443 = ADVANCED_FACE('NONE', (#442), #389, .T.); -#444 = FACE_OUTER_BOUND('NONE', #299, .T.); -#445 = ADVANCED_FACE('NONE', (#444), #393, .T.); -#446 = FACE_OUTER_BOUND('NONE', #304, .T.); -#447 = ADVANCED_FACE('NONE', (#446), #397, .T.); -#448 = FACE_OUTER_BOUND('NONE', #309, .T.); -#449 = ADVANCED_FACE('NONE', (#448), #401, .T.); -#450 = FACE_OUTER_BOUND('NONE', #314, .T.); -#451 = ADVANCED_FACE('NONE', (#450), #405, .T.); -#452 = FACE_OUTER_BOUND('NONE', #319, .T.); -#453 = ADVANCED_FACE('NONE', (#452), #409, .T.); -#454 = FACE_OUTER_BOUND('NONE', #324, .T.); -#455 = ADVANCED_FACE('NONE', (#454), #413, .T.); -#456 = FACE_OUTER_BOUND('NONE', #329, .T.); -#457 = ADVANCED_FACE('NONE', (#456), #417, .T.); -#458 = FACE_OUTER_BOUND('NONE', #334, .T.); -#459 = ADVANCED_FACE('NONE', (#458), #421, .T.); -#460 = FACE_OUTER_BOUND('NONE', #339, .T.); -#461 = ADVANCED_FACE('NONE', (#460), #425, .T.); -#462 = FACE_OUTER_BOUND('NONE', #354, .F.); -#463 = ADVANCED_FACE('NONE', (#462), #429, .F.); -#464 = FACE_OUTER_BOUND('NONE', #369, .T.); -#465 = ADVANCED_FACE('NONE', (#464), #433, .T.); -#466 = CLOSED_SHELL('NONE', (#435, #437, #439, #441, #443, #445, #447, #449, #451, #453, #455, #457, #459, #461, #463, #465)); -#467 = ORIENTED_CLOSED_SHELL('NONE', *, #466, .T.); -#468 = MANIFOLD_SOLID_BREP('NONE', #467); -#469 = APPLICATION_CONTEXT('configuration controlled 3D design of mechanical parts and assemblies'); -#470 = PRODUCT_DEFINITION_CONTEXT('part definition', #469, 'design'); -#471 = PRODUCT('UNIDENTIFIED_PRODUCT', 'NONE', $, ()); -#472 = PRODUCT_DEFINITION_FORMATION('', $, #471); -#473 = PRODUCT_DEFINITION('design', $, #472, #470); -#474 = PRODUCT_DEFINITION_SHAPE('NONE', $, #473); -#475 = ADVANCED_BREP_SHAPE_REPRESENTATION('NONE', (#468), #3); -#476 = SHAPE_DEFINITION_REPRESENTATION(#474, #475); -ENDSEC; -END-ISO-10303-21; diff --git a/e2e/playwright/export-snapshots/stl-ascii.stl b/e2e/playwright/export-snapshots/stl-ascii.stl deleted file mode 100644 index 40370c8a8..000000000 --- a/e2e/playwright/export-snapshots/stl-ascii.stl +++ /dev/null @@ -1,478 +0,0 @@ -solid unnamed -facet normal -1 0 0 - outer loop - vertex 0 -101.600006 0 - vertex 0 -0 0 - vertex 0 -101.600006 -25.400002 - endloop -endfacet -facet normal -1 0 0 - outer loop - vertex 0 -101.600006 -25.400002 - vertex 0 -0 0 - vertex 0 -0 -25.400002 - endloop -endfacet -facet normal 0 0 -1 - outer loop - 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 78.613464 -101.600006 -25.400002 - vertex 0 -0 -25.400002 - vertex 78.613464 -0 -25.400002 - endloop -endfacet -facet normal -0.5735764 0 -0.8191522 - outer loop - 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.5735764 0 -0.8191522 - outer loop - 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 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 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 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 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 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 143.37048 -101.600006 50.800003 - vertex 241.3 -0 50.800003 - vertex 143.37048 -0 50.800003 - endloop -endfacet -facet normal -0.42261827 0 0.9063078 - outer loop - 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.42261827 0 0.9063078 - outer loop - 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 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 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 -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 -101.600006 0 - vertex 0 -0 25.400002 - vertex 0 -0 0 - endloop -endfacet -facet normal 0 1 -0 - outer loop - 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 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 87.15214 -0 -15.875 - vertex 109.82398 -0 -31.75 - vertex 78.613464 -0 -25.400002 - endloop -endfacet -facet normal 0 1 0 - outer loop - 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 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 25.400002 - vertex 64.480286 -0 0 - vertex 0 -0 0 - endloop -endfacet -facet normal -0 1 0 - outer loop - 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 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 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 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 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 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 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 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 64.480286 -0 0 - endloop -endfacet -facet normal -0 -1 0 - outer loop - 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 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 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 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 - outer loop - 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 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 -1 -0 - outer loop - 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 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 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 -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.stl b/e2e/playwright/export-snapshots/stl-binary.stl deleted file mode 100644 index cd0b2f820..000000000 Binary files a/e2e/playwright/export-snapshots/stl-binary.stl and /dev/null differ diff --git a/e2e/playwright/snapshot-tests.spec.ts b/e2e/playwright/snapshot-tests.spec.ts index 112882893..7e21fe119 100644 --- a/e2e/playwright/snapshot-tests.spec.ts +++ b/e2e/playwright/snapshot-tests.spec.ts @@ -5,6 +5,8 @@ import { Models } from '@kittycad/lib' import fsp from 'fs/promises' import { spawn } from 'child_process' import { APP_NAME } from 'lib/constants' +import JSZip from 'jszip' +import path from 'path' test.beforeEach(async ({ context, page }) => { await context.addInitScript(async (token) => { @@ -127,14 +129,11 @@ const part001 = startSketchOn('-XZ') } const [downloadPromise1, downloadResolve1] = getPromiseAndResolve() - const [downloadPromise2, downloadResolve2] = getPromiseAndResolve() let downloadCnt = 0 page.on('download', async (download) => { if (downloadCnt === 0) { downloadResolve1(download) - } else if (downloadCnt === 1) { - downloadResolve2(download) } downloadCnt++ }) @@ -147,30 +146,8 @@ const part001 = startSketchOn('-XZ') 'storage' in output ? output.storage : '' }${extra}.${isImage ? 'png' : output.type}` const downloadLocation = downloadLocationer() - const downloadLocation2 = downloadLocationer('-2') - if (output.type === 'gltf' && output.storage === 'standard') { - // wait for second download - const download2 = await downloadPromise2 - await download.saveAs(downloadLocation) - await download2.saveAs(downloadLocation2) - - // rewrite uri to reference our file name - const fileContents = await fsp.readFile(downloadLocation, 'utf-8') - const isJson = fileContents.includes('buffers') - let contents = fileContents - let reWriteLocation = downloadLocation - let uri = downloadLocation2.split('/').pop() - if (!isJson) { - contents = await fsp.readFile(downloadLocation2, 'utf-8') - reWriteLocation = downloadLocation2 - uri = downloadLocation.split('/').pop() - } - contents = contents.replace(/"uri": ".*"/g, `"uri": "${uri}"`) - await fsp.writeFile(reWriteLocation, contents) - } else { - await download.saveAs(downloadLocation) - } + await download.saveAs(downloadLocation) if (output.type === 'step') { // stable timestamps for step files @@ -274,24 +251,59 @@ const part001 = startSketchOn('-XZ') presentation: 'pretty', }) ) - - // TODO: gltfs don't seem to work with snap shots. push onto exportLocations once it's figured out - await doExport({ - type: 'gltf', - storage: 'standard', - presentation: 'pretty', - }) + exportLocations.push( + await doExport({ + type: 'gltf', + storage: 'standard', + presentation: 'pretty', + }) + ) // close page to disconnect websocket since we can only have one open atm await page.close() // snapshot exports, good compromise to capture that exports are healthy without getting bogged down in "did the formatting change" changes // context: https://github.com/KittyCAD/modeling-app/issues/1222 - for (const { modelPath, imagePath, outputType } of exportLocations) { - console.log( - `taking snapshot of using: "zoo file snapshot --output-format=png --src-format=${outputType} ${modelPath} ${imagePath}"` - ) - const cliCommand = `export ZOO_TOKEN=${secrets.snapshottoken} && zoo file snapshot --output-format=png --src-format=${outputType} ${modelPath} ${imagePath}` + for (let { modelPath, imagePath, outputType } of exportLocations) { + // May change depending on the file being dealt with + let cliCommand = `export ZOO_TOKEN=${secrets.snapshottoken} && zoo file snapshot --output-format=png --src-format=${outputType} ${modelPath} ${imagePath}` + + const parentPath = path.dirname(modelPath) + + // This is actually a zip file. + if (modelPath.includes('gltf-standard.gltf')) { + console.log('Extracting files from archive') + const readZipFile = fsp.readFile(modelPath) + const unzip = (archive: any) => + Object.values(archive.files).map((file: any) => ({ + name: file.name, + promise: file.async('nodebuffer'), + })) + const writeFiles = (files: any) => + Promise.all( + files.map((file: any) => + file.promise.then((data: any) => { + console.log(`Writing ${file.name}`) + return fsp + .writeFile(`${parentPath}/${file.name}`, data) + .then(() => file.name) + }) + ) + ) + + const filenames = await readZipFile + .then(JSZip.loadAsync) + .then(unzip) + .then(writeFiles) + const gltfFilename = filenames.filter((t: string) => + t.includes('.gltf') + )[0] + if (!gltfFilename) throw new Error('No output.gltf in this archive') + cliCommand = `export ZOO_TOKEN=${secrets.snapshottoken} && zoo file snapshot --output-format=png --src-format=${outputType} ${parentPath}/${gltfFilename} ${imagePath}` + } + + console.log(cliCommand) + const child = spawn(cliCommand, { shell: true }) const result = await new Promise((resolve, reject) => { child.on('error', (code: any, msg: any) => { diff --git a/package.json b/package.json index 0aa05fa2a..1d542348d 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "fuse.js": "^7.0.0", "http-server": "^14.1.1", "json-rpc-2.0": "^1.6.0", + "jszip": "^3.10.1", "node-fetch": "^3.3.2", "re-resizable": "^6.9.11", "react": "^18.2.0", diff --git a/src/lib/exportSave.ts b/src/lib/exportSave.ts index 035c2a091..25ed1b779 100644 --- a/src/lib/exportSave.ts +++ b/src/lib/exportSave.ts @@ -4,41 +4,61 @@ import { browserSaveFile } from './browserSaveFile' import { save } from '@tauri-apps/api/dialog' import { writeBinaryFile } from '@tauri-apps/api/fs' -// Saves files locally from an export call. -export async function exportSave(data: ArrayBuffer) { - // This converts the ArrayBuffer to a Rust equivalent Vec. - let uintArray = new Uint8Array(data) +import JSZip from 'jszip' + +interface ModelingAppFile { + name: string + contents: number[] +} + +const save_ = async (file: ModelingAppFile) => { try { - const files: { contents: number[]; name: string }[] = - deserialize_files(uintArray) - for (const file of files) { - if (isTauri()) { - // Open a dialog to save the file. - const filePath = await save({ - defaultPath: file.name, - }) + if (isTauri()) { + // Open a dialog to save the file. + const filePath = await save({ + defaultPath: file.name, + }) - if (filePath === null) { - // The user canceled the save. - // Return early. - return - } - - // Write the file. - await writeBinaryFile(filePath, file.contents) - } else { - // Download the file to the user's computer. - // Now we need to download the files to the user's downloads folder. - // Or the destination they choose. - // Iterate over the files. - // Create a new blob. - const blob = new Blob([new Uint8Array(file.contents)]) - // Save the file. - await browserSaveFile(blob, file.name) + if (filePath === null) { + // The user canceled the save. + // Return early. + return } + + // Write the file. + await writeBinaryFile(filePath, file.contents) + } else { + // Download the file to the user's computer. + // Now we need to download the files to the user's downloads folder. + // Or the destination they choose. + // Iterate over the files. + // Create a new blob. + const blob = new Blob([new Uint8Array(file.contents)]) + // Save the file. + await browserSaveFile(blob, file.name) } } catch (e) { // TODO: do something real with the error. console.log('export error', e) } } + +// Saves files locally from an export call. +export async function exportSave(data: ArrayBuffer) { + // This converts the ArrayBuffer to a Rust equivalent Vec. + let uintArray = new Uint8Array(data) + + const files: ModelingAppFile[] = deserialize_files(uintArray) + + if (files.length > 1) { + let zip = new JSZip() + for (const file of files) { + zip.file(file.name, new Uint8Array(file.contents), { binary: true }) + } + return zip.generateAsync({ type: 'array' }).then((contents) => { + return save_({ name: 'output.zip', contents }) + }) + } else { + return save_(files[0]) + } +} diff --git a/yarn.lock b/yarn.lock index 37126aba8..33fb50662 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5470,6 +5470,11 @@ ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== + import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -6041,6 +6046,16 @@ jsonfile@^4.0.0: object.assign "^4.1.4" object.values "^1.1.6" +jszip@^3.10.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2" + integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g== + dependencies: + lie "~3.3.0" + pako "~1.0.2" + readable-stream "~2.3.6" + setimmediate "^1.0.5" + keyv@^4.5.3: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" @@ -6080,6 +6095,13 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +lie@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" + integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== + dependencies: + immediate "~3.0.5" + lilconfig@^2.0.5, lilconfig@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" @@ -6825,6 +6847,11 @@ pac-resolver@^7.0.0: ip "^1.1.8" netmask "^2.0.2" +pako@~1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"