Compare commits

..

1 Commits

Author SHA1 Message Date
jyviko 43f6ee6a98 Contributing: kernel operations migrate to solidcore; features call its API
AGENTS.md, CONTRIBUTING.md and the contributing skill say how the work is
split since 0.40: SolidCraft is the application and calls the solidcore API;
geometry math (evaluators, intersections, solvers, tessellation, kernel cases)
is added to solidcore first. New features are discussed on Discord, then get
an issue and a claim, after a search of all issues and pull requests, open and
closed, for similar work. Work begun before 0.40 is ported onto today's code
before it lands. The kernel-paused section becomes "Kernel work goes to
solidcore".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 17:23:31 -05:00
1211 changed files with 27424 additions and 237044 deletions
-6
View File
@@ -33,12 +33,6 @@ slow-timeout = { period = "60s" }
[profile.ci.junit]
path = "junit.xml"
# Bound the whole test process, including Vulkan host initialization and teardown.
# Cold runs can warm multiple pipelines before the first image starts rendering.
[[profile.ci.overrides]]
filter = "package(=solidcraft-ui-egui) & test(=render_workspace::tests::progressive_image_controls_route_to_the_registered_host)"
slow-timeout = { period = "60s", terminate-after = 20 }
# The action matrix sample runs its designs in parallel workers (ACTION_MATRIX_JOBS, set to match in
# ci.yml). Its workers reserve that many of nextest's threads, so the cores are not oversubscribed
# (a pi-case hole that takes 8 s alone went past the matrix's 90 s action limit when they were),
-3
View File
@@ -1,9 +1,6 @@
# Preserve canonical source receipts and the runtime icon-discovery snapshot.
.gitattributes text eol=lf
/assets/icons/ui/design/requested_icons.txt text eol=lf
# Shaders reach the code through include_str!, and tests match multi-line WGSL excerpts
# written as Rust strings (always LF), so a CRLF checkout must not change them (#13138).
*.wgsl text eol=lf
# SolidCraft designs (.sc): a JSON document or a ZIP container, never Scala source, so they
# stay out of GitHub's language statistics. Git's own text/binary detection handles both kinds.
*.sc -linguist-detectable
+3 -33
View File
@@ -505,15 +505,9 @@ jobs:
key: native-tests
save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
- name: Set up compiler cache
id: sccache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
# A failed download of sccache (GitHub release outages answer 504) must not fail the build.
continue-on-error: true
- name: Build without the compiler cache if it could not be set up
if: steps.sccache.outcome == 'failure'
run: echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
- uses: taiki-e/install-action@1168f6810a3cb30a3514bf5756a3b7f0422c6df8 # v2.87.28
with:
tool: cargo-nextest
@@ -534,7 +528,7 @@ jobs:
compression-level: 0
- name: Compiler cache statistics
if: always()
run: if command -v sccache >/dev/null; then sccache --show-stats; else echo "sccache was not set up; built without it"; fi
run: sccache --show-stats
tests:
name: Native Linux tests
@@ -582,15 +576,9 @@ jobs:
key: native-tests
save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
- name: Set up compiler cache
id: sccache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
# A failed download of sccache (GitHub release outages answer 504) must not fail the build.
continue-on-error: true
- name: Build without the compiler cache if it could not be set up
if: steps.sccache.outcome == 'failure'
run: echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
- uses: taiki-e/install-action@1168f6810a3cb30a3514bf5756a3b7f0422c6df8 # v2.87.28
with:
tool: cargo-nextest
@@ -631,7 +619,7 @@ jobs:
cargo xtask known-failing --junit "$junit"
- name: Compiler cache statistics
if: always()
run: if command -v sccache >/dev/null; then sccache --show-stats; else echo "sccache was not set up; built without it"; fi
run: sccache --show-stats
- name: Upload test timings
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
@@ -704,15 +692,9 @@ jobs:
key: native-gpu
save-if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') && matrix.shard == 1 }}
- name: Set up compiler cache
id: sccache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
# A failed download of sccache (GitHub release outages answer 504) must not fail the build.
continue-on-error: true
- name: Build without the compiler cache if it could not be set up
if: steps.sccache.outcome == 'failure'
run: echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
- uses: taiki-e/install-action@1168f6810a3cb30a3514bf5756a3b7f0422c6df8 # v2.87.28
with:
tool: cargo-nextest
@@ -733,7 +715,7 @@ jobs:
cargo xtask known-failing --junit "$junit"
- name: Compiler cache statistics
if: always()
run: if command -v sccache >/dev/null; then sccache --show-stats; else echo "sccache was not set up; built without it"; fi
run: sccache --show-stats
- name: Upload test timings
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
@@ -866,15 +848,9 @@ jobs:
key: doc-tests
save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
- name: Set up compiler cache
id: sccache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
# A failed download of sccache (GitHub release outages answer 504) must not fail the build.
continue-on-error: true
- name: Build without the compiler cache if it could not be set up
if: steps.sccache.outcome == 'failure'
run: echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
# nextest does not run doc tests.
- name: Doc tests
env:
@@ -930,15 +906,9 @@ jobs:
key: oracle
save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
- name: Set up compiler cache
id: sccache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
# A failed download of sccache (GitHub release outages answer 504) must not fail the build.
continue-on-error: true
- name: Build without the compiler cache if it could not be set up
if: steps.sccache.outcome == 'failure'
run: echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
- name: Build the command line
run: cargo build -p solidcraft-cli --profile ci --locked
- name: Replay tests/oracle and compare with expected.json
-6
View File
@@ -85,15 +85,9 @@ jobs:
key: fillet-rig
save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
- name: Set up compiler cache
id: sccache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
# A failed download of sccache (GitHub release outages answer 504) must not fail the build.
continue-on-error: true
- name: Build without the compiler cache if it could not be set up
if: steps.sccache.outcome == 'failure'
run: echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
- name: Build the CLI (release)
run: cargo build --release --locked -p solidcraft-cli
- name: Run the fillet cases against the known-failing list
+1 -1
View File
@@ -1,6 +1,6 @@
# While a new geometry kernel is evaluated, new issues and discussions about kernel work, and new
# pull requests that change the kernel directories, are labelled `kernel-paused` for a maintainer to
# answer (CONTRIBUTING.md, "Kernel work is paused"). The logic is in scripts/kernel-paused/ (tested
# answer (CONTRIBUTING.md, "Kernel work goes to solidcore"). The logic is in scripts/kernel-paused/ (tested
# in ci.yml).
name: Kernel paused
+1 -7
View File
@@ -149,15 +149,9 @@ jobs:
key: kernel-rig
save-if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') }}
- name: Set up compiler cache
id: sccache
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
# A failed download of sccache (GitHub release outages answer 504) must not fail the build.
continue-on-error: true
- name: Build without the compiler cache if it could not be set up
if: steps.sccache.outcome == 'failure'
run: echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
- name: Build the CLI (release) and the rig's runner
run: |
cargo build --release --locked -p solidcraft-cli
@@ -180,7 +174,7 @@ jobs:
retention-days: 1
- name: Compiler cache statistics
if: always()
run: if command -v sccache >/dev/null; then sccache --show-stats; else echo "sccache was not set up; built without it"; fi
run: sccache --show-stats
shard:
name: Kernel rig (${{ matrix.shard }})
+2 -13
View File
@@ -725,16 +725,10 @@ jobs:
run: |
tag="v$VERSION"
sha256sum --check SHA256SUMS.txt
# Generated notes start at the newest published release, pre-releases included. Left
# to GitHub they start at the Latest stable one, and the list outgrows the 125,000
# characters a release body may have.
start=()
prev="$(gh release list --exclude-drafts --limit 30 --json tagName,publishedAt --jq 'sort_by(.publishedAt) | last | .tagName // empty')"
if [ -n "$prev" ]; then start=(--notes-start-tag "$prev"); fi
# Stage all packages before publishing. Published tags are never replaced.
gh release create "$tag" --draft --prerelease --latest=false \
--title "SolidCraft v$VERSION (nightly)" --target "$GITHUB_SHA" \
--notes-file ../notes.md --generate-notes "${start[@]}" -- *
--notes-file ../notes.md --generate-notes -- *
gh release edit "$tag" --draft=false --prerelease --latest=false
echo "### Published nightly: $tag (\`${GITHUB_SHA::9}\`)" >>"$GITHUB_STEP_SUMMARY"
- name: Create or update the draft release
@@ -766,13 +760,8 @@ jobs:
--target "$GITHUB_SHA" --prerelease="$PRERELEASE"
gh release upload "$tag" --clobber -- *
else
# As for nightlies: start the generated notes at the newest published release.
start=()
prev="$(gh release list --exclude-drafts --limit 30 --json tagName,publishedAt --jq 'sort_by(.publishedAt) | last | .tagName // empty')"
if [ -n "$prev" ]; then start=(--notes-start-tag "$prev"); fi
gh release create "$tag" --draft --title "SolidCraft v$VERSION" \
--target "$GITHUB_SHA" --notes-file ../notes.md --generate-notes "${start[@]}" \
"${pre[@]}" -- *
--target "$GITHUB_SHA" --notes-file ../notes.md --generate-notes "${pre[@]}" -- *
fi
{
echo "Draft **SolidCraft v$VERSION** at \`${GITHUB_SHA::9}\`:"
+8 -10
View File
@@ -3,17 +3,17 @@
SolidCraft is a clean-room, pure-Rust parametric 3D CAD app (sketch solver, feature timeline, B-rep kernel, an egui UI that agents drive). This file is a router: the hard rules, then the skill to read for your task. Humans: CONTRIBUTING.md.
## Start here
Work: ROADMAP.md, "Where help is wanted most" in CONTRIBUTING.md, issues labelled `help wanted`, `good first issue`, `needs-triage`; architecture in `docs/architecture.md`. Local `plan/` notes are optional.
Work: ROADMAP.md, "Where help is wanted most" in CONTRIBUTING.md, issues labelled `help wanted`, `good first issue`, `needs-triage`; architecture in `docs/architecture.md`. Act when the code, docs and rules settle a question; ask only when it changes what users see.
## Hard rules (what enforces each)
- Independent: never copy another product's code, icons, text or templates; never drive or take data from commercial CAD. `skills/solidcraft-ground-rules/SKILL.md`.
- No GPL/LGPL/AGPL code, not even reading it (OpenCASCADE, FreeCAD, SolveSpace, CadQuery, LibreCAD, QCAD): `cargo xtask licences --check`.
- Every asset is original or openly licensed with a row in ATTRIBUTION.md; read `assets/AGENTS.md` before icon work: `cargo xtask assets`, `cargo xtask icons`.
- Never crash: no unwrap/expect/panic/unsafe in non-test code, errors are `Result`, input is hostile: clippy `-D warnings`, `hostile_params_never_panic`.
- Never crash: no unwrap/expect/panic/unsafe in non-test code (unsafe allowlist in crash-safety), errors are `Result`, input is hostile: clippy `-D warnings`, `hostile_params_never_panic`.
- Model decisions (what an operation does, which bodies it touches, which face or edge a point or name means, depths, nearness) use exact geometry; a mesh is for display, export, previews and mesh bodies (`xtask/mesh-decisions.txt` only shrinks): `cargo xtask mesh-decisions`.
- New kernel cases go to solidcore: `cargo xtask lists`.
- Kernel ops and math go to solidcore; features call its API: `cargo xtask lists`.
- Everything is a command and programmatic calls never open dialogs: `skills/solidcraft-commands/SKILL.md`.
- Layering; only `crates/kernel` uses truck; solidcore only via `solidcore-ops`/`-tess`/`-record` (`xtask/solidcore-seam.txt`): `cargo xtask layers`.
- Layering (geom, sketch/kernel/render, doc, io, engine, ui-egui, apps); only `crates/kernel` uses truck: `cargo xtask layers`.
- One outer UI container, one camera path (`navigation::handle`), colours from theme tokens: `cargo xtask ui-containers`.
- Application code is Rust only and builds for wasm: `cargo xtask wasm`, `cargo xtask web-offline-test`.
- The product name is SolidCraft; the old name lives only in `docs/compatibility.md`.
@@ -21,19 +21,17 @@ Work: ROADMAP.md, "Where help is wanted most" in CONTRIBUTING.md, issues labelle
- A design-format change is ONE new file in `crates/doc/src/format/pending/`: `scripts/test-format-pending.sh`.
- A command has input and output schemas (will become required; `schema/unconverted.txt` only shrinks): `skills/solidcraft-commands/SKILL.md`.
- New UI strings go in `assets/locales/pending/<slug>.json`, ATTRIBUTION rows in `attribution/pending/<slug>.md`: `cargo xtask lists`.
- A changed default keeps the old behaviour behind a preference and fills the PR's `Changes a default:` line: `pr-checks.yml`.
- A changed default keeps the old behaviour behind a preference and fills the PR's `Changes a default:` line, and no second PR for an issue a lower-numbered one closes: `pr-checks.yml`.
- A regression test goes in the area's existing test file, never a per-bug file (#3226).
- Look at open PRs first, claim with a draft PR (lowest number wins), one topic per PR: `skills/solidcraft-contributing/SKILL.md`.
- Look at open PRs first, claim with a draft PR (lowest number wins), one topic per PR, never force-push `main`, no pushes just to catch up with `main`: `skills/solidcraft-contributing/SKILL.md`.
- A PR's title and first sentence make sense to someone who never saw your chat or the issue: `skills/solidcraft-contributing/SKILL.md`.
- Code, comments, commit messages and docs are in English, always: `skills/solidcraft-contributing/SKILL.md` ("Working as an agent").
- Independent work runs in parallel, dependent work stays sequential: `skills/solidcraft-contributing/SKILL.md` ("Working as an agent").
- Show observable changes with real screenshots or a recording, captured yourself.
- Run `cargo xtask ci` before every commit. `cargo xtask skills` keeps this file and `skills/` honest.
- Run `cargo xtask ci` before every commit, without switching branches while it runs. `cargo xtask skills` keeps this file and `skills/` honest.
## Working on X: read the skill first
| Working on | Read |
|---|---|
| A PR, a claim, review, CI or evidence | `skills/solidcraft-contributing/SKILL.md` |
| A feature, PR, claim, review, CI, evidence | `skills/solidcraft-contributing/SKILL.md` |
| Licences, assets, clean-room, the name | `skills/solidcraft-ground-rules/SKILL.md` |
| Non-test Rust, hostile input, a crash report | `skills/solidcraft-crash-safety/SKILL.md` |
| A command, a crate boundary | `skills/solidcraft-commands/SKILL.md` |
+5 -49
View File
@@ -82,6 +82,7 @@ Editable drawing code, native projects and shipped exports are collected under `
| assets/fonts/ibm-plex-mono/IBMPlexMono-Regular.ttf | IBM Corp. (IBM Plex Mono) | https://github.com/IBM/plex (via google/fonts), unmodified; licence text in assets/fonts/ibm-plex-mono/OFL.txt; the interface monospace font | SIL OFL 1.1 |
| assets/fonts/ibm-plex-sans/IBMPlexSans-Variable.ttf | IBM Corp. (IBM Plex Sans, variable wdth and wght) | https://github.com/IBM/plex (via google/fonts), unmodified; licence text in assets/fonts/ibm-plex-sans/OFL.txt; the default interface font | SIL OFL 1.1 |
| docs/book/src/generated/tool-preview.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/tool-preview.json`; gitignored) | MIT OR Apache-2.0 |
| assets/fonts/liberation-sans/LiberationSans-Regular.ttf | Red Hat, Inc. (Liberation Fonts 2.x; digitized data Google) | https://github.com/liberationfonts (Debian fonts-liberation), unmodified; licence text in assets/fonts/liberation-sans/OFL.txt; used for sketch Text outlines | SIL OFL 1.1 |
| assets/fonts/biz-udp-gothic/BIZUDPGothic-Regular.ttf | The BIZ UDGothic Project Authors | https://github.com/googlefonts/morisawa-biz-ud-gothic (Google Fonts), unmodified; licence text in assets/fonts/biz-udp-gothic/OFL.txt; used for web UI Japanese font | SIL OFL 1.1 |
| assets/fonts/craft-ui-sc/CraftUI-SC.otf | Adobe / Google Inc. (Noto Sans SC); SolidCraft subset | https://github.com/notofonts/noto-cjk Sans/SubsetOTF/SC Regular, glyph-subset for assets/locales/zh.json and renamed Craft UI SC (OFL reserved-name); licence text in assets/fonts/craft-ui-sc/OFL.txt; web UI Simplified Chinese | SIL OFL 1.1 |
| assets/fonts/craft-ui-tc/CraftUI-TC.otf | Adobe / Google Inc. (Noto Sans TC); SolidCraft subset | https://github.com/notofonts/noto-cjk Sans/SubsetOTF/TC Regular, glyph-subset for assets/locales/zh-TW.json and renamed Craft UI TC (OFL reserved-name); licence text in assets/fonts/craft-ui-tc/OFL.txt; web UI Traditional Chinese | SIL OFL 1.1 |
@@ -146,6 +147,7 @@ Editable drawing code, native projects and shipped exports are collected under `
| assets/fonts/craft-ui-tc/OFL.txt | Adobe / Google Inc. (Noto CJK); SolidCraft header | Accompanying OFL for CraftUI-TC.otf | SIL OFL 1.1 |
| assets/fonts/ibm-plex-mono/OFL.txt | IBM Corp. | Unmodified accompanying font licence | SIL OFL 1.1 |
| assets/fonts/ibm-plex-sans/OFL.txt | IBM Corp. | Unmodified accompanying font licence | SIL OFL 1.1 |
| assets/fonts/liberation-sans/OFL.txt | Red Hat, Inc.; Liberation Fonts contributors | Unmodified accompanying font licence | SIL OFL 1.1 |
| assets/icons/app/linux/exports/hicolor/128x128/apps/io.tangencylabs.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 |
| assets/icons/app/linux/exports/hicolor/16x16/apps/io.tangencylabs.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 |
| assets/icons/app/linux/exports/hicolor/24x24/apps/io.tangencylabs.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 |
@@ -201,6 +203,7 @@ Editable drawing code, native projects and shipped exports are collected under `
| assets/platforms/windows/solidcraft.en-us.wxl | PhotoCraft / SolidCraft contributors | PhotoCraft packaging templates (https://github.com/storytold/photocraft), adapted for SolidCraft | Apache-2.0 |
| assets/platforms/windows/solidcraft.wxs | PhotoCraft / SolidCraft contributors | PhotoCraft packaging templates (https://github.com/storytold/photocraft), adapted for SolidCraft | Apache-2.0 |
| assets/shaders/viewport.wgsl | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 |
| assets/styles/ui/palettes.rs | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 |
| assets/styles/ui/themes/gruvbox-dark.json | SolidCraft contributors | original SolidCraft theme file mapping SolidCraft's UI colours to the Gruvbox palette's colour values (Gruvbox by Pavel Pertsev, https://github.com/morhetz/gruvbox, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/gruvbox-light.json | SolidCraft contributors | original SolidCraft theme file mapping SolidCraft's UI colours to the Gruvbox palette's colour values (Gruvbox by Pavel Pertsev, https://github.com/morhetz/gruvbox, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/solidcraft-95.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 |
@@ -212,7 +215,6 @@ Editable drawing code, native projects and shipped exports are collected under `
| assets/styles/ui/themes/one-dark.json | SolidCraft contributors | original SolidCraft theme file with colours adapted from the One Dark palette (Atom One Dark by GitHub Atom, https://github.com/atom/atom, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/tokyo-night.json | SolidCraft contributors | original SolidCraft theme file adapting the colours of a published palette (Tokyo Night by enkia, https://github.com/enkia/tokyo-night-vscode-theme, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/solarized-light.json | SolidCraft contributors | original SolidCraft theme file adapting the colours of a published palette (Solarized by Ethan Schoonover, https://github.com/altercation/solarized, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/solarized-dark.json | SolidCraft contributors | original SolidCraft theme file adapting the colours of a published palette (Solarized by Ethan Schoonover, https://github.com/altercation/solarized, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/nord.json | SolidCraft contributors | original SolidCraft theme file adapting the colours of a published palette (Nord by Sven Greb and the Nord contributors, https://github.com/nordtheme/nord, MIT) | MIT OR Apache-2.0 |
| assets/styles/ui/themes/high-contrast.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 |
| assets/styles/ui/themes/graphite.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 |
@@ -796,53 +798,6 @@ Original SolidCraft drawings, Open for owner review; no runtime assignments.
| docs/book/src/media/ui-tour/window.png | SolidCraft contributors | screenshot of SolidCraft 0.29.0 itself (`solidcraft --sample`, default dark theme, software renderer, 1280x800) with original numbered callouts (digits set in DejaVu Sans Bold), captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/ui-tour/navigate.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (`--sample`, default dark theme, software renderer) orbiting, panning and zooming, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| assets/locales/pending/sketch-tool-hints.json | carlymx | Original sketch tool hints and engine error translations | MIT OR Apache-2.0 |
| assets/locales/pending/primitive-pick-field-tips.json | SolidCraft contributors | Original primitive pick-field tooltip translations | MIT OR Apache-2.0 |
| assets/locales/pending/ribbon-panel-hover.json | SolidCraft contributors | Original ribbon panel menu preference labels and translations | MIT OR Apache-2.0 |
| docs/screenshots/box-insert-designer.gif | Shawn Marx | original recording made with BoxInsertDesigner's own Motion export (its three.js viewer) of its example game `examples/ccg-example` (https://github.com/ShawnMarx/BoxInsertDesigner): a card game box insert whose trays were built by SolidCraft through `solidcraft-cli`; the published card, board and box art in it is pixelated beyond recognition, and no logos or game names are shown (2.5× playback, 800 px wide) | MIT OR Apache-2.0 |
| docs/screenshots/box-insert-designer.mp4 | Shawn Marx | original recording made with BoxInsertDesigner's own Motion export (its three.js viewer) of its example game `examples/ccg-example` (https://github.com/ShawnMarx/BoxInsertDesigner): a card game box insert whose trays were built by SolidCraft through `solidcraft-cli`; the published card, board and box art in it is pixelated beyond recognition, and no logos or game names are shown (1280×720) | MIT OR Apache-2.0 |
| assets/locales/pending/agent-http-consent.json | SolidCraft contributors | Original endpoint-specific HTTP consent messages and translations | MIT OR Apache-2.0 |
| assets/locales/pending/ground-shadow-placement.json | SolidCraft contributors | Original ground-shadow placement preference messages and translations | MIT OR Apache-2.0 |
| docs/book/src/media/assemblies/components.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) making components from two original hinge-leaf bodies, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/assemblies/joint.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) creating a revolute joint between two hinge leaves, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/assemblies/drag.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) dragging a jointed hinge leaf, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/assemblies/drive.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) driving a revolute joint between two hinge leaves, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/features/extrude.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) extruding a sketch's profile, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/features/shell.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) shelling a block, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/features/fillet.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) filleting four edges, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/features/edit.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) editing a feature from the timeline, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/features/hole.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) placing a hole, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/features/pattern.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) patterning a hole around an axis, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/parameters/dialog.png | SolidCraft contributors | screenshot of SolidCraft 0.29.0 itself (default dark theme, software renderer) showing the Parameters dialog, with original numbered callouts (digits set in DejaVu Sans Bold), captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/files/menu.png | SolidCraft contributors | screenshot of SolidCraft 0.29.0 itself (`--sample`, default dark theme, software renderer) showing the File menu, with original numbered callouts (digits set in DejaVu Sans Bold), captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/getting-started/start.png | SolidCraft contributors | screenshot of SolidCraft 0.29.0 itself (default dark theme, software renderer, 1280x800) showing the start page with its built-in sample thumbnails, with original numbered callouts (digits set in DejaVu Sans Bold), captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/getting-started/sample.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) opening the built-in Sample Plate from the start page, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/sheet-metal/base.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) making a sheet metal base flange, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/sheet-metal/flange.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) adding sheet metal edge flanges, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/sheet-metal/flat.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) showing a sheet metal flat pattern, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/sketching/create.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) starting a sketch on the Top plane, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/sketching/draw.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) drawing a rectangle and a circle with typed values, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/sketching/dimension.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) dimensioning a sketch until it is fully constrained, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/sketching/parts.png | SolidCraft contributors | screenshot of SolidCraft 0.29.0 itself (default dark theme, software renderer, 1280x800) showing a fully constrained sketch, with original numbered callouts (digits set in DejaVu Sans Bold), captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/sketching/offset.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) offsetting a sketch outline, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| docs/book/src/media/sketching/trim.mp4 | SolidCraft contributors | original screen recording of the actual SolidCraft 0.29.0 English desktop UI (default dark theme, software renderer) trimming a notch in a sketch, with the original drawn pointer of examples/demo/overlay.py and labels set in DejaVu Sans Bold, captured with examples/demo/doc_shots.py | MIT OR Apache-2.0 |
| assets/locales/ca.json | carlymx | Catalan translation of the English catalog, contributed upstream | MIT OR Apache-2.0 |
| assets/locales/pending/sketch-mirror-auto-line.json | SolidCraft contributors | Original Mirror preference label and translations | MIT OR Apache-2.0 |
| docs/screenshots/7452/demo-01-extrude5-edge-frame.png | SamD98 | screenshot of the actual SolidCraft desktop UI showing the revolve axis pick on the Cat Post Topper repro design (docs/screenshots/7452/revolve-edge-frame.solidcraft), for #7452 | MIT OR Apache-2.0 |
| docs/screenshots/7452/demo-04-preview-outer-l11.png | SamD98 | screenshot of the actual SolidCraft desktop UI showing the revolve axis pick on the Cat Post Topper repro design (docs/screenshots/7452/revolve-edge-frame.solidcraft), for #7452 | MIT OR Apache-2.0 |
| docs/screenshots/7452/demo-05-preview-inner-l8.png | SamD98 | screenshot of the actual SolidCraft desktop UI showing the revolve axis pick on the Cat Post Topper repro design (docs/screenshots/7452/revolve-edge-frame.solidcraft), for #7452 | MIT OR Apache-2.0 |
| docs/screenshots/7452/demo-06-result-outer-120.png | SamD98 | screenshot of the actual SolidCraft desktop UI showing the revolve axis pick on the Cat Post Topper repro design (docs/screenshots/7452/revolve-edge-frame.solidcraft), for #7452 | MIT OR Apache-2.0 |
| docs/screenshots/7452/demo-07-preview-360.png | SamD98 | screenshot of the actual SolidCraft desktop UI showing the revolve axis pick on the Cat Post Topper repro design (docs/screenshots/7452/revolve-edge-frame.solidcraft), for #7452 | MIT OR Apache-2.0 |
| docs/screenshots/7452/demo-08-cancelled.png | SamD98 | screenshot of the actual SolidCraft desktop UI showing the revolve axis pick on the Cat Post Topper repro design (docs/screenshots/7452/revolve-edge-frame.solidcraft), for #7452 | MIT OR Apache-2.0 |
| docs/screenshots/7452/demo-13-colliding-id.png | SamD98 | screenshot of the actual SolidCraft desktop UI showing the revolve axis pick on the Cat Post Topper repro design (docs/screenshots/7452/revolve-edge-frame.solidcraft), for #7452 | MIT OR Apache-2.0 |
| docs/screenshots/7452/demo-14-surface-l1.png | SamD98 | screenshot of the actual SolidCraft desktop UI showing the revolve axis pick on the Cat Post Topper repro design (docs/screenshots/7452/revolve-edge-frame.solidcraft), for #7452 | MIT OR Apache-2.0 |
| docs/screenshots/7452/demo-15-surface-result.png | SamD98 | screenshot of the actual SolidCraft desktop UI showing the revolve axis pick on the Cat Post Topper repro design (docs/screenshots/7452/revolve-edge-frame.solidcraft), for #7452 | MIT OR Apache-2.0 |
| docs/screenshots/7452/revolve-selected-edge.mp4 | SamD98 | screen recording of the actual SolidCraft desktop UI showing the revolve axis pick on the Cat Post Topper repro design (docs/screenshots/7452/revolve-edge-frame.solidcraft), for #7452 | MIT OR Apache-2.0 |
| assets/locales/bg.json | Yasen-55 | Original translation | MIT OR Apache-2.0 |
| crates/sketch/assets/fonts/liberation-sans/LiberationSans-Regular.ttf | Red Hat, Inc. (Liberation Fonts 2.x; digitized data Google) | https://github.com/liberationfonts (Debian fonts-liberation), unmodified; licence text in crates/sketch/assets/fonts/liberation-sans/OFL.txt; used for sketch Text outlines | SIL OFL 1.1 |
| crates/sketch/assets/fonts/liberation-sans/OFL.txt | Red Hat, Inc.; Liberation Fonts contributors | Unmodified accompanying font licence | SIL OFL 1.1 |
| assets/locales/pending/drag-to-zoom.json | SolidCraft contributors | Original drag-to-zoom labels and translations | MIT OR Apache-2.0 |
| `assets/locales/pending/hole-group-folder.json` | SolidCraft contributors | Original Hole grouping preference labels and translations | MIT OR Apache-2.0 |
| assets/locales/pending/press-pull-dialog-title.json | SolidCraft contributors | Original Press Pull dialog title translations for SolidCraft's English catalog; no external text used | MIT OR Apache-2.0 |
## Code adapted from sibling projects
@@ -912,10 +867,11 @@ copied into SolidCraft.
| Directory | Source | Licence | Changes |
|---|---|---|---|
| vendor/accesskit_macos | accesskit_macos 0.26.3, https://github.com/AccessKit/accesskit (The AccessKit contributors) | MIT OR Apache-2.0 | the subclassing adapter and its tests from 0.27.2: dropping the adapter keeps AppKit's key-value observers (vendor/README.md) |
## Vendored renderer compatibility fix
`vendor/egui-wgpu` is egui-wgpu 0.37.0 from https://github.com/emilk/egui
`vendor/egui-wgpu` is egui-wgpu 0.36.2 from https://github.com/emilk/egui
(MIT OR Apache-2.0; both original licence texts are included). Rust sources and
its original `egui.wgsl` shader are retained; no images or other artwork are copied.
SolidCraft's narrow patch selects a safe 1x MSAA path on the chosen OpenGL adapter
+27 -14
View File
@@ -17,15 +17,27 @@ Before choosing a task, check the [command inventory](docs/features.md) and
Questions, ideas or want to say what you're working on? Join the [Discord](https://discord.gg/FtU4NQNVDH).
## Kernel work is paused
## Kernel work goes to solidcore
We're moving to a new geometry kernel. Until that's done, please don't open pull requests that
change `crates/kernel/`, `crates/geom/` or `vendor/truck*`, or issues and discussions about kernel
work: booleans, fillets, chamfers, shell, offsets, sweeps and lofts, threads and holes, STEP/IGES
import and export, or tessellation. The pinned issue on the tracker explains it. New ones get the
`kernel-paused` label (`.github/workflows/kernel-paused.yml`) and a maintainer answers them. Crashes
and data loss are still taken as issues. Pull requests outside those directories carry on as normal,
including the dialogs and tools for these features.
Since 0.40, SolidCraft's geometry kernel is [solidcore](https://github.com/tangency-labs/solidcore),
and the kernel operations still in this repository are migrating there. The split:
- **SolidCraft** is the application: commands, the timeline, sketches, the UI, file handling. A new
feature calls the solidcore API and builds on the operations it offers.
- **solidcore** holds the geometry: evaluators, intersections, booleans, blends, shells, sweeps,
tessellation and the rest of the math. If a feature needs kernel functionality solidcore does not
have yet, add it to solidcore first (its own issue and PR), then use it here.
So pull requests that add geometry math to SolidCraft (`crates/kernel/`, `crates/geom/`, or a new
evaluator or solver anywhere else) are not taken; they get the `kernel-paused` label
(`.github/workflows/kernel-paused.yml`) and a maintainer points them to solidcore. Crashes and data
loss are still taken as issues here, and the dialogs and tools for kernel features carry on as
normal.
Work started before 0.40 was written against the earlier kernel. It is still welcome: port it onto
today's code, calling solidcore for the geometry, before it can land. Expect a substantial rework
for anything that touched the kernel. Designs keep opening and rebuilding on the new kernel; where a
result changes, the PR says so and why.
## Get it running (about 10 minutes on a fast machine)
@@ -88,8 +100,6 @@ The [architecture page](docs/architecture.md) has the layer table. The short ver
- `crates/geom`: vectors, planes, meshes, measures.
- `crates/sketch`: our own constraint solver, plus profile finding.
- `crates/dynamics`: multibody dynamics: rigid bodies, joint constraints, gravity and springs,
integrated in time (RFC #9719). It depends only on `geom`.
- `crates/kernel`: the B-rep kernel boundary. It wraps [truck](https://github.com/ricosjp/truck),
and it's the only crate allowed to touch truck. Fillets, chamfers, shell/offset, Delete Face,
Split Face, STEP/IGES read and write, and face provenance are our own code here. Patched
@@ -279,7 +289,7 @@ mean something else, it needs a format change. **Add one file, and edit nothing
change's file, or any `v<N>/` folder: those are fixed once released.
That's all. The build counts the files: while any are pending it writes the next format number,
which no release reads, so a release warns about a design that has your change and keeps what it can't read of it.
which no release reads, so a release refuses a design that has your change instead of losing it.
A file also lists the pending changes it has (`format_pending`), so a later development build
runs only the steps that file is missing. Two pull requests that each add a change merge without
a conflict. `crates/doc/src/format/pending/README.md` has an example.
@@ -331,8 +341,11 @@ and a fresh CI run:
1. Work is tracked in [GitHub issues](https://github.com/tangency-labs/solidcraft/issues), labelled
by area (`area:kernel`, `area:sketch`, `area:doc`, `area:ui`, `area:infra`). For anything
bigger than a bug fix that has no issue yet, open one first. **Claim the issue with a draft
PR** before you start, so two people don't build the same thing:
bigger than a bug fix that has no issue yet, discuss it on [Discord](https://discord.gg/FtU4NQNVDH)
first, then open an issue. Before you start, search **all** issues and pull requests, open and
closed, for similar work (`gh issue list -R tangency-labs/solidcraft --state all --search "<words>"`,
and the same with `gh pr list`). **Claim the issue with a draft PR** before you start, so two
people don't build the same thing:
- Check nobody has it: `gh pr list -R tangency-labs/solidcraft --state open --search "#N"`.
- Branch from the latest `main`, commit `git commit --allow-empty -m "claim: #N"`, push, and
open a **draft** PR titled `<summary> (#N)`, e.g. `Fillet: variable radius along a chain (#123)`.
@@ -445,7 +458,7 @@ correct them freely and it won't put them back.
## Where help is wanted most
**Kernel speed (slow fillets, booleans, STEP):** please don't rewrite the current kernel code for speed; it is being replaced by [solidcore](https://github.com/bherbruck/solidcore) ([progress](https://tangency-labs.github.io/solidcore/)). Report slow cases with a file under the `kernel-perf` label, and put kernel effort into solidcore instead. See [#1597](https://github.com/tangency-labs/solidcraft/issues/1597).
**Kernel speed (slow fillets, booleans, STEP):** please don't rewrite the current kernel code for speed; the kernel is [solidcore](https://github.com/tangency-labs/solidcore) ([progress](https://tangency-labs.github.io/solidcore/)). Report slow cases with a file under the `kernel-perf` label, and put kernel effort into solidcore instead. See [#1597](https://github.com/tangency-labs/solidcraft/issues/1597).
See the [`help wanted`](https://github.com/tangency-labs/solidcraft/labels/help%20wanted) and
[`good first issue`](https://github.com/tangency-labs/solidcraft/labels/good%20first%20issue) labels.
Generated
+188 -280
View File
File diff suppressed because it is too large Load Diff
+10 -16
View File
@@ -5,7 +5,7 @@ members = ["crates/*", "apps/*", "xtask"]
exclude = ["vendor"]
[workspace.package]
version = "0.40.0-rc.3"
version = "0.40.0-rc.2"
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.95"
@@ -22,31 +22,23 @@ solidcraft-kernel = { path = "crates/kernel" }
solidcraft-smlib = { path = "crates/smlib" }
solidcraft-step = { path = "crates/step" }
solidcraft-render = { path = "crates/render" }
solidcraft-dynamics = { path = "crates/dynamics" }
solidcraft-gpu = { path = "crates/gpu" }
solidcraft-doc = { path = "crates/doc" }
solidcraft-io = { path = "crates/io" }
solidcraft-engine = { path = "crates/engine" }
solidcraft-ui-egui = { path = "crates/ui-egui" }
solidcraft-ui-registry = { path = "crates/ui-registry" }
solidcraft-color = { path = "crates/color" }
solidcraft-ui-text = { path = "crates/ui-text" }
solidcraft-theme = { path = "crates/theme" }
solidcraft-space-mouse = { path = "crates/space-mouse" }
solidcraft-mcp = { path = "crates/mcp" }
solidcraft-mcp-server = { path = "crates/mcp-server" }
solidcraft-control = { path = "crates/control" }
solidcraft-control-egui = { path = "crates/control-egui" }
solidcraft-derive = { path = "crates/derive" }
solidcraft-3dx-client = { path = "crates/threedx-client" }
# The Rust port of NVIDIA's SMLib (Apache-2.0), the B-rep kernel behind crates/smlib. Pinned;
# move the rev on its own commit. For a
# local checkout, add `[patch."https://github.com/tangency-labs/solidcore"] solidcore = { path =
# "../solidcore/crates/solidcore" }` to a `.cargo/config.toml` outside the repository.
solidcore = { git = "https://github.com/tangency-labs/solidcore", rev = "a445bdaac60a980b0e9d1dba3ee28eb7ada44f50" }
solidcore = { git = "https://github.com/tangency-labs/solidcore", rev = "8ddce901671f1cebd9214a31d21895d725e886c8" }
# Geometry as data (solidcore's layers §1, "Record"): the B-rep record, its structural validation
# and the native body file. Pinned like solidcore; for a local checkout, patch it as above.
solidcore-record = { git = "https://github.com/tangency-labs/solidcore", rev = "a445bdaac60a980b0e9d1dba3ee28eb7ada44f50" }
solidcore-record = { git = "https://github.com/tangency-labs/solidcore", rev = "f5e8e9a29e0c9b7cf6c4040a5bc8878382b3c62f" }
# test tooling: a dev-dependency only (xtask/src/layers.rs)
solidcraft-testkit = { path = "crates/testkit" }
@@ -110,12 +102,11 @@ tiny-skia = { version = "0.12", default-features = false, features = ["std", "si
toml = "1"
# ui
# default_fonts: the built-in Hack is the UI's symbol fallback (#2955); 0.37 no longer turns it on.
egui = { version = "0.37", features = ["default_fonts"] }
eframe = { version = "0.37", default-features = false, features = ["persistence"] }
egui = "0.36"
eframe = { version = "0.36", default-features = false, features = ["persistence"] }
# Instant/SystemTime that also work in the browser (std panics on wasm32-unknown-unknown).
web-time = "1"
egui-wgpu = "0.37"
egui-wgpu = "0.36"
# the wgpu egui-wgpu uses, for compute (crates/gpu); backends come from the apps' features
wgpu = { version = "30", default-features = false, features = ["std", "wgsl"] }
naga = { version = "30", default-features = false }
@@ -170,9 +161,12 @@ debug = "line-tables-only"
egui-wgpu = { path = "vendor/egui-wgpu" }
# Deliver trackpad pinch and rotation gestures on Wayland (zwp_pointer_gestures_v1), which
# winit 0.30 never binds and eframe 0.37 still requires winit 0.30.
# winit 0.30 never binds and eframe 0.36 still requires winit 0.30.
winit = { path = "vendor/winit" }
# macOS: dropping the accessibility adapter leaves AppKit's key-value observers intact (#7535).
accesskit_macos = { path = "vendor/accesskit_macos" }
# Mutation testing (cargo-mutants, docs/mutation-testing.md): the ci profile with incremental
# builds, since every mutant rebuilds the crates above the one it changes.
[profile.mutants]
-6
View File
@@ -225,12 +225,6 @@ completed drawings publish atomically. The browser still exports synchronously.
## Render foundation
- Wood surface images (#1345): native CPU and GPU opaque rendering share physical
repeat frames and filtered mip chains. Imported maps retain exact bytes and
declared provenance in the design, reopen offline, and expose grain-angle
controls. Scalar face appearances suppress body maps. Planar projection and
CPU encoding/optical limits remain explicit; see [portable surfaces](docs/render-portable-surfaces-and-stages.md).
- Original starter appearances (#1722): 34 opaque recipes through existing commands, with six explicitly unavailable glass recipes and preserved legacy looks; see [the contract](docs/render-starter-appearances.md).
- Bounded linear film accumulation (#1696) supplies caller-admitted mean/variance storage and complete-pass views; actual progressive consumers remain separate. See [the film contract](docs/render-film.md).
+116 -275
View File
@@ -1,17 +1,18 @@
Third-party software in SolidCraft
SolidCraft (the desktop app, solidcraft-cli and the web app) is built from the 540 crates below.
SolidCraft (the desktop app, solidcraft-cli and the web app) is built from the 537 crates below.
Generated by `cargo xtask licences` from Cargo.lock and the crates' own licence files.
SolidCraft's own licence is in LICENSE-MIT and LICENSE-APACHE, and NOTICE.
accesskit 0.25.2 (MIT OR Apache-2.0)
accesskit_atspi_common 0.21.1 (MIT OR Apache-2.0)
accesskit_consumer 0.39.2 (MIT OR Apache-2.0)
accesskit_ios 0.2.2 (MIT OR Apache-2.0)
accesskit_macos 0.27.2 (MIT OR Apache-2.0)
accesskit_unix 0.24.1 (MIT OR Apache-2.0)
accesskit_windows 0.35.2 (MIT OR Apache-2.0)
accesskit_winit 0.34.2 (Apache-2.0)
accesskit 0.24.1 (MIT OR Apache-2.0)
accesskit_atspi_common 0.18.1 (MIT OR Apache-2.0)
accesskit_consumer 0.35.0 (MIT OR Apache-2.0)
accesskit_consumer 0.36.0 (MIT OR Apache-2.0)
accesskit_consumer 0.38.0 (MIT OR Apache-2.0)
accesskit_macos 0.26.3 (MIT OR Apache-2.0)
accesskit_unix 0.21.1 (MIT OR Apache-2.0)
accesskit_windows 0.32.1 (MIT OR Apache-2.0)
accesskit_winit 0.32.2 (Apache-2.0)
adler2 2.0.1 (0BSD OR MIT OR Apache-2.0)
aes 0.8.4 (MIT OR Apache-2.0)
ahash 0.8.12 (MIT OR Apache-2.0)
@@ -64,7 +65,9 @@ cadmpeg-core 0.6.7 (Apache-2.0)
cadmpeg-ir 0.6.7 (Apache-2.0)
cadmpeg-registry 0.6.7 (Apache-2.0)
calloop 0.13.0 (MIT)
calloop 0.14.5 (MIT)
calloop-wayland-source 0.3.0 (MIT)
calloop-wayland-source 0.4.1 (MIT)
cbc 0.1.2 (MIT OR Apache-2.0)
cfg-if 1.0.5 (MIT OR Apache-2.0)
cgl 0.3.2 (MIT / Apache-2.0)
@@ -106,21 +109,21 @@ document-features 0.2.12 (MIT OR Apache-2.0)
downcast-rs 1.2.1 (MIT/Apache-2.0)
dpi 0.1.2 (Apache-2.0 AND MIT)
dyn-clone 1.0.20 (MIT OR Apache-2.0)
ecolor 0.37.0 (MIT OR Apache-2.0)
eframe 0.37.0 (MIT OR Apache-2.0)
egui 0.37.0 (MIT OR Apache-2.0)
egui-wgpu 0.37.0 (MIT OR Apache-2.0)
egui-winit 0.37.0 (MIT OR Apache-2.0)
egui_glow 0.37.0 (MIT OR Apache-2.0)
ecolor 0.36.2 (MIT OR Apache-2.0)
eframe 0.36.2 (MIT OR Apache-2.0)
egui 0.36.2 (MIT OR Apache-2.0)
egui-wgpu 0.36.2 (MIT OR Apache-2.0)
egui-winit 0.36.2 (MIT OR Apache-2.0)
egui_glow 0.36.2 (MIT OR Apache-2.0)
either 1.19.0 (MIT OR Apache-2.0)
emath 0.37.0 (MIT OR Apache-2.0)
emath 0.36.2 (MIT OR Apache-2.0)
encoding_rs 0.8.42 ((Apache-2.0 OR MIT) AND BSD-3-Clause)
endi 1.1.1 (MIT)
enumflags2 0.7.12 (MIT OR Apache-2.0)
enumflags2_derive 0.7.12 (MIT OR Apache-2.0)
enumn 0.1.14 (MIT OR Apache-2.0)
epaint 0.37.0 (MIT OR Apache-2.0)
epaint_default_fonts 0.37.0 ((MIT OR Apache-2.0) AND OFL-1.1 AND Ubuntu-font-1.0)
epaint 0.36.2 (MIT OR Apache-2.0)
epaint_default_fonts 0.36.2 ((MIT OR Apache-2.0) AND OFL-1.1 AND Ubuntu-font-1.0)
equivalent 1.0.2 (Apache-2.0 OR MIT)
errno 0.3.14 (MIT OR Apache-2.0)
error-code 3.4.0 (BSL-1.0)
@@ -131,9 +134,7 @@ fastrand 2.5.0 (Apache-2.0 OR MIT)
fax 0.2.7 (MIT)
fdeflate 0.3.7 (MIT OR Apache-2.0)
fearless_simd 0.4.1 (Apache-2.0 OR MIT)
fixedbitset 0.5.7 (MIT OR Apache-2.0)
flate2 1.1.10 (MIT OR Apache-2.0)
foldhash 0.1.5 (Zlib)
foldhash 0.2.0 (Zlib)
font-types 0.12.6 (MIT OR Apache-2.0)
foreign-types 0.5.0 (MIT/Apache-2.0)
@@ -153,7 +154,7 @@ getrandom 0.2.17 (MIT OR Apache-2.0)
getrandom 0.3.4 (MIT OR Apache-2.0)
getrandom 0.4.3 (MIT OR Apache-2.0)
gif 0.14.2 (MIT OR Apache-2.0)
glifo 0.3.0 (Apache-2.0 OR MIT)
glifo 0.2.0 (Apache-2.0 OR MIT)
glow 0.17.0 (MIT OR Apache-2.0 OR Zlib)
gltf 1.4.1 (MIT OR Apache-2.0)
gltf-derive 1.4.1 (MIT OR Apache-2.0)
@@ -167,7 +168,6 @@ gpu-allocator 0.28.0 (MIT OR Apache-2.0)
guillotiere 0.7.0 (MIT/Apache-2.0)
half 2.7.1 (MIT OR Apache-2.0)
harfrust 0.12.0 (MIT)
hashbrown 0.15.5 (MIT OR Apache-2.0)
hashbrown 0.16.1 (MIT OR Apache-2.0)
hashbrown 0.17.1 (MIT OR Apache-2.0)
hermit-abi 0.5.3 (MIT OR Apache-2.0)
@@ -234,7 +234,6 @@ ndk-sys 0.6.0+11769913 (MIT OR Apache-2.0)
nix 0.29.0 (MIT)
nix 0.31.3 (MIT)
nohash-hasher 0.2.0 (Apache-2.0 OR MIT)
nom 8.0.0 (MIT)
num 0.4.3 (MIT OR Apache-2.0)
num-bigint 0.4.8 (MIT OR Apache-2.0)
num-complex 0.4.6 (MIT OR Apache-2.0)
@@ -276,17 +275,15 @@ orbclient 0.3.55 (MIT)
ordered-float 2.10.1 (MIT)
ordered-float 5.5.0 (MIT)
ordered-stream 0.2.0 (MIT OR Apache-2.0)
os_pipe 1.2.3 (MIT)
parking 2.2.1 (Apache-2.0 OR MIT)
parking_lot 0.12.5 (MIT OR Apache-2.0)
parking_lot_core 0.9.12 (MIT OR Apache-2.0)
peniko 0.6.1 (Apache-2.0 OR MIT)
percent-encoding 2.3.2 (MIT OR Apache-2.0)
petgraph 0.8.3 (MIT OR Apache-2.0)
phf 0.14.0 (MIT)
phf_generator 0.14.0 (MIT)
phf_macros 0.14.0 (MIT)
phf_shared 0.14.0 (MIT)
phf 0.13.1 (MIT)
phf_generator 0.13.1 (MIT)
phf_macros 0.13.1 (MIT)
phf_shared 0.13.1 (MIT)
pin-project 1.1.13 (Apache-2.0 OR MIT)
pin-project-internal 1.1.13 (Apache-2.0 OR MIT)
pin-project-lite 0.2.17 (Apache-2.0 OR MIT)
@@ -355,7 +352,6 @@ security-framework 3.7.0 (MIT OR Apache-2.0)
security-framework-sys 2.17.0 (MIT OR Apache-2.0)
self_cell 1.3.0 (Apache-2.0 OR GPL-2.0-only)
semver 1.0.28 (MIT OR Apache-2.0)
send_wrapper 0.6.0 (MIT/Apache-2.0)
serde 1.0.229 (MIT OR Apache-2.0)
serde-value 0.7.0 (MIT)
serde_core 1.0.229 (MIT OR Apache-2.0)
@@ -379,6 +375,8 @@ slab 0.4.12 (MIT)
slotmap 1.1.1 (Zlib)
smallvec 1.16.2 (MIT OR Apache-2.0)
smithay-client-toolkit 0.19.2 (MIT)
smithay-client-toolkit 0.20.0 (MIT)
smithay-clipboard 0.7.3 (MIT)
smol_str 0.2.2 (MIT OR Apache-2.0)
solidcore 1.0.1 (Apache-2.0)
solidcore-record 0.1.0 (Apache-2.0)
@@ -411,7 +409,6 @@ toml_writer 1.1.3+spec-1.1.0 (MIT OR Apache-2.0)
tracing 0.1.44 (MIT)
tracing-attributes 0.1.31 (MIT)
tracing-core 0.1.36 (MIT)
tree_magic_mini 3.2.2 (MIT)
ttf-parser 0.25.1 (MIT OR Apache-2.0)
twox-hash 2.1.5 (MIT)
type-map 0.5.1 (MIT/Apache-2.0)
@@ -422,7 +419,6 @@ uds_windows 1.2.1 (MIT)
unicode-bidi 0.3.18 (MIT OR Apache-2.0)
unicode-general-category 1.1.0 (Apache-2.0)
unicode-ident 1.0.26 ((MIT OR Apache-2.0) AND Unicode-3.0)
unicode-properties 0.1.5 ((MIT OR Apache-2.0) AND Unicode-3.0)
unicode-segmentation 1.13.3 (MIT OR Apache-2.0)
unicode-width 0.2.2 (MIT OR Apache-2.0)
untrusted 0.9.0 (ISC)
@@ -432,8 +428,8 @@ url 2.5.8 (MIT OR Apache-2.0)
utf8-zero 0.8.1 (MIT OR Apache-2.0)
utf8_iter 1.0.4 (Apache-2.0 OR MIT)
uuid 1.27.0 (Apache-2.0 OR MIT)
vello_common 0.2.0 (Apache-2.0 OR MIT)
vello_cpu 0.2.0 (Apache-2.0 OR MIT)
vello_common 0.1.0 (Apache-2.0 OR MIT)
vello_cpu 0.1.0 (Apache-2.0 OR MIT)
wasi 0.11.1+wasi-snapshot-preview1 (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT)
wasip2 1.0.4+wasi-0.2.12 (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT)
wasm-bindgen 0.2.129 (MIT OR Apache-2.0)
@@ -446,6 +442,8 @@ wayland-client 0.31.15 (MIT)
wayland-csd-frame 0.3.0 (MIT)
wayland-cursor 0.31.14 (MIT)
wayland-protocols 0.32.13 (MIT)
wayland-protocols-experimental 20250721.0.1 (MIT)
wayland-protocols-misc 0.3.12 (MIT)
wayland-protocols-plasma 0.3.12 (MIT)
wayland-protocols-wlr 0.3.12 (MIT)
wayland-scanner 0.31.11 (MIT)
@@ -502,7 +500,6 @@ winit 0.30.13 (Apache-2.0)
winnow 1.0.4 (MIT)
winreg 0.56.0 (MIT)
wit-bindgen 0.57.1 (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT)
wl-clipboard-rs 0.9.5 (MIT OR Apache-2.0)
writeable 0.6.4 (Unicode-3.0)
x11-dl 2.21.0 (MIT)
x11rb 0.13.2 (MIT OR Apache-2.0)
@@ -573,14 +570,13 @@ num_enum 0.7.6, num_enum_derive 0.7.6, once_cell 1.21.4, ordered-stream 0.2.0, p
pin-project 1.1.13, pin-project-internal 1.1.13, pin-project-lite 0.2.17, piper 0.2.5, polling
3.11.0, portable-atomic 1.15.0, portable-atomic-util 0.2.8, proc-macro-crate 3.5.0, proc-macro2
1.0.107, quote 1.0.47, ref-cast 1.0.27, ref-cast-impl 1.0.27, rustc-hash 1.1.0, rustc-hash 2.1.3,
rustix 0.38.44, rustix 1.1.5, rustversion 1.0.23, semver 1.0.28, send_wrapper 0.6.0, serde 1.0.229,
serde_core 1.0.229, serde_derive 1.0.229, serde_derive_internals 0.30.0, serde_json 1.0.151,
serde_path_to_error 0.1.20, serde_repr 0.1.21, simd_cesu8 1.2.0, smol_str 0.2.2, syn 2.0.119, syn
3.0.6, thiserror 1.0.69, thiserror 2.0.21, thiserror-impl 1.0.69, thiserror-impl 2.0.21, typed-path
0.13.0, typeid 1.0.3, unicode-ident 1.0.26, utf8-zero 0.8.1, wasi 0.11.1+wasi-snapshot-preview1,
wasip2 1.0.4+wasi-0.2.12, wit-bindgen 0.57.1, x11-dl 2.21.0, xdg-home 1.3.0, zbus-lockstep 0.5.2,
zbus-lockstep-macros 0.5.2, zbus_names 3.0.0, zmij 1.0.23, zvariant_utils 2.1.0, zvariant_utils
4.2.0
rustix 0.38.44, rustix 1.1.5, rustversion 1.0.23, semver 1.0.28, serde 1.0.229, serde_core 1.0.229,
serde_derive 1.0.229, serde_derive_internals 0.30.0, serde_json 1.0.151, serde_path_to_error 0.1.20,
serde_repr 0.1.21, simd_cesu8 1.2.0, smol_str 0.2.2, syn 2.0.119, syn 3.0.6, thiserror 1.0.69,
thiserror 2.0.21, thiserror-impl 1.0.69, thiserror-impl 2.0.21, typed-path 0.13.0, typeid 1.0.3,
unicode-ident 1.0.26, utf8-zero 0.8.1, wasi 0.11.1+wasi-snapshot-preview1, wasip2 1.0.4+wasi-0.2.12,
wit-bindgen 0.57.1, x11-dl 2.21.0, xdg-home 1.3.0, zbus-lockstep 0.5.2, zbus-lockstep-macros 0.5.2,
zbus_names 3.0.0, zmij 1.0.23, zvariant_utils 2.1.0, zvariant_utils 4.2.0
================================================================================
Permission is hereby granted, free of charge, to any
@@ -1090,26 +1086,25 @@ ahash 0.8.12, arrayvec 0.7.8, async-channel 2.5.0, async-executor 1.14.0, async-
0.9.4, core-foundation-sys 0.8.7, core-graphics 0.23.2, core-graphics-types 0.1.3, core_detect
1.0.0, crossbeam-channel 0.5.17, crossbeam-deque 0.8.8, crossbeam-epoch 0.9.21, crossbeam-utils
0.8.23, dbus-secret-service 4.1.0, displaydoc 0.2.7, either 1.19.0, equivalent 1.0.2, errno 0.3.14,
euclid 0.22.14, event-listener 5.4.2, event-listener-strategy 0.5.4, fastrand 2.5.0, fixedbitset
0.5.7, flate2 1.1.10, form_urlencoded 1.2.2, futures-lite 2.6.1, gethostname 1.1.0, gif 0.14.2, glow
0.17.0, gltf 1.4.1, gltf-derive 1.4.1, gltf-json 1.4.1, hashbrown 0.15.5, hashbrown 0.16.1,
hashbrown 0.17.1, hermit-abi 0.5.3, httparse 1.10.1, idna 1.1.0, idna_adapter 1.2.2, indexmap
2.14.2, itertools 0.15.0, js-sys 0.3.106, keyboard-types 0.8.3, khronos-egl 6.0.0, lazy_static
1.5.1, linux-raw-sys 0.12.1, linux-raw-sys 0.4.15, lock_api 0.4.14, log 0.4.34, muda 0.21.2, num
0.4.3, num-bigint 0.4.8, num-complex 0.4.6, num-integer 0.1.47, num-iter 0.1.46, num-rational 0.4.2,
num-traits 0.2.19, once_cell 1.21.4, openssl-probe 0.2.1, ordered-stream 0.2.0, parking 2.2.1,
parking_lot 0.12.5, parking_lot_core 0.9.12, percent-encoding 2.3.2, petgraph 0.8.3, piper 0.2.5,
plain 0.2.3, png 0.18.1, polling 3.11.0, pollster 0.4.0, pollster 1.0.1, rayon 1.12.0, rayon-core
1.13.0, renderdoc-sys 1.1.0, robust 1.2.0, ron 0.12.2, roxmltree 0.21.1, rustc-hash 1.1.0, rustix
0.38.44, rustix 1.1.5, rustls 0.23.46, rustls-native-certs 0.8.5, scoped-tls 1.0.1, scopeguard
1.2.0, secret-service 4.0.0, security-framework 2.11.1, security-framework 3.7.0,
security-framework-sys 2.17.0, send_wrapper 0.6.0, signal-hook-registry 1.4.8, simd_cesu8 1.2.0,
smallvec 1.16.2, smol_str 0.2.2, stable_deref_trait 1.2.1, tempfile 3.27.0, ttf-parser 0.25.1,
unicode-bidi 0.3.18, unicode-properties 0.1.5, unicode-segmentation 1.13.3, unicode-width 0.2.2, url
2.5.8, uuid 1.27.0, wasi 0.11.1+wasi-snapshot-preview1, wasip2 1.0.4+wasi-0.2.12, wasm-bindgen
0.2.129, wasm-bindgen-futures 0.4.79, wasm-bindgen-macro 0.2.129, wasm-bindgen-macro-support
0.2.129, wasm-bindgen-shared 0.2.129, web-sys 0.3.106, weezl 0.1.12, wit-bindgen 0.57.1,
wl-clipboard-rs 0.9.5
euclid 0.22.14, event-listener 5.4.2, event-listener-strategy 0.5.4, fastrand 2.5.0, flate2 1.1.10,
form_urlencoded 1.2.2, futures-lite 2.6.1, gethostname 1.1.0, gif 0.14.2, glow 0.17.0, gltf 1.4.1,
gltf-derive 1.4.1, gltf-json 1.4.1, hashbrown 0.16.1, hashbrown 0.17.1, hermit-abi 0.5.3, httparse
1.10.1, idna 1.1.0, idna_adapter 1.2.2, indexmap 2.14.2, itertools 0.15.0, js-sys 0.3.106,
keyboard-types 0.8.3, khronos-egl 6.0.0, lazy_static 1.5.1, linux-raw-sys 0.12.1, linux-raw-sys
0.4.15, lock_api 0.4.14, log 0.4.34, muda 0.21.2, num 0.4.3, num-bigint 0.4.8, num-complex 0.4.6,
num-integer 0.1.47, num-iter 0.1.46, num-rational 0.4.2, num-traits 0.2.19, once_cell 1.21.4,
openssl-probe 0.2.1, ordered-stream 0.2.0, parking 2.2.1, parking_lot 0.12.5, parking_lot_core
0.9.12, percent-encoding 2.3.2, piper 0.2.5, plain 0.2.3, png 0.18.1, polling 3.11.0, pollster
0.4.0, pollster 1.0.1, rayon 1.12.0, rayon-core 1.13.0, renderdoc-sys 1.1.0, robust 1.2.0, ron
0.12.2, roxmltree 0.21.1, rustc-hash 1.1.0, rustix 0.38.44, rustix 1.1.5, rustls 0.23.46,
rustls-native-certs 0.8.5, scoped-tls 1.0.1, scopeguard 1.2.0, secret-service 4.0.0,
security-framework 2.11.1, security-framework 3.7.0, security-framework-sys 2.17.0,
signal-hook-registry 1.4.8, simd_cesu8 1.2.0, smallvec 1.16.2, smol_str 0.2.2, stable_deref_trait
1.2.1, tempfile 3.27.0, ttf-parser 0.25.1, unicode-bidi 0.3.18, unicode-segmentation 1.13.3,
unicode-width 0.2.2, url 2.5.8, uuid 1.27.0, wasi 0.11.1+wasi-snapshot-preview1, wasip2
1.0.4+wasi-0.2.12, wasm-bindgen 0.2.129, wasm-bindgen-futures 0.4.79, wasm-bindgen-macro 0.2.129,
wasm-bindgen-macro-support 0.2.129, wasm-bindgen-shared 0.2.129, web-sys 0.3.106, weezl 0.1.12,
wit-bindgen 0.57.1
================================================================================
Apache License
@@ -1315,7 +1310,7 @@ See the License for the specific language governing permissions and
limitations under the License.
================================================================================
allocator-api2 0.2.21, async-trait 0.1.92, dyn-clone 1.0.20, enumn 0.1.14, glifo 0.3.0, itoa 1.0.18,
allocator-api2 0.2.21, async-trait 0.1.92, dyn-clone 1.0.20, enumn 0.1.14, glifo 0.2.0, itoa 1.0.18,
libc 0.2.190, litrs 1.0.0, num_enum 0.7.6, num_enum_derive 0.7.6, proc-macro2 1.0.107, quote 1.0.47,
ref-cast 1.0.27, ref-cast-impl 1.0.27, rustc-hash 2.1.3, rustversion 1.0.23, semver 1.0.28, serde
1.0.229, serde_core 1.0.229, serde_derive 1.0.229, serde_derive_internals 0.30.0, serde_json
@@ -1535,7 +1530,7 @@ android-activity 0.6.1, arboard 3.6.1, color 0.3.3, fdeflate 0.3.7, fearless_sim
image 0.25.10, image-webp 0.2.4, linebender_resource_handle 0.1.1, miniz_oxide 0.8.9, miniz_oxide
0.9.1, naga 30.0.1, naga-types 30.0.1, pin-project 1.1.13, pin-project-internal 1.1.13,
pin-project-lite 0.2.17, portable-atomic 1.15.0, portable-atomic-util 0.2.8, range-alloc 0.1.5,
raw-window-handle 0.6.2, simdutf8 0.1.5, vello_common 0.2.0, vello_cpu 0.2.0, wgpu 30.0.1, wgpu-core
raw-window-handle 0.6.2, simdutf8 0.1.5, vello_common 0.1.0, vello_cpu 0.1.0, wgpu 30.0.1, wgpu-core
30.0.1, wgpu-core-deps-apple 30.0.1, wgpu-core-deps-emscripten 30.0.1, wgpu-core-deps-wasm 30.0.1,
wgpu-core-deps-windows-linux-android 30.0.1, wgpu-hal 30.0.1, wgpu-naga-bridge 30.0.1, wgpu-types
30.0.1
@@ -2593,7 +2588,7 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================================================
bit-set 0.10.0, bit-vec 0.9.1, downcast-rs 1.2.1, egui-wgpu 0.37.0, presser 0.3.1
bit-set 0.10.0, bit-vec 0.9.1, downcast-rs 1.2.1, egui-wgpu 0.36.2, presser 0.3.1
================================================================================
Apache License
@@ -3139,7 +3134,7 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================================================
calloop 0.13.0, smithay-client-toolkit 0.19.2
calloop 0.13.0, calloop 0.14.5, smithay-client-toolkit 0.19.2, smithay-client-toolkit 0.20.0
================================================================================
Copyright (c) 2018 Victor Berger
@@ -3163,7 +3158,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================================================
calloop-wayland-source 0.3.0
calloop-wayland-source 0.3.0, calloop-wayland-source 0.4.1
================================================================================
Copyright (c) 2023 Kirill Chibisov
@@ -5236,7 +5231,7 @@ have been licensed under extremely permissive terms.
------------------------------------------------------------------------------
================================================================================
egui-wgpu 0.37.0
egui-wgpu 0.36.2
================================================================================
Copyright (c) 2018-2021 Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
@@ -5266,7 +5261,7 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================================================
either 1.19.0, itertools 0.15.0, petgraph 0.8.3
either 1.19.0, itertools 0.15.0
================================================================================
Copyright (c) 2015
@@ -5714,36 +5709,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================================================
fixedbitset 0.5.7
================================================================================
Copyright (c) 2015-2017
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================================================
flate2 1.1.10
================================================================================
@@ -5775,7 +5740,7 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================================================
foldhash 0.1.5, foldhash 0.2.0
foldhash 0.2.0
================================================================================
Copyright (c) 2024 Orson Peters
@@ -6546,7 +6511,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================================================
glifo 0.3.0
glifo 0.2.0
================================================================================
Copyright 2025 the Vello Authors
@@ -7173,7 +7138,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================================================
hashbrown 0.15.5, hashbrown 0.16.1, hashbrown 0.17.1
hashbrown 0.16.1, hashbrown 0.17.1
================================================================================
Copyright (c) 2016 Amanieu d'Antras
@@ -9494,31 +9459,6 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================================================
nom 8.0.0
================================================================================
Copyright (c) 2014-2019 Geoffroy Couprie
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================================================
num_enum 0.7.6, num_enum_derive 0.7.6
================================================================================
@@ -9607,30 +9547,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================================================
os_pipe 1.2.3
================================================================================
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================================================
parking 2.2.1
================================================================================
@@ -9646,7 +9562,7 @@ option. All files in the project carrying such notice may not be
copied, modified, or distributed except according to those terms.
================================================================================
phf 0.14.0, phf_generator 0.14.0, phf_macros 0.14.0, phf_shared 0.14.0
phf 0.13.1, phf_generator 0.13.1, phf_macros 0.13.1, phf_shared 0.13.1
================================================================================
The MIT License (MIT)
@@ -12461,6 +12377,30 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================================================
smithay-clipboard 0.7.3
================================================================================
Copyright (c) 2018 Lucas Timmins & Victor Berger
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================================================
solidcore 1.0.1
================================================================================
@@ -13033,32 +12973,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================================================
tree_magic_mini 3.2.2
================================================================================
MIT License
Copyright (c) 2017 Aaron Hancock
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================================================
ttf-parser 0.25.1
================================================================================
@@ -13881,7 +13795,7 @@ carrying such notice may not be copied, modified, or distributed except
according to those terms.
================================================================================
unicode-bidi 0.3.18, unicode-properties 0.1.5, unicode-segmentation 1.13.3, unicode-width 0.2.2
unicode-bidi 0.3.18, unicode-segmentation 1.13.3, unicode-width 0.2.2
================================================================================
Copyright (c) 2015 The Rust Project Developers
@@ -13955,51 +13869,7 @@ dealings in these Data Files or Software without prior written
authorization of the copyright holder.
================================================================================
unicode-properties 0.1.5
================================================================================
UNICODE LICENSE V3
COPYRIGHT AND PERMISSION NOTICE
Copyright © 1991-2026 Unicode, Inc.
NOTICE TO USER: Carefully read the following legal agreement. BY
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a
copy of data files and any associated documentation (the "Data Files") or
software and any associated documentation (the "Software") to deal in the
Data Files or Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, and/or sell
copies of the Data Files or Software, and to permit persons to whom the
Data Files or Software are furnished to do so, provided that either (a)
this copyright and permission notice appear with all copies of the Data
Files or Software, or (b) this copyright and permission notice appear in
associated Documentation.
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
FILES OR SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall
not be used in advertising or otherwise to promote the sale, use or other
dealings in these Data Files or Software without prior written
authorization of the copyright holder.
================================================================================
unicode-properties 0.1.5, unicode-segmentation 1.13.3, unicode-width 0.2.2
unicode-segmentation 1.13.3, unicode-width 0.2.2
================================================================================
Licensed under the Apache License, Version 2.0
@@ -14145,7 +14015,7 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================================================
vello_common 0.2.0, vello_cpu 0.2.0
vello_common 0.1.0, vello_cpu 0.1.0
================================================================================
Copyright 2020 the Vello Authors
@@ -14176,8 +14046,8 @@ DEALINGS IN THE SOFTWARE.
================================================================================
wayland-backend 0.3.17, wayland-client 0.31.15, wayland-cursor 0.31.14, wayland-protocols 0.32.13,
wayland-protocols-plasma 0.3.12, wayland-protocols-wlr 0.3.12, wayland-scanner 0.31.11, wayland-sys
0.31.11
wayland-protocols-experimental 20250721.0.1, wayland-protocols-misc 0.3.12, wayland-protocols-plasma
0.3.12, wayland-protocols-wlr 0.3.12, wayland-scanner 0.31.11, wayland-sys 0.31.11
================================================================================
Copyright (c) 2015 Elinor Berger
@@ -15072,36 +14942,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================================================
wl-clipboard-rs 0.9.5
================================================================================
Copyright (c) 2019 Ivan Molodetskikh
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================================================
x11rb 0.13.2, x11rb-protocol 0.13.2
================================================================================
@@ -16127,14 +15967,15 @@ Crates whose package carries no licence file (their licence is named in Cargo.to
texts are as in SolidCraft's own LICENSE-MIT and LICENSE-APACHE)
================================================================================
accesskit 0.25.2: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_atspi_common 0.21.1: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_consumer 0.39.2: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_ios 0.2.2: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_macos 0.27.2: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_unix 0.24.1: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_windows 0.35.2: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_winit 0.34.2: Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit 0.24.1: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_atspi_common 0.18.1: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_consumer 0.35.0: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_consumer 0.36.0: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_consumer 0.38.0: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_macos 0.26.3: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_unix 0.21.1: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_windows 0.32.1: MIT OR Apache-2.0 (https://github.com/AccessKit/accesskit)
accesskit_winit 0.32.2: Apache-2.0 (https://github.com/AccessKit/accesskit)
block2 0.5.1: MIT (https://github.com/madsmtm/objc2)
block2 0.6.2: MIT (https://github.com/madsmtm/objc2)
cadmpeg-codec-freecad 0.6.7: Apache-2.0 (https://github.com/cadmpeg/cadmpeg)
@@ -16147,14 +15988,14 @@ cadmpeg-registry 0.6.7: Apache-2.0 (https://github.com/cadmpeg/cadmpeg)
clipboard-win 5.4.1: BSL-1.0 (https://github.com/DoumanAsh/clipboard-win)
dispatch 0.2.0: MIT (http://github.com/SSheldon/rust-dispatch)
dispatch2 0.3.1: Zlib OR Apache-2.0 OR MIT (https://github.com/madsmtm/objc2)
ecolor 0.37.0: MIT OR Apache-2.0 (https://github.com/emilk/egui)
eframe 0.37.0: MIT OR Apache-2.0 (https://github.com/emilk/egui/tree/main/crates/eframe)
egui 0.37.0: MIT OR Apache-2.0 (https://github.com/emilk/egui)
egui-winit 0.37.0: MIT OR Apache-2.0 (https://github.com/emilk/egui/tree/main/crates/egui-winit)
egui_glow 0.37.0: MIT OR Apache-2.0 (https://github.com/emilk/egui/tree/main/crates/egui_glow)
emath 0.37.0: MIT OR Apache-2.0 (https://github.com/emilk/egui/tree/main/crates/emath)
epaint 0.37.0: MIT OR Apache-2.0 (https://github.com/emilk/egui/tree/main/crates/epaint)
epaint_default_fonts 0.37.0: (MIT OR Apache-2.0) AND OFL-1.1 AND Ubuntu-font-1.0 (https://github.com/emilk/egui/tree/main/crates/epaint_default_fonts)
ecolor 0.36.2: MIT OR Apache-2.0 (https://github.com/emilk/egui)
eframe 0.36.2: MIT OR Apache-2.0 (https://github.com/emilk/egui/tree/main/crates/eframe)
egui 0.36.2: MIT OR Apache-2.0 (https://github.com/emilk/egui)
egui-winit 0.36.2: MIT OR Apache-2.0 (https://github.com/emilk/egui/tree/main/crates/egui-winit)
egui_glow 0.36.2: MIT OR Apache-2.0 (https://github.com/emilk/egui/tree/main/crates/egui_glow)
emath 0.36.2: MIT OR Apache-2.0 (https://github.com/emilk/egui/tree/main/crates/emath)
epaint 0.36.2: MIT OR Apache-2.0 (https://github.com/emilk/egui/tree/main/crates/epaint)
epaint_default_fonts 0.36.2: (MIT OR Apache-2.0) AND OFL-1.1 AND Ubuntu-font-1.0 (https://github.com/emilk/egui/tree/main/crates/epaint_default_fonts)
jni 0.22.4: MIT OR Apache-2.0 (https://github.com/jni-rs/jni-rs)
jni-macros 0.22.4: MIT OR Apache-2.0 (https://github.com/jni-rs/jni-rs)
jni-sys-macros 0.4.1: MIT OR Apache-2.0 (https://github.com/jni-rs/jni-sys)
@@ -16198,7 +16039,7 @@ spirv 0.4.0+sdk-1.4.341.0: Apache-2.0 (https://github.com/gfx-rs/rspirv)
Bundled fonts (SIL Open Font License, Version 1.1)
================================================================================
- LiberationSans-Regular.ttf (crates/sketch/assets/fonts/liberation-sans/LiberationSans-Regular.ttf)
- LiberationSans-Regular.ttf (assets/fonts/liberation-sans/LiberationSans-Regular.ttf)
Copyright 2012 Red Hat, Inc. (Liberation Fonts 2.x; digitized data Google)
Source: https://github.com/liberationfonts
+2 -2
View File
@@ -11,7 +11,7 @@ use std::process::{Command, ExitCode};
const TARGET: &str = "solidcraft-cli";
fn main() -> ExitCode {
solidcraft_engine::note!("solvecraft-cli is deprecated and will be removed in a later release: use solidcraft-cli");
eprintln!("solvecraft-cli is deprecated and will be removed in a later release: use solidcraft-cli");
let sibling = std::env::current_exe()
.ok()
.and_then(|exe| exe.parent().map(|dir| dir.join(format!("{TARGET}{}", std::env::consts::EXE_SUFFIX))))
@@ -23,7 +23,7 @@ fn main() -> ExitCode {
None => ExitCode::FAILURE,
},
Err(e) => {
solidcraft_engine::note!("solvecraft-cli: could not run {}: {e}", program.to_string_lossy());
eprintln!("solvecraft-cli: could not run {}: {e}", program.to_string_lossy());
ExitCode::FAILURE
}
}
+1 -2
View File
@@ -68,8 +68,7 @@ impl Control {
if !addr.ip().is_loopback() || addr.port() == 0 {
return Err("--connect requires a loopback address and a nonzero port (the app listens on 127.0.0.1)".into());
}
let token = solidcraft_engine::control_auth::APP
.client_token(addr.port(), token)
let token = solidcraft_engine::control_auth::client_token(addr.port(), token)
.map(|t| t.token)
.ok_or("no control token: pass --token, set SOLIDCRAFT_CONTROL_TOKEN, or run on the app's computer (its token file)")?;
if token.len() > 4096 {
+6 -9
View File
@@ -33,8 +33,8 @@ pub fn one(args: &[String]) -> Result<(), String> {
std::panic::set_hook(Box::new(|_| {
PANICS.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
}));
solidcraft_engine::note!("design {seed}");
let run = fuzz::run_with(seed, steps, &mut |st| solidcraft_engine::note!("step {}", serde_json::to_string(st).unwrap_or_default()));
eprintln!("design {seed}");
let run = fuzz::run_with(seed, steps, &mut |st| eprintln!("step {}", serde_json::to_string(st).unwrap_or_default()));
let mut design = json!({
"outcome": run.outcome,
"steps": run.steps.iter().map(|s| s.kind).collect::<Vec<_>>(),
@@ -45,13 +45,13 @@ pub fn one(args: &[String]) -> Result<(), String> {
if run.outcome.is_bug() {
design["script"] = run.script();
if minimise {
solidcraft_engine::note!("minimise");
eprintln!("minimise");
let m = fuzz::minimise(&run);
design["minimal"] = json!({"outcome": m.outcome, "steps": m.steps.iter().map(|s| s.kind).collect::<Vec<_>>(), "script": m.script()});
}
}
let (a, b) = solidcraft_engine::fuzz::boolean_shapes(seed);
solidcraft_engine::note!("boolean {seed} {} {}", serde_json::to_string(&a).unwrap_or_default(), serde_json::to_string(&b).unwrap_or_default());
eprintln!("boolean {seed} {} {}", serde_json::to_string(&a).unwrap_or_default(), serde_json::to_string(&b).unwrap_or_default());
let b = boolean_case(seed);
let bp = PANICS.swap(0, std::sync::atomic::Ordering::SeqCst);
println!("{}", json!({"seed": seed, "design": design, "boolean": b, "boolean_panics": bp}));
@@ -162,14 +162,11 @@ fn record(v: &Value, out_dir: Option<&str>) {
let d = &v["design"];
let bug = matches!(d["outcome"]["kind"].as_str(), Some("failed" | "panic" | "invalid" | "volume"));
if bug || v.get("timeout").is_some() || v.get("crash").is_some() {
solidcraft_engine::note!(
"seed {seed}: {}",
if bug { format!("{} {}", d["outcome"]["kind"], d["outcome"]["detail"]) } else { format!("{v}") }
);
eprintln!("seed {seed}: {}", if bug { format!("{} {}", d["outcome"]["kind"], d["outcome"]["detail"]) } else { format!("{v}") });
}
let bk = v["boolean"]["outcome"].as_str().unwrap_or("ok");
if bk != "ok" {
solidcraft_engine::note!("seed {seed}: boolean {bk} {}", v["boolean"]["detail"]);
eprintln!("seed {seed}: boolean {bk} {}", v["boolean"]["detail"]);
}
if let Some(dir) = out_dir {
use std::io::Write;
+35 -148
View File
@@ -1,7 +1,7 @@
//! `kernel-cases --export=DIR`: one kernel rig case as a corpus entry for solidcore's rig. The
//! case's commands run as the rig runs them while the kernel's operations are traced
//! (`smlib_trace`); the entry holds every operation in execution order, including discarded
//! tool construction and handled refusals, each operand that came in as a record (the
//! (`smlib_trace`); the entry holds the operation (or the chain of operations) that made the
//! bodies the case ends with, each operand that came in as a record given as that record (the
//! B-rep record, solidcore-record's JSON), the fix set, the case's expected values and the rig's
//! own result. A case whose result no kernel operation alone accounts for is written too, with
//! the reasons, so nothing is dropped silently.
@@ -98,6 +98,32 @@ impl<'a> Trace<'a> {
}
}
/// The operations `ends` need, in the order they ran: each body's maker, and its operands' makers
/// in turn, back to bodies made from records. Operands made by nothing traced are listed in
/// `unknown`.
fn chain(t: &Trace<'_>, ends: &[u64], unknown: &mut BTreeSet<u64>) -> Vec<usize> {
let mut need = BTreeSet::new();
let mut todo: Vec<u64> = ends.to_vec();
while let Some(id) = todo.pop() {
if t.imports.contains_key(&id) {
continue;
}
match t.producer.get(&id) {
Some(&i) => {
if need.insert(i)
&& let Some(c) = t.calls.get(i)
{
todo.extend(c.1.iter().copied());
}
}
None => {
unknown.insert(id);
}
}
}
need.into_iter().collect()
}
/// The entry of case `dir`, run with result `out`, into `root/<area>/<id>.json`, and the fix set
/// into `root/fixes.json`.
pub fn write(root: &Path, dir: &str, out: &Value, capture: Capture) -> Result<(), String> {
@@ -194,18 +220,14 @@ pub fn write(root: &Path, dir: &str, out: &Value, capture: Capture) -> Result<()
}
let mut unknown = BTreeSet::new();
let mut available: BTreeSet<u64> = t.imports.keys().copied().collect();
for (_, inputs, _, outputs) in &t.calls {
unknown.extend(inputs.iter().filter(|id| !available.contains(id)).copied());
if let Ok(made) = outputs {
available.extend(made.iter().copied());
}
}
unknown.extend(ends.iter().filter(|id| !available.contains(id)).copied());
let mut order = chain(&t, &ends, &mut unknown);
if !unknown.is_empty() {
why_not.push(format!("operands made by nothing traced: {unknown:?}"));
}
// Operand records: every body a call takes, or the case ends with, that came in as a record.
if let Some(i) = failed_call.filter(|i| !order.contains(i)) {
order.push(i);
}
// Operand records: every body the chain takes, or the case ends with, that came in as a record.
let mut bodies = BTreeMap::new();
let given = |id: u64, bodies: &mut BTreeMap<String, Value>| {
if let Some((record, trusted, splines)) = t.imports.get(&id) {
@@ -213,21 +235,14 @@ pub fn write(root: &Path, dir: &str, out: &Value, capture: Capture) -> Result<()
}
};
let mut calls: Vec<Value> = Vec::new();
for (i, (op, inputs, params, outputs)) in t.calls.iter().enumerate() {
for (op, inputs, params, outputs) in order.iter().filter_map(|&i| t.calls.get(i)) {
for &id in inputs.iter() {
given(id, &mut bodies);
}
let mut c = json!({"op": op, "inputs": inputs.iter().map(|i| format!("b{i}")).collect::<Vec<_>>(), "params": params});
match outputs {
Ok(made) => c["outputs"] = json!(made.iter().map(|i| format!("b{i}")).collect::<Vec<_>>()),
Err(e) => {
c["error"] = json!(e);
// The application handled this refusal. Replay must continue to any later
// calls and grade the final bodies, even when this was the last attempt.
if failed_call != Some(i) {
c["continued"] = json!(true);
}
}
Err(e) => c["error"] = json!(e),
}
calls.push(c);
}
@@ -275,134 +290,6 @@ pub fn write(root: &Path, dir: &str, out: &Value, capture: Capture) -> Result<()
mod tests {
use super::*;
fn empty_record() -> Brep {
Brep { version: 4, tolerance: 1e-6, regions: Vec::new(), shells: Vec::new(), faces: Vec::new(), edges: Vec::new(), vertices: Vec::new() }
}
fn call(op: &'static str, inputs: &[u64], outputs: Result<Vec<u64>, String>) -> Event {
Event::Call { op, inputs: inputs.to_vec(), params: json!({}), outputs }
}
fn exported_case(name: &str, events: Vec<Event>, ran: Result<Vec<(String, Brep)>, String>) -> Value {
let root = std::env::temp_dir().join(format!("solidcraft-export-{}-{name}", std::process::id()));
let dir = root.join("tests/kernel-cases/traces").join(name);
std::fs::create_dir_all(&dir).unwrap();
std::fs::write(dir.join("expected.json"), "{}").unwrap();
let output = root.join("export");
write(&output, dir.to_str().unwrap(), &json!({"status": "pass"}), Capture { events, ran: Some(ran) }).unwrap();
let entry = output.join("traces").join(format!("{name}.json"));
serde_json::from_str(&std::fs::read_to_string(entry).unwrap()).unwrap()
}
#[test]
fn discarded_tool_construction_is_exported_in_execution_order() {
let record = empty_record();
let e = exported_case(
"discarded-tool",
vec![call("extrude", &[], Ok(vec![1])), call("extrude", &[], Ok(vec![2])), Event::Export { id: 1, record: Box::new(record.clone()) }],
Ok(vec![("Part".into(), record)]),
);
assert_eq!(e["calls"].as_array().unwrap().len(), 2);
assert_eq!(e["calls"][0]["outputs"], json!(["b1"]));
assert_eq!(e["calls"][1]["outputs"], json!(["b2"]));
assert_eq!(e["traced_ops"], json!(["extrude", "extrude"]));
}
#[test]
fn handled_refusals_are_exported_without_becoming_terminal() {
let record = empty_record();
let e = exported_case(
"handled-refusal",
vec![
call("extrude", &[], Ok(vec![1])),
call("fillet", &[1], Err("too large".into())),
call("fillet", &[1], Ok(vec![2])),
Event::Export { id: 2, record: Box::new(record.clone()) },
],
Ok(vec![("Part".into(), record)]),
);
assert_eq!(e["calls"].as_array().unwrap().len(), 3);
assert_eq!(e["calls"][1]["error"], "too large");
assert_eq!(e["calls"][1]["continued"], true);
}
#[test]
fn a_handled_last_attempt_keeps_the_retained_body_as_the_result() {
let record = empty_record();
let e = exported_case(
"handled-last-attempt",
vec![
call("extrude", &[], Ok(vec![1])),
call("fillet", &[1], Err("too large".into())),
Event::Export { id: 1, record: Box::new(record.clone()) },
],
Ok(vec![("Part".into(), record)]),
);
assert_eq!(e["calls"][1]["continued"], true);
assert_eq!(e["result"], json!([{"body": "Part", "made": "b1"}]));
assert_eq!(e["operation_expressible"], true);
}
#[test]
fn the_final_refusal_still_ends_replay() {
let e = exported_case(
"terminal-refusal",
vec![
call("extrude", &[], Ok(vec![1])),
call("fillet", &[1], Err("too large".into())),
call("fillet", &[1], Err("no room".into())),
call("copy", &[1], Ok(vec![2])),
],
Err("no room".into()),
);
assert_eq!(e["calls"].as_array().unwrap().len(), 4);
assert_eq!(e["calls"][1]["continued"], true);
assert!(e["calls"][2].get("continued").is_none());
assert_eq!(e["outcome"]["kernel_error"], "no room");
}
#[test]
fn discarded_operations_still_require_their_operand_records() {
let record = empty_record();
let e = exported_case(
"missing-tool-operand",
vec![call("extrude", &[], Ok(vec![1])), call("copy", &[99], Ok(vec![2])), Event::Export { id: 1, record: Box::new(record.clone()) }],
Ok(vec![("Part".into(), record)]),
);
assert_eq!(e["operation_expressible"], false);
assert!(e["why_not"].as_array().unwrap().iter().any(|why| why.as_str().unwrap().contains("99")));
}
#[test]
fn discarded_operations_keep_their_imported_operands() {
let record = empty_record();
let e = exported_case(
"imported-tool-operand",
vec![
call("extrude", &[], Ok(vec![1])),
Event::Import { id: 9, record: Box::new(record.clone()), trusted: false, keeping_splines: true },
call("copy", &[9], Ok(vec![2])),
Event::Export { id: 1, record: Box::new(record.clone()) },
],
Ok(vec![("Part".into(), record.clone())]),
);
assert_eq!(e["bodies"]["b9"], json!({"record": record, "trusted": false, "keeping_splines": true}));
assert_eq!(e["calls"][1]["inputs"], json!(["b9"]));
assert_eq!(e["operation_expressible"], true);
}
#[test]
fn a_later_output_cannot_supply_an_earlier_discarded_operation() {
let record = empty_record();
let e = exported_case(
"future-tool-operand",
vec![call("copy", &[9], Ok(vec![2])), call("extrude", &[], Ok(vec![9])), Event::Export { id: 9, record: Box::new(record.clone()) }],
Ok(vec![("Part".into(), record)]),
);
assert_eq!(e["operation_expressible"], false);
assert!(e["why_not"].as_array().unwrap().iter().any(|why| why.as_str().unwrap().contains("9")));
}
#[test]
fn the_area_is_the_path_under_kernel_cases() {
assert_eq!(area_and_id("tests/kernel-cases/booleans/1894-x").unwrap(), ("booleans".into(), "1894-x".into()));
+28 -80
View File
@@ -18,7 +18,7 @@
//! solidcraft-cli oracle <case-dir>... replay recipes and compare with expected.json
//! solidcraft-cli kernel-cases [--json] [--dumps=DIR] [--validation=MODE] <case-dir>... the kernel regression rig (tests/kernel-cases)
//! solidcraft-cli mcp [--headless] [--in design|script] [--connect HOST:PORT [--token T]] [--allow-path DIR]... [--allow-any-path]
//! [--param-check off|warn|strict] [--compact]
//! [--param-check off|warn|strict]
//! MCP server on stdio (docs/mcp.md)
//! solidcraft-cli mcp setup [--dry-run] [--client NAME] [--live] (alias: mcp install) add it to OpenCode, Claude Desktop, Claude Code, Cursor
//! solidcraft-cli licences SolidCraft's licence and the third-party licences
@@ -62,9 +62,9 @@ struct Command {
}
/// `run`'s lines in the usage.
const USAGE_RUN: &str = " solidcraft-cli run <script.json|design.sc|part.step> [--in design.sc|part.step] [--out FILE]... [--save FILE] [--quiet] [--results] [--timings] [--profile] [--profile-out trace.json] [--json-out FILE] [--allow-errors] [--validation each_step|each_feature|off]\n [--param-check off|warn|strict] [--quality standard|fine|finest]\n solidcraft-cli run --in <design.sc|part.step> [--out FILE]...\n (a timeline feature that fails fails the run and nothing is written; --allow-errors writes anyway)\n (--quality: how closely an STL, OBJ or 3MF --out follows curved faces, as file.export's quality: a chord of\n 2e-4, 5e-5 or 1e-5 of each body's size, never under 1 µm, default standard)\n (--validation: when SMLib's full check runs on the features computed (diagnostics.validation), default each_feature)\n (--param-check checks each step against its command's contract: warn reports on stderr, strict stops the run)\n (--timings prints {timings: [{index, command, ms}], total_ms} for a script, with --results its results too;\n --profile adds each command's profile: {boolean_ms, tessellate_ms, other_ms}, the kernel's share)\n (--profile also records where the time goes, SMLib's calls, kernel operations, features, commands and import stages,\n and prints the table to stderr: count, total, self time and longest per span; --profile-out FILE writes the spans\n as a Chrome trace for chrome://tracing or ui.perfetto.dev; SOLIDCRAFT_PROFILE=1 does the same for any command)\n";
const USAGE_RUN: &str = " solidcraft-cli run <script.json|design.sc|part.step> [--in design.sc|part.step] [--out FILE]... [--save FILE] [--quiet] [--results] [--timings] [--profile] [--profile-out trace.json] [--json-out FILE] [--allow-errors] [--validation each_step|each_feature|off]\n [--param-check off|warn|strict]\n solidcraft-cli run --in <design.sc|part.step> [--out FILE]...\n (a timeline feature that fails fails the run and nothing is written; --allow-errors writes anyway)\n (--validation: when SMLib's full check runs on the features computed (diagnostics.validation), default each_feature)\n (--param-check checks each step against its command's contract: warn reports on stderr, strict stops the run)\n (--timings prints {timings: [{index, command, ms}], total_ms} for a script, with --results its results too;\n --profile adds each command's profile: {boolean_ms, tessellate_ms, other_ms}, the kernel's share)\n (--profile also records where the time goes, SMLib's calls, kernel operations, features, commands and import stages,\n and prints the table to stderr: count, total, self time and longest per span; --profile-out FILE writes the spans\n as a Chrome trace for chrome://tracing or ui.perfetto.dev; SOLIDCRAFT_PROFILE=1 does the same for any command)\n";
/// `eval`'s lines in the usage.
const USAGE_EVAL: &str = " solidcraft-cli eval <script.json|design.sc|part.step> [--in design.sc|part.step] [--json-out FILE] [--profile] [--profile-out trace.json] [--validation each_step|each_feature|off] (alias: inspect)\n solidcraft-cli eval --in <script.json|design.sc|part.step> [--json-out FILE]\n (with both inputs, runs the positional script on --in before measuring; does not automatically save the modified design)\n (--json-out FILE writes the JSON that run (with --results, else the measurement) and eval print to FILE instead of stdout,\n as plain UTF-8: a shell's > can re-encode it, e.g. Windows PowerShell adds a byte-order mark)\n (--profile, --profile-out and --validation as for run)\n";
const USAGE_EVAL: &str = " solidcraft-cli eval <script.json|design.sc|part.step> [--in design.sc|part.step] [--json-out FILE] [--profile] [--profile-out trace.json] (alias: inspect)\n solidcraft-cli eval --in <script.json|design.sc|part.step> [--json-out FILE]\n (with both inputs, runs the positional script on --in before measuring; does not automatically save the modified design)\n (--json-out FILE writes the JSON that run (with --results, else the measurement) and eval print to FILE instead of stdout,\n as plain UTF-8: a shell's > can re-encode it, e.g. Windows PowerShell adds a byte-order mark)\n (--profile and --profile-out as for run)\n";
/// `script`'s lines in the usage.
const USAGE_SCRIPT: &str = " solidcraft-cli script <design.sc|script.json> [--out script.json]\n (the design's history as a command script that eval and run replay)\n";
/// `bench-open`'s lines in the usage.
@@ -91,7 +91,7 @@ const USAGE_KERNEL_CASES: &str = " solidcraft-cli kernel-cases <case-dir>... [-
const USAGE_FUZZ: &str =
" solidcraft-cli fuzz [--from N] [--count N] [--jobs J] [--timeout S] [--steps N] [--minimise] [--out DIR] [--report FILE]\n";
/// `mcp`'s lines in the usage.
const USAGE_MCP: &str = " solidcraft-cli mcp [--headless] [--in design.sc|script.json] [--connect 127.0.0.1:PORT [--token T]] [--allow-path DIR]... [--allow-any-path]\n [--param-check off|warn|strict] [--render-gpu] [--compact]\n (--compact, SOLIDCRAFT_MCP_COMPACT=1 or the app's Preferences › AI (with --connect): compact tool output for\n agents: inspect_design summarises sketches and takes `sketches` by name and a `bodies` filter, and tool JSON\n is not pretty-printed; off by default)\n solidcraft-cli mcp setup [--dry-run] [--client opencode|claude-desktop|claude-code|cursor] [--live]\n (adds a `solidcraft` server, with this program's path, to each installed AI client; --live adds `solidcraft-live` for the running app; alias: mcp install)\n";
const USAGE_MCP: &str = " solidcraft-cli mcp [--headless] [--in design.sc|script.json] [--connect 127.0.0.1:PORT [--token T]] [--allow-path DIR]... [--allow-any-path]\n [--param-check off|warn|strict] [--render-gpu]\n solidcraft-cli mcp setup [--dry-run] [--client opencode|claude-desktop|claude-code|cursor] [--live]\n (adds a `solidcraft` server, with this program's path, to each installed AI client; --live adds `solidcraft-live` for the running app; alias: mcp install)\n";
/// `crashes`'s lines in the usage.
const USAGE_CRASHES: &str = " solidcraft-cli crashes [list [--json] | show <id> | replay <id> | dir | clear [<id>]]\n";
/// `licences`'s lines in the usage.
@@ -154,7 +154,7 @@ fn main() -> ExitCode {
}
};
if let Err(e) = max_file_size(&mut args) {
solidcraft_engine::note!("error: {e}");
eprintln!("error: {e}");
return ExitCode::FAILURE;
}
let r = match args.first().map(String::as_str) {
@@ -235,7 +235,7 @@ fn main() -> ExitCode {
match r {
Ok(()) => ExitCode::SUCCESS,
Err(e) => {
solidcraft_engine::note!("error: {e}");
eprintln!("error: {e}");
ExitCode::FAILURE
}
}
@@ -318,19 +318,6 @@ fn load_checked(path: &str, check: solidcraft_engine::schema::ParamCheck) -> Res
/// `load_checked`, the features computed under `validation` (`diagnostics.validation`), which
/// the session keeps.
fn load_with(path: &str, check: solidcraft_engine::schema::ParamCheck, validation: solidcraft_engine::kernel::Validation) -> Result<Session, String> {
let s = read_session(path, check, validation)?;
// A newer SolidCraft's file opens all the same; stderr says so, stdout stays the caller's.
for warning in s.doc.newer_file.iter().flat_map(|file| file.warnings()) {
eprintln!("{path}: warning: {warning}");
}
Ok(s)
}
fn read_session(
path: &str,
check: solidcraft_engine::schema::ParamCheck,
validation: solidcraft_engine::kernel::Validation,
) -> Result<Session, String> {
let mut s = Session::default();
s.param_check = check;
s.set_validation(validation);
@@ -364,7 +351,7 @@ fn run_script_warning(s: &mut Session, path: &str, script: &Value) -> Result<Vec
/// Step `step`'s `param_warnings` on stderr, one per line, named after the script at `path`.
fn print_param_warnings(path: &str, step: usize, r: &Value) {
for w in r.get("param_warnings").and_then(Value::as_array).into_iter().flatten() {
solidcraft_engine::note!("{path}: step {}: {}", step + 1, w.as_str().unwrap_or_default());
eprintln!("{path}: step {}: {}", step + 1, w.as_str().unwrap_or_default());
}
}
@@ -451,12 +438,11 @@ fn cmd_run(args: &[String]) -> Result<(), String> {
known_args(
"run",
args,
&["--in", "--out", "--save", "--json-out", "--param-check", "--profile-out", "--validation", "--quality"],
&["--in", "--out", "--save", "--json-out", "--param-check", "--profile-out", "--validation"],
&["--quiet", "--results", "--timings", "--profile", "--allow-errors"],
true,
)?;
let validation = validation_flag("run", args)?;
let quality = export_quality("run", args)?;
let base = flag(args, "--in");
let path = positional(args);
if path.is_none() && base.is_none() {
@@ -498,17 +484,11 @@ fn cmd_run(args: &[String]) -> Result<(), String> {
// A feature that fails leaves the bodies as they were before it (a parameter change can
// break a feature without failing the command that made it): writing them would hand out
// the wrong part with success, so fail the run unless asked to write it anyway.
// A feature only a newer SolidCraft can build isn't a broken design: saving the design keeps it
// and hands out no part. Exporting bodies without it would, so that still stops.
if !args.iter().any(|a| a == "--allow-errors") {
timeline_ok(&s, flags(args, "--out").is_empty())?;
timeline_ok(&s)?;
}
for out in flags(args, "--out") {
let mut params = json!({"path": out});
if let Some(q) = quality {
params["quality"] = json!(q);
}
s.execute("file.export", &params).map_err(|e| e.to_string())?;
s.execute("file.export", &json!({"path": out})).map_err(|e| e.to_string())?;
}
if let Some(p) = flag(args, "--save") {
s.execute("file.save_as", &json!({"path": p})).map_err(|e| e.to_string())?;
@@ -549,20 +529,6 @@ fn open_validating(
}
}
/// `--quality standard|fine|finest`: how closely the meshes `--out` writes (STL, OBJ, 3MF)
/// follow curved faces, as `file.export`'s `quality` (#12270). Checked before anything runs;
/// given twice it is refused, since only one quality can apply.
fn export_quality<'a>(cmd: &str, args: &'a [String]) -> Result<Option<&'a str>, String> {
if flags(args, "--quality").len() > 1 {
return Err(format!("{cmd}: --quality is given more than once"));
}
match flag(args, "--quality") {
Some(q) if solidcraft_engine::io::MeshQuality::from_name(q).is_some() => Ok(Some(q)),
Some(q) => Err(format!("{cmd}: --quality must be standard, fine or finest, not `{q}`")),
None => Ok(None),
}
}
/// `--validation MODE` (`diagnostics.validation`): the default, each_feature, when not given.
fn validation_flag(cmd: &str, args: &[String]) -> Result<solidcraft_engine::kernel::Validation, String> {
match flag(args, "--validation") {
@@ -595,12 +561,8 @@ fn known_args(cmd: &str, args: &[String], valued: &[&str], switches: &[&str], po
}
/// Every failing timeline feature, one per line, as an error; Ok when none fails.
fn timeline_ok(s: &Session, skip_newer_features: bool) -> Result<(), String> {
let newer = |id: u64| {
skip_newer_features && s.doc.feature(id).is_some_and(|f| matches!(f.kind, solidcraft_engine::doc::FeatureKind::NewerFileFeature { .. }))
};
let failed: Vec<String> =
s.model.results.iter().filter(|r| !newer(r.id)).filter_map(|r| r.error.as_ref().map(|e| format!(" {}: {e}", r.name))).collect();
fn timeline_ok(s: &Session) -> Result<(), String> {
let failed: Vec<String> = s.model.results.iter().filter_map(|r| r.error.as_ref().map(|e| format!(" {}: {e}", r.name))).collect();
if failed.is_empty() {
return Ok(());
}
@@ -611,15 +573,13 @@ fn timeline_ok(s: &Session, skip_newer_features: bool) -> Result<(), String> {
))
}
/// Runs `solidcraft-cli eval` (and its `inspect` alias), opening the input design or script with the requested `--validation` mode and reporting both `inspect.measure` and `document.inspect`.
fn cmd_eval(args: &[String]) -> Result<(), String> {
let json_out = json_out(args)?;
known_args("eval", args, &["--in", "--json-out", "--profile-out", "--validation"], &["--profile"], true)?;
let validation = validation_flag("eval", args)?;
let mut s = open_validating(flag(args, "--in"), positional(args), solidcraft_engine::schema::ParamCheck::Off, validation)?;
known_args("eval", args, &["--in", "--json-out", "--profile-out"], &["--profile"], true)?;
let mut s = open(flag(args, "--in"), positional(args), solidcraft_engine::schema::ParamCheck::Off)?;
let m = s.execute("inspect.measure", &json!({})).map_err(|e| e.to_string())?;
let d = s.execute("document.inspect", &json!({})).map_err(|e| e.to_string())?;
let mut out = json!({
let out = json!({
"body_count": m["body_count"],
"bodies": m["bodies"],
"total": m["total"],
@@ -627,10 +587,6 @@ fn cmd_eval(args: &[String]) -> Result<(), String> {
"params": d["params"],
"sketches": d["sketches"],
});
if let Some(file) = &s.doc.newer_file {
out["newer_file"] = file.report();
out["warnings"] = json!(file.warnings());
}
print_json(&out, json_out)
}
@@ -642,10 +598,10 @@ fn cmd_script(args: &[String]) -> Result<(), String> {
let out = flag(args, "--out");
let r = s.execute("timeline.export_script", &json!({"path": out})).map_err(|e| e.to_string())?;
for what in r["omitted"].as_array().into_iter().flatten().filter_map(Value::as_str) {
solidcraft_engine::note!("note: the script leaves out {what}");
eprintln!("note: the script leaves out {what}");
}
match out {
Some(out) => solidcraft_engine::note!("{out}: {} steps", r["steps"]),
Some(out) => eprintln!("{out}: {} steps", r["steps"]),
None => println!("{}", pretty(&r["script"])),
}
Ok(())
@@ -676,7 +632,7 @@ fn cmd_gpu(args: &[String]) -> Result<(), String> {
);
match s.lands_on {
Some(solidcraft_gpu::select::Landing::Cpu) => {
solidcraft_engine::note!("warning: {}", solidcraft_engine::capture::CPU_WARNING);
eprintln!("warning: {}", solidcraft_engine::capture::CPU_WARNING);
Ok(())
}
Some(_) => Ok(()),
@@ -753,7 +709,7 @@ fn cmd_snapshot(args: &[String]) -> Result<(), String> {
std::fs::write(out, &png.bytes).map_err(|e| format!("{out}: {e}"))?;
let mut reply = json!({"path": out, "width": w, "height": h, "bytes": png.bytes.len(), "renderer": png.renderer});
if let Some(w) = solidcraft_engine::capture::warning(png.renderer) {
solidcraft_engine::note!("warning: {w}");
eprintln!("warning: {w}");
reply["warning"] = json!(w);
}
println!("{}", pretty(&reply));
@@ -836,15 +792,11 @@ fn cmd_mcp(args: &[String]) -> Result<(), String> {
return Err("mcp: --render-gpu installs a headless image host; a connected application owns its own device".into());
}
install_renderer();
let options = solidcraft_mcp::Options::from_args_and_env(args).map_err(|e| format!("mcp: {e}"))?;
if options.compact {
eprintln!("solidcraft mcp: compact output (inspect_design summarises sketches; tool JSON is not pretty-printed)");
}
let scope = (!args.iter().any(|a| a == "--allow-any-path"))
.then(|| solidcraft_mcp::agent_scope(flags(args, "--allow-path").into_iter().map(std::path::PathBuf::from)));
if let Some(s) = &scope {
let roots: Vec<String> = s.roots().iter().map(|r| r.display().to_string()).collect();
solidcraft_engine::note!(
eprintln!(
"solidcraft mcp: files limited to {} and the folders of designs opened or saved here (--allow-path DIR adds one, --allow-any-path lifts the limit)",
roots.join(", ")
);
@@ -852,7 +804,7 @@ fn cmd_mcp(args: &[String]) -> Result<(), String> {
.and_then(|p| std::path::Path::new(p).parent())
.map(|d| if d.as_os_str().is_empty() { std::path::Path::new(".") } else { d });
if let Some(why) = design_dir.and_then(solidcraft_engine::io::vfs::design_folder_refusal) {
solidcraft_engine::note!("solidcraft mcp: the design's folder is left out because {why}; add it with --allow-path if you mean it");
eprintln!("solidcraft mcp: the design's folder is left out because {why}; add it with --allow-path if you mean it");
}
}
// How calls that break a command's parameter contract are treated, headless or bridged.
@@ -866,7 +818,7 @@ fn cmd_mcp(args: &[String]) -> Result<(), String> {
// Serve without the app too: the tools connect once it runs, and say it isn't until then.
let mut remote = solidcraft_mcp::Remote::new(addr, flag(args, "--token")).with_param_check(param_check);
if let Err(e) = remote.try_connect() {
solidcraft_engine::note!(
eprintln!(
"solidcraft mcp: no SolidCraft app at {addr} yet ({e}); start it with `solidcraft --control {port}` \
(or SOLIDCRAFT_CONTROL_PORT={port}), tool calls connect once it runs"
);
@@ -883,9 +835,9 @@ fn cmd_mcp(args: &[String]) -> Result<(), String> {
(None, None) => {
let auto = !args.iter().any(|a| a == "--headless");
if auto && let Some(port) = discover_app() {
solidcraft_engine::note!("solidcraft mcp: bridged to the running app at 127.0.0.1:{port} (--headless starts a session of its own)");
eprintln!("solidcraft mcp: bridged to the running app at 127.0.0.1:{port} (--headless starts a session of its own)");
let remote = solidcraft_mcp::Remote::new(&format!("127.0.0.1:{port}"), flag(args, "--token")).with_param_check(param_check);
return serve_mcp(Box::new(remote), scope, options);
return serve_mcp(Box::new(remote), scope);
}
let mut headless = solidcraft_mcp::Headless::default();
headless.session.param_check = param_check;
@@ -900,23 +852,19 @@ fn cmd_mcp(args: &[String]) -> Result<(), String> {
}
}
};
serve_mcp(backend, scope, options)
serve_mcp(backend, scope)
}
fn serve_mcp(
backend: Box<dyn solidcraft_mcp::Backend>,
scope: Option<solidcraft_engine::io::vfs::PathScope>,
options: solidcraft_mcp::Options,
) -> Result<(), String> {
fn serve_mcp(backend: Box<dyn solidcraft_mcp::Backend>, scope: Option<solidcraft_engine::io::vfs::PathScope>) -> Result<(), String> {
let stdin = std::io::stdin();
let stdout = std::io::stdout();
solidcraft_mcp::Server::new(backend).with_path_scope(scope).with_options(options).serve(stdin.lock(), stdout.lock()).map_err(|e| e.to_string())
solidcraft_mcp::Server::new(backend).with_path_scope(scope).serve(stdin.lock(), stdout.lock()).map_err(|e| e.to_string())
}
/// The port of the running desktop app: the one its discovery file names, if something listens
/// there (a file left by an app that crashed names a closed port).
fn discover_app() -> Option<u16> {
let port = solidcraft_engine::control_auth::APP.read_current_port()?;
let port = solidcraft_engine::control_auth::read_current_port()?;
let addr = std::net::SocketAddr::from(([127, 0, 0, 1], port));
std::net::TcpStream::connect_timeout(&addr, std::time::Duration::from_millis(500)).ok().map(|_| port)
}
+1 -1
View File
@@ -1308,7 +1308,7 @@ fn edge_round_actions_keep_the_picked_body() {
let mut unscoped = p.clone();
unscoped.as_object_mut().unwrap().remove("body");
let err = s.scratch().execute(id, &unscoped).unwrap_err().to_string();
assert!(err.contains("[10, 0, 20] lies on edges of 2 bodies, Plate and Block"), "{err}");
assert!(err.contains("edges meet"), "{err}");
perform(&mut s.scratch(), &a.act, &errors(&s)).unwrap();
tried += 1;
}
-23
View File
@@ -188,26 +188,3 @@ fn max_file_size_raises_the_limit_and_refuses_bad_sizes() {
assert!(!output.status.success() && !stderr.contains("too large"), "{stderr}");
let _ = std::fs::remove_dir_all(&dir);
}
/// #10111: a line for a stderr whose reader has gone (the pipe closed before it, as an agent may
/// leave the MCP server's, and the app that one starts) is dropped, and the command ends as it
/// would with stderr open: here a script that isn't there fails with 1, where `eprintln!`
/// panicked with "failed printing to stderr" (101).
#[test]
fn a_closed_stderr_does_not_stop_the_cli() {
for _ in 0..5 {
let mut child = Command::new(env!("CARGO_BIN_EXE_solidcraft-cli"))
.args(["run", "no-such-script.json"])
.stdout(Stdio::null())
.stderr(Stdio::piped())
.spawn()
.unwrap();
drop(child.stderr.take());
assert_eq!(child.wait().unwrap().code(), Some(1));
}
// The old name's alias writes its deprecation notice first: an agent still configured with
// `solvecraft-cli mcp` must get the server, not that panic.
let mut child = Command::new(env!("CARGO_BIN_EXE_solvecraft-cli")).arg("--help").stdout(Stdio::null()).stderr(Stdio::piped()).spawn().unwrap();
drop(child.stderr.take());
assert_eq!(child.wait().unwrap().code(), Some(0));
}
-48
View File
@@ -1,48 +0,0 @@
//! `mcp --compact` and `SOLIDCRAFT_MCP_COMPACT` turn on compact tool output; without them the
//! server's tools are as they always were.
use std::io::Write;
use std::process::{Command, Stdio};
use serde_json::{Value, json};
/// `inspect_design`'s input schema as `solidcraft-cli mcp` with `args` and `env` lists it, or
/// the server's stderr when it does not start.
fn inspect_schema(args: &[&str], env: Option<&str>) -> Result<Value, String> {
let mut cmd = Command::new(env!("CARGO_BIN_EXE_solidcraft-cli"));
// --headless: never bridge to (and read the preference of) an app the developer has running.
cmd.args(["mcp", "--headless", "--allow-any-path"]).args(args).stdin(Stdio::piped()).stdout(Stdio::piped()).stderr(Stdio::piped());
match env {
Some(v) => cmd.env("SOLIDCRAFT_MCP_COMPACT", v),
None => cmd.env_remove("SOLIDCRAFT_MCP_COMPACT"),
};
let mut child = cmd.spawn().unwrap();
{
let mut stdin = child.stdin.take().unwrap();
// The server may refuse to start and close stdin first.
let _ = writeln!(stdin, "{}", json!({"jsonrpc": "2.0", "id": 1, "method": "tools/list"}));
}
let out = child.wait_with_output().unwrap();
if !out.status.success() {
return Err(String::from_utf8_lossy(&out.stderr).into_owned());
}
let reply: Value = serde_json::from_slice(&out.stdout).unwrap();
let tools = reply["result"]["tools"].as_array().cloned().unwrap_or_default();
Ok(tools.into_iter().find(|t| t["name"] == "inspect_design").map(|t| t["inputSchema"].clone()).unwrap_or(Value::Null))
}
#[test]
fn compact_output_is_off_unless_asked() {
let plain = inspect_schema(&[], None).unwrap();
assert_eq!(plain["properties"]["sketches"]["type"], "boolean", "{plain}");
assert!(plain["properties"].get("bodies").is_none(), "{plain}");
assert_eq!(inspect_schema(&[], Some("0")).unwrap(), plain);
for (args, env) in [(&["--compact"][..], None), (&[][..], Some("1")), (&[][..], Some("true"))] {
let compact = inspect_schema(args, env).unwrap();
assert!(compact["properties"]["bodies"].is_object(), "{args:?} {env:?}: {compact}");
}
let e = inspect_schema(&[], Some("maybe")).unwrap_err();
assert!(e.contains("SOLIDCRAFT_MCP_COMPACT"), "{e}");
}
+13 -34
View File
@@ -60,25 +60,15 @@ fn mcp_connect_serves_before_the_app_runs_and_reaches_it_once_it_does() {
let listener = TcpListener::bind(&addr).unwrap();
let app = std::thread::spawn(move || {
let (stream, _) = listener.accept().unwrap();
let mut lines = BufReader::new(stream.try_clone().unwrap());
loop {
let mut line = String::new();
lines.read_line(&mut line).unwrap();
let req: Value = serde_json::from_str(&line).unwrap();
// The server first asks for the agents' output options (the compact preference: off).
let options = req["method"] == "mcp.options";
let reply = if req["token"] != json!(token) {
json!({"id": req["id"], "ok": false, "error": format!("unauthorized: token {}", req["token"])})
} else if options {
json!({"id": req["id"], "ok": true, "result": {"compact": false}})
} else {
json!({"id": req["id"], "ok": true, "result": {"bodies": [], "method": req["method"]}})
};
writeln!(&stream, "{reply}").unwrap();
if !options {
break;
}
}
let mut line = String::new();
BufReader::new(stream.try_clone().unwrap()).read_line(&mut line).unwrap();
let req: Value = serde_json::from_str(&line).unwrap();
let reply = if req["token"] == json!(token) {
json!({"id": req["id"], "ok": true, "result": {"bodies": [], "method": req["method"]}})
} else {
json!({"id": req["id"], "ok": false, "error": format!("unauthorized: token {}", req["token"])})
};
writeln!(&stream, "{reply}").unwrap();
});
let r = ask(4, "tools/call", measure);
assert_ne!(r["result"]["isError"], true, "{r}");
@@ -121,21 +111,10 @@ fn mcp_without_arguments_finds_the_running_app() {
break (stream, line);
}
};
let mut lines = BufReader::new(stream.try_clone().unwrap());
let mut line = line;
// The server first asks for the agents' output options (the compact preference: off).
loop {
let req: Value = serde_json::from_str(&line).unwrap();
let ok = req["token"] == json!(token);
let options = req["method"] == "mcp.options";
let result = if options { json!({"compact": false}) } else { json!({"bodies": [], "method": req["method"]}) };
writeln!(&stream, "{}", json!({"id": req["id"], "ok": ok, "result": result, "error": "unauthorized"})).unwrap();
if !options {
break;
}
line.clear();
lines.read_line(&mut line).unwrap();
}
let req: Value = serde_json::from_str(&line).unwrap();
let ok = req["token"] == json!(token);
let reply = json!({"id": req["id"], "ok": ok, "result": {"bodies": [], "method": req["method"]}, "error": "unauthorized"});
writeln!(&stream, "{reply}").unwrap();
});
let mut child = Command::new(env!("CARGO_BIN_EXE_solidcraft-cli"))
.args(["mcp", "--allow-any-path"])
+2 -2
View File
@@ -318,7 +318,7 @@ fn a_model_saved_under_another_check_mode_is_evaluated_again() {
/// opened from its model or evaluated anew. Two edges of a 20 mm box rounded r2 (a mitre at the
/// corner (20, 0, 20)), saved; opened, the upright edge there rounded r3: the corner all three
/// rounded at once make (SMLib's setback corner, kernel `three_rounds_at_a_corner`), 15 faces and
/// 7927.72428251348 mm³, the same body as the design evaluated anew.
/// 7928.142563938 mm³, the same body as the design evaluated anew.
#[test]
fn a_later_round_after_opening_blends_the_saved_rounds_again() {
let mut built = Session::default();
@@ -336,7 +336,7 @@ fn a_later_round_after_opening_blends_the_saved_rounds_again() {
let b = &st.body("Box").unwrap().body;
let v = solidcraft_engine::kernel::measure(b).unwrap().volume;
assert_eq!(b.face_count(), 15);
assert!((v - 7927.72428251348).abs() < 1e-6, "{v}"); // solidcore#2382's setback corner
assert!((v - 7928.142563938).abs() < 1e-6, "{v}");
}
assert_eq!(model("later round", &cached), model("later round", &rebuilt));
let _ = std::fs::remove_file(&path);
+19 -86
View File
@@ -67,9 +67,6 @@ fn run_rejects_invalid_options_before_script_execution_or_output_writes() {
(&["--out", "--quiet"][..], "--out needs a value"),
(&["--ouut", "part.step"][..], "doesn't take --ouut"),
(&["--unknown"][..], "doesn't take --unknown"),
(&["--quality"][..], "--quality needs a value"),
(&["--quality", "best"][..], "--quality must be standard, fine or finest, not `best`"),
(&["--quality", "standard", "--quality", "best"][..], "--quality is given more than once"),
];
for existing in [false, true] {
let saved = dir.0.join(format!("{existing}.solidcraft"));
@@ -162,7 +159,7 @@ fn cli_loads_both_design_encodings_by_contents() {
}
/// #1369: a pending concept that did not land in the numbered release must not be silently
/// dropped on open/resave, in either encoding: it opens with a warning, and saving keeps it.
/// dropped on open/resave, in either encoding or before replacing an existing destination.
#[test]
fn unknown_pending_concepts_preserve_the_open_design_and_output_files() {
use solidcraft_engine::{Session, doc, io};
@@ -176,29 +173,34 @@ fn unknown_pending_concepts_preserve_the_open_design_and_output_files() {
let source = dir.0.join(format!("experimental-{version}.{extension}"));
std::fs::write(&source, &bytes).unwrap();
let mut session = Session::default();
// It opens, and the reply says what it is.
let reply = session.execute("doc.open", &json!({"path": source})).unwrap();
let notice = reply["newer_file"]["notice"].as_str().unwrap().to_string();
assert!(notice.contains("experimental-card") && notice.starts_with("Saved by a newer SolidCraft"), "{notice}");
assert_eq!(reply["warnings"][0], notice.as_str());
assert_eq!(session.doc.name, "Experimental");
session.execute("solid.box", &json!({"length": 2, "width": 3, "height": 4})).unwrap();
let original = session.doc.clone();
let original_path = session.path.clone();
let undo = session.undo.len();
let dirty = session.is_dirty();
let err = session.execute("doc.open", &json!({"path": source})).unwrap_err().to_string();
assert!(err.contains("experimental-card") && err.contains("update SolidCraft"), "{err}");
assert_eq!(session.doc, original);
assert_eq!(session.path, original_path);
assert_eq!(session.undo.len(), undo);
assert_eq!(session.is_dirty(), dirty);
for existing in [false, true] {
let destination = dir.0.join(format!("output-{version}-{extension}-{existing}.{extension}"));
let backup = io::backup_path(&destination);
if existing {
std::fs::write(&destination, b"existing design").unwrap();
std::fs::write(&backup, b"existing backup").unwrap();
}
let output = cli().args(["run", "--in"]).arg(&source).arg("--save").arg(&destination).output().unwrap();
assert_eq!(output.status.code(), Some(1));
let error = String::from_utf8_lossy(&output.stderr);
assert_eq!(output.status.code(), Some(0), "{error}");
assert!(error.contains("warning: Saved by a newer SolidCraft") && error.contains("experimental-card"), "{error}");
// Saved, it still says it has the change, and opens the same way.
let saved = io::read_design(&std::fs::read(&destination).unwrap()).unwrap();
assert!(saved.format_pending.iter().any(|name| name == "experimental-card"));
assert!(saved.newer_file.is_some());
assert!(error.contains("experimental-card") && error.contains("update SolidCraft"), "{error}");
if existing {
assert_eq!(std::fs::read(&backup).unwrap(), b"existing design");
assert_eq!(std::fs::read(&destination).unwrap(), b"existing design");
assert_eq!(std::fs::read(&backup).unwrap(), b"existing backup");
} else {
assert!(!destination.exists() && !backup.exists());
}
assert_eq!(std::fs::read(&source).unwrap(), bytes);
}
@@ -206,43 +208,6 @@ fn unknown_pending_concepts_preserve_the_open_design_and_output_files() {
}
}
/// `eval` and `run` on a design one format newer, with a feature kind this version doesn't have:
/// the rest builds, the reply names it, and the saved file still holds it, under the file's number.
#[test]
fn the_cli_opens_a_newer_design_and_saving_keeps_what_it_cant_read() {
use solidcraft_engine::{Session, doc, io};
let dir = Scratch::new();
let mut session = Session::default();
session.execute("solid.box", &json!({"length": 2, "width": 3, "height": 4})).unwrap();
let mut file: Value = serde_json::from_slice(&io::write_design(&session.doc)).unwrap();
let newer = doc::format::format_string(doc::format::FORMAT + 1);
file["format"] = json!(newer);
let future = json!({"id": 900, "name": "Lattice1", "type": "gyroid_lattice", "cell": 2.5});
file["features"].as_array_mut().unwrap().push(future.clone());
let source = dir.0.join("newer.json");
std::fs::write(&source, file.to_string()).unwrap();
let output = cli().args(["eval"]).arg(&source).output().unwrap();
let error = String::from_utf8_lossy(&output.stderr);
assert_eq!(output.status.code(), Some(0), "{error}");
assert!(error.contains("warning: Saved by a newer SolidCraft") && error.contains("Lattice1"), "{error}");
let reply: Value = serde_json::from_slice(&output.stdout).unwrap();
assert_eq!(reply["body_count"], 1);
assert!(reply["newer_file"]["not_understood"][0].as_str().unwrap().contains("gyroid_lattice"), "{reply}");
assert!(reply["warnings"][0].as_str().unwrap().starts_with("Saved by a newer SolidCraft"), "{reply}");
for extension in ["json", "sc"] {
let destination = dir.0.join(format!("saved.{extension}"));
let output = cli().args(["run", "--in"]).arg(&source).arg("--save").arg(&destination).output().unwrap();
assert_eq!(output.status.code(), Some(0), "{}", String::from_utf8_lossy(&output.stderr));
let saved = io::read_design(&std::fs::read(&destination).unwrap()).unwrap();
assert_eq!(saved.format, newer, "never a lower number");
let again: Value = serde_json::from_slice(&io::write_design(&saved)).unwrap();
assert_eq!(again["features"].as_array().unwrap().last().unwrap(), &future);
}
}
#[test]
fn known_pending_concepts_and_released_files_round_trip_with_inert_metadata() {
use solidcraft_engine::{doc, io};
@@ -291,38 +256,6 @@ fn results_still_save_and_export_the_script_once() {
}
}
/// The triangles of a binary STL: the count after its 80-byte header.
fn stl_triangles(path: &Path) -> u32 {
let bytes = std::fs::read(path).unwrap();
u32::from_le_bytes(bytes[80..84].try_into().unwrap())
}
/// #12270: `run --out part.stl --quality fine` writes the mesh at that quality, as
/// `file.export`'s `quality` does, without a script to say so.
#[test]
fn run_exports_meshes_at_the_quality_asked_for() {
let dir = Scratch::new();
let script = dir.0.join("cylinder.json");
std::fs::write(&script, json!({"commands": [{"command": "solid.cylinder", "params": {"diameter": 40, "height": 10}}]}).to_string()).unwrap();
let export = |name: &str, quality: Option<&str>| {
let stl = dir.0.join(name);
let mut command = cli();
command.arg("run").arg(&script).arg("--quiet").arg("--out").arg(&stl);
if let Some(q) = quality {
command.args(["--quality", q]);
}
let output = command.output().unwrap();
assert!(output.status.success(), "{quality:?}: {}", String::from_utf8_lossy(&output.stderr));
stl_triangles(&stl)
};
let default = export("default.stl", None);
let standard = export("standard.stl", Some("standard"));
let fine = export("fine.stl", Some("fine"));
let finest = export("finest.stl", Some("finest"));
assert_eq!(default, standard);
assert!(standard < fine && fine < finest, "standard {standard}, fine {fine}, finest {finest}");
}
#[test]
fn results_with_base_design_and_quiet_still_report_and_save() {
let dir = Scratch::new();
+1 -3
View File
@@ -22,12 +22,9 @@ profile = ["solidcraft-engine/profile"]
[dependencies]
solidcraft-engine = { workspace = true }
solidcraft-control = { workspace = true }
solidcraft-ui-egui = { workspace = true }
solidcraft-ui-text = { workspace = true }
egui = { workspace = true }
log = { workspace = true }
serde_json = { workspace = true }
url = "2"
percent-encoding = "2"
@@ -36,6 +33,7 @@ eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
serde_json = { workspace = true }
web-sys = { version = "0.3", features = [
"Window", "Document", "Element", "HtmlElement", "HtmlCanvasElement", "Location", "Navigator", "StorageManager",
"FileSystemHandle", "FileSystemDirectoryHandle", "FileSystemFileHandle", "FileSystemGetFileOptions", "FileSystemGetDirectoryOptions", "FileSystemWritableFileStream",
+1 -1
View File
@@ -9,7 +9,7 @@
<meta property="og:site_name" content="SolidCraft">
<meta property="og:title" content="SolidCraft: try it in your browser">
<meta property="og:description" content="Open-source parametric CAD built in Rust. Desktop, browser, and MCP for AI agents.">
<meta property="og:url" content="https://app.solidcraft.io/">
<meta property="og:url" content="https://solidcraft.ai/">
<meta property="og:image" content="https://docs.solidcraft.io/og.png">
<meta property="og:image:width" content="1280">
<meta property="og:image:height" content="640">
+1 -1
View File
@@ -6,7 +6,7 @@ use std::sync::mpsc::{Receiver, Sender, TryRecvError};
use std::time::Duration;
use serde_json::{Value, json};
use solidcraft_control::ControlRequest;
use solidcraft_ui_egui::ControlRequest;
use wasm_bindgen::{JsValue, closure::Closure};
const MAX_PENDING: usize = 256;
+1 -4
View File
@@ -553,7 +553,7 @@ mod web {
/// Open a design remembered from an earlier session (a recent one, after a reload): ask once
/// for access to the file (call in the click), read it into the engine's files and queue it
/// to open. A file that is gone is forgotten and dropped from the recent designs.
pub fn restore(files: &Rc<Files>, path: &str, on_opened: Option<Box<dyn FnOnce()>>) {
pub fn restore(files: &Rc<Files>, path: &str) {
let Some((id, name)) = parse(path) else { return };
let (files, path, id, name) = (files.clone(), path.to_string(), id.to_string(), name.to_string());
spawn_local(async move {
@@ -568,9 +568,6 @@ mod web {
files.opened.borrow_mut().push(path);
files.wake();
touch(&id).await;
if let Some(done) = on_opened {
done();
}
}
Err(e) => {
let gone = e.contains("NotFoundError") || e.contains("could not be found") || e.contains("no longer remembers");
+5 -175
View File
@@ -5,8 +5,7 @@
//! and go out as downloads (exports, and "Download design"). Where the File System Access API
//! exists a design also lives on the computer's disk, saved and opened through the browser's file
//! dialogs (`disk.rs`). An autosave of unsaved work is kept in OPFS and offered again after a
//! reload or a crash. With "keep unsaved work in this browser" on, each open design's unsaved
//! changes are kept there instead, one copy per design (`keep.rs`, #10220).
//! reload or a crash.
use std::cell::{Cell, RefCell};
use std::rc::Rc;
@@ -14,7 +13,7 @@ use std::rc::Rc;
use js_sys::{Array, Function, Object, Reflect, Uint8Array};
use solidcraft_engine::io::vfs;
use crate::{disk, keep};
use crate::disk;
use wasm_bindgen::{JsCast as _, JsValue, closure::Closure};
use wasm_bindgen_futures::{JsFuture, spawn_local};
use web_sys::{
@@ -80,16 +79,6 @@ pub struct Files {
pub recovery: RefCell<Option<(String, Option<String>)>>,
/// The app's context, to wake it when a browser call finishes.
pub ctx: RefCell<Option<egui::Context>>,
/// This page's id: the copies it keeps are named after it (`keep::entry_id`).
pub keep_page: RefCell<String>,
/// Kept copies stored by this page, and the design revision each holds once its write ended.
pub kept: RefCell<std::collections::HashMap<String, Option<u64>>>,
/// Kept copies being written or removed now (one browser call at a time per copy).
pub keeping: RefCell<std::collections::HashSet<String>>,
/// When (ms) the last write of a copy failed, to wait before trying again (`keep::may_write`).
pub kept_failed: RefCell<std::collections::HashMap<String, f64>>,
/// Copies earlier pages left, newer than their design's last save: offered at start.
pub keep_offered: RefCell<Vec<keep::Entry>>,
}
impl Files {
@@ -299,9 +288,6 @@ pub fn start(files: &Rc<Files>) {
let _ = JsFuture::from(p).await;
});
}
let page = keep::page_id(js_sys::Date::now(), js_sys::Math::random());
hold_page_lock(&page);
*files.keep_page.borrow_mut() = page;
let files = files.clone();
spawn_local(async move {
match disk::known_ids().await {
@@ -314,7 +300,6 @@ pub fn start(files: &Rc<Files>) {
files.say("This page can't use the browser's file storage (it needs https or localhost): designs are kept in local storage, a few MB at most.", false);
}
let mut entries = Vec::new();
let kept = kept_copies(&all);
let has_recovery = all.iter().any(|(n, _, _)| n == RECOVERY);
let legacy = (!has_recovery).then(|| LEGACY_RECOVERY.into_iter().find(|l| all.iter().any(|(n, _, _)| n == l))).flatten();
for (name, bytes, modified) in all {
@@ -330,7 +315,7 @@ pub fn start(files: &Rc<Files>) {
*files.recovery.borrow_mut() = Some((n, meta["path"].as_str().map(str::to_string)));
continue;
}
if name != RECOVERY && keep::parse_name(&name).is_none() {
if name != RECOVERY {
entries.push(Entry { name: name.clone(), size: bytes.len() as u64, modified });
}
vfs::insert(&format!("{OPFS}{name}"), bytes);
@@ -341,7 +326,6 @@ pub fn start(files: &Rc<Files>) {
if !vfs::exists(&format!("{OPFS}{RECOVERY}")) {
*files.recovery.borrow_mut() = None;
}
sort_kept(&files, kept, &live_pages().await);
}
Err(e) => files.say(format!("browser storage: {e}"), true),
}
@@ -359,7 +343,7 @@ pub fn flush(files: &Rc<Files>) {
{
let mut e = files.entries.borrow_mut();
e.retain(|x| x.name != name);
if name != RECOVERY && name != RECOVERY_META && keep::parse_name(&name).is_none() {
if name != RECOVERY && name != RECOVERY_META {
e.push(Entry { name: name.clone(), size: bytes.len() as u64, modified: js_sys::Date::now() });
e.sort_by_key(|a| a.name.to_lowercase());
}
@@ -489,15 +473,7 @@ pub fn recovery_path() -> String {
/// A recovery file lives in OPFS, but its relative links belong to the original design's
/// folder (which can be on disk). Resolve them before Open sees the temporary file location.
pub fn prepare_recovery(original_path: Option<&str>) -> Result<String, String> {
prepare_copy(recovery_path(), original_path)
}
/// The same for a kept copy (#10220).
pub fn prepare_kept(id: &str, original_path: Option<&str>) -> Result<String, String> {
prepare_copy(format!("{OPFS}{}", keep::design_file(id)), original_path)
}
fn prepare_copy(path: String, original_path: Option<&str>) -> Result<String, String> {
let path = recovery_path();
let bytes = vfs::read(&path, solidcraft_engine::io::MAX_DESIGN_BYTES).map_err(|e| e.to_string())?;
let mut doc = solidcraft_engine::io::read_design(&bytes).map_err(|e| e.to_string())?;
solidcraft_engine::resolve_design_links(&mut doc, original_path);
@@ -670,149 +646,3 @@ pub fn take_drops(files: &Rc<Files>, raw: &mut egui::RawInput, theme: bool) {
});
}
}
/// Hold this page's browser lock while it runs, so other tabs know its kept copies are in use
/// (`keep.rs`). Browsers without the Web Locks API hold none; their copies are then offered by
/// any later page.
fn hold_page_lock(page: &str) {
let Some(locks) = web_locks() else { return };
let Ok(request) = Reflect::get(&locks, &"request".into()).and_then(|f| f.dyn_into::<Function>()) else { return };
// A promise that never settles: the lock is let go only when the page goes.
let hold = Closure::<dyn FnMut(JsValue) -> js_sys::Promise>::new(|_lock: JsValue| js_sys::Promise::new(&mut |_, _| {}));
let name = format!("{}{page}", keep::LOCK_PREFIX);
if let Err(e) = request.call2(&locks, &name.into(), hold.as_ref().unchecked_ref()) {
log::info!("keep: no page lock: {}", err(e));
}
// The callback lives as long as the page.
hold.forget();
}
fn web_locks() -> Option<JsValue> {
let nav = web_sys::window()?.navigator();
Reflect::get(&nav, &"locks".into()).ok().filter(|l| l.is_object())
}
/// The pages still open (in this browser profile) that hold their lock.
async fn live_pages() -> Vec<String> {
let query = async {
let locks = web_locks().ok_or("no Web Locks")?;
let f: Function = Reflect::get(&locks, &"query".into()).map_err(err)?.dyn_into().map_err(|_| "no query".to_string())?;
let p: js_sys::Promise = f.call0(&locks).map_err(err)?.dyn_into().map_err(|_| "no promise".to_string())?;
let state = JsFuture::from(p).await.map_err(err)?;
let held: Array = Reflect::get(&state, &"held".into()).map_err(err)?.dyn_into().map_err(|_| "no list".to_string())?;
Ok::<_, String>(
held.iter()
.take(10_000)
.filter_map(|l| Reflect::get(&l, &"name".into()).ok()?.as_string())
.filter_map(|n| n.strip_prefix(keep::LOCK_PREFIX).map(str::to_string))
.collect(),
)
};
query.await.unwrap_or_else(|e| {
log::info!("keep: open pages unknown ({e})");
Vec::new()
})
}
/// The kept copies among the stored files: (copy, when its design's file was last written), and
/// the ids of designs stored without their metadata.
struct Found {
copies: Vec<(keep::Entry, Option<f64>)>,
orphans: Vec<String>,
}
fn kept_copies(all: &[(String, Vec<u8>, f64)]) -> Found {
let modified = |path: &str| path.strip_prefix(OPFS).and_then(|n| all.iter().find(|(name, _, _)| name == n)).map(|(_, _, m)| *m);
let mut copies = Vec::new();
let mut designs = Vec::new();
for (name, bytes, _) in all {
match keep::parse_name(name) {
Some((id, keep::Part::Meta)) => {
if let Some(e) = keep::Entry::parse(id, bytes) {
let saved = e.path.as_deref().and_then(modified);
copies.push((e, saved));
}
}
Some((id, keep::Part::Design)) => designs.push(id.to_string()),
None => {}
}
}
// A copy is whole only with its design.
copies.retain(|(e, _)| designs.contains(&e.id));
let orphans = designs.into_iter().filter(|id| !copies.iter().any(|(e, _)| &e.id == id)).collect();
Found { copies, orphans }
}
/// Offer the copies earlier pages left that hold unsaved work, and remove those their design's
/// later save made stale (and parts without the rest), leaving open pages' copies alone.
fn sort_kept(files: &Rc<Files>, found: Found, live: &[String]) {
let mut offered = Vec::new();
let mut gone = Vec::new();
for (e, saved) in found.copies {
match keep::fate(&e, live, saved) {
keep::Fate::Offer => offered.push(e),
keep::Fate::Drop => gone.push(e.id),
keep::Fate::Leave => {}
}
}
gone.extend(found.orphans.into_iter().filter(|id| !keep::page_of(id).is_some_and(|p| live.iter().any(|l| l == p))));
keep::order_offered(&mut offered);
*files.keep_offered.borrow_mut() = offered;
for id in gone {
remove_kept(files, &id);
}
}
/// The path (in the engine's files) a kept copy opens from.
pub fn kept_path(id: &str) -> String {
format!("{OPFS}{}", keep::design_file(id))
}
/// Write the copy of a design with unsaved changes (`bytes`, described by `entry`) that holds
/// its revision `revision`. Its metadata goes last, so a copy is never offered half written.
pub fn write_kept(files: &Rc<Files>, entry: &keep::Entry, bytes: Vec<u8>, revision: u64) {
let id = entry.id.clone();
if !files.keeping.borrow_mut().insert(id.clone()) {
return;
}
files.kept.borrow_mut().entry(id.clone()).or_insert(None);
let meta = entry.to_json();
let files = files.clone();
spawn_local(async move {
let r = async {
write_file(&keep::design_file(&id), &bytes).await?;
write_file(&keep::meta_file(&id), meta.as_bytes()).await
};
match r.await {
Ok(()) => {
files.kept.borrow_mut().insert(id.clone(), Some(revision));
files.kept_failed.borrow_mut().remove(&id);
}
Err(e) => {
files.kept_failed.borrow_mut().insert(id.clone(), js_sys::Date::now());
files.say(format!("keeping unsaved work in this browser: {e}"), true)
}
}
files.keeping.borrow_mut().remove(&id);
files.wake();
});
}
/// Remove kept copy `id` (its design was saved, closed, discarded or restored).
pub fn remove_kept(files: &Rc<Files>, id: &str) {
let id = id.to_string();
if !files.keeping.borrow_mut().insert(id.clone()) {
return;
}
let _ = vfs::remove(&kept_path(&id));
files.kept_failed.borrow_mut().remove(&id);
let files = files.clone();
spawn_local(async move {
// The metadata first: what's left without it is never offered.
let _ = remove_file(&keep::meta_file(&id)).await;
let _ = remove_file(&keep::design_file(&id)).await;
files.kept.borrow_mut().remove(&id);
files.keeping.borrow_mut().remove(&id);
files.wake();
});
}
+2 -2
View File
@@ -23,9 +23,9 @@ fn prompt() {
let _ = js_sys::Reflect::set(&window, &OFFER.into(), &JsValue::NULL);
}
let shown = js_sys::Reflect::get(&offer, &"prompt".into())
.and_then(|f| f.dyn_into::<js_sys::Function>())
.and_then(|f| f.dyn_into::<js_sys::Function>().map_err(JsValue::from))
.and_then(|f| f.call0(&offer))
.and_then(|p| p.dyn_into::<js_sys::Promise>());
.and_then(|p| p.dyn_into::<js_sys::Promise>().map_err(JsValue::from));
match shown {
// Accepted or dismissed, the browser handles it; a refusal is only logged.
Ok(p) => wasm_bindgen_futures::spawn_local(async move {
-403
View File
@@ -1,403 +0,0 @@
//! Keep unsaved work in this browser (#10220): the decisions, in plain Rust (tested natively).
//!
//! With Preferences › General › "Keep unsaved work in this browser instead of asking when the tab
//! closes" on, each open design with unsaved changes has a copy in the browser's private storage:
//! `keep-<id>.sc` (the design) and `keep-<id>.json` (its name, its file and when it last
//! changed). The copy is written shortly after each change ([`due`]) and again when the page is
//! hidden, so it is already current when the tab closes; the page then doesn't ask through the
//! browser's "leave site?" box ([`asks_before_unload`]). A design that is saved, closed or
//! discarded has its copy removed. The next visit offers the copies newer than their design's
//! last save ([`fate`]) in SolidCraft's own window, answered with [`plan`].
//!
//! An id is `<page>-<n>`: the page that wrote it (each page load has its own) and the design's
//! number in that page. A page holds a browser lock named after it while it runs, so another tab
//! never offers, or removes, the copies of a page that is still open.
#![cfg_attr(not(target_arch = "wasm32"), allow(dead_code))]
use serde_json::{Value, json};
/// The start of every kept file's name.
pub const PREFIX: &str = "keep-";
/// The browser lock a page holds while it runs: this, then its page id.
pub const LOCK_PREFIX: &str = "solidcraft.keep.";
/// A copy is written once the design has been still this long (ms)…
pub const QUIET_MS: f64 = 800.0;
/// …or at the latest this long after the first change it doesn't hold yet (ms).
pub const MAX_WAIT_MS: f64 = 4000.0;
/// The most copies offered at once (the rest wait for the next visit).
pub const MAX_OFFERED: usize = 32;
const MAX_ID: usize = 64;
const MAX_NAME: usize = 256;
const MAX_PATH: usize = 4096;
/// Copies' metadata is small: a damaged or hostile one is not read.
pub const MAX_META_BYTES: usize = 64 * 1024;
/// Ids are short and safe in a file name: ASCII letters, digits and dashes, with a page part.
pub fn valid_id(id: &str) -> bool {
!id.is_empty() && id.len() <= MAX_ID && id.chars().all(|c| c.is_ascii_alphanumeric() || c == '-') && page_of(id).is_some()
}
/// The page that wrote copy `id`.
pub fn page_of(id: &str) -> Option<&str> {
id.rsplit_once('-').map(|(page, _)| page).filter(|p| !p.is_empty())
}
/// This page's id, from the time it started (ms since 1970) and a random number in 0..1:
/// letters and digits only.
pub fn page_id(now_ms: f64, random: f64) -> String {
let now = if now_ms.is_finite() && now_ms > 0.0 { now_ms.min(1e15) as u64 } else { 0 };
let random = if random.is_finite() { (random.clamp(0.0, 1.0) * f64::from(0xff_ffff)) as u64 } else { 0 };
format!("{now:x}{random:06x}")
}
/// The copy of design `uid` (`Session::uid`) open in page `page`.
pub fn entry_id(page: &str, uid: u64) -> String {
format!("{page}-{uid}")
}
/// The stored file names of copy `id`: its design and its metadata.
pub fn design_file(id: &str) -> String {
format!("{PREFIX}{id}.{}", solidcraft_engine::io::DESIGN_EXT)
}
pub fn meta_file(id: &str) -> String {
format!("{PREFIX}{id}.json")
}
/// Which part of a copy a stored file is.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Part {
Design,
Meta,
}
/// A stored file's copy id and part; `None` for every other file.
pub fn parse_name(name: &str) -> Option<(&str, Part)> {
let rest = name.strip_prefix(PREFIX)?;
let (id, part) = if let Some(id) = rest.strip_suffix(".json") {
(id, Part::Meta)
} else {
(rest.strip_suffix(solidcraft_engine::io::DESIGN_EXT)?.strip_suffix('.')?, Part::Design)
};
valid_id(id).then_some((id, part))
}
/// A kept copy, as its metadata describes it.
#[derive(Clone, Debug, PartialEq)]
pub struct Entry {
pub id: String,
/// The design's name.
pub name: String,
/// Its file (`None`: never saved).
pub path: Option<String>,
/// When the design last changed (ms since 1970).
pub changed_at: f64,
}
impl Entry {
pub fn to_json(&self) -> String {
json!({"name": self.name, "path": self.path, "changed_at": self.changed_at}).to_string()
}
/// Read copy `id`'s metadata. Anything malformed, oversized or not finite is no copy.
pub fn parse(id: &str, bytes: &[u8]) -> Option<Entry> {
if !valid_id(id) || bytes.len() > MAX_META_BYTES {
return None;
}
let v: Value = serde_json::from_slice(bytes).ok()?;
let name = v.get("name")?.as_str()?.chars().take(MAX_NAME).collect::<String>();
let path = match v.get("path") {
None | Some(Value::Null) => None,
Some(p) => Some(p.as_str().filter(|p| !p.is_empty() && p.len() <= MAX_PATH)?.to_string()),
};
let changed_at = v.get("changed_at")?.as_f64().filter(|t| t.is_finite() && *t >= 0.0)?;
Some(Entry { id: id.to_string(), name, path, changed_at })
}
}
/// Whether a copy that last changed at `changed_at` holds work its design's file doesn't:
/// the file was last written at `saved_at` (ms since 1970; `None` or unknown: never saved, or
/// the time can't be read, so the copy is kept rather than lost).
pub fn newer_than_save(changed_at: f64, saved_at: Option<f64>) -> bool {
match saved_at {
Some(saved) if saved.is_finite() && saved > 0.0 => changed_at > saved,
_ => true,
}
}
/// What the next visit does with a copy it finds.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Fate {
/// Offer it: "Restore unsaved design…?".
Offer,
/// Its design was saved after it: remove it without asking.
Drop,
/// Its page is still open (another tab): leave it alone.
Leave,
}
/// The copy `entry`, whose design's file was last written at `saved_at`, while the pages
/// `live` are open.
pub fn fate(entry: &Entry, live: &[String], saved_at: Option<f64>) -> Fate {
if page_of(&entry.id).is_some_and(|p| live.iter().any(|l| l == p)) {
Fate::Leave
} else if newer_than_save(entry.changed_at, saved_at) {
Fate::Offer
} else {
Fate::Drop
}
}
/// Copies to offer first: the most recently changed, at most [`MAX_OFFERED`].
pub fn order_offered(entries: &mut Vec<Entry>) {
entries.sort_by(|a, b| b.changed_at.total_cmp(&a.changed_at).then_with(|| a.id.cmp(&b.id)));
entries.truncate(MAX_OFFERED);
}
/// Whether a design's copy is due to be written at `now`: the design last changed at
/// `last_change`, and the copy has lacked a change since `first_unwritten` (all ms).
pub fn due(now: f64, first_unwritten: f64, last_change: f64) -> bool {
now - last_change >= QUIET_MS || now - first_unwritten >= MAX_WAIT_MS
}
/// How long after a failed write of a design's copy it isn't tried again (ms).
pub const RETRY_MS: f64 = 30_000.0;
/// Whether a copy whose write last failed at `failed_at` (ms; `None`: it hasn't) may be written
/// at `now`: not before [`RETRY_MS`] has passed, so a full or denied store isn't hit every tick.
pub fn may_write(now: f64, failed_at: Option<f64>) -> bool {
failed_at.is_none_or(|t| !(now >= t) || now - t >= RETRY_MS)
}
/// Whether `wanted` is the design now open, given the open design's path.
pub fn is_open(open: Option<&str>, wanted: &str) -> bool {
open == Some(wanted)
}
/// What follows once a design restored from a kept copy, or recovered, is open: it opens in
/// stages, a few features a frame with progress and Cancel (#10198), so this waits for the answer.
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum AfterOpen {
/// A kept copy (#10220): it is its own design again (saving goes to `path`, it is named
/// `name`), with its changes unsaved; then the copy `id` goes when `drop` says so.
KeptCopy { opened: String, id: String, path: Option<String>, name: String, drop: bool },
/// The saved design offered beside a kept copy: the copy `id` goes when `drop` says so.
KeptSaved { opened: String, id: String, drop: bool },
/// Unsaved work from the page's last visit: it belongs to `path` again, named `name`, unsaved.
Recovery { opened: String, path: Option<String>, name: String },
}
impl AfterOpen {
/// The file the open reads.
pub fn opened(&self) -> &str {
match self {
AfterOpen::KeptCopy { opened, .. } | AfterOpen::KeptSaved { opened, .. } | AfterOpen::Recovery { opened, .. } => opened,
}
}
}
/// Whether the open of `wanted` answered with `reply` put it in: the answer says so, and it is
/// the design now open (`open`: the open design's path). A refusal, a Cancel or another file
/// leaves the copy or the recovered work offered.
pub fn opened(reply: &Value, open: Option<&str>, wanted: &str) -> bool {
reply["ok"].as_bool() == Some(true) && is_open(open, wanted)
}
/// Whether leaving the page asks through the browser's "leave site?" box: there is unsaved work,
/// and either the user still wants to be asked or it isn't all kept in the browser yet (with the
/// keep preference off it never is, so there the box always stays).
pub fn asks_before_unload(persists: bool, keep: bool, also_ask: bool, any_unsaved: bool, all_kept: bool) -> bool {
persists && any_unsaved && (also_ask || !(keep && all_kept))
}
/// An answer in the "Restore unsaved design?" window.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Answer {
/// Open the copy, with its unsaved changes, as the design it was (saving goes to its file).
Restore,
/// Open the design's file as last saved; the copy goes.
OpenSaved,
/// The copy goes.
Discard,
}
/// What an answer does.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Plan {
/// Open the copy (and, once it is open, give it back its name and file).
pub open_copy: bool,
/// Open this saved file.
pub open_saved: Option<String>,
/// Remove the copy.
pub drop_copy: bool,
}
/// What `answer` does to copy `entry`; `saved_exists`: its file can still be opened. `None`: the
/// answer isn't offered for it (Open saved version of a design never saved, or gone).
pub fn plan(answer: Answer, entry: &Entry, saved_exists: bool) -> Option<Plan> {
match answer {
Answer::Restore => Some(Plan { open_copy: true, open_saved: None, drop_copy: true }),
Answer::OpenSaved => {
let path = entry.path.clone().filter(|_| saved_exists)?;
Some(Plan { open_copy: false, open_saved: Some(path), drop_copy: true })
}
Answer::Discard => Some(Plan { open_copy: false, open_saved: None, drop_copy: true }),
}
}
/// The answers the window offers for `entry`, in order.
pub fn answers(entry: &Entry, saved_exists: bool) -> Vec<Answer> {
[Answer::Restore, Answer::OpenSaved, Answer::Discard].into_iter().filter(|a| plan(*a, entry, saved_exists).is_some()).collect()
}
#[cfg(test)]
mod tests {
use super::*;
/// A restored or recovered design opens in stages (#10198): only an answer that it is in, for
/// the file asked for, counts; a refusal, a Cancel or another design open leaves it offered.
#[test]
fn a_staged_restore_counts_only_when_its_file_is_in() {
let copy = "/opfs/.kept/a.sc";
assert!(opened(&json!({"ok": true}), Some(copy), copy));
assert!(!opened(&json!({"ok": false, "error": "cancelled"}), Some(copy), copy));
assert!(!opened(&json!({"ok": false, "error": "not a design"}), None, copy));
assert!(!opened(&json!({"ok": true}), Some("/opfs/other.sc"), copy));
assert!(!opened(&json!({}), Some(copy), copy));
let after = AfterOpen::KeptCopy { opened: copy.into(), id: "a".into(), path: None, name: "Bracket".into(), drop: true };
assert_eq!(after.opened(), copy);
}
fn entry(id: &str, changed_at: f64, path: Option<&str>) -> Entry {
Entry { id: id.into(), name: "Bracket".into(), path: path.map(str::to_string), changed_at }
}
#[test]
fn a_failed_write_waits_before_the_next_try() {
assert!(may_write(1000.0, None));
assert!(!may_write(1000.0 + RETRY_MS - 1.0, Some(1000.0)));
assert!(may_write(1000.0 + RETRY_MS, Some(1000.0)));
// A clock that went back doesn't block for good.
assert!(may_write(10.0, Some(1000.0)));
}
#[test]
fn a_design_counts_as_opened_only_at_its_own_path() {
assert!(is_open(Some("a.sc"), "a.sc"));
assert!(!is_open(Some("b.sc"), "a.sc"));
assert!(!is_open(None, "a.sc"));
}
#[test]
fn copies_are_named_by_page_and_design_and_nothing_else_reads_as_one() {
let page = page_id(1_700_000_000_000.0, 0.5);
assert!(page.chars().all(|c| c.is_ascii_hexdigit()));
let id = entry_id(&page, 7);
assert!(valid_id(&id));
assert_eq!(page_of(&id), Some(page.as_str()));
assert_eq!(parse_name(&design_file(&id)), Some((id.as_str(), Part::Design)));
assert_eq!(parse_name(&meta_file(&id)), Some((id.as_str(), Part::Meta)));
for other in ["part.sc", "recovery.sc", "recovery.json", "keep-.sc", "keep-x.sc", "keep-a/b-1.sc", "keep-a-1.step", "keep-a-1sc"] {
assert_eq!(parse_name(other), None, "{other}");
}
// Hostile clocks still give a usable id.
for (now, random) in [(f64::NAN, f64::NAN), (f64::INFINITY, -1.0), (-5.0, 9.0)] {
assert!(valid_id(&entry_id(&page_id(now, random), 1)));
}
}
#[test]
fn metadata_round_trips_and_hostile_metadata_is_no_copy() {
let e = entry("a1-3", 1234.0, Some("/opfs/Bracket.sc"));
assert_eq!(Entry::parse("a1-3", e.to_json().as_bytes()), Some(e.clone()));
let never_saved = entry("a1-4", 99.0, None);
assert_eq!(Entry::parse("a1-4", never_saved.to_json().as_bytes()), Some(never_saved));
for bad in [
"",
"[]",
r#"{"name":"x","changed_at":"soon"}"#,
r#"{"name":"x","changed_at":-1}"#,
r#"{"name":"x","changed_at":1e999}"#,
r#"{"name":"x","path":7,"changed_at":1}"#,
r#"{"name":"x","path":"","changed_at":1}"#,
r#"{"changed_at":1}"#,
] {
assert_eq!(Entry::parse("a1-3", bad.as_bytes()), None, "{bad}");
}
assert_eq!(Entry::parse("../x", e.to_json().as_bytes()), None);
assert_eq!(Entry::parse("a1-3", &vec![b' '; MAX_META_BYTES + 1]), None);
let long = json!({"name": "n".repeat(10_000), "changed_at": 1}).to_string();
assert_eq!(Entry::parse("a1-3", long.as_bytes()).map(|e| e.name.len()), Some(MAX_NAME));
}
#[test]
fn a_copy_newer_than_the_last_save_is_offered_an_older_one_dropped_an_open_pages_left() {
let e = entry("p1-1", 2000.0, Some("/opfs/Bracket.sc"));
// Changed after the file was last written: offered.
assert_eq!(fate(&e, &[], Some(1000.0)), Fate::Offer);
// Saved since (in this tab or another): nothing to offer.
assert_eq!(fate(&e, &[], Some(2000.0)), Fate::Drop);
assert_eq!(fate(&e, &[], Some(3000.0)), Fate::Drop);
// Never saved, or the save time can't be read: kept rather than lost.
for saved in [None, Some(0.0), Some(f64::NAN), Some(f64::INFINITY), Some(-4.0)] {
assert_eq!(fate(&e, &[], saved), Fate::Offer, "{saved:?}");
}
// Its page is still open in another tab: neither offered nor removed.
assert_eq!(fate(&e, &["p1".into()], Some(1000.0)), Fate::Leave);
assert_eq!(fate(&e, &["p1".into()], Some(3000.0)), Fate::Leave);
assert_eq!(fate(&e, &["p2".into()], Some(1000.0)), Fate::Offer);
}
#[test]
fn the_newest_copies_are_offered_first_and_at_most_a_windowful() {
let mut list: Vec<Entry> = (0..40).map(|i| entry(&format!("p-{i}"), f64::from(i), None)).collect();
order_offered(&mut list);
assert_eq!(list.len(), MAX_OFFERED);
assert_eq!(list.first().map(|e| e.id.as_str()), Some("p-39"));
}
#[test]
fn a_copy_is_written_once_the_design_is_still_or_after_the_longest_wait() {
// Still changing, not waited long: not yet.
assert!(!due(1000.0, 900.0, 900.0));
// Still for QUIET_MS: due.
assert!(due(900.0 + QUIET_MS, 900.0, 900.0));
// Changing all the time: due after MAX_WAIT_MS anyway.
assert!(!due(5000.0, 2000.0, 4900.0));
assert!(due(2000.0 + MAX_WAIT_MS, 2000.0, 2000.0 + MAX_WAIT_MS - 1.0));
}
#[test]
fn the_browser_asks_before_unload_unless_told_not_to_and_every_copy_is_current() {
// Keeping off: exactly as before, unsaved work asks, whatever the second option says.
assert!(asks_before_unload(true, false, true, true, true));
assert!(asks_before_unload(true, false, true, true, false));
assert!(asks_before_unload(true, false, false, true, true));
// Keeping on, asking on (the default): both, the box and the copy.
assert!(asks_before_unload(true, true, true, true, true));
// Keeping on, asking off, every unsaved design kept: no browser box.
assert!(!asks_before_unload(true, true, false, true, true));
// Keeping on, asking off, a copy still being written (or failed): the browser still asks.
assert!(asks_before_unload(true, true, false, true, false));
// Nothing unsaved, or an embedded page that keeps nothing: never.
assert!(!asks_before_unload(true, true, true, false, false));
assert!(!asks_before_unload(true, false, true, false, false));
assert!(!asks_before_unload(false, false, true, true, false));
}
#[test]
fn restore_open_saved_and_discard_each_do_one_thing_and_always_remove_the_copy() {
let saved = entry("p-1", 5.0, Some("/opfs/Bracket.sc"));
assert_eq!(plan(Answer::Restore, &saved, true), Some(Plan { open_copy: true, open_saved: None, drop_copy: true }));
assert_eq!(
plan(Answer::OpenSaved, &saved, true),
Some(Plan { open_copy: false, open_saved: Some("/opfs/Bracket.sc".into()), drop_copy: true })
);
assert_eq!(plan(Answer::Discard, &saved, true), Some(Plan { open_copy: false, open_saved: None, drop_copy: true }));
assert_eq!(answers(&saved, true), [Answer::Restore, Answer::OpenSaved, Answer::Discard]);
// A design never saved, or whose file is gone, has no saved version to open.
let never = entry("p-2", 5.0, None);
assert_eq!(plan(Answer::OpenSaved, &never, true), None);
assert_eq!(plan(Answer::OpenSaved, &saved, false), None);
assert_eq!(answers(&never, false), [Answer::Restore, Answer::Discard]);
}
}
+4 -4
View File
@@ -48,15 +48,15 @@ impl Download {
}
if solidcraft_ui_egui::documents::any_dirty(app) {
let mut answer = None;
let closed = ui_kit::Window::new(egui::Id::unique("open_link"), "status_warning", solidcraft_ui_text::tr("web.open_link"))
let closed = ui_kit::Window::new(egui::Id::new("open_link"), "status_warning", solidcraft_ui_egui::i18n::tr("web.open_link"))
.required()
.show_body(ctx, |ui| {
ui.label(solidcraft_ui_text::tr("web.open_link_confirm"));
ui.label(solidcraft_ui_egui::i18n::tr("web.open_link_confirm"));
ui.horizontal(|ui| {
if ui_kit::button(ui, solidcraft_ui_text::tr("ui.open"), ui_kit::Button::Normal).clicked() {
if ui_kit::button(ui, solidcraft_ui_egui::i18n::tr("ui.open"), ui_kit::Button::Normal).clicked() {
answer = Some(true);
}
if ui_kit::button(ui, solidcraft_ui_text::tr("ui.cancel"), ui_kit::Button::Normal).clicked() {
if ui_kit::button(ui, solidcraft_ui_egui::i18n::tr("ui.cancel"), ui_kit::Button::Normal).clicked() {
answer = Some(false);
}
});
+33 -367
View File
@@ -19,8 +19,6 @@ mod easyprint;
mod files;
#[cfg(target_arch = "wasm32")]
mod install;
#[cfg(any(target_arch = "wasm32", test))]
mod keep;
#[cfg(target_arch = "wasm32")]
mod linked;
#[cfg(any(target_arch = "wasm32", test))]
@@ -186,7 +184,6 @@ mod web {
use crate::api::Api;
use crate::disk::{self, SaveTarget};
use crate::files::{self, Files, Intent};
use crate::keep;
use crate::space_mouse::SpaceMouse;
const CANVAS_ID: &str = "solidcraft_canvas";
@@ -246,9 +243,7 @@ mod web {
}
/// The browser's "leave site? changes you made may not be saved" prompt while a design has
/// unsaved changes (the page can't show its own dialog when it is being closed). With "keep
/// unsaved work in this browser" on and "still ask" off, there is nothing to ask once every
/// unsaved design's copy is current (`keep::asks_before_unload`, #10220).
/// unsaved changes (the page can't show its own dialog when it is being closed).
fn ask_before_unload(window: &web_sys::Window) {
let on_unload = wasm_bindgen::closure::Closure::<dyn FnMut(web_sys::BeforeUnloadEvent)>::new(|e: web_sys::BeforeUnloadEvent| {
if UNSAVED.with(std::cell::Cell::get) {
@@ -261,50 +256,6 @@ mod web {
on_unload.forget();
}
/// With "keep unsaved work in this browser" on, the page brings every unsaved design's copy up
/// to date when it is hidden or goes (`pagehide`, `visibilitychange`): the browser may not
/// wait for that write, so the copies are written shortly after each change as well
/// (`Shell::keep_tick`, #10220).
fn keep_when_hidden(window: &web_sys::Window, runner: &eframe::WebRunner) {
let keep_now = {
let runner = runner.clone();
move || {
if let Some(mut shell) = runner.app_mut::<Shell>() {
shell.keep_tick(None, true);
}
}
};
let on_hide = {
let keep_now = keep_now.clone();
wasm_bindgen::closure::Closure::<dyn FnMut(web_sys::Event)>::new(move |_: web_sys::Event| keep_now())
};
let on_visibility = wasm_bindgen::closure::Closure::<dyn FnMut(web_sys::Event)>::new(move |_: web_sys::Event| {
let hidden = web_sys::window()
.and_then(|w| w.document())
.and_then(|d| js_sys::Reflect::get(&d, &"visibilityState".into()).ok())
.and_then(|v| v.as_string())
.is_some_and(|v| v == "hidden");
if hidden {
keep_now();
}
});
let _ = window.add_event_listener_with_callback("pagehide", on_hide.as_ref().unchecked_ref());
if let Some(document) = window.document() {
let _ = document.add_event_listener_with_callback("visibilitychange", on_visibility.as_ref().unchecked_ref());
}
// The listeners live as long as the page.
on_hide.forget();
on_visibility.forget();
}
/// One open design followed for its kept copy: its revision, when that last changed, and since
/// when its copy has lacked a change (`None`: current, or being written).
struct Track {
revision: u64,
last_change: f64,
first_unwritten: Option<f64>,
}
/// eframe cancels the browser's action for every Tab it gets, so the browser couldn't switch
/// tabs while the app has the keyboard. Its tab-switching keys stop here, on the way down to
/// the canvas, before eframe sees them; the browser then acts on them as usual.
@@ -376,47 +327,20 @@ mod web {
wheel_gestures: solidcraft_ui_egui::WebWheelGestures,
/// The settings this tab wrote or loaded last, and those another tab wrote since (#8644).
prefs_writer: crate::PrefsWriter,
prefs_warning: Option<String>,
other_tab_prefs: PrefsInbox,
/// The open designs followed for their kept copy, by `Session::uid` (#10220).
keep_track: std::collections::HashMap<u64, Track>,
/// Every unsaved design's kept copy is current (and the preference is on).
all_kept: bool,
/// A kept copy or recovered work being opened, in stages with progress and Cancel
/// (#10198): the answer to come and what follows it ([`Shell::restored`]).
restoring: Option<(std::sync::mpsc::Receiver<serde_json::Value>, keep::AfterOpen)>,
}
impl Shell {
/// The settings as they are kept between visits: with the user's own language, not a
/// session-only English fallback.
fn persisted_prefs(&mut self, previous: impl FnOnce() -> Result<Option<String>, String>) -> Option<String> {
fn persisted_prefs(&mut self) -> String {
let saved = self.font.persisted_language(&self.app.preferences.language).to_owned();
let live = std::mem::replace(&mut self.app.preferences.language, saved);
let (prefs, warning) = match self.app.try_prefs() {
Ok(prefs) => (Some(prefs), None),
Err(reason) => match previous().and_then(|previous| self.app.prefs_with_stored_panel_layout(previous.as_deref())) {
Ok(prefs) => (Some(prefs), Some(format!("Panel layout changes were not saved: {reason}"))),
Err(error) => (None, Some(format!("Settings were not written: {error}; panel layout: {reason}"))),
},
};
if self.prefs_warning != warning {
if let Some(warning) = &warning {
log::warn!("{warning}");
}
self.prefs_warning = warning;
}
let prefs = self.app.prefs();
self.app.preferences.language = live;
prefs
}
fn stored_prefs() -> Result<Option<String>, String> {
let storage = web_sys::window()
.and_then(|window| window.local_storage().ok().flatten())
.ok_or_else(|| "browser settings storage is unavailable".to_owned())?;
storage.get_item(&crate::prefs_key()).map_err(|_| "browser settings could not be read".to_owned())
}
/// A settings change goes to the browser's storage in the frame it is made, and from
/// there to the other open tabs (#8644). Input is what changes settings, so a frame
/// without any is skipped; eframe's own save still catches anything else.
@@ -424,7 +348,7 @@ mod web {
if !self.launch.persists() || ctx.input(|i| i.events.is_empty()) {
return;
}
let Some(prefs) = self.persisted_prefs(Self::stored_prefs) else { return };
let prefs = self.persisted_prefs();
let Some(prefs) = self.prefs_writer.take(prefs) else { return };
let stored = web_sys::window().and_then(|w| w.local_storage().ok().flatten()).map(|s| s.set_item(&crate::prefs_key(), &prefs));
if !matches!(stored, Some(Ok(()))) {
@@ -438,9 +362,8 @@ mod web {
fn load_other_tabs_prefs(&mut self) {
let Some(prefs) = self.other_tab_prefs.take() else { return };
self.app.load_prefs(&prefs);
if let Some(held) = self.persisted_prefs(Self::stored_prefs) {
self.prefs_writer.loaded(held);
}
let held = self.persisted_prefs();
self.prefs_writer.loaded(held);
}
/// Files from the computer, writes to store, messages and the autosave.
@@ -519,14 +442,8 @@ mod web {
self.sync_recents();
}
let now = ctx.input(|i| i.time);
// With "keep unsaved work in this browser" on, each design's own copy takes over from
// the single autosave (#10220).
if self.app.preferences.keep_unsaved_in_browser && self.autosaved.is_some() {
files::autosave(&self.files, None);
self.autosaved = None;
}
// Unsaved work is kept (at most every AUTOSAVE_S); saved work needs no autosave.
if self.files.ready.get() && self.files.recovery.borrow().is_none() && !self.app.preferences.keep_unsaved_in_browser {
if self.files.ready.get() && self.files.recovery.borrow().is_none() {
let s = &self.app.session;
let changed = s.is_dirty() && self.autosaved != Some(s.revision);
let wait = AUTOSAVE_S - (now - self.autosaved_at);
@@ -545,226 +462,6 @@ mod web {
if !self.files.ready.get() || !self.files.incoming.borrow().is_empty() {
ctx.request_repaint_after(std::time::Duration::from_millis(100));
}
self.all_kept = self.keep_tick(Some(ctx), false);
}
/// Keep each open design's unsaved changes in the browser, when the preference asks for
/// it: a design's copy is written once it has been still a moment (`keep::due`), or at
/// once with `now` (the page is being hidden); a copy whose design is saved or closed, or
/// with the preference off, goes. Answers whether every unsaved design's copy is current.
fn keep_tick(&mut self, ctx: Option<&egui::Context>, now: bool) -> bool {
if !self.launch.persists() || !self.files.ready.get() {
return false;
}
let Shell { app, files, keep_track, .. } = self;
let on = app.preferences.keep_unsaved_in_browser;
let time = js_sys::Date::now();
let page = files.keep_page.borrow().clone();
let mut wanted = std::collections::HashSet::new();
let mut all_kept = true;
let mut wake: Option<f64> = None;
let mut error = None;
let mut soon = |ms: f64| wake = Some(wake.map_or(ms, |w: f64| w.min(ms)));
if on {
for s in solidcraft_ui_egui::documents::open_sessions(app).into_iter().filter(|s| s.is_dirty()) {
let id = keep::entry_id(&page, s.uid);
wanted.insert(s.uid);
let t = keep_track.entry(s.uid).or_insert(Track { revision: s.revision, last_change: time, first_unwritten: None });
if t.revision != s.revision {
t.revision = s.revision;
t.last_change = time;
}
if files.kept.borrow().get(&id).copied().flatten() == Some(s.revision) {
t.first_unwritten = None;
continue;
}
all_kept = false;
if files.keeping.borrow().contains(&id) {
soon(100.0);
continue;
}
let first = *t.first_unwritten.get_or_insert(time);
let failed = files.kept_failed.borrow().get(&id).copied();
if !keep::may_write(time, failed) {
// The last write failed: try again after a while.
soon(keep::RETRY_MS);
continue;
}
if now || keep::due(time, first, t.last_change) {
match solidcraft_engine::io::write_design_container(&s.design()) {
Ok(bytes) => {
let entry = keep::Entry { id, name: s.doc.name.clone(), path: s.path.clone(), changed_at: t.last_change };
files::write_kept(files, &entry, bytes, s.revision);
t.first_unwritten = None;
}
Err(e) => {
files.kept_failed.borrow_mut().insert(id, time);
error = Some(format!("keeping unsaved work in this browser: {e}"));
}
}
soon(100.0);
} else {
soon((keep::QUIET_MS - (time - t.last_change)).min(keep::MAX_WAIT_MS - (time - first)).max(16.0));
}
}
}
// This page's copies no design needs any more: saved, closed, or the preference off.
let stale: Vec<String> = files
.kept
.borrow()
.keys()
.filter(|id| keep::page_of(id) == Some(page.as_str()))
.filter(|id| !wanted.iter().any(|uid| keep::entry_id(&page, *uid) == **id))
.cloned()
.collect();
for id in stale {
files::remove_kept(files, &id);
soon(100.0);
}
keep_track.retain(|uid, _| wanted.contains(uid));
if let Some(e) = error {
app.set_status(e, true);
}
if let (Some(ctx), Some(ms)) = (ctx, wake) {
ctx.request_repaint_after(std::time::Duration::from_secs_f64(ms / 1000.0));
}
on && all_kept
}
/// Offer the copies an earlier visit kept (#10220): "Restore unsaved design: <name>,
/// changed <time>?", one window for all of them, each with Restore, Open saved version
/// (when it has a file) and Discard.
fn keep_prompt(&mut self, ctx: &egui::Context) {
let offered = self.files.keep_offered.borrow().clone();
if offered.is_empty() || !self.files.ready.get() || self.restoring.is_some() {
return;
}
let now = (js_sys::Date::now() / 1000.0) as u64;
let rows: Vec<_> = offered
.iter()
.map(|e| solidcraft_ui_egui::recovery_ui::BrowserCopy {
name: &e.name,
when: solidcraft_ui_egui::recovery_ui::ago_between(now, (e.changed_at / 1000.0) as u64),
open_saved: keep::answers(e, self.saved_exists(e)).contains(&keep::Answer::OpenSaved),
})
.collect();
let act = solidcraft_ui_egui::recovery_ui::browser_copies_window(ctx, &self.app.preferences.language, &rows);
let Some((index, answer)) = act else { return };
let Some(entry) = offered.get(index) else { return };
let answer = match answer {
solidcraft_ui_egui::recovery_ui::CopyAnswer::Restore => keep::Answer::Restore,
solidcraft_ui_egui::recovery_ui::CopyAnswer::OpenSaved => keep::Answer::OpenSaved,
solidcraft_ui_egui::recovery_ui::CopyAnswer::Discard => keep::Answer::Discard,
};
self.keep_answer(entry, answer);
}
/// Whether a kept copy's design file can still be opened: in the browser's storage, or a
/// file on the computer this browser remembers.
fn saved_exists(&self, e: &keep::Entry) -> bool {
e.path.as_deref().is_some_and(|p| vfs::exists(p) || disk::parse(p).is_some_and(|(id, _)| self.files.disk_known.borrow().contains(id)))
}
/// Act on an answer in the "Restore unsaved design?" window (`keep::plan`).
fn keep_answer(&mut self, entry: &keep::Entry, answer: keep::Answer) {
let Some(plan) = keep::plan(answer, entry, self.saved_exists(entry)) else { return };
if plan.open_copy {
let copy = match files::prepare_kept(&entry.id, entry.path.as_deref()) {
Ok(copy) => copy,
Err(error) => {
self.app.set_status(error, true);
return;
}
};
// Finished in `restored` once it is in.
let after = keep::AfterOpen::KeptCopy {
opened: copy.clone(),
id: entry.id.clone(),
path: entry.path.clone(),
name: entry.name.clone(),
drop: plan.drop_copy,
};
self.restore(&copy, after);
return;
}
if let Some(path) = &plan.open_saved {
if vfs::exists(path) {
self.restore(path, keep::AfterOpen::KeptSaved { opened: path.clone(), id: entry.id.clone(), drop: plan.drop_copy });
return;
} else {
// A file on the computer: the browser asks for access again, in this click.
// The copy goes once the file has opened, not before: if access is refused,
// the picker is dismissed or the file is gone, it stays offered.
let (files, id) = (self.files.clone(), entry.id.clone());
disk::restore(
&self.files,
path,
Some(Box::new(move || {
files.keep_offered.borrow_mut().retain(|e| e.id != id);
files::remove_kept(&files, &id);
})),
);
return;
}
}
if plan.drop_copy {
self.drop_kept(&entry.id);
}
}
fn drop_kept(&self, id: &str) {
self.files.keep_offered.borrow_mut().retain(|e| e.id != id);
files::remove_kept(&self.files, id);
}
/// Open a kept copy, its saved design or recovered work as any design opens, a few
/// features a frame with progress and Cancel (#10198), so a large design doesn't freeze the
/// page; `after` follows once it is in ([`Self::restored`]).
fn restore(&mut self, path: &str, after: keep::AfterOpen) {
self.restoring = Some((self.app.open_path_answered(path), after));
self.restored();
}
/// What follows a restore that is in: the design gets back its file and name, and the
/// copy or the recovered work it came from goes. One that didn't open (refused or
/// cancelled; the status says why) stays offered.
fn restored(&mut self) {
let Some((rx, _)) = &self.restoring else { return };
let reply = match rx.try_recv() {
Ok(reply) => reply,
Err(std::sync::mpsc::TryRecvError::Empty) => return,
Err(std::sync::mpsc::TryRecvError::Disconnected) => serde_json::json!({"ok": false}),
};
let Some((_, after)) = self.restoring.take() else { return };
if !keep::opened(&reply, self.app.session.path.as_deref(), after.opened()) {
return;
}
match after {
keep::AfterOpen::KeptCopy { id, path, name, drop, .. } => {
// It is its own design again (saving goes to its file), with its changes unsaved.
self.app.session.path = path;
self.app.session.doc_mut().name = name;
self.app.session.mark_unsaved();
self.app.home.open = false;
if drop {
self.drop_kept(&id);
}
}
keep::AfterOpen::KeptSaved { id, drop, .. } => {
if drop {
self.drop_kept(&id);
}
}
keep::AfterOpen::Recovery { path, name, .. } => {
// It belongs to its own file again (saving goes there); it is unsaved.
self.app.session.path = path;
self.app.session.doc_mut().name = name;
self.app.session.mark_unsaved();
self.app.home.open = false;
*self.files.recovery.borrow_mut() = None;
files::autosave(&self.files, None);
}
}
}
/// The start page's recent designs are the stored ones: the remembered order first (those
@@ -801,7 +498,7 @@ mod web {
return;
}
let mut act: Option<(&'static str, String)> = None;
let closed = solidcraft_ui_egui::ui_kit::Window::new(egui::Id::unique("sc_browser_files"), "folder", "Files in this browser")
let closed = solidcraft_ui_egui::ui_kit::Window::new(egui::Id::new("sc_browser_files"), "folder", "Files in this browser")
// Room for long names; the kit still caps the window at the browser's width.
.cards(4.0)
.show_body(ctx, |ui| {
@@ -810,7 +507,7 @@ mod web {
files::pick_from_disk(&self.files, Intent::Open);
}
if ui_kit::button(ui, "Insert from computer…", ui_kit::Button::Normal)
.backing_on_hover_text(solidcraft_ui_text::tr("web.files.insert_drawings_hint"))
.backing_on_hover_text(solidcraft_ui_egui::i18n::tr("web.files.insert_drawings_hint"))
.clicked()
{
files::pick_from_disk(&self.files, Intent::Insert);
@@ -864,7 +561,7 @@ mod web {
let design = solidcraft_engine::io::is_design_path(&e.name);
if !design
&& ui_kit::button(ui, "Insert", ui_kit::Button::Small)
.backing_on_hover_text(solidcraft_ui_text::tr("web.files.insert_stored_drawings_hint"))
.backing_on_hover_text(solidcraft_ui_egui::i18n::tr("web.files.insert_stored_drawings_hint"))
.clicked()
{
act = Some(("insert", e.name.clone()));
@@ -903,9 +600,7 @@ mod web {
self.files.panel.set(false);
}
"insert" => {
if !solidcraft_ui_egui::mesh_units::ask(&mut self.app, &path, true) {
self.app.insert_path(&path);
}
self.app.insert_path(&path);
self.files.panel.set(false);
}
"download" => match vfs::read(&path, solidcraft_engine::io::MAX_DESIGN_BYTES) {
@@ -950,16 +645,10 @@ mod web {
*r = new.clone();
}
}
if let Some(at) = self.app.home.opened_at.remove(&old) {
self.app.home.opened_at.insert(new.clone(), at);
}
// A forgotten design follows its new name.
if self.app.home.forgotten.remove(&old) {
self.app.home.forgotten.insert(new.clone());
self.app.home.forgotten.insert(new);
}
// An open tab of that file keeps its path and, when the name came
// from the file, the title that matches the file list (#11375).
solidcraft_ui_egui::documents::follow_file_rename(&mut self.app, &old, &new);
}
Err(e) => self.app.set_status(e, true),
}
@@ -971,12 +660,9 @@ mod web {
/// Offer the autosave an earlier session left.
fn recovery_prompt(&mut self, ctx: &egui::Context) {
if self.restoring.is_some() {
return;
}
let Some((name, path)) = self.files.recovery.borrow().clone() else { return };
let mut answer = None;
let _ = solidcraft_ui_egui::ui_kit::Window::new(egui::Id::unique("sc_browser_recovery"), "restore", "Recover unsaved work?")
let _ = solidcraft_ui_egui::ui_kit::Window::new(egui::Id::new("sc_browser_recovery"), "restore", "Recover unsaved work?")
.required()
.show_body(ctx, |ui| {
ui.label(format!("“{name}” had unsaved changes when this page last closed."));
@@ -998,25 +684,23 @@ mod web {
return;
}
};
// Finished in `restored` once it is in; until then the prompt stays away.
let after = keep::AfterOpen::Recovery { opened: recovery.clone(), path, name };
self.restore(&recovery, after);
return;
self.app.open_path(&recovery);
if self.app.session.path.as_deref() != Some(recovery.as_str()) {
return;
}
// It belongs to its own file again (saving goes there); it is unsaved.
self.app.session.path = path;
self.app.session.doc_mut().name = name;
self.app.session.mark_unsaved();
self.app.home.open = false;
}
*self.files.recovery.borrow_mut() = None;
files::autosave(&self.files, None);
}
/// Whether leaving the page asks through the browser's own box (`keep::asks_before_unload`).
fn asks_before_unload(&self) -> bool {
let any = solidcraft_ui_egui::documents::any_dirty(&self.app);
let prefs = &self.app.preferences;
keep::asks_before_unload(self.launch.persists(), prefs.keep_unsaved_in_browser, prefs.keep_unsaved_also_asks, any, self.all_kept)
}
/// Whether the shell already has the on-demand face the live language needs.
fn script_font_ready(&self) -> bool {
match solidcraft_ui_egui::fonts::web_script_font_kind(solidcraft_ui_text::effective_language(&self.app.preferences.language)) {
match solidcraft_ui_egui::fonts::web_script_font_kind(solidcraft_ui_egui::i18n::effective_language(&self.app.preferences.language)) {
Some("zh") => self.chinese_bytes.is_some() && self.chinese_kind == Some("zh"),
Some("zh-TW") => self.chinese_bytes.is_some() && self.chinese_kind == Some("zh-TW"),
Some("ja") => self.cjk_bytes.is_some(),
@@ -1058,7 +742,7 @@ mod web {
false
}
};
let effective = solidcraft_ui_text::effective_language(&self.app.preferences.language);
let effective = solidcraft_ui_egui::i18n::effective_language(&self.app.preferences.language);
if !installed && solidcraft_ui_egui::fonts::needs_cjk_font(effective) {
log::warn!("script font unavailable; showing English for this session");
}
@@ -1067,13 +751,13 @@ mod web {
ctx.request_repaint();
}
let ready = self.script_font_ready();
let effective = solidcraft_ui_text::effective_language(&self.app.preferences.language);
let effective = solidcraft_ui_egui::i18n::effective_language(&self.app.preferences.language);
if self.font.tick(&mut self.app.preferences.language, ready) {
self.fetch_font(ctx, solidcraft_ui_egui::fonts::web_script_font_kind(effective).unwrap_or("ja"));
}
// The CJK face leads only a CJK UI: its Cyrillic glyphs are full-width, so switching
// to Ukrainian (or English) must put the Latin face back in front.
if solidcraft_ui_text::effective_language(&self.app.preferences.language) != self.font_language {
if solidcraft_ui_egui::i18n::effective_language(&self.app.preferences.language) != self.font_language {
self.apply_fonts(ctx);
}
}
@@ -1081,7 +765,7 @@ mod web {
/// Set up the UI fonts for the live language, keeping fetched script fonts as fallbacks
/// (Chinese leads a Chinese UI; see [`solidcraft_ui_egui::fonts::install_web_script_fonts`]).
fn apply_fonts(&mut self, ctx: &egui::Context) {
let effective = solidcraft_ui_text::effective_language(&self.app.preferences.language);
let effective = solidcraft_ui_egui::i18n::effective_language(&self.app.preferences.language);
if self.cjk_bytes.is_none() && self.chinese_bytes.is_none() {
solidcraft_ui_egui::fonts::setup_fonts(ctx);
} else {
@@ -1125,7 +809,7 @@ mod web {
self.api.poll();
self.space_mouse.logic(&mut self.app, ctx);
self.files_tick(ctx);
UNSAVED.with(|u| u.set(self.asks_before_unload()));
UNSAVED.with(|u| u.set(solidcraft_ui_egui::documents::any_dirty(&self.app)));
DESIGN_SHOWN.with(|d| d.set(solidcraft_ui_egui::toolbar::design_shown(&self.app)));
}
fn raw_input_hook(&mut self, ctx: &egui::Context, raw: &mut egui::RawInput) {
@@ -1145,11 +829,10 @@ mod web {
}
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
self.linked.tick(&mut self.app, ui.ctx());
self.restored();
UNSAVED.with(|u| u.set(self.asks_before_unload()));
UNSAVED.with(|u| u.set(self.launch.persists() && solidcraft_ui_egui::documents::any_dirty(&self.app)));
if self.launch.embed {
ui_kit::Container::new(ui.ctx(), ui_kit::Surface::Chrome).edge("embed_header", ui_kit::Edge::Top).show(ui, |ui| {
if ui_kit::button(ui, solidcraft_ui_text::tr("web.open_full"), ui_kit::Button::Normal).clicked()
if ui_kit::button(ui, solidcraft_ui_egui::i18n::tr("web.open_full"), ui_kit::Button::Normal).clicked()
&& let (Some(window), Some(url)) = (web_sys::window(), &self.full_url)
{
let _ = window.open_with_url_and_target_and_features(url, "_blank", "noopener");
@@ -1161,15 +844,10 @@ mod web {
if self.launch.persists() {
self.file_panel(&ctx);
self.recovery_prompt(&ctx);
self.keep_prompt(&ctx);
}
self.watch_text_for_font(&ctx);
self.store_prefs(&ctx);
}
#[cfg(target_arch = "wasm32")]
fn as_any_mut(&mut self) -> Option<&mut dyn std::any::Any> {
Some(&mut *self)
}
fn persist_egui_memory(&self) -> bool {
// eframe keeps this under one fixed key: only stable uses it, so a pre-release never rewrites it.
self.launch.persists() && crate::channel::current().is_empty()
@@ -1178,7 +856,7 @@ mod web {
if !self.launch.persists() {
return;
}
let Some(prefs) = self.persisted_prefs(|| Ok(storage.get_string(&crate::prefs_key()))) else { return };
let prefs = self.persisted_prefs();
storage.set_string(&crate::prefs_key(), prefs);
}
}
@@ -1225,7 +903,6 @@ mod web {
pub fn start() {
eframe::WebLogger::init(log::LevelFilter::Info).ok();
solidcraft_ui_egui::i18n::install();
wasm_bindgen_futures::spawn_local(async {
let Some(window) = web_sys::window() else { return };
let launch = crate::Launch::parse(&query());
@@ -1245,8 +922,7 @@ mod web {
{
create.instance_descriptor.backends = eframe::wgpu::Backends::GL;
}
let runner = eframe::WebRunner::new();
let result = runner
let result = eframe::WebRunner::new()
.start(
canvas,
options,
@@ -1290,7 +966,7 @@ mod web {
can_restore: Some(Box::new(move |path: &str| {
disk::parse(path).is_some_and(|(id, _)| restorable.disk_known.borrow().contains(id))
})),
restore_file: Some(Box::new(move |path: &str| disk::restore(&restorer, path, None))),
restore_file: Some(Box::new(move |path: &str| disk::restore(&restorer, path))),
download_design: Some(Box::new(files::download)),
easyprint_upload: Some(std::sync::Arc::new(crate::easyprint::upload)),
browser_files: Some(Box::new(move || shown.panel.set(true))),
@@ -1356,21 +1032,11 @@ mod web {
space_mouse: SpaceMouse::default(),
wheel_gestures: solidcraft_ui_egui::WebWheelGestures::default(),
prefs_writer: crate::PrefsWriter::default(),
prefs_warning: None,
other_tab_prefs,
keep_track: Default::default(),
all_kept: false,
restoring: None,
}))
}),
)
.await;
if result.is_ok()
&& crate::Launch::parse(&query()).persists()
&& let Some(window) = web_sys::window()
{
keep_when_hidden(&window, &runner);
}
if let Some(el) = document.get_element_by_id(LOADING_ID) {
match result {
Ok(()) => dismiss_loading(el),
+1 -3
View File
@@ -31,12 +31,9 @@ neg_cmp_op_on_partial_ord = "allow"
[dependencies]
solidcraft-engine = { workspace = true }
solidcraft-control = { workspace = true }
# The D3D12 shader compiler the window starts with (#6756).
solidcraft-gpu = { workspace = true }
solidcraft-ui-egui = { workspace = true }
solidcraft-ui-text = { workspace = true }
solidcraft-theme = { workspace = true }
solidcraft-space-mouse = { workspace = true }
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "wayland", "x11", "links"] }
egui = { workspace = true }
@@ -48,6 +45,7 @@ rfd = { workspace = true }
ron = "0.12"
# Waits for wgpu's adapter list when choosing the graphics backend before the window opens.
pollster = { workspace = true }
getrandom = "0.3"
# The update check (docs/updates.md): HTTPS with rustls, certificates from the operating system.
ureq = { version = "3.4", default-features = false, features = ["rustls-no-provider", "platform-verifier"] }
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] }
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -112,7 +112,7 @@ pub fn restart(software: bool, lost_at: u64, reason: &str) {
pub fn end() -> ! {
let watchdog = std::thread::Builder::new().name("solidcraft-exit".into()).spawn(|| {
std::thread::sleep(END_GRACE);
solidcraft_engine::note!("SolidCraft graphics: still closing after the device was lost; aborting");
eprintln!("SolidCraft graphics: still closing after the device was lost; aborting");
std::process::abort();
});
if let Err(e) = watchdog {
+18 -37
View File
@@ -79,7 +79,7 @@ fn mark(step: &str) {
static START: std::sync::OnceLock<(std::time::Instant, bool)> = std::sync::OnceLock::new();
let (start, on) = START.get_or_init(|| (std::time::Instant::now(), solidcraft_engine::geom::env::var_os("PROFILE_STARTUP").is_some()));
if *on {
solidcraft_engine::note!("startup {:>6.0} ms {step}", start.elapsed().as_secs_f64() * 1000.0);
eprintln!("startup {:>6.0} ms {step}", start.elapsed().as_secs_f64() * 1000.0);
}
}
@@ -282,20 +282,13 @@ impl eframe::App for App {
let now = std::time::Instant::now();
if self.prefs_writer.due(ui.input(|i| i.events.iter().any(changes_settings)), now)
&& let Some(storage) = frame.storage_mut()
&& let Ok(prefs) = self.prefs_for_storage(storage)
&& let Some(wait) = self.prefs_writer.store(storage, prefs, now)
&& let Some(wait) = self.prefs_writer.store(storage, self.solve.prefs(), now)
{
ui.ctx().request_repaint_after(wait);
}
}
fn save(&mut self, storage: &mut dyn eframe::Storage) {
let prefs = match self.prefs_for_storage(storage) {
Ok(prefs) => prefs,
Err(reason) => {
log::warn!("Settings were not written: {reason}");
return;
}
};
let prefs = self.solve.prefs();
storage.set_string(solidcraft_ui_egui::prefs::STORAGE_KEY, prefs.clone());
self.prefs_writer.written = Some(prefs);
}
@@ -310,8 +303,6 @@ impl eframe::App for App {
log::warn!("a picture was still being drawn as the app closed");
}
solidcraft_ui_egui::recovery_ui::close(&mut self.solve);
// A GPU path tracer setup still running did not stop the app (#9236).
solidcraft_ui_egui::render_workspace::close(&mut self.solve);
solidcraft_ui_egui::open_elsewhere::close(&mut self.solve);
// Before a restart (`Drop for App`) starts the next instance, which would otherwise get
// nothing from the 3D mouse driver (`solidcraft_3dx_client::stop`).
@@ -368,14 +359,6 @@ struct LostWatch {
}
impl App {
fn prefs_for_storage(&self, storage: &dyn eframe::Storage) -> Result<String, String> {
self.solve.try_prefs().or_else(|reason| {
log::warn!("Panel layout changes were not saved: {reason}");
let previous = solidcraft_ui_egui::prefs::stored(|key| storage.get_string(key));
self.solve.prefs_with_stored_panel_layout(previous.as_deref())
})
}
/// The graphics device was lost (#4172): the window can't draw again, so close, keeping
/// unsaved changes for recovery as a forced quit does (the window can't ask about them), and
/// start again once closed ([`device_lost::restart`]).
@@ -383,7 +366,7 @@ impl App {
let Some(gpu) = self.gpu.as_mut().filter(|g| g.lost_at.is_none() && g.lost.is_lost()) else { return };
let reason = gpu.lost.reason().unwrap_or_default();
log::error!("graphics: the device was lost ({reason}); closing to start again");
solidcraft_engine::note!("SolidCraft graphics: the device was lost ({reason}); starting again");
eprintln!("SolidCraft graphics: the device was lost ({reason}); starting again");
solidcraft_engine::crash::phase(&format!("graphics device lost: {reason}"));
gpu.lost_at = Some(device_lost::now_secs());
gpu.reason = reason;
@@ -468,7 +451,7 @@ fn case_variants(exts: &[&str]) -> Vec<String> {
fn content_ui(app: &mut SolveApp, ui: &mut egui::Ui) {
let content = ui.ctx().content_rect();
let above = egui::Rect::from_min_max(ui.max_rect().min, egui::pos2(ui.max_rect().right(), content.top()));
ui.painter().rect_filled(above, 0.0, solidcraft_theme::Tokens::get().app_bar);
ui.painter().rect_filled(above, 0.0, solidcraft_ui_egui::theme::Tokens::get().app_bar);
ui.scope_builder(egui::UiBuilder::new().max_rect(content), |ui| app.ui(ui));
}
@@ -518,7 +501,7 @@ fn services(cc: &eframe::CreationContext<'_>, folder: &DialogFolder) -> Services
// The groups come from the format registry, so a new format joins this dialog by itself.
let mut everything = io::formats::open_extensions(true);
everything.extend(["dxf", "svg"]);
dialog = dialog.add_filter(solidcraft_ui_text::tr("file.open.drawing_filter"), &case_variants(&everything));
dialog = dialog.add_filter(solidcraft_ui_egui::i18n::tr("file.open.drawing_filter"), &case_variants(&everything));
for (label, exts) in io::formats::import_filters(true) {
dialog = dialog.add_filter(label, &case_variants(&exts));
}
@@ -945,7 +928,6 @@ fn main() -> eframe::Result {
#[cfg(target_os = "macos")]
objc2_foundation::NSProcessInfo::processInfo().setProcessName(objc2_foundation::ns_string!("SolidCraft"));
mark("main");
solidcraft_ui_egui::i18n::install();
// On OCLP-patched Macs, wgpu picks a Metal Shading Language standard that the system's
// compiler refuses (`invalid value 'metal3.2'`), because the patched OS reports a newer
// macOS version than the GPU's Metal compiler supports. Re-launching with
@@ -1009,7 +991,7 @@ fn main() -> eframe::Result {
if let Some(value) = max_file_size {
let applied = startup::max_file_size(value.as_deref()).and_then(|bytes| solidcraft_engine::io::limits::set_override(Some(bytes)));
if let Err(error) = applied {
solidcraft_engine::note!("SolidCraft: {error}");
eprintln!("SolidCraft: {error}");
return Err(eframe::Error::AppCreation(std::io::Error::other(error).into()));
}
}
@@ -1041,7 +1023,7 @@ fn main() -> eframe::Result {
let fallback_note = std::env::var(startup::FALLBACK_NOTE_ENV).ok().map(|s| s.chars().take(4096).collect::<String>());
if let Some(note) = &fallback_note {
log::warn!("{note}");
solidcraft_engine::note!("SolidCraft: {note}");
eprintln!("SolidCraft: {note}");
notes.push(note.clone());
}
let saved_samples = if safe_mode { None } else { msaa() };
@@ -1154,13 +1136,13 @@ fn main() -> eframe::Result {
// Windows: the taskbar button shows the mark even when slow first frames keep the
// taskbar waiting for the window's icon.
if !native_frame::set_class_icon(cc) {
solidcraft_engine::note!("SolidCraft window: no class icon; the taskbar may show a generic one");
eprintln!("SolidCraft window: no class icon; the taskbar may show a generic one");
}
// The OS hit test offers the resize border, at the window's DPI, from the first
// message (#1381).
app.native_resize_border = custom_titlebar && native_frame::install(cc);
if custom_titlebar && !app.native_resize_border {
solidcraft_engine::note!("SolidCraft window: no native resize border; egui edge zones instead");
eprintln!("SolidCraft window: no native resize border; egui edge zones instead");
}
}
app.integrated_titlebar = cfg!(target_os = "macos");
@@ -1191,10 +1173,9 @@ fn main() -> eframe::Result {
.collect();
let info = rs.adapter.get_info();
if !app.preferences.graphics_adapter.is_empty() && !info.name.eq_ignore_ascii_case(app.preferences.graphics_adapter.as_str()) {
solidcraft_engine::note!(
eprintln!(
"SolidCraft graphics: preferred adapter {:?} was not used; using {:?} instead",
app.preferences.graphics_adapter,
info.name
app.preferences.graphics_adapter, info.name
);
}
let samples = scene_msaa_request(saved_samples);
@@ -1202,7 +1183,7 @@ fn main() -> eframe::Result {
eframe::egui_wgpu::supported_msaa_samples(&rs.adapter, &rs.device, rs.target_format, depth)
});
let scene_samples = scene_samples(info.backend, u32::from(samples), &supported);
solidcraft_engine::note!("SolidCraft graphics: {:?}, MSAA {scene_samples}x (requested {}x)", rs.adapter.get_info().backend, samples);
eprintln!("SolidCraft graphics: {:?}, MSAA {scene_samples}x (requested {}x)", rs.adapter.get_info().backend, samples);
solidcraft_engine::crash::phase("viewport pipelines (shader compile)");
let scene_samples = app.set_wgpu_split(rs, depth_bits, STENCIL_BITS, scene_samples);
app.msaa_supported = supported;
@@ -1222,7 +1203,7 @@ fn main() -> eframe::Result {
mark("viewport pipelines");
// `--control`/the environment name a port; otherwise the preference (on by default)
// opens the default one (docs/control-protocol.md).
if let Some(listen_on) = solidcraft_control::auth::plan(control_port, app.preferences.agent_control) {
if let Some(listen_on) = solidcraft_engine::control_auth::plan(control_port, app.preferences.agent_control) {
let rx = control_server::start(listen_on, cc.egui_ctx.clone());
app = app.with_control(rx);
}
@@ -1363,7 +1344,7 @@ fn wgpu_options(cpu: bool, preference: Option<&str>) -> eframe::egui_wgpu::WgpuC
let retry = std::env::var(startup::RETRY_BACKEND_ENV).ok();
let preference = if cpu { preference } else { retry.as_deref().or(preference) };
if let Some(backends) = startup::choose_backends(cfg!(target_os = "windows"), env_set, cpu, preference, startup::has_hardware_adapter) {
solidcraft_engine::note!("SolidCraft graphics: starting {backends:?}");
eprintln!("SolidCraft graphics: starting {backends:?}");
setup.instance_descriptor.backends = backends;
}
let intel_mac = cfg!(all(target_os = "macos", target_arch = "x86_64"));
@@ -1389,7 +1370,7 @@ fn wgpu_options(cpu: bool, preference: Option<&str>) -> eframe::egui_wgpu::WgpuC
/// event loop or a failed device; each retry advances through the APIs, then software once.
fn no_window(error: eframe::Error, tried_cpu: bool, failed: eframe::wgpu::Backends, settings: Option<&std::path::Path>) -> eframe::Result {
log::error!("the window could not open: {error}");
solidcraft_engine::note!("SolidCraft: the window could not open: {error}");
eprintln!("SolidCraft: the window could not open: {error}");
// This failure was handled, so neither the marker nor the journal should call it a crash.
if let Some(dir) = settings {
startup::started(dir);
@@ -1402,7 +1383,7 @@ fn no_window(error: eframe::Error, tried_cpu: bool, failed: eframe::wgpu::Backen
let previous = std::env::var(startup::FALLBACK_NOTE_ENV).unwrap_or_default();
let note = startup::fallback_note(&previous, failed, next, &error.to_string());
log::warn!("{note}");
solidcraft_engine::note!("SolidCraft: {note}");
eprintln!("SolidCraft: {note}");
let mut command = std::process::Command::new(exe);
command.args(std::env::args_os().skip(1)).env(startup::FALLBACK_NOTE_ENV, note);
if next == "cpu" {
@@ -1808,7 +1789,7 @@ mod viewport_tests {
viewport.fullscreen = Some(fullscreen);
viewport.native_pixels_per_point = Some(retina);
super::fullscreen_content_insets(&mut raw, 32.0, zoom);
ctx.run_ui(raw, |ui| super::content_ui(app, ui)).textures_delta.clear();
let _ = ctx.run_ui(raw, |ui| super::content_ui(app, ui));
};
// Enter, leave, and enter again: no stale inset when returning to a normal window.
for fullscreen in [false, true, false, true] {
+1 -1
View File
@@ -434,7 +434,7 @@ mod tests {
let mut app = SolveApp::new(solidcraft_engine::Session::default(), solidcraft_ui_egui::Services::default());
app.home.open = false;
let ctx = Context::default();
ctx.run_ui(egui::RawInput { focused: true, ..Default::default() }, |_| {}).textures_delta.clear();
let _ = ctx.run_ui(egui::RawInput { focused: true, ..Default::default() }, |_| {});
let mut bridge = NavBridge { shared: Arc::new(Mutex::new(Shared::default())) };
let queue = |bridge: &NavBridge| {
let mut shared = bridge.shared.lock().unwrap();
-1
View File
@@ -1914,7 +1914,6 @@ mod tests {
fn wheel() -> egui::Event {
egui::Event::MouseWheel {
source: egui::MouseWheelSource::Unknown,
unit: egui::MouseWheelUnit::Line,
delta: egui::vec2(0.0, -1.0),
modifiers: Default::default(),
+17 -23
View File
@@ -40,10 +40,10 @@ fn connect_to(path: &Path) -> Option<UnixStream> {
/// The axes of one record, or `None` for a record that is not motion.
///
/// The daemon reports x to the right, y up and z away from the user; our raw HID frame is x
/// right, y towards the user and z down. Swap and negate y/z and ry/rz to match that frame.
/// With nothing set in `spnavcfg` the two readers give the same motion; what the user swaps
/// or inverts there then carries over.
/// The daemon's frame is right-handed with x to the right, y away from the user and z up; ours is
/// the device's raw one, x right, y towards the user and z down, so y and z (and the rotations
/// about them) change sign. With nothing set in `spnavcfg` the two give the same motion; what
/// the user swaps or inverts there then carries over.
fn decode(record: &[u8; RECORD_BYTES]) -> Option<Axes> {
let mut data = [0_i32; 8];
for (slot, bytes) in data.iter_mut().zip(record.as_chunks::<4>().0) {
@@ -51,8 +51,8 @@ fn decode(record: &[u8; RECORD_BYTES]) -> Option<Axes> {
}
let [kind, x, y, z, rx, ry, rz, _period] = data;
(kind == 0).then(|| Axes {
translation: [unit(x), unit(-i64::from(z)), unit(-i64::from(y))],
rotation: [unit(rx), unit(-i64::from(rz)), unit(-i64::from(ry))],
translation: [unit(x), unit(-i64::from(y)), unit(-i64::from(z))],
rotation: [unit(rx), unit(-i64::from(ry)), unit(-i64::from(rz))],
})
}
@@ -149,28 +149,22 @@ mod tests {
#[test]
fn motion_records_become_axes_in_the_devices_raw_frame() {
// Each daemon axis reaches only its matching raw HID axis, in both directions.
for (daemon_axis, raw_axis, sign) in [(0, 0, 1), (1, 2, -1), (2, 1, -1), (3, 3, 1), (4, 5, -1), (5, 4, -1)] {
for value in [-500, 500] {
let mut data = [0; 8];
data[daemon_axis + 1] = value;
let mut expected = [0; 6];
expected[raw_axis] = sign * (value * 350 / 500) as i16;
assert_eq!(decode(&record(data)), Some(Axes::from(expected)), "daemon axis {daemon_axis}, value {value}");
}
}
// Full deflection of the daemon's x, y and z is the device's full scale, and y and z flip.
assert_eq!(decode(&record([0, 500, 500, 500, 0, 0, 0, 8])), Some(Axes { translation: [350, -350, -350], rotation: [0; 3] }));
// Rotations follow translations: right-handed in both frames, so ry and rz flip as y and z do.
assert_eq!(decode(&record([0, 0, 0, 0, 250, 250, 250, 8])), Some(Axes { translation: [0; 3], rotation: [175, -175, -175] }));
// Rest is a motion record of zeros.
assert_eq!(decode(&record([0, 0, 0, 0, 0, 0, 0, 1200])), Some(Axes::default()));
}
#[test]
fn what_spnavcfg_swaps_reaches_the_view() {
// A push away is daemon z (raw y); swapping Y/Z makes it a lift (raw z).
// The same swap changes a sideways tilt (daemon rz, raw ry) into a twist (raw rz).
let before = decode(&record([0, 0, 0, 500, 0, 0, 250, 8]));
let after = decode(&record([0, 0, 500, 0, 0, 250, 0, 8]));
assert_eq!(before, Some(Axes { translation: [0, -350, 0], rotation: [0, -175, 0] }));
assert_eq!(after, Some(Axes { translation: [0, 0, -350], rotation: [0, 0, -175] }));
// The daemon sends a push away as y. With Y and Z swapped in spnavcfg it sends the same push
// as z, and the view gets a lift (raw z) instead of the zoom (raw y).
let before = decode(&record([0, 0, 500, 0, 0, 0, 0, 8])).map(|axes| axes.translation);
let after = decode(&record([0, 0, 0, 500, 0, 0, 0, 8])).map(|axes| axes.translation);
assert_eq!(before, Some([0, -350, 0]));
assert_eq!(after, Some([0, 0, -350]));
}
#[test]
@@ -185,7 +179,7 @@ mod tests {
// Nothing overflows on the extremes of `i32`.
let extreme = decode(&record([0, i32::MIN, i32::MIN, i32::MAX, i32::MAX, i32::MIN, i32::MIN, -1]));
assert_eq!(extreme.map(|axes| axes.translation[0]), Some(i16::MIN));
assert_eq!(extreme.map(|axes| axes.translation), Some([i16::MIN, i16::MIN, i16::MAX]));
assert_eq!(extreme.map(|axes| axes.translation[1]), Some(i16::MAX));
assert_eq!(extreme.map(|axes| axes.rotation[0]), Some(i16::MAX));
}
+6 -11
View File
@@ -311,18 +311,13 @@ pub const SYSTEM_VERSION_COMPAT_ENV: &str = "SYSTEM_VERSION_COMPAT";
#[cfg(target_os = "macos")]
pub const OCLP_NVRAM_KEY: &str = "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:OCLP-Version";
/// Where macOS keeps its `nvram` tool.
#[cfg(target_os = "macos")]
const NVRAM_TOOL: &str = "/usr/sbin/nvram";
/// `true` if the OCLP NVRAM key is present on this system.
///
/// Runs `/usr/sbin/nvram <key>` and treats exit 0 as present. The full path keeps a `PATH` that
/// lacks `/usr/sbin`, or lists a look-alike first, from changing the answer. Any error (missing
/// binary, permission denied, key absent) returns `false`: this is a best-effort probe.
/// Runs `nvram <key>` and treats exit 0 as present. Any error (missing binary,
/// permission denied, key absent) returns `false` — this is a best-effort probe.
#[cfg(target_os = "macos")]
pub fn oclp_nvram_present() -> bool {
std::process::Command::new(NVRAM_TOOL).arg(OCLP_NVRAM_KEY).output().map(|o| o.status.success()).unwrap_or(false)
std::process::Command::new("nvram").arg(OCLP_NVRAM_KEY).output().map(|o| o.status.success()).unwrap_or(false)
}
/// Whether to re-launch with `SYSTEM_VERSION_COMPAT=1`: it is not set yet and OCLP shows through
@@ -339,8 +334,8 @@ fn compat_wanted(compat_set: bool, nvram: impl FnOnce() -> bool) -> bool {
///
/// `SYSTEM_VERSION_COMPAT=1` must be present **before** the process starts: setting it
/// with `std::env::set_var` inside `main` is too late because the macOS frameworks have
/// already queried the OS version by then, so the program starts itself again with the variable
/// set and waits for that child.
/// already queried the OS version by then. Re-launching is the only safe approach that
/// works without `unsafe` (a true `execve` replacement would require it).
///
/// Returns `Ok(false)` immediately when:
/// - `SYSTEM_VERSION_COMPAT` is already set (re-launched process, no loop), or
@@ -357,7 +352,7 @@ pub fn relaunch_with_version_compat() -> Result<bool, String> {
return Ok(false);
}
log::info!("startup: OCLP detected; re-launching with {}=1", SYSTEM_VERSION_COMPAT_ENV);
solidcraft_engine::note!("SolidCraft: OCLP detected; re-launching with {}=1", SYSTEM_VERSION_COMPAT_ENV);
eprintln!("SolidCraft: OCLP detected; re-launching with {}=1", SYSTEM_VERSION_COMPAT_ENV);
let exe = std::env::current_exe().map_err(|e| format!("could not find own executable: {e}"))?;
let status = std::process::Command::new(&exe)
.args(std::env::args_os().skip(1))
+3 -4
View File
@@ -18,11 +18,12 @@ assets/
ui/source/ # Rust viewport glyphs, markers and navigation
branding/web/source/og.png # shared social preview card
branding/logo/ # print/web logo files; guide in branding/README.md
styles/ui/palettes.rs # light/dark defaults
styles/web/loading.css # web loading/canvas styles
appearances/library.rs # built-in visual presets
materials/library.rs # physical defaults and colours
shaders/viewport.wgsl # original viewport shader
fonts/biz-udp-gothic/ # unmodified font and OFL licence
fonts/{liberation-sans,biz-udp-gothic}/ # unmodified fonts and OFL licences
locales/{en,de,ja,ko}.json # shared offline catalogs
platforms/{macos,linux,windows}/ # bundle, freedesktop and WiX templates
platforms/macos/dmg/ # disk image window: layout, dmgbuild settings, background art
@@ -86,9 +87,7 @@ The CLI still supports arbitrary PNG/ICO exports with `solidcraft-cli icon`.
Resources remain compiled by their owning layer through existing APIs:
`ui-egui::icons::paint_icon` and `Tokens` at L5, model presets in L2 `doc`, and sketch
fonts at L1. The sketch crate owns its built-in Liberation Sans font and OFL
licence under `crates/sketch/assets/fonts/liberation-sans/`, so Cargo source
packages and vendored builds include both files. State, projection, interaction, commands and GPU bindings stay in
fonts at L1. State, projection, interaction, commands and GPU bindings stay in
their current modules. Embedded data uses `CARGO_MANIFEST_DIR`; application code
needs no runtime resource registry or repository lookup.
+1 -1
View File
@@ -38,7 +38,7 @@ Other colours, all already used in the project:
| Colour | Hex | Where it comes from |
|---|---|---|
| Wordmark blue | `#15499e` | loading logo `--word` |
| Interface accent | `#2678da` | light theme `accent` token (`crates/theme/src/palettes.rs`) |
| Interface accent | `#2678da` | light theme `accent` token (`assets/styles/ui/palettes.rs`) |
| Light background | `#e8ebf0` | web loading screen (`assets/styles/web/loading.css`) |
| Dark background | `#1f232b` | dark theme `file_background` token |
| Black / white | `#000000` / `#ffffff` | one-colour versions only |
+1 -1
View File
@@ -81,7 +81,7 @@ for message in icon_palette.validation_errors(pal, names | set(al)):
err(d + '/palette.toml', message)
# the review page lies its icons on the real app surfaces: its colours must be the app's tokens
def app_tokens():
src = open(os.path.join(d, '..', '..', '..', '..', 'crates', 'theme', 'src', 'palettes.rs'), encoding='utf-8').read()
src = open(os.path.join(d, '..', '..', '..', 'styles', 'ui', 'palettes.rs'), encoding='utf-8').read()
lo, hi = src.index('pub const fn light'), src.index('pub const fn dark')
light_src, dark_src = src[lo:hi], src[hi:]
def pick(block, name, dark):
@@ -1,4 +1,4 @@
/* App surfaces (keep in sync with crates/theme/src/palettes.rs; lint_icons.py checks): --card is the ribbon surface `toolbar` the icons lie on, --bg the page (`panel` in light, `viewport_top` in dark), --line `border`, --fg `text`, --mut `text_dim`. */
/* App surfaces (keep in sync with assets/styles/ui/palettes.rs; lint_icons.py checks): --card is the ribbon surface `toolbar` the icons lie on, --bg the page (`panel` in light, `viewport_top` in dark), --line `border`, --fg `text`, --mut `text_dim`. */
:root{--bg:#fafbfc;--fg:#262a32;--card:#f6f7f9;--line:#d0d4dc;--mut:#6e7480;--sz:48px}
body.dark{--bg:#2e3440;--fg:#dee2e8;--card:#272b34;--line:#3f4552;--mut:#949ba8}
body{font:12px system-ui,sans-serif;margin:0;background:var(--bg);color:var(--fg)}
+2 -2
View File
@@ -110,7 +110,7 @@ pub(crate) fn breadcrumb(p: &egui::Painter, c: egui::Pos2, col: Color32) {
}
pub(crate) fn brand_mark(p: &egui::Painter, c: Pos2) {
brand_mark_styled(p, c, 20.0, solidcraft_theme::Tokens::get().logo, true);
brand_mark_styled(p, c, 20.0, crate::theme::Tokens::get().logo, true);
}
/// The same original mark as a single quiet silhouette, without face seams or outlines.
@@ -127,7 +127,7 @@ fn brand_mark_styled(p: &egui::Painter, c: Pos2, height: f32, colours: [Color32;
};
// The faces are separated by gaps that show the application bar, not by white lines.
let [light, mid, dark] = colours;
let edge_col = solidcraft_theme::Tokens::get().app_bar;
let edge_col = crate::theme::Tokens::get().app_bar;
face(light, &[(3.5, 105.9), (177.0, 5.8), (263.4, 55.6), (263.8, 156.0), (177.0, 406.4)]);
face(light, &[(177.0, 206.1), (263.8, 156.0), (350.5, 206.2), (350.5, 306.3), (177.0, 406.4)]);
face(mid, &[(3.5, 105.9), (177.0, 206.1), (177.0, 406.4)]);
+14 -3
View File
@@ -1,7 +1,7 @@
//! Constraint, assembly snap, hole placement and dimension marker artwork.
use crate::dialogs_assembly::SnapKind;
use crate::theme::Tokens;
use egui::{Color32, Pos2, Stroke, vec2};
use solidcraft_theme::Tokens;
pub(crate) fn snap(painter: &egui::Painter, c: Pos2, tip: Option<Pos2>, kind: SnapKind, col: Color32, tag: Option<&str>) {
// A dark halo under every stroke keeps the glyph readable on light and dark faces alike.
@@ -49,7 +49,7 @@ pub(crate) fn snap(painter: &egui::Painter, c: Pos2, tip: Option<Pos2>, kind: Sn
// What it snaps to (hovered), or which component it is (picked): a small label.
if let Some(tag) = tag {
let t = Tokens::get();
let font = egui::FontId::proportional(solidcraft_theme::Tokens::get().font_caption);
let font = egui::FontId::proportional(crate::theme::Tokens::get().font_caption);
let g = painter.layout_no_wrap(tag.to_string(), font, t.text);
let at = c + vec2(12.0, 10.0);
let r = egui::Rect::from_min_size(at, g.size()).expand2(vec2(5.0, 2.0));
@@ -79,6 +79,17 @@ pub(crate) fn snap_hint(painter: &egui::Painter, c: Pos2, kind: SnapKind, col: C
painter.circle_filled(c, 1.3, col);
}
/// A placed hole's drag handle: a ring round the hole's centre with a cross through it, filled
/// while it is hovered or dragged.
pub(crate) fn hole_handle(painter: &egui::Painter, c: Pos2, col: Color32, hot: bool) {
let ic = Tokens::get().icons;
let r = 6.0;
painter.circle_filled(c, r + 3.5, ic.marker_halo);
painter.circle(c, r, if hot { col } else { col.gamma_multiply(0.35) }, Stroke::new(1.6, col));
let ink = Stroke::new(1.3, if hot { ic.highlight } else { col });
painter.line_segment([c - vec2(r + 3.0, 0.0), c + vec2(r + 3.0, 0.0)], ink);
painter.line_segment([c - vec2(0.0, r + 3.0), c + vec2(0.0, r + 3.0)], ink);
}
pub(crate) fn glyph_icon(name: &str) -> Option<&'static str> {
Some(match name {
"Coincident" => "c_coincident",
@@ -89,7 +100,7 @@ pub(crate) fn glyph_icon(name: &str) -> Option<&'static str> {
"Smooth" => "c_smooth",
"Equal" => "c_equal",
"Concentric" => "c_concentric",
"MidPoint" | "PointAlong" => "c_midpoint",
"MidPoint" => "c_midpoint",
"Symmetry" => "c_symmetry",
"Fix" => "c_fix",
_ => return None,
+4 -3
View File
@@ -1,8 +1,8 @@
//! Navigation drawing definitions. Camera projection and picking remain in the UI widgets.
use crate::theme::Tokens;
use egui::{Color32, FontId, Pos2, Rect, Shape, Stroke, pos2, vec2};
use solidcore_record::Vec3;
use solidcraft_engine::geom::Ring;
use solidcraft_theme::Tokens;
pub(crate) struct Facet {
pub(crate) direction: Vec3,
pub(crate) points: Ring<Pos2>,
@@ -55,7 +55,8 @@ pub(crate) fn face_text(painter: &egui::Painter, face: &Facet, ink: Color32, fon
painter.ctx().add_plugin(LabelAtlas);
let text = Shape::Text(egui::epaint::TextShape::new(Pos2::ZERO, galley, ink));
let atlas = painter.ctx().fonts(|f| f.font_image_size());
let primitives = painter.ctx().tessellate(vec![egui::epaint::ClippedShape::new(Rect::EVERYTHING, text)], painter.ctx().pixels_per_point());
let primitives =
painter.ctx().tessellate(vec![egui::epaint::ClippedShape { clip_rect: Rect::EVERYTHING, shape: text }], painter.ctx().pixels_per_point());
for primitive in primitives {
if let egui::epaint::Primitive::Mesh(mut mesh) = primitive.primitive {
mesh.texture_id = LABEL_PIXELS;
@@ -196,7 +197,7 @@ pub(crate) fn axis_tip_scaled(painter: &egui::Painter, c: Pos2, name: &str, d: &
// On a hovered (white) disc the letter takes the axis colour.
let letter = if hovered { col } else { t.on_accent };
let label = name.to_uppercase();
let galley = painter.layout_no_wrap(label, crate::fonts::bold(solidcraft_theme::Tokens::get().font_compass * scale), letter);
let galley = painter.layout_no_wrap(label, crate::fonts::bold(crate::theme::Tokens::get().font_compass * scale), letter);
let origin = at - galley.size() / 2.0;
let ppp = painter.ctx().pixels_per_point().max(0.5);
let origin = pos2((origin.x * ppp).round() / ppp, (origin.y * ppp).round() / ppp);
+3 -3
View File
@@ -2,16 +2,16 @@
use egui::{Color32, FontId, Pos2, Shape, Stroke, vec2};
/// The agent pointer's colour (a theme token, so a colour vision mode can reach it).
pub(crate) fn agent() -> Color32 {
solidcraft_theme::Tokens::get().icons.agent
crate::theme::Tokens::get().icons.agent
}
pub(crate) fn paint(painter: &egui::Painter, p: Pos2) {
let ic = solidcraft_theme::Tokens::get().icons;
let ic = crate::theme::Tokens::get().icons;
// An arrow pointer, tip at `p`.
let pts: Vec<Pos2> =
[(0.0, 0.0), (0.0, 17.0), (4.5, 13.0), (7.5, 20.0), (10.5, 18.8), (7.5, 12.0), (13.0, 12.0)].iter().map(|(x, y)| p + vec2(*x, *y)).collect();
painter.add(Shape::convex_polygon(pts.clone(), ic.agent, Stroke::NONE));
painter.add(Shape::closed_line(pts, Stroke::new(1.5, ic.highlight)));
let label = painter.layout_no_wrap("Agent".into(), FontId::proportional(solidcraft_theme::Tokens::get().font_small), ic.highlight);
let label = painter.layout_no_wrap("Agent".into(), FontId::proportional(crate::theme::Tokens::get().font_small), ic.highlight);
let r = egui::Rect::from_min_size(p + vec2(15.0, 18.0), label.size() + vec2(10.0, 4.0));
painter.rect_filled(r, 4.0, ic.agent);
painter.galley(r.min + vec2(5.0, 2.0), label, ic.highlight);
+53 -626
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -1621,7 +1621,7 @@
"help.sketch.insert_svg": "Učitava putanje SVG crteža u skicu, skalirane, zakrenute i postavljene gdje zadate. Koristite ga da logotip ili vektorski obris pretvorite u krive koje možete ekstrudirati.",
"help.sketch.inspect": "Otvara izvještaj o otvorenoj skici: koliko je stepeni slobode preostalo i je li potpuno ograničena. Koristite ga da saznate šta se još pomjera prije nego što završite skicu.",
"help.sketch.intersect": "Dodaje krive ili tačke gdje tijela, lica, ivice ili druge skice sijeku ravan skice. Ostaju povezane i prate model kada se promijeni.",
"help.sketch.intersection_curve": "Pravi 3D krive tamo gdje se dva tijela, lica ili krive drugih skica sastaju, povezane s njima. Koristite ih kao putanje ili vodilice koje prate model.",
"help.sketch.intersection_curve": "Pravi 3D krive tamo gdje se dva tijela ili lica sastaju, povezane s njima. Koristite ih kao putanje ili vodilice koje prate model.",
"help.sketch.isoparametric_curve": "Pravi 3D krivu u smjeru U ili V lica kroz tačku koju izaberete, povezanu s licem. Koristite je kao putanju ili liniju razdvajanja koja prati površ.",
"help.sketch.line": "Crta povezane linije tačku po tačku, kao otvoreni lanac ili zatvoren obris. To je osnovni alat za većinu profila.",
"help.sketch.line.midpoint": "Crta liniju od njene središnje tačke do jednog kraja, a drugi kraj se preslikava. Koristite je za linije centrirane na tački, npr. simetričnu ivicu.",
@@ -1889,7 +1889,6 @@
"material.editor.preserved_appearance": "Sačuvani izgled",
"material.editor.public_reference": "Javna referenca",
"material.editor.reference": "Referenca",
"material.editor.remove": "Ukloni",
"material.editor.save_or_discard": "Sačuvajte ili odbacite nacrt materijala prije dodjele materijala.",
"material.editor.saved": "Materijal je sačuvan. Dodjele tijelima ostaju nepromijenjene.",
"material.editor.scope": "Sačuvaj sprema ovaj materijal bez dodjele tijelima. Prazna svojstva i uslovi ostaju nepoznati. Gustina s kartice ne mijenja dodijeljenu gustinu ni masu.",
File diff suppressed because it is too large Load Diff
+177 -1104
View File
File diff suppressed because it is too large Load Diff
+1 -4
View File
@@ -1621,7 +1621,7 @@
"help.sketch.insert_svg": "Læser stierne i en SVG-tegning ind i en skitse, skaleret, drejet og placeret, som du angiver. Brug den til at gøre et logo eller en vektorkontur til kurver, du kan ekstrudere.",
"help.sketch.inspect": "Åbner en rapport om den åbne skitse: hvor mange frihedsgrader der er tilbage, og om den er fuldt bundet. Brug den til at finde ud af, hvad der stadig kan bevæge sig, før du afslutter skitsen.",
"help.sketch.intersect": "Tilføjer de kurver eller punkter, hvor emner, flader, kanter eller andre skitser krydser skitseplanet. De forbliver linkede og følger modellen, når den ændres.",
"help.sketch.intersection_curve": "Opretter 3D-kurver, hvor to emner, flader eller kurver fra andre skitser mødes, linket til dem. Brug dem som baner eller styrekurver, der følger modellen.",
"help.sketch.intersection_curve": "Opretter 3D-kurver, hvor to emner eller flader mødes, linket til dem. Brug dem som baner eller styrekurver, der følger modellen.",
"help.sketch.isoparametric_curve": "Opretter en 3D-kurve langs en flades U- eller V-retning gennem et punkt, du vælger, linket til fladen. Brug den som bane eller delelinje, der følger overfladen.",
"help.sketch.line": "Tegner forbundne linjer punkt for punkt som en åben kæde eller en lukket kontur. Det er det grundlæggende værktøj til de fleste profiler.",
"help.sketch.line.midpoint": "Tegner en linje fra dens midtpunkt ud til den ene ende, og den anden ende spejles. Brug den til linjer centreret om et punkt, f.eks. en symmetrisk kant.",
@@ -1889,7 +1889,6 @@
"material.editor.preserved_appearance": "Bevaret udseende",
"material.editor.public_reference": "Offentlig reference",
"material.editor.reference": "Reference",
"material.editor.remove": "Fjern",
"material.editor.save_or_discard": "Gem eller kassér materialeudkastet, før du tildeler et materiale.",
"material.editor.saved": "Materialet er gemt. Tildelinger til emner er uændrede.",
"material.editor.scope": "Gem gemmer materialet uden at tildele det til emner. Tomme egenskaber og betingelser forbliver ukendte. Kortets densitet ændrer ikke den tildelte densitet eller massen.",
@@ -3808,8 +3807,6 @@
"sample.plate.name": "Eksempelplade",
"sample.vents.about": "Slidser i et rektangulært mønster: Rækker, kolonner og deling er parametre",
"sample.vents.name": "Ventilationsplade",
"scale.per_axis": "Per akse",
"scale.uniform": "Ensartet",
"search.command_keys": "Enter kør Shift+Enter kør og hold åben Esc luk",
"search.commands": "Kommandoer",
"search.design": "I dette design",
+21 -368
View File
File diff suppressed because it is too large Load Diff
-8
View File
@@ -134,7 +134,6 @@
"render.aging_metallic": "Layer metallic fraction",
"render.aging_origin": "Field origin · world mm",
"render.aging_patina": "Copper-green patina",
"render.aging_raytrace_help": "Ageing is applied by CPU ray tracing and GPU path tracing. Raster keeps schematic rendering.",
"render.aging_refresh_targets": "Inspect current bodies",
"render.aging_roughness": "Layer roughness",
"render.aging_rust": "Oxidized iron / rust",
@@ -160,7 +159,6 @@
"render.background_workflow": "Choose the background you intend: a camera-only colour/gradient, a physical stage that receives light, or HDR illumination. They are independent. Live Preview is a modelling view; render a new image or regrade a retained master to see camera finishing.",
"render.base_color": "Base colour · sRGB",
"render.bloom_help": "Creative output-only glow from positive linear highlights, spread with three normalised box passes. Radius is in output pixels. Added in linear display light before sRGB; not a lens, volumetric effect or convergence improvement. The raw EXR is unchanged.",
"render.check_media_remaining": "Density grids, displacement, full spectral integration and propagated polarisation remain unavailable.",
"render.chromatic_offset": "Chromatic edge offset",
"render.cpu_area_editor_help": "Full side vectors in millimeters; U cross V points towards the emitting side. This differs from GPU half-edge vectors.",
"render.cpu_light_help": "Up to eight directional lights. An empty custom list turns them off; selecting a preset restores its lights. Colours are linear RGB and intensity is relative, not watts.",
@@ -180,7 +178,6 @@
"render.flare_strength": "Highlight flare strength",
"render.flare_threshold": "Scene-linear flare threshold",
"render.frame_centre_mark": "Centre mark",
"render.glass_model_help": "Glass roughness scatters transmitted rays. Dispersion and film colour use three wavelength bands. Rough sheets require straight transmitted shadows off.",
"render.hdr_primaries_declared": "The source declares its colour primaries.",
"render.hdr_primaries_srgb": "Colour primaries: sRGB/D65",
"render.hdr_primaries_undeclared": "The source does not declare primaries; review the renderer colour requirements.",
@@ -238,8 +235,6 @@
"render.studio_area_help": "Up to four one-sided rectangles. Orthogonal half-edges U and V define size; U × V faces the lit side. Coordinates are world-space millimetres.",
"render.studio_center": "Centre X, Y, Z (mm)",
"render.studio_hdr_help": "Radiance .hdr, 2:1 panorama, up to 2048 × 1024. EXR is unavailable. The colour assumption applies only when primaries are unspecified.",
"render.surface_import.complete": "Choose an image and enter its author, source and licence.",
"render.surface_import.license": "Licence / ownership",
"sketch.hint.arc.center_point": "Arc: click centre and start, go round either way and click the end, or type a signed sweep",
"sketch.hint.circle.center": "Circle: click the centre, then a point on the circle",
"sketch.hint.constraint.midpoint": "MidPoint: pick a point and a line, or two lines to centre the second on the first",
@@ -271,9 +266,6 @@
"ui.layout_compact": "Compact",
"ui.layout_floating": "Floating",
"ui.material_review.claims": "Sources and licences are unverified claims. Missing values remain unknown.",
"ui.mesh_import_origin_tip": "Centre the mesh on X and Y with its base on Z = 0. When off, the mesh keeps the coordinates stored in the file.",
"ui.organize": "Organise",
"ui.panel_layout.workspace.modelling": "Modelling",
"ui.point_cloud_color_by": "Colour By",
"ui.point_cloud_file_colors": "File Colours",
"ui.point_cloud_no_file_colors": "The file has no colours",
+15 -588
View File
File diff suppressed because it is too large Load Diff
+15 -543
View File
File diff suppressed because it is too large Load Diff
+6 -9
View File
@@ -1155,7 +1155,7 @@
"cmd.sheet_perforate": "Rei'itä",
"cmd.sheet_refold": "Taita uudelleen",
"cmd.sheet_rules": "Luettele ohutlevysäännöt",
"cmd.sheet_unfold": "Levitä",
"cmd.sheet_unfold": "Avaa",
"cmd.sketch.construction_line": "Apuviiva",
"cmd.sketch.construction_line.angle": "Apuviiva kulmassa",
"cmd.sketch.construction_line.bisector": "Kulman puolittaja",
@@ -1692,7 +1692,7 @@
"help.sketch.move": "Siirtää tai kiertää luonnoskäyriä ja -pisteitä tai niiden kopiota. Käytä sitä geometrian uudelleensijoittamiseen niin, että sen muoto ja rajoitteet säilyvät.",
"help.sketch.offset": "Luo käyräketjusta kopion annetulle etäisyydelle toiselle tai molemmille puolille. Käytä sitä seinämiin, ääriviivoihin ja välyksiin; etäisyys säilyy muokattavana mittana.",
"help.sketch.paste": "Liittää kopioimasi tai leikkaamasi luonnosgeometrian aktiiviseen luonnokseen. Sijoita se pisteeseen tai siirrä sitä siirtymän verran.",
"help.sketch.pattern.circular": "Kopioi luonnosgeometriaa keskipisteen ympäri koko ympyrän tai annetun kulman matkalle. Käytä sitä pulttijakoympyröihin, puoliin ja hampaisiin.",
"help.sketch.pattern.circular": "Kopioi luonnosgeometriaa keskipisteen ympäri koko ympyrän tai annetun kulman matkalle. Käytä sitä pulttijakoympyröihin, puolisiin ja hampaisiin.",
"help.sketch.pattern.rectangular": "Kopioi luonnosgeometriaa riveihin ja sarakkeisiin annetuin välein. Käytä sitä reikien, urien tai tuuletusaukkojen ruudukkoihin.",
"help.sketch.point": "Sijoittaa luonnospisteen. Käytä sitä mittojen, rajoitteiden, reikien keskipisteiden tai myöhempien piirteiden viitteenä.",
"help.sketch.point3d": "Sijoittaa pisteen avaruuteen, kun 3D-luonnos on käytössä. Käytä sitä 3D-käyrien ja polkujen viitteenä.",
@@ -1869,7 +1869,7 @@
"import_report.details": "Tiedot:",
"import_report.file_one": "Tiedostossa oli 1 muu ongelma.",
"import_report.file_other": "Tiedostossa oli {count} muuta ongelmaa.",
"import_report.hint": "Näiden osien vieminen uudelleen ohjelmasta, jolla ne on tehty, voi korjata tämän. Näet yksityiskohdat toiminnolla Kopioi varoitusilmoitus.",
"import_report.hint": "Näiden osien vieminen uudelleen ohjelmasta, jolla ne on tehty, voi korjata tämän. Kopioi varoitusilmoitus sisältää yksityiskohdat.",
"import_report.left_out_one": "1 pintaa ei voitu korjata, ja se puuttuu.",
"import_report.left_out_other": "{count} pintaa ei voitu korjata, ja ne puuttuvat.",
"import_report.needs_repair_one": "1 osa on korjattava ennen kuin sitä voi mallintaa edelleen.",
@@ -1984,7 +1984,6 @@
"material.editor.preserved_appearance": "Säilytetty ulkoasu",
"material.editor.public_reference": "Julkinen lähde",
"material.editor.reference": "Viite",
"material.editor.remove": "Poista",
"material.editor.save_or_discard": "Tallenna tai hylkää materiaaliluonnos ennen materiaalin määrittämistä.",
"material.editor.saved": "Materiaali tallennettu. Kappaleiden määritykset eivät muuttuneet.",
"material.editor.scope": "Tallennus tallentaa tämän materiaalin määrittämättä sitä kappaleille. Tyhjät ominaisuudet ja olosuhteet jäävät tuntemattomiksi. Kortin tiheys ei muuta määritettyä tiheyttä tai massaa.",
@@ -2322,7 +2321,7 @@
"prefs.design_note": "Millä uudet mallit alkavat. Avoimet mallit säilyttävät omansa.",
"prefs.design_tools.ask": "Kysy",
"prefs.design_tools.degrees": "Astetta",
"prefs.design_tools.double_click_help": "Tai muokataksesi linkitettyä komponenttia paikallaan.",
"prefs.design_tools.double_click_help": "Tai muokataksesi linkitettyä paikallaan.",
"prefs.design_tools.ghost": "Näytä siirrettyjen osien vanha paikka haamukuvana",
"prefs.design_tools.hole_moves_help": "Pinnan valitseminen uudelleen siirtää reikää sen poistamisen sijaan.",
"prefs.design_tools.hole_snaps_help": "Pinnan keskikohta ja sen pyöreiden särmien keskipisteet.",
@@ -2381,7 +2380,7 @@
"prefs.graphics_note": "Vaihda nopeutta sulavuuteen. Kunkin valinnan vaikutus näkyy näytteessä.",
"prefs.graphics_page.current_view": "Nykyinen näkymä",
"prefs.graphics_page.fastest": "Nopein",
"prefs.graphics_page.fold_items": "Kutista kohteet",
"prefs.graphics_page.fold_items": "Kokoa kohteet",
"prefs.graphics_page.in_view": "Näkymässä",
"prefs.graphics_page.live_details": "Reaaliaikaiset tiedot",
"prefs.graphics_page.own_mix": "Oma yhdistelmä",
@@ -2589,7 +2588,7 @@
"prefs.sketch.prefer_free_points": "Suosi siirrettäviä pisteitä päällekkäisissä kohdissa",
"prefs.sketch.project_options": "Kysy projisoinnin asetukset ensin",
"prefs.sketch.recent_snap": "Tartu kohtaan, jossa kaksi ohjainta risteää",
"prefs.sketch.select_other_hidden": "Valitse muu -toiminto ulottuu piilotettuun geometriaan",
"prefs.sketch.select_other_hidden": "Valitse muu ulottuu piilotettuun geometriaan",
"prefs.sketch.shortcut_cycles_modes": "Pikanäppäin uudelleen vaihtaa tilaa",
"prefs.sketch.shortcut_cycles_modes_tip": "Pois: se käynnistää työkalun uudelleen.",
"prefs.sketch.snapping_guides": "Tartunta ja ohjaimet",
@@ -4078,8 +4077,6 @@
"sample.plate.name": "Esimerkkilevy",
"sample.vents.about": "Urat suorakulmaisessa kuviossa: rivit, sarakkeet ja jako ovat parametreja",
"sample.vents.name": "Tuuletuslevy",
"scale.per_axis": "Akseleittain",
"scale.uniform": "Tasainen",
"search.command_keys": "Enter suorita Shift+Enter suorita ja pidä auki Esc sulje",
"search.commands": "Komennot",
"search.design": "Tässä mallissa",
+1 -36
View File
@@ -566,7 +566,6 @@
"Select edges": "Sélectionner des arêtes",
"Select points of the sketch being edited": "Sélectionner des points de l'esquisse en cours de modification",
"Select the centre the pattern turns around first": "Sélectionner d'abord le centre autour duquel la répétition pivote",
"Select the curves to divide first": "Sélectionner d'abord les courbes à diviser",
"Select the curves to offset first": "Sélectionner d'abord les courbes à décaler",
"Select the mirror line": "Sélectionner la ligne de symétrie",
"Select the sketch curves or points to mirror first": "Sélectionner d'abord les courbes ou points d'esquisse à symétriser",
@@ -1000,7 +999,6 @@
"cmd.material_properties_directional": "Module d'élasticité directionnel",
"cmd.material_properties_validate": "Valider les données du matériau physique",
"cmd.mesh_convert": "Convertir le maillage",
"cmd.model_body_features": "Lister les fonctions du corps",
"cmd.model_edges": "Lister les arêtes",
"cmd.model_faces": "Lister les faces",
"cmd.model_threads": "Lister les filetages",
@@ -1050,7 +1048,6 @@
"cmd.pointcloud_edit": "Modifier le nuage de points",
"cmd.pointcloud_insert": "Insérer un nuage de points",
"cmd.pointcloud_list": "Nuages de points",
"cmd.pointcloud_reload": "Recharger le nuage de points",
"cmd.render.compare.divider": "Déplacer le séparateur de comparaison des rendus",
"cmd.render.result.discard": "Écarter le résultat de rendu",
"cmd.render.result.select": "Sélectionner le résultat de rendu",
@@ -1140,7 +1137,6 @@
"cmd.sketch.construction_line.tangent_external": "Tangente passant par un point extérieur",
"cmd.sketch.construction_line.tangent_two": "Tangente commune",
"cmd.sketch.construction_line.vertical": "Droite de construction verticale",
"cmd.sketch.replace": "Remplacer l’esquisse",
"cmd.sketch_arc3d": "Arc 3D",
"cmd.sketch_arc_center_point": "Arc par centre",
"cmd.sketch_arc_tangent": "Arc tangent",
@@ -1197,7 +1193,6 @@
"cmd.sketch_options": "Options de la palette d'esquisse",
"cmd.sketch_paste": "Coller les entités d'esquisse",
"cmd.sketch_point3d": "Point 3D",
"cmd.sketch_point_divide": "Diviser la courbe",
"cmd.sketch_polygon_circumscribed": "Polygone circonscrit",
"cmd.sketch_polygon_edge": "Polygone par côté",
"cmd.sketch_polygon_inscribed": "Polygone inscrit",
@@ -1368,14 +1363,11 @@
"dialog.computing": "Calcul… {seconds} s",
"dialog.could_not_be_checked": "non vérifiable",
"dialog.custom_axis": "↖ Axe personnalisé",
"dialog.cylinder_face_tip": "La face ou le sommet du modèle sur lequel le cylindre est posé : cliquer ici, puis dessus dans la vue. Laissé vide, X, Y et Z le placent.",
"dialog.dimension_insert_hint": "Double-cliquez sur une autre cote pilotante pour insérer son nom",
"dialog.dimension_name": "Cote : {name}",
"dialog.edit_title": "MODIFIER {title}",
"dialog.no_shown_body": "Aucun corps affiché à modifier : affichez-en un ou choisissez Nouveau corps",
"dialog.pattern_sketch_not_object": "Choisissez des corps ou des fonctions : une esquisse n'est ni l'un ni l'autre. Répétez ses courbes avec la Répétition ou la Symétrie de l'esquisse, ou extrudez-la d'abord.",
"dialog.primitive_point_tip": "Un point qui remplit X, Y et Z : cliquer ici, puis sur un sommet, une arête ou une face du modèle, sur un point d'une esquisse ou sur l'origine.",
"dialog.reference_edge_tip": "Une arête droite de la face choisie, depuis laquelle la distance ci-dessous est mesurée : cliquer ici, puis sur l'arête.",
"dialog.select": "↖ Sélectionner",
"dialog.selected_count": "↖ {count} sélectionné(s)",
"dialog.selection_constraint": "Contrainte {id}",
@@ -1430,7 +1422,6 @@
"file_load.reading_percent": "Lecture du fichier... {percent} %",
"file_load.rebuilding": "Reconstruction de l’entité {done} sur {total}",
"file_load.recovering": "Récupération de la conception",
"file_load.reloading_cloud": "Rechargement du nuage de points",
"file_load.stopping": "Attente de l’arrêt de l’opération précédente...",
"file_load.updating_links": "Mise à jour des liens",
"file_load.waiting": "En attente d’une opération sur fichier",
@@ -1630,7 +1621,7 @@
"help.sketch.insert_svg": "Lit les tracés d'un dessin SVG dans une esquisse, mis à l'échelle, tournés et placés comme vous le définissez. À utiliser pour transformer un logo ou un contour vectoriel en courbes que vous pouvez extruder.",
"help.sketch.inspect": "Ouvre un rapport sur l'esquisse ouverte : combien de degrés de liberté il reste et si elle est entièrement contrainte. À utiliser pour savoir ce qui bouge encore avant de terminer l'esquisse.",
"help.sketch.intersect": "Ajoute les courbes ou points où des corps, faces, arêtes ou d'autres esquisses traversent le plan d'esquisse. Ils restent liés et suivent le modèle lorsqu'il change.",
"help.sketch.intersection_curve": "Crée des courbes 3D là où deux corps, faces ou courbes d'autres esquisses se rencontrent, liées à eux. À utiliser comme trajectoires ou rails guides qui suivent le modèle.",
"help.sketch.intersection_curve": "Crée des courbes 3D là où deux corps ou faces se rencontrent, liées à eux. À utiliser comme trajectoires ou rails guides qui suivent le modèle.",
"help.sketch.isoparametric_curve": "Crée une courbe 3D le long de la direction U ou V d'une face, par un point que vous choisissez, liée à la face. À utiliser comme trajectoire ou ligne de partage qui suit la surface.",
"help.sketch.line": "Dessine des lignes connectées point par point, en chaîne ouverte ou en contour fermé. C'est l'outil de base de la plupart des profils.",
"help.sketch.line.midpoint": "Dessine une ligne de son milieu vers une extrémité, l'autre extrémité étant son symétrique. À utiliser pour des lignes centrées sur un point, comme une arête symétrique.",
@@ -1642,7 +1633,6 @@
"help.sketch.pattern.circular": "Copie la géométrie d'esquisse autour d'un centre, sur un cercle complet ou un angle donné. À utiliser pour des cercles de perçages, des rayons et des dents.",
"help.sketch.pattern.rectangular": "Copie la géométrie d'esquisse en lignes et colonnes à des espacements donnés. À utiliser pour des grilles de trous, de rainures ou d'aérations.",
"help.sketch.point": "Place un point d'esquisse. À utiliser comme référence pour des cotes, des contraintes, des centres de perçage ou des fonctions ultérieures.",
"help.sketch.point.divide": "Place des points qui divisent les courbes choisies en longueurs égales. Les points restent sur chaque courbe et gardent leur espacement quand elle change.",
"help.sketch.point3d": "Place un point dans l'espace, avec Esquisse 3D activée. À utiliser comme référence pour des courbes et trajectoires 3D.",
"help.sketch.polygon.circumscribed": "Dessine un polygone régulier autour d'un cercle, dimensionné du centre au milieu d'un côté. À utiliser lorsque la largeur sur plats est connue, comme pour un écrou hexagonal.",
"help.sketch.polygon.edge": "Dessine un polygone régulier à partir des deux extrémités d'un côté. À utiliser lorsque la longueur et la position d'un côté sont connues.",
@@ -1899,7 +1889,6 @@
"material.editor.preserved_appearance": "Apparence conservée",
"material.editor.public_reference": "Référence publique",
"material.editor.reference": "Référence",
"material.editor.remove": "Retirer",
"material.editor.save_or_discard": "Enregistrez ou abandonnez le brouillon de matériau avant d'affecter un matériau.",
"material.editor.saved": "Matériau enregistré. Les affectations des corps sont inchangées.",
"material.editor.scope": "Enregistrer stocke ce matériau sans l'affecter à des corps. Les propriétés et conditions vides restent inconnues. La masse volumique de la fiche ne modifie ni la masse volumique affectée ni la masse.",
@@ -2166,8 +2155,6 @@
"prefs.bottom_centre": "Bas centre",
"prefs.bottom_right": "Bas droite",
"prefs.browser": "Navigateur",
"prefs.browser_body_features": "Fonctions sous les corps",
"prefs.browser_body_features_note": "Chaque corps du navigateur se déplie sur les fonctions de l'historique qui l'ont construit, dans l'ordre de l'historique.",
"prefs.browser_components_open": "Composants dépliés au départ",
"prefs.browser_components_open_note": "Chaque composant du navigateur commence déplié, comme avant, au lieu de rester replié jusqu'à ce que vous le dépliiez.",
"prefs.browser_eye_left": "Œil à côté de la flèche de dépliage",
@@ -2211,8 +2198,6 @@
"prefs.edges": "Arêtes et ombrage",
"prefs.extend": "Étendre",
"prefs.extra_navigation": "Ctrl+glisser gauche dans le vide fait orbiter ; maintenir Espace pour un panoramique.",
"prefs.extrude_arrow_face_stops": "La flèche d'extrusion s'arrête aux faces",
"prefs.extrude_arrow_face_stops_note": "En faisant glisser la flèche de distance d'Extrusion, elle s'arrête aux faces planes parallèles au profil, comme l'autre côté d'un bloc qu'on découpe, et souligne la face. Désactivé : la flèche avance seulement par pas ronds.",
"prefs.extrude_view_isometric": "Passer la vue en isométrique à l'ouverture de l'extrusion",
"prefs.extrude_view_return": "Revenir à la vue précédente à la fermeture de l'extrusion",
"prefs.follows_os": "Suit le système",
@@ -2292,8 +2277,6 @@
"prefs.mouse": "Souris et pavé tactile",
"prefs.mouse_heading": "Souris",
"prefs.mouse_mapping": "Affectation des boutons de la souris",
"prefs.move_drag_highlights": "Mettre en évidence ce qui est sous le pointeur pendant que les flèches de Déplacer font glisser un composant",
"prefs.move_drag_highlights_tip": "Désactivé : pendant que les flèches de Déplacer font glisser un composant, rien n’est mis en évidence sous le pointeur, ce qui garde les grands assemblages fluides. Avec une coupe ou une analyse affichée, la mise en évidence reste, et une pièce glissée le long de ses liaisons n’en montre jamais.",
"prefs.navigation": "Navigation",
"prefs.navigation_note": "Comment la souris, le pavé tactile et la souris 3D déplacent la vue.",
"prefs.navigator_fit": "Cadrer le modèle après un changement de vue du repère de navigation",
@@ -2369,8 +2352,6 @@
"prefs.shortcuts": "Raccourcis",
"prefs.single_surface_analysis": "Utiliser une seule analyse de surface",
"prefs.single_surface_analysis_help": "Désactivé, l'ombrage de surface et Continuité peuvent rester actifs ensemble. Activé, seule la dernière analyse lancée ou modifiée est conservée.",
"prefs.sketch.escape_twice_finishes": "Un double Échap termine l'esquisse",
"prefs.sketch.escape_twice_finishes_note": "Deux pressions rapides sur Échap terminent l'esquisse. Désactivé : Échap annule seulement l'outil ou la sélection, et Terminer l'esquisse ferme l'esquisse.",
"prefs.sketch_align_points": "S'aligner sur d'autres points d'esquisse pendant le dessin",
"prefs.sketch_align_points_note": "Pendant le dessin, un point s'aligne à la fois horizontalement sur un point d'esquisse et verticalement sur un autre, avec un guide en pointillés, et le clic conserve les deux alignements. Désactivé : uniquement sur le point précédent, un axe à la fois.",
"prefs.sketch_conflict_colour": "Géométrie en conflit dans la couleur de conflit",
@@ -2794,8 +2775,6 @@
"render.cpu_lighting": "Préréglage d'éclairage",
"render.cpu_lights": "Lumières CPU",
"render.cpu_linear_color": "Couleur linéaire (R, V, B)",
"render.cpu_maps_saved_help": "Le rendu CPU accepte les cartes opaques enregistrées : choisissez une surface, puis enregistrez ses cartes dans la vue. Avec l’éclairage indirect, un autre corps peut utiliser Verre ; le corps avec les cartes ne le peut pas. Désactivez les réflexions sélectionnées, l’anisotropie et les effets procéduraux. Les fichiers temporaires de cartes utilisent le GPU.",
"render.cpu_material_certification": "La vérification CPU valide la géométrie de verre prise en charge avant le rendu. Le verre fermé utilise la distance géométrique.",
"render.cpu_neutral": "Neutre",
"render.cpu_opaque_required": "Le lancer de rayons CPU nécessite un arrière-plan opaque. Décochez Arrière-plan transparent pour continuer.",
"render.cpu_options_pending": "Ce panneau CPU ne peut pas encore modifier l'émission, les effets de surface, le verre ni l'anisotropie. Effacez ces options d'API avant de l'utiliser.",
@@ -3020,11 +2999,9 @@
"render.frame_wide": "16:9 · Écran large",
"render.gpu_depth": "Profondeur maximale des chemins",
"render.gpu_options_help": "Les échantillons, la profondeur, la graine et l'exposition sont enregistrés avec ce préréglage. Seule la méthode d'image active est enregistrée.",
"render.gpu_path_crashed": "SolidCraft s’est fermé pendant sa dernière préparation sur cet adaptateur graphique, très probablement dans le pilote graphique ; il n’est donc plus préparé de lui-même. Utilisez le lancer de rayons sur le CPU, ou réessayez (une mise à jour du pilote réessaie aussi).",
"render.gpu_path_failed": "Traceur de chemins GPU indisponible",
"render.gpu_path_first_setup": "La première initialisation sur ce GPU peut prendre plusieurs minutes ; SolidCraft reste utilisable pendant ce temps. Les démarrages suivants réutilisent les shaders compilés lorsque le pilote les conserve.",
"render.gpu_path_preparing": "Traceur de chemins GPU : compilation des shaders…",
"render.gpu_path_retry": "Réessayer",
"render.gpu_seed": "Graine aléatoire",
"render.gpu_unavailable": "Le tracé de chemins GPU n'est pas prêt sur cet appareil.",
"render.ground_apply": "Ajuster et enregistrer le sol",
@@ -3832,8 +3809,6 @@
"sample.plate.name": "Plaque d'exemple",
"sample.vents.about": "Rainures en répétition rectangulaire : lignes, colonnes et pas sont des paramètres",
"sample.vents.name": "Plaque d'aération",
"scale.per_axis": "Par axe",
"scale.uniform": "Uniforme",
"search.command_keys": "Entrée exécuter Maj+Entrée exécuter et garder ouvert Échap fermer",
"search.commands": "Commandes",
"search.design": "Dans cette conception",
@@ -3921,7 +3896,6 @@
"sketch.dimension_applied": "Cote appliquée",
"sketch.dimension_applied_defined": "Cote appliquée ; paramètre `{name}` défini",
"sketch.dimension_applied_renamed": "Cote appliquée ; paramètre nommé `{name}`",
"sketch.divide_hint": "Les points divisent chaque courbe en longueurs égales et les gardent quand elle change.",
"sketch.dof_left": "{count} degrés de liberté restants",
"sketch.dof_left_one": "{count} degré de liberté restant",
"sketch.draw_curves": "Dessiner en {linetype}",
@@ -4464,7 +4438,6 @@
"ui.click_selects_whole_bodies": "Un clic sélectionne des corps entiers",
"ui.click_then_press_key": "Cliquer, puis appuyer sur la nouvelle touche",
"ui.close": "Fermer",
"ui.close_tab": "Fermer l’onglet",
"ui.coil": "Hélice",
"ui.coincident": "Coïncidence",
"ui.collapse": "Réduire",
@@ -4711,7 +4684,6 @@
"ui.heading_create_sketch": "CRÉER UNE ESQUISSE",
"ui.heading_cylinder": "CYLINDRE",
"ui.heading_design": "DESIGN",
"ui.heading_divide_curve": "DIVISER LA COURBE",
"ui.heading_draft": "DÉPOUILLE",
"ui.heading_edit": "ÉDITION",
"ui.heading_equation_curve": "COURBE PAR ÉQUATION",
@@ -4869,8 +4841,6 @@
"ui.mesh_format_3mf": "3MF",
"ui.mesh_format_3mf_tagged": "3MF avec étiquettes de faces",
"ui.mesh_format_stl": "STL",
"ui.mesh_import_origin": "Déplacer à l'origine",
"ui.mesh_import_origin_tip": "Centre le maillage en X et Y et pose sa base sur Z = 0. Désactivé, le maillage garde les coordonnées enregistrées dans le fichier.",
"ui.minor_radius": "Petit rayon",
"ui.mirror": "Symétrie",
"ui.mirror_line": "Ligne de symétrie",
@@ -4951,7 +4921,6 @@
"ui.point_cloud_add_filter": "Ajouter un filtre…",
"ui.point_cloud_auto_range": "Plage automatique",
"ui.point_cloud_color_by": "Colorer par",
"ui.point_cloud_dots": "Points isolés",
"ui.point_cloud_file_colors": "Couleurs du fichier",
"ui.point_cloud_filter_by": "Filtrer par",
"ui.point_cloud_height_high": "Plus haut",
@@ -4960,7 +4929,6 @@
"ui.point_cloud_no_file_colors": "Le fichier n'a pas de couleurs",
"ui.point_cloud_pause": "Pause",
"ui.point_cloud_play": "Lire",
"ui.point_cloud_reload": "Recharger le fichier",
"ui.point_cloud_single_color": "Couleur unique",
"ui.point_cloud_size": "Taille des points",
"ui.point_cloud_units": "Unités du fichier",
@@ -5020,8 +4988,6 @@
"ui.renderer": "Moteur de rendu",
"ui.repeat": "Répéter",
"ui.repeat_nothing": "Rien à répéter pour l'instant : lancer d'abord un outil ou une boîte de dialogue.",
"ui.replace_sketch.from_file": "Depuis un fichier de conception…",
"ui.replace_sketch.no_sketches": "Cette conception ne contient aucune esquisse",
"ui.replace_with_link_done": "Les copies sont maintenant des placements de la conception liée.",
"ui.report_a_bug": "Signaler un bug",
"ui.reset": "Réinitialiser",
@@ -5055,7 +5021,6 @@
"ui.second_rail": "Second rail",
"ui.section_analysis": "Analyse de coupe",
"ui.section_size": "Taille de la section",
"ui.segments": "Segments",
"ui.select": "Sélectionner",
"ui.selectOther": "Sélectionner un autre…",
"ui.selectTangentChain": "Sélectionner la chaîne tangente",
+1 -4
View File
@@ -1621,7 +1621,7 @@
"help.sketch.insert_svg": "Le os trazados dun debuxo SVG nun bosquexo, escalados, xirados e colocados onde indiques. Úsao para converter un logotipo ou un contorno vectorial en curvas que podes extruír.",
"help.sketch.inspect": "Abre un informe do bosquexo aberto: cantos graos de liberdade quedan e se está totalmente restrinxido. Úsao para saber o que aínda se move antes de rematar o bosquexo.",
"help.sketch.intersect": "Engade as curvas ou os puntos onde corpos, caras, arestas ou outros bosquexos cruzan o plano do bosquexo. Quedan ligados e seguen o modelo cando cambia.",
"help.sketch.intersection_curve": "Crea curvas 3D onde se atopan dous corpos, caras ou curvas doutros bosquexos, ligadas a eles. Úsaas como traxectorias ou guías que seguen o modelo.",
"help.sketch.intersection_curve": "Crea curvas 3D onde se atopan dous corpos ou caras, ligadas a eles. Úsaas como traxectorias ou guías que seguen o modelo.",
"help.sketch.isoparametric_curve": "Crea unha curva 3D na dirección U ou V dunha cara por un punto que escollas, ligada á cara. Úsaa como traxectoria ou liña de división que segue a superficie.",
"help.sketch.line": "Debuxa liñas conectadas punto a punto, como cadea aberta ou como contorno pechado. É a ferramenta básica para a maioría dos perfís.",
"help.sketch.line.midpoint": "Debuxa unha liña desde o seu punto medio ata un extremo, co outro extremo reflectido. Úsao para liñas centradas nun punto, como unha aresta simétrica.",
@@ -1889,7 +1889,6 @@
"material.editor.preserved_appearance": "Aparencia conservada",
"material.editor.public_reference": "Referencia pública",
"material.editor.reference": "Referencia",
"material.editor.remove": "Quitar",
"material.editor.save_or_discard": "Garda ou descarta o borrador do material antes de asignar un material.",
"material.editor.saved": "Material gardado. As asignacións aos corpos non cambian.",
"material.editor.scope": "Gardar almacena este material sen asignalo a corpos. As propiedades e condicións en branco seguen sendo descoñecidas. A densidade da ficha non cambia a densidade asignada nin a masa.",
@@ -3808,8 +3807,6 @@
"sample.plate.name": "Placa de exemplo",
"sample.vents.about": "Ranuras nun patrón rectangular: filas, columnas e paso son parámetros",
"sample.vents.name": "Placa de ventilación",
"scale.per_axis": "Por eixo",
"scale.uniform": "Uniforme",
"search.command_keys": "Intro executar Maiús+Intro executar e manter aberto Esc pechar",
"search.commands": "Ordes",
"search.design": "Neste deseño",
+14 -587
View File
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -1621,7 +1621,7 @@
"help.sketch.insert_svg": "Čita putanje SVG crteža u skicu, skalirane, zakrenute i postavljene kako zadate. Upotrijebite ga za pretvaranje logotipa ili vektorskog obrisa u krivulje koje možete ekstrudirati.",
"help.sketch.inspect": "Otvara izvješće o otvorenoj skici: koliko je stupnjeva slobode preostalo i je li potpuno ograničena. Upotrijebite ga kako biste saznali što se još pomiče prije dovršetka skice.",
"help.sketch.intersect": "Dodaje krivulje ili točke u kojima tijela, lica, bridovi ili druge skice presijecaju ravninu skice. Ostaju povezane i prate model kad se promijeni.",
"help.sketch.intersection_curve": "Izrađuje 3D krivulje na mjestu gdje se dva tijela, lica ili krivulje drugih skica susreću, povezane s njima. Upotrijebite ih kao putanje ili vodilice koje prate model.",
"help.sketch.intersection_curve": "Izrađuje 3D krivulje na mjestu gdje se dva tijela ili lica susreću, povezane s njima. Upotrijebite ih kao putanje ili vodilice koje prate model.",
"help.sketch.isoparametric_curve": "Izrađuje 3D krivulju u smjeru U ili V lica kroz točku koju odaberete, povezanu s licem. Upotrijebite je kao putanju ili liniju razdvajanja koja prati plohu.",
"help.sketch.line": "Crta povezane linije točku po točku, kao otvoreni lanac ili zatvoreni obris. To je osnovni alat za većinu profila.",
"help.sketch.line.midpoint": "Crta liniju od njezine središnje točke do jednog kraja, a drugi kraj zrcali. Upotrijebite ga za linije centrirane na točku, primjerice simetričan brid.",
@@ -1889,7 +1889,6 @@
"material.editor.preserved_appearance": "Očuvani izgled",
"material.editor.public_reference": "Javna referenca",
"material.editor.reference": "Referenca",
"material.editor.remove": "Ukloni",
"material.editor.save_or_discard": "Spremite ili odbacite nacrt materijala prije dodjele materijala.",
"material.editor.saved": "Materijal je spremljen. Dodjele tijelima ostaju nepromijenjene.",
"material.editor.scope": "Spremi pohranjuje ovaj materijal bez dodjele tijelima. Prazna svojstva i uvjeti ostaju nepoznati. Gustoća s kartice ne mijenja dodijeljenu gustoću ni masu.",
+1 -4
View File
@@ -1621,7 +1621,7 @@
"help.sketch.insert_svg": "Beolvassa egy SVG-rajz útvonalait egy vázlatba, az Ön által megadott léptékkel, elforgatással és helyen. Használja egy logó vagy vektoros körvonal kihúzható görbékké alakítására.",
"help.sketch.inspect": "Jelentést nyit a megnyitott vázlatról: hány szabadságfok maradt, és teljesen kényszerezett-e. Használja annak kiderítésére, mi mozdul még, mielőtt befejezi a vázlatot.",
"help.sketch.intersect": "Hozzáadja azokat a görbéket vagy pontokat, ahol testek, lapok, élek vagy más vázlatok metszik a vázlatsíkot. Kapcsoltak maradnak, és követik a modellt, ha az megváltozik.",
"help.sketch.intersection_curve": "3D görbéket hoz létre ott, ahol két test, lap vagy más vázlatok görbéi találkozik, hozzájuk kapcsolva. Használja őket útvonalként vagy vezérgörbeként, amely követi a modellt.",
"help.sketch.intersection_curve": "3D görbéket hoz létre ott, ahol két test vagy lap találkozik, hozzájuk kapcsolva. Használja őket útvonalként vagy vezérgörbeként, amely követi a modellt.",
"help.sketch.isoparametric_curve": "3D görbét hoz létre egy lap U vagy V iránya mentén egy kiválasztott ponton át, a laphoz kapcsolva. Használja útvonalként vagy osztóvonalként, amely követi a felületet.",
"help.sketch.line": "Összefüggő vonalakat rajzol pontról pontra, nyitott láncként vagy zárt körvonalként. Ez a legtöbb profil alapeszköze.",
"help.sketch.line.midpoint": "Vonalat rajzol a felezőpontjától az egyik végéig, a másik véget tükrözve. Használja egy pontra középen álló vonalakhoz, például szimmetrikus élhez.",
@@ -1889,7 +1889,6 @@
"material.editor.preserved_appearance": "Megőrzött megjelenés",
"material.editor.public_reference": "Nyilvános hivatkozás",
"material.editor.reference": "Hivatkozás",
"material.editor.remove": "Eltávolítás",
"material.editor.save_or_discard": "Anyag hozzárendelése előtt mentse vagy vesse el az anyagvázlatot.",
"material.editor.saved": "Az anyag mentve. A testekhez rendelt anyagok nem változtak.",
"material.editor.scope": "A Mentés az anyagot a testekhez való hozzárendelés nélkül tárolja. Az üres tulajdonságok és feltételek ismeretlenek maradnak. A kártyán szereplő sűrűség nem változtatja meg a hozzárendelt sűrűséget vagy a tömeget.",
@@ -3808,8 +3807,6 @@
"sample.plate.name": "Mintalemez",
"sample.vents.about": "Hornyok téglalap mintában: a sorok, oszlopok és osztás paraméterek",
"sample.vents.name": "Szellőzőlemez",
"scale.per_axis": "Tengelyenként",
"scale.uniform": "Egyenletes",
"search.command_keys": "Enter futtatás Shift+Enter futtatás és nyitva tartás Esc bezárás",
"search.commands": "Parancsok",
"search.design": "Ebben a tervben",
+1 -4
View File
@@ -1621,7 +1621,7 @@
"help.sketch.insert_svg": "Membaca path gambar SVG ke dalam sketsa, diskalakan, diputar, dan ditempatkan sesuai pengaturan Anda. Gunakan untuk mengubah logo atau kontur vektor menjadi kurva yang dapat diekstrusi.",
"help.sketch.inspect": "Membuka laporan tentang sketsa yang terbuka: berapa derajat kebebasan yang tersisa dan apakah sketsa terbatasi penuh. Gunakan untuk mengetahui apa yang masih bergerak sebelum Anda menyelesaikan sketsa.",
"help.sketch.intersect": "Menambahkan kurva atau titik tempat bodi, muka, tepi, atau sketsa lain memotong bidang sketsa. Semuanya tetap tertaut dan mengikuti model saat model berubah.",
"help.sketch.intersection_curve": "Membuat kurva 3D di tempat dua bodi, muka, atau kurva sketsa lain bertemu, tertaut padanya. Gunakan sebagai jalur atau rel pemandu yang mengikuti model.",
"help.sketch.intersection_curve": "Membuat kurva 3D di tempat dua bodi atau muka bertemu, tertaut padanya. Gunakan sebagai jalur atau rel pemandu yang mengikuti model.",
"help.sketch.isoparametric_curve": "Membuat kurva 3D sepanjang arah U atau V sebuah muka melalui titik yang Anda pilih, tertaut ke muka itu. Gunakan sebagai jalur atau garis pisah yang mengikuti permukaan.",
"help.sketch.line": "Menggambar garis-garis tersambung titik demi titik, sebagai rantai terbuka atau kontur tertutup. Ini alat dasar untuk sebagian besar profil.",
"help.sketch.line.midpoint": "Menggambar garis dari titik tengahnya ke satu ujung, dengan ujung lainnya dicerminkan. Gunakan untuk garis yang dipusatkan pada sebuah titik, seperti tepi simetris.",
@@ -1889,7 +1889,6 @@
"material.editor.preserved_appearance": "Tampilan yang dipertahankan",
"material.editor.public_reference": "Referensi publik",
"material.editor.reference": "Referensi",
"material.editor.remove": "Hapus",
"material.editor.save_or_discard": "Simpan atau buang draf material sebelum menetapkan material.",
"material.editor.saved": "Material disimpan. Penetapan ke bodi tidak berubah.",
"material.editor.scope": "Simpan menyimpan material ini tanpa menetapkannya ke bodi. Properti dan kondisi yang dikosongkan tetap dianggap tidak diketahui. Massa jenis pada kartu tidak mengubah massa jenis atau massa yang sudah ditetapkan.",
@@ -3808,8 +3807,6 @@
"sample.plate.name": "Pelat Contoh",
"sample.vents.about": "Slot dalam pola persegi panjang: baris, kolom, dan pitch adalah parameter",
"sample.vents.name": "Pelat Ventilasi",
"scale.per_axis": "Per sumbu",
"scale.uniform": "Seragam",
"search.command_keys": "Enter jalankan Shift+Enter jalankan dan tetap buka Esc tutup",
"search.commands": "Perintah",
"search.design": "Di desain ini",
+1 -15
View File
@@ -567,7 +567,6 @@
"Select edges": "Seleziona spigoli",
"Select points of the sketch being edited": "Seleziona punti dello schizzo in modifica",
"Select the centre the pattern turns around first": "Seleziona prima il centro attorno a cui ruota la serie",
"Select the curves to divide first": "Selezionare prima le curve da dividere",
"Select the curves to offset first": "Seleziona prima le curve per l'offset",
"Select the mirror line": "Seleziona la linea di simmetria",
"Select the sketch curves or points to mirror first": "Seleziona prima le curve o i punti dello schizzo da specchiare",
@@ -1195,7 +1194,6 @@
"cmd.sketch_options": "Opzioni della tavolozza schizzo",
"cmd.sketch_paste": "Incolla entità dello schizzo",
"cmd.sketch_point3d": "Punto 3D",
"cmd.sketch_point_divide": "Dividi curva",
"cmd.sketch_polygon_circumscribed": "Poligono circoscritto",
"cmd.sketch_polygon_edge": "Poligono per lato",
"cmd.sketch_polygon_inscribed": "Poligono inscritto",
@@ -1366,14 +1364,11 @@
"dialog.computing": "Calcolo in corso… {seconds} s",
"dialog.could_not_be_checked": "impossibile verificare",
"dialog.custom_axis": "↖ Asse personalizzato",
"dialog.cylinder_face_tip": "La faccia o il vertice del modello su cui poggia il cilindro: fai clic qui, poi su di esso nella vista. Se resta vuoto, lo posizionano X, Y e Z.",
"dialog.dimension_insert_hint": "Fai doppio clic su un’altra quota di controllo per inserirne il nome",
"dialog.dimension_name": "Quota: {name}",
"dialog.edit_title": "MODIFICA {title}",
"dialog.no_shown_body": "Nessun corpo visibile da modificare: mostrane uno o scegli Nuovo corpo",
"dialog.pattern_sketch_not_object": "Seleziona corpi o lavorazioni: uno schizzo non è nessuno dei due. Ripeti le sue curve con Ripetizione o Specchia dello schizzo stesso, oppure estrudilo prima.",
"dialog.primitive_point_tip": "Un punto che compila X, Y e Z: fai clic qui, poi su un vertice, uno spigolo o una faccia del modello, su un punto di uno schizzo oppure sull'origine.",
"dialog.reference_edge_tip": "Uno spigolo rettilineo della faccia scelta da cui si misura la distanza sotto: fai clic qui, poi sullo spigolo.",
"dialog.select": "↖ Seleziona",
"dialog.selected_count": "↖ Selezionati: {count}",
"dialog.selection_constraint": "Vincolo {id}",
@@ -1627,7 +1622,7 @@
"help.sketch.insert_svg": "Legge i tracciati di un disegno SVG in uno schizzo, scalati, ruotati e posizionati come imposti. Usalo per trasformare un logo o un contorno vettoriale in curve che puoi estrudere.",
"help.sketch.inspect": "Apre un rapporto sullo schizzo aperto: quanti gradi di libertà restano e se è completamente vincolato. Usalo per scoprire cosa si muove ancora prima di terminare lo schizzo.",
"help.sketch.intersect": "Aggiunge le curve o i punti in cui corpi, facce, spigoli o altri schizzi attraversano il piano dello schizzo. Restano collegati e seguono il modello quando cambia.",
"help.sketch.intersection_curve": "Crea curve 3D dove si incontrano due corpi, facce o curve di altri schizzi, collegate a essi. Usale come percorsi o guide che seguono il modello.",
"help.sketch.intersection_curve": "Crea curve 3D dove si incontrano due corpi o facce, collegate a essi. Usale come percorsi o guide che seguono il modello.",
"help.sketch.isoparametric_curve": "Crea una curva 3D lungo la direzione U o V di una faccia passante per un punto che scegli, collegata alla faccia. Usala come percorso o linea di divisione che segue la superficie.",
"help.sketch.line": "Disegna linee collegate punto per punto, come catena aperta o contorno chiuso. È lo strumento di base per la maggior parte dei profili.",
"help.sketch.line.midpoint": "Disegna una linea dal suo punto medio fino a un'estremità, con l'altra estremità speculare. Usalo per linee centrate su un punto, come un bordo simmetrico.",
@@ -1639,7 +1634,6 @@
"help.sketch.pattern.circular": "Copia la geometria dello schizzo attorno a un punto centrale, su un cerchio completo o su un angolo stabilito. Usalo per cerchi di bulloni, raggi e denti.",
"help.sketch.pattern.rectangular": "Copia la geometria dello schizzo in righe e colonne con spaziature stabilite. Usalo per griglie di fori, asole o prese d'aria.",
"help.sketch.point": "Colloca un punto dello schizzo. Usalo come riferimento per quote, vincoli, centri di fori o lavorazioni successive.",
"help.sketch.point.divide": "Posiziona punti che dividono le curve scelte in lunghezze uguali. I punti restano su ogni curva e ne mantengono la spaziatura quando cambia.",
"help.sketch.point3d": "Colloca un punto nello spazio, con Schizzo 3D attivo. Usalo come riferimento per curve e percorsi 3D.",
"help.sketch.polygon.circumscribed": "Disegna un poligono regolare attorno a un cerchio, dimensionato dal centro al punto medio di un lato. Usalo quando è nota l'apertura chiave, come per un dado esagonale.",
"help.sketch.polygon.edge": "Disegna un poligono regolare a partire dai due estremi di un lato. Usalo quando sono note la lunghezza e la posizione di un lato.",
@@ -1896,7 +1890,6 @@
"material.editor.preserved_appearance": "Aspetto conservato",
"material.editor.public_reference": "Riferimento pubblico",
"material.editor.reference": "Riferimento",
"material.editor.remove": "Rimuovi",
"material.editor.save_or_discard": "Salva o scarta la bozza del materiale prima di assegnare un materiale.",
"material.editor.saved": "Materiale salvato. Le assegnazioni ai corpi non sono cambiate.",
"material.editor.scope": "Salva memorizza questo materiale senza assegnarlo ai corpi. Le proprietà e le condizioni lasciate vuote restano sconosciute. La densità della scheda non cambia la densità assegnata né la massa.",
@@ -3817,8 +3810,6 @@
"sample.plate.name": "Piastra di esempio",
"sample.vents.about": "Asole in ripetizione rettangolare: righe, colonne e passo sono parametri",
"sample.vents.name": "Piastra di ventilazione",
"scale.per_axis": "Per asse",
"scale.uniform": "Uniforme",
"search.command_keys": "Invio esegui Maiusc+Invio esegui e tieni aperto Esc chiudi",
"search.commands": "Comandi",
"search.design": "In questo progetto",
@@ -3906,7 +3897,6 @@
"sketch.dimension_applied": "Quota applicata",
"sketch.dimension_applied_defined": "Quota applicata; parametro `{name}` definito",
"sketch.dimension_applied_renamed": "Quota applicata; parametro denominato `{name}`",
"sketch.divide_hint": "I punti dividono ogni curva in lunghezze uguali e le mantengono quando cambia.",
"sketch.dof_left": "{count} gradi di libertà rimanenti",
"sketch.dof_left_one": "{count} grado di libertà rimanente",
"sketch.draw_curves": "Disegna come {linetype}",
@@ -4696,7 +4686,6 @@
"ui.heading_create_sketch": "CREA SCHIZZO",
"ui.heading_cylinder": "CILINDRO",
"ui.heading_design": "PROGETTAZIONE",
"ui.heading_divide_curve": "DIVIDI CURVA",
"ui.heading_draft": "SFORMO",
"ui.heading_edit": "MODIFICA",
"ui.heading_equation_curve": "CURVA DA EQUAZIONE",
@@ -4855,8 +4844,6 @@
"ui.mesh_format_3mf": "3MF",
"ui.mesh_format_3mf_tagged": "3MF con etichette delle facce",
"ui.mesh_format_stl": "STL",
"ui.mesh_import_origin": "Sposta all'origine",
"ui.mesh_import_origin_tip": "Centra la mesh in X e Y con la base su Z = 0. Se disattivato, la mesh mantiene le coordinate salvate nel file.",
"ui.minor_radius": "Raggio minore",
"ui.mirror": "Specchia",
"ui.mirror_line": "Asse di simmetria",
@@ -5037,7 +5024,6 @@
"ui.second_rail": "Seconda guida",
"ui.section_analysis": "Analisi in sezione",
"ui.section_size": "Dimensione della sezione",
"ui.segments": "Segmenti",
"ui.select": "Seleziona",
"ui.selectOther": "Seleziona altro…",
"ui.selectTangentChain": "Seleziona catena tangente",
+14 -587
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1939,7 +1939,6 @@
"material.editor.preserved_appearance": "შენარჩუნებული იერსახე",
"material.editor.public_reference": "საჯარო წყარო",
"material.editor.reference": "საცნობარო",
"material.editor.remove": "წაშლა",
"material.editor.save_or_discard": "მასალის მინიჭებამდე შეინახეთ ან გააუქმეთ მასალის მონახაზი.",
"material.editor.saved": "მასალა შენახულია. სხეულებზე მინიჭებები არ შეცვლილა.",
"material.editor.scope": "შენახვა ამ მასალას ინახავს სხეულებზე მინიჭების გარეშე. ცარიელი თვისებები და პირობები უცნობად რჩება. ბარათის სიმკვრივე არ ცვლის მინიჭებულ სიმკვრივეს ან მასას.",
+52 -1095
View File
File diff suppressed because it is too large Load Diff
+1 -4
View File
@@ -1621,7 +1621,7 @@
"help.sketch.insert_svg": "Membaca laluan lukisan SVG ke dalam lakaran, diskalakan, diputar dan diletakkan mengikut tetapan anda. Gunakan untuk menukar logo atau garis luar vektor kepada lengkung yang boleh disemperit.",
"help.sketch.inspect": "Membuka laporan tentang lakaran yang terbuka: berapa banyak darjah kebebasan yang tinggal dan sama ada ia terkekang sepenuhnya. Gunakan untuk mengetahui apa yang masih bergerak sebelum anda menamatkan lakaran.",
"help.sketch.intersect": "Menambah lengkung atau titik tempat jasad, muka, tepi atau lakaran lain melintasi satah lakaran. Ia kekal terpaut dan mengikut model apabila model berubah.",
"help.sketch.intersection_curve": "Mencipta lengkung 3D tempat dua jasad, muka atau lengkung lakaran lain bertemu, terpaut kepadanya. Gunakan sebagai laluan atau rel pemandu yang mengikut model.",
"help.sketch.intersection_curve": "Mencipta lengkung 3D tempat dua jasad atau muka bertemu, terpaut kepadanya. Gunakan sebagai laluan atau rel pemandu yang mengikut model.",
"help.sketch.isoparametric_curve": "Mencipta lengkung 3D di sepanjang arah U atau V muka melalui titik yang anda pilih, terpaut kepada muka itu. Gunakan sebagai laluan atau garis belahan yang mengikut permukaan.",
"help.sketch.line": "Melukis garis bersambung titik demi titik, sebagai rantaian terbuka atau garis luar tertutup. Ia ialah alat asas bagi kebanyakan profil.",
"help.sketch.line.midpoint": "Melukis garis daripada titik tengahnya ke satu hujung, dengan hujung satu lagi dicerminkan. Gunakan untuk garis yang berpusat pada satu titik, seperti tepi simetri.",
@@ -1889,7 +1889,6 @@
"material.editor.preserved_appearance": "Penampilan dikekalkan",
"material.editor.public_reference": "Rujukan awam",
"material.editor.reference": "Rujukan",
"material.editor.remove": "Buang",
"material.editor.save_or_discard": "Simpan atau buang draf bahan sebelum menetapkan bahan.",
"material.editor.saved": "Bahan disimpan. Penetapan jasad tidak berubah.",
"material.editor.scope": "Simpan menyimpan bahan ini tanpa menetapkannya pada jasad. Sifat dan keadaan yang dibiarkan kosong kekal tidak diketahui. Ketumpatan kad tidak mengubah ketumpatan yang ditetapkan atau jisim.",
@@ -3808,8 +3807,6 @@
"sample.plate.name": "Plat Contoh",
"sample.vents.about": "Corak slot segi empat tepat: baris, lajur dan pic sebagai parameter",
"sample.vents.name": "Plat Pengudaraan",
"scale.per_axis": "Mengikut paksi",
"scale.uniform": "Seragam",
"search.command_keys": "Enter jalankan Shift+Enter jalankan dan kekalkan terbuka Esc tutup",
"search.commands": "Arahan",
"search.design": "Dalam reka bentuk ini",
+1 -4
View File
@@ -1621,7 +1621,7 @@
"help.sketch.insert_svg": "Leser banene fra en SVG-tegning inn i en skisse, skalert, dreid og plassert slik du angir. Bruk det til å gjøre en logo eller vektorkontur om til kurver du kan ekstrudere.",
"help.sketch.inspect": "Åpner en rapport om den åpne skissen: hvor mange frihetsgrader som gjenstår og om den er fullstendig bundet. Bruk det til å finne ut hva som fortsatt beveger seg før du fullfører skissen.",
"help.sketch.intersect": "Legger til kurvene eller punktene der kropper, flater, kanter eller andre skisser krysser skisseplanet. De forblir koblet og følger modellen når den endres.",
"help.sketch.intersection_curve": "Oppretter 3D-kurver der to kropper, flater eller kurver fra andre skisser møtes, koblet til dem. Bruk dem som baner eller føringskurver som følger modellen.",
"help.sketch.intersection_curve": "Oppretter 3D-kurver der to kropper eller flater møtes, koblet til dem. Bruk dem som baner eller føringskurver som følger modellen.",
"help.sketch.isoparametric_curve": "Oppretter en 3D-kurve langs U- eller V-retningen til en flate gjennom et punkt du velger, koblet til flaten. Bruk den som en bane eller delelinje som følger flaten.",
"help.sketch.line": "Tegner sammenhengende linjer punkt for punkt, som en åpen kjede eller en lukket kontur. Det er det grunnleggende verktøyet for de fleste profiler.",
"help.sketch.line.midpoint": "Tegner en linje fra midtpunktet og ut til den ene enden, med den andre enden speilet. Bruk det til linjer sentrert på et punkt, for eksempel en symmetrisk kant.",
@@ -1889,7 +1889,6 @@
"material.editor.preserved_appearance": "Bevart utseende",
"material.editor.public_reference": "Offentlig referanse",
"material.editor.reference": "Referanse",
"material.editor.remove": "Fjern",
"material.editor.save_or_discard": "Lagre eller forkast materialutkastet før du tildeler et materiale.",
"material.editor.saved": "Materialet er lagret. Kroppstildelinger er uendret.",
"material.editor.scope": "Ved lagring lagres materialet uten at det tildeles kropper. Tomme egenskaper og betingelser forblir ukjente. Tettheten på kortet endrer ikke tildelt tetthet eller masse.",
@@ -3808,8 +3807,6 @@
"sample.plate.name": "Eksempelplate",
"sample.vents.about": "Spor i et rektangulært mønster: rader, kolonner og stigning er parametere",
"sample.vents.name": "Ventilasjonsplate",
"scale.per_axis": "Per akse",
"scale.uniform": "Jevn",
"search.command_keys": "Enter kjør Shift+Enter kjør og behold åpen Esc lukk",
"search.commands": "Kommandoer",
"search.design": "I dette designet",
+1 -4
View File
@@ -1625,7 +1625,7 @@
"help.sketch.insert_svg": "Leest de paden van een SVG-tekening in een schets, geschaald, gedraaid en geplaatst waar je instelt. Gebruik dit om een logo of vectorcontour om te zetten in curven die je kunt extruderen.",
"help.sketch.inspect": "Opent een rapport over de geopende schets: hoeveel vrijheidsgraden er nog over zijn en of hij volledig beperkt is. Gebruik dit om te zien wat nog beweegt voordat je de schets voltooit.",
"help.sketch.intersect": "Voegt de curven of punten toe waar lichamen, vlakken, randen of andere schetsen het schetsvlak kruisen. Ze blijven gekoppeld en volgen het model wanneer dat verandert.",
"help.sketch.intersection_curve": "Maakt 3D-curven waar twee lichamen, vlakken of curven van andere schetsen samenkomen, eraan gekoppeld. Gebruik ze als paden of geleiders die het model volgen.",
"help.sketch.intersection_curve": "Maakt 3D-curven waar twee lichamen of vlakken samenkomen, eraan gekoppeld. Gebruik ze als paden of geleiders die het model volgen.",
"help.sketch.isoparametric_curve": "Maakt een 3D-curve langs de U- of V-richting van een vlak door een punt dat je kiest, gekoppeld aan het vlak. Gebruik dit als pad of splitslijn die het oppervlak volgt.",
"help.sketch.line": "Tekent verbonden lijnen punt voor punt, als open keten of gesloten contour. Het is het basisgereedschap voor de meeste profielen.",
"help.sketch.line.midpoint": "Tekent een lijn vanuit zijn middelpunt naar één uiteinde, waarbij het andere uiteinde wordt gespiegeld. Gebruik dit voor lijnen die op een punt zijn gecentreerd, zoals een symmetrische rand.",
@@ -1893,7 +1893,6 @@
"material.editor.preserved_appearance": "Behouden uiterlijk",
"material.editor.public_reference": "Openbare referentie",
"material.editor.reference": "Referentie",
"material.editor.remove": "Verwijderen",
"material.editor.save_or_discard": "Sla het materiaalconcept op of verwerp het voordat je een materiaal toewijst.",
"material.editor.saved": "Materiaal opgeslagen. Toewijzingen aan lichamen zijn ongewijzigd.",
"material.editor.scope": "Opslaan bewaart dit materiaal zonder het aan lichamen toe te wijzen. Lege eigenschappen en voorwaarden blijven onbekend. De dichtheid op de kaart wijzigt de toegewezen dichtheid of massa niet.",
@@ -3819,8 +3818,6 @@
"sample.plate.name": "Voorbeeldplaat",
"sample.vents.about": "Sleuven in een rechthoekig patroon: rijen, kolommen en spoed zijn parameters",
"sample.vents.name": "Ventilatieplaat",
"scale.per_axis": "Per as",
"scale.uniform": "Uniform",
"search.command_keys": "Enter uitvoeren Shift+Enter uitvoeren en open houden Esc sluiten",
"search.commands": "Opdrachten",
"search.design": "In dit ontwerp",
@@ -1,622 +0,0 @@
{
"fi": {
" Keys": " Avainruudut",
" Maximum": " Enimmäisarvo",
" Minimum": " Vähimmäisarvo",
" Of": " Vapausaste",
" Value": " Arvo",
"ABS - Black": "ABS - musta",
"ABS - Grey": "ABS - harmaa",
"ABS - White": "ABS - valkoinen",
"ALIGN": "KOHDISTA",
"AS-BUILT JOINT": "NYKYASENNON MUKAINEN NIVEL",
"ASSIGN PLASTIC RULE": "MÄÄRITÄ MUOVISÄÄNTÖ",
"AXIS PERPENDICULAR TO FACE": "AKSELI KOHTISUORAAN PINTAAN",
"AXIS THROUGH CYLINDER": "AKSELI SYLINTERIN KAUTTA",
"AXIS THROUGH EDGE": "AKSELI SÄRMÄN KAUTTA",
"AXIS THROUGH TWO PLANES": "AKSELI KAHDEN TASON KAUTTA",
"AXIS THROUGH TWO POINTS": "AKSELI KAHDEN PISTEEN KAUTTA",
"Add shortcut": "Lisää pikanäppäin",
"Allowed values": "Sallitut arvot",
"Aluminum - Satin": "Alumiini - satiini",
"Anodized Black": "Anodisoitu musta",
"Any": "Mikä tahansa",
"BOSS": "TAPPI",
"BOUNDARY FILL": "RAJATÄYTTÖ",
"Brass": "Messinki",
"Built-in": "Sisäänrakennettu",
"By definition": "Määrittelyn mukaan",
"By part number": "Osanumeron mukaan",
"CAM": "CAM",
"CONTACT SET": "KOSKETUSJOUKKO",
"CONVERT MESH": "MUUNNA VERKKO",
"CONVERT TO SHEET METAL": "MUUNNA OHUTLEVYKSI",
"Chord length": "Jänteen pituus",
"Chrome": "Kromi",
"Close All Tabs": "Sulje kaikki välilehdet",
"Close Other Tabs": "Sulje muut välilehdet",
"Connect AI assistants…": "Yhdistä tekoälyavustajat…",
"Copper": "Kupari",
"Crash Reports…": "Kaatumisraportit…",
"Curvature continuous (G2)": "Kaarevuusjatkuva (G2)",
"DELETE FACE": "POISTA PINTA",
"DELETE FEATURE": "POISTA PIIRRE",
"DRIVE JOINTS": "OHJAA NIVELIÄ",
"Default material": "Oletusmateriaali",
"Design Properties…": "Mallin ominaisuudet…",
"Direct interaction": "Suora vuorovaikutus",
"Distance X": "Etäisyys X",
"Distance Y": "Etäisyys Y",
"Distance and Angle": "Etäisyys ja kulma",
"Download design": "Lataa malli",
"Drive parameter": "Ohjaa parametria",
"Drive suppression": "Ohjaa ohitusta",
"EDIT DIMENSION": "MUOKKAA MITTAA",
"EDIT JOINT": "MUOKKAA NIVELTÄ",
"EDIT MOTION STUDY": "MUOKKAA LIIKETUTKIMUSTA",
"EDIT TEXT": "MUOKKAA TEKSTIÄ",
"EMBOSS": "KOHOKUVIO",
"EXPLODED VIEW": "RÄJÄYTYSKUVA",
"EXTEND": "JATKA",
"Edit Holes": "Muokkaa reikiä",
"Exact": "Tarkka",
"Export 3MF…": "Vie 3MF…",
"Export Design as JSON…": "Vie malli JSON-muodossa…",
"Export OBJ…": "Vie OBJ…",
"Export STEP…": "Vie STEP…",
"Export STL…": "Vie STL…",
"Export URDF…": "Vie URDF…",
"FLANGE": "LAIPPA",
"FLAT PATTERN": "LEVITYSKUVA",
"FOLD": "TAITA",
"FRAME MEMBER": "RUNKOPALKKI",
"Faces on Block": "Lohkon pinnat",
"Faces on Ring": "Renkaan pinnat",
"Flipped": "Käännetty",
"Fold Features": "Kutista piirteet",
"Follow inherited appearance": "Käytä perittyä ulkoasua",
"Follow material": "Käytä materiaalin ulkoasua",
"From Object": "Kohteesta",
"GEAR": "HAMMASPYÖRÄ",
"GROOVE": "URA",
"Glass - Clear": "Lasi - kirkas",
"Glass - Smoked": "Lasi - savustettu",
"Groove": "Ura",
"Group Features": "Ryhmitä piirteet",
"HDR file changed since selection; inspect and select it again before saving": "HDR-tiedosto on muuttunut valinnan jälkeen; tarkastele ja valitse se uudelleen ennen tallennusta",
"Hold click": "Pidä painettuna",
"INSERT PART": "LISÄÄ OSA",
"INSERT SVG": "LISÄÄ SVG",
"Insert Mesh…": "Lisää verkko…",
"Insert STEP…": "Lisää STEP…",
"JOINT": "NIVEL",
"JOINT ORIGIN": "NIVELEN ORIGO",
"MANAGE PLASTIC RULES": "HALLITSE MUOVISÄÄNTÖJÄ",
"MIDPLANE": "KESKITASO",
"MOTION LINK": "LIIKELINKKI",
"MOTION STUDY": "LIIKETUTKIMUS",
"MOTION TRACE": "LIIKERATA",
"MOVE/COPY TEXT": "SIIRRÄ/KOPIOI TEKSTI",
"Mesh": "Verkko",
"NEW COMPONENT": "UUSI KOMPONENTTI",
"Not": "Ei",
"Nylon - Natural": "Nailon - luonnonvärinen",
"OFFSET FACE": "PINNAN SIIRTYMÄ",
"OFFSET SURFACE": "SIIRTYMÄPINTA",
"Oak": "Tammi",
"Offset X": "Siirtymä X",
"Offset Y": "Siirtymä Y",
"Offset Z": "Siirtymä Z",
"PATCH": "PAIKKAPINTA",
"PERPENDICULAR PLANE": "KOHTISUORA TASO",
"PHYSICAL MATERIAL": "FYSIKAALINEN MATERIAALI",
"PICK CONTEXT": "VALITSE KONTEKSTI",
"PLANE ALONG PATH": "TASO POLKUA PITKIN",
"PLANE THROUGH THREE POINTS": "TASO KOLMEN PISTEEN KAUTTA",
"PLANE THROUGH TWO EDGES": "TASO KAHDEN SÄRMÄN KAUTTA",
"POINT ALONG PATH": "PISTE POLKUA PITKIN",
"POINT AT CENTER": "PISTE KESKIPISTEESEEN",
"POINT AT EDGE AND PLANE": "PISTE SÄRMÄN JA TASON LEIKKAUKSEEN",
"POINT AT VERTEX": "PISTE KÄRKIPISTEESEEN",
"POINT THROUGH THREE PLANES": "PISTE KOLMEN TASON KAUTTA",
"POINT THROUGH TWO EDGES": "PISTE KAHDEN SÄRMÄN KAUTTA",
"Paint - Blue": "Maali - sininen",
"Paint - Green": "Maali - vihreä",
"Paint - Orange": "Maali - oranssi",
"Paint - Purple": "Maali - violetti",
"Paint - Red": "Maali - punainen",
"Paint - Yellow": "Maali - keltainen",
"Parts only": "Vain osat",
"Play": "Toista",
"Point to Point": "Pisteestä pisteeseen",
"Point to Position": "Pisteestä sijaintiin",
"Polycarbonate - Clear": "Polykarbonaatti - kirkas",
"Preferences…": "Asetukset…",
"RACK AND PINION": "HAMMASTANKO JA -PYÖRÄ",
"REFOLD": "TAITA UUDELLEEN",
"REMOVE": "POISTA",
"RENAME": "NIMEÄ UUDELLEEN",
"REPLACE FACE": "KORVAA PINTA",
"REST": "TUKI",
"REVERSE NORMAL": "KÄÄNNÄ NORMAALI",
"RIGID GROUP": "JÄYKKÄ RYHMÄ",
"Range": "Alue",
"Reduce to Fit": "Pienennä sopivaksi",
"Report an Issue…": "Ilmoita ongelmasta…",
"Rolling": "Vierivä",
"Rotate": "Kierrä",
"Rubber - Black": "Kumi - musta",
"Rules": "Säännöt",
"SCREW": "RUUVI",
"SHEET METAL RULES": "OHUTLEVYSÄÄNNÖT",
"SNAP FIT": "NAPSAUTUSLIITOS",
"SPLIT FACE": "JAA PINTA",
"STITCH": "OMPELE",
"STOCK": "AIHIO",
"SURFACE EXTRUDE": "PINTAPURSOTUS",
"SURFACE LOFT": "PINTALOFTTAUS",
"SURFACE REVOLVE": "PINTAPYÖRÄYTYS",
"SURFACE SWEEP": "PINTAPYYHKÄISY",
"Save As JSON…": "Tallenna JSON-muodossa…",
"Save As…": "Tallenna nimellä…",
"Screenshot captured locally. Review it before attaching it on GitHub.": "Kuvakaappaus otettiin paikallisesti. Tarkista se ennen kuin liität sen GitHubissa.",
"Scroll left": "Vieritä vasemmalle",
"Scroll right": "Vieritä oikealle",
"Select Features": "Valitse piirteet",
"Select the curves to divide first": "Valitse ensin jaettavat käyrät",
"Sheet Metal": "Ohutlevy",
"Show Each Feature": "Näytä jokainen piirre",
"Stainless Steel": "Ruostumaton teräs",
"Steel": "Teräs",
"Steel - Brushed": "Teräs - harjattu",
"Suppress Features": "Ohita piirteet",
"Suppression": "Ohitus",
"Surface or face": "Pintakappale tai pinta",
"Surface or faces": "Pintakappale tai pinnat",
"TANGENT PLANE": "TANGENTTITASO",
"THICKEN": "PAKSUNNA",
"TRANSFORM": "MUUNNA",
"Taper to Fit": "Kavenna sopivaksi",
"Target edges": "Kohdesärmät",
"The origin axis is perpendicular to the sketch plane, so it has no line in the plane": "Origon akseli on kohtisuorassa luonnostasoon nähden, joten sillä ei ole viivaa tasossa",
"Top level": "Ylin taso",
"Two Distances": "Kaksi etäisyyttä",
"UNFOLD": "LEVITÄ",
"UNSTITCH": "PURA OMMEL",
"Use axis direction only": "Käytä vain akselin suuntaa",
"Variable radius": "Muuttuva säde",
"View": "Näkymä",
"Walnut": "Pähkinäpuu",
"ai.http.allow": "Salli suojaamaton HTTP",
"ai.http.confirm": "Salli tälle päätepisteelle",
"ai.http.warning": "API-avain ja keskustelu lähetetään salaamattomina. Kuka tahansa, jolla on pääsy verkkoon, voi lukea tai muuttaa niitä. Käytä tätä vain verkossa, johon luotat.",
"ai.prefs.instructions": "Omat ohjeet",
"ai.prefs.instructions_note": "Lähetetään agentille jokaisen keskustelun alussa SolidCraftin omien ohjeiden jälkeen: miten haluat työskennellä ja mitä sääntöjä noudatetaan. Muutos tulee voimaan seuraavasta keskustelusta (Yhdistä tai Uusi keskustelu).",
"browser.canvas_locked": "Pohjakuva on lukittu. Avaa lukitus ensin.",
"cmd.inspect_colored_components": "Komponenttien värit",
"cmd.model_body_features": "Luettele kappaleen piirteet",
"cmd.panel.action": "Suorita paneelin otsikon toiminto",
"cmd.panel.focus.next": "Kohdista seuraavaan paneeliin",
"cmd.panel.focus.previous": "Kohdista edelliseen paneeliin",
"cmd.panel.move.next_zone": "Siirrä paneeli seuraavalle alueelle",
"cmd.panel.sash.down": "Siirrä paneelien jakajaa alas",
"cmd.panel.sash.left": "Siirrä paneelien jakajaa vasemmalle",
"cmd.panel.sash.reset": "Palauta kohdistetun paneelin jakaja",
"cmd.panel.sash.right": "Siirrä paneelien jakajaa oikealle",
"cmd.panel.sash.up": "Siirrä paneelien jakajaa ylös",
"cmd.panel.toggle": "Kohdistettu paneeli päälle/pois",
"cmd.pointcloud_reload": "Lataa pistepilvi uudelleen",
"cmd.render.coat.bind": "Tallenna kirkaslakka",
"cmd.render.coat.unbind": "Poista kirkaslakka",
"cmd.render.surface.import": "Tuo pintakartat",
"cmd.render.texture.list": "Luettele upotetut pintakuvat",
"cmd.render.texture.remove": "Poista upotettu pintakuva",
"cmd.sketch.replace": "Korvaa luonnos",
"cmd.sketch_move_points": "Siirrä luonnospisteitä",
"cmd.sketch_point_divide": "Jaa käyrä",
"cmd.view.navigator": "Mukautettu näkymänavigaattori",
"cmd.view.render_live": "Keskeytä tai jatka reaaliaikaista renderöintiä",
"cmd.view_ribbon_tabs_only": "Vain valintanauhan välilehdet",
"cmd.view_tool_zoom": "Zoomaa vetämällä",
"dialog.cylinder_face_tip": "Mallin pinta tai kärkipiste, jonka päällä sylinteri seisoo: napsauta tätä ja napsauta sitten sitä näkymässä. Jos tämä jätetään tyhjäksi, sijainnin määräävät X, Y ja Z.",
"dialog.primitive_point_tip": "Piste, joka täyttää X:n, Y:n ja Z:n: napsauta tätä ja napsauta sitten mallin kärkipistettä, särmää tai pintaa, luonnoksen pistettä tai origoa.",
"dialog.reference_edge_tip": "Valitun pinnan suora särmä, josta alla oleva etäisyys mitataan: napsauta tätä ja napsauta sitten särmää.",
"document.newer_file": "Tallennettu uudemmalla SolidCraftilla (muoto {format}, tämä versio lukee enintään muodon {reads}). Jos jotain puuttuu, päivitä.",
"document.newer_file_change": "Tallennettu uudemmalla SolidCraftilla (muoto {format}, jossa `{change}`, jota tämä versio ei tunne). Jos jotain puuttuu, päivitä.",
"document.newer_file_not_read": "Ei luettu: {what}. Tallennus säilyttää sen.",
"file.open.portal_fallback.no_portal_service": "Avautunut tiedostonvalitsin ei ole työpöydän oma: työpöydän portaalipalvelu ei ole käytettävissä.",
"file.open.portal_fallback.no_session_bus": "Avautunut tiedostonvalitsin ei ole työpöydän oma: D-Bus-istuntoväylää ei ole.",
"file.open.portal_fallback.xwayland": "Avautunut tiedostonvalitsin ei ole työpöydän oma: XWaylandissa portaali hylkää yläikkunan.",
"file_load.inserted": "Lisätty {name}",
"file_load.opened": "Avattu {name}",
"file_load.opened_in_tab": "{name} avattu uudessa välilehdessä",
"file_load.reloading_cloud": "Ladataan pistepilveä uudelleen",
"help.sketch.point.divide": "Sijoittaa pisteitä, jotka jakavat valitut käyrät yhtä pitkiin osiin. Pisteet pysyvät kullakin käyrällä ja säilyttävät välinsä, kun käyrä muuttuu.",
"help.view.ribbon_tabs_only": "Kutistaa valintanauhan välilehtiriviksi, jolloin näkymä saa paneelien viemän tilan. Napsauta välilehteä, niin sen paneelit näkyvät näkymän päällä; valitse tämä uudelleen, niin koko valintanauha pysyy näkyvissä.",
"hole_folder.applies_to": "Muutokset koskevat kansion {folder} {count} reikää; kukin pysyy paikallaan.",
"nav.drag_keeps_mode.help": "Keski- tai oikean painikkeen veto jatkaa kiertoa, panorointia tai zoomausta sellaisena kuin se alkoi, kunnes painike vapautetaan, riippumatta siitä, mitä näppäimiä sillä välin painetaan tai vapautetaan. Pois: painettuina olevat näppäimet ratkaisevat vedon joka hetkellä.",
"nav.drag_keeps_mode.label": "Veto säilyttää navigointitavan, jolla se alkoi",
"nav.orbit_cursor_wrap.help": "Kun kiertoveto saavuttaa näkymän reunan, kohdistin siirtyy vastakkaiseen reunaan ja kierto jatkuu. Pois: veto pysähtyy näytön reunaan. Ei vaikutusta Waylandissa eikä selaimessa.",
"nav.orbit_cursor_wrap.label": "Siirrä kohdistin vastakkaiseen reunaan kierrettäessä",
"navbar.zoom_hold_tip": "Zoomaa (pidä pikanäppäin painettuna)",
"prefs.background_choose": "Valitse kuva…",
"prefs.background_image": "Kuva",
"prefs.background_unreadable": "Taustakuvaa ei voitu lukea",
"prefs.browser_body_features": "Piirteet kappaleiden alla",
"prefs.browser_body_features_note": "Kunkin kappaleen alle selaimessa avautuvat aikajanan piirteet, joilla se on rakennettu, aikajanan järjestyksessä.",
"prefs.browser_rows_start_closed": "Selaimen rivit ovat aluksi suljettuina",
"prefs.browser_rows_start_closed_note": "Selaimen sijoitukset ja kansiot ovat aluksi suljettuina, joten mallista, jossa on paljon komponentteja, näkyvät ylimmän tason rivit. Kukin avautuu nuolestaan, Laajenna kaikki -toiminnolla tai Etsi selaimesta -toiminnolla, joka avaa vain rivit kappaleeseen asti ja sulkee taas ne, jotka edellinen haku avasi. 3D-näkymässä valittu kappale jättää selaimen ennalleen. Kun tämä on pois päältä, kansiot ovat aluksi auki, sijoitukset noudattavat Komponentit alkavat avoimina -asetusta, ja 3D-näkymässä tehty valinta avaa selaimen kappaleeseen asti kuten ennenkin.",
"prefs.command_dialog_values": "Komentoikkunat",
"prefs.design_tools.hole_group": "Ryhmitä yhdessä tehdyt reiät",
"prefs.design_tools.hole_group_help": "Kerralla tehdyt reiät ovat historiassa samassa kansiossa, joka on aluksi suljettu; avaa kansio, jos haluat muokata reikää erikseen.",
"prefs.design_tools.hole_several": "Useita reikiä yhdelle pinnalle",
"prefs.design_tools.hole_several_help": "Pinnan muun kohdan valitseminen lisää uuden reiän; reiän valitseminen poistaa sen.",
"prefs.extrude_arrow_face_stops": "Pursotusnuoli pysähtyy pintoihin",
"prefs.extrude_arrow_face_stops_note": "Pursotuksen etäisyysnuolen vetäminen pysähtyy profiilin suuntaisiin tasopintoihin, kuten leikattavan kappaleen vastakkaiseen pintaan, ja korostaa pinnan ääriviivan. Pois: nuoli liikkuu vain tasavälein.",
"prefs.ground_shadow_follows_model": "Maavarjo seuraa mallia",
"prefs.ground_shadow_follows_model_help": "Sijoita varjo alimman näkyvän kappaleen alle. Kun tämä on pois päältä, korotettujen mallien varjo pysyy origon maatasolla.",
"prefs.history_bar_groups": "Kokoa historiapalkki ryhmiksi",
"prefs.history_bar_groups_note": "Pitkässä historiassa yhden komponentin peräkkäiset piirteet kootaan yhdeksi merkiksi, ja piirrekansiot ovat aluksi kutistettuina. Lisätty STEP-kokoonpano sijoitetaan ryhmäkansioon. Pois: jokainen piirre näytetään, kansiot ovat aluksi auki eikä kansiota luoda.",
"prefs.history_folder_kind_icon": "Kansion kuvake sen piirteistä",
"prefs.history_folder_kind_icon_note": "Historiakansio, jonka kaikki piirteet ovat samaa lajia, näyttää niiden kuvakkeen.",
"prefs.history_group_joints": "Ryhmitä nivelet historiassa",
"prefs.history_group_joints_note": "Kaksi tai useampi nivel näkyy yhtenä painikkeena lukumäärineen, ja napsautus näyttää jokaisen. Pois: jokainen nivel näytetään.",
"prefs.keep_unsaved_also_asks": "Kysy silti, kun välilehti suljetaan",
"prefs.keep_unsaved_also_asks_tip": "Kun tämä on pois päältä, välilehti sulkeutuu ilman selaimen kyselyikkunaa, kun jokaisen tallentamattoman mallin kopio on ajan tasalla.",
"prefs.keep_unsaved_in_browser": "Säilytä tallentamaton työ tässä selaimessa",
"prefs.keep_unsaved_in_browser_tip": "Jokaisen avoimen mallin tallentamattomat muutokset pidetään ajan tasalla tämän selaimen yksityisessä tallennustilassa. Seuraavalla käynnillä niitä tarjotaan palautettaviksi.",
"prefs.layout_page.hover_panel_menus": "Vaihda paneelivalikkoa osoittimen ollessa päällä",
"prefs.layout_page.hover_panel_menus_help": "Avaa valintanauhan paneelin valikko napsauttamalla sen nimeä. Vaihda valikkoa viemällä osoitin toisen paneelin nimen päälle. Sulje valikko siirtämällä osoitin valintanauhan ja avoimen valikon ulkopuolelle.",
"prefs.move_drag_highlights": "Korosta osoittimen alla oleva kohde, kun Siirrä-toiminnon nuolilla vedetään komponenttia",
"prefs.move_drag_highlights_tip": "Pois: kun Siirrä-toiminnon nuolilla vedetään komponenttia, osoittimen alla olevaa kohdetta ei korosteta, mikä pitää suuret kokoonpanot sulavina. Kun leikkaus tai analyysi on näkyvissä, kohde korostetaan silti, eikä niveliään pitkin vedetty osa koskaan korosta sitä.",
"prefs.panel_layout.recovery": "Tallennettuja paneeliasetteluja ei voitu palauttaa. Tallennetut tiedot säilytetään; Perinteinen on edelleen käytettävissä.",
"prefs.picker.carousel": "Karuselli",
"prefs.picker.change": "Vaihda",
"prefs.picker.clear": "Tyhjennä suodattimet",
"prefs.picker.day": "Päiväteema",
"prefs.picker.empty": "Mikään teema ei vastaa näitä suodattimia.",
"prefs.picker.follow": "Seuraa järjestelmää",
"prefs.picker.grid": "Ruudukko",
"prefs.picker.high": "Suuri kontrasti",
"prefs.picker.high_note": "{source} · Suuri kontrasti",
"prefs.picker.hint": "Vaihtuu käyttöjärjestelmän mukana.",
"prefs.picker.import": "Tuo teematiedosto…",
"prefs.picker.imported": "Tuotu",
"prefs.picker.night": "Yöteema",
"prefs.picker.one": "Yksi teema",
"prefs.picker.pick": "Valitse alta",
"prefs.picker.standard": "Vakio",
"prefs.remember_dialog_values": "Muista komentoikkunoiden arvot",
"prefs.remember_dialog_values.help": "Oletuksena pois päältä. Kun tämä on käytössä, onnistuneen komennon turvalliset arvot ja asetukset otetaan uudelleen käyttöön, kun avaat saman komennon seuraavan kerran, kunnes SolidCraft suljetaan.",
"prefs.render_legacy_image_defaults": "Käytä aiempia renderöintikuvan oletuksia",
"prefs.render_legacy_image_defaults_help": "Säilytä aiempi manuaalinen työnkulku: uudet asetelmat käyttävät CPU-rasterointia, CPU-säteenjäljitys säilyttää kiinteän näytteistyksen ja avaat renderöidyt tulokset itse. Sovita näkymä uudelleen Renderöintiin siirryttäessä, vaihda kuvakulmia palauttamatta niiden kameroita ja käytä aiempaa rajausta ja navigointia. Poista automaattinen reaaliaikainen kuvapalaute käytöstä. Tallennetut asetelmat eivät muutu.",
"prefs.ribbon_tabs_only": "Näytä vain valintanauhan välilehdet",
"prefs.ribbon_tabs_only_note": "Valintanauha kutistuu välilehtiriviksi. Välilehden napsauttaminen näyttää sen paneelit näkymän päällä, kunnes komento alkaa tai osoitin poistuu niiden päältä. Näkymä-välilehden Vain valintanauhan välilehdet -komento tai sen pikanäppäin vaihtaa tämän.",
"prefs.select_hidden_edges": "Valitse piilosärmiä tilassa Varjostettu, piilosärmät näkyvissä",
"prefs.select_hidden_edges_help": "Valitse särmiä pintojen läpi, kun Varjostettu, piilosärmät näkyvissä on käytössä, myös pyöristyksessä. Pois: säilyttää version v0.30.1 valintatoiminnan. Piilotettuja kappaleita ei voi valita.",
"prefs.shared_panel_layout": "Käytä jaettua paneeliasettelua",
"prefs.shared_panel_layout_help": "Näytä nykyiset Selain, Historia ja Avustaja siirrettävissä paneeleissa. Muutos tulee voimaan, kun asetukset otetaan käyttöön.",
"prefs.sketch.ellipse_axes": "Piirrä ellipsit akseleineen",
"prefs.sketch.ellipse_axes_note": "Iso- ja pikkuakseli apuviivoina, jotta puoliakseleille ja akseleille voi lisätä mitat. Pois: pelkkä ellipsi, ja D sen päällä antaa sen pienemmän säteen riippumatta siitä, mistä arvo vedetään, piirrettynä ja R-merkittynä kuten ennenkin.",
"prefs.sketch.escape_twice_finishes": "Kaksi Esc-painallusta lopettaa luonnoksen",
"prefs.sketch.escape_twice_finishes_note": "Kaksi nopeaa Esc-painallusta lopettaa luonnoksen. Pois: Esc vain peruuttaa työkalun tai valinnan, ja Lopeta luonnos lopettaa luonnoksen.",
"prefs.sketch_mirror_auto_line": "Käytä ennalta valittua apuviivaa peilaukseen",
"prefs.tab_double_click_renames": "Nimeä mallin välilehti uudelleen kaksoisnapsauttamalla",
"prefs.tab_double_click_renames_note": "Kirjoita uusi nimi ja säilytä se painamalla Enter tai napsauttamalla muualla, tai peruuta painamalla Esc. Pois: välilehden kaksoisnapsautus suurentaa ikkunan kuten palkin tyhjän osan kaksoisnapsautus.",
"recovery.open_saved": "Avaa tallennettu versio",
"recovery.restore": "Palauta",
"recovery.restore_intro": "Muutokset, joita ei ollut tallennettu, kun tämä sivu viimeksi suljettiin, on säilytetty tässä selaimessa.",
"recovery.restore_row": "{name}, muutettu {when}",
"recovery.restore_title": "Palautetaanko tallentamattomat mallit?",
"recovery.restore_title_one": "Palautetaanko tallentamaton malli: {name}, muutettu {when}?",
"render.adaptive.pilot_progress": "Mukautuvat pilotit · {current}/{target} kierrosta",
"render.adaptive.preview_help": "Pilottikuvat ohjaavat jakoa, eikä niitä sisällytetä lopulliseen kuvaan. Tuotantoiteraatiot käyttävät erillistä budjettia kullekin pikselille; iteraatioiden määrä ei vastaa tasaista näytemäärää pikseliä kohden.",
"render.adaptive.production_progress": "Mukautuva tuotanto · {current}/{target} iteraatiota",
"render.aging_raytrace_help": "Vanhentaminen tehdään CPU-säteenjäljityksellä ja GPU-polunjäljityksellä. Rasterointi säilyttää kaavamaisen renderöinnin.",
"render.appearance_editor.discard_saved_edit": "Hylkää tallentamattomat optiset muokkaukset",
"render.batch_current_settings_help": "Käyttää nykyisiä kuva-asetuksia kunkin tallennetun kuvakulman kameran kanssa, yksi kuvakulma kerrallaan.",
"render.batch_owner_limit": "Enintään 32 asiakirjan kuvakulmajonoa voidaan säilyttää. Viimeistele tai peruuta ensin jokin olemassa oleva jono.",
"render.batch_preparing": "Valmistellaan seuraavaa kuvakulmaa",
"render.batch_waiting_worker": "Odotetaan renderöinnin valmistelua",
"render.caustics_depth": "Kaustiikkapolun syvyys",
"render.caustics_enable": "Lasin kaustiikka piste- ja suuntavaloista",
"render.caustics_help": "Fotonien määrä vaikuttaa kohinaan ja laskennan määrään. Keruusäde vaihtaa terävät yksityiskohdat tasaisempaan arvioon. CPU vaatii epäsuoran valaistuksen.",
"render.caustics_path_required": "CPU-kaustiikka vaatii epäsuoran valaistuksen.",
"render.caustics_photons": "Fotonit",
"render.caustics_radius": "Keruusäde",
"render.check_glass_cpu": "CPU tukee varmennettuja tasomaisia lasilevyjä ja akselien suuntaisia laatikoita. Yleiset suljetut verkot, sisäkkäisyys ja sisäinen sironta vaativat epäsuoran valaistuksen. Suljetun lasin läpi kulkevia varjoja ei edelleenkään tueta.",
"render.check_glass_gpu": "GPU tukee varmennettuja erillisiä lasikappaleita tai nimenomaista varmennettua sisäkkäisyyttä. Sisäkkäisyys vaatii kuperat ulommat kappaleet, kokonaan niiden sisällä olevat sisemmät kappaleet eikä toisiaan koskettavia rajapintoja.",
"render.check_media_remaining": "Tiheysruudukot, siirtymäkartoitus, täysi spektri-integrointi ja polarisaation eteneminen eivät edelleenkään ole käytettävissä.",
"render.check_media_scope": "Aktiivinen sisäinen sironta vaatii suljetun lasiväliaineen, suorien varjojen läpäisyn pois päältä ja kohinanpoiston pois päältä. GPU vaatii lisäksi yhden Fresnel-kerrostuman. Aktiivista ulkoista ilmakehää ei voi yhdistää lasiin eikä pintojen kohinanpoistoon.",
"render.coat_discard": "Hylkää lakan muokkaus",
"render.coat_pending_edit": "Tätä lakan muokkausta ei ole tallennettu. Tallenna se kuvakulman mukana tai hylkää se.",
"render.coat_remove": "Poista tallennettu lakka",
"render.coat_remove_note": "Poistaa tämän kohteen lakan kuvakulmasta. Geometria, ulkoasut ja fysikaaliset materiaalit pysyvät ennallaan.",
"render.coat_remove_title": "Poistetaanko tallennettu kirkaslakka?",
"render.coat_revalidate_saved": "Tallennettu lakka on muuttunut. Hylkää tämä muokkaus ja avaa kohde uudelleen ennen kuin muokkaat sitä taas.",
"render.coat_save": "Tallenna lakka kuvakulmaan",
"render.coat_saved_help": "Kirkaslakka lisää kiiltävän kerroksen läpinäkymättömille pinnoille. Tallenna se kuvakulman mukana. Lasi ei voi jakaa tätä kohdetta. Myöskään CPU:n mukautetut heijastus- ja anisotropiaohitukset eivät voi jakaa sitä.",
"render.cpu_celestial_adopt": "CPU-säteenjäljitys epäsuoralla valaistuksella · polun syvyys {depth} · {spp} SPP · jäljitetyt varjot · siemen {seed} · 1 ensisijainen näyte",
"render.cpu_celestial_adopt_label": "CPU-säteenjäljitys epäsuoralla valaistuksella",
"render.cpu_celestial_path_required": "Äärellinen aurinko ja liukuväritaivas käyttävät CPU:n epäsuoraa valaistusta.",
"render.cpu_celestial_switch": "Säilytä tämä aurinko tai taivas valitsemalla CPU-säteenjäljitys epäsuoralla valaistuksella.",
"render.cpu_celestial_unportable": "Säilytä GPU-polunjäljitys nykyisillä läpäisynäytteiden asetuksilla.",
"render.cpu_constant_direct_help": "Ilman epäsuoraa valaistusta tämä vakiolähde voi näkyä heijastuksissa ja lasin läpi. Se ei valaise läpinäkymättömiä pintoja. Ota epäsuora valaistus käyttöön, jos haluat käyttää sitä näkymän valaistukseen.",
"render.cpu_constant_enable_indirect_plan": "Polun syvyys {depth}; progressiivinen näytteistys {spp} näytettä/pikseli (siemen {seed}); yksi ensisijainen säde näytettä kohden; jäljitetyt varjot. Kuvan koko, CPU-budjetti ja muut asetukset säilyvät.",
"render.cpu_denoise_help": "Vähentää kohinaa jokaisessa kuvan päivityksessä. Se voi pehmentää hienoja yksityiskohtia ja syväterävyyden reunoja. Raaka-EXR pysyy muuttumattomana. Valmiin kuvan säätäminen käyttää sen raakakuvaa eikä tee kohinanpoistoa uudelleen.",
"render.cpu_fixed_retained": "Kiinteä näytteistys säilytetty",
"render.cpu_glass_enable_path": "Ota epäsuora valaistus käyttöön",
"render.cpu_indirect_method_required": "Valitse CPU-säteenjäljitys ottaaksesi tämän epäsuoran valaistuksen tilan käyttöön.",
"render.cpu_maps_saved_help": "CPU-renderöinnit voivat käyttää tallennettuja läpinäkymättömiä karttoja: valitse pinta tästä ja valitse sitten Tallenna kartat kuvakulmaan. Epäsuoralla valaistuksella lasi voi olla toisessa kappaleessa; kartoitettu kappale ei voi käyttää lasia. Valittujen heijastusten, anisotropian ja proseduraalisten pintatehosteiden on oltava pois päältä. Väliaikaiset karttatiedostopolut käyttävät GPU:ta.",
"render.cpu_material_certification": "CPU:n tarkistus varmentaa tuetun lasigeometrian ennen renderöintiä. Suljettu lasi käyttää geometrista etäisyyttä.",
"render.cpu_opaque_hint": "CPU-säteenjäljitys käyttää läpinäkymätöntä taustaa.",
"render.cpu_path_depth": "Polun syvyys",
"render.cpu_path_help": "Lisää valon heijastelun läpinäkymättömien pintojen välillä ja tuettujen lasimuotojen läpi. Vaatii progressiivisen renderöinnin ja jäljitetyt varjot. Polun syvyys laskee varjostetut pinnat, lasin rajapinnat ja sirontatapahtumat ensimmäisestä osumasta alkaen (1–16). Syvyys 1 antaa suoran valaistuksen läpinäkymättömille pinnoille; suuremmat arvot sallivat useampia heijastuksia tai lasin läpäisyjä ja voivat kestää kauemmin. Poista epäsuora valaistus käytöstä, jos haluat käyttää mukautettuja heijastuksia tai anisotropiaa.",
"render.cpu_path_lighting": "Epäsuora valaistus",
"render.cpu_path_optics_reason": "Asetuksesi säilytetään. Poista epäsuora valaistus käytöstä, jos haluat käyttää mukautettuja heijastuksia tai anisotropiaa.",
"render.cpu_progressive_adopt": "Käytä progressiivista näytteistystä",
"render.cpu_progressive_adopt_help": "Progressiivinen näytteistys käyttää yhtä kameranäytettä kierrosta kohden. Kuvan koko, valot ja heijastusasetukset pysyvät ennallaan.",
"render.cpu_progressive_always": "Progressiivinen näytteistys on aina käytössä",
"render.cpu_progressive_reflection_adopt": "Aseta valittujen heijastusten yrityskerroiksi 1 ennen progressiivisen näytteistyksen käyttöönottoa.",
"render.cpu_quality_budget_help": "Muuttaa koon, tuotantonäytteiden ylärajan, siemenen ja CPU-resurssiprofiilin. Kamera, objektiivi, valaistus, GI-syvyys ja tehosteet säilyvät.",
"render.cpu_quality_progressive_required": "Ota alla progressiivinen näytteistys käyttöön ennen CPU-budjetin valitsemista.",
"render.cpu_quality_summary": "{width} × {height} · näytteitä enintään {samples} · siemen {seed} · {profile}",
"render.cpu_sky_bounds": "Taivaan kierron on oltava äärellinen ja välillä ±1 000 000 radiaania; voimakkuuden on oltava 0–100.",
"render.cpu_studio_enable": "Ota epäsuora valaistus käyttöön tälle asetelmalle",
"render.cpu_studio_enable_apply": "Ota epäsuora valaistus käyttöön ja käytä",
"render.cpu_studio_indirect_help": "Tämä aurinkoasetelma vaatii epäsuoran valaistuksen syvyydellä 8, jäljitetyt varjot ja yhden kameranäytteen kierrosta kohden. Jos progressiivinen renderöinti on pois päältä, se aloitetaan 16 näytteellä pikseliä kohden siemenellä 0. Nykyiset progressiiviset asetukset ja resurssiprofiili säilyvät. Yhteensopimattomat asetukset keskeyttävät käyttöönoton muuttamatta niitä.",
"render.cpu_studio_radiance_limit": "Tämän asetelman pintasäteily on {radiance}, mikä ylittää CPU:n rajan 64. Laadittu valaistus säilytetään; valitse toinen asetelma tai GPU.",
"render.cpu_subsurface_denoise_reason": "CPU:n pinnanalainen sironta vaatii kohinanpoiston pois päältä. Asetuksesi säilytetään.",
"render.cpu_subsurface_help": "Sironta ohjaa valoa uudelleen suljetun lasin sisällä. Positiiviset tiheydet vaativat epäsuoran valaistuksen ja kohinanpoiston pois päältä. Tiheys ilmoitetaan törmäyksinä millimetriä kohden; 0 ei lisää sirontaa. Positiivinen vaihepainotus suosii eteenpäin suuntautuvia suuntia, negatiivinen taaksepäin suuntautuvia.",
"render.cpu_transparent_help": "Läpinäkyvä PNG poistaa taustan ja säilyttää reunojen peittävyyden. Kappaleiden ja pintojen peittävyyden on pysyttävä 100 %:ssa.",
"render.cpu_volume_enable_path": "Ota epäsuora valaistus käyttöön",
"render.cpu_volume_enable_path_plan": "CPU-säteenjäljitys · polun syvyys {depth} · {spp} näytettä/pikseli · siemen {seed} · jäljitetyt varjot. Laadittu ilmakehä ja kuvabudjetti säilyvät.",
"render.cpu_volume_help": "CPU:n ilmakehä käyttää epäsuoraa valaistusta. Nollaekstinktio säilyttää tallennetun laatikon ilman sumua.",
"render.cpu_volume_method_adopt": "CPU-säteenjäljitys epäsuoralla valaistuksella",
"render.cpu_volume_method_incompatible": "Näitä valo-, näytteistys- tai ilmakehäasetuksia ei voi siirtää tähän menetelmään. Asetuksesi säilytetään.",
"render.cpu_volume_path_required": "Ota epäsuora valaistus käyttöön, jos haluat käyttää CPU:n ilmakehää.",
"render.directional_sun_limit": "GPU-valaistus tukee yhteensä kahdeksaa suuntavalolähdettä, joista enintään yksi voi olla pehmeä aurinko. Lisää uusi kaukainen valonlähde monistamalla kova suuntavalo.",
"render.glass_abbe": "Abben luku",
"render.glass_dispersion": "Kromaattinen dispersio",
"render.glass_film": "Ohutkalvointerferenssi",
"render.glass_film_ior": "Kalvon IOR",
"render.glass_film_thickness": "Kalvon paksuus",
"render.glass_model_enable": "Edistynyt lasimalli",
"render.glass_model_help": "Lasin karheus sirottaa läpäiseviä säteitä. Dispersio ja kalvon väri käyttävät kolmea aallonpituuskaistaa. Karheat levyt vaativat suorien läpäisevien varjojen olevan pois päältä.",
"render.glass_roughness": "Lasin karheus",
"render.gpu_job_shader_wait": "Varjostimien valmistelu voi kestää minuutteja",
"render.gpu_path_crashed": "SolidCraft sulkeutui viimeksi, kun tätä valmisteltiin tällä näytönohjaimella, todennäköisesti näytönohjaimen ajurin sisällä, joten valmistelua ei käynnistetä uudelleen automaattisesti. Valitse sen sijaan CPU-säteenjäljitys tai yritä uudelleen (myös ajurin päivitys yrittää uudelleen).",
"render.gpu_path_not_started": "GPU-polunjäljittimen valmistelu ei ole alkanut.",
"render.gpu_path_retry": "Yritä uudelleen",
"render.light_space_world": "Maailmakoordinaatiston valot",
"render.light_space_world_help": "Valojen sijainnit ja suunnat käyttävät maailmakoordinaatteja. Kameran kiertäminen ei siirrä niitä.",
"render.live.adaptive": "Reaaliaikainen · {width} × {height} · {progress}",
"render.live.final_changed": "Renderöintipyyntö muuttui reaaliaikaisen renderöinnin pysähtyessä. Aloita lopullinen kuva uudelleen.",
"render.live.final_waiting": "Valmistellaan lopullista kuvaa · vapautetaan reaaliaikaisen renderöinnin resursseja",
"render.live.invalid_size": "Reaaliaikainen renderöinti vaatii positiivisen tulosteen leveyden ja korkeuden.",
"render.live.pause": "Keskeytä reaaliaikainen",
"render.live.paused": "Reaaliaikainen · Keskeytetty",
"render.live.paused_outdated": "Reaaliaikainen · Keskeytetty · Vanhentunut",
"render.live.quality_help": "Vuorovaikutteinen laatu: enintään 512 pikseliä pisimmällä sivulla. Käyttää valittua renderöijää ja sen tukemia tehosteita. Lopullinen tarkkuus, asetukset ja vienti pysyvät erillään.",
"render.live.refused": "Reaaliaikainen ei käytettävissä: {reason}",
"render.live.resume": "Jatka reaaliaikaista",
"render.live.samples": "Reaaliaikainen · {width} × {height} · {current}/{target} näytettä",
"render.live.source_current": "{method} · Reaaliaikainen",
"render.live.source_outdated": "{method} · Edellinen kuva",
"render.live.source_outdated_help": "Näyttää viimeksi muodostetun kuvan, kun reaaliaikainen renderöinti päivittyy tai ei ole käytettävissä. Se voi poiketa nykyisestä näkymästä tai kuva-asetuksista.",
"render.live.source_settings_help": "Avaa Tuloste muokataksesi renderöijän ja kuvan asetuksia.",
"render.live.stopped": "Reaaliaikainen renderöinti pysäytetty",
"render.live.updating": "Reaaliaikainen · Vuorovaikutteinen laatu (enintään 512 px) · Päivitetään",
"render.live.waiting_canvas": "Odotetaan renderöinnin piirtoaluetta",
"render.live.worker_stopped": "Reaaliaikaisen renderöinnin kaappausprosessi pysähtyi ennen tuloksen palauttamista",
"render.material_cpu_glass_only": "Väliaikaiset kuvatiedostokartat vaativat GPU:n. CPU voi käyttää tallennettuja sisäänrakennettuja pintakarttoja.",
"render.material_cpu_optics_limits": "Ota epäsuora valaistus käyttöön tuettuja suljettuja lasimuotoja, varmennettua sisäkkäisyyttä ja pinnanalaista sirontaa varten. Ohuet levyt voivat päästää varjot läpi. Muussa tapauksessa käytä tasomaista levyä tai akselien suuntaista laatikkoa. Toisiaan koskettavia muotoja ja suljetun lasin läpi kulkevia varjoja ei edelleenkään tueta. Arvosi säilytetään.",
"render.material_cpu_saved_runtime_conflict": "Tallennettua CPU-optiikkaa ei voi yhdistää vanhanmallisiin väliaikaisiin optisiin sidontoihin. Tallenna tarkistettu optiikka tai poista ristiriitainen väliaikainen sidonta.",
"render.material_raytrace_required": "Fysikaalinen lasi vaatii CPU-säteenjäljityksen tai GPU-polunjäljityksen.",
"render.material_saved_edit_pending": "Näitä optisia muokkauksia ei ole tallennettu. Tallenna tarkistetut arvot, poista tallennettu määritys tai hylkää muokkaukset. Vanhanmalliset väliaikaiset sidonnat ja tukemattomat tehosteet eivät voi ohittaa tallennettua kohdetta.",
"render.output_master_unavailable": "Valitse valmis kuva, jossa on raaka-EXR-data, viedäksesi EXR:n. Ota raaka-EXR käyttöön ennen uusien kuvien renderöintiä.",
"render.output_presentation_limits": "CPU:n kuvatehosteet ja EXR-tuloste tukevat kuvia, joiden leveys tai korkeus on enintään 8192 pikseliä ja joissa on yhteensä enintään 16 777 216 pikseliä.",
"render.output_raytrace_only": "Kuvatehosteet vaativat CPU-säteenjäljityksen tai GPU-polunjäljityksen.",
"render.preparation_cancelled": "Renderöinnin valmistelu peruutettu",
"render.preparation_checking": "Tarkistetaan renderöintiä",
"render.preparation_retirement_failed": "Renderöinnin valmistelun siivous epäonnistui. Tämä ikkuna ei voi valmistella uutta kuvaa.",
"render.preparation_retiring": "Viimeistellään renderöinnin valmistelua",
"render.preparation_unavailable": "Renderöinnin valmistelu ei ole käytettävissä",
"render.presentation_banner": "Esitystehosteet toimivat CPU- ja GPU-säteenjäljityksen kanssa. Tämän sivun avaaminen ei koskaan muuta menetelmää.",
"render.quality_budget_help": "Asettaa koon, näytteet, syvyyden, siemenen ja kohinanpoiston. Muut kuva-asetukset säilyvät.",
"render.quality_denoise_off": "Kohinanpoisto: Pois",
"render.quality_denoise_on": "Kohinanpoisto: Päällä",
"render.quality_summary": "{width} × {height} · {samples} näytettä · syvyys {depth} · siemen {seed} · {denoise}",
"render.shot_lens_cpu_progressive_reason": "Ota progressiivinen näytteistys käyttöön Näytteistys-kohdassa ennen CPU:n syväterävyyden käyttöönottoa.",
"render.shot_lens_raytrace_reason": "Syväterävyys on käytettävissä CPU-säteenjäljityksessä ja GPU-polunjäljityksessä.",
"render.spot_axis": "Säteilysuunta",
"render.spot_gpu_help": "Kulmat mitataan säteilysuunnasta. Valo himmenee sisemmän ja ulomman kulman välillä. Hyvin kapeat himmenemisalueet vaativat CPU-renderöinnin.",
"render.spot_help": "Kulmat mitataan säteilysuunnasta. Valo himmenee sisemmän ja ulomman kulman välillä.",
"render.spot_inner": "Sisempi puolikulma",
"render.spot_outer": "Ulompi puolikulma",
"render.stage_panels.grain_angle": "Syykulma",
"render.surface_import.author": "Tekijä",
"render.surface_import.busy": "Tuodaan kuvaa…",
"render.surface_import.complete": "Valitse kuva ja anna sen tekijä, lähde ja lisenssi.",
"render.surface_import.embedded": "Tuotu kuva",
"render.surface_import.failed": "Kuvan tuonti ei valmistunut.",
"render.surface_import.license": "Lisenssi / omistus",
"render.surface_import.raytrace_required": "Kuvat vaativat CPU- tai GPU-säteenjäljityksen. Valitse se kohdassa Tuloste.",
"render.surface_import.repeat_u": "U-toisto",
"render.surface_import.repeat_v": "V-toisto",
"render.surface_import.save": "Tallenna kuva kappaleeseen",
"render.surface_import.saved_cpu": "Tallenna kartat, jotta voit käyttää niitä CPU-renderöinnissä.",
"render.surface_import.source": "Lähde",
"render.surface_import.title": "Tuo kuva",
"render.volume_denoise_required": "Poista kohinanpoisto käytöstä, jos haluat käyttää ilmakehää.",
"render.volume_glass_required": "Ilmakehää ei voi yhdistää lasiin tässä asetelmassa.",
"render.volume_lighting_required": "Valitse ympäristö tai nimenomainen valoasetelma, jotta ilmakehä voidaan renderöidä.",
"render.volume_single_stratum_required": "Käytä yhtä läpäisynäytettä ilmakehän renderöintiin.",
"sketch.divide_hint": "Pisteet jakavat kunkin käyrän yhtä pitkiin osiin ja säilyttävät jaon, kun käyrä muuttuu.",
"sketch.error.closed_curve_two_crossings": "suljettu käyrä tarvitsee kaksi leikkauskohtaa katkaisua varten",
"sketch.error.nothing_to_break": "tässä ei ole katkaistavaa",
"sketch.error.offset_fillet_chamfer": "`{id}` on siirtymä, ja sen kulmat seuraavat sen lähdekäyriä: pyöristä tai viistä lähdekäyrien kulmat ennen siirtymää tai katkaise ensin siirtymän yhteys",
"sketch.error.offset_trim": "`{id}` on siirtymä, ja sen päät seuraavat sen lähdekäyriä: muokkaa sen sijaan lähdekäyriä tai katkaise ensin siirtymän yhteys",
"sketch.hint.arc.center_point": "Kaari: napsauta keskipistettä ja alkupistettä, kierrä kumpaan suuntaan tahansa ja napsauta loppupistettä tai kirjoita etumerkillinen kaarikulma",
"sketch.hint.arc.three_point": "Kaari: napsauta alkupistettä, loppupistettä ja sitten kaaren pistettä",
"sketch.hint.arc3d": "3D-kaari: napsauta alkupistettä, loppupistettä ja sitten kaaren pistettä (pisteet voivat olla luonnostason ulkopuolella)",
"sketch.hint.break": "Katko: napsauta käyrää kohdasta, josta se jaetaan",
"sketch.hint.circle.center": "Ympyrä: napsauta keskipistettä ja sitten ympyrän pistettä",
"sketch.hint.constraint.generic": "Rajoite: valitse luonnoksen entiteetit",
"sketch.hint.constraint.horizontal_vertical": "Vaakasuora/pystysuora: valitse viiva, kaksi pistettä tai piste ja viiva; valitse viivan keskipiste pitämällä Shift painettuna",
"sketch.hint.constraint.midpoint": "Keskipiste: valitse piste ja viiva tai kaksi viivaa, jolloin jälkimmäinen keskitetään ensimmäiseen",
"sketch.hint.dimension": "Mitta: valitse yksi tai kaksi entiteettiä ja kirjoita arvo (tai sijoita mitta ensin napsauttamalla); muokkaa mittaa napsauttamalla sitä; Enter käyttää",
"sketch.hint.extend": "Jatka: napsauta käyrää jatkettavan pään läheltä (Shift: napsauta kahta käyrää jatkaaksesi molempia niiden kohtaamispisteeseen)",
"sketch.hint.fallback": "Napsauta luonnoksessa",
"sketch.hint.line": "Viiva: napsauta pisteitä; lopeta hiiren kakkospainikkeella tai Esc-näppäimellä",
"sketch.hint.line3d": "3D-viiva: napsauta maailman pisteitä; lopeta hiiren kakkospainikkeella tai Esc-näppäimellä (pisteet voivat olla luonnostason ulkopuolella)",
"sketch.hint.open_done": "Avoin valmis",
"sketch.hint.point3d": "3D-piste: napsauta 3D-pisteen paikkaa",
"sketch.hint.rectangle.center": "Keskipistesuorakulmio: napsauta keskipistettä ja sitten kulmaa",
"sketch.hint.rectangle.rounded": "Pyöristetty suorakulmio: napsauta kahta vastakkaista kulmaa (siirry Tab-näppäimellä säderuutuun kirjoittaaksesi kulmasäteen)",
"sketch.hint.rectangle.three_point": "Kolmen pisteen suorakulmio: napsauta yhden sivun kahta pistettä ja sitten leveyttä",
"sketch.hint.rectangle.two_point": "Suorakulmio: napsauta kahta vastakkaista kulmaa",
"sketch.hint.slot": "Ura: napsauta molempia päitä ja sitten leveyttä",
"sketch.hint.spline3d": "3D-splini: napsauta sovituspisteitä 3D:ssä; lopeta hiiren kakkospainikkeella tai Esc-näppäimellä",
"sketch.hint.trim": "Katkaise: napsauta poistettavaa käyrän osaa tai vedä poistettavien osien yli",
"ui.addToQuickAccess": "Lisää pikakäyttöön",
"ui.close_tab": "Sulje välilehti",
"ui.fair_iterations": "Iteraatiot",
"ui.fair_keep_edges": "Säilytä särmät",
"ui.fair_strength": "Voimakkuus",
"ui.fair_surface_title": "SILOTA PINTA",
"ui.fair_tolerance_default": "0.001 kappaleen koosta",
"ui.first_dimension_scales": "Ensimmäinen mitta skaalaa piirustuksen",
"ui.first_dimension_scales_tip": "Päällä: luonnoksen ensimmäinen pituusmitta skaalaa mittaamaansa piirustusta, joten sen muoto pysyy samana. Pois: mitta muuttaa vain mittaamansa kohteen kokoa.",
"ui.heading_custom_view_navigator": "MUKAUTETTU NÄKYMÄNAVIGAATTORI",
"ui.heading_divide_curve": "JAA KÄYRÄ",
"ui.heading_press_pull": "TYÖNNÄ/VEDÄ",
"ui.history_scope_all": "Näytä koko mallin piirteet",
"ui.history_scope_all_shown": "Koko mallin piirteet",
"ui.history_scope_pick": "Muokkaa komponenttia tai valitse komponentti selaimessa, niin näet vain sen piirteet",
"ui.history_scope_show": "Näytä vain komponentin {name} ja sen sisältämien komponenttien piirteet",
"ui.history_scope_shown": "Komponentin {name} ja sen sisältämien komponenttien piirteet",
"ui.intersection_curve_second_pick": "Leikkauskäyrä: napsauta toista pintaa tai käyrää (aloita alusta hiiren kakkospainikkeella)",
"ui.match_surface_title": "SOVITA PINTA",
"ui.mcp_agents": "Agentit MCP:n kautta",
"ui.mcp_compact": "Tiivis tuloste",
"ui.mcp_compact_note": "MCP-palvelimen (solidcraft-cli mcp) kautta yhdistetyille agenteille: inspect_design tiivistää luonnokset, eikä työkalujen tuloksia muotoilla luettaviksi, joten ne käyttävät vähemmän tokeneita. Koskee muutoksen jälkeen aloitettuja agenttiistuntoja; myös --compact tai SOLIDCRAFT_MCP_COMPACT=1 ottaa sen käyttöön.",
"ui.mesh_import_origin": "Siirrä origoon",
"ui.mesh_import_origin_tip": "Keskitä verkko X- ja Y-suunnassa niin, että sen pohja on tasolla Z = 0. Kun asetus on pois päältä, verkko säilyttää tiedostoon tallennetut koordinaatit.",
"ui.organize": "Järjestä",
"ui.panel_fixture.apply": "Käytä",
"ui.panel_fixture.cancel": "Peruuta",
"ui.panel_fixture.caption": "Synteettinen paneelinäyte",
"ui.panel_fixture.draft": "Säilytetty luonnos",
"ui.panel_fixture.editor": "Näyte-editori",
"ui.panel_fixture.explanation": "Tämä synteettinen sisältö säilyttää luonnoksensa, kun se on piilotettu tai siirretty.",
"ui.panel_fixture.fill": "Täytä näyte",
"ui.panel_fixture.finish": "Valmis",
"ui.panel_fixture.finished": "Synteettinen tapahtuma päättyi",
"ui.panel_fixture.footer": "Synteettiset toiminnot eivät muuta mallia.",
"ui.panel_fixture.guard": "Estä peruutus, kun tapahtuma on käynnissä",
"ui.panel_fixture.inline": "Upotettu näyte",
"ui.panel_fixture.live": "Synteettinen tapahtuma käynnissä",
"ui.panel_fixture.log": "Näyteloki",
"ui.panel_fixture.pin": "Kiinnitetty näyte",
"ui.panel_fixture.title": "{title} · {id}",
"ui.panel_fixture.updates": "Palvelupäivitykset: {count}",
"ui.panel_host.attention": "Vaatii huomiota",
"ui.panel_host.bottom": "Alas",
"ui.panel_host.close": "Sulje paneeli",
"ui.panel_host.collapse": "Kutista paneeli",
"ui.panel_host.expand": "Laajenna paneeli",
"ui.panel_host.floating": "Kelluva",
"ui.panel_host.focus": "Kohdista paneeliin",
"ui.panel_host.focus_target": "Kohdista: {title}",
"ui.panel_host.header": "Paneelin otsikko",
"ui.panel_host.join": "Yhdistä välilehdet",
"ui.panel_host.join_target": "Yhdistä välilehdet: {title}",
"ui.panel_host.left": "Vasemmalle",
"ui.panel_host.menu": "Paneelin toiminnot",
"ui.panel_host.move": "Siirrä",
"ui.panel_host.overflow": "Lisää paneeleja",
"ui.panel_host.popout": "Avaa ikkunassa",
"ui.panel_host.resize": "Muuta paneelin kokoa",
"ui.panel_host.right": "Oikealle",
"ui.panel_host.rule.availability": "Tämä paneeli ei ole käytettävissä.",
"ui.panel_host.rule.bounds": "Paneelit eivät mahdu kokorajoihinsa.",
"ui.panel_host.rule.capability": "Tämä isäntä ei tue kyseistä toimintoa.",
"ui.panel_host.rule.collection_limit": "Paneeliasettelu on saavuttanut rajansa.",
"ui.panel_host.rule.duplicate_id": "Tämä paneelin tunniste on jo käytössä.",
"ui.panel_host.rule.exactly_once": "Jokaisen paneelin on oltava mukana kerran.",
"ui.panel_host.rule.feature_disabled": "Tämä toiminto on poistettu käytöstä tässä paneelissa.",
"ui.panel_host.rule.id": "Paneelin tunniste on virheellinen.",
"ui.panel_host.rule.incompatible_tabs": "Nämä paneelit eivät voi jakaa välilehtiryhmää.",
"ui.panel_host.rule.lifecycle": "Paneeli ei voinut suorittaa tätä toimintoa loppuun.",
"ui.panel_host.rule.missing_target": "Tämä paneelin kohde ei ole enää käytettävissä.",
"ui.panel_host.rule.no_space": "Tälle paneeliasettelulle ei ole tilaa.",
"ui.panel_host.rule.pin_conflict": "Toinen paneeli on jo kiinnitetty tähän reunaan.",
"ui.panel_host.rule.pin_order": "Kiinnitetyn paneelin on pysyttävä reunansa ensimmäisenä.",
"ui.panel_host.rule.placement": "Tätä paneelia ei voi siirtää kyseiseen paikkaan.",
"ui.panel_host.rule.revision": "Asettelu muuttui. Yritä toimintoa uudelleen.",
"ui.panel_host.rule.schema": "Paneelipyyntö on virheellinen.",
"ui.panel_host.rule.version": "Tätä paneeliasettelun versiota ei tueta.",
"ui.panel_host.sash": "Muuta viereisten paneelien kokoa",
"ui.panel_host.scroll_horizontal": "Vieritä paneelisarakkeita",
"ui.panel_host.scroll_vertical": "Vieritä paneelipinoja",
"ui.panel_host.surface": "Paneeli",
"ui.panel_host.tab": "Paneelin välilehti",
"ui.panel_host.tabs": "Kaikki välilehdet",
"ui.panel_layout.applied": "Asettelu {name} otettu käyttöön työtilassa {workspace}",
"ui.panel_layout.cancel": "Peruuta",
"ui.panel_layout.confirm_replace": "Korvataanko ”{name}”?",
"ui.panel_layout.copy": "Kopioi",
"ui.panel_layout.current": "Nykyinen asettelu",
"ui.panel_layout.custom": "Mukautettu",
"ui.panel_layout.custom_hint": "Paneeleja on siirretty asettelun {name} jälkeen.",
"ui.panel_layout.details": "Tiedot",
"ui.panel_layout.layout_workspace": "Asettelun työtila",
"ui.panel_layout.page_defaults_hint": "Palauttaa tämän sivun asetukset. Paneelien järjestys ja tallennetut asettelut säilyvät.",
"ui.panel_layout.panel_layout": "Paneeliasettelu",
"ui.panel_layout.panel_style": "Paneelityyli",
"ui.panel_layout.replace": "Korvaa asettelu",
"ui.panel_layout.replace_current": "Korvaa nykyisellä",
"ui.panel_layout.replace_short": "Korvaa",
"ui.panel_layout.reset": "Palauta työtila",
"ui.panel_layout.reset_hint": "Palauta työtilan {workspace} oletusjärjestys. Tallennetut asettelut säilyvät.",
"ui.panel_layout.reset_short": "Palauta",
"ui.panel_layout.restore_failed": "Asettelua ei voitu palauttaa",
"ui.panel_layout.save": "Tallenna asettelu",
"ui.panel_layout.save_as": "Tallenna nimellä",
"ui.panel_layout.save_as_tile": "Tallenna nimellä…",
"ui.panel_layout.selected": "valittu",
"ui.panel_layout.suggested_name": "Asettelu {n}",
"ui.panel_layout.try_again": "Yritä uudelleen",
"ui.panel_layout.validation.builtin": "Sisäänrakennettuja asetteluja ei voi muuttaa",
"ui.panel_layout.validation.duplicate": "Tämä nimi on jo käytössä",
"ui.panel_layout.validation.empty": "Anna nimi",
"ui.panel_layout.validation.full": "64/64 tallennettu. Valitse korvattava asettelu.",
"ui.panel_layout.validation.invalid": "Käytä 1–64 merkkiä, ei ohjausmerkkejä",
"ui.panel_layout.workspace.classic": "Klassinen",
"ui.panel_layout.workspace.modelling": "Mallinnus",
"ui.panel_layout.workspace.render": "Renderöinti",
"ui.panel_layout.workspace.review": "Tarkastelu",
"ui.panel_layout.workspace.sketch": "Luonnos",
"ui.panel_layout.your_layout": "oma asettelusi",
"ui.point_cloud_dots": "Pisteet",
"ui.point_cloud_reload": "Lataa uudelleen tiedostosta",
"ui.project_references_construction": "Projisoi viitteet apugeometriaksi",
"ui.project_references_construction_note": "Projisoi, Leikkaa, Sisällytä 3D-geometria ja pinnalle luodun uuden luonnoksen pinnan särmät tuottavat apugeometriaa: viitteitä, joita vasten piirretään ja jotka jätetään profiilien ulkopuolelle. Ne pysyvät linkitettyinä malliin.",
"ui.quick_access_full": "Pikakäyttöpalkkiin mahtuu {count} komentoa; poista yksi lisätäksesi toisen",
"ui.removeFromQuickAccess": "Poista pikakäytöstä",
"ui.replace_sketch.from_file": "Mallitiedostosta…",
"ui.replace_sketch.no_sketches": "Mallissa ei ole luonnosta, jonka voisi ottaa",
"ui.report_characters_left_one": "{count} merkki jäljellä",
"ui.report_characters_left_other": "{count} merkkiä jäljellä",
"ui.segments": "Segmentit",
"view_gizmo.arrows": "Kiertonuolet",
"view_gizmo.home": "Aloitusnäkymäpainike",
"view_gizmo.no_such_body": "Tässä mallissa ei ole sen nimistä kappaletta.",
"view_gizmo.note": "Valitse kappale näkymästä. Se tallennetaan asetuksiisi ja asetusprofiileihisi, ja se näytetään jokaisessa mallissa. Napsauta jotakin sen pinnoista katsoaksesi sitä suoraan.",
"view_gizmo.texture": "Tekstuuri",
"view_gizmo.themed": "Teeman mukainen",
"view_gizmo.too_detailed": "Liian yksityiskohtainen näkymänavigaattoriin (yli 10 000 kolmiota)",
"view_gizmo.too_thin": "Liian pitkä ja ohut näkymänavigaattoriin: sen ohuimman sivun on oltava vähintään viidesosa pisimmästä"
}
}
+1 -2704
View File
File diff suppressed because it is too large Load Diff
+1 -3732
View File
File diff suppressed because it is too large Load Diff
+1 -4
View File
@@ -1621,7 +1621,7 @@
"help.sketch.insert_svg": "Citește traseele unui desen SVG într-o schiță, scalate, rotite și plasate așa cum stabiliți. Folosiți-o pentru a transforma un logo sau un contur vectorial în curbe pe care le puteți extruda.",
"help.sketch.inspect": "Deschide un raport despre schița deschisă: câte grade de libertate au rămas și dacă este complet constrânsă. Folosiți-l pentru a afla ce se mai mișcă înainte de a finaliza schița.",
"help.sketch.intersect": "Adaugă curbele sau punctele în care corpuri, fețe, muchii sau alte schițe taie planul schiței. Rămân legate și urmează modelul când acesta se schimbă.",
"help.sketch.intersection_curve": "Creează curbe 3D acolo unde se întâlnesc două corpuri, fețe sau curbe ale altor schițe, legate de ele. Folosiți-le ca trasee sau ghidaje care urmează modelul.",
"help.sketch.intersection_curve": "Creează curbe 3D acolo unde se întâlnesc două corpuri sau fețe, legate de ele. Folosiți-le ca trasee sau ghidaje care urmează modelul.",
"help.sketch.isoparametric_curve": "Creează o curbă 3D pe direcția U sau V a unei fețe, printr-un punct ales de dumneavoastră, legată de față. Folosiți-o ca traseu sau linie de separare care urmează suprafața.",
"help.sketch.line": "Desenează linii conectate punct cu punct, ca lanț deschis sau contur închis. Este instrumentul de bază pentru majoritatea profilurilor.",
"help.sketch.line.midpoint": "Desenează o linie de la mijlocul ei spre un capăt, celălalt capăt fiind în oglindă. Folosiți-o pentru linii centrate pe un punct, de exemplu o muchie simetrică.",
@@ -1889,7 +1889,6 @@
"material.editor.preserved_appearance": "Aspect păstrat",
"material.editor.public_reference": "Referință publică",
"material.editor.reference": "Referință",
"material.editor.remove": "Elimină",
"material.editor.save_or_discard": "Salvați sau renunțați la ciorna materialului înainte de a atribui un material.",
"material.editor.saved": "Material salvat. Atribuirile pe corpuri rămân neschimbate.",
"material.editor.scope": "Salvarea stochează acest material fără a-l atribui corpurilor. Proprietățile și condițiile lăsate necompletate rămân necunoscute. Densitatea din fișă nu modifică densitatea atribuită și nici masa.",
@@ -3808,8 +3807,6 @@
"sample.plate.name": "Placă exemplu",
"sample.vents.about": "Canale într-o matrice dreptunghiulară: rândurile, coloanele și pasul sunt parametri",
"sample.vents.name": "Placă de ventilație",
"scale.per_axis": "Pe axe",
"scale.uniform": "Uniform",
"search.command_keys": "Enter execută Shift+Enter execută și păstrează deschis Esc închide",
"search.commands": "Comenzi",
"search.design": "În acest proiect",
+1 -11
View File
@@ -567,7 +567,6 @@
"Select edges": "Выберите рёбра",
"Select points of the sketch being edited": "Выберите точки редактируемого эскиза",
"Select the centre the pattern turns around first": "Сначала выберите центр, вокруг которого поворачивается массив",
"Select the curves to divide first": "Сначала выберите кривые для деления",
"Select the curves to offset first": "Сначала выберите кривые для смещения",
"Select the mirror line": "Выберите линию зеркала",
"Select the sketch curves or points to mirror first": "Сначала выберите кривые или точки эскиза для зеркального отражения",
@@ -648,7 +647,6 @@
"The direction must be an axis or a straight sketch curve that lies in the sketch plane": "Направление должно быть осью или прямолинейной кривой эскиза, лежащей в плоскости эскиза",
"The mirror line cannot also be mirrored": "Линию зеркала нельзя одновременно отражать",
"The mirror line must be a straight curve of this sketch, not an origin axis": "Линия зеркала должна быть прямолинейной кривой этого эскиза, а не осью начала координат",
"The origin axis is perpendicular to the sketch plane, so it has no line in the plane": "Ось начала координат перпендикулярна плоскости эскиза, поэтому линии в этой плоскости нет",
"The saved author occurrence is missing. Select a valid author placement before rebinding.": "Сохранённое исходное вхождение отсутствует. Выберите корректное исходное положение перед перепривязкой.",
"Then": "Затем",
"These features will be deleted:": "Эти операции будут удалены:",
@@ -1186,7 +1184,6 @@
"cmd.sketch_options": "Параметры палитры эскиза",
"cmd.sketch_paste": "Вставить элементы эскиза",
"cmd.sketch_point3d": "3D-точка",
"cmd.sketch_point_divide": "Разделить кривую",
"cmd.sketch_polygon_circumscribed": "Описанный многоугольник",
"cmd.sketch_polygon_edge": "Многоугольник по ребру",
"cmd.sketch_polygon_inscribed": "Вписанный многоугольник",
@@ -1613,7 +1610,7 @@
"help.sketch.insert_svg": "Читает контуры рисунка SVG в эскиз, масштабируя, поворачивая и размещая их так, как вы зададите. Используйте, чтобы превратить логотип или векторный контур в кривые, которые можно выдавить.",
"help.sketch.inspect": "Открывает отчёт об открытом эскизе: сколько осталось степеней свободы и определён ли он полностью. Используйте, чтобы выяснить, что ещё двигается, прежде чем завершить эскиз.",
"help.sketch.intersect": "Добавляет кривые или точки, где тела, грани, рёбра или другие эскизы пересекают плоскость эскиза. Они остаются связанными и следуют за моделью при её изменении.",
"help.sketch.intersection_curve": "Создаёт 3D-кривые там, где встречаются два тела, две грани или кривые других эскизов, связанные с ними. Используйте как траектории или направляющие, следующие за моделью.",
"help.sketch.intersection_curve": "Создаёт 3D-кривые там, где встречаются два тела или две грани, связанные с ними. Используйте как траектории или направляющие, следующие за моделью.",
"help.sketch.isoparametric_curve": "Создаёт 3D-кривую вдоль направления U или V грани через выбранную точку, связанную с гранью. Используйте как траекторию или линию разделения, следующую за поверхностью.",
"help.sketch.line": "Рисует соединённые линии точка за точкой, как открытую цепочку или замкнутый контур. Это основной инструмент для большинства профилей.",
"help.sketch.line.midpoint": "Рисует линию от её середины до одного конца, второй конец отражается зеркально. Используйте для линий с центром в точке, например симметричного ребра.",
@@ -1625,7 +1622,6 @@
"help.sketch.pattern.circular": "Копирует геометрию эскиза вокруг центральной точки на полный круг или заданный угол. Используйте для окружностей болтов, спиц и зубьев.",
"help.sketch.pattern.rectangular": "Копирует геометрию эскиза рядами и столбцами с заданным шагом. Используйте для сеток отверстий, пазов или вентиляционных прорезей.",
"help.sketch.point": "Ставит точку эскиза. Используйте как ориентир для размеров, ограничений, центров отверстий или последующих операций.",
"help.sketch.point.divide": "Ставит точки, делящие выбранные кривые на равные по длине части. Точки остаются на каждой кривой и сохраняют шаг при её изменении.",
"help.sketch.point3d": "Ставит точку в пространстве при включённом 3D-эскизе. Используйте как ориентир для 3D-кривых и траекторий.",
"help.sketch.polygon.circumscribed": "Рисует правильный многоугольник вокруг окружности; размер задаётся от центра до середины стороны. Используйте, когда известен размер под ключ, например у шестигранной гайки.",
"help.sketch.polygon.edge": "Рисует правильный многоугольник по двум концам одной стороны. Используйте, когда известны длина и положение стороны.",
@@ -1882,7 +1878,6 @@
"material.editor.preserved_appearance": "Сохранённый внешний вид",
"material.editor.public_reference": "Общедоступный справочник",
"material.editor.reference": "Ссылка",
"material.editor.remove": "Убрать",
"material.editor.save_or_discard": "Сохраните или отмените черновик материала, прежде чем назначать материал.",
"material.editor.saved": "Материал сохранён. Назначения телам не изменились.",
"material.editor.scope": "Сохранение записывает этот материал, не назначая его телам. Пустые свойства и условия остаются неизвестными. Плотность в карточке не меняет назначенную плотность и массу.",
@@ -3755,8 +3750,6 @@
"sample.plate.name": "Образец пластины",
"sample.vents.about": "Пазы в прямоугольном массиве: число рядов, столбцов и шаг заданы параметрами",
"sample.vents.name": "Вентиляционная пластина",
"scale.per_axis": "По осям",
"scale.uniform": "Равномерно",
"search.command_keys": "Enter выполнить Shift+Enter выполнить и оставить открытым Esc закрыть",
"search.commands": "Команды",
"search.design": "В этом дизайне",
@@ -3844,7 +3837,6 @@
"sketch.dimension_applied": "Размер применён",
"sketch.dimension_applied_defined": "Размер применён; параметр `{name}` определён",
"sketch.dimension_applied_renamed": "Размер применён; параметру присвоено имя `{name}`",
"sketch.divide_hint": "Точки делят каждую кривую на равные по длине части и сохраняют их при её изменении.",
"sketch.dof_left": "Осталось степеней свободы: {count}",
"sketch.dof_left_one": "Осталась {count} степень свободы",
"sketch.draw_curves": "Рисовать как {linetype}",
@@ -4634,7 +4626,6 @@
"ui.heading_create_sketch": "СОЗДАТЬ ЭСКИЗ",
"ui.heading_cylinder": "ЦИЛИНДР",
"ui.heading_design": "ДИЗАЙН",
"ui.heading_divide_curve": "РАЗДЕЛИТЬ КРИВУЮ",
"ui.heading_draft": "УКЛОН",
"ui.heading_edit": "ИЗМЕНИТЬ",
"ui.heading_equation_curve": "КРИВАЯ ПО УРАВНЕНИЮ",
@@ -4962,7 +4953,6 @@
"ui.second_rail": "Вторая направляющая",
"ui.section_analysis": "Анализ сечения",
"ui.section_size": "Размер сечения",
"ui.segments": "Сегменты",
"ui.select": "Выбрать",
"ui.selectOther": "Выбрать другое…",
"ui.selectTangentChain": "Выбрать касательную цепочку",
+1 -2
View File
@@ -1621,7 +1621,7 @@
"help.sketch.insert_svg": "Учитава путање SVG цртежа у скицу, скалиране, окренуте и постављене како зададете. Користите га да логотип или векторски обрис претворите у криве које можете екструдирати.",
"help.sketch.inspect": "Отвара извештај о отвореној скици: колико је степени слободе остало и да ли је потпуно ограничена. Користите га да сазнате шта се још помера пре него што завршите скицу.",
"help.sketch.intersect": "Додаје криве или тачке у којима тела, лица, ивице или друге скице секу раван скице. Оне остају повезане и прате модел када се он промени.",
"help.sketch.intersection_curve": "Прави 3D криве тамо где се два тела, лица или криве других скица састају, повезане са њима. Користите их као путање или водилице које прате модел.",
"help.sketch.intersection_curve": "Прави 3D криве тамо где се два тела или лица састају, повезане са њима. Користите их као путање или водилице које прате модел.",
"help.sketch.isoparametric_curve": "Прави 3D криву дуж U или V смера лица кроз тачку коју изаберете, повезану са лицем. Користите је као путању или линију поделе која прати површ.",
"help.sketch.line": "Црта повезане линије тачку по тачку, као отворени ланац или затворени обрис. То је основни алат за већину профила.",
"help.sketch.line.midpoint": "Црта линију од њене средишње тачке до једног краја, а други крај се пресликава. Користите је за линије центриране на тачки, на пример за симетричну ивицу.",
@@ -1889,7 +1889,6 @@
"material.editor.preserved_appearance": "Сачувани изглед",
"material.editor.public_reference": "Јавна референца",
"material.editor.reference": "Референца",
"material.editor.remove": "Уклони",
"material.editor.save_or_discard": "Сачувајте или одбаците нацрт материјала пре доделе материјала.",
"material.editor.saved": "Материјал је сачуван. Доделе телима остају непромењене.",
"material.editor.scope": "Сачувај чува овај материјал без доделе телима. Празна својства и услови остају непознати. Густина са картице не мења додељену густину ни масу.",
+1 -4
View File
@@ -1622,7 +1622,7 @@
"help.sketch.insert_svg": "Läser in banorna från en SVG-ritning i en skiss, skalade, vridna och placerade där du anger. Använd det för att göra en logotyp eller en vektorkontur till kurvor som du kan extrudera.",
"help.sketch.inspect": "Öppnar en rapport om den öppna skissen: hur många frihetsgrader som återstår och om den är fullt definierad. Använd det för att ta reda på vad som fortfarande rör sig innan du avslutar skissen.",
"help.sketch.intersect": "Lägger till de kurvor eller punkter där kroppar, ytor, kanter eller andra skisser korsar skissplanet. De förblir länkade och följer modellen när den ändras.",
"help.sketch.intersection_curve": "Skapar 3D-kurvor där två kroppar, ytor eller kurvor från andra skisser möts, länkade till dem. Använd dem som banor eller styrkurvor som följer modellen.",
"help.sketch.intersection_curve": "Skapar 3D-kurvor där två kroppar eller ytor möts, länkade till dem. Använd dem som banor eller styrkurvor som följer modellen.",
"help.sketch.isoparametric_curve": "Skapar en 3D-kurva längs en ytas U- eller V-riktning genom en punkt som du väljer, länkad till ytan. Använd den som en bana eller delningslinje som följer ytan.",
"help.sketch.line": "Ritar sammanhängande linjer punkt för punkt, som en öppen kedja eller en sluten kontur. Det är det grundläggande verktyget för de flesta profiler.",
"help.sketch.line.midpoint": "Ritar en linje från dess mittpunkt ut till ena änden, med den andra änden speglad. Använd det för linjer centrerade på en punkt, till exempel en symmetrisk kant.",
@@ -1890,7 +1890,6 @@
"material.editor.preserved_appearance": "Bevarat utseende",
"material.editor.public_reference": "Offentlig referens",
"material.editor.reference": "Referens",
"material.editor.remove": "Ta bort",
"material.editor.save_or_discard": "Spara eller förkasta materialutkastet innan du tilldelar ett material.",
"material.editor.saved": "Materialet sparades. Kropparnas tilldelningar är oförändrade.",
"material.editor.scope": "Spara lagrar materialet utan att tilldela det till kroppar. Tomma egenskaper och förhållanden förblir okända. Kortets densitet ändrar inte tilldelad densitet eller massa.",
@@ -3809,8 +3808,6 @@
"sample.plate.name": "Exempelplatta",
"sample.vents.about": "Spår i ett rektangulärt mönster: rader, kolumner och delning är parametrar",
"sample.vents.name": "Ventilationsplatta",
"scale.per_axis": "Per axel",
"scale.uniform": "Likformig",
"search.command_keys": "Enter kör Shift+Enter kör och behåll öppen Esc stäng",
"search.commands": "Kommandon",
"search.design": "I denna konstruktion",
+1 -4
View File
@@ -1621,7 +1621,7 @@
"help.sketch.insert_svg": "Bir SVG çiziminin yollarını, belirlediğiniz ölçekte, açıda ve konumda bir eskize okur. Bir logoyu veya vektör dış hattını ekstrüzyon yapabileceğiniz eğrilere dönüştürmek için kullanın.",
"help.sketch.inspect": "Açık eskiz için bir rapor açar: kaç serbestlik derecesi kaldığını ve tam kısıtlı olup olmadığını. Eskizi bitirmeden önce nelerin hâlâ hareket ettiğini öğrenmek için kullanın.",
"help.sketch.intersect": "Gövdelerin, yüzlerin, kenarların veya diğer eskizlerin eskiz düzlemini kestiği eğrileri ya da noktaları ekler. Bağlı kalır ve model değiştiğinde onu izler.",
"help.sketch.intersection_curve": "İki gövdenin, yüzün veya diğer eskizlerin eğrilerinin buluştuğu yerde, onlara bağlı 3B eğriler oluşturur. Bunları modeli izleyen yollar veya kılavuz raylar olarak kullanın.",
"help.sketch.intersection_curve": "İki gövdenin veya yüzün buluştuğu yerde, onlara bağlı 3B eğriler oluşturur. Bunları modeli izleyen yollar veya kılavuz raylar olarak kullanın.",
"help.sketch.isoparametric_curve": "Bir yüzün U veya V yönü boyunca, seçtiğiniz bir noktadan geçen ve yüze bağlı bir 3B eğri oluşturur. Yüzeyi izleyen bir yol veya bölme çizgisi olarak kullanın.",
"help.sketch.line": "Bağlantılı çizgileri nokta nokta, açık bir zincir veya kapalı bir dış hat olarak çizer. Çoğu profil için temel araçtır.",
"help.sketch.line.midpoint": "Bir çizgiyi orta noktasından bir uca doğru çizer; diğer uç yansıtılır. Bir nokta etrafında ortalanmış çizgiler, örneğin simetrik bir kenar için kullanın.",
@@ -1889,7 +1889,6 @@
"material.editor.preserved_appearance": "Korunan görünüm",
"material.editor.public_reference": "Herkese açık referans",
"material.editor.reference": "Referans",
"material.editor.remove": "Kaldır",
"material.editor.save_or_discard": "Malzeme atamadan önce malzeme taslağını kaydedin veya atın.",
"material.editor.saved": "Malzeme kaydedildi. Gövde atamaları değişmedi.",
"material.editor.scope": "Kaydetme, bu malzemeyi gövdelere atamadan saklar. Boş özellikler ve koşullar bilinmez kalır. Kart yoğunluğu, atanan yoğunluğu veya kütleyi değiştirmez.",
@@ -3808,8 +3807,6 @@
"sample.plate.name": "Örnek plaka",
"sample.vents.about": "Dikdörtgen desende yuvalar: satırlar, sütunlar ve aralık parametredir",
"sample.vents.name": "Havalandırma plakası",
"scale.per_axis": "Eksen başına",
"scale.uniform": "Tekdüze",
"search.command_keys": "Enter çalıştır Shift+Enter çalıştır ve açık tut Esc kapat",
"search.commands": "Komutlar",
"search.design": "Bu tasarımda",
+5 -531
View File
File diff suppressed because it is too large Load Diff
+14 -587
View File
File diff suppressed because it is too large Load Diff
+2915 -2928
View File
File diff suppressed because it is too large Load Diff
+14 -587
View File
File diff suppressed because it is too large Load Diff
+34 -201
View File
@@ -16,9 +16,6 @@ struct U {
ana_c: array<vec4<f32>, 8>,
ana_f: vec4<f32>, // x = 1: stripe the negative draft and blocked faces
depth: vec4<f32>, // x = 1: reversed depth (1 near, 0 far); y, z: the faces' push (`FACE_BIAS`)
// Where the drawn geometry is moved in the world: identity, or a dragged component's move
// from where its scene was built (`MovingLayer`)
model: mat4x4<f32>,
tint: vec4<f32>, // xyz added to a whole hovered body's colour before lighting
sel: vec4<f32>, // xyz a whole selected body's colour before lighting
// the section hatch colours by part (`solidcraft_render::hatch`), the first the cap's own
@@ -28,16 +25,6 @@ struct U {
sky: vec4<f32>, // xyz = world up; w = 1: shade in linear light with a sky fill (#7974)
};
/// A scene's point in the world (see `U.model`).
fn placed(p: vec3<f32>) -> vec3<f32> {
return (u.model * vec4<f32>(p, 1.0)).xyz;
}
/// A scene's direction in the world (see `placed`).
fn turned(n: vec3<f32>) -> vec3<f32> {
return (u.model * vec4<f32>(n, 0.0)).xyz;
}
fn reversed() -> bool {
return u.depth.x > 0.5;
}
@@ -96,11 +83,10 @@ struct TOut {
};
@vertex
fn vs_tri(@location(0) local: vec3<f32>, @location(1) n: vec3<f32>, @location(2) c: u32) -> TOut {
fn vs_tri(@location(0) p: vec3<f32>, @location(1) n: vec3<f32>, @location(2) c: u32) -> TOut {
var o: TOut;
let p = placed(local);
o.pos = u.vp * vec4<f32>(p, 1.0);
o.n = turned(n);
o.n = n;
let e = palette_entry(c);
o.c = unpack_color(e.x);
o.h = e.y;
@@ -109,8 +95,7 @@ fn vs_tri(@location(0) local: vec3<f32>, @location(1) n: vec3<f32>, @location(2)
}
/// Shared triangles (in their part's own frame) drawn at one placement: the rows of its rigid
/// move (`r0`..`r2`, a point's coordinates are their dot products with (p, 1)) and its colour,
/// then moved like the rest of its scene (`placed`: a dragged component's layer).
/// move (`r0`..`r2`, a point's coordinates are their dot products with (p, 1)) and its colour.
/// The vertex colour (location 2) is not read.
@vertex
fn vs_tri_inst(
@@ -122,11 +107,10 @@ fn vs_tri_inst(
@location(6) c: u32,
) -> TOut {
let q = vec4<f32>(p, 1.0);
let wp = placed(vec3<f32>(dot(r0, q), dot(r1, q), dot(r2, q)));
let pn = vec3<f32>(dot(r0.xyz, n), dot(r1.xyz, n), dot(r2.xyz, n));
let wp = vec3<f32>(dot(r0, q), dot(r1, q), dot(r2, q));
var o: TOut;
o.pos = u.vp * vec4<f32>(wp, 1.0);
o.n = turned(pn);
o.n = vec3<f32>(dot(r0.xyz, n), dot(r1.xyz, n), dot(r2.xyz, n));
let e = palette_entry(c);
o.c = unpack_color(e.x);
o.h = e.y;
@@ -156,7 +140,7 @@ fn vs_tri_inst_flat(
@location(6) c: u32,
) -> FOut {
let q = vec4<f32>(p, 1.0);
let wp = placed(vec3<f32>(dot(r0, q), dot(r1, q), dot(r2, q)));
let wp = vec3<f32>(dot(r0, q), dot(r1, q), dot(r2, q));
var o: FOut;
o.pos = u.vp * vec4<f32>(wp, 1.0);
o.rp = wp - u.eye.xyz;
@@ -716,20 +700,14 @@ fn lit_color(i: TOut, visibility: f32, base: vec4<f32>) -> vec4<f32> {
if (dot(n, v) < 0.0) { n = -n; }
if u.product_lights_meta.x>0.0 {
var radiance=vec3<f32>(0.0);
let albedo=srgb_decode(base.rgb);
for (var k=0u;k<min(u32(u.product_lights_meta.y),21u);k+=1u) {
if u.product_lights[k*4u].w == 4.0 {radiance+=albedo*u.product_lights[k*4u+1u].xyz/3.141592653589793;continue;}
if u.product_lights[k*4u].w == 4.0 {radiance+=to_linear(base.rgb)*u.product_lights[k*4u+1u].xyz/3.141592653589793;continue;}
let sample=product_light_sample(k,i.wp);
radiance+=albedo*sample[1]*(max(dot(n,sample[0]),0.0)/3.141592653589793);
radiance+=to_linear(base.rgb)*sample[1]*(max(dot(n,sample[0]),0.0)/3.141592653589793);
}
let mapped=radiance/(vec3<f32>(1.0)+radiance);
// A linear attachment takes linear light as it is; any other is encoded once, as the CPU
// image is (decoding the encoded value again through `out_color` would flatten the dark end).
if (u.back.w > 0.5) {
return vec4<f32>(mapped,base.a);
}
let encoded=select(mapped*12.92,1.055*pow(mapped,vec3<f32>(1.0/2.4))-vec3<f32>(0.055),mapped>vec3<f32>(0.0031308));
return vec4<f32>(encoded,base.a);
return out_color(vec4<f32>(encoded,base.a));
}
let key = normalize(v * 0.8 + vec3<f32>(-0.3, 0.2, 0.6));
let diff = max(dot(n, key), 0.0);
@@ -807,9 +785,7 @@ fn lifted_z(p: vec3<f32>, c: vec4<f32>, px: f32, half: vec2<f32>) -> f32 {
}
@vertex
fn vs_line(@builtin(vertex_index) vi: u32, @location(0) local_a: vec3<f32>, @location(1) local_b: vec3<f32>, @location(2) c: u32, @location(3) wbits: u32) -> LOut {
let a = placed(local_a);
let b = placed(local_b);
fn vs_line(@builtin(vertex_index) vi: u32, @location(0) a: vec3<f32>, @location(1) b: vec3<f32>, @location(2) c: u32, @location(3) wbits: u32) -> LOut {
var pa = a;
var pb = b;
var ca = u.vp * vec4<f32>(a, 1.0);
@@ -856,7 +832,7 @@ fn vs_line(@builtin(vertex_index) vi: u32, @location(0) local_a: vec3<f32>, @loc
var z = base.z;
if (lifted && base.w > 1e-6) {
let p = select(pa, pb, t > 0.5);
let g = grazing(p, turned(octahedral(wbits & 4095u)), turned(octahedral((wbits >> 12u) & 4095u)));
let g = grazing(p, octahedral(wbits & 4095u), octahedral((wbits >> 12u) & 4095u));
z = lifted_z(p, base, wd * 0.5 * g + 1.0, half);
}
var o: LOut;
@@ -907,10 +883,10 @@ fn fs_line_all(i: LOut) -> @location(0) vec4<f32> {
return out_color(i.c);
}
// Point clouds and their cells (`view/clouds.rs`): dots, segments as beads (or lines when they
// have no size) and triangles, from one record per element. The cloud's style colours them by
// their own colour, a ramp or a palette, and shows only those whose filtered values lie in its
// ranges or sets; values vary across an element, so a range cuts it where its value crosses an end.
// Point clouds (`view/clouds.rs`): each point is a round dot a few pixels across, facing the
// screen, depth-tested and written like the model's faces, so the model hides the points behind
// it and they hide it. The cloud's style colours them by their own colour, a ramp or a palette,
// and shows only those whose filtered values lie in its ranges or sets.
struct Cloud {
style: vec4<f32>, // x: colour (0 own, 1 ramp, 2 palette), y: dot size (px), z, w: ramp range
@@ -919,88 +895,43 @@ struct Cloud {
@group(1) @binding(3) var<uniform> cloud: Cloud;
struct CIn {
@location(0) a: vec3<f32>,
@location(1) b: vec3<f32>,
@location(2) c: vec3<f32>,
@location(8) before: vec3<f32>,
@location(9) after: vec3<f32>,
@location(3) v: vec3<f32>,
@location(4) f0: vec3<f32>,
@location(5) f1: vec3<f32>,
@location(10) f2: vec3<f32>,
@location(11) f3: vec3<f32>,
@location(6) size: vec2<f32>,
@location(7) rgb: vec4<f32>,
@location(0) p: vec3<f32>,
@location(1) v: f32,
@location(2) f: vec4<f32>,
@location(3) rgb: vec4<f32>,
};
struct COut {
@builtin(position) pos: vec4<f32>,
@location(0) wp: vec3<f32>,
@location(1) n: vec3<f32>, // zero: not lit
@location(2) v: f32,
@location(3) f: vec4<f32>,
@location(4) rgb: vec3<f32>,
@location(5) at: vec2<f32>, // a dot's place on its disc
@location(6) @interpolate(flat) has: u32,
@location(1) v: f32,
@location(2) f: vec4<f32>,
@location(3) rgb: vec3<f32>,
@location(4) at: vec2<f32>, // the place on its disc
@location(5) @interpolate(flat) has: u32,
};
fn cloud_out(i: CIn, w: vec3<f32>, wp: vec3<f32>, pos: vec4<f32>, n: vec3<f32>) -> COut {
var o: COut;
o.pos = pos;
o.wp = wp;
o.n = n;
o.v = dot(w, i.v);
o.f = vec4<f32>(dot(w, i.f0), dot(w, i.f1), dot(w, i.f2), dot(w, i.f3));
o.rgb = i.rgb.rgb;
o.at = vec2<f32>(0.0);
o.has = u32(round(i.rgb.a * 255.0));
return o;
}
fn behind(c: vec4<f32>) -> bool {
return near_z(c) < 0.0;
}
@vertex
fn vs_cloud_dot(@builtin(vertex_index) vi: u32, i: CIn) -> COut {
var xs = array<f32, 6>(-1.0, 1.0, 1.0, -1.0, 1.0, -1.0);
var ys = array<f32, 6>(-1.0, -1.0, 1.0, -1.0, 1.0, 1.0);
let at = vec2<f32>(xs[vi], ys[vi]);
let size = max(cloud.style.y, 1.0);
let centre = u.vp * vec4<f32>(i.a, 1.0);
var pos = vec4<f32>(centre.xy + at * size / u.screen.xy * centre.w, centre.z, centre.w);
if (behind(centre)) { pos = vec4<f32>(0.0, 0.0, 0.0, -1.0); }
var o = cloud_out(i, vec3<f32>(1.0, 0.0, 0.0), i.a, pos, vec3<f32>(0.0));
let centre = u.vp * vec4<f32>(i.p, 1.0);
var o: COut;
o.pos = vec4<f32>(centre.xy + at * size / u.screen.xy * centre.w, centre.z, centre.w);
// Behind the eye: nothing.
if (near_z(centre) < 0.0) { o.pos = vec4<f32>(0.0, 0.0, 0.0, -1.0); }
o.wp = i.p;
o.v = i.v;
o.f = i.f;
o.rgb = i.rgb.rgb;
o.has = u32(round(i.rgb.a * 255.0));
// Dots under two pixels are squares: a disc that small loses its centre pixel.
o.at = at * select(1.0, 0.0, size < 2.0);
return o;
}
/// The least half-width of a segment on screen, in pixels.
const MIN_HALF_PX: f32 = 0.75;
/// The frame of a bead along `d`: along it, across it level, and up, its height axis.
fn bead_frame(d: vec3<f32>) -> mat3x3<f32> {
var t = vec3<f32>(1.0, 0.0, 0.0);
if (length(d) > 1e-9) { t = d / length(d); }
var side = cross(vec3<f32>(0.0, 0.0, 1.0), t);
if (length(side) < 1e-6) { side = vec3<f32>(1.0, 0.0, 0.0); }
side = normalize(side);
return mat3x3<f32>(t, side, cross(t, side));
}
/// Corner `j` (0…9) of a bead's cross-section, a stadium: its place across and up, and its
/// normal. Corners 0…4 go up the right half-disc, 5…9 down the left one, so 4–5 is the flat top
/// and 9–0 the flat bottom.
fn stadium(j: u32, size: vec2<f32>) -> vec4<f32> {
let k = j % 10u;
let right = k < 5u;
let a = -1.5707963 + 0.7853982 * f32(k % 5u) + select(3.1415927, 0.0, right);
let r = 0.5 * size.y;
let flat_half = 0.5 * max(size.x - size.y, 0.0);
return vec4<f32>(select(-flat_half, flat_half, right) + r * cos(a), r * sin(a), cos(a), sin(a));
}
/// Whether filter `f` keeps the value `v`.
fn cloud_keeps(f: vec4<f32>, v: f32) -> bool {
if (f.x < 0.5) { return true; }
@@ -1009,101 +940,6 @@ fn cloud_keeps(f: vec4<f32>, v: f32) -> bool {
return k >= 0 && k < 32 && ((bitcast<u32>(f.w) >> u32(k)) & 1u) != 0u;
}
/// Whether filter `f` leaves out a whole element with values `v` at its corners: all on one
/// side of a range, or one value at every corner, not kept. A set of values with corners that
/// differ may keep part of the element: its fragments decide.
fn cloud_drops(f: vec4<f32>, v: vec3<f32>) -> bool {
if (f.x > 1.5) { return all(v == vec3<f32>(v.x)) && !cloud_keeps(f, v.x); }
return f.x > 0.5 && (all(v < vec3<f32>(f.y)) || all(v > vec3<f32>(f.z)));
}
/// Whether a filter leaves out the whole element.
fn filtered_out(i: CIn) -> bool {
let has = u32(round(i.rgb.a * 255.0));
let values = array<vec3<f32>, 4>(i.f0, i.f1, i.f2, i.f3);
for (var k = 0u; k < 4u; k++) {
if (((has >> k) & 1u) != 0u && cloud_drops(cloud.filters[k], values[k])) { return true; }
}
return false;
}
/// The part in front of the near plane of the segment between clip-space `a` and `b`, as
/// fractions of it from `a`; empty (first above second) when all of it is behind. Clip-space
/// coordinates are affine along a line, so the crossing is exact.
fn in_front(a: vec4<f32>, b: vec4<f32>) -> vec2<f32> {
let za = near_z(a);
let zb = near_z(b);
if (za < 0.0 && zb < 0.0) { return vec2<f32>(1.0, 0.0); }
let t = za / (za - zb);
return vec2<f32>(select(0.0, t, za < 0.0), select(1.0, t, zb < 0.0));
}
@vertex
fn vs_cloud_segment(@builtin(vertex_index) vi: u32, i: CIn) -> COut {
// Corner `vi % 10` of the cross-section at the start (`vi < 10`) or the end; the index
// buffer joins them into the bead's sides.
let pa = u.vp * vec4<f32>(i.a, 1.0);
let pb = u.vp * vec4<f32>(i.b, 1.0);
let part = in_front(pa, pb);
if (filtered_out(i) || part.x > part.y) {
return cloud_out(i, vec3<f32>(1.0, 0.0, 0.0), i.a, vec4<f32>(0.0, 0.0, 0.0, -1.0), vec3<f32>(0.0));
}
// Where the near plane cuts it, the bead ends there, square; its numbers are exact at `e`.
let at_end = vi >= 10u;
let e = select(part.x, part.y, at_end);
let cut = e != select(0.0, 1.0, at_end);
let f = bead_frame(i.b - i.a);
let c = stadium(vi % 10u, i.size);
let axis = mix(i.a, i.b, e);
// Where it meets the next or the previous bead, the cross-section lies in the plane halfway
// between their directions, stretched across to keep its width: both beads end on the same
// section. A turn sharper than 120° ends square instead.
let other = select(i.a - i.before, i.after - i.b, at_end);
var across_dir = f[1];
var stretch = 1.0;
if (!cut && length(other) > 1e-9) {
let g = bead_frame(other);
let mid = f[1] + g[1];
if (length(mid) > 1e-6 && dot(normalize(mid), f[1]) > 0.5) {
across_dir = normalize(mid);
stretch = 1.0 / dot(across_dir, f[1]);
}
}
let wp = axis + across_dir * (c.x * stretch) + f[2] * c.y;
let ca = u.vp * vec4<f32>(axis, 1.0);
let cw = u.vp * vec4<f32>(wp, 1.0);
let half = u.screen.xy * 0.5;
var pos = cw;
// At least a pixel and a half across: a bead seen from afar, or a line without size. A corner
// behind the eye has no place on the screen and needs no widening: the rasteriser clips it.
if (cw.w > 0.0) {
let c0 = mix(pa, pb, part.x);
let c1 = mix(pa, pb, part.y);
let along = (c1.xy / c1.w - c0.xy / c0.w) * half;
var across = vec2<f32>(-along.y, along.x);
if (length(across) < 1e-6) { across = vec2<f32>(1.0, 0.0); }
across = normalize(across);
var px = (cw.xy / cw.w - ca.xy / ca.w) * half;
if (length(px) < MIN_HALF_PX * abs(c.z)) {
px = across * c.z * MIN_HALF_PX;
pos = vec4<f32>((ca.xy / ca.w + px / half) * cw.w, cw.z, cw.w);
}
}
let n = select(f[1] * c.z + f[2] * c.w, vec3<f32>(0.0), i.size.y <= 0.0);
return cloud_out(i, vec3<f32>(1.0 - e, e, 0.0), wp, pos, n);
}
@vertex
fn vs_cloud_triangle(@builtin(vertex_index) vi: u32, i: CIn) -> COut {
// Not `w[vi] = 1.0`: the Windows D3D12 shader compiler cannot write through a dynamic vector index.
let w = vec3<f32>(f32(vi == 0u), f32(vi == 1u), f32(vi == 2u));
let wp = i.a * w.x + i.b * w.y + i.c * w.z;
var n = cross(i.b - i.a, i.c - i.a);
if (length(n) > 0.0) { n = normalize(n); }
// The true clip-space corner, even behind the eye: the rasteriser clips a triangle exactly.
return cloud_out(i, w, wp, u.vp * vec4<f32>(wp, 1.0), n);
}
fn cloud_ramp(t: f32) -> vec3<f32> {
var stops = array<vec3<f32>, 5>(
vec3<f32>(40.0, 70.0, 200.0), vec3<f32>(30.0, 170.0, 230.0), vec3<f32>(60.0, 200.0, 90.0),
@@ -1138,8 +974,5 @@ fn fs_cloud(o: COut) -> @location(0) vec4<f32> {
} else if ((o.has & 16u) != 0u && mode > 0.5) {
c = cloud_ramp((o.v - cloud.style.z) / max(cloud.style.w - cloud.style.z, 1e-12));
}
if (length(o.n) > 0.5) {
c = c * (0.45 + 0.55 * abs(dot(normalize(o.n), normalize(u.back.xyz))));
}
return out_color(vec4<f32>(c, 1.0));
}
@@ -1,21 +1,6 @@
//! Original light and dark palette values.
use crate::{IconColors, Tokens};
//! Original light and dark palette values. Compiled by the UI theme boundary.
use crate::theme::{AnalysisColors, IconColors, Tokens};
use egui::Color32;
use solidcraft_color::AnalysisColors;
/// The primary (`active-3`) strokes, light then dark, that the tokens share with SolidCraft's icon artwork
/// (`assets/icons/ui/design/palette.toml`, including its colour vision variants). ui-egui's icon tests hold them equal.
pub mod icon_strokes {
pub const SKETCH_PRIMARY: [[u8; 3]; 2] = [[5, 127, 69], [18, 141, 69]];
pub const CONSTRAINT_PRIMARY: [[u8; 3]; 2] = [[202, 71, 61], [193, 99, 88]];
pub const CONSTRUCTION_PRIMARY: [[u8; 3]; 2] = [[156, 86, 0], [167, 93, 0]];
pub const SKETCH_RED_GREEN: [[u8; 3]; 2] = [[29, 125, 82], [29, 127, 137]];
pub const CONSTRUCTION_RED_GREEN: [[u8; 3]; 2] = [[185, 115, 0], [167, 93, 0]];
pub const CONSTRAINT_RED_GREEN: [[u8; 3]; 2] = [[175, 64, 56], [193, 99, 88]];
pub const CONSTRUCTION_BLUE_YELLOW: [[u8; 3]; 2] = [[185, 115, 0], [195, 125, 0]];
pub const CONSTRAINT_BLUE_YELLOW: [[u8; 3]; 2] = [[175, 64, 56], [133, 85, 74]];
}
use icon_strokes as strokes;
const fn icon_primary(rgb: [u8; 3]) -> Color32 {
Color32::from_rgb(rgb[0], rgb[1], rgb[2])
@@ -32,7 +17,8 @@ impl Tokens {
nav_tip_key_border: Color32::from_rgba_unmultiplied_const(128, 140, 160, 153),
nav_field: Color32::from_rgb(255, 255, 255),
borders: crate::Borders::LEGACY,
borders: crate::theme::Borders::LEGACY,
icon_palette: None,
file_dim: Color32::from_rgb(58, 70, 86),
file_recovery_well: Color32::from_rgb(247, 226, 184),
file_action_height: 32.0,
@@ -133,7 +119,7 @@ impl Tokens {
text_dim: Color32::from_rgb(110, 116, 128),
accent: Color32::from_rgb(38, 120, 218),
accent_soft: Color32::from_rgb(214, 230, 250),
sketch_accent: icon_primary(strokes::SKETCH_PRIMARY[0]),
sketch_accent: icon_primary(crate::icon_svg::SKETCH_PRIMARY[0]),
// Icon palette active-3 ramps; these accents have no compiled constants yet.
surface_accent: Color32::from_rgb(164, 80, 0),
mesh_accent: Color32::from_rgb(130, 103, 0),
@@ -186,7 +172,7 @@ impl Tokens {
axis_y: Color32::from_rgb(60, 170, 60),
axis_z: Color32::from_rgb(60, 100, 230),
construction_plane: Color32::from_rgba_unmultiplied_const(249, 184, 134, 70),
construction_geom: icon_primary(strokes::CONSTRUCTION_PRIMARY[0]),
construction_geom: icon_primary(crate::icon_svg::CONSTRUCTION_PRIMARY[0]),
body: Color32::from_rgb(176, 186, 198),
body_edge: Color32::from_rgb(40, 44, 52),
manipulator: Color32::from_rgb(40, 110, 220),
@@ -229,7 +215,7 @@ impl Tokens {
profile_fill: Color32::from_rgba_unmultiplied_const(255, 196, 120, 70),
glyph_bg: Color32::WHITE,
glyph_edge: Color32::from_rgb(190, 110, 100),
glyph_text: icon_primary(strokes::CONSTRAINT_PRIMARY[0]),
glyph_text: icon_primary(crate::icon_svg::CONSTRAINT_PRIMARY[0]),
overlay: Color32::from_rgba_unmultiplied_const(255, 255, 255, 235),
rubber_band: Color32::from_rgb(30, 120, 230),
app_bar_text: Color32::from_rgb(230, 234, 242),
@@ -353,7 +339,7 @@ impl Tokens {
t.text_dim = Color32::from_rgb(148, 155, 168);
t.accent = Color32::from_rgb(58, 136, 238);
t.accent_soft = Color32::from_rgb(42, 70, 110);
t.sketch_accent = icon_primary(strokes::SKETCH_PRIMARY[1]);
t.sketch_accent = icon_primary(crate::icon_svg::SKETCH_PRIMARY[1]);
t.surface_accent = Color32::from_rgb(149, 104, 45);
t.mesh_accent = Color32::from_rgb(133, 113, 0);
t.form_accent = Color32::from_rgb(123, 99, 166);
@@ -413,7 +399,7 @@ impl Tokens {
t.pref_ok = Color32::from_rgb(127, 209, 174);
t.pref_ok_fill = Color32::from_rgb(31, 58, 49);
t.pref_disabled = Color32::from_rgb(138, 148, 163);
t.construction_geom = icon_primary(strokes::CONSTRUCTION_PRIMARY[1]);
t.construction_geom = icon_primary(crate::icon_svg::CONSTRUCTION_PRIMARY[1]);
t.error = Color32::from_rgb(240, 100, 96);
t.sketch_conflict = t.error;
t.warning = Color32::from_rgb(236, 170, 70);
@@ -444,7 +430,7 @@ impl Tokens {
t.chip = Color32::from_rgb(59, 101, 168);
t.glyph_bg = Color32::from_rgb(44, 50, 60);
t.glyph_edge = Color32::from_rgb(200, 130, 120);
t.glyph_text = icon_primary(strokes::CONSTRAINT_PRIMARY[1]);
t.glyph_text = icon_primary(crate::icon_svg::CONSTRAINT_PRIMARY[1]);
t.overlay = Color32::from_rgba_unmultiplied_const(34, 38, 46, 240);
t.rubber_band = Color32::from_rgb(92, 160, 255);
t.timeline_item = Color32::from_rgb(52, 58, 70);
@@ -487,8 +473,8 @@ impl Tokens {
if !dark {
t.form_success = Color32::from_rgb(39, 88, 78);
}
t.construction_geom = icon_primary(strokes::CONSTRUCTION_RED_GREEN[dark as usize]);
t.glyph_text = icon_primary(strokes::CONSTRAINT_RED_GREEN[dark as usize]);
t.construction_geom = icon_primary(crate::icon_svg::CONSTRUCTION_RED_GREEN[dark as usize]);
t.glyph_text = icon_primary(crate::icon_svg::CONSTRAINT_RED_GREEN[dark as usize]);
// A deeper red keeps conflicting sketch geometry (#7244) apart from the orange
// construction and centerline lines and the crimson lost links for a red-green loss.
t.sketch_conflict = Color32::from_rgb(195, 35, 30);
@@ -498,14 +484,14 @@ impl Tokens {
if dark {
t.bend_up = Color32::from_rgb(110, 165, 255);
t.bend_down = Color32::from_rgb(240, 180, 70);
t.sketch_accent = icon_primary(strokes::SKETCH_RED_GREEN[1]);
t.sketch_accent = icon_primary(crate::icon_svg::SKETCH_RED_GREEN[1]);
} else {
t.sketch_projected = Color32::from_rgb(205, 120, 215);
t.sketch_locked = Color32::from_rgb(60, 150, 120);
t.timeline_item_error = Color32::from_rgb(232, 196, 170);
t.bend_up = Color32::from_rgb(30, 100, 210);
t.bend_down = Color32::from_rgb(200, 120, 0);
t.sketch_accent = icon_primary(strokes::SKETCH_RED_GREEN[0]);
t.sketch_accent = icon_primary(crate::icon_svg::SKETCH_RED_GREEN[0]);
}
t
}
@@ -520,8 +506,8 @@ impl Tokens {
// Green and blue status lights merge for tritan vision; use rose for working.
t.agent_busy = Color32::from_rgb(232, 150, 190);
t.preview_sketch = Color32::from_rgb(125, 180, 105);
t.glyph_text = icon_primary(strokes::CONSTRAINT_BLUE_YELLOW[dark as usize]);
t.construction_geom = icon_primary(strokes::CONSTRUCTION_BLUE_YELLOW[dark as usize]);
t.glyph_text = icon_primary(crate::icon_svg::CONSTRAINT_BLUE_YELLOW[dark as usize]);
t.construction_geom = icon_primary(crate::icon_svg::CONSTRUCTION_BLUE_YELLOW[dark as usize]);
// Conflicting sketch geometry (#7244) apart from the lost links and the construction and
// centerline lines for a blue-yellow loss: darker on the light view, lighter on the dark.
t.sketch_conflict = if dark { Color32::from_rgb(255, 170, 160) } else { Color32::from_rgb(165, 15, 30) };
-218
View File
@@ -1,218 +0,0 @@
{
"order": 155,
"provenance": "Original SolidCraft mapping of Solarized (MIT palette)",
"base": "dark",
"borders": {},
"colors": {
"accent": "#268bd2",
"accent_soft": "#073642",
"agent_busy": "#268bd2",
"agent_ok": "#859900",
"app_bar": "#002b36",
"app_bar_hover": "#073642",
"app_bar_hover_button": "#073642",
"app_bar_hover_strong": "#586e75",
"app_bar_hover_subtle": "#073642",
"app_bar_separator": "#586e75",
"app_bar_tab_active": "#073642",
"app_bar_text": "#93a1a1",
"axis_x": "#dc322f",
"axis_y": "#859900",
"axis_z": "#346e88",
"bend_down": "#b58900",
"bend_up": "#859900",
"body": "#586e75",
"body_edge": "#346e88",
"body_selected": "#073642",
"border": "#586e75",
"box_crossing": "#859900",
"box_window": "#268bd2",
"chip": "#268bd2",
"construction_geom": "#cb4b16",
"construction_plane": "#b4870022",
"continuity": [
"#859900",
"#346e88",
"#b58900",
"#6c71c4"
],
"control_border": "#586e75",
"control_fill": "#073642",
"cube_border": "#586e75",
"cube_face": "#073642",
"cube_hover": "#586e75",
"cube_text": "#93a1a1",
"dialog_bg": "#073642",
"dialog_body": "#073642",
"dialog_border": "#586e75",
"dialog_footer": "#073642",
"dialog_label": "#93a1a1",
"dialog_rule": "#586e75",
"dimension": "#2aa198",
"dimension_driven": "#1f7f78",
"error": "#dc322f",
"field": "#002b36",
"file_background": "#073642",
"file_border": "#586e75",
"file_dim": "#93a1a1",
"file_image_tint": "#002b36",
"file_primary": "#586e75",
"file_primary_border": "#268bd2",
"file_primary_ink": "#ffffff",
"file_rail": "#1b6397",
"file_rail_hover": "#2670a6",
"file_rail_ink": "#ffffff",
"file_recovery": "#073642",
"file_recovery_border": "#b58900",
"file_recovery_ink": "#93a1a1",
"file_recovery_well": "#002b36",
"file_surface": "#073642",
"form_accent": "#6b70c3",
"form_dim": "#839496",
"form_error": "#dc322f",
"form_error_fill": "#586e75",
"form_fill": "#a2a9f8",
"form_ink": "#93a1a1",
"form_primary": "#268bd2",
"form_soft": "#073642",
"form_success": "#859900",
"form_success_fill": "#586e75",
"form_tab_ink": "#565a9d",
"glyph_bg": "#073642",
"glyph_edge": "#da2f2d",
"glyph_text": "#da2f2d",
"grid": "#073642",
"grid_major": "#586e75",
"hover": "#586e75",
"hover_edge": "#346e88",
"hover_edge_halo": "#002b36",
"hover_profile": "#268cd228",
"hover_profile_edge": "#346e88",
"icon": "#93a1a1",
"icons.agent": "#6c71c4",
"icons.highlight": "#93a1a1",
"icons.marker_halo": "#002b36cc",
"interference": "#dc322f",
"logo": [
"#268bd2",
"#346e88",
"#586e75"
],
"manipulator": "#268bd2",
"mesh_accent": "#97751d",
"mesh_fill": "#d7aa3c",
"mesh_ink": "#7b5d00",
"mesh_soft": "#073642",
"on_accent": "#ffffff",
"origin_plane": "#b3860028",
"origin_plane_edge": "#b6890088",
"origin_plane_hover": "#288bd340",
"origin_point": "#839496",
"overlay": "#073642",
"panel": "#073642",
"panel_header": "#002b36",
"preview_add": "#346e88",
"preview_cut": "#dc323066",
"preview_new": "#b58900",
"preview_sketch": "#859900",
"profile_fill": "#35718722",
"render_accent": "#cf317e",
"render_fill": "#f986b4",
"render_ink": "#ad2c6b",
"render_soft": "#073642",
"rubber_band": "#268bd2",
"section_cap": "#b58900",
"sel_edge": "#346e88",
"sel_edge_rim": "#346e88",
"sel_face": "#073642",
"sel_profile": "#073642",
"sel_profile_edge": "#346e88",
"sel_vertex": "#346e88",
"selected_bg": "#0a3e50",
"selected_ink": "#93a1a1",
"sheet_fill": "#58c6bc",
"sheet_ink": "#1d6d67",
"sheet_soft": "#073642",
"sketch": "#346e88",
"sketch_accent": "#738400",
"sketch_centerline": "#b58900",
"sketch_construction": "#b58900",
"sketch_fixed": "#93a1a1",
"sketch_halo": "#002b36",
"sketch_ink": "#5a6800",
"sketch_locked": "#859900",
"sketch_lost": "#dc322f",
"sketch_point": "#93a1a1",
"sketch_point_free": "#346e88",
"sketch_projected": "#6c71c4",
"sketch_soft": "#073642",
"surface_accent": "#cb4b16",
"surface_fill": "#fb906b",
"surface_ink": "#a83e12",
"surface_soft": "#073642",
"tab_on_fill_dark": "#002b36",
"text": "#93a1a1",
"text_dim": "#839496",
"timeline": "#073642",
"timeline_item": "#073642",
"timeline_item_error": "#eabcad",
"timeline_marker": "#839496",
"toolbar": "#073642",
"viewport_bottom": "#002b36",
"viewport_top": "#002b36",
"warning": "#b58900"
},
"format": "solidcraft-theme/1",
"icon_palette": {
"constraint": [
"#fee0dc",
"#fb8d81",
"#da2f2d"
],
"construction": [
"#fee1d7",
"#fb906b",
"#cb4b16"
],
"form": [
"#e3e6fe",
"#a2a9f8",
"#6b70c3"
],
"guide": "#839496",
"ink": "#fdf6e3",
"line": "#93a1a1",
"mesh": [
"#fde5b2",
"#d7aa3c",
"#97751d"
],
"passive-1": "#586e75",
"passive-2": "#073642",
"passive-3": "#002b36",
"sketch": [
"#def67b",
"#a8be40",
"#738400"
],
"solid": [
"#d5ebff",
"#67b9fb",
"#1480c6"
],
"surface": [
"#fee1d7",
"#fb906b",
"#cb4b16"
]
},
"name": "Solarized Dark",
"radii": {
"control_radius": 6,
"radius_lg": 8,
"radius_md": 6,
"radius_sm": 4,
"radius_xl": 10,
"sketch_mode_radius": 7
}
}
-9
View File
@@ -1,9 +0,0 @@
[package]
name = "solidcraft-color"
description = "Colour rules and data any crate may share: the sRGB transfer function and the surface analysis palette"
version.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
-20
View File
@@ -1,20 +0,0 @@
# solidcraft-color
Colour rules and data that any crate may share. It has no dependencies and holds no app types,
so the renderer, the document, the importers and the UI theme all use the same rule and the same
colours instead of keeping copies.
The sRGB transfer function (IEC 61966-2-1) lives here once: every encode and decode in Rust goes
through `srgb`, so a change to the rule is one change. Shaders can't call Rust and keep their own
copies.
## API
| Item | What it is |
|---|---|
| `srgb::encode(linear)` | Linear light (0..1) to an sRGB value (0..1) |
| `srgb::decode(encoded)` | An sRGB value (0..1) to linear light |
| `srgb::encode8(linear)` | Linear light to the nearest 8-bit sRGB code (out of range clamps, NaN reads as 0) |
| `srgb::decode8(code)` | An 8-bit sRGB code to linear light |
| `AnalysisColors` | The surface analysis palette (draft, accessibility, curvature, hatch), straight sRGB 0..1 as the shader takes it; the theme fills it and the renderer reads it |
| `AnalysisColors::DEFAULT` | The light theme's colours with no colour vision mode, as headless pictures use |
-32
View File
@@ -1,32 +0,0 @@
//! The colours a surface analysis is shaded in.
/// Surface analysis colours, straight sRGB 0..1 as the shader takes them.
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct AnalysisColors {
/// Draft Analysis: at least the draft angle, between, at most minus the angle.
pub draft: [[f32; 3]; 3],
/// Accessibility Analysis: reachable, blocked.
pub access: [[f32; 3]; 2],
/// Curvature Map: flat, the middle of the scale, at or below the analysis radius. Dark blue
/// to light yellow in one straight blend, so the lightness rises the whole way and the scale
/// reads with hue lost too (#975).
pub curvature: [[f32; 3]; 3],
/// Stripe the negative draft and blocked faces too, so colour is not the only cue.
pub hatch: bool,
}
impl AnalysisColors {
/// The light theme's colours (no colour vision mode): what headless pictures use.
pub const DEFAULT: AnalysisColors = AnalysisColors {
draft: [[0.20, 0.75, 0.30], [0.95, 0.80, 0.15], [0.85, 0.22, 0.20]],
access: [[0.20, 0.75, 0.30], [0.85, 0.22, 0.20]],
curvature: [[0.08, 0.12, 0.45], [0.53, 0.51, 0.425], [0.98, 0.90, 0.40]],
hatch: false,
};
}
impl Default for AnalysisColors {
fn default() -> Self {
AnalysisColors::DEFAULT
}
}
-8
View File
@@ -1,8 +0,0 @@
//! Colour rules and data shared by every crate: the sRGB transfer function ([`srgb`]) and the surface analysis palette
//! ([`AnalysisColors`]). No app types and no dependencies, so the renderer, the document and the theme all read the same
//! rule and the same colours.
mod analysis;
pub mod srgb;
pub use analysis::AnalysisColors;
-17
View File
@@ -1,17 +0,0 @@
[package]
name = "solidcraft-control-egui"
description = "The window's own control requests any egui app answers alike: ui.screenshot and ui.resize"
version.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
solidcraft-control = { workspace = true }
serde_json = { workspace = true }
# The window's own requests (`ui.screenshot`, `ui.resize`) go through egui.
egui = { workspace = true }
# Screenshots are saved in the format their path names.
image = { workspace = true }
-14
View File
@@ -1,14 +0,0 @@
# solidcraft-control-egui
The window's own control requests (docs/control-protocol.md), which any egui app answers the same
way: `ui.screenshot` and `ui.resize`. The token files, the loopback server and the request types
are `solidcraft-control`, which has no UI toolkit, so a headless engine, CLI or MCP bridge uses the
control channel without compiling egui. No app types and no engine.
## API
| Item | What it does |
|---|---|
| `screenshot::Shots` | `ui.screenshot`: frames asked for, taken when the view settles, saved and answered, or refused when hidden, cancelled or late; the app gives the reply for no frame |
| `screenshot::encode` | A frame in the format its path names |
| `window::resize`, `window::hidden` | `ui.resize` over `egui::Context`; whether the window presents frames |
-8
View File
@@ -1,8 +0,0 @@
//! The window's own control requests (docs/control-protocol.md) any app answers alike over egui:
//! `ui.screenshot` ([`screenshot::Shots`]) and `ui.resize` ([`window::resize`]). The token, the
//! server and the requests themselves are `solidcraft-control`, which needs no UI toolkit.
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
#![forbid(unsafe_code)]
pub mod screenshot;
pub mod window;
-288
View File
@@ -1,288 +0,0 @@
//! `ui.screenshot`: a picture of the window as it is presented, for a control request. The
//! window asks egui for a frame a few frames after the request (a view that just moved settles
//! first), saves it where the request says and answers; a hidden window, a request whose agent
//! chat turn ended, or no frame within 8 s is answered at once with why.
use std::collections::HashMap;
use std::sync::Arc;
use std::sync::atomic::AtomicBool;
use std::sync::mpsc::{Receiver, Sender, channel};
use egui::ColorImage;
use serde_json::{Value, json};
use solidcraft_control::{cancelled_chat_response, chat_turn_cancelled};
use crate::window::hidden;
/// A frame asked for: its token, the time (ms) from which it may be taken, and the frames drawn
/// since it was asked for.
pub type Queued = (u64, f64, u32);
/// A request waiting for its frame: its token, where to save it, where to answer, and the time
/// (ms) after which no frame is coming.
pub type Pending = (u64, Option<String>, Sender<Value>, f64);
/// A frame egui handed back, by its token.
pub type Shot = (u64, Arc<ColorImage>);
/// The window's screenshots in flight. The app may queue frames of its own (an issue report's)
/// with tokens from [`Shots::token`]; [`Shots::collect`] hands those back.
pub struct Shots {
/// The error a request gets when the window presents no frame: the app's words, which may
/// name its other ways to a picture.
no_frame: String,
/// The last token given out.
pub token: u64,
/// Frames asked for and not yet requested from egui.
pub queued: Vec<Queued>,
/// Control requests waiting for their frame.
pub pending: Vec<Pending>,
/// The agent chat turn of each pending request that belongs to one.
turns: HashMap<u64, Arc<AtomicBool>>,
/// Frames egui hands back; egui calls back, [`Shots::collect`] reads them.
tx: Sender<Shot>,
rx: Receiver<Shot>,
}
impl Shots {
/// No screenshots in flight; a request the window presents no frame for is answered with the
/// error `no_frame`.
pub fn new(no_frame: impl Into<String>) -> Self {
let (tx, rx) = channel();
Shots { no_frame: no_frame.into(), token: 0, queued: Vec::new(), pending: Vec::new(), turns: HashMap::new(), tx, rx }
}
/// Take the window's picture for a request that answers on `reply`, saved at `path`; `turn`:
/// the agent chat turn it belongs to. `now` is in ms. A window that is minimised or covered
/// (another macOS Space) presents no frame: that is said at once rather than after the
/// deadline (#1677).
pub fn request(&mut self, ctx: &egui::Context, path: Option<String>, reply: Sender<Value>, turn: Option<Arc<AtomicBool>>, now: f64) {
if hidden(ctx) {
let _ = reply.send(json!({"ok": false, "hidden": true, "error": self.no_frame}));
return;
}
self.token += 1;
let token = self.token;
if let Some(turn) = turn {
self.turns.insert(token, turn);
}
self.queued.push((token, now + 150.0, 0));
self.pending.push((token, path, reply, now + 8000.0));
}
/// Each frame: ask egui for the frames that are due, three frames after their request at the
/// earliest. `settled`: the view is drawn at full quality; a view that keeps moving is taken
/// as it is half a second later (#7165).
pub fn issue(&mut self, ctx: &egui::Context, settled: bool, now: f64) {
let shot_tx = &self.tx;
self.queued.retain_mut(|(token, at, frames)| {
*frames += 1;
if now >= *at && *frames >= 3 && (settled || now >= *at + 500.0) {
let (token, tx, ctx2) = (*token, shot_tx.clone(), ctx.clone());
ctx.request_screenshot(move |image| {
let _ = tx.send((token, image));
ctx2.request_repaint();
});
false
} else {
true
}
});
if !self.queued.is_empty() || !self.pending.is_empty() {
ctx.request_repaint_after(std::time::Duration::from_millis(16));
}
}
/// Each frame: answer the requests whose frame came, saving it with `save` (the reply), and
/// those whose turn ended or that wait in vain. `others`: the app waits for frames of its own;
/// then every frame that came this frame is handed back, for the app to take its own from.
pub fn collect(&mut self, ctx: &egui::Context, now: f64, others: bool, save: impl Fn(&ColorImage, Option<&str>) -> Value) -> Vec<Shot> {
// A screenshot requested in one tab must never return or save a frame of another.
let turns = &mut self.turns;
let queued = &mut self.queued;
self.pending.retain(|(token, _, reply, _)| {
if chat_turn_cancelled(turns.get(token).map(Arc::as_ref)) {
turns.remove(token);
queued.retain(|(waiting, ..)| waiting != token);
let _ = reply.send(cancelled_chat_response());
false
} else {
true
}
});
// Drained every frame: a shot that comes after its request was cancelled or timed out
// is dropped here instead of waiting in the channel.
let shots: Vec<Shot> = self.rx.try_iter().collect();
if self.pending.is_empty() && !others {
return Vec::new();
}
for (token, image) in &shots {
if let Some(i) = self.pending.iter().position(|(t, ..)| t == token) {
let (_, path, reply, _) = self.pending.remove(i);
self.turns.remove(token);
let _ = reply.send(save(image, path.as_deref()));
}
}
// Hidden while waiting: no frame is coming.
let hidden = hidden(ctx);
let (turns, no_frame) = (&mut self.turns, &self.no_frame);
self.pending.retain(|(token, _, reply, deadline)| {
if now < *deadline && !hidden {
return true;
}
let _ = reply.send(json!({"ok": false, "error": no_frame}));
turns.remove(token);
false
});
shots
}
}
/// `image` in the format `path`'s extension names (a PNG for `.png`).
pub fn encode(image: &ColorImage, path: &str) -> Result<Vec<u8>, String> {
let [w, h] = image.size;
let mut buf = Vec::with_capacity(w * h * 4);
for c in &image.pixels {
buf.extend_from_slice(&c.to_array());
}
let img = image::RgbaImage::from_raw(w as u32, h as u32, buf).ok_or("bad image")?;
let format = image::ImageFormat::from_path(path).map_err(|e| e.to_string())?;
let mut bytes = std::io::Cursor::new(Vec::new());
img.write_to(&mut bytes, format).map_err(|e| e.to_string())?;
Ok(bytes.into_inner())
}
#[cfg(test)]
mod tests {
use super::*;
/// The app's reply for no frame.
const NO_FRAME: &str = "no frame here";
fn pixel_image() -> Arc<ColorImage> {
Arc::new(ColorImage::new([4, 3], vec![egui::Color32::from_rgb(10, 20, 30); 12]))
}
/// A request is answered with its frame once egui hands it back, saved as the app saves it;
/// a frame of the app's own is handed back to it; a request whose frame never comes is
/// answered after its deadline.
#[test]
fn a_request_is_answered_with_its_frame_or_its_deadline() {
let ctx = egui::Context::default();
let mut shots = Shots::new(NO_FRAME);
let (reply, answer) = channel();
shots.request(&ctx, Some("a.png".into()), reply, None, 0.0);
assert_eq!((shots.token, shots.queued.len(), shots.pending.len()), (1, 1, 1));
// The frame egui hands back, and one the app asked for itself.
shots.queued.clear();
let _ = shots.tx.send((1, pixel_image()));
let _ = shots.tx.send((2, pixel_image()));
let save = |image: &ColorImage, path: Option<&str>| json!({"ok": true, "result": {"path": path, "width": image.size[0]}});
let back = shots.collect(&ctx, 1.0, true, save);
assert_eq!(back.iter().map(|(t, _)| *t).collect::<Vec<_>>(), [1, 2]);
assert_eq!(answer.try_recv().ok(), Some(json!({"ok": true, "result": {"path": "a.png", "width": 4}})));
assert!(shots.pending.is_empty());
let (reply, late) = channel();
shots.request(&ctx, None, reply, None, 0.0);
assert!(shots.collect(&ctx, 7999.0, false, save).is_empty());
assert!(late.try_recv().is_err(), "still waiting");
shots.collect(&ctx, 8000.0, false, save);
assert_eq!(late.try_recv().ok(), Some(json!({"ok": false, "error": NO_FRAME})));
}
/// A request whose agent chat turn ended is answered so, and its frame is never taken.
#[test]
fn a_request_whose_turn_ended_is_refused() {
let ctx = egui::Context::default();
let mut shots = Shots::new(NO_FRAME);
let (reply, answer) = channel();
let turn = Arc::new(AtomicBool::new(true));
shots.request(&ctx, None, reply, Some(Arc::clone(&turn)), 0.0);
turn.store(false, std::sync::atomic::Ordering::Relaxed);
shots.collect(&ctx, 1.0, false, |_, _| Value::Null);
assert_eq!(answer.try_recv().ok(), Some(cancelled_chat_response()));
assert!(shots.queued.is_empty() && shots.pending.is_empty());
}
/// One frame of a window that is minimised (`hidden`) or shown, running `f`.
fn frame(ctx: &egui::Context, hidden: bool, f: impl FnMut(&egui::Context)) {
let mut raw = egui::RawInput::default();
let info = egui::ViewportInfo { minimized: Some(hidden), occluded: Some(false), ..Default::default() };
raw.viewports.insert(egui::ViewportId::ROOT, info);
// No painter takes the frame's textures here.
ctx.run_pass(raw, f).textures_delta.clear();
}
/// A frame is asked of egui 150 ms after its request at the earliest and on its third frame;
/// a view that keeps moving is taken as it is 500 ms after that.
#[test]
fn a_frame_is_taken_once_the_view_settles() {
let ctx = egui::Context::default();
let mut shots = Shots::new(NO_FRAME);
let (reply, _answer) = channel();
shots.request(&ctx, None, reply.clone(), None, 0.0);
shots.issue(&ctx, true, 200.0);
shots.issue(&ctx, true, 200.0);
assert_eq!(shots.queued.len(), 1, "two frames drawn");
shots.issue(&ctx, true, 200.0);
assert!(shots.queued.is_empty(), "the third frame is taken");
shots.request(&ctx, None, reply.clone(), None, 0.0);
for _ in 0..3 {
shots.issue(&ctx, true, 149.0);
}
assert_eq!(shots.queued.len(), 1, "too soon");
shots.issue(&ctx, true, 150.0);
assert!(shots.queued.is_empty());
shots.request(&ctx, None, reply, None, 0.0);
for _ in 0..3 {
shots.issue(&ctx, false, 649.0);
}
assert_eq!(shots.queued.len(), 1, "still moving");
shots.issue(&ctx, false, 650.0);
assert!(shots.queued.is_empty(), "taken as it is");
assert_eq!(shots.pending.len(), 3, "every request still waits for its frame");
}
/// A hidden window refuses a request at once, and answers one that waits when it hides.
#[test]
fn a_hidden_window_answers_at_once() {
let ctx = egui::Context::default();
let mut shots = Shots::new(NO_FRAME);
let (reply, answer) = channel();
frame(&ctx, true, |ctx| shots.request(ctx, None, reply.clone(), None, 0.0));
assert_eq!(answer.try_recv().ok(), Some(json!({"ok": false, "hidden": true, "error": NO_FRAME})));
assert_eq!((shots.token, shots.queued.len(), shots.pending.len()), (0, 0, 0));
frame(&ctx, false, |ctx| shots.request(ctx, None, reply.clone(), None, 0.0));
frame(&ctx, false, |ctx| {
shots.collect(ctx, 1.0, false, |_, _| Value::Null);
});
assert!(answer.try_recv().is_err(), "shown: still waiting");
frame(&ctx, true, |ctx| {
shots.collect(ctx, 2.0, false, |_, _| Value::Null);
});
assert_eq!(answer.try_recv().ok(), Some(json!({"ok": false, "error": NO_FRAME})));
assert!(shots.pending.is_empty());
}
/// With nothing waiting, the frames that came are dropped, not kept for a later request.
#[test]
fn frames_nobody_waits_for_are_dropped() {
let ctx = egui::Context::default();
let mut shots = Shots::new(NO_FRAME);
let _ = shots.tx.send((5, pixel_image()));
assert!(shots.collect(&ctx, 0.0, false, |_, _| Value::Null).is_empty());
assert!(shots.collect(&ctx, 1.0, true, |_, _| Value::Null).is_empty(), "the frame was dropped");
}
/// The saved bytes are the format the path names.
#[test]
fn a_png_path_gets_a_png() {
let bytes = encode(&pixel_image(), "shot.png").unwrap();
assert!(bytes.starts_with(b"\x89PNG"), "{:?}", bytes.get(..8));
assert!(encode(&pixel_image(), "shot.nope").is_err());
}
}
-19
View File
@@ -1,19 +0,0 @@
//! The window's own control requests over `egui::Context`, which any app answers the same way.
use serde_json::Value;
/// The window is minimised or fully covered (another macOS Space), so it presents no frames
/// (#1677). Unknown counts as shown: the screenshot deadline still ends a wait for a frame that
/// never comes.
pub fn hidden(ctx: &egui::Context) -> bool {
ctx.input(|i| i.viewport().visible()) == Some(false)
}
/// `ui.resize {width, height}`: the window's inner size in points, kept within 320×240 and
/// 8192×8192.
pub fn resize(ctx: &egui::Context, params: &Value) -> Result<Value, String> {
let f = |k: &str| params.get(k).and_then(Value::as_f64).filter(|x| x.is_finite());
let (Some(w), Some(h)) = (f("width"), f("height")) else { return Err("missing width/height".into()) };
ctx.send_viewport_cmd(egui::ViewportCommand::InnerSize(egui::vec2(w.clamp(320.0, 8192.0) as f32, h.clamp(240.0, 8192.0) as f32)));
Ok(Value::Null)
}

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