UI library, tokens, fonts and icons (step 5 of #2016, after #2287)

This commit is contained in:
Nathan Dane
2026-10-20 09:55:48 +02:00
parent 837dbe66df
commit 1122cd44b8
214 changed files with 9436 additions and 2937 deletions
+8
View File
@@ -52,6 +52,8 @@ Editable drawing code, native projects and shipped exports are collected under `
| docs/book/src/generated/enclosure.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/enclosure.json`; gitignored) | MIT OR Apache-2.0 |
| docs/book/src/generated/revolve.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/revolve.json`; gitignored) | MIT OR Apache-2.0 |
| docs/book/src/generated/sheet-metal.png | SolidCraft contributors | rendered by `cargo xtask book` (`solidcraft-cli snapshot docs/book/scripts/sheet-metal.json`; gitignored) | MIT OR Apache-2.0 |
| 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 |
@@ -78,6 +80,8 @@ Editable drawing code, native projects and shipped exports are collected under `
| assets/appearances/library.rs | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 |
| assets/fonts/biz-udp-gothic/OFL.txt | The BIZ UDGothic Project Authors | Unmodified accompanying font licence | 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/ai.storyteller.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/ai.storyteller.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 |
@@ -137,6 +141,7 @@ Editable drawing code, native projects and shipped exports are collected under `
| assets/icons/ui/design/palette.toml | SolidCraft contributors | icon colour roles (light and dark) and accents, original SolidCraft data | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/flat/bug_report.svg | SolidCraft contributors | single-colour application/navigation icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/flat/chevron.svg | SolidCraft contributors | single-colour application/navigation icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/flat/chevron_right.svg | SolidCraft contributors | single-colour application/navigation icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/flat/close.svg | SolidCraft contributors | single-colour application/navigation icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/flat/disclosure_closed.svg | SolidCraft contributors | single-colour application/navigation icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/flat/disclosure_open.svg | SolidCraft contributors | single-colour application/navigation icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
@@ -287,6 +292,8 @@ Editable drawing code, native projects and shipped exports are collected under `
| assets/icons/ui/design/svg/model/silhouette.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/flat/assistant.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/flat/agent_link.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/offset_two_sides.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/offset_symmetric.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/placeholder.svg | SolidCraft contributors | two-tone modelling icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/plane.svg | SolidCraft contributors | two-tone modelling icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
| assets/icons/ui/design/svg/model/plane_angle.svg | SolidCraft contributors | two-tone modelling icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
@@ -422,6 +429,7 @@ Editable drawing code, native projects and shipped exports are collected under `
| assets/icons/ui/design/tools/lint_icons.py | SolidCraft contributors | icon lint, status page or preview tool (standard-library Python), original SolidCraft code | MIT OR Apache-2.0 |
| assets/icons/ui/design/tools/preview.py | SolidCraft contributors | icon lint, status page or preview tool (standard-library Python), original SolidCraft code | MIT OR Apache-2.0 |
| assets/icons/ui/design/tools/review_state.py | SolidCraft contributors | icon review state helper (standard-library Python), original SolidCraft code | MIT OR Apache-2.0 |
| assets/icons/ui/design/requested_icons.txt | SolidCraft contributors | Runtime icon requests collected by the headless menu audit, original SolidCraft data | MIT OR Apache-2.0 |
| assets/icons/ui/design/review.json | SolidCraft contributors | icon review state (accepted icons and notes), original SolidCraft data | MIT OR Apache-2.0 |
| assets/icons/ui/design/tools/author/lib.py | SolidCraft contributors | icon authoring script (standard-library Python), original SolidCraft code | MIT OR Apache-2.0 |
Generated
+1
View File
@@ -4379,6 +4379,7 @@ dependencies = [
"solidcraft-engine",
"solidcraft-gpu",
"solidcraft-space-mouse",
"syn 2.0.119",
"tiny-skia",
"toml",
"ttf-parser",
Binary file not shown.
+93
View File
@@ -0,0 +1,93 @@
Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
+93
View File
@@ -0,0 +1,93 @@
Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
+6
View File
@@ -29,3 +29,9 @@ request files under target, and do not retry them. The server never invokes a mo
Canonical paths, launch command and export schema: [README.md](README.md).
There are no numbered bulk authoring scripts or generated inventory files to maintain.
Runtime discovery is also checked by `crates/ui-egui/tests/icon_audit.rs`. New menu
surfaces must extend that Harness traversal. Regenerate the committed
`design/requested_icons.txt` with `UPDATE_ICON_MANIFEST=1 cargo test -p
solidcraft-ui-egui --test icon_audit`; review the sorted id/placeholder diff. The
review tool reads this fixture in addition to source scans, masters and aliases.
+25 -4
View File
@@ -18,8 +18,8 @@ artwork changes trigger the live revision check. The server binds only to loopba
Every opening scans SVG masters, aliases and source references. New, unused,
missing and changed icons are discoverable. **All discovered icons without a valid
acceptance are Open, including those with notes.** No inventory file or allowlist
is needed. Rescan sees additions immediately; a running page also polls revisions.
acceptance are Open, including those with notes.** Discovery also reads `design/requested_icons.txt`, the sorted runtime audit
manifest; it supplements source scans and never restricts discovery. Rescan sees additions immediately; a running page also polls revisions.
The internal placeholder glyph is the only excluded card. Shared masters are shown
separately even when an accepted alias already uses them; reopen that alias before
requesting a redraw of its protected artwork. Unassigned commands
@@ -82,6 +82,7 @@ Palette changes preserve accepted artwork and never update review hashes.
| `design/palette.toml`, `aliases.toml` | Shared theme roles, weights and semantic aliases |
| `design/review.json` | Owner acceptance hashes and current notes |
| `design/references.toml` | Curated style references; does not control discovery |
| `design/requested_icons.txt` | Sorted runtime requests and placeholder flags, checked by the Harness audit |
| `design/tools/author/{lib,bases}.py` | Reusable geometry and canonical cube/slab/arrow bases |
| `design/tools/author/new_icon.py` | Safe new-master scaffold, never overwrites an id |
| `design/tools/icon_status.py`, `review_state.py` | Discovery, review backend and state |
@@ -104,5 +105,25 @@ python3 -B assets/icons/ui/design/tools/icon_status.py --csv
```
Reports, screenshots, requests, generated contact sheets and previews stay under
ignored `target/`. Do not commit generated inventories or historical authoring
batches. Every non-Markdown resource has an exact row in `ATTRIBUTION.md`.
ignored `target/`. The runtime request manifest is a committed regression fixture; other generated
inventories and historical authoring batches do not belong in the repository. Every non-Markdown resource has an exact row in `ATTRIBUTION.md`.
## Runtime menu audit
`cargo test -p solidcraft-ui-egui --test icon_audit` drives the real UI through the
headless scenario Harness and rejects placeholder requests and unexpected blank
context-menu icons. It compares sorted requested ids with
`design/requested_icons.txt` (`id<TAB>placeholder`, one per line). After deliberately
changing menu coverage or assignments, regenerate and review its diff:
```sh
UPDATE_ICON_MANIFEST=1 cargo test -p solidcraft-ui-egui --test icon_audit
```
The review page includes every manifest id, even ids used only in tables or helper
arguments. A true placeholder flag, missing master or broken alias is reported as
missing; runtime collection never changes acceptance hashes. The live control
method `ui.icon_audit` can diagnose requests in a running UI (see
[control protocol](../../../docs/control-protocol.md)). Keep the Harness traversal
current when adding menus. A successful traversal covers only the contexts it
actually opens; document unreachable or untested contexts in the audit report.
+6
View File
@@ -207,3 +207,9 @@ All artwork must be original SolidCraft work or an explicitly licensed resource
with provenance. Commercial CAD artwork, screenshots and extracted assets are
forbidden even as hidden references. This guide and the local finished set provide
all required visual context for future agents.
Runtime discovery is also checked by `crates/ui-egui/tests/icon_audit.rs`. New menu
surfaces must extend that Harness traversal. Regenerate the committed
`design/requested_icons.txt` with `UPDATE_ICON_MANIFEST=1 cargo test -p
solidcraft-ui-egui --test icon_audit`; review the sorted id/placeholder diff. The
review tool reads this fixture in addition to source scans, masters and aliases.
+8
View File
@@ -35,4 +35,12 @@ sketch_scale = { master = "scale", accent = "sketch" }
sketch_text = { master = "text", accent = "sketch" }
surface_fair = { master = "spline_cv", accent = "surface" }
mesh_export = { master = "export", accent = "mesh" }
# Legacy feature-history id for the same Split Body operation.
split = "split_body"
# Sketch dialog choices share the corresponding finished tool artwork.
sketch_chamfer_equal = { master = "sketch_chamfer", accent = "sketch" }
sketch_chamfer_two = { master = "sketch_chamfer_two_distances", accent = "sketch" }
offset_one_side = { master = "offset", accent = "sketch" }
bom = "list"
+26 -22
View File
@@ -10,7 +10,7 @@
[roles.ink] # outlines and details drawn over a face
source = "#34465b"
light = "#34465b"
dark = "#d8dfeb"
dark = "#1f2021"
[roles.line] # line art that sits directly on the UI background (SVG: currentColor)
source = "#34465b"
light = "#34465b"
@@ -66,13 +66,13 @@ parameters = 4.2
[accents.surface.active-1]
light = "#f1d2af"
dark = "#ba8f6a"
dark = "#cc9362"
[accents.surface.active-2]
light = "#c06f00"
dark = "#b86f04"
dark = "#bd750d"
[accents.surface.active-3]
light = "#a45000"
dark = "#95682d"
dark = "#955a0e"
[accents.form.active-1]
light = "#decff8"
@@ -85,41 +85,41 @@ light = "#7349cd"
dark = "#7b63a6"
[accents.mesh.active-1]
light = "#e5d99b"
dark = "#a9985f"
light = "#ffec8e"
dark = "#ffe282"
[accents.mesh.active-2]
light = "#a28200"
dark = "#9a8100"
light = "#bb9600"
dark = "#ab8f00"
[accents.mesh.active-3]
light = "#826700"
dark = "#857100"
light = "#e0b200"
dark = "#c6a800"
[accents.sketch.active-1]
light = "#bfe2cc"
dark = "#81a28e"
dark = "#7ab792"
[accents.sketch.active-2]
light = "#439a65"
dark = "#459665"
dark = "#3a965e"
[accents.sketch.active-3]
light = "#057f45"
dark = "#27864e"
dark = "#128d45"
[accents.constraint.active-1]
light = "#f0cfca"
dark = "#b98c88"
[accents.constraint.active-2]
light = "#c1685f"
dark = "#b66b61"
dark = "#c27267"
[accents.constraint.active-3]
light = "#af4038"
dark = "#a05c54"
light = "#ca473d"
dark = "#c16358"
[accents.construction.active-1]
light = "#ecd3b6"
dark = "#b19373"
dark = "#b99a78"
[accents.construction.active-2]
light = "#b8741f"
dark = "#b4711c"
dark = "#ad7023"
[accents.construction.active-3]
light = "#9c5600"
dark = "#a75d00"
@@ -134,12 +134,16 @@ dark = "#1d7f89"
[variants.red-green.construction.active-3]
light = "#b97300"
dark = "#a75d00"
# The constraint red stays darker than the sketch green for a weak red sense.
[variants.red-green.constraint.active-3]
light = "#af4038"
dark = "#c16358"
[variants.blue-yellow.construction.active-3]
light = "#b97300"
dark = "#c37d00"
[variants.blue-yellow.constraint.active-3]
light = "#af4038"
dark = "#986255"
dark = "#85554a"
# Default accent by requested icon id. Explicit alias accents in aliases.toml win.
# Deliberately not inherited from a master: ground reuses c_fix but is not a constraint.
@@ -153,9 +157,9 @@ sketch = [
"arc3", "arc_center", "arc_slot", "arc_slot_center", "arc_tangent",
"blend", "circle", "circle2", "circle3", "circle_tt",
"circle_ttt", "conic", "constrainer", "dimension", "ellipse",
"extend", "finish", "fit_section", "include", "infinite",
"extend", "finish", "fit_section", "include",
"intersect", "intersection_curve", "iso_curve", "line", "line_mid",
"offset", "point", "polygon", "polygon_circumscribed", "polygon_edge",
"offset", "offset_two_sides", "offset_symmetric", "point", "polygon", "polygon_circumscribed", "polygon_edge",
"project", "project_surface", "rect", "rect3", "rect_center",
"rect_rounded", "sketch", "sketch_chamfer", "sketch_chamfer_angle", "sketch_chamfer_two_distances",
"sketch_fillet", "sketch_mirror", "slot", "slot_center", "slot_overall",
@@ -168,5 +172,5 @@ constraint = [
"c_polygon", "c_smooth", "c_symmetry", "c_tangent",
]
construction = [
"centerline", "construction",
"centerline", "construction", "infinite",
]
+282
View File
@@ -0,0 +1,282 @@
accessibility false
activate false
align false
appearance false
arc3 false
arc_center false
arc_slot false
arc_slot_center false
arc_tangent false
as_built false
assistant false
auto_constrain false
axis false
axis_edge false
axis_normal_to_face false
axis_through_cylinder false
axis_two_planes false
axis_two_points false
bendtable false
blend false
body false
bom false
boss false
boundary_fill false
bounding_solid false
box false
break false
bug_report false
c_coincident false
c_collinear false
c_concentric false
c_equal false
c_fix false
c_hv false
c_midpoint false
c_parallel false
c_perpendicular false
c_polygon false
c_smooth false
c_symmetry false
c_tangent false
cam false
camera false
canvas false
capture false
center_of_mass false
centerline false
chain false
chamfer false
checkpoint false
chevron false
chevron_right false
circle false
circle2 false
circle3 false
circle_tt false
circle_ttt false
close false
coil false
combine false
compare false
component false
compute false
configuration_table false
conic false
constrainer false
construction false
contact_all false
contact_new false
contact_off false
contact_sets false
continuity false
convert_sheet false
copy false
curvature_comb false
curvature_map false
cut false
cylinder false
decal false
delete false
delete_face false
dimension false
disclosure_closed false
disclosure_open false
draft false
draft_analysis false
drive false
dxf false
edit false
ellipse false
emboss false
environment_map false
error false
explode false
export false
extend false
extrude false
eye false
fastener false
fillet false
finish false
fit false
fit_section false
flange false
flat false
fold false
folder false
gear false
graph false
ground false
help false
hem false
hole false
home false
import false
include false
infinite false
inspect false
interference false
intersect false
intersection_curve false
iso_analysis false
iso_curve false
joint false
joint_origin false
library false
line false
line_mid false
lip false
list false
loft false
lookat false
material false
measure false
mesh_export false
min_radius false
mirror false
motion_link false
move false
new false
normal false
offset false
offset_face false
offset_one_side false
offset_symmetric false
offset_two_sides false
open false
orbit false
origin false
pan false
params false
paste false
pattern_center false
pattern_circ false
pattern_flip false
pattern_path false
pattern_rect false
perforate false
perspective false
pipe false
plane false
plane_along_path false
plane_angle false
plane_midplane false
plane_perpendicular false
plane_tangent false
plane_three_points false
plane_two_edges false
plastic_assign false
plastic_rule false
play false
plus false
point false
point_along_path false
point_center false
point_edge_plane false
point_three_planes false
point_two_edges false
point_vertex false
polygon false
polygon_circumscribed false
polygon_edge false
presspull false
project false
project_surface false
rack_pinion false
reach false
rect false
rect3 false
rect_center false
rect_rounded false
redo false
refold false
rename false
render_image false
render_scene false
reorder false
replace_face false
rest false
restore false
revert false
revolve false
rib false
rigid_group false
rollback false
save false
scale false
screw false
section false
select false
settings false
sheet_rules false
shell false
silhouette false
sketch false
sketch_break false
sketch_chamfer false
sketch_chamfer_angle false
sketch_chamfer_equal false
sketch_chamfer_two false
sketch_chamfer_two_distances false
sketch_circ_pattern false
sketch_dxf false
sketch_fillet false
sketch_mirror false
sketch_move false
sketch_rect_pattern false
sketch_scale false
sketch_text false
slot false
slot_center false
slot_overall false
snap false
snap_fit false
sphere false
spin false
spline false
spline_cv false
split false
split_body false
split_face false
spun false
star false
status_error false
style false
suppress false
surface_blend false
surface_boundary false
surface_extend false
surface_extrude false
surface_fair false
surface_fillet false
surface_loft false
surface_offset false
surface_patch false
surface_reverse_normal false
surface_revolve false
surface_ruled false
surface_stitch false
surface_sweep false
surface_thicken false
surface_trim false
surface_unstitch false
surface_untrim false
svg false
sweep false
text false
thread false
torus false
trace false
trim false
undo false
unfold false
update false
warning false
web false
ws_animate false
ws_design false
ws_drawing false
ws_render false
zebra false
zoom false
+52 -36
View File
@@ -15,9 +15,9 @@
"as_built": "0f481932deca5586a8a8ea3d707efca0747f5c59559d53830b694d3458531013",
"assistant": "8fac392b16b4f13c6a399c59962b97c1912282e0ec909976496959472f1d642d",
"auto_constrain": "012e5da4ff83449f6a3a92ee2d9924998cbeea545281bdf97873710b7436183d",
"axis": "66ebabe43a7b1b73b59a3a03b7bd92ab54d899947d0cc2d93ad6e6aac4d76501",
"axis": "acdab0eb7b99b1579d64ae190082df48b65174e7b8ad3104967bcc59f6154206",
"axis_edge": "5a65898bc38bdaaaf5b04f2c2f7556915b5b7b1fdc4de9708fcc30f64aa1ab18",
"axis_normal_to_face": "0824bb37e80928e9ac880af5ca5fdb3b52084af9e73db73a5a5a7bc8f1f899f7",
"axis_normal_to_face": "597b5b96ce787b70791133267108c5196aca09d5e3f94e7dc92199a63fe49ca6",
"axis_through_cylinder": "804eb75631f4ee71ac8db51209237bb19d82bafd326abdc81b124b875c0874b4",
"axis_two_planes": "80162aa79ca7baf6d60490414a4fb53d87e6f2b85e901c452875a5f3ed86d35a",
"axis_two_points": "5064f7544ce41ae7c1f05a90c958222bbcee03723df67d34cd3e209d25a1f71f",
@@ -30,36 +30,38 @@
"boundary_fill": "17ccb419a46c04a44ec864af968a32984dc81f6b3196a821bfff7f54141dfdd1",
"bounding_solid": "e2deb6fff292f0f295022583ba7ddb86896eb79d9dd7268e653713b9c62f0580",
"box": "72cd44c3c4fc5ae71242fca8c60af47371930201276df5b7db9d2f16a2739c31",
"break": "430582243311f304dbab397ce58c8c9aef9c78ed88d3e921a57e584ddb95d94c",
"break": "67a5fab332616e6d6a9aeae3bedc04ee0768179143ba34b795bdd98cea04bb24",
"bug_report": "8cf7afbe0d3c34988fd2748de148f56a7e939fd8273ba01a79a976f879c74831",
"c_coincident": "32fb535b3dd7631dc2e9ea284f445ad54ea0e5c8b0e1bb27a9984c849746917d",
"c_coincident": "a93cc58acc5090c24c973cb558920bff4e35c8f99071135f16a115256d41bf98",
"c_collinear": "3bcf1dc6b221a1fa9a4445ee8afc7d858dc28a5270d22d10fef86fa4997f1bdf",
"c_concentric": "90e9b35b6186ea4fcb3debc24808f302c0bf7354b7afae86e339574ef8e5103a",
"c_equal": "c0f50c02db7d15a6392d2178e28df5c100e67fab7732f8e8474b888d218d0673",
"c_fix": "b91c6af7ea9740efb8cf196409b11d16fad52c51b732a356e5f844bd4e2f08e0",
"c_fix": "23e2471a9d6872e83028e0e219e330cef1930a4d89456a0fefa1bda8a7e3eb81",
"c_hv": "b5c44d60a4b03b9942fbcf3c706f797ce4dbddf9a67eb1c98d6aaf3234e9bc18",
"c_midpoint": "fd4efc26da1336f811a9016b02d7675af2a7c95cd1ffa2f091507b22434f5435",
"c_midpoint": "aaea530b8a04aa80efc99ed2cf42347a91c65b160286bae3e2882f5a0bd09a51",
"c_parallel": "aaa80258502af091b596511662aca392546dd0d7bf69cec4db98b6e0ae7591f0",
"c_perpendicular": "692ba7a77cd77108c33c101386b60b7c957ce7d2202937d9696d18dcf3d4cf8e",
"c_polygon": "defac40b4c6ef323494f49acbb94b896502f78f6a99e750975693c602164a44b",
"c_smooth": "dccf5effdb8977ac04e6c437c280c83ed0f117d81b64c57fae03f5f7f7f2b9c0",
"c_perpendicular": "0ccf0383176ace2d4ab30c2efe853815ca1df20f2537020f369f496d8bf124b5",
"c_polygon": "02c76b288b42d6be8eb77f502af95bb840557f43fed3def2b1a381f6ac920375",
"c_smooth": "87aeb504aa330a191a8680d9eab3e86844f6d7be0a9caa10fdf0a657e76f45ee",
"c_symmetry": "8646a7deb7447514bcc455562d8639f8b4c482df8c971fd2870c05965ce71f78",
"c_tangent": "a011f5d43d5e09f68de332c60c5acee737a3ebc94d107f521871225c3841a064",
"c_tangent": "ef8b1e502c2a939958b5e8de9ef2716442e32b2a394555eb7b51101c415b966e",
"cam": "a35342e36ca4deae55e98c54df630b5c2da591c06d979eb2b8ce6a13f6db66d0",
"camera": "fcd867877ea4984318dbff36a166b48682f26bb9d44e70383dde63d9a7ab87c8",
"canvas": "512d7721f0b8b14a46f22b9588b437b0cd8c2c425330d31b3b156c0d1334bcef",
"capture": "23ef84e50b45c06532b3e842b72f6da5498d0e6b8391e1bff55e84afa8359f37",
"center_of_mass": "24401b1a19cb45ddb028de0acf3c9815b47abecbde9e133f473adac3d27ae346",
"centerline": "a1889b9092ef5a7aa9592df994b6541b53ea9afb03b2c56c7678a61df335f4d7",
"centerline": "850283497bad77e233f934e8effc0d0d7b01ccde83fa66f6abb539a33a8a2c80",
"chain": "9cdc78486b5c4b5b2a378e09bbd41733eb167513f9f2bc4b1aad629dd6c4c753",
"chamfer": "487c90ae65e87b74d7ddee7d9ce9f088b63e9b5b85c2a390364855a2649f17e8",
"checkpoint": "a3bc0700a40b791b5f3bf176d820bdabd2cf94a526908609d50136c8d0918d6a",
"chevron": "61887736af4b1e6bef857c4d2e3846657824e84f1c8026a56525ddba2d2a8083",
"chevron_right": "d28a52dcc51fd9eb988f8f83e89d74370a31100049c910a886732a48ec1342ca",
"circle": "145544ff1cd133971f537dd247092126ef8d91a88fe31b795222e76840d0c4d0",
"circle2": "f1b6e8e2157279cfe1e608f913b377e44a70f7555f5010298138de8a887bf586",
"circle3": "aaf6b914e630688675abf4dcbf7d43096317881ced0e22520a4ef229013e0de2",
"circle_tt": "94996320b671c8c48f239b8c48f1b2f1cd5cc33a7d8ea1daaa61aa9203803cae",
"circle_ttt": "ac3c211a6fe17c3625060f695ecd93937730e2bc2dd57921bcbbcaa984b9badf",
"close": "5833954dfba3d70a9a3a7519f2796a7213899548b0345bd8fe8ea9a321d82be2",
"coil": "4c549fd63506457165f53a7940cc0f3dcacdbe075e935ea299edbf4985104411",
"combine": "f9d4211f0153779369c9da68b266c2c9a857d11bc033ff4a96ede794e470e38e",
"compare": "c24b6c18f18413ae6f3344aaa6e04b42fae8b63e7cd1552a81398462eb68eb96",
@@ -68,7 +70,7 @@
"configuration_table": "1a142e76b9e4cd47412a307cc0ad9b8c589bb97c8930fc445dd5bb8d74ecf707",
"conic": "808445fd697ff76f9074e7bbf877146e634995c295dce045604991fa4cec26a0",
"constrainer": "774cb158897eb91767541b5b1a25a46f3a731cbea0661006ce5472634ab6b0e3",
"construction": "ad962cbcd0aaef9167744abfd0bfe1d7ef55e48b4ff42f2b4b05f66204b58acb",
"construction": "f13e3851cdf7b30a7118802a1c17e8852fcb9893fd1d65c7098a5c3fc35c8396",
"contact_all": "6ad4d245592815a3e38e70ae324ad3971ab614daba7ca3cf8fcb64cb8e2be077",
"contact_new": "603410785fff408cc12dc72bef2f09885b694c5ddb2571c7819ae1301fb89dc6",
"contact_off": "54dc3bd2267ebb084d8dc7efee85e9f21d8c59a57ad37b96d78095bc75e73fa0",
@@ -83,8 +85,10 @@
"decal": "acc258e40b29ffb6b6007057f0b70f487995f573704c7ef4e4f08f209d52bddd",
"delete": "d14203f06b8b1b87328e7f198c7aa41595e9a66b5d8a7fbd2a3ec2e35cd99afd",
"delete_face": "dcbf8ab59bd37bd5a0cdd7a528b29c2d19daa5f3fc130ef5cff0c20034f061a4",
"dimension": "8246dde8b0a140d1f533c1e45f2e8b5af35c05d3504dccf50bd7e7726a93389e",
"dots": "aa38423c547594462f49cc355f3c9f5b41e28a7515f466a6a8cffda487ba1715",
"dimension": "a926b7c64bc8ca99d8d6dcbb81b95235bd3fc34fbed049aca8b01b4d1147c15d",
"disclosure_closed": "49a350c6f2efae78de0be96c524ebee1fd1291ea449a84224b88d37164a4e807",
"disclosure_open": "d13ce3f97e3e362a9904fa2bf3412f3f00e4136bc23538b92d41483961d280de",
"dots": "600f7ff209d93145fc938bc4f6a1e34473e6b9ee22a5b4718f133bc7da5ee58d",
"draft": "9c0fc361cacd0ad95ccd54794f4825dfc9901a83a3de752a588faec365d0ee09",
"draft_analysis": "eb39c0f90e9cf226da6307365a76015e900dd692dc3f0fdc8f02fe717226261f",
"drive": "cf9e924acb2531efd5a1b90915d59f0cb532c844b754fd3a0e376ef6f706c47d",
@@ -99,6 +103,7 @@
"export": "c8c2abf007e43e896479d78798e3976ba9eda809507c820bb38538f77db696ac",
"extend": "28c63df352c77d02feffe44cf09fb0fc1d48f7905aaabbfa6dba601dbb70f8e8",
"extrude": "9cc1538971c5d25467aaed23f739899d9d102fd07f86472ac3197c54ca2e1144",
"eye": "2449167c8410826dc1106b687c12a309d5bea8f7817b897943e80f182a163c2d",
"fastener": "fcff4e4be50907f712e527b373771afafd92e50096fc7a4b8aba5d86448e1e42",
"fillet": "11ec232dc111597211e3a4fe61b69616b5d28b4b1b2732052ddcd486cdfc6129",
"filter": "4d456a56416089574bd3732fa44c0c1b27fd2478b369448808a27f0144d15d8a",
@@ -110,15 +115,15 @@
"fold": "90344fb5e5799378117fbd79ef28a84f27fba5723af5414c4ea30a2ac3a4f21e",
"folder": "c19f5230df45a1bda1e92e89de38bba21c91e6eca0517eb15847a7712012d1e5",
"gear": "25a1ca48a587850da1104a46005a330873ed196246e3d04e12cf61f26ad2b0d5",
"graph": "25646bdf4d1a534c51e1897a8ae641a21f871ed70b24ff25652e1fe957c9fa00",
"ground": "b91c6af7ea9740efb8cf196409b11d16fad52c51b732a356e5f844bd4e2f08e0",
"graph": "7156caedd2dbfa2ae53da18b7a2204b8db66c45126859d36caf049a3fd4335a4",
"ground": "23e2471a9d6872e83028e0e219e330cef1930a4d89456a0fefa1bda8a7e3eb81",
"help": "8ce4060577483dbdb510be147d2827de50ac20029354008fca55abc0c7edf05d",
"hem": "f9b1aafbedcf3dc90c26be308814638e0095fbe31b0647092507343fa60af011",
"hole": "f82d47751f826e08682db847a270897474661bfe9f35b6d3678f49a203172563",
"home": "ab5f1c41d377687e4c5a808dfdccf2757b33dd43f934d44df43d6e9118176853",
"import": "e343540eb49fdb1e53c4d54b9e60ae513b3103df6c9133048bed878e58067455",
"include": "f5b80ad3e06e3b863fcfbe415ec912e4e09653dd519f9ac207819339fe34730f",
"infinite": "bff57a1c56d9b47131d7c8ff85f008a53c612c63706052e7e19d7aaea93cf5b1",
"infinite": "53fb781131078d2f8e71be23aa610d9f9d9c8bb79ba5f97fa397475e9ff8c3bd",
"inspect": "d2b4644b2d5f1aa50cb576b9265e275fa91201e296c2bc79865f810067d538e9",
"interference": "b3d729d0e822e8d95485c8ef50649847572def10d4c713fff0e073b8031c5f5d",
"intersect": "9ab4f6551848a2be546f55502a77075bed2d3994f89d91b721eab92bcee61d61",
@@ -126,7 +131,7 @@
"iso_analysis": "dacd34ac254ec4fbb6932350f62d4d92626d922a2bfc62d2caecdeb17303e896",
"iso_curve": "015ff2e26346ccaf149f75cf6a0652d9201c1b23a14e6bb62625acfa599dc002",
"joint": "72b71a608e713f6cf51a1cb84edb011d4ccbd8bfe41d917fa2a1d13345dc0b2b",
"joint_origin": "5b0761122eb4295ea220314e8db1efd1251e3482653d6cdcc47252d0268864a8",
"joint_origin": "e12529af1fce8c5ffdf746e71ce2f5db5eb170e53778469cea8fd30344291574",
"library": "ac0b1798e4c94340f9c854daa3829371c1a9f3ffea7679d955e6cfa139cafdc8",
"line": "cd1177ea659548f03d43c7fa7dcc209a0542b1ba4bd0153c5113576cb7a96a81",
"line_mid": "edb8ebc463479ae9878e54b930c124153ca880270b7cf6c0e4edba6336ba2854",
@@ -140,17 +145,20 @@
"min_radius": "92bd79b7d557aba6ddfccc76a4c6d0cfb579061b3c57172f9171d28af675711c",
"mirror": "56637068a319dc2972c5552b25e4f43151aa9bd5055c2fef08204dd7cc0829cf",
"moon": "3ba5adb92bf0f49e92d46682dbf6905e555aa6eebc8e2b3c5288f949cda29322",
"motion_link": "19698bbe15b7c2d2601208bbcdc26627d1aa7724aee017b7da8874ad87fb9d1f",
"motion_link": "27832f827146446557609336a9b9e48e649ed84e58c45bd9032a93abbd454104",
"move": "4132e270ada8d0c79b477095c84d656d6d354e200c1748ce7fc425f36d0b7031",
"nav_settings": "b93dd46d3a3d074e0d8834167f977dab417fbc1a721bc4db5e840732304e4193",
"new": "c64c78fd8445bc7b2aa8765d0507b9adf23e35cbf52828d3f1987edccce0389f",
"normal": "1148cef2d60a858b69406a2e2527d4ea126f45846de7cc2fb3a96640e9ee226f",
"normal": "3c000d707837d4e9c865aefa43c1e610bfce5a06a38510f82e4db11fc13ab31f",
"offset": "094607afcfdcb9c1410114d9f8d22ca367f8e32ab4c61f71affe44ad5d09adbe",
"offset_face": "83d39308ec9f3ead78329c62841c8899bbc76ce08e17d539016d18c91d9d4ea7",
"offset_one_side": "094607afcfdcb9c1410114d9f8d22ca367f8e32ab4c61f71affe44ad5d09adbe",
"offset_surface": "b501cfb56b8404cdb2275935d780ce7dbb67e87e29ade3782f0859c59070a2b1",
"offset_symmetric": "67f3489402af3afa055181bbdb2a32b9fe2e0d96dccbe0f28df087577978ac9c",
"offset_two_sides": "ef69f955c5bef15471e9d77a4498e9337bf938ad75dcbc1e95af2515b6fd13da",
"open": "f1880d25489753f7e40390902037bbd3195fbd099a5e9dd175797d832abff727",
"orbit": "4adcd400cdde909139386e78579433354f65f5a77a0594447bf6dda663b3b1b4",
"origin": "9b9360edc16ef9f059bff7d863f1bc0e3abac6acf559d76c4ea39dc374ab2844",
"origin": "636f9f41654a6da7a5a708bcddef85672f2d77bfec2267b0134e8c5a59768b40",
"pan": "2465eda7a39d4458d7818f2eb2b033992a68f80d9505bff538b41eb4511bb632",
"params": "d0d9d0b3e786880e59b985dc2e3a7d593cf3771484a8fd2924d69155195c230f",
"paste": "e1b3c089adafacb6f7b78b86ec7aba0876b189c81d01031045dfee2c47ae8edc",
@@ -165,22 +173,23 @@
"perspective": "5fa45ba9b75dbe9fdad9eae331ca7ff35c6ad018b8a1fc4c8ae7bcfc13ed0c3f",
"pipe": "b9ecf1ae9f6790e2ae6c677f290446f70eba1773a10247fe33d5283b360b0403",
"plane": "3e7fa0a9d57891f3c1ec03d7422bdb29353d3487deed12e8ec5737aeb33c2f3a",
"plane_along_path": "020e25969a7f4e7e3358003addee7df8b1991cde8401df0b4df8295b19497994",
"plane_along_path": "db4686ea02c3c3b8ad0d9eac203cc050c395cff6358358922a79c00e955e6852",
"plane_angle": "2f0914955663b393a377fda080bc03dc5a2133d42c506c1908c53b2fd609b156",
"plane_midplane": "66bd880821e7b122f130824313b7070d72d79168a52df6a126106b6eb5816474",
"plane_perpendicular": "90e1d9b8e75743821aa1082596d9c3f288ab3baddf087fbae3f2025481e58a6e",
"plane_perpendicular": "0055fb18ee39044bfc9f2ac53ba55fe73d8fe59e8f4cf225ee2c723a883d3085",
"plane_tangent": "c3872b9f1d0f0b2493a5488dfdad50049c3422c29023250088eeda9bbcc6e795",
"plane_three_points": "08e2dbaf606d165ef4f788869fc794a4fbbbb2ee86a60017b76e467af6da338a",
"plane_two_edges": "1588b8d4741382d9e8fec38212419ac1c05b1bc6036f276d3b5c62db66f8ebdb",
"plane_two_edges": "21de401ec5bab8ae37510da6fa0a6910325f858c17460da0041fd26897338d30",
"plastic_assign": "bbfdb2d2c07629c047e8e671c7c032654668a67b4b8a934f74cbb3d7a00cc5fe",
"plastic_rule": "51b8591d92907a3ffb76a47a0503d7ba86706d129dd990515a364dbf1ab8cb48",
"play": "d1c17ebc16e9a4ee5ae2a8cc37b515ffcc8c53a2ab17117959e9b21278df8def",
"plus": "4f324157bb2348ac9f09346b669b08d66ed96cb1c694f33db6f21134f18904b5",
"point": "fd19dbcd26e2a898267bab54b9d89779d97894209c1771317d7debef5a6f8f5d",
"point_along_path": "1fd58d45285fb5cabeddbd35bc8485af1b6d7f1414e302202b4e73de593d1b7a",
"point_along_path": "17abd16dec5f70e9f8449c927aa995cfed10fca552ec7cd8f51b209c52012595",
"point_center": "0ad755896f7d0154a854bda16d3059da78d1fae57962e13a3bb1b31e284b7e79",
"point_edge_plane": "548a6c1c944caabe44ab0318e85ae82f39c11f74fbedda35f57bc6615755f249",
"point_edge_plane": "a277bc0b87f2dd39eb613835d0f961b3372483e22053e6a522a06c535ad530c4",
"point_three_planes": "b33c7508ffa67b66a57b72c6ea7900e93ff16362a29d0b2688e0b1db9bfad041",
"point_two_edges": "35dcb67b36c8e41041cc836b01056731ab6f14c5e3b4bdd836fbee2a1dd897e3",
"point_two_edges": "da329241706e405b877cec20639dc0a78505ca7212c7c47ad1f1f34aa26f4666",
"point_vertex": "649bb63caf65a3fbc00a1222cc642294832b5e5d8c4d33f812e09a70684c4abe",
"polygon": "4919268cca7d21ce98dbf4ca01ee832350e793afe4213e257d3c46e94ea88ad1",
"polygon_circumscribed": "7e4ad16cc1f42c599287b186f26f4ff3c108736877a571a5513bfc72d0cbb23f",
@@ -214,17 +223,19 @@
"scale": "a66f69d9a1d46c8be30da0a15827bc7e38cba72d6271537763b888c2c7e2b3fa",
"screw": "5e30570785360d6a591ea22862a82f1cf62228385c1e96382536db8a453ac791",
"section": "cdd13f99f15f6d59bfa21c747810608d6afd00cb8207faf0337928c8521e7eae",
"select": "a0c716234ef1d599be9a7654d6b2911ebe4b2de479383ba33aeab14992443a2f",
"select": "fdf6431270006ca7409c60c37cfed59572de04229f104ec723e6010ffa2b7163",
"settings": "9193dd3a1007c43660d0d47b6499cb2571338b67949e1a99df112057b9bf2b8a",
"sheet": "774e30923ef6f37dd9c0b2bc3e45705e83b3a76700bf071cd41155a365d0daa4",
"sheet_rules": "b8c3a67c82be20fc00c109decc566e8755d70167e04e0a9fb92941f7b27aa993",
"sheet_rules": "5d3a2f37d3b4a4262b3ddbdae53d61f29e0f8e284dd54006da25a7acebfa1114",
"shell": "a1959ea0d0441a479bf654b6e549e2e44a0bfdc9cda4eb46fe1fbfd884de7e38",
"silhouette": "2a848aed2f247b1c0439f830a34a513c93bc5493c40044c821d493d863ad996e",
"sketch": "b52e5862b1709a9a7e3ca00d7436d126fbfc01b38080006fa4e17dc581dfa103",
"sketch_break": "430582243311f304dbab397ce58c8c9aef9c78ed88d3e921a57e584ddb95d94c",
"sketch_break": "67a5fab332616e6d6a9aeae3bedc04ee0768179143ba34b795bdd98cea04bb24",
"sketch_chamfer": "80ab27a9929f9cf0ab2f827757e007173d74ddca6c19af238931c40d4cd874b4",
"sketch_chamfer_angle": "b853f5e7c3b008c0d56ac445a9a28f713987c919ea284945113ad35e7665e2a7",
"sketch_chamfer_two_distances": "2b70d658e341f4388838f3c8c579ec5f4f3a7fddcfa2ce7a3f89fc3db6422d6e",
"sketch_chamfer_angle": "6750268d05e0b0fd74c2d0368bf4703b09da825def668dc3dfd05deef3ba9adb",
"sketch_chamfer_equal": "80ab27a9929f9cf0ab2f827757e007173d74ddca6c19af238931c40d4cd874b4",
"sketch_chamfer_two": "1f5ecf1283e2b021e067ed2e4e2e97aa4e1ad3c7c98d8609bb81c5f811988f78",
"sketch_chamfer_two_distances": "1f5ecf1283e2b021e067ed2e4e2e97aa4e1ad3c7c98d8609bb81c5f811988f78",
"sketch_circ_pattern": "c5ff904237a3072f858f66c2777febc4facd2fee630bbf979047c5685d9a05ce",
"sketch_dxf": "dddce44d4dd10f75a221208fcf431b36b3f0cafce6611fc695ac73afb4bf5789",
"sketch_fillet": "e8fa170e5f6899abf75788b9384d49f2b9d77ba9b644f79309284a9e65629fe1",
@@ -242,6 +253,7 @@
"spin": "a5bebeff8276dd12ab7e42ddf0051370b9063fb602607298acf22e77044434d1",
"spline": "a0dcb25614e5fe1a8f17bc3bddbb11b61cf82b461dd46443ab28cddd6e4e32e3",
"spline_cv": "353f6e411c0ce611f660cef2e4fc4f8f55edc2c82288de91948dc638cd2b5f15",
"split": "eb9619e74c6ee1b1989d35a2e31d2d33a7adac210c4cd424e5382902945ac68b",
"split_body": "eb9619e74c6ee1b1989d35a2e31d2d33a7adac210c4cd424e5382902945ac68b",
"split_face": "c8b89072118bb7a28b243d38e26b81a796781a631f30b3b1fc296ba23e4d908d",
"spun": "b4cfa093ffb43611ee124f4a39fb44c609deb9cde5e05e4dfbaf893fe197c27b",
@@ -250,6 +262,7 @@
"status_warning": "1ac4f0ccfac2c01f6f66cb42188f9ae053c4aef9c5bbd249f1fb09611eb4d825",
"stitch": "6c3205d64007b771ed78d6f8055867578439fb25d591563b32dbd3343c98732d",
"style": "6c2b04234b82ea4858c80190cc7208c60f549358253005afc35ab4e29506b578",
"suppress": "c54fbc01c12c0175d78cd63f692e8aaf73fc2cac79752b2a3ad821ac32734343",
"surface": "ba0e839ce0ee03e7ff95a2389a5ecb20bd80c713064d9b1bd5f461f4a80d1921",
"surface_blend": "0642f3b4af7d22f379a3c74f54c7b1c9eef0bdda19372ce4df73c0e56bdd7bbc",
"surface_boundary": "fb8501bae192e2416118cc2e88f544e0e29197f6720bccc541c967ca0848d8d3",
@@ -265,14 +278,14 @@
"surface_ruled": "c3f0202d3beaacef0368765ce771eb9e3b0e3e157f86564c72d81f0fad9a3cab",
"surface_stitch": "6c3205d64007b771ed78d6f8055867578439fb25d591563b32dbd3343c98732d",
"surface_sweep": "6d7f18c12b2e4c1dbe3632fe08239687f6f027b29b6dddbf8c8e2d9151c7baf3",
"surface_thicken": "676eb73a99d708214e8951ebe2c4d88d60de2d752c725d8106d12fbd812e461a",
"surface_thicken": "35aaa8e4fdbcd220a3a05165d5230a7ce576fbf5a6a5772d27162ab61bb71538",
"surface_trim": "ae269721b386bd1264184b9838df3240b5b6ba02b99c9993384ef21200fb7398",
"surface_unstitch": "bd8302fe95a89eb6f9bbf35ef0ee98c8a2186e160cff3d091f8cf2a0a75d4473",
"surface_untrim": "24de5d558519e0629280d11919ba5661c92ccdccdce03f8f3d83f2d7867c2173",
"svg": "7da77d53c84db18ce95737ad633c105d1009444b3192a5e0aae76873cfc9cc12",
"sweep": "6d7f18c12b2e4c1dbe3632fe08239687f6f027b29b6dddbf8c8e2d9151c7baf3",
"text": "9d31b72b16644681c8a86ac257511847ad69ce4351cf6960442222e94b168c4a",
"thicken": "676eb73a99d708214e8951ebe2c4d88d60de2d752c725d8106d12fbd812e461a",
"thicken": "35aaa8e4fdbcd220a3a05165d5230a7ce576fbf5a6a5772d27162ab61bb71538",
"thread": "158728c3dcf6623bb1584d162398bb12c28d18770e0d47f5e6328355ce31b37c",
"torus": "5ae13fc213582e0844118b910a3a26efd9e4b177d21500363fbae230803cb4fd",
"trace": "5f2ecc61d4591d3c3b0ecccd35296b8613fce7beb2ae214fb906160c31d89187",
@@ -284,7 +297,7 @@
"update": "c675e16df4c78589a00be4a34f98627500681672ee8a668e929aec50982da3cc",
"warning": "1ac4f0ccfac2c01f6f66cb42188f9ae053c4aef9c5bbd249f1fb09611eb4d825",
"web": "be5cd95bebcd0ebe257f9eb862112124429b381ef4a2f0849938fac7c9ccc619",
"ws_animate": "d36a0834ad989a6e16e2b0db493ad8867c590caedf0442c51eff19e934c887f8",
"ws_animate": "f34f187850789cc4f141b1ace114082be04edec8e7771d6730fec1cef19c7f64",
"ws_design": "7b1dd678a2d018892b965a78932c047bbfff6b4439d7bd9fe85c09a995f97581",
"ws_drawing": "61e99c7179f3448a31b8c76392334352ec3d5e39b0b92fe5244940146d0986cb",
"ws_render": "1bfe474d1742623ad2142129e4d6a40015e674813eb1db401d2e88e55b1f2a03",
@@ -292,6 +305,9 @@
"zoom": "89c121fa85df034d70bd9f06e20cbd54d163691d4df03b13a9ac5372e951aeda"
},
"notes": {
"pattern_flip": "This feels sparse. Improve the composition"
"construction": "Fix the bottom dot's position",
"infinite": "Make the infinity symbol use the 'Line art' colour",
"pattern_flip": "This feels sparse. Improve the composition",
"sheet_rules": "Make the top line also blue"
}
}
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Chevron right</title>
<path d="M24 16L40 32L24 48" fill="none" stroke="currentColor" stroke-width="5" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 230 B

+1 -1
View File
@@ -4,5 +4,5 @@
<path d="M12 52L52 52" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M12 8L16.5 17L7.5 17Z" fill="#236ead"/>
<path d="M56 52L47 56.5L47 47.5Z" fill="#236ead"/>
<circle cx="12" cy="52" r="4" fill="#34465b"/>
<circle cx="12" cy="52" r="4" fill="currentColor"/>
</svg>

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 494 B

@@ -6,5 +6,5 @@
<path d="M32 6L32 33" fill="none" stroke="#ffffff" stroke-width="6.45" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 6L32 33" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 27.6L36.68 30.3L36.68 35.7" fill="none" stroke="#ffffff" stroke-width="4.05" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 27.6L36.68 30.3L36.68 35.7" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 27.6L36.68 30.3L36.68 35.7" fill="none" stroke="currentColor" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

+1 -1
View File
@@ -3,5 +3,5 @@
<path d="M7 32L23 32M41 32L57 32" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="23" cy="32" r="3.07" fill="#236ead"/>
<circle cx="41" cy="32" r="3.07" fill="#236ead"/>
<path d="M32 22L32 42" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 22L32 42" fill="none" stroke="currentColor" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 457 B

@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Coincident</title>
<path d="M10.4 42.32L32 27.92" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 27.92L53.6 37.52" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10.4 42.32L32 27.92" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 27.92L53.6 37.52" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M25.76 27.92A6.24 6.24 0 1 0 38.24 27.92A6.24 6.24 0 1 0 25.76 27.92Z" fill="#b9ddf8" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 551 B

+1 -1
View File
@@ -2,5 +2,5 @@
<title>Fixed</title>
<path d="M22.4 22.4A9.6 9.6 0 1 0 41.6 22.4A9.6 9.6 0 1 0 22.4 22.4Z" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 32L32 51.2" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M24.8 51.2L39.2 51.2" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M24.8 51.2L39.2 51.2" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 517 B

After

Width:  |  Height:  |  Size: 522 B

@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Midpoint</title>
<path d="M10.4 39.2L53.6 24.8" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10.4 39.2L53.6 24.8" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="32" cy="32" r="7.3" fill="#ffffff"/>
<circle cx="32" cy="32" r="5.6" fill="#236ead"/>
</svg>

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 332 B

@@ -2,5 +2,5 @@
<title>Perpendicular</title>
<path d="M12.8 48.8L51.2 48.8" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 48.8L32 15.2" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 39.2L41.6 39.2L41.6 48.8" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 39.2L41.6 39.2L41.6 48.8" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 501 B

@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Regular polygon</title>
<path d="M52.4 32L42.2 49.67L21.8 49.67L11.6 32L21.8 14.33L42.2 14.33Z" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 32L52.4 32" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="32" cy="32" r="3.4" fill="#34465b"/>
<path d="M32 32L52.4 32" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="32" cy="32" r="3.4" fill="currentColor"/>
</svg>

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 459 B

@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Curvature</title>
<path d="M10.4 32L12.2 27.65L14 23.6L15.8 20.12L17.6 17.45L19.4 15.77L21.2 15.2L23 15.77L24.8 17.45L26.6 20.12L28.4 23.6L30.2 27.65L32 32" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10.4 32L12.2 27.65L14 23.6L15.8 20.12L17.6 17.45L19.4 15.77L21.2 15.2L23 15.77L24.8 17.45L26.6 20.12L28.4 23.6L30.2 27.65L32 32" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 32L33.8 36.35L35.6 40.4L37.4 43.88L39.2 46.55L41 48.23L42.8 48.8L44.6 48.23L46.4 46.55L48.2 43.88L50 40.4L51.8 36.35L53.6 32" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="32" cy="32" r="3.4" fill="#34465b"/>
<circle cx="32" cy="32" r="3.4" fill="currentColor"/>
</svg>

Before

Width:  |  Height:  |  Size: 624 B

After

Width:  |  Height:  |  Size: 634 B

@@ -1,5 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Tangent</title>
<path d="M17.6 32A14.4 14.4 0 1 0 46.4 32A14.4 14.4 0 1 0 17.6 32Z" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M17.6 32A14.4 14.4 0 1 0 46.4 32A14.4 14.4 0 1 0 17.6 32Z" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10.4 17.6L53.6 17.6" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 397 B

@@ -1,9 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Centerline</title>
<path d="M10 32L23 32M41 32L54 32" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M11 53L23.41 40.59M40.59 23.41L53 11" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="32" cy="32" r="3.6" fill="#236ead"/>
<circle cx="10" cy="32" r="5.8" fill="#ffffff"/>
<circle cx="10" cy="32" r="3.4" fill="#236ead"/>
<circle cx="54" cy="32" r="5.8" fill="#ffffff"/>
<circle cx="54" cy="32" r="3.4" fill="#236ead"/>
<circle cx="11" cy="53" r="5.8" fill="#ffffff"/>
<circle cx="11" cy="53" r="3.4" fill="#236ead"/>
<circle cx="53" cy="11" r="5.8" fill="#ffffff"/>
<circle cx="53" cy="11" r="3.4" fill="#236ead"/>
</svg>

Before

Width:  |  Height:  |  Size: 486 B

After

Width:  |  Height:  |  Size: 498 B

@@ -1,7 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Construction</title>
<path d="M13 51L19 45M25 39L31 33M37 27L43 21M49 15L51 13" fill="none" stroke="#6f879c" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10 54L12 52" fill="none" stroke="#6f879c" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="12" cy="52" r="3.07" fill="#6f879c"/>
<circle cx="52" cy="12" r="3.07" fill="#6f879c"/>
<path d="M17 47L23 41M29 35L35 29M41 23L47 17" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="11" cy="53" r="3.07" fill="#236ead"/>
<circle cx="53" cy="11" r="3.07" fill="#236ead"/>
</svg>

Before

Width:  |  Height:  |  Size: 484 B

After

Width:  |  Height:  |  Size: 349 B

@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Dimension</title>
<path d="M10 12L10 52M54 12L54 52" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10 12L10 52M54 12L54 52" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M19 32L45 32" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M13 32L24 26L24 38Z" fill="#236ead"/>
<path d="M51 32L40 38L40 26Z" fill="#236ead"/>

Before

Width:  |  Height:  |  Size: 451 B

After

Width:  |  Height:  |  Size: 456 B

+3 -3
View File
@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>More</title>
<circle cx="13" cy="32" r="5" fill="#34465b"/>
<circle cx="32" cy="32" r="5" fill="#34465b"/>
<circle cx="51" cy="32" r="5" fill="#34465b"/>
<circle cx="13" cy="32" r="5" fill="currentColor"/>
<circle cx="32" cy="32" r="5" fill="currentColor"/>
<circle cx="51" cy="32" r="5" fill="currentColor"/>
</svg>

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 252 B

+1 -1
View File
@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Dependency graph</title>
<path d="M16.5 17L47.5 32L16.5 47" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M16.5 17L47.5 32L16.5 47" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M8.6 12.44L16.5 17L16.5 26.12L8.6 21.56Z" fill="#b8c3cf"/>
<path d="M24.4 12.44L16.5 17L16.5 26.12L24.4 21.56Z" fill="#8e9faf"/>
<path d="M16.5 7.88L24.4 12.44L16.5 17L8.6 12.44Z" fill="#e2e8ef"/>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

@@ -1,9 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Infinite line</title>
<path d="M32 32L15.66 48.34" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10 54L13.18 44.45L19.55 50.82Z" fill="#34465b"/>
<path d="M32 32L48.34 15.66" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M54 10L50.82 19.55L44.45 13.18Z" fill="#34465b"/>
<path d="M32 32L15.66 48.34" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10 54L13.18 44.45L19.55 50.82Z" fill="#236ead"/>
<path d="M32 32L48.34 15.66" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M54 10L50.82 19.55L44.45 13.18Z" fill="#236ead"/>
<path d="M32 32C26.86 22.57 20 23.43 20 32C20 40.57 26.86 41.43 32 32C37.14 22.57 44 23.43 44 32C44 40.57 37.14 41.43 32 32" fill="none" stroke="#ffffff" stroke-width="10.5" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 32C26.86 22.57 20 23.43 20 32C20 40.57 26.86 41.43 32 32C37.14 22.57 44 23.43 44 32C44 40.57 37.14 41.43 32 32" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 32C26.86 22.57 20 23.43 20 32C20 40.57 26.86 41.43 32 32C37.14 22.57 44 23.43 44 32C44 40.57 37.14 41.43 32 32" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 929 B

After

Width:  |  Height:  |  Size: 934 B

@@ -13,5 +13,5 @@
<path d="M26.03 34.5L17.85 53.09" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M15.03 59.5L13.97 47.02L24.95 51.85Z" fill="#236ead"/>
<circle cx="26.03" cy="34.5" r="9" fill="#ffffff"/>
<circle cx="26.03" cy="34.5" r="6.3" fill="#34465b"/>
<circle cx="26.03" cy="34.5" r="6.3" fill="currentColor"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -14,6 +14,6 @@
<path d="M44.97 12.22L40.5 14.72L41.55 8.4Z" fill="#236ead" />
<path d="M30.8 33.02L30.38 32.94L29.95 32.91L29.51 32.9L29.05 32.94L28.59 33.01L28.11 33.12L27.63 33.27L27.14 33.45L26.64 33.67L26.15 33.93L25.65 34.21L25.16 34.53L24.66 34.88L24.17 35.26L23.69 35.68L23.21 36.12L22.75 36.58L22.29 37.07L21.85 37.59L21.42 38.12L21 38.68L20.6 39.25L20.22 39.84L19.86 40.44L19.52 41.05L19.2 41.68L18.91 42.31L18.63 42.94L18.38 43.58L18.16 44.23L17.96 44.87L17.8 45.5L17.65 46.13L17.54 46.76L17.45 47.37L17.39 47.98L17.37 48.57L17.37 49.14L17.39 49.69L17.45 50.23L17.54 50.75L17.65 51.24L17.8 51.71L17.96 52.15L18.16 52.56L18.38 52.94L18.63 53.3L18.91 53.62" fill="none" stroke="#ffffff" stroke-width="4.8" stroke-linejoin="round" stroke-linecap="round" />
<path d="M20.23 55.13L15.18 54.22L20 50.01Z" fill="#ffffff" stroke="#ffffff" stroke-width="2" stroke-linejoin="round" stroke-linecap="round" />
<path d="M30.8 33.02L30.38 32.94L29.95 32.91L29.51 32.9L29.05 32.94L28.59 33.01L28.11 33.12L27.63 33.27L27.14 33.45L26.64 33.67L26.15 33.93L25.65 34.21L25.16 34.53L24.66 34.88L24.17 35.26L23.69 35.68L23.21 36.12L22.75 36.58L22.29 37.07L21.85 37.59L21.42 38.12L21 38.68L20.6 39.25L20.22 39.84L19.86 40.44L19.52 41.05L19.2 41.68L18.91 42.31L18.63 42.94L18.38 43.58L18.16 44.23L17.96 44.87L17.8 45.5L17.65 46.13L17.54 46.76L17.45 47.37L17.39 47.98L17.37 48.57L17.37 49.14L17.39 49.69L17.45 50.23L17.54 50.75L17.65 51.24L17.8 51.71L17.96 52.15L18.16 52.56L18.38 52.94L18.63 53.3L18.91 53.62" fill="none" stroke="#34465b" stroke-width="2.6" stroke-linejoin="round" stroke-linecap="round" />
<path d="M20.23 55.13L15.18 54.22L20 50.01Z" fill="#34465b" />
<path d="M30.8 33.02L30.38 32.94L29.95 32.91L29.51 32.9L29.05 32.94L28.59 33.01L28.11 33.12L27.63 33.27L27.14 33.45L26.64 33.67L26.15 33.93L25.65 34.21L25.16 34.53L24.66 34.88L24.17 35.26L23.69 35.68L23.21 36.12L22.75 36.58L22.29 37.07L21.85 37.59L21.42 38.12L21 38.68L20.6 39.25L20.22 39.84L19.86 40.44L19.52 41.05L19.2 41.68L18.91 42.31L18.63 42.94L18.38 43.58L18.16 44.23L17.96 44.87L17.8 45.5L17.65 46.13L17.54 46.76L17.45 47.37L17.39 47.98L17.37 48.57L17.37 49.14L17.39 49.69L17.45 50.23L17.54 50.75L17.65 51.24L17.8 51.71L17.96 52.15L18.16 52.56L18.38 52.94L18.63 53.3L18.91 53.62" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linejoin="round" stroke-linecap="round" />
<path d="M20.23 55.13L15.18 54.22L20 50.01Z" fill="currentColor" />
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

+1 -1
View File
@@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Normal line</title>
<path d="M11 53L53 11" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M11 53L53 11" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Symmetric offset</title>
<path d="M8 56L8 40A32 32 0 0 1 40 8L56 8" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M20 56L20 40A20 20 0 0 1 40 20L56 20" fill="none" stroke="#8e9faf" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 56L32 40A8 8 0 0 1 40 32L56 32" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 537 B

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Two independent offset sides</title>
<path d="M8 56L8 40A32 32 0 0 1 40 8L56 8" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M24 56L24 40A16 16 0 0 1 40 24L56 24" fill="none" stroke="#8e9faf" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M34 56L34 40A6 6 0 0 1 40 34L56 34" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 549 B

+4 -4
View File
@@ -2,10 +2,10 @@
<title>Origin</title>
<path d="M32 39L32 19" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 11L37 20L27 20Z" fill="#236ead"/>
<path d="M32 39L49.09 48.97" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M56 53L45.71 52.78L50.75 44.15Z" fill="#34465b"/>
<path d="M32 39L14.91 48.97" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M8 53L13.25 44.15L18.29 52.78Z" fill="#34465b"/>
<path d="M32 39L49.09 48.97" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M56 53L45.71 52.78L50.75 44.15Z" fill="currentColor"/>
<path d="M32 39L14.91 48.97" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M8 53L13.25 44.15L18.29 52.78Z" fill="currentColor"/>
<path d="M26.3 35.71L32 39L32 45.58L26.3 42.29Z" fill="#b8c3cf"/>
<path d="M37.7 35.71L32 39L32 45.58L37.7 42.29Z" fill="#8e9faf"/>
<path d="M32 32.42L37.7 35.71L32 39L26.3 35.71Z" fill="#e2e8ef"/>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Plane along path</title>
<path d="M7 48C18 48 19 32 32 32C45 32 46 16 57 16" fill="none" stroke="#34465b" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M7 48C18 48 19 32 32 32C45 32 46 16 57 16" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M22 13L42 25L42 51L22 39Z" fill="#b9ddf8" stroke="#236ead" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="0.1 5"/>
<path d="M32 32C45 32 46 16 57 16" fill="none" stroke="#34465b" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 32C45 32 46 16 57 16" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 551 B

After

Width:  |  Height:  |  Size: 561 B

@@ -3,5 +3,5 @@
<path d="M28.71 27.48L56.68 43.63L35.29 55.98L7.32 39.84Z" fill="#b8c3cf" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M18.01 33.66L45.99 49.81L45.99 24.16L18.01 8.01Z" fill="#b9ddf8" stroke="#236ead" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="0.1 5"/>
<path d="M25.42 45.53L25.42 37.94L32 34.13" fill="none" stroke="#ffffff" stroke-width="4.05" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M25.42 45.53L25.42 37.94L32 34.13" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M25.42 45.53L25.42 37.94L32 34.13" fill="none" stroke="currentColor" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 742 B

After

Width:  |  Height:  |  Size: 747 B

@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Plane through two edges</title>
<path d="M25.9 17.92L56.39 35.52L38.1 46.08L7.61 28.48Z" fill="#b9ddf8" stroke="#236ead" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round" stroke-dasharray="0.1 5"/>
<path d="M18.28 17.92L56.39 39.92" fill="none" stroke="#34465b" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M7.61 24.08L45.72 46.08" fill="none" stroke="#34465b" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M18.28 17.92L56.39 39.92" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M7.61 24.08L45.72 46.08" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 561 B

After

Width:  |  Height:  |  Size: 571 B

@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Point along path</title>
<path d="M8 48.8C16 48.8 17 19.8 32 19.8C47 19.8 48 44.8 56 44.8" fill="none" stroke="#34465b" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M8 48.8C16 48.8 17 19.8 32 19.8C47 19.8 48 44.8 56 44.8" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="32" cy="19.8" r="6.2" fill="#ffffff"/>
<circle cx="32" cy="19.8" r="4.5" fill="#236ead"/>
</svg>

Before

Width:  |  Height:  |  Size: 373 B

After

Width:  |  Height:  |  Size: 378 B

@@ -1,9 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Point at edge and plane</title>
<path d="M22 6.55L40 58.55" fill="none" stroke="#34465b" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M22 6.55L40 58.55" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M29.66 21.6L56.16 36.9L34.34 49.5L7.84 34.2Z" fill="#e2e8ef" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M22 6.55L32 35.44" fill="none" stroke="#ffffff" stroke-width="5.4" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M22 6.55L32 35.44" fill="none" stroke="#34465b" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M22 6.55L32 35.44" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="32" cy="35.44" r="6.2" fill="#ffffff"/>
<circle cx="32" cy="35.44" r="4.5" fill="#236ead"/>
</svg>

Before

Width:  |  Height:  |  Size: 756 B

After

Width:  |  Height:  |  Size: 766 B

@@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Point through two edges</title>
<path d="M9 39L55 25M15 13L49 51" fill="none" stroke="#34465b" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M9 39L55 25M15 13L49 51" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="32" cy="32" r="6.2" fill="#ffffff"/>
<circle cx="32" cy="32" r="4.5" fill="#236ead"/>
</svg>

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 349 B

+1 -1
View File
@@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Select</title>
<path d="M18 7L18 50L28.5 40.5L35.5 56L43 52.5L36 37.5L50 37.5Z" fill="#34465b" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M18 7L18 50L28.5 40.5L35.5 56L43 52.5L36 37.5L50 37.5Z" fill="currentColor" stroke="currentColor" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 270 B

@@ -6,7 +6,7 @@
<path d="M27.98 26L58.77 43.77L58.77 46.86L36.02 60L5.23 42.23L5.23 39.14Z" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M5.23 39.14L36.02 56.91L58.77 43.77" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M36.02 56.91L36.02 60" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10 12L54 12" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10 12L54 12" fill="none" stroke="#236ead" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M14 12L14 20" fill="none" stroke="#236ead" stroke-width="2.97" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M22 12L22 17" fill="none" stroke="#236ead" stroke-width="2.97" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M30 12L30 20" fill="none" stroke="#236ead" stroke-width="2.97" stroke-linejoin="round" stroke-linecap="round"/>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -2,7 +2,7 @@
<title>Distance and angle sketch chamfer</title>
<path d="M12 36L12 12L42 12" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M12 54L12 36L42 12L54 12" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M12 25A11 11 0 0 1 20.59 29.13" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M12 25A11 11 0 0 1 20.59 29.13" fill="none" stroke="currentColor" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="12" cy="54" r="3.07" fill="#236ead"/>
<circle cx="54" cy="12" r="3.07" fill="#236ead"/>
</svg>

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 633 B

@@ -2,7 +2,7 @@
<title>Two distance sketch chamfer</title>
<path d="M12 43L12 12L31 12" fill="none" stroke="#6f879c" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M12 54L12 43L31 12L54 12" fill="none" stroke="#236ead" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M18 9L18 15M9 25L15 25M9 31L15 31" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M18 9L18 15M9 25L15 25M9 31L15 31" fill="none" stroke="currentColor" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<circle cx="12" cy="54" r="3.07" fill="#236ead"/>
<circle cx="54" cy="12" r="3.07" fill="#236ead"/>
</svg>

Before

Width:  |  Height:  |  Size: 625 B

After

Width:  |  Height:  |  Size: 630 B

+5 -5
View File
@@ -2,8 +2,8 @@
<title>Thicken</title>
<path d="M32 40L32 53" fill="none" stroke="#ffffff" stroke-width="6.45" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 60L27 51.5L37 51.5Z" fill="#ffffff" stroke="#ffffff" stroke-width="2.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 40L32 53" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 60L27 51.5L37 51.5Z" fill="#34465b"/>
<path d="M32 40L32 53" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 60L27 51.5L37 51.5Z" fill="currentColor"/>
<path d="M7.75 23L32 37L32 53L7.75 39Z" fill="#328bd3"/>
<path d="M56.25 23L32 37L32 53L56.25 39Z" fill="#236ead"/>
<path d="M32 9L56.25 23L32 37L7.75 23Z" fill="#b9ddf8"/>
@@ -11,9 +11,9 @@
<path d="M7.75 23L32 37L56.25 23" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 37L32 53" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M7.75 31L32 45L56.25 31" fill="none" stroke="#ffffff" stroke-width="4.75" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M7.75 31L32 45L56.25 31" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M7.75 31L32 45L56.25 31" fill="none" stroke="currentColor" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 20.88L32 11" fill="none" stroke="#ffffff" stroke-width="6.45" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 4L37 12.5L27 12.5Z" fill="#ffffff" stroke="#ffffff" stroke-width="2.2" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 20.88L32 11" fill="none" stroke="#34465b" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 4L37 12.5L27 12.5Z" fill="#34465b"/>
<path d="M32 20.88L32 11" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M32 4L37 12.5L27 12.5Z" fill="currentColor"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -1,9 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
<title>Animate workspace</title>
<path d="M10.46 24.87L3.55 28.86L3.55 47.86L10.46 51.85M3.55 28.86L10.46 32.85" fill="none" stroke="#ffffff" stroke-width="7.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10.46 24.87L3.55 28.86L3.55 47.86L10.46 51.85M3.55 28.86L10.46 32.85" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M10.46 24.87L3.55 28.86L3.55 47.86L10.46 51.85M3.55 28.86L10.46 32.85" fill="none" stroke="currentColor" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M22.46 24.87L15.55 28.86L15.55 47.86L22.46 51.85M15.55 28.86L22.46 32.85" fill="none" stroke="#ffffff" stroke-width="7.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M22.46 24.87L15.55 28.86L15.55 47.86L22.46 51.85M15.55 28.86L22.46 32.85" fill="none" stroke="#34465b" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M22.46 24.87L15.55 28.86L15.55 47.86L22.46 51.85M15.55 28.86L22.46 32.85" fill="none" stroke="currentColor" stroke-width="2.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M44 19.36L60.45 28.86L44 38.36L44 57.36L27.55 47.86L27.55 28.86Z" fill="#ffffff" stroke="#ffffff" stroke-width="7.55" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M27.55 28.86L44 38.36L44 57.36L27.55 47.86Z" fill="#b8c3cf"/>
<path d="M60.45 28.86L44 38.36L44 57.36L60.45 47.86Z" fill="#8e9faf"/>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

+24 -2
View File
@@ -9,7 +9,7 @@
--out FILE Self-contained static review page (default target/icon-status.html)
Read assets/icons/ui/STYLE_GUIDE.md before editing artwork. SVGs are authoritative.
Every discovered non-final icon is Open; no inventory file controls discovery.
Every discovered non-final icon is Open; artwork, source and runtime requests are discovery sources.
"""
import sys, os, re, glob, html, json, hashlib, collections, tomllib, uuid, datetime
@@ -36,6 +36,7 @@ def art_rev():
paths += glob.glob(ROOT + '/crates/ui-egui/src/**/*.rs', recursive=True)
paths += glob.glob(HERE + '/*.py')
paths += [D + '/palette.toml', D + '/aliases.toml', __file__]
paths += glob.glob(D + '/requested_icons.txt')
for path in sorted(paths):
# Equal-length edits can share an mtime. Only the content identifies what
# the reviewer saw; file metadata must never authorize stale acceptance.
@@ -58,6 +59,24 @@ def ui_icon_names(source):
names.update(re.findall(r'\("[^"]*",\s*"([a-z][a-z0-9_]*)",\s*"[^"]*"\)', table.group(1)))
return names
def requested_icons():
"""Runtime ids recorded by the Harness audit; flags describe its last actual render."""
path = os.path.join(D, 'requested_icons.txt')
if not os.path.exists(path):
return {}
requested = {}
with open(path, encoding='utf-8') as manifest:
for number, line in enumerate(manifest, 1):
if not line.strip() or line.startswith('#'):
continue
fields = line.strip().split('\t')
if len(fields) != 2 or not re.fullmatch(r'[a-z][a-z0-9_]*', fields[0]) or fields[1] not in ('true', 'false'):
raise ValueError(f'{path}:{number}: expected icon_id<TAB>true|false')
if fields[0] in requested:
raise ValueError(f'{path}:{number}: duplicate requested icon {fields[0]}')
requested[fields[0]] = fields[1] == 'true'
return requested
def scan():
"""Everything derived from the repo: rows, summary."""
pal = tomllib.load(open(D + '/palette.toml', 'rb'))
@@ -86,6 +105,9 @@ def scan():
t = open(f, encoding='utf-8').read()
for name in ui_icon_names(t):
uses[name].append('ui:' + os.path.relpath(f, ROOT + '/crates/ui-egui/src').replace(os.sep, '/'))
runtime = requested_icons()
for name in runtime:
uses[name].append('ui:runtime audit')
mk = ROOT + '/assets/icons/ui/source/markers.rs'
if os.path.exists(mk):
for name in re.findall(r'=> "(c_[a-z_]+)"', open(mk, encoding='utf-8').read()): uses[name].append('ui:sketch constraint glyph')
@@ -95,7 +117,7 @@ def scan():
rows = []
for n in sorted(set(uses) | set(masters) | set(alias_raw)):
m, acc = alias_of(n)
if m in masters and n != 'placeholder': status = 'done'
if m in masters and n != 'placeholder' and not runtime.get(n, False): status = 'done'
else: status, m = 'placeholder', 'placeholder'
cmds = [u for u in uses.get(n, []) if not u.startswith('ui:')]
rows.append(dict(id=n, status=status, master=m, accent=acc, commands=len(cmds), example=cmds[0] if cmds else '',
+31 -1
View File
@@ -15,7 +15,7 @@ files = sorted(glob.glob(d + '/svg/*/*.svg'))
for path in Path(d).rglob('*'):
if not path.is_file(): continue
rel = path.relative_to(d).as_posix()
allowed = (rel in {'palette.toml', 'aliases.toml', 'review.json', 'references.toml'}
allowed = (rel in {'palette.toml', 'aliases.toml', 'review.json', 'references.toml', 'requested_icons.txt'}
or path.suffix == '.md'
or (rel.startswith('svg/') and path.suffix == '.svg')
or (path.parent in {Path(d) / 'tools', Path(d) / 'tools/author'} and path.suffix == '.py')
@@ -79,6 +79,36 @@ if os.path.exists(references):
if name not in names and name not in al: err(references, name + ': reference artwork is missing')
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, '..', '..', '..', '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):
pat = (r'\bt\.%s = Color32::from_rgb\((\d+), (\d+), (\d+)\)' if dark else r'\b%s: Color32::from_rgb\((\d+), (\d+), (\d+)\)') % name
m = re.search(pat, block)
return None if not m else '#%02x%02x%02x' % tuple(int(x) for x in m.groups())
out = {}
for name in ('toolbar', 'panel', 'border', 'text', 'text_dim', 'viewport_top'):
out[name] = (pick(light_src, name, False), pick(dark_src, name, True) or pick(light_src, name, False))
return out
css_path = os.path.join(d, 'tools', 'review', 'review.css')
if os.path.exists(css_path):
try:
tok = app_tokens()
css = open(css_path, encoding='utf-8').read()
want = {
':root{': {'--bg': tok['panel'][0], '--fg': tok['text'][0], '--card': tok['toolbar'][0], '--line': tok['border'][0], '--mut': tok['text_dim'][0]},
'body.dark{': {'--bg': tok['viewport_top'][1], '--fg': tok['text'][1], '--card': tok['toolbar'][1], '--line': tok['border'][1], '--mut': tok['text_dim'][1]},
}
for block, values in want.items():
line = next((l for l in css.split('\n') if l.startswith(block)), '')
for var, hexv in values.items():
m = re.search(re.escape(var) + r':(#[0-9a-fA-F]{6})', line)
if not m or m.group(1).lower() != hexv:
err(css_path, '%s%s is %s, the app token is %s (palettes.rs)' % (block, var, m.group(1) if m else 'missing', hexv))
except (OSError, ValueError) as e:
err(css_path, 'cannot compare with palettes.rs: %s' % e)
# an icon accepted as final on the review page must not change (un-accept it there to work on it again)
import json, review_state
rp = d + '/review.json'
+1 -1
View File
@@ -9,7 +9,7 @@ aliases = tomllib.load(open(d + '/aliases.toml', 'rb')).get('alias', {})
def themed(svg, theme, icon, family, size):
_, accent = icon_palette.resolve(palette, aliases, icon)
return icon_palette.themed(svg, palette, theme, accent, namespace='preview-' + family + '-' + icon + '-' + theme + '-' + str(size))
h = '<meta charset=utf-8><style>body{margin:0;font:10px sans-serif}.p{padding:8px}.light{background:#fff;color:#222}.dark{background:#1e2530;color:#ddd}.c{display:inline-block;width:92px;text-align:center;margin:3px 2px;vertical-align:top}.s{display:flex;gap:6px;justify-content:center;align-items:center;margin-top:2px}h3{margin:4px}</style>'
h = '<meta charset=utf-8><style>body{margin:0;font:10px sans-serif}.p{padding:8px}.light{background:#f6f7f9;color:#262a32}.dark{background:#272b34;color:#dee2e8}.c{display:inline-block;width:92px;text-align:center;margin:3px 2px;vertical-align:top}.s{display:flex;gap:6px;justify-content:center;align-items:center;margin-top:2px}h3{margin:4px}</style>'
for theme in ('light', 'dark'):
for fam in sorted(os.listdir(d + '/svg')):
h += '<div class="p %s"><h3>%s - %s</h3>' % (theme, fam, theme)
@@ -1,6 +1,6 @@
<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<title>SolidCraft icon style references</title>
<style>body{font:14px/1.5 system-ui;margin:24px auto;max-width:1100px;padding:0 20px;background:#f4f6f9;color:#34465b}h1{font-size:24px}h2{font-size:18px;margin-top:28px}.examples{display:flex;flex-wrap:wrap;gap:10px}article{display:flex;flex-wrap:wrap;width:180px;border:1px solid #d5dbe3;border-radius:8px;overflow:hidden;background:white}b{font-size:11px;width:100%;padding:7px 10px}.light,.dark{width:50%;display:flex;justify-content:center}.dark{background:#1e2530}svg{width:80px;height:80px;display:block;margin:4px auto}code{font-size:12px}a{color:#236ead}</style>
<style>body{font:14px/1.5 system-ui;margin:24px auto;max-width:1100px;padding:0 20px;background:#fafbfc;color:#262a32}h1{font-size:24px}h2{font-size:18px;margin-top:28px}.examples{display:flex;flex-wrap:wrap;gap:10px}article{display:flex;flex-wrap:wrap;width:180px;border:1px solid #d0d4dc;border-radius:8px;overflow:hidden;background:#f6f7f9}b{font-size:11px;width:100%;padding:7px 10px}.light,.dark{width:50%;display:flex;justify-content:center}.dark{background:#272b34}svg{width:80px;height:80px;display:block;margin:4px auto}code{font-size:12px}a{color:#236ead}</style>
<h1>Icon style references</h1><p><a href="/">Return to review</a>. The binding specification is <code>assets/icons/ui/STYLE_GUIDE.md</code>.
Read it before editing. These are original SolidCraft bases and finished visual references, shown directly from the current SVG masters.</p>
<p>64-unit grid · 2.55 outlines · 4.25 action strokes · round caps and joins · standard 30° isometric axes · top light, left medium, right dark.</p>
@@ -1,5 +1,6 @@
:root{--bg:#f4f6f9;--fg:#1d2733;--card:#fff;--line:#d5dbe3;--mut:#6b7a8a;--sz:48px}
body.dark{--bg:#1e2530;--fg:#dbe4ee;--card:#262f3c;--line:#3a4657;--mut:#8a9db0}
/* 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)}
header{position:sticky;top:0;background:var(--card);border-bottom:1px solid var(--line);padding:6px 12px;z-index:5;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center}
h1{font-size:14px;margin:0}.sum{color:var(--mut)}
+1 -1
View File
@@ -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(11.5);
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));
+8 -7
View File
@@ -1,6 +1,6 @@
//! Navigation drawing definitions. Camera projection and picking remain in the UI widgets.
use crate::theme::Tokens;
use egui::{Align2, Color32, FontId, Pos2, Rect, Shape, Stroke, pos2, vec2};
use egui::{Color32, FontId, Pos2, Rect, Shape, Stroke, pos2, vec2};
use solidcraft_engine::geom::{Ring, Vec3};
pub(crate) struct Facet {
pub(crate) direction: Vec3,
@@ -120,7 +120,7 @@ pub(crate) fn paint_cube(painter: &egui::Painter, faces: &[Facet], hovered: Opti
}
if labels {
for face in faces {
face_text(painter, face, t.cube_text, 14.0 * scale);
face_text(painter, face, t.cube_text, t.font_heading * scale);
}
}
}
@@ -187,13 +187,14 @@ pub(crate) fn axis_tip(painter: &egui::Painter, c: Pos2, name: &str, d: &Vec3, a
}
}
if positive {
// The letters are heavy: egui's regular face gets a small overstrike for weight. On a
// hovered (white) disc the letter takes the axis colour.
// 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();
for dx in [-0.45, 0.45] {
painter.text(at + vec2(dx, 0.0), Align2::CENTER_CENTER, &label, FontId::proportional(13.5), letter);
}
let galley = painter.layout_no_wrap(label, crate::fonts::bold(crate::theme::Tokens::get().font_compass), 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);
painter.galley(origin, galley, letter);
}
if !positive {
painter.circle_stroke(
+1 -1
View File
@@ -11,7 +11,7 @@ pub(crate) fn paint(painter: &egui::Painter, p: 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(11.0), 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);
+14
View File
@@ -816,8 +816,18 @@
"settings.reset_title": "Nastavení byla změněna",
"settings.supersampling_note": "Vykresluje pohled ve vyšším rozlišení a poté jej zmenšuje: hladší hrany, čáry a mřížka na obrazovkách pod 4K. Stojí výkon GPU: asi 2,25× více pixelů při 1,5× a 4× při 2×.",
"sketch.degrees_of_freedom": "Stupně volnosti: {count}",
"sketch.dof_left": "Zbývající stupně volnosti: {count}",
"sketch.dof_left_one": "Zbývá {count} stupeň volnosti",
"sketch.draw_curves": "Kreslit jako {linetype}",
"sketch.make_selection": "Převést výběr na {linetype}",
"sketch_panel.attached": "Připojeno k {body} / {path}",
"sketch_panel.author": "Umístění autora: {path}",
"sketch_panel.dimension_hint": "Zadejte hodnotu nebo výraz a poté stiskněte OK.",
"sketch_panel.move_hint": "Zadejte vzdálenosti a úhel a poté stiskněte OK.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "Připojeno k rovinné ploše plechového tělesa; při změně plechu sleduje tento panel.",
"sketch_panel.text_hint": "Upravte text a jeho umístění a poté stiskněte OK.",
"sketch_panel.use_plane": "Použít rovinu {plane}",
"sketch_text.align_center": "Na střed",
"sketch_text.align_left": "Vlevo",
"sketch_text.align_right": "Vpravo",
@@ -1073,6 +1083,7 @@
"ui.combine": "Kombinovat",
"ui.coming_later": "připravujeme",
"ui.command_done": "{command} hotovo",
"ui.command_palette_hint": "Zadejte příkaz, např. {example} — nebo stiskněte S pro hledání",
"ui.concentric": "Soustřednost",
"ui.configurations": "Konfigurace",
"ui.conic_curve": "Kuželosečka",
@@ -1328,8 +1339,11 @@
"ui.orbit_around": "Otáčet kolem",
"ui.orientation": "Orientace",
"ui.origin": "Počátek",
"ui.palette_construction_mode": "Konstrukční režim (X)",
"ui.palette_more": "Další",
"ui.palette_points": "Body",
"ui.palette_profile": "Profil",
"ui.palette_sketch_options": "Možnosti náčrtu",
"ui.pan": "Posun",
"ui.pan_zoom_orbit": "Posun, přiblížení, otáčení",
"ui.parallel": "Rovnoběžnost",
+14
View File
@@ -623,8 +623,18 @@
"settings.reset_title": "Einstellungen wurden geändert",
"settings.supersampling_note": "Zeichnet die Ansicht in höherer Auflösung und rechnet sie herunter: glattere Kanten, Linien und Raster auf Bildschirmen unter 4K. Kostet GPU-Zeit: etwa 2,25-mal so viele Pixel bei 1,5× und 4-mal bei 2×.",
"sketch.degrees_of_freedom": "{count} Freiheitsgrade",
"sketch.dof_left": "{count} Freiheitsgrade übrig",
"sketch.dof_left_one": "{count} Freiheitsgrad übrig",
"sketch.draw_curves": "Als {linetype} zeichnen",
"sketch.make_selection": "Auswahl als {linetype} markieren",
"sketch_panel.attached": "Angehängt an {body} / {path}",
"sketch_panel.author": "Autorenplatzierung: {path}",
"sketch_panel.dimension_hint": "Einen Wert oder Ausdruck eingeben, dann OK drücken.",
"sketch_panel.move_hint": "Abstände und einen Winkel eingeben, dann OK drücken.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "An eine ebene Fläche eines Blechkörpers angehängt; folgt diesem Bereich bei Änderungen am Blech.",
"sketch_panel.text_hint": "Text und Platzierung bearbeiten, dann OK drücken.",
"sketch_panel.use_plane": "Ebene {plane} verwenden",
"sketch_text.align_center": "Mitte",
"sketch_text.align_left": "Links",
"sketch_text.align_right": "Rechts",
@@ -861,6 +871,7 @@
"ui.combine": "Kombinieren",
"ui.coming_later": "bald verfügbar",
"ui.command_done": "{command} fertig",
"ui.command_palette_hint": "Befehl eingeben, z. B. {example} — oder S drücken, um zu suchen",
"ui.concentric": "Konzentrisch",
"ui.configurations": "Konfigurationen",
"ui.conic_curve": "Kegelschnitt",
@@ -1115,8 +1126,11 @@
"ui.orbit_around": "Umkreisen um",
"ui.orientation": "Ausrichtung",
"ui.origin": "Ursprung",
"ui.palette_construction_mode": "Konstruktionsmodus (X)",
"ui.palette_more": "Mehr",
"ui.palette_points": "Punkte",
"ui.palette_profile": "Profil",
"ui.palette_sketch_options": "Skizzenoptionen",
"ui.pan": "Verschieben",
"ui.pan_zoom_orbit": "Verschieben, zoomen, umkreisen",
"ui.parallel": "Parallel",
+14
View File
@@ -905,10 +905,20 @@
"settings.reset_title": "Settings were changed",
"settings.supersampling_note": "Draws the view at a higher resolution and filters it down: smoother edges, lines and grid on screens below 4K. It costs GPU time: about 2.25× the pixels at 1.5× and 4× at 2×.",
"sketch.degrees_of_freedom": "{count} degrees of freedom",
"sketch.dof_left": "{count} degrees of freedom left",
"sketch.dof_left_one": "{count} degree of freedom left",
"sketch.draw_curves": "Draw as {linetype}",
"sketch.make_selection": "Convert the selection to {linetype}",
"sketch.open_ends": "Open {count}",
"sketch.untied_ends": "Untied {count}",
"sketch_panel.attached": "Attached to {body} / {path}",
"sketch_panel.author": "Author placement: {path}",
"sketch_panel.dimension_hint": "Enter a value or expression, then press OK.",
"sketch_panel.move_hint": "Enter distances and an angle, then press OK.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "Attached to a flat face of a sheet metal body; it follows that panel when the sheet changes.",
"sketch_panel.text_hint": "Edit the text and its placement, then press OK.",
"sketch_panel.use_plane": "Use {plane} plane",
"sketch_text.align_center": "Center",
"sketch_text.align_left": "Left",
"sketch_text.align_right": "Right",
@@ -1205,6 +1215,7 @@
"ui.combine": "Combine",
"ui.coming_later": "coming later",
"ui.command_done": "{command} done",
"ui.command_palette_hint": "Type a command, e.g. {example} — or press S to search",
"ui.concentric": "Concentric",
"ui.configurations": "Configurations",
"ui.conic_curve": "Conic Curve",
@@ -1475,8 +1486,11 @@
"ui.orbit_around": "Orbit around",
"ui.orientation": "Orientation",
"ui.origin": "Origin",
"ui.palette_construction_mode": "Construction mode (X)",
"ui.palette_more": "More",
"ui.palette_points": "Points",
"ui.palette_profile": "Profile",
"ui.palette_sketch_options": "Sketch options",
"ui.pan": "Pan",
"ui.pan_zoom_orbit": "Pan, zoom, orbit",
"ui.parallel": "Parallel",
+14
View File
@@ -831,8 +831,18 @@
"settings.reset_title": "Se han cambiado los ajustes",
"settings.supersampling_note": "Dibuja la vista a mayor resolución y después la reduce: bordes, líneas y cuadrícula más suaves en pantallas inferiores a 4K. Consume recursos de GPU: unos 2,25× píxeles a 1,5× y 4× a 2×.",
"sketch.degrees_of_freedom": "{count} grados de libertad",
"sketch.dof_left": "Quedan {count} grados de libertad",
"sketch.dof_left_one": "Queda {count} grado de libertad",
"sketch.draw_curves": "Dibujar como {linetype}",
"sketch.make_selection": "Convertir la selección a {linetype}",
"sketch_panel.attached": "Vinculado a {body} / {path}",
"sketch_panel.author": "Ubicación de autoría: {path}",
"sketch_panel.dimension_hint": "Introduzca un valor o una expresión y pulse Aceptar.",
"sketch_panel.move_hint": "Introduzca las distancias y un ángulo y pulse Aceptar.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "Vinculado a una cara plana de un cuerpo de chapa; sigue ese panel cuando cambia la chapa.",
"sketch_panel.text_hint": "Edite el texto y su posición y pulse Aceptar.",
"sketch_panel.use_plane": "Usar plano {plane}",
"sketch_text.align_center": "Centrar",
"sketch_text.align_left": "Alinear a la izquierda",
"sketch_text.align_right": "Alinear a la derecha",
@@ -1092,6 +1102,7 @@
"ui.combine": "Combinar",
"ui.coming_later": "próximamente",
"ui.command_done": "{command} completado",
"ui.command_palette_hint": "Escribe un comando, p. ej., {example}, o pulsa S para buscar",
"ui.concentric": "Concéntrico",
"ui.configurations": "Configuraciones",
"ui.conic_curve": "Curva cónica",
@@ -1352,8 +1363,11 @@
"ui.orbit_around": "Orbitar alrededor de",
"ui.orientation": "Orientación",
"ui.origin": "Origen",
"ui.palette_construction_mode": "Modo de construcción (X)",
"ui.palette_more": "Más",
"ui.palette_points": "Puntos",
"ui.palette_profile": "Perfil",
"ui.palette_sketch_options": "Opciones de croquis",
"ui.pan": "Desplazar",
"ui.pan_zoom_orbit": "Desplazar, zoom y orbitar",
"ui.parallel": "Paralelo",
+14
View File
@@ -845,10 +845,20 @@
"settings.reset_title": "Des réglages ont été modifiés",
"settings.supersampling_note": "Dessine la vue à une résolution plus élevée puis la réduit : arêtes, lignes et grille plus lisses sur les écrans de définition inférieure à la 4K. Cela coûte du temps GPU : environ 2,25× plus de pixels à 1,5× et 4× plus à 2×.",
"sketch.degrees_of_freedom": "{count} degrés de liberté",
"sketch.dof_left": "{count} degrés de liberté restants",
"sketch.dof_left_one": "{count} degré de liberté restant",
"sketch.draw_curves": "Dessiner en {linetype}",
"sketch.make_selection": "Convertir la sélection en {linetype}",
"sketch.open_ends": "{count} ouvertes",
"sketch.untied_ends": "{count} sans coïncidence",
"sketch_panel.attached": "Attaché à {body} / {path}",
"sketch_panel.author": "Placement d’origine : {path}",
"sketch_panel.dimension_hint": "Saisissez une valeur ou une expression, puis appuyez sur OK.",
"sketch_panel.move_hint": "Saisissez les distances et un angle, puis appuyez sur OK.",
"sketch_panel.redefine_title": "{command} : {name}",
"sketch_panel.sheet_attachment": "Attaché à une face plane d’un corps de tôlerie ; suit ce panneau lorsque la tôle change.",
"sketch_panel.text_hint": "Modifiez le texte et son placement, puis appuyez sur OK.",
"sketch_panel.use_plane": "Utiliser le plan {plane}",
"sketch_text.align_center": "Centre",
"sketch_text.align_left": "Gauche",
"sketch_text.align_right": "Droite",
@@ -1143,6 +1153,7 @@
"ui.combine": "Combiner",
"ui.coming_later": "bientôt disponible",
"ui.command_done": "{command} terminé",
"ui.command_palette_hint": "Tapez une commande, ex. {example} — ou S pour chercher",
"ui.concentric": "Concentricité",
"ui.configurations": "Configurations",
"ui.conic_curve": "Courbe conique",
@@ -1411,8 +1422,11 @@
"ui.orbit_around": "Orbite autour de",
"ui.orientation": "Orientation",
"ui.origin": "Origine",
"ui.palette_construction_mode": "Mode construction (X)",
"ui.palette_more": "Plus",
"ui.palette_points": "Points",
"ui.palette_profile": "Profil",
"ui.palette_sketch_options": "Options d’esquisse",
"ui.pan": "Panoramique",
"ui.pan_zoom_orbit": "Panoramique, zoom, orbite",
"ui.parallel": "Parallélisme",
+14
View File
@@ -807,8 +807,18 @@
"settings.reset_title": "Cambiáronse os axustes",
"settings.supersampling_note": "Debuxa a vista a unha resolución maior e fíltraa cara abaixo: arestas, liñas e grella máis suaves en pantallas por debaixo de 4K. Consome tempo de GPU: uns 2,25× píxeles a 1,5× e 4× a 2×.",
"sketch.degrees_of_freedom": "{count} graos de liberdade",
"sketch.dof_left": "Quedan {count} graos de liberdade",
"sketch.dof_left_one": "Queda {count} grao de liberdade",
"sketch.draw_curves": "Debuxar como {linetype}",
"sketch.make_selection": "Converter a selección en {linetype}",
"sketch_panel.attached": "Ligado a {body} / {path}",
"sketch_panel.author": "Localización de autoría: {path}",
"sketch_panel.dimension_hint": "Introduza un valor ou unha expresión e prema Aceptar.",
"sketch_panel.move_hint": "Introduza as distancias e un ángulo e prema Aceptar.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "Ligado a unha cara plana dun corpo de chapa; segue ese panel cando cambia a chapa.",
"sketch_panel.text_hint": "Edite o texto e a súa posición e prema Aceptar.",
"sketch_panel.use_plane": "Usar plano {plane}",
"sketch_text.align_center": "Centro",
"sketch_text.align_left": "Esquerda",
"sketch_text.align_right": "Dereita",
@@ -1064,6 +1074,7 @@
"ui.combine": "Combinar",
"ui.coming_later": "máis adiante",
"ui.command_done": "{command} feito",
"ui.command_palette_hint": "Escribe unha orde, p. ex. {example} — ou preme S para buscar",
"ui.concentric": "Concéntrica",
"ui.configurations": "Configuracións",
"ui.conic_curve": "Curva cónica",
@@ -1319,8 +1330,11 @@
"ui.orbit_around": "Orbitar arredor de",
"ui.orientation": "Orientación",
"ui.origin": "Orixe",
"ui.palette_construction_mode": "Modo de construción (X)",
"ui.palette_more": "Máis",
"ui.palette_points": "Puntos",
"ui.palette_profile": "Perfil",
"ui.palette_sketch_options": "Opcións do esbozo",
"ui.pan": "Desprazar",
"ui.pan_zoom_orbit": "Desprazar, zoom, orbitar",
"ui.parallel": "Paralela",
+14 -1
View File
@@ -168,7 +168,6 @@
"No matching appearances": "Nessun aspetto corrispondente",
"No visible bodies to export.": "Nessun corpo visibile da esportare.",
"None": "Nessuno",
"Normal to sketch": "Normale allo schizzo",
"Not available yet": "Non ancora disponibile",
"Notch": "Intaglio",
"Opacity": "Opacità",
@@ -812,10 +811,20 @@
"settings.reset_title": "Le impostazioni sono state modificate",
"settings.supersampling_note": "Disegna la vista a una risoluzione maggiore e la riduce tramite filtro: spigoli, linee e griglia più uniformi sugli schermi sotto il 4K. Richiede tempo GPU: circa 2.25× i pixel a 1.5× e 4× a 2×.",
"sketch.degrees_of_freedom": "{count} gradi di libertà",
"sketch.dof_left": "{count} gradi di libertà rimanenti",
"sketch.dof_left_one": "{count} grado di libertà rimanente",
"sketch.draw_curves": "Disegna come {linetype}",
"sketch.make_selection": "Converti la selezione in {linetype}",
"sketch.open_ends": "Aperte {count}",
"sketch.untied_ends": "Non vincolate {count}",
"sketch_panel.attached": "Collegato a {body} / {path}",
"sketch_panel.author": "Posizionamento originale: {path}",
"sketch_panel.dimension_hint": "Inserisci un valore o un’espressione, poi premi OK.",
"sketch_panel.move_hint": "Inserisci distanze e angolo, poi premi OK.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "Collegato a una faccia piana di un corpo in lamiera; segue il pannello quando la lamiera cambia.",
"sketch_panel.text_hint": "Modifica il testo e la sua posizione, poi premi OK.",
"sketch_panel.use_plane": "Usa il piano {plane}",
"sketch_text.align_center": "Centro",
"sketch_text.align_left": "Sinistra",
"sketch_text.align_right": "Destra",
@@ -1075,6 +1084,7 @@
"ui.combine": "Combina",
"ui.coming_later": "in arrivo",
"ui.command_done": "{command} completato",
"ui.command_palette_hint": "Digita un comando, ad es. {example} — oppure premi S per cercare",
"ui.concentric": "Concentrico",
"ui.configurations": "Configurazioni",
"ui.conic_curve": "Curva conica",
@@ -1336,8 +1346,11 @@
"ui.orbit_around": "Orbita attorno a",
"ui.orientation": "Orientamento",
"ui.origin": "Origine",
"ui.palette_construction_mode": "Modalità costruzione (X)",
"ui.palette_more": "Altro",
"ui.palette_points": "Punti",
"ui.palette_profile": "Profilo",
"ui.palette_sketch_options": "Opzioni schizzo",
"ui.pan": "Panoramica",
"ui.pan_zoom_orbit": "Panoramica, zoom, orbita",
"ui.parallel": "Parallelo",
+14
View File
@@ -905,10 +905,20 @@
"settings.reset_title": "設定が変更されました",
"settings.supersampling_note": "ビューを高い解像度で描画してから縮小します。4K 未満の画面でエッジ、線、グリッドが滑らかになります。GPU の負荷が増えます(1.5× で約 2.25 倍、2× で 4 倍のピクセル)。",
"sketch.degrees_of_freedom": "自由度 {count}",
"sketch.dof_left": "残り自由度 {count}",
"sketch.dof_left_one": "残り自由度 {count}",
"sketch.draw_curves": "{linetype}として描く",
"sketch.make_selection": "選択を{linetype}にする",
"sketch.open_ends": "開放 {count}",
"sketch.untied_ends": "未拘束 {count}",
"sketch_panel.attached": "接続先: {body} / {path}",
"sketch_panel.author": "作成時の配置: {path}",
"sketch_panel.dimension_hint": "値または式を入力し、OK を押してください。",
"sketch_panel.move_hint": "距離と角度を入力し、OK を押してください。",
"sketch_panel.redefine_title": "{command}:{name}",
"sketch_panel.sheet_attachment": "板金ボディの平面に接続されています。板金が変更されると、そのパネルに追従します。",
"sketch_panel.text_hint": "テキストと配置を編集し、OK を押してください。",
"sketch_panel.use_plane": "{plane} 平面を使用",
"sketch_text.align_center": "中央",
"sketch_text.align_left": "左",
"sketch_text.align_right": "右",
@@ -1205,6 +1215,7 @@
"ui.combine": "結合",
"ui.coming_later": "準備中",
"ui.command_done": "{command} 完了",
"ui.command_palette_hint": "コマンドを入力(例: {example})— または S キーで検索",
"ui.concentric": "同心",
"ui.configurations": "構成",
"ui.conic_curve": "円錐曲線",
@@ -1475,8 +1486,11 @@
"ui.orbit_around": "回転中心",
"ui.orientation": "向き",
"ui.origin": "原点",
"ui.palette_construction_mode": "補助線モード (X)",
"ui.palette_more": "その他",
"ui.palette_points": "点",
"ui.palette_profile": "プロファイル",
"ui.palette_sketch_options": "スケッチオプション",
"ui.pan": "パン",
"ui.pan_zoom_orbit": "パン、ズーム、オービット",
"ui.parallel": "平行",
+14
View File
@@ -623,8 +623,18 @@
"settings.reset_title": "설정이 변경되었습니다",
"settings.supersampling_note": "뷰를 더 높은 해상도로 그린 뒤 축소합니다. 4K 미만 화면에서 모서리, 선, 그리드가 더 매끄러워집니다. GPU 시간이 듭니다: 1.5×에서 약 2.25배, 2×에서 4배의 픽셀.",
"sketch.degrees_of_freedom": "자유도 {count}개",
"sketch.dof_left": "남은 자유도 {count}개",
"sketch.dof_left_one": "남은 자유도 {count}개",
"sketch.draw_curves": "{linetype}(으)로 그리기",
"sketch.make_selection": "선택 항목을 {linetype}(으)로 변경",
"sketch_panel.attached": "부착 대상: {body} / {path}",
"sketch_panel.author": "작성 배치: {path}",
"sketch_panel.dimension_hint": "값이나 수식을 입력한 다음 확인을 누르세요.",
"sketch_panel.move_hint": "거리와 각도를 입력한 다음 확인을 누르세요.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "판금 바디의 평평한 면에 부착되어 있으며 판금이 변경되면 해당 패널을 따릅니다.",
"sketch_panel.text_hint": "텍스트와 배치를 편집한 다음 확인을 누르세요.",
"sketch_panel.use_plane": "{plane} 평면 사용",
"sketch_text.align_center": "가운데",
"sketch_text.align_left": "왼쪽",
"sketch_text.align_right": "오른쪽",
@@ -861,6 +871,7 @@
"ui.combine": "결합",
"ui.coming_later": "추후 지원 예정",
"ui.command_done": "{command} 완료",
"ui.command_palette_hint": "명령 입력(예: {example}) — 또는 S 키를 눌러 검색",
"ui.concentric": "동심",
"ui.configurations": "구성",
"ui.conic_curve": "원뿔 곡선",
@@ -1115,8 +1126,11 @@
"ui.orbit_around": "궤도 회전 기준",
"ui.orientation": "배향",
"ui.origin": "원점",
"ui.palette_construction_mode": "보조선 모드 (X)",
"ui.palette_more": "더 보기",
"ui.palette_points": "점",
"ui.palette_profile": "프로파일",
"ui.palette_sketch_options": "스케치 옵션",
"ui.pan": "이동",
"ui.pan_zoom_orbit": "이동, 확대/축소, 궤도 회전",
"ui.parallel": "평행",
+1
View File
@@ -1060,6 +1060,7 @@
"ui.combine": "Gabung",
"ui.coming_later": "akan datang",
"ui.command_done": "{command} selesai",
"ui.command_palette_hint": "Taip arahan, cth. {example} — atau tekan S untuk mencari",
"ui.concentric": "Sepusat",
"ui.configurations": "Konfigurasi",
"ui.conic_curve": "Lengkung Kon",
+14
View File
@@ -798,10 +798,20 @@
"settings.reset_title": "Zmieniono ustawienia",
"settings.supersampling_note": "Rysuje widok w wyższej rozdzielczości i go zmniejsza: gładsze krawędzie, linie i siatka na ekranach poniżej 4K. Kosztuje czas GPU: ok. 2,25× więcej pikseli przy 1,5× i 4× przy 2×.",
"sketch.degrees_of_freedom": "Stopnie swobody: {count}",
"sketch.dof_left": "Pozostałe stopnie swobody: {count}",
"sketch.dof_left_one": "Pozostał {count} stopień swobody",
"sketch.draw_curves": "Rysuj jako {linetype}",
"sketch.make_selection": "Zamień zaznaczenie na {linetype}",
"sketch.open_ends": "Otwarte: {count}",
"sketch.untied_ends": "Niezwiązane: {count}",
"sketch_panel.attached": "Dołączony do {body} / {path}",
"sketch_panel.author": "Pierwotne położenie: {path}",
"sketch_panel.dimension_hint": "Wprowadź wartość lub wyrażenie, a następnie naciśnij OK.",
"sketch_panel.move_hint": "Wprowadź odległości i kąt, a następnie naciśnij OK.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "Dołączony do płaskiej ściany bryły blaszanej; podąża za tym panelem przy zmianach blachy.",
"sketch_panel.text_hint": "Edytuj tekst i jego położenie, a następnie naciśnij OK.",
"sketch_panel.use_plane": "Użyj płaszczyzny {plane}",
"sketch_text.align_center": "Do środka",
"sketch_text.align_left": "Do lewej",
"sketch_text.align_right": "Do prawej",
@@ -1063,6 +1073,7 @@
"ui.combine": "Kombinacja",
"ui.coming_later": "wkrótce",
"ui.command_done": "Wykonano: {command}",
"ui.command_palette_hint": "Wpisz polecenie, np. {example} — lub naciśnij S, aby wyszukać",
"ui.concentric": "Współśrodkowość",
"ui.configurations": "Konfiguracje",
"ui.conic_curve": "Krzywa stożkowa",
@@ -1324,8 +1335,11 @@
"ui.orbit_around": "Obracaj wokół",
"ui.orientation": "Orientacja",
"ui.origin": "Początek układu",
"ui.palette_construction_mode": "Tryb konstrukcyjny (X)",
"ui.palette_more": "Więcej",
"ui.palette_points": "Punkty",
"ui.palette_profile": "Profil",
"ui.palette_sketch_options": "Opcje szkicu",
"ui.pan": "Przesuwanie",
"ui.pan_zoom_orbit": "Przesuwanie, powiększanie, obracanie",
"ui.parallel": "Równoległość",
+14
View File
@@ -790,8 +790,18 @@
"settings.reset_title": "As configurações foram alteradas",
"settings.supersampling_note": "Desenha a vista em resolução maior e a filtra para baixo: arestas, linhas e grade mais suaves em telas abaixo de 4K. Custa tempo de GPU: cerca de 2,25× os pixels em 1,5× e 4× em 2×.",
"sketch.degrees_of_freedom": "{count} graus de liberdade",
"sketch.dof_left": "{count} graus de liberdade restantes",
"sketch.dof_left_one": "{count} grau de liberdade restante",
"sketch.draw_curves": "Desenhar como {linetype}",
"sketch.make_selection": "Converter a seleção em {linetype}",
"sketch_panel.attached": "Anexado a {body} / {path}",
"sketch_panel.author": "Posicionamento de autoria: {path}",
"sketch_panel.dimension_hint": "Insira um valor ou uma expressão e pressione OK.",
"sketch_panel.move_hint": "Insira as distâncias e um ângulo e pressione OK.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "Anexado a uma face plana de um corpo de chapa; acompanha esse painel quando a chapa muda.",
"sketch_panel.text_hint": "Edite o texto e seu posicionamento e pressione OK.",
"sketch_panel.use_plane": "Usar plano {plane}",
"sketch_text.align_center": "Centro",
"sketch_text.align_left": "Esquerda",
"sketch_text.align_right": "Direita",
@@ -1047,6 +1057,7 @@
"ui.combine": "Combinar",
"ui.coming_later": "em breve",
"ui.command_done": "{command} concluído",
"ui.command_palette_hint": "Digite um comando, p. ex. {example} — ou pressione S para pesquisar",
"ui.concentric": "Concêntrico",
"ui.configurations": "Configurações",
"ui.conic_curve": "Curva cônica",
@@ -1302,8 +1313,11 @@
"ui.orbit_around": "Orbitar em torno de",
"ui.orientation": "Orientação",
"ui.origin": "Origem",
"ui.palette_construction_mode": "Modo de construção (X)",
"ui.palette_more": "Mais",
"ui.palette_points": "Pontos",
"ui.palette_profile": "Perfil",
"ui.palette_sketch_options": "Opções de esboço",
"ui.pan": "Deslocar",
"ui.pan_zoom_orbit": "Deslocar, zoom, orbitar",
"ui.parallel": "Paralelo",
+14
View File
@@ -752,8 +752,18 @@
"settings.reset_intro": "Эти настройки не работают на этом компьютере и могли бы помешать запуску SolidCraft, поэтому они были изменены:",
"settings.reset_title": "Настройки были изменены",
"sketch.degrees_of_freedom": "Степеней свободы: {count}",
"sketch.dof_left": "Осталось степеней свободы: {count}",
"sketch.dof_left_one": "Осталась {count} степень свободы",
"sketch.draw_curves": "Рисовать как {linetype}",
"sketch.make_selection": "Преобразовать выделение в {linetype}",
"sketch_panel.attached": "Привязано к {body} / {path}",
"sketch_panel.author": "Исходное размещение: {path}",
"sketch_panel.dimension_hint": "Введите значение или выражение, затем нажмите OK.",
"sketch_panel.move_hint": "Введите расстояния и угол, затем нажмите OK.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "Привязано к плоской грани листового тела; следует за этой панелью при изменении листа.",
"sketch_panel.text_hint": "Измените текст и его размещение, затем нажмите OK.",
"sketch_panel.use_plane": "Использовать плоскость {plane}",
"sketch_text.align_center": "По центру",
"sketch_text.align_left": "По левому краю",
"sketch_text.align_right": "По правому краю",
@@ -856,6 +866,7 @@
"ui.combine": "Объединение",
"ui.coming_later": "появится позже",
"ui.command_done": "{command} — готово",
"ui.command_palette_hint": "Введите команду, напр. {example} — или нажмите S для поиска",
"ui.concentric": "Концентричность",
"ui.configurations": "Конфигурации",
"ui.conic_curve": "Коническая кривая",
@@ -1110,8 +1121,11 @@
"ui.orbit_around": "Вращать вокруг",
"ui.orientation": "Ориентация",
"ui.origin": "Начало координат",
"ui.palette_construction_mode": "Вспомогательный режим (X)",
"ui.palette_more": "Ещё",
"ui.palette_points": "Точки",
"ui.palette_profile": "Профиль",
"ui.palette_sketch_options": "Параметры эскиза",
"ui.pan": "Панорамирование",
"ui.pan_zoom_orbit": "Панорама, масштаб, орбита",
"ui.parallel": "Параллельность",
+14
View File
@@ -755,8 +755,18 @@
"settings.reset_title": "Ayarlar değiştirildi",
"settings.supersampling_note": "Görünümü daha yüksek çözünürlükte çizer ve küçültür: 4K altındaki ekranlarda kenarlar, çizgiler ve ızgaralar daha pürüzsüz görünür. GPU süresi gerektirir: 1,5× ayarında yaklaşık 2,25 kat, 2× ayarında 4 kat daha fazla piksel işlenir.",
"sketch.degrees_of_freedom": "{count} serbestlik derecesi",
"sketch.dof_left": "Kalan serbestlik derecesi: {count}",
"sketch.dof_left_one": "Kalan serbestlik derecesi: {count}",
"sketch.draw_curves": "{linetype} olarak çiz",
"sketch.make_selection": "Seçimi {linetype} olarak işaretle",
"sketch_panel.attached": "Bağlı olduğu: {body} / {path}",
"sketch_panel.author": "Yazar yerleşimi: {path}",
"sketch_panel.dimension_hint": "Bir değer veya ifade girip Tamam’a basın.",
"sketch_panel.move_hint": "Uzaklıkları ve bir açı girip Tamam’a basın.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "Sac gövdenin düz bir yüzüne bağlıdır; sac değiştiğinde bu paneli izler.",
"sketch_panel.text_hint": "Metni ve yerleşimini düzenleyip Tamam’a basın.",
"sketch_panel.use_plane": "{plane} düzlemini kullan",
"sketch_text.align_center": "Orta",
"sketch_text.align_left": "Sol",
"sketch_text.align_right": "Sağ",
@@ -994,6 +1004,7 @@
"ui.combine": "Birleştir",
"ui.coming_later": "yakında",
"ui.command_done": "{command} tamamlandı",
"ui.command_palette_hint": "Bir komut yazın (ör. {example}) — veya aramak için S tuşuna basın",
"ui.concentric": "Eş merkezli",
"ui.configurations": "Konfigürasyonlar",
"ui.conic_curve": "Konik eğri",
@@ -1247,8 +1258,11 @@
"ui.orbit_around": "Etrafında döndür",
"ui.orientation": "Yönlendirme",
"ui.origin": "Orijin",
"ui.palette_construction_mode": "Yardımcı çizim modu (X)",
"ui.palette_more": "Diğer",
"ui.palette_points": "Noktalar",
"ui.palette_profile": "Profil",
"ui.palette_sketch_options": "Eskiz seçenekleri",
"ui.pan": "Kaydır",
"ui.pan_zoom_orbit": "Kaydır, yakınlaştır, döndür",
"ui.parallel": "Paralel",
+14
View File
@@ -845,10 +845,20 @@
"settings.reset_title": "Налаштування було змінено",
"settings.supersampling_note": "Малює вид у вищій роздільності й потім зменшує його: плавніші ребра, лінії та сітка на екранах до 4K. Це коштує часу GPU: приблизно 2,25× пікселів за 1,5× і 4× за 2×.",
"sketch.degrees_of_freedom": "{count} ступенів вільності",
"sketch.dof_left": "Залишилося ступенів свободи: {count}",
"sketch.dof_left_one": "Залишився {count} ступінь свободи",
"sketch.draw_curves": "Малювати як {linetype}",
"sketch.make_selection": "Перетворити виділене на {linetype}",
"sketch.open_ends": "Відкритих: {count}",
"sketch.untied_ends": "Незв'язаних: {count}",
"sketch_panel.attached": "Прив’язано до {body} / {path}",
"sketch_panel.author": "Початкове розміщення: {path}",
"sketch_panel.dimension_hint": "Введіть значення або вираз, потім натисніть OK.",
"sketch_panel.move_hint": "Введіть відстані та кут, потім натисніть OK.",
"sketch_panel.redefine_title": "{command}: {name}",
"sketch_panel.sheet_attachment": "Прив’язано до плоскої грані листового тіла; слідує за цією панеллю під час зміни листа.",
"sketch_panel.text_hint": "Змініть текст і його розміщення, потім натисніть OK.",
"sketch_panel.use_plane": "Використати площину {plane}",
"sketch_text.align_center": "По центру",
"sketch_text.align_left": "Ліворуч",
"sketch_text.align_right": "Праворуч",
@@ -1143,6 +1153,7 @@
"ui.combine": "Об'єднати",
"ui.coming_later": "з'явиться пізніше",
"ui.command_done": "{command} виконано",
"ui.command_palette_hint": "Введіть команду, напр. {example} — або натисніть S для пошуку",
"ui.concentric": "Концентричність",
"ui.configurations": "Конфігурації",
"ui.conic_curve": "Конічна крива",
@@ -1410,8 +1421,11 @@
"ui.orbit_around": "Обертати навколо",
"ui.orientation": "Орієнтація",
"ui.origin": "Початок координат",
"ui.palette_construction_mode": "Допоміжний режим (X)",
"ui.palette_more": "Більше",
"ui.palette_points": "Точки",
"ui.palette_profile": "Профіль",
"ui.palette_sketch_options": "Параметри ескізу",
"ui.pan": "Панорамувати",
"ui.pan_zoom_orbit": "Панорамування, масштаб, обертання",
"ui.parallel": "Паралельність",
+14
View File
@@ -905,10 +905,20 @@
"settings.reset_title": "设置已更改",
"settings.supersampling_note": "以更高分辨率绘制视图再缩小:在低于 4K 的屏幕上边、线和网格更平滑。会消耗 GPU 时间:1.5× 时约 2.25 倍像素,2× 时 4 倍。",
"sketch.degrees_of_freedom": "{count} 个自由度",
"sketch.dof_left": "剩余 {count} 个自由度",
"sketch.dof_left_one": "剩余 {count} 个自由度",
"sketch.draw_curves": "绘制为 {linetype}",
"sketch.make_selection": "将选择转换为 {linetype}",
"sketch.open_ends": "开放 {count}",
"sketch.untied_ends": "未约束 {count}",
"sketch_panel.attached": "附着到 {body} / {path}",
"sketch_panel.author": "创建时的放置:{path}",
"sketch_panel.dimension_hint": "输入数值或表达式,然后按“确定”。",
"sketch_panel.move_hint": "输入距离和角度,然后按“确定”。",
"sketch_panel.redefine_title": "{command}:{name}",
"sketch_panel.sheet_attachment": "附着到钣金实体的平面上;钣金变化时会跟随该面板。",
"sketch_panel.text_hint": "编辑文字及其位置,然后按“确定”。",
"sketch_panel.use_plane": "使用 {plane} 平面",
"sketch_text.align_center": "居中",
"sketch_text.align_left": "左对齐",
"sketch_text.align_right": "右对齐",
@@ -1205,6 +1215,7 @@
"ui.combine": "组合",
"ui.coming_later": "即将推出",
"ui.command_done": "{command} 完成",
"ui.command_palette_hint": "输入命令,例如 {example} — 或按 S 搜索",
"ui.concentric": "同心",
"ui.configurations": "配置",
"ui.conic_curve": "圆锥曲线",
@@ -1475,8 +1486,11 @@
"ui.orbit_around": "环绕",
"ui.orientation": "定向",
"ui.origin": "原点",
"ui.palette_construction_mode": "构造模式 (X)",
"ui.palette_more": "更多",
"ui.palette_points": "点",
"ui.palette_profile": "轮廓",
"ui.palette_sketch_options": "草图选项",
"ui.pan": "平移",
"ui.pan_zoom_orbit": "平移、缩放、环绕",
"ui.parallel": "平行",
+76
View File
@@ -31,6 +31,35 @@ impl Tokens {
font_label: 12.5,
font_button: 13.0,
font_heading: 14.0,
font_triad: 8.0,
font_compass: 13.5,
font_subtitle: 15.0,
font_intro: 16.0,
font_article_heading: 17.0,
font_title: 22.0,
font_display: 26.0,
control_height: 24.0,
control_radius: 5,
form_label_width: 70.0,
form_gap_y: 5.0,
form_footer_height: 38.0,
form_header_height: 30.0,
form_card_width: 264.0,
form_icon_size: 18.0,
form_close_size: 22.0,
form_inset: 7.0,
form_icon_inset: 4.5,
form_section_icon_size: 11.0,
form_checkbox_height: 22.0,
form_button_height: 26.0,
sketch_palette_width: 232.0,
sketch_mode_size: 36.0,
sketch_mode_radius: 7,
sketch_mode_border: 1.5,
sketch_palette_alpha: 0.96,
sketch_mode_tint: 0.12,
sketch_footer_icon_size: 15.0,
font_section_tracking: 0.04,
app_bar: Color32::from_rgb(52, 56, 64),
app_bar_separator: Color32::from_rgb(136, 145, 160),
toolbar: Color32::from_rgb(246, 247, 249),
@@ -117,6 +146,14 @@ impl Tokens {
app_bar_hover_button: Color32::from_rgba_unmultiplied_const(255, 255, 255, 30),
app_bar_hover_strong: Color32::from_rgba_unmultiplied_const(255, 255, 255, 40),
app_bar_tab_active: Color32::from_rgb(53, 59, 71),
dialog_body: Color32::from_rgb(255, 255, 255),
dialog_footer: Color32::from_rgb(246, 248, 250),
dialog_rule: Color32::from_rgb(230, 234, 240),
control_fill: Color32::from_rgb(255, 255, 255),
control_border: Color32::from_rgb(195, 203, 214),
dialog_label: Color32::from_rgb(58, 70, 86),
selected_ink: Color32::from_rgb(26, 80, 127),
selected_bg: Color32::from_rgb(227, 240, 251),
timeline_item: Color32::WHITE,
timeline_item_error: Color32::from_rgb(250, 220, 220),
timeline_marker: Color32::from_rgb(70, 76, 88),
@@ -170,6 +207,36 @@ impl Tokens {
}
pub const fn dark() -> Tokens {
let mut t = Tokens::light();
// Shared typography and dense form dimensions stay identical in both palettes.
t.font_triad = 8.0;
t.font_compass = 13.5;
t.font_subtitle = 15.0;
t.font_intro = 16.0;
t.font_article_heading = 17.0;
t.font_title = 22.0;
t.font_display = 26.0;
t.control_height = 24.0;
t.control_radius = 5;
t.form_label_width = 70.0;
t.form_gap_y = 5.0;
t.form_footer_height = 38.0;
t.form_header_height = 30.0;
t.form_card_width = 264.0;
t.form_icon_size = 18.0;
t.form_close_size = 22.0;
t.form_inset = 7.0;
t.form_icon_inset = 4.5;
t.form_section_icon_size = 11.0;
t.form_checkbox_height = 22.0;
t.form_button_height = 26.0;
t.sketch_palette_width = 232.0;
t.sketch_mode_size = 36.0;
t.sketch_mode_radius = 7;
t.sketch_mode_border = 1.5;
t.sketch_palette_alpha = 0.96;
t.sketch_mode_tint = 0.12;
t.sketch_footer_icon_size = 15.0;
t.font_section_tracking = 0.04;
t.app_bar = Color32::from_rgb(28, 31, 38);
t.toolbar = Color32::from_rgb(39, 43, 52);
t.panel = Color32::from_rgb(39, 43, 52);
@@ -184,6 +251,14 @@ impl Tokens {
t.mesh_accent = Color32::from_rgb(133, 113, 0);
t.form_accent = Color32::from_rgb(123, 99, 166);
t.render_accent = Color32::from_rgb(224, 116, 174);
t.dialog_body = Color32::from_rgb(59, 68, 83);
t.dialog_footer = Color32::from_rgb(47, 52, 62);
t.dialog_rule = Color32::from_rgb(53, 59, 71);
t.control_fill = Color32::from_rgb(39, 43, 52);
t.control_border = Color32::from_rgb(74, 82, 98);
t.dialog_label = Color32::from_rgb(180, 187, 200);
t.selected_ink = Color32::from_rgb(156, 199, 245);
t.selected_bg = Color32::from_rgb(42, 70, 110);
t.construction_geom = icon_primary(crate::icon_svg::CONSTRUCTION_PRIMARY[1]);
t.error = Color32::from_rgb(240, 100, 96);
t.warning = Color32::from_rgb(236, 170, 70);
@@ -249,6 +324,7 @@ impl Tokens {
t.icons.axes[1] = t.triad[1];
t.icons.access = [good, Color32::from_rgb(217, 102, 13)];
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]);
t.icons.draft = [good, Color32::from_rgb(242, 230, 153)];
t.surface_accent = if dark { Color32::from_rgb(200, 135, 55) } else { Color32::from_rgb(164, 80, 0) };
t.mesh_accent = if dark { Color32::from_rgb(190, 175, 70) } else { Color32::from_rgb(130, 103, 0) };
+4
View File
@@ -36,6 +36,10 @@ tiny-skia = { workspace = true }
# updated by its installer (MIT; already in the tree as a build dependency).
winreg = "0.56"
[dev-dependencies]
# Parse the source guard structurally, including code after inline test modules.
syn = { workspace = true, features = ["visit"] }
# Pictures pasted into the agent chat; already in the tree, with the same features, through
# egui-winit's clipboard.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
+1
View File
@@ -132,6 +132,7 @@ fn icon_data() -> Result<(), String> {
("CONSTRUCTION_PRIMARY", palette.get("accents").and_then(|v| v.get("construction"))),
("SKETCH_RED_GREEN", palette.get("variants").and_then(|v| v.get("red-green")).and_then(|v| v.get("sketch"))),
("CONSTRUCTION_RED_GREEN", palette.get("variants").and_then(|v| v.get("red-green")).and_then(|v| v.get("construction"))),
("CONSTRAINT_RED_GREEN", palette.get("variants").and_then(|v| v.get("red-green")).and_then(|v| v.get("constraint"))),
("CONSTRUCTION_BLUE_YELLOW", palette.get("variants").and_then(|v| v.get("blue-yellow")).and_then(|v| v.get("construction"))),
("CONSTRAINT_BLUE_YELLOW", palette.get("variants").and_then(|v| v.get("blue-yellow")).and_then(|v| v.get("constraint"))),
] {
+18 -10
View File
@@ -5,6 +5,7 @@
//! so the parsed blocks are kept per conversation item and parsed again only when its text
//! changes.
use crate::fonts::RichTextExt as _;
use std::hash::{Hash, Hasher};
use std::sync::Arc;
@@ -41,9 +42,11 @@ fn job(ui: &egui::Ui, spans: &[Span], size: f32, color: Color32) -> LayoutJob {
let plain = TextFormat { font_id: base.clone(), color, ..Default::default() };
match s {
Span::Text(x) => j.append(x, 0.0, plain),
Span::Bold(x) => j.append(x, 0.0, TextFormat { color: t.text, ..plain }),
Span::Bold(x) => j.append(x, 0.0, TextFormat { font_id: crate::fonts::semibold(size), color: t.text, ..plain }),
Span::Italic(x) => j.append(x, 0.0, TextFormat { italics: true, ..plain }),
Span::Code(x) => j.append(x, 0.0, TextFormat { font_id: FontId::monospace(size - 1.0), background: t.field, ..plain }),
Span::Code(x) => {
j.append(x, 0.0, TextFormat { font_id: FontId::monospace(size - (t.font_button - t.font_body)), background: t.field, ..plain })
}
Span::Link { label, .. } => j.append(label, 0.0, TextFormat { color: t.accent, underline: Stroke::new(1.0, t.accent), ..plain }),
}
}
@@ -58,6 +61,7 @@ fn host(url: &str) -> &str {
/// A paragraph's text, then its links as buttons (a laid-out text cannot be clicked in parts).
fn spans(ui: &mut egui::Ui, spans: &[Span], size: f32, color: Color32) {
let t = Tokens::get();
ui.add(egui::Label::new(job(ui, spans, size, color)).selectable(true).wrap());
let links: Vec<(&str, &str)> =
spans.iter().filter_map(|s| if let Span::Link { label, url } = s { Some((label.as_str(), url.as_str())) } else { None }).collect();
@@ -66,7 +70,7 @@ fn spans(ui: &mut egui::Ui, spans: &[Span], size: f32, color: Color32) {
for (label, url) in links {
// The text above already shows the label; the button says where it goes.
let to = format!("↗ {}", host(url));
ui.hyperlink_to(RichText::new(to).size(size - 1.0), url).on_hover_text(format!("{label}: {url}"));
ui.hyperlink_to(RichText::new(to).size(size - (t.font_button - t.font_body)), url).on_hover_text(format!("{label}: {url}"));
}
});
}
@@ -75,24 +79,28 @@ fn spans(ui: &mut egui::Ui, spans: &[Span], size: f32, color: Color32) {
/// Draw `src` as Markdown. `slot`: the conversation item it belongs to.
pub fn show(ui: &mut egui::Ui, slot: usize, src: &str) {
let t = Tokens::get();
let size = 13.0;
let size = t.font_button;
let parsed = blocks(ui.ctx(), slot, src);
for block in parsed.iter() {
match block {
Block::Paragraph(s) => spans(ui, s, size, t.text),
Block::Heading { level, spans: s } => {
let size = match level {
1 => 17.0,
2 => 15.0,
_ => 14.0,
1 => t.font_article_heading,
2 => t.font_subtitle,
_ => t.font_heading,
};
ui.add_space(4.0);
ui.add(egui::Label::new(RichText::new(markdown::plain(s)).size(size).strong().color(t.text)).selectable(true).wrap());
ui.add(egui::Label::new(RichText::new(markdown::plain(s)).size(size).semibold().color(t.text)).selectable(true).wrap());
}
Block::Code { text, .. } => {
egui::Frame::NONE.fill(t.field).corner_radius(4.0).inner_margin(Margin::same(6)).show(ui, |ui| {
ui.set_width(ui.available_width());
ui.add(egui::Label::new(RichText::new(text).monospace().size(size - 1.0).color(t.text)).selectable(true).wrap());
ui.add(
egui::Label::new(RichText::new(text).monospace().size(size - (t.font_button - t.font_body)).color(t.text))
.selectable(true)
.wrap(),
);
if ui.small_button(tr("ui.agent_chat_copy")).clicked() {
ui.ctx().copy_text(text.clone());
}
@@ -116,7 +124,7 @@ pub fn show(ui: &mut egui::Ui, slot: usize, src: &str) {
}
Block::Pre(text) => {
egui::ScrollArea::horizontal().id_salt(("agent_chat_pre", slot, text.len())).show(ui, |ui| {
ui.add(egui::Label::new(RichText::new(text).monospace().size(size - 2.0).color(t.text)).selectable(true));
ui.add(egui::Label::new(RichText::new(text).monospace().size(t.font_small).color(t.text)).selectable(true));
});
}
Block::Rule => {
+99 -60
View File
@@ -2,6 +2,7 @@
//! or in Preferences), resizable, folded to a thin strip with Minimise, closed with ×. Its side,
//! width and fold are preferences, so they come back next time.
use crate::fonts::RichTextExt as _;
use egui::{Align, Align2, Color32, Id, Layout, Rect, RichText, Sense, Stroke, pos2, vec2};
use super::*;
@@ -134,13 +135,13 @@ fn picture_strip(ui: &mut egui::Ui, n: usize, pictures: &[Picture]) -> Option<us
Shown::Ready(texture) => texture,
// Being decoded: a spinner the size of a thumbnail's corner, until it is in.
Shown::Loading => {
ui.add(egui::Spinner::new().size(THUMB_MAX.1 / 2.0));
ui.add(egui::Spinner::new().size(t.space_24));
continue;
}
// Not a readable picture: its name, or the plain caption.
Shown::Failed => {
let caption = if picture.note.is_empty() { tr("ui.agent_chat_view_attached").to_string() } else { picture.note.clone() };
ui.label(RichText::new(caption).color(t.text_dim).size(11.0));
ui.label(RichText::new(caption).color(t.text_dim).size(t.font_small));
continue;
}
};
@@ -203,7 +204,7 @@ fn gallery_window(app: &mut SolveApp, ctx: &egui::Context) {
crate::scenario::publish_rect("agent_chat:gallery_picture", resp.rect);
}
Shown::Loading => {
ui.add(egui::Spinner::new().size(32.0));
ui.add(egui::Spinner::new().size(t.space_24));
}
Shown::Failed => {
ui.label(RichText::new(tr("ui.agent_chat_view_attached")).color(t.text_dim));
@@ -242,7 +243,7 @@ fn drop_hint(ctx: &egui::Context, area: Rect) {
let painter = ctx.layer_painter(egui::LayerId::new(egui::Order::Foreground, Id::new("sc_agent_chat_drop_hint")));
let zone = area.shrink(6.0);
painter.rect(zone, 10.0, t.accent.gamma_multiply(0.16), Stroke::new(2.0, t.accent), egui::StrokeKind::Inside);
let font = egui::FontId::proportional(14.0);
let font = egui::FontId::proportional(Tokens::get().font_heading);
let text = painter.layout(tr("ui.agent_chat_drop_hint").to_string(), font, t.text, (zone.width() - 24.0).max(40.0));
let at = zone.center() - text.size() / 2.0;
painter.galley(at, text, t.text);
@@ -422,7 +423,13 @@ fn strip(app: &mut SolveApp, ui: &mut egui::Ui) {
if waiting > 0 {
let at = button.right_top() + vec2(-3.0, 3.0);
ui.painter().circle_filled(at, 6.5, t.warning);
ui.painter().text(at, Align2::CENTER_CENTER, waiting.min(9).to_string(), egui::FontId::proportional(9.5), t.panel);
ui.painter().text(
at,
Align2::CENTER_CENTER,
waiting.min(9).to_string(),
egui::FontId::proportional(crate::theme::Tokens::get().font_badge),
t.panel,
);
}
ui.painter().line_segment(
if app.preferences.agent_chat_side == "left" { [r.right_top(), r.right_bottom()] } else { [r.left_top(), r.left_bottom()] },
@@ -451,7 +458,9 @@ fn header(app: &mut SolveApp, ui: &mut egui::Ui, left: bool) {
}
}
}
let l = ui.label(RichText::new(tr("ui.agent_chat")).strong().size(14.0));
let l = ui.label(
RichText::new(tr("ui.agent_chat")).semibold().color(crate::theme::Tokens::get().text).size(crate::theme::Tokens::get().font_heading),
);
grip.union(l.rect)
};
let mut s = state.label().to_string();
@@ -539,7 +548,7 @@ fn dock_drag(app: &mut SolveApp, ui: &egui::Ui, drag: &egui::Response, left: boo
zone.center(),
Align2::CENTER_CENTER,
tr(if to_left { "ui.agent_chat_dock_left" } else { "ui.agent_chat_dock_right" }),
egui::FontId::proportional(14.0),
egui::FontId::proportional(crate::theme::Tokens::get().font_heading),
t.text,
);
}
@@ -693,7 +702,7 @@ pub(super) fn login_chip(ui: &mut egui::Ui, login: &str) {
_ => return,
};
egui::Frame::NONE.stroke(Stroke::new(1.0, color)).corner_radius(8.0).inner_margin(egui::Margin::symmetric(6, 1)).show(ui, |ui| {
ui.label(RichText::new(text).color(color).size(11.0));
ui.label(RichText::new(text).color(color).size(crate::theme::Tokens::get().font_small));
});
}
@@ -736,29 +745,32 @@ fn switcher(app: &mut SolveApp, ui: &mut egui::Ui) {
(ui.available_width() - if app.agent_chat.modes.is_empty() { 4.0 } else { 116.0 } - if models { 146.0 } else { 0.0 }).clamp(90.0, 260.0);
let mut picked: Option<String> = None;
let mut add = false;
let combo = egui::ComboBox::from_id_salt("sc_agent_switch").width(w).selected_text(RichText::new(label).strong()).show_ui(ui, |ui| {
for e in &all {
let sel = current.as_ref().is_some_and(|c| c.id == e.id);
let r = ui.horizontal(|ui| {
kind_icon(ui, e.kind);
let r = ui.selectable_label(sel, &e.name);
ui.label(RichText::new(e.detail()).color(t.text_dim).size(11.0));
login_chip(ui, e.login);
r
});
crate::scenario::publish_handle(&format!("agent_chat:agent:{}", e.id), r.inner.rect.center());
if r.inner.clicked() {
picked = Some(e.id.clone());
let combo = egui::ComboBox::from_id_salt("sc_agent_switch")
.width(w)
.selected_text(RichText::new(label).semibold().color(crate::theme::Tokens::get().text))
.show_ui(ui, |ui| {
for e in &all {
let sel = current.as_ref().is_some_and(|c| c.id == e.id);
let r = ui.horizontal(|ui| {
kind_icon(ui, e.kind);
let r = ui.selectable_label(sel, &e.name);
ui.label(RichText::new(e.detail()).color(t.text_dim).size(crate::theme::Tokens::get().font_small));
login_chip(ui, e.login);
r
});
crate::scenario::publish_handle(&format!("agent_chat:agent:{}", e.id), r.inner.rect.center());
if r.inner.clicked() {
picked = Some(e.id.clone());
}
}
}
ui.separator();
if ui.selectable_label(false, tr("ui.ai_add_agent")).clicked() {
add = true;
}
if ui.selectable_label(false, tr("ui.ai_settings")).clicked() {
crate::prefs::open_at(app, crate::prefs::PAGE_AI);
}
});
ui.separator();
if ui.selectable_label(false, tr("ui.ai_add_agent")).clicked() {
add = true;
}
if ui.selectable_label(false, tr("ui.ai_settings")).clicked() {
crate::prefs::open_at(app, crate::prefs::PAGE_AI);
}
});
crate::scenario::publish_handle("agent_chat:switcher", combo.response.rect.center());
combo.response.on_hover_text(tr("ui.ai_switch_tip"));
if add {
@@ -811,7 +823,7 @@ fn switcher(app: &mut SolveApp, ui: &mut egui::Ui) {
}
});
if let Some(a) = &app.agent_chat.auth_status {
ui.label(RichText::new(a).color(t.text_dim).size(11.0));
ui.label(RichText::new(a).color(t.text_dim).size(crate::theme::Tokens::get().font_small));
}
}
@@ -826,7 +838,7 @@ fn picker(app: &mut SolveApp, ui: &mut egui::Ui) {
let all = agents::entries(app);
let current = agents::current(app);
ui.horizontal(|ui| {
ui.label(RichText::new(tr("ui.agent_chat_pick")).strong());
ui.label(RichText::new(tr("ui.agent_chat_pick")).semibold().color(crate::theme::Tokens::get().text));
ui.with_layout(Layout::right_to_left(Align::Center), |ui| {
let refreshing = app.agent_chat.detecting.is_some();
if ui.add_enabled(!refreshing, egui::Button::new(tr("ui.agent_chat_refresh")).small()).clicked() {
@@ -847,8 +859,8 @@ fn picker(app: &mut SolveApp, ui: &mut egui::Ui) {
ui.set_width(ui.available_width());
ui.horizontal(|ui| {
kind_icon(ui, e.kind);
ui.label(RichText::new(&e.name).strong().color(t.text));
ui.label(RichText::new(e.detail()).color(t.text_dim).size(11.0));
ui.label(RichText::new(&e.name).semibold().color(t.text));
ui.label(RichText::new(e.detail()).color(t.text_dim).size(crate::theme::Tokens::get().font_small));
ui.with_layout(Layout::right_to_left(Align::Center), |ui| login_chip(ui, e.login));
});
});
@@ -866,12 +878,16 @@ fn picker(app: &mut SolveApp, ui: &mut egui::Ui) {
|ui| {
for m in missing {
ui.horizontal(|ui| {
ui.label(RichText::new(m.name).strong());
ui.label(RichText::new(m.name).semibold().color(crate::theme::Tokens::get().text));
if ui.small_button(tr("ui.agent_chat_copy")).on_hover_text(m.install).clicked() {
ui.ctx().copy_text(m.install.to_string());
}
});
ui.add(egui::Label::new(RichText::new(m.install).monospace().size(11.0).color(t.text_dim)).selectable(true).wrap());
ui.add(
egui::Label::new(RichText::new(m.install).monospace().size(crate::theme::Tokens::get().font_small).color(t.text_dim))
.selectable(true)
.wrap(),
);
}
},
);
@@ -883,7 +899,7 @@ fn auth_box(app: &mut SolveApp, ui: &mut egui::Ui) {
let t = Tokens::get();
egui::Frame::group(ui.style()).stroke(Stroke::new(1.0, t.warning)).show(ui, |ui| {
ui.set_width(ui.available_width());
ui.label(RichText::new(tr("ui.agent_chat_auth_title")).strong());
ui.label(RichText::new(tr("ui.agent_chat_auth_title")).semibold().color(crate::theme::Tokens::get().text));
ui.label(RichText::new(tr("ui.agent_chat_auth_needed")).color(t.text_dim));
let methods = app.agent_chat.auth.clone();
let base = app.agent_chat.argv.iter().map(|a| quote(a)).collect::<Vec<_>>().join(" ");
@@ -893,14 +909,22 @@ fn auth_box(app: &mut SolveApp, ui: &mut egui::Ui) {
for m in methods {
ui.add_space(4.0);
let desc = m.description.trim();
ui.label(RichText::new(if desc.is_empty() || desc == m.name { m.name.clone() } else { format!("{} — {desc}", m.name) }).strong());
ui.label(
RichText::new(if desc.is_empty() || desc == m.name { m.name.clone() } else { format!("{} — {desc}", m.name) })
.semibold()
.color(crate::theme::Tokens::get().text),
);
match &m.kind {
acp::AuthKind::Terminal { args, .. } => {
ui.label(tr("ui.agent_chat_auth_terminal"));
let cmd = format!("{base} {}", args.iter().map(|a| quote(a)).collect::<Vec<_>>().join(" "));
ui.horizontal_wrapped(|ui| {
egui::Frame::NONE.fill(t.toolbar).corner_radius(4.0).inner_margin(egui::Margin::symmetric(6, 3)).show(ui, |ui| {
ui.add(egui::Label::new(RichText::new(&cmd).monospace().size(11.0)).selectable(true).wrap());
ui.add(
egui::Label::new(RichText::new(&cmd).monospace().size(crate::theme::Tokens::get().font_small))
.selectable(true)
.wrap(),
);
});
if ui.small_button(tr("ui.agent_chat_copy")).clicked() {
ui.ctx().copy_text(cmd.clone());
@@ -950,7 +974,7 @@ fn conversation(app: &mut SolveApp, ui: &mut egui::Ui) {
}
} else if *image {
// Taken when the agent starts on the message: nothing to show yet.
ui.label(RichText::new(tr("ui.agent_chat_view_attached")).color(t.text_dim).size(11.0));
ui.label(RichText::new(tr("ui.agent_chat_view_attached")).color(t.text_dim).size(t.font_small));
}
files_line(ui, files.iter().map(String::as_str));
});
@@ -981,7 +1005,7 @@ fn conversation(app: &mut SolveApp, ui: &mut egui::Ui) {
Item::Permission { title, options, answer: given, .. } => {
egui::Frame::group(ui.style()).stroke(Stroke::new(1.0, t.accent)).show(ui, |ui| {
ui.set_width(ui.available_width());
ui.label(RichText::new(trf("ui.agent_chat_permission", &[("title", title)])).strong());
ui.label(RichText::new(trf("ui.agent_chat_permission", &[("title", title)])).semibold().color(crate::theme::Tokens::get().text));
match given {
Some(a) => {
ui.label(RichText::new(trf("ui.agent_chat_answered", &[("option", a)])).color(t.text_dim));
@@ -1005,8 +1029,8 @@ fn conversation(app: &mut SolveApp, ui: &mut egui::Ui) {
Item::Approval { id, title, tool, answer: given } => {
egui::Frame::group(ui.style()).stroke(Stroke::new(1.5, t.warning)).show(ui, |ui| {
ui.set_width(ui.available_width());
ui.label(RichText::new(tr("ui.agent_chat_approval")).strong());
ui.add(egui::Label::new(RichText::new(title).monospace().size(11.5)).selectable(true).wrap());
ui.label(RichText::new(tr("ui.agent_chat_approval")).semibold().color(crate::theme::Tokens::get().text));
ui.add(egui::Label::new(RichText::new(title).monospace().size(crate::theme::Tokens::get().font_caption)).selectable(true).wrap());
match given {
Some(true) => {
ui.label(RichText::new(tr("ui.agent_chat_allowed")).color(t.text_dim));
@@ -1039,9 +1063,9 @@ fn conversation(app: &mut SolveApp, ui: &mut egui::Ui) {
Item::Changes { steps, doc, undone } => {
ui.horizontal(|ui| {
let text = trf("ui.agent_chat_changes", &[("n", &steps.to_string())]);
ui.label(RichText::new(text).color(t.text_dim).size(11.5));
ui.label(RichText::new(text).color(t.text_dim).size(crate::theme::Tokens::get().font_caption));
if *undone {
ui.label(RichText::new(tr("ui.agent_chat_undone")).color(t.text_dim).size(11.5));
ui.label(RichText::new(tr("ui.agent_chat_undone")).color(t.text_dim).size(crate::theme::Tokens::get().font_caption));
} else if Arc::ptr_eq(doc, &current_doc) {
let b = ui.button(tr("ui.agent_chat_undo_changes")).on_hover_text(tr("ui.ai_undo_tip"));
crate::scenario::publish_handle("agent_chat:undo", b.rect.center());
@@ -1071,15 +1095,19 @@ fn conversation(app: &mut SolveApp, ui: &mut egui::Ui) {
ui.set_width(ui.available_width());
ui.horizontal(|ui| {
let tag = if stopped && !busy { "ui.agent_chat_queued_stopped" } else { "ui.agent_chat_queued" };
ui.label(RichText::new(tr(tag)).color(t.accent).strong().size(11.0));
ui.label(RichText::new(tr(tag)).color(t.accent).semibold().size(crate::theme::Tokens::get().font_small));
ui.with_layout(Layout::right_to_left(Align::Center), |ui| {
let x = ui.add(egui::Button::new(RichText::new("×").size(14.0)).frame(false)).on_hover_text(tr("ui.agent_chat_remove"));
let x = ui
.add(egui::Button::new(RichText::new("×").size(crate::theme::Tokens::get().font_heading)).frame(false))
.on_hover_text(tr("ui.agent_chat_remove"));
crate::scenario::publish_handle(&format!("agent_chat:pending_remove:{n}"), x.rect.center());
if x.clicked() {
remove = Some(n);
}
if editing.as_ref().is_none_or(|(i, _)| *i != n) {
let e = ui.add(egui::Button::new(RichText::new(tr("ui.agent_chat_edit")).size(11.5)).frame(false));
let e = ui.add(
egui::Button::new(RichText::new(tr("ui.agent_chat_edit")).size(crate::theme::Tokens::get().font_caption)).frame(false),
);
crate::scenario::publish_handle(&format!("agent_chat:pending_edit:{n}"), e.rect.center());
if e.clicked() {
start_edit = Some((n, p.text.clone()));
@@ -1105,7 +1133,7 @@ fn conversation(app: &mut SolveApp, ui: &mut egui::Ui) {
ui.add(egui::Label::new(RichText::new(&p.text).color(t.text)).selectable(true).wrap());
}
if p.image {
ui.label(RichText::new(tr("ui.agent_chat_view_attached")).color(t.text_dim).size(11.0));
ui.label(RichText::new(tr("ui.agent_chat_view_attached")).color(t.text_dim).size(crate::theme::Tokens::get().font_small));
}
files_line(ui, p.files.iter().map(|f| f.name.as_str()));
}
@@ -1134,7 +1162,7 @@ fn conversation(app: &mut SolveApp, ui: &mut egui::Ui) {
ui.add_space(12.0);
ui.label(RichText::new(tr("ui.agent_chat_intro")).color(t.text_dim));
ui.add_space(6.0);
ui.label(RichText::new(tr("ui.agent_chat_privacy")).color(t.text_dim).size(11.0));
ui.label(RichText::new(tr("ui.agent_chat_privacy")).color(t.text_dim).size(crate::theme::Tokens::get().font_small));
}
if let Some((n, text)) = edit_done {
if let (Some(text), Some(p)) = (text.filter(|t| !t.trim().is_empty()), app.agent_chat.pending.get_mut(n)) {
@@ -1173,7 +1201,7 @@ fn files_line<'a>(ui: &mut egui::Ui, names: impl Iterator<Item = &'a str>) {
let list = names.collect::<Vec<_>>().join(", ");
if !list.is_empty() {
let t = Tokens::get();
ui.add(egui::Label::new(RichText::new(trf("ui.agent_chat_files", &[("files", &list)])).color(t.text_dim).size(11.0)).wrap());
ui.add(egui::Label::new(RichText::new(trf("ui.agent_chat_files", &[("files", &list)])).color(t.text_dim).size(t.font_small)).wrap());
}
}
@@ -1248,11 +1276,11 @@ fn loading_chip(ui: &mut egui::Ui, name: &str, importing: bool, i: usize, w: f32
ui.horizontal(|ui| {
ui.spacing_mut().item_spacing.x = 4.0;
let doing = tr(if importing { "ui.agent_chat_file_importing" } else { "ui.agent_chat_file_loading" });
let mark = ui.add(egui::Spinner::new().size(16.0)).on_hover_text(doing).rect.width();
let mark = ui.add(egui::Spinner::new().size(t.form_icon_size)).on_hover_text(doing).rect.width();
let name_w = (inner - mark - 18.0 - 8.0).max(8.0);
ui.allocate_ui(vec2(name_w, 20.0), |ui| {
ui.set_width(name_w);
ui.add(egui::Label::new(RichText::new(name).size(11.5).color(t.text_dim)).truncate())
ui.add(egui::Label::new(RichText::new(name).size(t.font_small).color(t.text_dim)).truncate())
})
.inner
.on_hover_text(name);
@@ -1295,14 +1323,20 @@ fn chip(ui: &mut egui::Ui, thumbs: &mut std::collections::HashMap<u64, egui::Tex
let (r, _) = ui.allocate_exact_size(vec2(28.0, 20.0), Sense::hover());
let color = if matches!(f.content, attach::Content::Pdf { .. }) { t.error } else { t.text_dim };
ui.painter().rect_stroke(r.shrink2(vec2(1.0, 1.0)), 2.0, Stroke::new(1.2, color), egui::StrokeKind::Inside);
ui.painter().text(r.center(), Align2::CENTER_CENTER, f.mark(), egui::FontId::proportional(8.5), color);
ui.painter().text(
r.center(),
Align2::CENTER_CENTER,
f.mark(),
egui::FontId::proportional(crate::theme::Tokens::get().font_micro),
color,
);
r.width()
}
};
let name_w = (inner - mark - 18.0 - 8.0).max(8.0);
ui.allocate_ui(vec2(name_w, 20.0), |ui| {
ui.set_width(name_w);
ui.add(egui::Label::new(RichText::new(&f.name).size(11.5)).truncate())
ui.add(egui::Label::new(RichText::new(&f.name).size(t.font_small)).truncate())
})
.inner
.on_hover_text(&f.name);
@@ -1325,8 +1359,9 @@ fn chip(ui: &mut egui::Ui, thumbs: &mut std::collections::HashMap<u64, egui::Tex
/// the clipboard's picture.
#[cfg(not(target_arch = "wasm32"))]
fn add_menu(app: &mut SolveApp, ui: &mut egui::Ui) {
let t = Tokens::get();
let (mut choose, mut paste) = (false, false);
let r = ui.menu_button(RichText::new("+").strong().size(15.0), |ui| {
let r = ui.menu_button(RichText::new("+").semibold().size(t.font_heading), |ui| {
let a = ui.button(tr("ui.agent_chat_add_file"));
crate::scenario::publish_handle("agent_chat:add_file", a.rect.center());
let b = ui.button(tr("ui.agent_chat_paste_picture"));
@@ -1376,12 +1411,16 @@ fn tool_card(ui: &mut egui::Ui, n: usize, title: &str, kind: &str, status: Optio
status_dot(ui, color, filled);
// The state and kind keep their room at the right; the title is cut short before them.
ui.with_layout(Layout::right_to_left(Align::Center), |ui| {
ui.label(RichText::new(tr(state)).size(10.5).color(color));
ui.label(RichText::new(tr(state)).size(crate::theme::Tokens::get().font_panel).color(color));
if !kind.is_empty() && kind != "other" {
ui.label(RichText::new(kind).size(10.5).color(t.text_dim));
ui.label(RichText::new(kind).size(crate::theme::Tokens::get().font_panel).color(t.text_dim));
}
ui.with_layout(Layout::left_to_right(Align::Center), |ui| {
ui.add(egui::Label::new(RichText::new(title).monospace().size(11.5).color(t.text)).truncate()).on_hover_text(title);
ui.add(
egui::Label::new(RichText::new(title).monospace().size(crate::theme::Tokens::get().font_caption).color(t.text))
.truncate(),
)
.on_hover_text(title);
});
});
});
@@ -1397,7 +1436,7 @@ fn tool_card(ui: &mut egui::Ui, n: usize, title: &str, kind: &str, status: Optio
if let Some(o) = output {
ui.separator();
egui::ScrollArea::vertical().id_salt(("sc_agent_tool_out", n)).max_height(180.0).show(ui, |ui| {
ui.add(egui::Label::new(RichText::new(o).monospace().size(11.0)).selectable(true).wrap());
ui.add(egui::Label::new(RichText::new(o).monospace().size(crate::theme::Tokens::get().font_small)).selectable(true).wrap());
});
}
});
+26 -14
View File
@@ -3,6 +3,7 @@
//! and the panel. Plus the Add agent dialog: an installed ACP agent, a custom command, or an
//! OpenAI-compatible endpoint (whose key goes to the system keychain).
use crate::fonts::RichTextExt as _;
use egui::{RichText, Stroke};
use super::agents::{self, AgentConfig, Kind, Mode};
@@ -92,13 +93,13 @@ fn test_line(ui: &mut egui::Ui, t: &Option<&Test>) {
let tk = Tokens::get();
match t {
Some(Test::Running(_)) => {
ui.label(RichText::new(tr("ui.ai_testing")).color(tk.text_dim).size(11.0));
ui.label(RichText::new(tr("ui.ai_testing")).color(tk.text_dim).size(crate::theme::Tokens::get().font_small));
}
Some(Test::Done(Ok(m))) => {
ui.label(RichText::new(m.clone()).color(tk.accent).size(11.0));
ui.label(RichText::new(m.clone()).color(tk.accent).size(crate::theme::Tokens::get().font_small));
}
Some(Test::Done(Err(e))) => {
ui.add(egui::Label::new(RichText::new(e).color(tk.error).size(11.0)).wrap());
ui.add(egui::Label::new(RichText::new(e).color(tk.error).size(crate::theme::Tokens::get().font_small)).wrap());
}
None => {}
}
@@ -106,19 +107,20 @@ fn test_line(ui: &mut egui::Ui, t: &Option<&Test>) {
fn section(ui: &mut egui::Ui, title: &str) {
ui.add_space(10.0);
ui.label(RichText::new(title).strong().size(13.0));
ui.label(RichText::new(title).semibold().color(crate::theme::Tokens::get().text).size(crate::theme::Tokens::get().font_button));
ui.separator();
}
fn note(ui: &mut egui::Ui, text: &str) {
let t = Tokens::get();
ui.add(egui::Label::new(RichText::new(text).size(11.0).color(t.text_dim)).wrap());
ui.add(egui::Label::new(RichText::new(text).size(crate::theme::Tokens::get().font_small).color(t.text_dim)).wrap());
}
/// The AI page of Settings.
pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) {
let t = Tokens::get();
let r = ui.checkbox(&mut app.preferences.ai_features, RichText::new(tr("ui.ai_show_features")).strong());
let r =
ui.checkbox(&mut app.preferences.ai_features, RichText::new(tr("ui.ai_show_features")).semibold().color(crate::theme::Tokens::get().text));
crate::scenario::publish_handle("prefs:ai_features", r.rect.center());
note(ui, tr("ui.ai_show_features_note"));
if cfg!(target_arch = "wasm32") {
@@ -163,7 +165,7 @@ pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) {
let remembered: Vec<(String, Vec<String>)> =
app.preferences.agent_always_allow.iter().filter(|(_, v)| !v.is_empty()).map(|(k, v)| (k.clone(), v.clone())).collect();
ui.add_space(4.0);
ui.label(RichText::new(tr("ui.ai_always_allowed")).strong());
ui.label(RichText::new(tr("ui.ai_always_allowed")).semibold().color(crate::theme::Tokens::get().text));
if remembered.is_empty() {
note(ui, tr("ui.ai_always_allowed_none"));
}
@@ -172,7 +174,7 @@ pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) {
ui.horizontal_wrapped(|ui| {
ui.label(names.get(&agent).cloned().unwrap_or_else(|| agent.clone()));
for tool in &tools {
ui.label(RichText::new(tool).monospace().size(11.0).color(t.text_dim));
ui.label(RichText::new(tool).monospace().size(crate::theme::Tokens::get().font_small).color(t.text_dim));
}
if ui.small_button(tr("ui.ai_reset")).clicked() {
app.preferences.agent_always_allow.remove(&agent);
@@ -230,11 +232,11 @@ fn agents_section(app: &mut SolveApp, ui: &mut egui::Ui) {
ui.set_width(ui.available_width());
ui.horizontal(|ui| {
super::panel::kind_icon(ui, e.kind);
ui.label(RichText::new(&e.name).strong());
ui.label(RichText::new(e.detail()).color(t.text_dim).size(11.0));
ui.label(RichText::new(&e.name).semibold().color(crate::theme::Tokens::get().text));
ui.label(RichText::new(e.detail()).color(t.text_dim).size(crate::theme::Tokens::get().font_small));
super::panel::login_chip(ui, e.login);
if !e.found {
ui.label(RichText::new(tr("ui.ai_added")).color(t.text_dim).size(11.0));
ui.label(RichText::new(tr("ui.ai_added")).color(t.text_dim).size(crate::theme::Tokens::get().font_small));
}
});
ui.horizontal(|ui| {
@@ -388,7 +390,12 @@ pub fn dialog(app: &mut SolveApp, ctx: &egui::Context) {
ui.add(egui::TextEdit::singleline(&mut s.command).desired_width(300.0));
ui.end_row();
ui.label("");
ui.add(egui::Label::new(RichText::new(tr("ui.ai_add_installed_note")).size(11.0).color(t.text_dim)).wrap());
ui.add(
egui::Label::new(
RichText::new(tr("ui.ai_add_installed_note")).size(crate::theme::Tokens::get().font_small).color(t.text_dim),
)
.wrap(),
);
ui.end_row();
}
AddKind::Custom => {
@@ -399,7 +406,12 @@ pub fn dialog(app: &mut SolveApp, ctx: &egui::Context) {
ui.add(egui::TextEdit::singleline(&mut s.command).hint_text("my-agent --acp").desired_width(300.0));
ui.end_row();
ui.label("");
ui.add(egui::Label::new(RichText::new(tr("ui.agent_chat_custom_hint")).size(11.0).color(t.text_dim)).wrap());
ui.add(
egui::Label::new(
RichText::new(tr("ui.agent_chat_custom_hint")).size(crate::theme::Tokens::get().font_small).color(t.text_dim),
)
.wrap(),
);
ui.end_row();
}
AddKind::Api => {
@@ -437,7 +449,7 @@ pub fn dialog(app: &mut SolveApp, ctx: &egui::Context) {
ui.end_row();
ui.label("");
let note = if has_keychain { tr("ui.ai_key_note") } else { tr("ui.ai_no_keychain") };
ui.add(egui::Label::new(RichText::new(note).size(11.0).color(t.text_dim)).wrap());
ui.add(egui::Label::new(RichText::new(note).size(crate::theme::Tokens::get().font_small).color(t.text_dim)).wrap());
ui.end_row();
ui.label("");
ui.horizontal(|ui| {
+5 -5
View File
@@ -79,7 +79,7 @@ fn ask(tx: &Sender<ControlRequest>, method: &str, params: Value) -> Receiver<Val
}
fn frame(app: &mut SolveApp) {
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
poll(app, &ctx);
app.drain_control(&ctx);
}
@@ -463,7 +463,7 @@ fn app_with_script() -> (SolveApp, Script, egui::Context) {
let script = Script::default();
app.agent_chat.backend = Some(Box::new(script.clone()));
app.agent_chat.state = Some(State::Ready);
(app, script, egui::Context::default())
(app, script, crate::fonts::test_context())
}
fn ended(script: &Script, reason: &str) {
@@ -631,7 +631,7 @@ done
let mut app = SolveApp::new(solidcraft_engine::Session::default(), crate::Services::default());
app.agent_chat.backend = Some(Box::new(acp_client::AcpBackend::start(&argv, start).unwrap()));
app.agent_chat.state = Some(State::Starting);
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
let until = |app: &mut SolveApp, what: &str, done: &dyn Fn(&SolveApp) -> bool| {
let t = std::time::Instant::now();
while !done(app) {
@@ -724,7 +724,7 @@ done
let mut app = SolveApp::new(solidcraft_engine::Session::default(), crate::Services::default());
app.agent_chat.backend = Some(Box::new(acp_client::AcpBackend::start(&argv, start).unwrap()));
app.agent_chat.state = Some(State::Starting);
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
let until = |app: &mut SolveApp, done: &dyn Fn(&SolveApp) -> bool| {
let t = std::time::Instant::now();
while !done(app) {
@@ -842,7 +842,7 @@ done
app.agent_chat.state = Some(State::Starting);
app.agent_chat.running_id = "fake".into();
app.preferences.agent_models.insert("fake".into(), "smart".into());
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
let t = std::time::Instant::now();
loop {
poll(&mut app, &ctx);
+1 -1
View File
@@ -89,7 +89,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
let bom = d.rows(app);
let rows: Vec<Value> = bom["rows"].as_array().cloned().unwrap_or_default();
let (mut export, mut apply_row) = (None, None);
let title = RichText::new(crate::i18n::tr_label("Bill of Materials")).strong().size(13.0);
let title = RichText::new(crate::i18n::tr_label("Bill of Materials")).strong().size(t.font_button);
crate::frame::window(ctx, title, crate::frame::Width::Wide).id(egui::Id::new("sc_bom")).open(&mut open).resizable(true).show(ctx, |ui| {
ui.horizontal(|ui| {
let was = (d.top, d.by_definition, d.group_children);
+33 -22
View File
@@ -6,6 +6,7 @@
//! viewport, a double-click on a sketch edits it, and a right-click opens the item's menu
//! ([`crate::context_menu`]).
use crate::fonts::RichTextExt as _;
#[cfg(test)]
#[path = "occurrence_ui_tests.rs"]
mod occurrence_ui_tests;
@@ -176,14 +177,14 @@ pub fn group_name(app: &SolveApp, id: u64) -> Option<String> {
pub fn group_items(app: &SolveApp, id: u64, scope: &str) -> Vec<Item> {
let Some(g) = find_group(app, id) else { return Vec::new() };
let mut v = vec![
Item::action("ui.rename", "Rename", "").with(json!({ "group": id })),
Item::action("ui.rename", "Rename", "rename").with(json!({ "group": id })),
Item::action("ui.ungroup", "Ungroup", "folder").with(json!({ "group": id })),
Item::sep(),
// The group itself: its items keep their own state.
Item::action("ui.folderVisible", "Show/Hide", "eye").key("V").with(json!({ "key": format!("{scope}/g{id}") })),
];
if g.folder == "bodies" {
v.push(Item::action("ui.isolate", "Isolate", "").with(json!({ "bodies": group_bodies(app, id) })));
v.push(Item::action("ui.isolate", "Isolate", "body").with(json!({ "bodies": group_bodies(app, id) })));
}
v
}
@@ -426,10 +427,14 @@ pub(crate) fn draw_row(ui: &mut egui::Ui, id: egui::Id, row: &Row) -> RowResp {
icons::paint_icon(ui.painter(), ir, row.icon, if row.dim { DIM_ICON_OPACITY } else { 1.0 });
x += 21.0;
}
let col =
if row.selected { crate::theme::TabAccent::current(ui.ctx()).color } else { row.color.unwrap_or(if row.dim { t.text_dim } else { t.text }) };
let col = if row.selected {
crate::theme::selected_ink(&t, crate::theme::TabAccent::current(ui.ctx()).color)
} else {
row.color.unwrap_or(if row.dim { t.text_dim } else { t.text })
};
let label_display = if row.name { crate::i18n::tr_name(row.label) } else { crate::i18n::tr_dyn(row.label) };
let galley = ui.painter().layout_no_wrap(label_display, FontId::proportional(t.font_label), col);
let font = if row.selected { crate::fonts::semibold(t.font_label) } else { FontId::proportional(t.font_label) };
let galley = ui.painter().layout_no_wrap(label_display, font, col);
let lw = galley.size().x;
ui.painter().galley(pos2(x, cy - galley.size().y / 2.0), galley, col);
let mut bx = (x + lw + 6.0).min(r.right() - 16.0);
@@ -673,7 +678,7 @@ fn browser_panel(app: &mut SolveApp, ui: &mut egui::Ui, timeline_above: bool) {
DRAWN.with(|d| d.borrow_mut().clear());
OCCURRENCES.with(|d| d.borrow_mut().clear());
let mut acts = Actions::default();
let width = browser_width(app);
let width = browser_width(app.preferences.browser_width);
let panel = egui::Panel::left("sc_browser")
.exact_size(width)
.resizable(false)
@@ -704,8 +709,8 @@ fn browser_panel(app: &mut SolveApp, ui: &mut egui::Ui, timeline_above: bool) {
crate::scenario::publish_handle("left-history-divider", rect.center());
}
let arrow = if browser_collapsed { "▶" } else { "▼" };
let response =
ui.add(egui::Button::new(RichText::new(format!("{arrow} BROWSER")).size(t.font_small).strong().color(t.text_dim)).frame(false));
let response = ui
.add(egui::Button::new(RichText::new(format!("{arrow} BROWSER")).size(t.font_small).semibold().color(t.text_dim)).frame(false));
crate::scenario::publish_handle("left-browser-toggle", response.rect.center());
if response.clicked() {
app.preferences.timeline_left_browser_collapsed = !browser_collapsed;
@@ -722,8 +727,7 @@ fn browser_panel(app: &mut SolveApp, ui: &mut egui::Ui, timeline_above: bool) {
finish_browser(app, ui, acts);
}
fn browser_width(app: &SolveApp) -> f32 {
let remembered = app.preferences.browser_width;
fn browser_width(remembered: f32) -> f32 {
if remembered.is_finite() { remembered.clamp(MIN_BROWSER_WIDTH, MAX_BROWSER_WIDTH) } else { crate::prefs::DEFAULT_BROWSER_WIDTH }
}
@@ -749,11 +753,8 @@ pub fn floating(app: &mut SolveApp, ui: &mut egui::Ui, available: Rect) {
let mut acts = Actions::default();
let gap = crate::shell::SHELL_GAP;
let top_gap = if app.ui.layout == crate::shell::LayoutMode::Docked { gap } else { 0.0 };
let min = available.min + vec2(gap, top_gap);
let right = (available.right() - gap).max(min.x);
let bottom = app.shell.history.map_or(available.bottom() - gap, |r| r.top() - gap).max(min.y);
let width = browser_width(app);
let bounds = Rect::from_min_max(min, pos2((min.x + width).min(right), bottom));
let width = browser_width(app.preferences.browser_width);
let bounds = floating_bounds(available, app.shell.history, width, top_gap);
app.shell.browser = None;
let min_height = HEADER_H + 2.0 * (CARD_INSET + 1.0);
if bounds.is_positive() && bounds.height() >= min_height {
@@ -780,6 +781,14 @@ pub fn floating(app: &mut SolveApp, ui: &mut egui::Ui, available: Rect) {
finish_browser(app, ui, acts);
}
fn floating_bounds(available: Rect, history: Option<Rect>, width: f32, top_gap: f32) -> Rect {
let gap = crate::shell::SHELL_GAP;
let min = available.min + vec2(gap, top_gap);
let right = (available.right() - gap).max(min.x);
let bottom = history.map_or(available.bottom() - gap, |r| r.top() - gap).max(min.y);
Rect::from_min_max(min, pos2((min.x + width).min(right), bottom))
}
fn browser_contents(app: &mut SolveApp, ui: &mut egui::Ui, acts: &mut Actions, collapsible: bool) {
let t = Tokens::get();
// Only the floating card folds; the docked column keeps its full height.
@@ -811,7 +820,7 @@ fn browser_header(app: &mut SolveApp, ui: &mut egui::Ui, collapsible: bool) {
let title = crate::i18n::tr("ui.browser_title").to_string();
let kind = if collapsible { egui::WidgetType::Button } else { egui::WidgetType::Label };
response.widget_info(|| egui::WidgetInfo::labeled(kind, true, &title));
let galley = ui.painter().layout_no_wrap(title, FontId::proportional(t.font_heading), t.text);
let galley = ui.painter().layout_no_wrap(title, crate::fonts::semibold(t.font_heading), t.text);
ui.painter().galley(pos2(rect.left() + t.space_6, rect.center().y - galley.size().y / 2.0), galley, t.text);
let mut right = rect.right() - t.space_6;
if collapsible {
@@ -921,8 +930,7 @@ fn finish_browser(app: &mut SolveApp, ui: &mut egui::Ui, acts: Actions) {
occurrence_panel(app, ui);
capture_prompt(app, ui.ctx());
canvas_panel(app, ui.ctx());
let repair_anchor = app.viewport.rect.map(|rect| rect.right_top() + vec2(-16.0, 16.0)).unwrap_or_else(|| ui.ctx().content_rect().right_top());
crate::sketch_attachment_ui::panel(app, ui.ctx(), repair_anchor);
crate::sketch_attachment_ui::panel(app, ui.ctx());
}
fn component_name(app: &SolveApp, id: u64) -> String {
@@ -1327,7 +1335,7 @@ pub fn view_items(app: &SolveApp, name: &str) -> Vec<Item> {
Item::action("ui.restoreView", "Restore", "home").with(json!({ "view": name })),
Item::action("ui.updateView", "Update to Current View", "perspective").with(json!({ "view": name })).on_if(saved),
Item::sep(),
Item::action("ui.rename", "Rename", "").with(json!({ "view": name })).on_if(saved),
Item::action("ui.rename", "Rename", "rename").with(json!({ "view": name })).on_if(saved),
Item::action("view.delete", "Delete", "delete").with(json!({ "view": name })).on_if(saved),
]
}
@@ -1508,7 +1516,7 @@ pub fn canvas_items(app: &SolveApp, id: u64) -> Vec<Item> {
Item::action("ui.calibrateCanvas", "Calibrate", "measure").with(json!({ "canvas": id })),
Item::sep(),
Item::action("ui.delete", "Delete", "delete").with(json!({ "canvases": [id] })),
Item::action("ui.rename", "Rename", "").with(json!({ "canvas": id })),
Item::action("ui.rename", "Rename", "rename").with(json!({ "canvas": id })),
Item::sep(),
Item::action("ui.canvasVisible", "Show/Hide", "eye").key("V").with(json!({ "canvas": id, "visible": !visible })),
]
@@ -2340,9 +2348,12 @@ pub fn dims_overlay(app: &SolveApp, ctx: &egui::Context) {
}
}
/// Where the browser's panels open: the viewport's top left corner.
/// Keep browser panels beside the browser and below the ribbon, including the floating shell.
fn panel_pos(app: &SolveApp) -> Pos2 {
app.viewport.rect.map(|r| crate::shell::content_rect(app, r).left_top() + vec2(16.0, 16.0)).unwrap_or(pos2(270.0, 140.0))
app.viewport
.rect
.map(|r| crate::shell::content_rect(app, r).left_top() + vec2(Tokens::get().space_16, Tokens::get().space_16))
.unwrap_or(pos2(270.0, 140.0))
}
/// The Capture Position question stands for saving.
+71 -2
View File
@@ -47,7 +47,7 @@ fn browser_card_shrinks_and_scrolls_without_covering_history() {
fn selected_row_paints_tab_soft_fill_and_accent_text_in_both_layouts() {
for mode in [LayoutMode::Floating, LayoutMode::Docked] {
for tab in ["MODEL", "SURFACE", "SKETCH"] {
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
let mut app = SolveApp::new(Default::default(), Default::default());
app.ui.layout = mode;
app.ui.tab = tab.into();
@@ -64,7 +64,7 @@ fn selected_row_paints_tab_soft_fill_and_accent_text_in_both_layouts() {
assert!(
out.shapes
.iter()
.any(|s| matches!(&s.shape, egui::Shape::Text(t) if t.galley.text() == "Selected body" && t.fallback_color == accent.color))
.any(|s| matches!(&s.shape, egui::Shape::Text(t) if t.galley.text() == "Selected body" && t.fallback_color == crate::theme::selected_ink(&Tokens::get(), accent.color)))
);
}
}
@@ -167,3 +167,72 @@ fn one_browser_keeps_its_resized_width_across_layouts_and_overlay_preferences()
}
}
}
#[test]
fn browser_title_uses_a_single_semibold_run() {
let ctx = crate::fonts::test_context();
let mut app = SolveApp::new(Default::default(), Default::default());
let mut output = ctx.run_ui(egui::RawInput::default(), |ui| {
ui.set_width(250.0);
browser_header(&mut app, ui, true);
});
output.textures_delta.clear();
let title = crate::i18n::tr("ui.browser_title");
let titles: Vec<_> = output
.shapes
.iter()
.filter_map(|s| match &s.shape {
egui::Shape::Text(text) if text.galley.text() == title => Some(text),
_ => None,
})
.collect();
assert_eq!(titles.len(), 1);
assert_eq!(titles[0].galley.job.sections[0].format.font_id, crate::fonts::semibold(Tokens::get().font_heading));
}
#[test]
fn resizing_browser_card_and_column_persists_width_including_floating_preference() {
for (mode, float, left_history) in [
(LayoutMode::Floating, false, false),
(LayoutMode::Docked, false, false),
(LayoutMode::Docked, true, false),
(LayoutMode::Floating, true, true),
(LayoutMode::Docked, true, true),
] {
let mut h = Harness::new();
h.app.ui.layout = mode;
h.app.preferences.browser_float = float;
h.app.preferences.timeline_left = left_history;
h.call("ui.resize", json!({"width":1400,"height":900}));
h.settle();
let before = h.app.viewport.rect.unwrap();
let at = handle_at("left-browser-rail").unwrap();
h.call("ui.drag", json!({"x0":at.x,"y0":at.y,"x1":at.x+80.0,"y1":at.y,"steps":8}));
h.settle();
let width = h.app.preferences.browser_width;
assert!(width > crate::prefs::DEFAULT_BROWSER_WIDTH + 40.0, "{mode:?}, float={float}, width={width}");
if mode == LayoutMode::Floating || float {
assert!((rect_of("browser:card").unwrap().width() - width).abs() < 1.0);
assert_eq!(h.app.viewport.rect.unwrap(), before, "the card leaves the projection intact");
} else {
assert!((h.app.viewport.rect.unwrap().left() - width).abs() < 1.0);
}
let mut restored = SolveApp::new(Default::default(), Default::default());
restored.load_prefs(&h.app.prefs());
assert_eq!(restored.preferences.browser_width, width);
assert_eq!(restored.preferences.browser_float, float);
}
}
#[test]
fn browser_width_rejects_hostile_preferences_and_tiny_windows_still_fit() {
for width in [f32::NAN, f32::INFINITY, f32::NEG_INFINITY] {
assert_eq!(browser_width(width), crate::prefs::DEFAULT_BROWSER_WIDTH);
}
assert_eq!(browser_width(-100.0), MIN_BROWSER_WIDTH);
assert_eq!(browser_width(f32::MAX), MAX_BROWSER_WIDTH);
let available = Rect::from_min_size(Pos2::ZERO, vec2(100.0, 300.0));
for top_gap in [0.0, crate::shell::SHELL_GAP] {
let bounds = floating_bounds(available, None, MAX_BROWSER_WIDTH, top_gap);
assert!(available.contains_rect(bounds));
}
}
+3 -3
View File
@@ -571,7 +571,7 @@ fn value_box(ui: &mut egui::Ui, label: &str, value: &mut String, at: Pos2, selec
crate::frame::area(egui::Id::new("sc_canvas_area")).fixed_pos(at).order(egui::Order::Foreground).show(ui.ctx(), |ui| {
egui::Frame::popup(ui.style()).inner_margin(egui::Margin::symmetric(6, 3)).show(ui, |ui| {
ui.horizontal(|ui| {
ui.label(egui::RichText::new(crate::i18n::tr_label(label)).color(t.text_dim).size(11.5));
ui.label(egui::RichText::new(crate::i18n::tr_label(label)).color(t.text_dim).size(crate::theme::Tokens::get().font_caption));
let r = ui.add(egui::TextEdit::singleline(value).id(id).desired_width(72.0));
crate::params_dialog::complete(ui, &r, value);
if select_all {
@@ -889,7 +889,7 @@ fn measure_line(app: &SolveApp, painter: &egui::Painter, proj: &Proj, r: &serde_
painter.circle(s, 3.5, t.manipulator, Stroke::new(1.0, Color32::WHITE));
}
let mid = sa + (sb - sa) * 0.5 + vec2(10.0, -14.0);
let galley = painter.layout_no_wrap(crate::prefs::show_mm(app, d, 1), egui::FontId::proportional(12.5), t.text);
let galley = painter.layout_no_wrap(crate::prefs::show_mm(app, d, 1), egui::FontId::proportional(crate::theme::Tokens::get().font_label), t.text);
let rect = egui::Rect::from_min_size(mid, galley.size() + vec2(10.0, 6.0));
crate::scenario::publish_handle("measure:label", rect.center());
crate::scenario::publish_rect("measure:label", rect);
@@ -931,7 +931,7 @@ fn measure_components(app: &SolveApp, painter: &egui::Painter, proj: &Proj, a: V
(total.center(), vec2(20.0, 20.0))
};
let text = format!("{}: {}", axis.to_uppercase(), crate::prefs::show_mm(app, distance, 1));
let galley = painter.layout_no_wrap(text, egui::FontId::proportional(12.5), t.text);
let galley = painter.layout_no_wrap(text, egui::FontId::proportional(crate::theme::Tokens::get().font_label), t.text);
let size = galley.size() + vec2(10.0, 6.0);
let bounds = proj.rect.shrink(4.0);
let clamp = |rect: egui::Rect| {
+16 -9
View File
@@ -121,23 +121,30 @@ fn colours_outside_the_theme_are_only_the_listed_neutral_ones() {
let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR"));
let dirs = [root.join("src"), root.join("../../assets/icons/ui/source")];
let mut found = Vec::new();
for dir in &dirs {
let entries = std::fs::read_dir(dir).unwrap_or_else(|e| panic!("{}: {e}", dir.display()));
for entry in entries.flatten() {
let path = entry.path();
let name = path.file_name().and_then(|n| n.to_str()).unwrap_or_default().to_string();
if !name.ends_with(".rs") || name.ends_with("_tests.rs") || name == "theme.rs" {
fn scan(dir: &std::path::Path, prefix: &str, found: &mut Vec<String>) {
for entry in std::fs::read_dir(dir).unwrap() {
let path = entry.unwrap().path();
let name = path.file_name().unwrap().to_str().unwrap();
let relative = format!("{prefix}{name}");
if path.is_dir() {
scan(&path, &format!("{relative}/"), found);
continue;
}
let src = std::fs::read_to_string(&path).unwrap_or_default();
if !name.ends_with(".rs") || name.ends_with("_tests.rs") || matches!(name, "theme.rs" | "gallery.rs" | "test_support.rs") {
continue;
}
let src = std::fs::read_to_string(&path).unwrap();
let code = src.split("#[cfg(test)]").next().unwrap_or(&src);
let n: usize = COLOUR_LITERALS.iter().map(|p| code.matches(p).count()).sum();
let allowed = ALLOWED_LITERALS.iter().find(|(f, _, _)| *f == name).map_or(0, |(_, n, _)| *n);
let allowed = ALLOWED_LITERALS.iter().find(|(f, _, _)| *f == relative).map_or(0, |(_, n, _)| *n);
if n > allowed {
found.push(format!("{name}: {n} colour literal(s), at most {allowed} allowed"));
found.push(format!("{relative}: {n} colour literal(s), at most {allowed} allowed"));
}
}
}
for dir in &dirs {
scan(dir, "", &mut found);
}
assert!(found.is_empty(), "colour literals outside theme::Tokens: {found:?}");
}
+39 -1
View File
@@ -399,11 +399,48 @@ const NO_MEANING: &[(&str, &str)] = &[
("font_label", "layout dimension"),
("font_button", "layout dimension"),
("font_heading", "layout dimension"),
("font_triad", "layout dimension"),
("font_compass", "layout dimension"),
("font_subtitle", "layout dimension"),
("font_intro", "layout dimension"),
("font_article_heading", "layout dimension"),
("font_title", "layout dimension"),
("font_display", "layout dimension"),
("control_height", "layout dimension"),
("control_radius", "layout dimension"),
("form_label_width", "layout dimension"),
("form_gap_y", "layout dimension"),
("form_footer_height", "layout dimension"),
("form_header_height", "layout dimension"),
("form_card_width", "layout dimension"),
("form_icon_size", "layout dimension"),
("form_close_size", "layout dimension"),
("form_inset", "layout dimension"),
("form_icon_inset", "layout dimension"),
("form_section_icon_size", "layout dimension"),
("form_checkbox_height", "layout dimension"),
("form_button_height", "layout dimension"),
("sketch_palette_width", "layout dimension"),
("sketch_mode_size", "layout dimension"),
("sketch_mode_radius", "layout dimension"),
("sketch_mode_border", "layout dimension"),
("sketch_palette_alpha", "neutral panel opacity"),
("sketch_mode_tint", "selected background tint of the measured sketch accent"),
("sketch_footer_icon_size", "layout dimension"),
("font_section_tracking", "layout dimension"),
("on_accent", "ink on an accent fill"),
("app_bar_hover_subtle", "translucent hover chrome"),
("app_bar_hover_button", "translucent hover chrome"),
("app_bar_hover_strong", "translucent hover chrome"),
("app_bar_tab_active", "the active document tab's surface"),
("dialog_body", "dense dialog surface"),
("dialog_footer", "dense dialog footer band"),
("dialog_rule", "dense dialog divider"),
("control_fill", "input control fill"),
("control_border", "input control border"),
("dialog_label", "dense dialog field label"),
("selected_ink", "foreground of selected elements"),
("selected_bg", "background of selected elements"),
("render_accent", "the Render workspace's identity colour"),
// The window's chrome: grounds, text and borders (measured as grounds where meaning sits on them).
("panel_header", "chrome"),
@@ -678,7 +715,7 @@ fn each_mode_changes_only_its_table() {
];
let mut red_green_light =
red_green_both.into_iter().filter(|name| !["surface_accent", "mesh_accent", "form_accent"].contains(name)).collect::<Vec<_>>();
red_green_light.extend(["sketch_projected", "sketch_locked", "timeline_item_error", "construction_geom"]);
red_green_light.extend(["sketch_projected", "sketch_locked", "timeline_item_error", "construction_geom", "glyph_text"]);
for (dark, mode, want) in [
(false, ColorVision::Protan, set(&red_green_light)),
(true, ColorVision::Protan, set(&red_green_both)),
@@ -695,6 +732,7 @@ fn each_mode_changes_only_its_table() {
"sketch_locked",
"box_crossing",
"construction_geom",
"glyph_text",
"preview_sketch",
"analysis.hatch",
]),
+2 -1
View File
@@ -1,5 +1,6 @@
//! Structured configuration rule editing and non-mutating row preview.
use crate::SolveApp;
use crate::fonts::RichTextExt as _;
use egui::{RichText, Ui};
use serde_json::{Value, json};
use solidcraft_engine::doc::config::{Column, ConfigRule, RuleCondition, RuleEffect, RuleOperator};
@@ -58,7 +59,7 @@ pub(super) fn show(ui: &mut Ui, app: &mut SolveApp, error: &mut Option<String>,
let suppression_features: Vec<(u64, String)> =
features.iter().filter(|(id, _)| app.session.doc.configs.columns.contains(&Column::Suppress(*id))).cloned().collect();
ui.separator();
ui.label(RichText::new(crate::i18n::tr_label("Configuration rules")).strong());
ui.label(RichText::new(crate::i18n::tr_label("Configuration rules")).semibold().color(crate::theme::Tokens::get().text));
ui.add(egui::Label::new("Rules run from top to bottom. Matched drives change effective values.").wrap());
ui.add(egui::Label::new("Matched restrictions check the final values.").wrap());
for (index, rule) in rules.iter().enumerate() {
+142 -59
View File
@@ -11,6 +11,7 @@
//! state; [`items`] lists them and [`run_item`] runs one, so the control channel (`ui.menu`,
//! `ui.menuPick`) and tests reach everything a click does.
use crate::fonts::RichTextExt as _;
use egui::{Align2, Color32, FontId, Pos2, Rect, Sense, Stroke, Vec2, pos2, vec2};
use serde::Serialize;
use serde_json::{Value, json};
@@ -425,7 +426,7 @@ fn viewport_items(app: &SolveApp) -> Vec<Item> {
}
// Everything under the cursor, for what lies beneath something else.
if app.menu.over_geometry {
v.push(act("ui.selectOther", "Select Other…", "").key("Hold click"));
v.push(act("ui.selectOther", "Select Other…", "select").key("Hold click"));
v.push(Item::sep());
}
if app.session.active_sketch.is_some() {
@@ -457,7 +458,7 @@ fn viewport_items(app: &SolveApp) -> Vec<Item> {
v.push(cmd(app, "solid.extrude", "Extrude"));
v.push(cmd(app, "construct.plane.offset", "Offset Plane"));
v.push(cmd(app, "solid.shell", "Shell"));
v.push(act("ui.editFeature", "Edit Feature", "").with(json!({ "feature": feature })).on(feature.is_some()));
v.push(act("ui.editFeature", "Edit Feature", "edit").with(json!({ "feature": feature })).on(feature.is_some()));
v.push(act("ui.editSketch", "Edit Profile Sketch", "sketch").with(json!({ "sketch": sketch })).on(sketch.is_some()));
v.push(Item::sep());
v.push(act("ui.appearance", "Appearance", "appearance").key("A"));
@@ -467,8 +468,8 @@ fn viewport_items(app: &SolveApp) -> Vec<Item> {
v.push(act("ui.delete", "Delete", "delete").key("Del"));
v.push(act(if hidden { "ui.show" } else { "ui.hide" }, "Show/Hide", "eye").key("V").with(json!({ "bodies": [face] })));
v.push(Item::sep());
v.push(act("ui.findBrowser", "Find in Browser", "").with(json!({ "body": face, "feature": feature })).on(feature.is_some()));
v.push(act("ui.findTimeline", "Find in Timeline", "").with(json!({ "feature": feature })).on(feature.is_some()));
v.push(act("ui.findBrowser", "Find in Browser", "list").with(json!({ "body": face, "feature": feature })).on(feature.is_some()));
v.push(act("ui.findTimeline", "Find in Timeline", "rollback").with(json!({ "feature": feature })).on(feature.is_some()));
v.push(Item::sep());
v.push(cmd(app, "solid.press_pull", "Press Pull"));
v.push(cmd(app, "inspect.measure", "Measure"));
@@ -481,10 +482,10 @@ fn viewport_items(app: &SolveApp) -> Vec<Item> {
v.push(act("ui.delete", "Delete", "delete").key("Del"));
v.push(act(if hidden { "ui.show" } else { "ui.hide" }, "Show/Hide", "eye").key("V").with(json!({ "bodies": [body] })));
v.push(Item::sep());
v.push(act("ui.findBrowser", "Find in Browser", "").with(json!({ "body": body })));
v.push(act("ui.findBrowser", "Find in Browser", "list").with(json!({ "body": body })));
v.push(act("ui.saveMesh", "Save As Mesh", "export").with(json!({ "bodies": [body] })));
v.push(Item::sep());
v.push(act("ui.tangentChain", "Select Tangent Chain", ""));
v.push(act("ui.tangentChain", "Select Tangent Chain", "chain"));
v.push(cmd(app, "inspect.measure", "Measure"));
} else if has(|s| matches!(s, Sel::Body { .. })) {
v.extend(body_items(app, &sel_bodies(app), false));
@@ -507,7 +508,7 @@ fn viewport_items(app: &SolveApp) -> Vec<Item> {
|| !app.session.visibility.hidden_sketches.is_empty()
|| !app.session.visibility.hidden_folders.is_empty();
v.push(act("ui.showAll", "Show All", "eye").on(anything_hidden));
v.push(act("ui.showAll", "Unisolate", "").on(!app.session.visibility.hidden_bodies.is_empty()));
v.push(act("ui.showAll", "Unisolate", "eye").on(!app.session.visibility.hidden_bodies.is_empty()));
v.push(Item::sep());
v.push(cmd(app, "solid.extrude", "Extrude"));
v.push(cmd(app, "solid.fillet", "Fillet"));
@@ -528,7 +529,7 @@ fn viewport_items(app: &SolveApp) -> Vec<Item> {
v.push(cmd(app, "parts.resize", "Change Part Size").with(json!({"component":component})));
}
v.push(Item::sep());
v.push(act("ui.clear", "Clear Selection", "").key("Esc"));
v.push(act("ui.clear", "Clear Selection", "close").key("Esc"));
}
v
}
@@ -543,7 +544,7 @@ fn body_items(app: &SolveApp, bodies: &[String], browser: bool) -> Vec<Item> {
act("ui.moveBodies", "Move/Copy", "move").key("M").with(json!({ "bodies": names })).on(!locked),
cmd(app, "component.from_bodies", "Create Components from Bodies").with(json!({ "bodies": names })),
Item::sep(),
act("ui.material", "Physical Material", "").with(json!({ "bodies": names })),
act("ui.material", "Physical Material", "material").with(json!({ "bodies": names })),
act("ui.appearance", "Appearance", "appearance").key("A").with(json!({ "bodies": names })),
act("ui.properties", "Properties", "measure").with(json!({ "bodies": names })),
Item::sep(),
@@ -552,11 +553,11 @@ fn body_items(app: &SolveApp, bodies: &[String], browser: bool) -> Vec<Item> {
Item::sep(),
act("ui.delete", "Delete", "delete").key("Del").with(json!({ "items": items })).on(!locked),
cmd(app, "solid.remove", "Remove").with(json!({ "bodies": names })).on(!locked),
act("ui.rename", "Rename", "").with(json!({ "body": bodies.first() })).on(one),
act("ui.rename", "Rename", "rename").with(json!({ "body": bodies.first() })).on(one),
Item::sep(),
act(if all_hidden { "ui.show" } else { "ui.hide" }, "Show/Hide", "eye").key("V").with(json!({ "bodies": names })),
act("ui.lock", if locked { "Unlock" } else { "Lock" }, "").with(json!({ "bodies": names })),
act("ui.isolate", "Isolate", "").with(json!({ "bodies": names })),
act("ui.lock", if locked { "Unlock" } else { "Lock" }, "ground").with(json!({ "bodies": names })),
act("ui.isolate", "Isolate", "body").with(json!({ "bodies": names })),
];
if one {
let b = bodies.first().cloned().unwrap_or_default();
@@ -565,9 +566,9 @@ fn body_items(app: &SolveApp, bodies: &[String], browser: bool) -> Vec<Item> {
}
v.push(Item::sep());
if !browser {
v.push(act("ui.findBrowser", "Find in Browser", "").with(json!({ "body": b })));
v.push(act("ui.findBrowser", "Find in Browser", "list").with(json!({ "body": b })));
}
v.push(act("ui.findTimeline", "Find in Timeline", "").with(json!({ "body": b })));
v.push(act("ui.findTimeline", "Find in Timeline", "rollback").with(json!({ "body": b })));
}
v
}
@@ -586,14 +587,14 @@ fn sketch_items(app: &SolveApp, id: u64) -> Vec<Item> {
act("ui.exportDxf", "Export DXF…", "export").with(json!({ "sketch": id })),
Item::sep(),
act("ui.delete", "Delete", "delete").key("Del").with(json!({ "items": [{"type": "feature", "id": id}] })),
act("ui.rename", "Rename", "").with(json!({ "feature": id })),
act("ui.rename", "Rename", "rename").with(json!({ "feature": id })),
Item::sep(),
act("ui.lookAt", "Look At", "").with(json!({ "sketch": id })),
act("ui.sketchProfile", if profiles { "Hide Profile" } else { "Show Profile" }, "").with(json!({ "sketch": id })),
act("ui.lookAt", "Look At", "lookat").with(json!({ "sketch": id })),
act("ui.sketchProfile", if profiles { "Hide Profile" } else { "Show Profile" }, "sketch").with(json!({ "sketch": id })),
act("ui.sketchDims", if dims { "Hide Dimension" } else { "Show Dimension" }, "dimension").with(json!({ "sketch": id })),
act(if visible { "ui.hideSketch" } else { "ui.showSketch" }, "Show/Hide", "eye").key("V").with(json!({ "sketch": id })),
Item::sep(),
act("ui.findTimeline", "Find in Timeline", "").with(json!({ "feature": id })),
act("ui.findTimeline", "Find in Timeline", "rollback").with(json!({ "feature": id })),
]
}
@@ -607,11 +608,11 @@ fn plane_items(app: &SolveApp, id: u64) -> Vec<Item> {
act("ui.editFeature", "Edit Feature", "plane").with(json!({ "feature": id })),
Item::sep(),
act("ui.delete", "Delete", "delete").key("Del").with(json!({ "items": [{"type": "feature", "id": id}] })),
act("ui.rename", "Rename", "").with(json!({ "feature": id })),
act("ui.rename", "Rename", "rename").with(json!({ "feature": id })),
Item::sep(),
act("ui.originPart", "Show/Hide", "eye").key("V").with(json!({ "keys": [f.name], "show": !visible })),
Item::sep(),
act("ui.findTimeline", "Find in Timeline", "").with(json!({ "feature": id })),
act("ui.findTimeline", "Find in Timeline", "rollback").with(json!({ "feature": id })),
]
}
@@ -637,14 +638,14 @@ fn joint_items(app: &SolveApp, id: u64) -> Vec<Item> {
let hidden = !joints.iter().any(|j| app.session.joint_visible(*j));
vec![
act("ui.editJoint", "Edit Joint", "joint").with(json!({ "joint": id })),
act("ui.editJoint", "Edit Joint Limits", "").with(json!({ "joint": id })).on(!rigid),
act("ui.driveJoint", "Drive Joint", "").with(json!({ "joint": id })).on(!rigid),
act("ui.animateJoint", "Animate Joint", "").with(json!({ "joint": id })).on(!rigid && !j.suppressed),
act("ui.findJoint", "Find in Window", "").with(json!({ "joint": id })),
act("ui.editJoint", "Edit Joint Limits", "joint").with(json!({ "joint": id })).on(!rigid),
act("ui.driveJoint", "Drive Joint", "drive").with(json!({ "joint": id })).on(!rigid),
act("ui.animateJoint", "Animate Joint", "play").with(json!({ "joint": id })).on(!rigid && !j.suppressed),
act("ui.findJoint", "Find in Window", "fit").with(json!({ "joint": id })),
cmd(app, "joint.edit", if j.suppressed { "Unsuppress" } else { "Suppress" }).with(json!({ "joint": id, "suppressed": !j.suppressed })),
Item::sep(),
act("ui.delete", "Delete", "delete").key("Del").with(json!({ "joints": [id] })),
act("ui.rename", "Rename", "").with(json!({ "joint": id })),
act("ui.rename", "Rename", "rename").with(json!({ "joint": id })),
Item::sep(),
// Hiding a joint hides only its glyph: it still constrains and moves the parts.
act("browser.visibility", "Show/Hide", "eye").key("V").with(json!({ "joints": joints, "visible": hidden })),
@@ -733,12 +734,12 @@ fn component_items(app: &SolveApp, id: u64) -> Vec<Item> {
}
v.push(cmd(app, "component.create", "New Component").with(json!({ "parent": id })));
if id == 0 {
v.push(act("ui.copyDesign", "Copy", "").key("Ctrl+C"));
v.push(act("ui.paste", "Paste", "").key("Ctrl+V").on(crate::edit_clipboard::can_paste(app)));
v.push(act("ui.copyDesign", "Copy", "copy").key("Ctrl+C"));
v.push(act("ui.paste", "Paste", "paste").key("Ctrl+V").on(crate::edit_clipboard::can_paste(app)));
v.push(cmd(app, "component.from_bodies", "Create Components from Bodies").with(json!({ "bodies": names })).on(!bodies.is_empty()));
}
v.push(Item::sep());
v.push(act("ui.material", "Physical Material", "").with(json!({ "bodies": names })).on(!bodies.is_empty()));
v.push(act("ui.material", "Physical Material", "material").with(json!({ "bodies": names })).on(!bodies.is_empty()));
v.push(
act("ui.appearance", "Appearance", "appearance")
.key("A")
@@ -761,11 +762,11 @@ fn component_items(app: &SolveApp, id: u64) -> Vec<Item> {
v.push(cmd(app, "component.paste_new", "Paste New").with(json!({ "component": id, "translate": [10, 10, 0] })));
v.push(act("ui.delete", "Delete", "delete").key("Del").with(json!({ "occurrences": [occ.map(|o| o.id)] })).on(occ.is_some()));
}
v.push(act("ui.rename", "Rename", "").with(json!({ "component": id })));
v.push(act("ui.rename", "Rename", "rename").with(json!({ "component": id })));
v.push(Item::sep());
v.push(act(if hidden { "ui.show" } else { "ui.hide" }, "Show/Hide", "eye").key("V").with(json!({ "bodies": names })).on(!bodies.is_empty()));
v.push(act("ui.showAll", "Show All Bodies", "eye"));
v.push(act("ui.isolate", "Isolate", "").with(json!({ "bodies": names })).on(!bodies.is_empty() && id != 0));
v.push(act("ui.isolate", "Isolate", "body").with(json!({ "bodies": names })).on(!bodies.is_empty() && id != 0));
v.push(act("ui.newGroup", "New Group", "folder").with(json!({ "component": id })));
v
}
@@ -819,7 +820,7 @@ fn sketch_entity_items(app: &SolveApp) -> Vec<Item> {
v.push(cmd(app, "sketch.circle.center", "Circle"));
v.push(cmd(app, "sketch.dimension", "Sketch Dimension"));
v.push(Item::sep());
v.push(act("ui.paste", "Paste", "").key("Ctrl+V").on(app.session.sketch_clipboard.is_some()));
v.push(act("ui.paste", "Paste", "paste").key("Ctrl+V").on(app.session.sketch_clipboard.is_some()));
return v;
}
let ents: Vec<String> = curves.iter().chain(points.iter()).cloned().collect();
@@ -835,9 +836,9 @@ fn sketch_entity_items(app: &SolveApp) -> Vec<Item> {
v.extend(explode_text(app));
}
v.push(cmd(app, "sketch.move", "Move/Copy").key("M"));
v.push(act("ui.cut", "Cut", "").key("Ctrl+X"));
v.push(act("ui.copy", "Copy", "").key("Ctrl+C"));
v.push(act("ui.paste", "Paste", "").key("Ctrl+V").on(app.session.sketch_clipboard.is_some()));
v.push(act("ui.cut", "Cut", "cut").key("Ctrl+X"));
v.push(act("ui.copy", "Copy", "copy").key("Ctrl+C"));
v.push(act("ui.paste", "Paste", "paste").key("Ctrl+V").on(app.session.sketch_clipboard.is_some()));
if !curves.is_empty() {
v.push(cmd(app, "sketch.construction", "Normal / Construction").with(json!({ "curves": curves })));
}
@@ -1482,12 +1483,23 @@ pub fn describe(app: &SolveApp) -> Value {
return json!({ "open": false, "pending": app.menu.pending.is_some() });
};
let radial = if app.menu.radial { radial_items(app) } else { Vec::new() };
let describe_items = |items: Vec<Item>| {
items
.into_iter()
.map(|item| {
let placeholder = !item.icon.is_empty() && crate::icon_svg::resolve(&item.icon).placeholder;
let mut value = json!(item);
value["placeholder"] = json!(placeholder);
value
})
.collect::<Vec<_>>()
};
json!({
"open": true,
"at": [at.x, at.y],
"target": app.menu.target,
"radial": radial,
"items": items(app, &app.menu.target),
"radial": describe_items(radial),
"items": describe_items(items(app, &app.menu.target)),
"rename": app.menu.rename.as_ref().map(|r| r.text.clone()),
})
}
@@ -1683,7 +1695,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
let resp = crate::frame::area(egui::Id::new("sc_marking_menu")).fixed_pos(area.min).order(egui::Order::Foreground).show(ctx, |ui| {
let (r, _) = ui.allocate_exact_size(area.size(), Sense::hover());
let painter = ui.painter_at(r.expand(4.0));
let font = FontId::proportional(13.0);
let font = FontId::proportional(crate::theme::Tokens::get().font_button);
// Centre: a ring with a pointer toward the hot direction.
let direction = hot.zip(pointer).map(|(k, p)| ((p - c).normalized(), radial.get(k).is_some_and(|i| i.enabled)));
crate::icons::glyphs::radial_centre(&painter, c, direction, t);
@@ -1782,7 +1794,12 @@ fn workspace_menu(ui: &mut egui::Ui, items: &[Item], key_row: Option<usize>, hei
ui.set_width(450.0);
ui.spacing_mut().item_spacing.y = 0.0;
ui.add_space(4.0);
ui.label(egui::RichText::new(crate::i18n::tr("ui.ribbon_workspace").to_uppercase()).size(11.0).strong().color(t.text_dim));
ui.label(
egui::RichText::new(crate::i18n::tr("ui.ribbon_workspace").to_uppercase())
.size(crate::theme::Tokens::get().font_small)
.semibold()
.color(t.text_dim),
);
ui.add_space(8.0);
egui::ScrollArea::vertical().id_salt("workspace_menu_rows").max_height((height - 116.0).max(60.0)).show(ui, |ui| {
for (k, item) in items.iter().enumerate() {
@@ -1824,16 +1841,13 @@ fn workspace_menu(ui: &mut egui::Ui, items: &[Item], key_row: Option<usize>, hei
let name = crate::i18n::tr_label(&item.label);
let x = r.left() + 74.0;
let y = r.top() + 17.0;
let galley = egui::WidgetText::from(egui::RichText::new(name).strong().size(14.0).color(text)).into_galley(
ui,
Some(egui::TextWrapMode::Extend),
f32::INFINITY,
egui::TextStyle::Button,
);
let galley = egui::WidgetText::from(egui::RichText::new(name).semibold().size(crate::theme::Tokens::get().font_heading).color(text))
.into_galley(ui, Some(egui::TextWrapMode::Extend), f32::INFINITY, egui::TextStyle::Button);
let badge_x = x + galley.size().x + 9.0;
let origin = pos2(x, y - galley.size().y / 2.0);
ui.painter().galley(origin - vec2(0.2, 0.0), galley.clone(), text);
ui.painter().galley(origin + vec2(0.2, 0.0), galley, text);
let ppp = ui.ctx().pixels_per_point().max(0.5);
let origin = pos2((origin.x * ppp).round() / ppp, (origin.y * ppp).round() / ppp);
ui.painter().galley(origin, galley, text);
let badge = crate::i18n::tr(if planned {
"ui.workspace_planned"
} else if current {
@@ -1841,24 +1855,28 @@ fn workspace_menu(ui: &mut egui::Ui, items: &[Item], key_row: Option<usize>, hei
} else {
"ui.workspace_available"
});
let badge = ui.painter().layout_no_wrap(badge.to_string(), FontId::proportional(11.0), if current { t.on_accent } else { accent });
let badge = ui.painter().layout_no_wrap(
badge.to_string(),
FontId::proportional(crate::theme::Tokens::get().font_small),
if current { t.on_accent } else { accent },
);
let badge_rect = Rect::from_min_size(pos2(badge_x, y - 8.0), badge.size() + vec2(12.0, 3.0));
ui.painter().rect_filled(badge_rect, 8.0, if current { accent } else { soft });
ui.painter().galley(badge_rect.min + vec2(6.0, 1.5), badge, accent);
let line = |label: &str, y: f32| {
let mut job = egui::text::LayoutJob::simple_singleline(label.to_string(), FontId::proportional(12.0), text);
let line = |content: String, y: f32| {
let mut job =
egui::text::LayoutJob::simple_singleline(content, FontId::proportional(crate::theme::Tokens::get().font_body), text);
job.wrap.max_width = r.right() - x - 6.0;
job.wrap.max_rows = 1;
job.wrap.break_anywhere = false;
let galley = ui.painter().layout_job(job);
ui.painter().galley(pos2(x, y), galley, text);
};
line(crate::i18n::tr(description), r.top() + 29.0);
line(crate::i18n::tr(description).to_string(), r.top() + 29.0);
if let Some(tabs) = tabs {
// Reuse existing tab-name translations when a partial catalog falls back
// to the English summary; complete catalogs keep their translated summary.
// Translate each tab even when this composed message falls back to English.
let labels = crate::i18n::tr(tabs).split('·').map(|label| crate::i18n::tr_label(label.trim())).collect::<Vec<_>>().join(" · ");
line(&labels, r.top() + 47.0);
line(labels, r.top() + 47.0);
}
resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, item.enabled, name));
if resp.clicked() && item.enabled {
@@ -1869,7 +1887,12 @@ fn workspace_menu(ui: &mut egui::Ui, items: &[Item], key_row: Option<usize>, hei
ui.add_space(6.0);
ui.separator();
ui.add_space(6.0);
ui.add(egui::Label::new(egui::RichText::new(crate::i18n::tr("ui.workspace_footer")).size(11.0).color(t.text_dim)).wrap());
ui.add(
egui::Label::new(
egui::RichText::new(crate::i18n::tr("ui.workspace_footer")).size(crate::theme::Tokens::get().font_small).color(t.text_dim),
)
.wrap(),
);
ui.add_space(4.0);
});
picked
@@ -1897,6 +1920,27 @@ pub fn menu_frame<R>(ui: &mut egui::Ui, add: impl FnOnce(&mut egui::Ui) -> R) ->
.inner
}
/// A compact menu button with an explicit semantic icon, for native egui popup menus.
pub fn button(ui: &mut egui::Ui, label: &str, icon: &str) -> egui::Response {
button_enabled(ui, label, icon, true)
}
/// The disabled form keeps its icon visible and dims it with the menu row.
pub fn button_enabled(ui: &mut egui::Ui, label: &str, icon: &str, enabled: bool) -> egui::Response {
let response = ui
.add_enabled_ui(enabled, |ui| {
let icon_id = ui.id().with(("menu_icon", label));
let row = egui::Button::new((egui::Atom::custom(icon_id, vec2(16.0, 16.0)), label)).min_size(vec2(180.0, 22.0)).atom_ui(ui);
if let Some(rect) = row.rect(icon_id) {
icons::paint_icon(ui.painter(), rect, icon, if enabled { 1.0 } else { 0.35 });
}
row.response
})
.inner;
crate::scenario::publish_handle(&format!("menu:{label}"), response.rect.center());
response
}
/// One list row; the item when it was clicked.
pub fn list_row(ui: &mut egui::Ui, item: &Item) -> Option<Item> {
list_row_lit(ui, item, false)
@@ -1912,7 +1956,12 @@ pub fn list_row_lit(ui: &mut egui::Ui, item: &Item, lit: bool) -> Option<Item> {
return None;
}
if item.is_heading() {
let text = ui.painter().layout(crate::i18n::tr_label(&item.label).to_uppercase(), FontId::proportional(10.5), t.text_dim, w - 16.0);
let text = ui.painter().layout(
crate::i18n::tr_label(&item.label).to_uppercase(),
FontId::proportional(crate::theme::Tokens::get().font_panel),
t.text_dim,
w - 16.0,
);
let (r, _) = ui.allocate_exact_size(vec2(w, (text.size().y + 8.0).max(20.0)), Sense::hover());
ui.painter().galley(pos2(r.left() + 8.0, r.top() + 4.0), text, t.text_dim);
return None;
@@ -1935,10 +1984,23 @@ pub fn list_row_lit(ui: &mut egui::Ui, item: &Item, lit: bool) -> Option<Item> {
}
let text = if item.enabled { t.text } else { t.text_dim.gamma_multiply(0.75) };
let display_label = crate::i18n::tr_label(&item.label);
ui.painter().text(pos2(r.left() + 32.0, r.center().y), Align2::LEFT_CENTER, display_label, FontId::proportional(13.0), text);
resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, item.enabled, display_label));
ui.painter().text(
pos2(r.left() + 32.0, r.center().y),
Align2::LEFT_CENTER,
display_label,
FontId::proportional(crate::theme::Tokens::get().font_button),
text,
);
if !item.shortcut.is_empty() {
let display_shortcut = crate::i18n::tr_label(&item.shortcut);
ui.painter().text(pos2(r.right() - 10.0, r.center().y), Align2::RIGHT_CENTER, display_shortcut, FontId::proportional(11.5), t.text_dim);
ui.painter().text(
pos2(r.right() - 10.0, r.center().y),
Align2::RIGHT_CENTER,
display_shortcut,
FontId::proportional(crate::theme::Tokens::get().font_caption),
t.text_dim,
);
}
(item.enabled && resp.clicked()).then(|| item.clone())
}
@@ -1955,7 +2017,7 @@ fn show_rename(app: &mut SolveApp, ctx: &egui::Context) {
let resp = crate::frame::area(egui::Id::new("sc_rename")).fixed_pos(r.at).constrain(true).order(egui::Order::Foreground).show(ctx, |ui| {
menu_frame(ui, |ui| {
ui.add_space(2.0);
ui.label(egui::RichText::new(crate::i18n::tr_label("Rename")).size(11.0).color(t.text_dim));
ui.label(egui::RichText::new(crate::i18n::tr_label("Rename")).size(crate::theme::Tokens::get().font_small).color(t.text_dim));
let te = ui.add(egui::TextEdit::singleline(&mut r.text).desired_width(200.0).id(egui::Id::new("sc_rename_text")));
if !r.focused {
// Start with the whole name selected, ready to type over.
@@ -2085,7 +2147,7 @@ mod tests {
#[test]
fn disabled_radial_menu_does_not_capture_right_button_hold() {
let mut app = SolveApp::new(solidcraft_engine::Session::default(), Default::default());
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
let point = pos2(600.0, 400.0);
app.viewport.mouse = Some(point);
for (time, events) in [
@@ -2165,6 +2227,27 @@ mod workspace_menu_tests {
use super::*;
use crate::scenario::{Harness, rect_of};
#[test]
fn workspace_titles_use_one_semibold_text_run() {
let ctx = crate::fonts::test_context();
let app = SolveApp::new(Default::default(), Default::default());
let list = items(&app, &Target::Workspace);
let mut output = ctx.run_ui(egui::RawInput::default(), |ui| {
workspace_menu(ui, &list, None, 1000.0);
});
output.textures_delta.clear();
let titles: Vec<_> = output
.shapes
.iter()
.filter_map(|s| match &s.shape {
egui::Shape::Text(text) if text.galley.text() == "Design" => Some(text),
_ => None,
})
.collect();
assert_eq!(titles.len(), 1, "workspace titles must never be drawn twice");
assert_eq!(titles[0].galley.job.sections[0].format.font_id, crate::fonts::semibold(14.0));
}
#[test]
fn workspace_rows_keep_switching_handles_and_disabled_render_behavior() {
let mut h = Harness::new();
+16 -5
View File
@@ -24,6 +24,7 @@
//! headless CPU render of the model with the current camera, in the window's theme, with the
//! section the viewport shows (no window needed); the ground grid and the origin's axes as the
//! window shows them, unless `grid` or `axes` says
//! - `ui.icon_audit {reset?, stop?}`: collect/drain requested icon names, resolved masters and placeholder flags;
//! - `ui.menu {x?, y?, target?, close?}`: open a context menu at a point (the viewport's marking
//! menu, or a browser menu with `target: {type: body|sketch|component, …}`); without a point,
//! the open menu and its items. `ui.menuPick {item}` runs an item by id or label;
@@ -668,6 +669,16 @@ fn dispatch(app: &mut SolveApp, ctx: &egui::Context, method: &str, p: &Value) ->
app.synthetic.push(egui::Event::Text(s("text").unwrap_or("").to_string()));
ok(Value::Null)
}
"ui.icon_audit" => {
if b("reset") {
crate::icon_svg::audit::start();
}
let requested = crate::icon_svg::audit::take();
if b("stop") {
crate::icon_svg::audit::stop();
}
ok(json!({"requested": requested}))
}
"ui.menu" => {
if b("close") {
crate::context_menu::close(app);
@@ -957,7 +968,7 @@ mod tests {
#[test]
fn touchpad_text_prefix_does_not_collapse_queued_pointer_frames() {
let mut app = SolveApp::new(Session::default(), Services::default());
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
let (req, _) = ControlRequest::new("ui.text", json!({"text":"prefix"}));
assert!(matches!(handle(&mut app, &ctx, &req), Outcome::Done(_)));
for params in [json!({"x":10,"y":10,"shift":true}), json!({"x":20,"y":20,"alt":true}), json!({"x":30,"y":30})] {
@@ -981,7 +992,7 @@ mod tests {
#[test]
fn touchpad_automation_preserves_each_queued_moves_modifiers() {
let mut app = SolveApp::new(Session::default(), Services::default());
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
for params in [json!({"x":10,"y":10,"shift":true}), json!({"x":20,"y":20,"alt":true}), json!({"x":30,"y":30})] {
let (req, _) = ControlRequest::new("ui.move", params);
assert!(matches!(handle(&mut app, &ctx, &req), Outcome::Done(_)));
@@ -1003,7 +1014,7 @@ mod tests {
fn render(app: &mut SolveApp, path: &std::path::Path) -> Vec<u8> {
let (req, _rx) = ControlRequest::new("ui.render", json!({"path": path.to_string_lossy(), "width": 200, "height": 140}));
match handle(app, &egui::Context::default(), &req) {
match handle(app, &crate::fonts::test_context(), &req) {
Outcome::Done(v) => assert_eq!(v["ok"], true, "{v}"),
Outcome::Screenshot { .. } => panic!("ui.render took a screenshot"),
}
@@ -1073,7 +1084,7 @@ mod tests {
params[k.as_str()] = v.clone();
}
let (req, _rx) = ControlRequest::new("ui.render", params);
match handle(app, &egui::Context::default(), &req) {
match handle(app, &crate::fonts::test_context(), &req) {
Outcome::Done(v) => assert_eq!(v["ok"], true, "{v}"),
Outcome::Screenshot { .. } => panic!("ui.render took a screenshot"),
}
@@ -1348,7 +1359,7 @@ mod tests {
params["allow_paths"] = json!([root.to_string_lossy()]);
}
let (req, _rx) = ControlRequest::new(method, params);
match handle(&mut app, &egui::Context::default(), &req) {
match handle(&mut app, &crate::fonts::test_context(), &req) {
Outcome::Done(v) => v,
Outcome::Screenshot { path } => json!({"ok": true, "screenshot": path}),
}
+7 -6
View File
@@ -1,6 +1,7 @@
//! The Crash Reports window (Help > Crash Reports…): the reports `solidcraft_engine::crash`
//! keeps on this computer, each with a reviewed issue draft. It opens by itself after a crash.
use crate::fonts::RichTextExt as _;
use egui::{RichText, vec2};
use solidcraft_engine::crash::{self, Summary};
@@ -88,7 +89,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
if ui.small_button("Copy folder path").clicked() {
ctx.copy_text(d.clone());
}
ui.add(egui::Label::new(RichText::new(&d).monospace().size(11.0)).truncate()).on_hover_text(&d);
ui.add(egui::Label::new(RichText::new(&d).monospace().size(crate::theme::Tokens::get().font_small)).truncate()).on_hover_text(&d);
});
}
ui.separator();
@@ -98,14 +99,14 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
egui::ScrollArea::vertical().max_height(320.0).show(ui, |ui| {
for r in &app.crashes.reports {
ui.horizontal(|ui| {
ui.label(RichText::new(report_heading(r)).strong());
ui.label(RichText::new(report_heading(r)).semibold().color(crate::theme::Tokens::get().text));
if let Some(c) = &r.command {
ui.label(RichText::new(c).monospace().size(11.0).color(t.text_dim));
ui.label(RichText::new(c).monospace().size(crate::theme::Tokens::get().font_small).color(t.text_dim));
}
});
ui.label(RichText::new(&r.message).size(12.0));
ui.label(RichText::new(&r.message).size(t.font_body));
if r.kind == "unclean_exit" {
ui.label(RichText::new(crate::i18n::tr("crash.unclean_explanation")).size(12.0).color(t.text_dim));
ui.label(RichText::new(crate::i18n::tr("crash.unclean_explanation")).size(t.font_body).color(t.text_dim));
}
ui.horizontal(|ui| {
if ui.small_button("Report…").clicked() {
@@ -118,7 +119,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
delete = Some(Some(r.id.clone()));
}
if r.replayable {
ui.label(RichText::new("replayable").size(11.0).color(t.text_dim));
ui.label(RichText::new("replayable").size(crate::theme::Tokens::get().font_small).color(t.text_dim));
}
});
ui.add_space(6.0);
+6 -2
View File
@@ -5,6 +5,7 @@
//! Document Settings, the root component's menu and `ui.start` of `document.metadata` or
//! `document.metadata.set` open it.
use crate::fonts::RichTextExt as _;
use egui::RichText;
use serde_json::{Map, Value};
use solidcraft_engine::doc::metadata::{DESCRIPTION, WELL_KNOWN};
@@ -89,7 +90,10 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
let mut open = true;
let (mut ok, mut cancel) = (false, false);
let metadata = app.session.doc.metadata.clone();
let title = RichText::new(crate::i18n::tr_label("Design Properties")).strong().size(13.0);
let title = RichText::new(crate::i18n::tr_label("Design Properties"))
.semibold()
.color(crate::theme::Tokens::get().text)
.size(crate::theme::Tokens::get().font_button);
crate::frame::window(ctx, title, crate::frame::Width::Normal)
.id(egui::Id::new("sc_design_properties"))
.open(&mut open)
@@ -123,7 +127,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
ui.label(RichText::new(crate::i18n::tr("ui.design_properties.others_note")).small().color(t.text_dim));
egui::ScrollArea::vertical().max_height(160.0).show(ui, |ui| {
for (k, v) in others {
ui.label(RichText::new(k).monospace().size(12.0).color(t.text));
ui.label(RichText::new(k).monospace().size(crate::theme::Tokens::get().font_body).color(t.text));
ui.label(RichText::new(preview(v)).monospace().small().color(t.text_dim));
}
});
File diff suppressed because it is too large Load Diff
+322
View File
@@ -0,0 +1,322 @@
//! Each ribbon feature form keeps its parameter builder while sharing the dense layout.
use super::*;
use crate::scenario::{self, Harness};
fn fixture() -> Harness {
let mut h = Harness::new();
for (name, x) in [("A", 0), ("B", 30), ("C", 60), ("D", 90)] {
h.app.run("component.activate", json!({"component":"root"})).unwrap();
h.app.run("component.create", json!({"name":name})).unwrap();
h.app.run("solid.cylinder", json!({"base":[x,0,0],"radius":10,"height":5})).unwrap();
}
h.app.run("component.activate", json!({"component":"root"})).unwrap();
h.app.run("occurrence.ground", json!({"occurrence":"A:1","grounded":true})).unwrap();
for (name, kind) in [("B", "revolute"), ("C", "cylindrical"), ("D", "slider")] {
h.app.run("joint.as_built", json!({"name":name,"type":kind,"a":"A","b":name})).unwrap();
}
for (name, offset) in [("Base", 0), ("Top", 10)] {
h.app.run("sketch.create", json!({"plane":"XY","offset":offset,"name":name})).unwrap();
h.app.run("sketch.rectangle.two_point", json!({"p0":[12,0],"p1":[16,4]})).unwrap();
h.app.run("sketch.finish", json!({})).unwrap();
}
h.app.run("sketch.create", json!({"plane":"XZ","name":"Path"})).unwrap();
h.app.run("sketch.line", json!({"points":[[0,0],[0,20]]})).unwrap();
h.app.run("sketch.finish", json!({})).unwrap();
h
}
fn representative(h: &Harness, command: &str) -> Dialog {
let mut d = Dialog::for_command(&h.app, command).unwrap();
let s = &h.app.session;
let profiles: Vec<_> = s.world_state().sketches.iter().take(2).map(|sk| Sel::Profile { sketch: sk.feature, index: 0 }).collect();
let path = s.world_state().sketches.last().unwrap().sketch.curves.first().unwrap().id.clone();
for (index, input) in d.inputs.iter_mut().enumerate() {
if command == "joint.gear" {
continue;
}
if matches!(input.label, "Rail" | "Second Rail" | "Pass through" | "Direction" | "Roller (optional)" | "Tip (optional)") {
continue;
}
let name = if index == 1 && command != "surface.ruled" { "Body2" } else { "Body1" };
let point = if index == 1 && command != "surface.ruled" { Vec3::new(30.0, 0.0, 5.0) } else { Vec3::new(0.0, 0.0, 5.0) };
input.items = if command == "construct.point.along_path" {
vec![edge_sel(s, Vec3::new(10.0, 0.0, 5.0)).unwrap()]
} else if input.accept & PROFILES != 0 {
if matches!(d.kind, Kind::Loft { .. } | Kind::Surface(crate::dialogs_surface::Surf::Loft { .. })) {
profiles.clone()
} else {
vec![profiles[0].clone()]
}
} else if input.accept & BODIES != 0 {
if matches!(command, "joint.as_built" | "joint.rigid_group") {
vec![Sel::Body { name: "Body1".into() }, Sel::Body { name: "Body2".into() }]
} else {
vec![Sel::Body { name: name.into() }]
}
} else if input.accept & PLANES != 0 {
vec![Sel::Plane { name: if index == 1 { "XZ" } else { "XY" }.into() }]
} else if input.accept & CURVES != 0 || command == "sheet.fold" && index == 0 {
vec![Sel::SketchCurve { id: path.clone() }]
} else if input.accept & AXES != 0 {
vec![Sel::Axis { name: "Z".into() }]
} else if input.accept & (FACES | PLANAR_FACES) != 0 {
vec![face_sel(s, point).unwrap()]
} else if input.accept & EDGES != 0 {
vec![edge_sel(s, Vec3::new(10.0, 0.0, 5.0)).unwrap()]
} else {
Vec::new()
};
}
if let Kind::PathPlane { sketch, .. } = &mut d.kind {
*sketch = Some(s.world_state().sketches.last().unwrap().feature);
}
if let Kind::Mirror = &d.kind {
d.extra.insert("combine".into(), json!(false));
}
if let Kind::BoundaryFill { cells, .. } = &mut d.kind {
cells.push((Vec3::new(0.0, 0.0, 2.0), "Cell".into(), true));
}
if let Kind::Thread { designation, .. } = &mut d.kind {
*designation = "M20x2.5".into();
}
if let Kind::Assembly(crate::dialogs_assembly::Asm::Cam(f)) = &mut d.kind {
f.b = s.doc.assembly.joints[2].id;
}
d
}
fn check_form(command: &str, labels: &[&str]) {
let mut h = fixture();
let mut d = representative(&h, command);
assert_eq!(super::command(&d.kind), Some(command));
let spec = solidcraft_engine::find_command(command).unwrap();
assert!(!spec.icon.is_empty());
let expected = apply_commands(&h.app, &d).unwrap_or_else(|e| panic!("{command}: representative parameters: {e}"));
// Rendering must never discard an optional/default value or add a new parameter.
for _ in 0..3 {
scenario::clear_handles();
let mut out = h.ctx.run_ui(
egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(egui::Pos2::ZERO, vec2(320.0, 1600.0))), ..Default::default() },
|ui| {
ui.set_width(264.0);
ui_kit::scope(ui, |ui| {
ui_kit::header(ui, spec.icon, tr(spec.label), || {});
rows(&mut h.app, &h.ctx, &mut d, ui);
ui_kit::footer(ui, "OK", "Cancel", true, None);
});
},
);
out.textures_delta.clear();
h.output = out.platform_output;
}
let nodes = &h.output.accesskit_update.as_ref().unwrap().nodes;
for input in &d.inputs {
assert!(scenario::rect_of(&format!("dialog:field:{}", input.label)).is_some(), "{command}: selection field {}", input.label);
assert!(
nodes.iter().any(|(_, n)| n.role() == egui::accesskit::Role::Button && n.label() == Some(input.label)),
"{command}: picker {} is a button",
input.label
);
}
for label in labels {
if let Some(role) = control_role(command, label) {
if *label == "Animate" || *label == "Radius" && command == "joint.rack_pinion" {
let control = scenario::rect_of(&format!("dialog:control:{label}")).unwrap();
assert!(
nodes.iter().any(|(_, n)| n.role() == role
&& n.bounds().is_some_and(|b| control.contains(egui::pos2(((b.x0 + b.x1) / 2.0) as f32, ((b.y0 + b.y1) / 2.0) as f32)))),
"{command}: {label} uses {role:?}"
);
continue;
}
assert!(nodes.iter().any(|(_, n)| n.role() == role && n.label() == Some(tr(label))), "{command}: {label} uses {role:?}");
}
}
let checks: &[&str] = match command {
"solid.shell" => &["Tangent Chain"],
"solid.rib" | "solid.web" | "solid.align" | "sheet.flange" | "sheet.hem" | "sheet.fold" | "joint.create" => &["Flip"],
"solid.move" => &["Create Copy"],
"solid.combine" => &["Keep Tools", "New Component"],
"solid.thread" => &["Modeled", "Full Length", "Automatic size"],
"solid.boundary_fill" => &["Remove Tools"],
"surface.offset" => &["Tangent chain"],
"surface.trim" => &["Extend to meet", "Stitch the kept pieces"],
"surface.ruled" => &["Flip"],
"surface.untrim" => &["Restore outer boundary", "In place (surfaces)"],
"component.create" => &["Activate"],
"joint.gear" => &["Reverse", "Internal gear"],
"joint.rack_pinion" | "joint.screw" => &["Reverse"],
"joint.cam" => &["Other side"],
_ => &[],
};
for label in checks {
assert!(nodes.iter().any(|(_, n)| n.role() == egui::accesskit::Role::CheckBox && n.label() == Some(*label)), "{command}: option {label}");
}
assert_eq!(scenario::count_of("dialog:ok:enabled"), Some(1.0), "{command}");
assert_eq!(apply_commands(&h.app, &d).unwrap(), expected, "{command}: drawing is lossless");
let mut label_width: Option<f32> = None;
for label in d.inputs.iter().map(|i| i.label).chain(labels.iter().copied()) {
let row = scenario::rect_of(&format!("dialog:row:{label}")).unwrap_or_else(|| panic!("{command}: missing dense row {label}"));
let label_rect = scenario::rect_of(&format!("dialog:label:{label}")).unwrap();
let control = scenario::rect_of(&format!("dialog:control:{label}")).unwrap();
assert_eq!(row.height(), Tokens::get().control_height, "{command}: {label}");
// The label column is the design's width, widened to the longest label, equally for every row.
let t = Tokens::get();
assert!(label_rect.width() >= t.form_label_width && label_rect.width() <= t.form_label_width * 1.6, "{command}: {label}");
if let Some(first) = label_width {
assert_eq!(label_rect.width(), first, "{command}: {label} lines up with the other rows");
}
label_width = Some(label_rect.width());
assert!(row.contains_rect(control), "{command}: {label}");
assert!(scenario::handle_at(&format!("dialog:{label}")).is_some() || scenario::rect_of(&format!("dialog:control:{label}")).is_some());
}
assert!(scenario::rect_of("dialog:footer").is_some());
assert!(scenario::handle_at("dialog:ok").is_some());
assert!(scenario::handle_at("dialog:cancel").is_some());
let mut out = h.ctx.run_ui(egui::RawInput::default(), |ui| {
ui_kit::scope(ui, |ui| {
assert_eq!(ui_kit::footer(ui, "OK", "Cancel", false, None), ui_kit::Action::None);
});
});
out.textures_delta.clear();
assert_eq!(scenario::count_of("dialog:ok:enabled"), Some(0.0), "{command}");
}
fn control_role(command: &str, label: &str) -> Option<egui::accesskit::Role> {
use egui::accesskit::Role;
Some(match label {
"Type" if matches!(command, "sheet.flange" | "sheet.hem" | "solid.revolve" | "solid.emboss") => return None,
"Direction" => return None, // segmented buttons, labelled by each choice
"Continuity" | "Corners" | "Cells" | "Profile" => return None,
"Operation" if command == "solid.mirror" => return None,
"Operation" | "Type" | "Orientation" | "Move Type" | "Object Type" | "Rule" | "Rim Edge" | "Catch Direction" | "Shape" | "Holes" | "Size"
| "Bend Line Position" | "From Snap" | "To Snap" | "Joint" | "Joint 1" | "Joint 2" | "Gear 1" | "Gear 2" | "Pinion" | "Rack" | "Screw"
| "Nut" | "Cam" | "Follower" => Role::ComboBox,
"Radius" if command == "joint.rack_pinion" => Role::Label,
"Pitch" if command == "solid.thread" => Role::ComboBox,
"Automatic size" | "Reverse" | "Other side" => Role::CheckBox,
"Animate" => Role::Button,
"Ratio" if command.starts_with("joint.") && command != "joint.motion_link" => return None,
_ => Role::TextInput,
})
}
macro_rules! form_case {
($name:ident, $command:literal, [$($label:literal),*]) => {
#[test] fn $name() { check_form($command, &[$($label),*]); }
};
}
form_case!(revolve, "solid.revolve", ["Angle", "Direction", "Type"]);
form_case!(shell, "solid.shell", ["Thickness", "Direction"]);
form_case!(draft, "solid.draft", ["Angle"]);
form_case!(mirror, "solid.mirror", ["Operation"]);
form_case!(loft, "solid.loft", ["Operation"]);
form_case!(sweep, "solid.sweep", ["Orientation"]);
form_case!(offset_plane, "construct.plane.offset", ["Distance"]);
form_case!(midplane, "construct.plane.midplane", []);
form_case!(mesh_convert, "mesh.convert", ["Tolerance"]);
form_case!(axis_two_planes, "construct.axis.two_planes", []);
form_case!(point_along_path, "construct.point.along_path", ["Position (0 to 1)"]);
form_case!(angle_plane, "construct.plane.at_angle", ["Angle"]);
form_case!(path_plane, "construct.plane.along_path", ["Position (0 to 1)"]);
form_case!(split, "solid.split_body", []);
form_case!(scale, "solid.scale", ["Scale factor"]);
form_case!(offset_faces, "solid.offset_face", ["Distance"]);
form_case!(move_copy, "solid.move", ["Move Type", "X Distance", "Y Distance", "Z Distance", "X Angle", "Y Angle", "Z Angle"]);
form_case!(rib, "solid.rib", ["Direction", "Thickness", "Depth"]);
form_case!(web, "solid.web", ["Direction", "Thickness", "Depth"]);
form_case!(emboss, "solid.emboss", ["Depth", "Type"]);
form_case!(replace_face, "solid.replace_face", []);
form_case!(boundary_fill, "solid.boundary_fill", ["Cells", "Operation"]);
form_case!(align, "solid.align", ["From Snap", "To Snap"]);
form_case!(remove, "solid.remove", []);
form_case!(path_pattern, "solid.pattern.path", ["Type", "Object Type", "Quantity", "Spacing"]);
form_case!(pipe, "solid.pipe", ["Diameter", "Wall"]);
form_case!(stock, "solid.bounding_solid", ["Margin"]);
form_case!(thread, "solid.thread", ["Profile", "Size", "Pitch", "Designation"]);
form_case!(primitive_box, "solid.box", ["length", "width", "height", "Operation"]);
form_case!(cylinder, "solid.cylinder", ["diameter", "height", "Operation"]);
form_case!(sphere, "solid.sphere", ["diameter", "Operation"]);
form_case!(torus, "solid.torus", ["major", "minor", "Operation"]);
form_case!(coil, "solid.coil", ["diameter", "revolutions", "pitch", "section_size", "Operation"]);
form_case!(combine, "solid.combine", ["Operation"]);
form_case!(surface_extrude, "surface.extrude", ["Distance", "Direction"]);
form_case!(surface_revolve, "surface.revolve", ["Angle", "Direction"]);
form_case!(surface_sweep, "surface.sweep", ["Orientation"]);
form_case!(surface_loft, "surface.loft", []);
form_case!(surface_patch, "surface.patch", ["Continuity"]);
form_case!(surface_unstitch, "surface.unstitch", []);
form_case!(surface_reverse, "surface.reverse_normal", []);
form_case!(surface_offset, "surface.offset", ["Distance"]);
form_case!(surface_ruled, "surface.ruled", ["Distance", "Type", "Corners"]);
form_case!(surface_stitch, "surface.stitch", ["Tolerance"]);
form_case!(thicken, "surface.thicken", ["Thickness", "Direction", "Operation"]);
form_case!(surface_extend, "surface.extend", ["Distance"]);
form_case!(surface_trim, "surface.trim", []);
form_case!(surface_untrim, "surface.untrim", ["Holes"]);
form_case!(split_face, "solid.split_face", []);
form_case!(flange, "sheet.flange", ["Type", "Rule"]);
form_case!(hem, "sheet.hem", ["Type", "Length", "ui.sheet_gap"]);
form_case!(fold, "sheet.fold", ["Bend Line Position", "Angle", "Bend Radius"]);
form_case!(unfold, "sheet.unfold", []);
form_case!(refold, "sheet.refold", []);
form_case!(sheet_convert, "sheet.convert", ["Rule"]);
form_case!(boss, "plastic.boss", ["Diameter", "Height", "Hole Diameter", "Hole Depth"]);
form_case!(lip, "plastic.lip", ["Type", "Rim Edge", "Width", "Height"]);
form_case!(snap_fit, "plastic.snap_fit", ["Catch Direction", "Length", "Thickness", "Width", "Catch Depth", "Catch Length"]);
form_case!(rest, "plastic.rest", ["Shape", "Diameter", "Height"]);
form_case!(plastic_assign, "plastic.assign_rule", ["Rule"]);
form_case!(component, "component.create", ["Name"]);
form_case!(joint, "joint.create", ["Type", "Angle"]);
form_case!(as_built, "joint.as_built", ["Type"]);
form_case!(joint_origin, "joint.origin", ["Name"]);
form_case!(rigid_group, "joint.rigid_group", []);
form_case!(motion_link, "joint.motion_link", ["Joint 1", "Joint 2", "Ratio", "Offset"]);
form_case!(gear, "joint.gear", ["Gear 1", "Radius 1", "Gear 2", "Radius 2", "Ratio", "Animate"]);
form_case!(rack, "joint.rack_pinion", ["Pinion", "Radius", "Rack", "Ratio", "Animate"]);
form_case!(screw, "joint.screw", ["Screw", "Nut", "Pitch", "Ratio", "Animate"]);
form_case!(cam, "joint.cam", ["Cam", "Follower", "Type", "Animate"]);
form_case!(trace, "motion.trace", ["Joint", "From", "To", "Samples"]);
#[test]
fn registry_dialog_inventory_has_no_unclassified_feature_forms() {
let h = fixture();
for spec in solidcraft_engine::command_specs() {
let Some(d) = Dialog::for_command(&h.app, spec.id) else { continue };
let excluded = matches!(
d.kind,
Kind::Params { .. }
| Kind::Rename { .. }
| Kind::ConfirmDelete { .. }
| Kind::Measure { .. }
| Kind::Material { .. }
| Kind::Section { .. }
| Kind::SaveMesh(_)
| Kind::ViewDxf { .. }
| Kind::Appearance(_)
| Kind::Motion(_)
| Kind::Part(_)
| Kind::Sheet(crate::dialogs_sheet::Sm::Rules { .. } | crate::dialogs_sheet::Sm::FlatPattern { .. })
| Kind::Plastic(crate::dialogs_plastic::Pl::Rules { .. })
| Kind::Assembly(crate::dialogs_assembly::Asm::Drive { .. } | crate::dialogs_assembly::Asm::Interference { .. })
);
assert_eq!(super::command(&d.kind).is_some(), !excluded, "{}: {:?}", spec.id, d.kind);
}
}
#[test]
fn new_cards_settle_before_the_first_click_in_both_layouts() {
for mode in [crate::shell::LayoutMode::Floating, crate::shell::LayoutMode::Docked] {
for command in ["solid.box", "solid.revolve", "solid.shell", "joint.create"] {
let mut h = fixture();
h.call("ui.set", json!({"layout":mode}));
h.call("ui.resize", json!({"width":1400,"height":950}));
h.app.dialog = Some(representative(&h, command));
h.frames(2);
let first = scenario::rect_of("dialog:footer").unwrap();
h.frames(1);
let settled = scenario::rect_of("dialog:footer").unwrap();
assert_eq!(first, settled, "{command} {mode:?}: footer moved under the first click");
}
}
}
+115 -115
View File
@@ -5,6 +5,7 @@
//! before the click. Joints and drives preview on the placed (world) model: the moving
//! component shows where it goes, and with Animate the joint plays its motion.
use crate::fonts::RichTextExt as _;
use egui::{Color32, Pos2, RichText, Stroke, vec2};
use serde_json::{Value, json};
use solidcraft_engine::Sel;
@@ -14,7 +15,7 @@ use solidcraft_engine::doc::joints::JointKind;
use solidcraft_engine::geom::{Aabb3, Mesh, Vec3};
use crate::SolveApp;
use crate::dialogs::{Dialog, Kind, combo, field, row_label};
use crate::dialogs::{Dialog, Kind, combo, field, form_row, row_label};
use crate::preview::{Built, Colors};
use crate::selection::{BODIES, EDGES, FACES, SelInput, VERTICES};
use crate::theme::Tokens;
@@ -518,13 +519,10 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, k: &mut Asm, inputs: &mut [Se
let problem = joint_problem(app, k, inputs);
match k {
Asm::NewComponent { name, activate } => {
row_label(ui, "Name");
let r = ui.add(egui::TextEdit::singleline(name).hint_text(crate::i18n::tr_label("Component1")));
enter |= r.lost_focus() && ui.input(|i| i.key_pressed(egui::Key::Enter));
ui.end_row();
row_label(ui, "Activate");
ui.checkbox(activate, "");
ui.end_row();
form_row(ui, "Name", |ui| {
enter |= crate::ui_kit::text_field(ui, name, crate::i18n::tr_label("Component1")).0;
});
crate::ui_kit::options(ui, "component_options", &mut [("Activate", activate)]);
}
Asm::Joint(f) => {
// As-built: two components picked, the position comes next.
@@ -533,63 +531,65 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, k: &mut Asm, inputs: &mut [Se
}
// Picks that make no joint say why, under them, and offer the way out (#1239).
if let Some((why, bodies)) = problem {
row_label(ui, "");
ui.vertical(|ui| {
ui.add(egui::Label::new(RichText::new(why).color(t.warning)).wrap());
if !bodies.is_empty()
&& ui.button(crate::i18n::tr("cmd.component_from_bodies")).on_hover_text(crate::i18n::tr("joint.from_bodies_hint")).clicked()
&& crate::ui_kit::secondary_button(ui, crate::i18n::tr("cmd.component_from_bodies"))
.on_hover_text(crate::i18n::tr("joint.from_bodies_hint"))
.clicked()
{
// A refusal shows on the status line; the picks stay either way.
let _ = app.run("component.from_bodies", json!({ "bodies": bodies }));
}
});
ui.end_row();
}
row_label(ui, "Motion");
ui.label("");
ui.end_row();
row_label(ui, "Type");
combo(ui, "jt_type", &TYPE_LABELS, &mut f.kind);
ui.end_row();
form_row(ui, "Motion", |ui| {
ui.label("");
});
form_row(ui, "Type", |ui| {
combo(ui, "jt_type", &TYPE_LABELS, &mut f.kind);
});
f.fit_limits();
if !f.as_built {
row_label(ui, "Angle");
enter |= field(ui, &mut f.angle);
ui.end_row();
for (l, v) in ["Offset X", "Offset Y", "Offset Z"].iter().zip(f.offset.iter_mut()) {
if f.editing.is_some() && *l != "Offset Z" {
continue;
form_row(ui, "Angle", |ui| {
enter |= field(ui, &mut f.angle);
});
crate::ui_kit::section(ui, "joint_position", "Position", false, |ui| {
for (l, v) in ["Offset X", "Offset Y", "Offset Z"].iter().zip(f.offset.iter_mut()) {
if f.editing.is_some() && *l != "Offset Z" {
continue;
}
form_row(ui, l, |ui| {
enter |= field(ui, v);
});
}
row_label(ui, l);
enter |= field(ui, v);
ui.end_row();
}
row_label(ui, "Flip");
ui.checkbox(&mut f.flip, "");
ui.end_row();
});
crate::ui_kit::options(ui, "joint_options", &mut [("Flip", &mut f.flip)]);
}
let kind = f.joint_kind();
if kind != JointKind::Rigid {
row_label(ui, "Animate");
let label = if f.animate { "■ Stop" } else { "▶ Play" };
if ui.button(label).on_hover_text("Play the joint's motion in the view").clicked() {
f.animate = !f.animate;
}
ui.end_row();
for (i, (on, lo, hi)) in f.limits.iter_mut().enumerate() {
let name = kind.dofs().get(i).copied().unwrap_or("value");
row_label(ui, &format!("{} limits", capital(name)));
ui.checkbox(on, "");
ui.end_row();
if *on {
row_label(ui, " Minimum");
enter |= field(ui, lo);
ui.end_row();
row_label(ui, " Maximum");
enter |= field(ui, hi);
ui.end_row();
form_row(ui, "Animate", |ui| {
let label = if f.animate { "■ Stop" } else { "▶ Play" };
if crate::ui_kit::secondary_button(ui, label).on_hover_text("Play the joint's motion in the view").clicked() {
f.animate = !f.animate;
}
}
});
crate::ui_kit::section(ui, "joint_limits", "Limits", false, |ui| {
for (i, (on, lo, hi)) in f.limits.iter_mut().enumerate() {
let name = kind.dofs().get(i).copied().unwrap_or("value");
form_row(ui, &format!("{} limits", capital(name)), |ui| {
crate::ui_kit::checkbox(ui, "", on);
});
if *on {
form_row(ui, " Minimum", |ui| {
enter |= field(ui, lo);
});
form_row(ui, " Maximum", |ui| {
enter |= field(ui, hi);
});
}
}
});
} else {
f.animate = false;
}
@@ -601,10 +601,9 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, k: &mut Asm, inputs: &mut [Se
}
}
Asm::JointOrigin { name, .. } => {
row_label(ui, "Name");
let r = ui.add(egui::TextEdit::singleline(name).hint_text(crate::i18n::tr_label("Joint Origin1")));
enter |= r.lost_focus() && ui.input(|i| i.key_pressed(egui::Key::Enter));
ui.end_row();
form_row(ui, "Name", |ui| {
enter |= crate::ui_kit::text_field(ui, name, crate::i18n::tr_label("Joint Origin1")).0;
});
}
Asm::RigidGroup => {}
Asm::Drive { joint, values, focus } => {
@@ -677,7 +676,7 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, k: &mut Asm, inputs: &mut [Se
row_label(ui, "");
ui.label(
RichText::new(format!("{} … {}{}", fmt(lo), fmt(hi), if limited { " (limits)" } else { " (no limits)" }))
.size(11.0)
.size(crate::theme::Tokens::get().font_small)
.color(if limited { t.text } else { t.text_dim }),
);
ui.end_row();
@@ -694,50 +693,50 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, k: &mut Asm, inputs: &mut [Se
let s = &app.session;
let joints = &s.doc.assembly.joints;
if joints.len() < 2 {
row_label(ui, "");
ui.label(RichText::new(crate::i18n::tr_label("needs two joints")).color(t.text_dim));
ui.end_row();
form_row(ui, "", |ui| {
ui.label(RichText::new(crate::i18n::tr_label("needs two joints")).color(t.text_dim));
});
return false;
}
let labels: Vec<&str> = joints.iter().map(|j| j.name.as_str()).collect();
for (l, sel, idx, id) in [("Joint 1", &mut *a, &mut *ia, "ml_a"), ("Joint 2", &mut *b, &mut *ib, "ml_b")] {
row_label(ui, l);
combo(ui, id, &labels, sel);
ui.end_row();
form_row(ui, l, |ui| {
combo(ui, id, &labels, sel);
});
let dofs = joints.get(*sel).map(|j| j.kind.dofs()).unwrap_or(&[]);
if dofs.len() > 1 {
row_label(ui, " Value");
let caps: Vec<String> = dofs.iter().map(|d| capital(d)).collect();
let refs: Vec<&str> = caps.iter().map(String::as_str).collect();
combo(ui, &format!("{id}_i"), &refs, idx);
ui.end_row();
form_row(ui, " Value", |ui| {
let caps: Vec<String> = dofs.iter().map(|d| capital(d)).collect();
let refs: Vec<&str> = caps.iter().map(String::as_str).collect();
combo(ui, &format!("{id}_i"), &refs, idx);
});
} else {
*idx = 0;
}
}
row_label(ui, "Ratio");
enter |= field(ui, ratio);
ui.end_row();
row_label(ui, "Offset");
enter |= field(ui, offset);
ui.end_row();
form_row(ui, "Ratio", |ui| {
enter |= field(ui, ratio);
});
form_row(ui, "Offset", |ui| {
enter |= field(ui, offset);
});
}
Asm::Coupling(f) => enter |= crate::dialogs_coupling::rows(app, ui, f, inputs),
Asm::Cam(f) => enter |= crate::dialogs_coupling::cam::rows(app, ui, f, inputs),
Asm::Interference { result, overlaps, of, clearance } => {
let picked: Vec<Sel> = inputs.first().map(|i| i.items.clone()).unwrap_or_default();
row_label(ui, "Clearance");
field(ui, clearance);
ui.end_row();
row_label(ui, "");
let stale = result.is_some() && *of != picked;
if ui.button(crate::i18n::tr(if stale { "dialog.compute_again" } else { "dialog.compute" })).clicked() {
let (r, o) = interference(app, &picked, clearance);
*result = Some(r);
*overlaps = o;
*of = picked;
}
ui.end_row();
form_row(ui, "Clearance", |ui| {
enter |= field(ui, clearance);
});
form_row(ui, "", |ui| {
let stale = result.is_some() && *of != picked;
if crate::ui_kit::secondary_button(ui, crate::i18n::tr(if stale { "dialog.compute_again" } else { "dialog.compute" })).clicked() {
let (r, o) = interference(app, &picked, clearance);
*result = Some(r);
*overlaps = o;
*of = picked;
}
});
if let Some(r) = result.as_ref() {
interference_rows(app, ui, r);
}
@@ -785,65 +784,66 @@ fn interference(app: &mut SolveApp, picked: &[Sel], clearance: &str) -> (Value,
fn interference_rows(app: &SolveApp, ui: &mut egui::Ui, r: &Value) {
let t = Tokens::get();
if let Some(e) = r.get("error").and_then(Value::as_str) {
row_label(ui, "");
ui.label(RichText::new(e).color(t.error));
ui.end_row();
form_row(ui, "", |ui| {
ui.label(RichText::new(e).color(t.error));
});
return;
}
let hits = r["overlaps"].as_array().cloned().unwrap_or_default();
row_label(ui, "Checked");
ui.label(crate::i18n::format("dialog.bodies_count", &[("count", &r["bodies"].as_u64().unwrap_or(0).to_string())]));
ui.end_row();
form_row(ui, "Checked", |ui| {
ui.label(crate::i18n::format("dialog.bodies_count", &[("count", &r["bodies"].as_u64().unwrap_or(0).to_string())]));
});
let unchecked = r["unchecked"].as_array().cloned().unwrap_or_default();
let near = r["near"].as_array().cloned().unwrap_or_default();
let pair = |h: &Value| format!("{} · {}", h["a"].as_str().unwrap_or(""), h["b"].as_str().unwrap_or(""));
if hits.is_empty() && unchecked.is_empty() {
row_label(ui, "Result");
ui.label(RichText::new(crate::i18n::tr_label("no interference")).color(t.text_dim));
ui.end_row();
form_row(ui, "Result", |ui| {
ui.label(RichText::new(crate::i18n::tr_label("no interference")).color(t.text_dim));
});
}
// Pairs closer than the clearance, nearest first.
if !near.is_empty() {
row_label(ui, "Too close");
ui.label(RichText::new(crate::i18n::tr("ui.distance")).strong());
ui.end_row();
form_row(ui, "Too close", |ui| {
ui.label(RichText::new(crate::i18n::tr("ui.distance")).semibold().color(crate::theme::Tokens::get().text));
});
}
for h in &near {
row_label(ui, &pair(h));
ui.label(RichText::new(crate::prefs::show_mm(app, h["distance_mm"].as_f64().unwrap_or(0.0), 1)).color(t.warning));
ui.end_row();
form_row(ui, &pair(h), |ui| {
ui.label(RichText::new(crate::prefs::show_mm(app, h["distance_mm"].as_f64().unwrap_or(0.0), 1)).color(t.warning));
});
}
// Each body's nearest neighbour.
let nearest = r["nearest"].as_object().cloned().unwrap_or_default();
if !nearest.is_empty() {
row_label(ui, "Nearest");
ui.label(RichText::new(crate::i18n::tr("ui.distance")).strong());
ui.end_row();
form_row(ui, "Nearest", |ui| {
ui.label(RichText::new(crate::i18n::tr("ui.distance")).semibold().color(crate::theme::Tokens::get().text));
});
}
for (body, list) in &nearest {
let Some(n) = list.get(0) else { continue };
row_label(ui, &format!("{body} → {}", n["body"].as_str().unwrap_or("")));
ui.label(crate::prefs::show_mm(app, n["distance_mm"].as_f64().unwrap_or(0.0), 1));
ui.end_row();
form_row(ui, &format!("{body} → {}", n["body"].as_str().unwrap_or("")), |ui| {
ui.label(crate::prefs::show_mm(app, n["distance_mm"].as_f64().unwrap_or(0.0), 1));
});
}
if hits.is_empty() && unchecked.is_empty() {
return;
}
if !hits.is_empty() {
row_label(ui, "Interferes");
ui.label(RichText::new(crate::i18n::tr_label("Volume")).strong());
ui.end_row();
form_row(ui, "Interferes", |ui| {
ui.label(RichText::new(crate::i18n::tr_label("Volume")).semibold().color(crate::theme::Tokens::get().text));
});
}
for h in hits {
row_label(ui, &format!("{} · {}", h["a"].as_str().unwrap_or(""), h["b"].as_str().unwrap_or("")));
ui.label(RichText::new(crate::prefs::show_mm(app, h["volume_mm3"].as_f64().unwrap_or(0.0), 3)).color(t.error));
ui.end_row();
form_row(ui, &format!("{} · {}", h["a"].as_str().unwrap_or(""), h["b"].as_str().unwrap_or("")), |ui| {
ui.label(RichText::new(crate::prefs::show_mm(app, h["volume_mm3"].as_f64().unwrap_or(0.0), 3)).color(t.error));
});
}
// Pairs the check could not work out: not clear, not known to interfere.
for u in unchecked {
row_label(ui, &format!("{} · {}", u["a"].as_str().unwrap_or(""), u["b"].as_str().unwrap_or("")));
ui.label(RichText::new(crate::i18n::tr("dialog.could_not_be_checked")).color(t.warning)).on_hover_text(u["reason"].as_str().unwrap_or(""));
ui.end_row();
form_row(ui, &format!("{} · {}", u["a"].as_str().unwrap_or(""), u["b"].as_str().unwrap_or("")), |ui| {
ui.label(RichText::new(crate::i18n::tr("dialog.could_not_be_checked")).color(t.warning))
.on_hover_text(u["reason"].as_str().unwrap_or(""));
});
}
}
@@ -1297,7 +1297,7 @@ pub fn timeline_joints_vertical(app: &mut SolveApp, ui: &mut egui::Ui) {
return;
}
ui.add_space(4.0);
ui.label(egui::RichText::new("JOINTS").size(10.0).strong().color(t.text_dim));
ui.label(egui::RichText::new("JOINTS").size(crate::theme::Tokens::get().font_micro).semibold().color(t.text_dim));
let mut open = None;
let mut run = None;
for (id, name, kind, suppressed) in joints {
@@ -1317,7 +1317,7 @@ pub fn timeline_joints_vertical(app: &mut SolveApp, ui: &mut egui::Ui) {
egui::pos2(icon.right() + 7.0, rect.center().y),
egui::Align2::LEFT_CENTER,
&name,
egui::FontId::proportional(12.0),
egui::FontId::proportional(crate::theme::Tokens::get().font_body),
if suppressed { t.text_dim } else { t.text },
);
let response = response.on_hover_text(format!("{name} ({kind:?} joint)\nDouble-click to edit · right-click for more"));
+3 -3
View File
@@ -215,7 +215,7 @@ fn ok_click_survives_a_busy_preview() {
f.animate = true;
}
app.dialog = Some(d);
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
let screen = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1600.0, 1000.0));
let frame = |app: &mut SolveApp, busy: bool, events: Vec<egui::Event>| {
app.preview.busy = busy;
@@ -267,7 +267,7 @@ fn picks_on_one_component_say_why_and_offer_components() {
d.pick(&app.session, face_sel(&app.session, Vec3::new(40.0, 10.0, 0.0)).unwrap());
assert!(apply_commands(&app, &d).is_err(), "one component: no joint");
app.dialog = Some(d);
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
let screen = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1600.0, 1000.0));
let frame = |app: &mut SolveApp, events: Vec<egui::Event>| {
let input = egui::RawInput { screen_rect: Some(screen), events, ..Default::default() };
@@ -335,7 +335,7 @@ fn drive_value_takes_the_keyboard() {
app.run("joint.create", json!({"type": "revolute", "a": {"occurrence": a, "face": [10, 10, 10]}, "b": {"occurrence": b, "face": [40, 10, 0]}}))
.unwrap();
app.start("joint.drive");
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
let screen = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1600.0, 1000.0));
let frame = |app: &mut SolveApp, events: Vec<egui::Event>| {
let input = egui::RawInput { screen_rect: Some(screen), events, ..Default::default() };
+19 -23
View File
@@ -12,7 +12,7 @@ use solidcraft_engine::doc::joints::JointKind;
use super::{ROUND, joint_row, occurrence, pick, picked_radius, trim, turn};
use crate::SolveApp;
use crate::dialogs::{check, combo, field, row_label};
use crate::dialogs::{combo, field, form_row};
use crate::dialogs_assembly::Asm;
use crate::selection::{EDGES, FACES, PROFILES, SelInput, VERTICES};
use crate::theme::Tokens;
@@ -85,9 +85,9 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, f: &mut CamForm, inputs: &[Se
let s = &app.session;
let (cams, followers) = (joints_of(s, &[JointKind::Revolute]), joints_of(s, &[JointKind::Slider, JointKind::Revolute]));
if cams.is_empty() || followers.len() < 2 && followers.iter().all(|j| cams.iter().any(|c| c.0 == j.0)) {
row_label(ui, "");
ui.label(RichText::new(crate::i18n::tr_label("needs a joint that turns and one that slides or swings")).color(t.text_dim));
ui.end_row();
form_row(ui, "", |ui| {
ui.label(RichText::new(crate::i18n::tr_label("needs a joint that turns and one that slides or swings")).color(t.text_dim));
});
return false;
}
// A profile picked on a part chooses the joint that part turns on, once.
@@ -107,13 +107,12 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, f: &mut CamForm, inputs: &[Se
let mut enter = false;
joint_row(ui, "Cam", "cam_a", &cams, &mut f.a);
joint_row(ui, "Follower", "cam_b", &followers, &mut f.b);
row_label(ui, "Type");
let labels: Vec<&str> = FOLLOWER_LABELS.iter().map(|l| crate::i18n::tr_label(l)).collect();
combo(ui, "cam_follower", &labels, &mut f.follower);
ui.end_row();
form_row(ui, "Type", |ui| {
let labels: Vec<&str> = FOLLOWER_LABELS.iter().map(|l| crate::i18n::tr_label(l)).collect();
combo(ui, "cam_follower", &labels, &mut f.follower);
});
if FOLLOWERS.get(f.follower) == Some(&"roller") {
row_label(ui, "Radius");
match (pick(inputs, ROLLER), picked_radius(s, inputs, ROLLER)) {
form_row(ui, "Radius", |ui| match (pick(inputs, ROLLER), picked_radius(s, inputs, ROLLER)) {
(_, Some(r)) => {
ui.label(format!("{} mm ({})", trim(r), crate::i18n::tr_label("picked")));
}
@@ -121,20 +120,17 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, f: &mut CamForm, inputs: &[Se
ui.label(RichText::new(crate::i18n::tr_label("not a round face")).color(t.warning));
}
(None, None) => enter |= field(ui, &mut f.radius),
});
}
crate::ui_kit::options(ui, "cam_options", &mut [("Other side", &mut f.flip)]);
form_row(ui, "Animate", |ui| {
let label = if f.animate { "■ Stop" } else { "▶ Play" };
let r = crate::ui_kit::secondary_button(ui, label).on_hover_text(crate::i18n::tr_label("Play the joint's motion in the view"));
crate::scenario::publish_handle("dialog:Animate", r.rect.center());
if r.clicked() {
f.animate = !f.animate;
}
ui.end_row();
}
row_label(ui, "Other side");
check(ui, &mut f.flip);
ui.end_row();
row_label(ui, "Animate");
let label = if f.animate { "■ Stop" } else { "▶ Play" };
let r = ui.button(label).on_hover_text(crate::i18n::tr_label("Play the joint's motion in the view"));
crate::scenario::publish_handle("dialog:Animate", r.rect.center());
if r.clicked() {
f.animate = !f.animate;
}
ui.end_row();
});
if f.animate {
let now = ui.input(|i| i.time);
// 72 steps over 6 s: each one a preview.
+1 -1
View File
@@ -67,7 +67,7 @@ fn a_picked_cam_edge_makes_the_cam() {
let pick = edge(&app, Vec3::new(-20.0, 0.0, 5.0));
d.pick(&app.session, pick);
app.dialog = Some(d);
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
for _ in 0..3 {
let input =
egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1600.0, 1000.0))), ..Default::default() };
+38 -39
View File
@@ -11,7 +11,7 @@ use solidcraft_engine::Session;
use solidcraft_engine::doc::expr::Kind as ValueKind;
use crate::SolveApp;
use crate::dialogs::{check, combo, field, row_label};
use crate::dialogs::{combo, field, form_row};
use crate::dialogs_assembly::Asm;
use crate::selection::{EDGES, FACES, SelInput};
use crate::theme::Tokens;
@@ -119,9 +119,9 @@ fn size(s: &Session, f: &CouplingForm, inputs: &[SelInput], i: usize) -> Option<
fn joint_row(ui: &mut egui::Ui, label: &str, salt: &str, list: &[(u64, String)], sel: &mut u64) {
let labels: Vec<&str> = list.iter().map(|j| j.1.as_str()).collect();
let mut pos = list.iter().position(|j| j.0 == *sel).unwrap_or(0);
row_label(ui, label);
combo(ui, salt, &labels, &mut pos);
ui.end_row();
form_row(ui, label, |ui| {
combo(ui, salt, &labels, &mut pos);
});
*sel = list.get(pos).map(|j| j.0).unwrap_or(0);
}
@@ -132,10 +132,10 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, f: &mut CouplingForm, inputs:
let ([role_a, role_b], turn_b) = roles(f.command);
let (la, lb) = (joints_that(s, true), joints_that(s, turn_b));
if la.is_empty() || lb.is_empty() {
row_label(ui, "");
let need = if turn_b { "needs two joints that turn" } else { "needs a joint that turns and one that slides" };
ui.label(RichText::new(crate::i18n::tr_label(need)).color(t.text_dim));
ui.end_row();
form_row(ui, "", |ui| {
let need = if turn_b { "needs two joints that turn" } else { "needs a joint that turns and one that slides" };
ui.label(RichText::new(crate::i18n::tr_label(need)).color(t.text_dim));
});
return false;
}
// A face picked on a part chooses the joint that part turns on, once.
@@ -157,18 +157,18 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, f: &mut CouplingForm, inputs:
}
let mut enter = false;
let size_row = |ui: &mut egui::Ui, label: &str, i: usize, text: &mut String, enter: &mut bool| {
row_label(ui, label);
match (pick(inputs, i), picked_radius(s, inputs, i)) {
(_, Some(r)) => {
ui.label(format!("{} mm ({})", trim(r), crate::i18n::tr_label("picked")));
form_row(ui, label, |ui| {
match (pick(inputs, i), picked_radius(s, inputs, i)) {
(_, Some(r)) => {
ui.label(format!("{} mm ({})", trim(r), crate::i18n::tr_label("picked")));
}
// A pick on a flat face or a straight edge has no radius: say so rather than fail on OK.
(Some(_), None) => {
ui.label(RichText::new(crate::i18n::tr_label("not a round face")).color(t.warning));
}
(None, None) => *enter |= field(ui, text),
}
// A pick on a flat face or a straight edge has no radius: say so rather than fail on OK.
(Some(_), None) => {
ui.label(RichText::new(crate::i18n::tr_label("not a round face")).color(t.warning));
}
(None, None) => *enter |= field(ui, text),
}
ui.end_row();
});
};
joint_row(ui, role_a, "cp_a", &la, &mut f.a);
let [s0, s1] = &mut f.sizes;
@@ -177,9 +177,6 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, f: &mut CouplingForm, inputs:
size_row(ui, "Radius 1", 0, s0, &mut enter);
joint_row(ui, role_b, "cp_b", &lb, &mut f.b);
size_row(ui, "Radius 2", 1, s1, &mut enter);
row_label(ui, "Internal gear");
check(ui, &mut f.internal);
ui.end_row();
}
"joint.rack_pinion" => {
size_row(ui, "Radius", 0, s0, &mut enter);
@@ -187,14 +184,16 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, f: &mut CouplingForm, inputs:
}
_ => {
joint_row(ui, role_b, "cp_b", &lb, &mut f.b);
row_label(ui, "Pitch");
enter |= field(ui, s0);
ui.end_row();
form_row(ui, "Pitch", |ui| {
enter |= field(ui, s0);
});
}
}
row_label(ui, "Reverse");
check(ui, &mut f.reverse);
ui.end_row();
if f.command == "joint.gear" {
crate::ui_kit::options(ui, "coupling_options", &mut [("Internal gear", &mut f.internal), ("Reverse", &mut f.reverse)]);
} else {
crate::ui_kit::options(ui, "coupling_options", &mut [("Reverse", &mut f.reverse)]);
}
// What the coupling does, as joint.list gives a link's ratio.
let sign = |neg: bool| if neg { -1.0 } else { 1.0 };
let shown = match f.command {
@@ -204,17 +203,17 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, f: &mut CouplingForm, inputs:
"joint.rack_pinion" => size(s, f, inputs, 0).map(|r| format!("{} mm / deg", trim(r.to_radians() * sign(f.reverse)))),
_ => size(s, f, inputs, 0).map(|p| format!("{} mm / deg", trim(p / 360.0 * sign(f.reverse)))),
};
row_label(ui, "Ratio");
ui.label(RichText::new(shown.unwrap_or_else(|| "-".into())).color(t.text_dim));
ui.end_row();
row_label(ui, "Animate");
let label = if f.animate { "■ Stop" } else { "▶ Play" };
let r = ui.button(label).on_hover_text(crate::i18n::tr_label("Play the joint's motion in the view"));
crate::scenario::publish_handle("dialog:Animate", r.rect.center());
if r.clicked() {
f.animate = !f.animate;
}
ui.end_row();
form_row(ui, "Ratio", |ui| {
ui.label(RichText::new(shown.unwrap_or_else(|| "-".into())).color(t.text_dim));
});
form_row(ui, "Animate", |ui| {
let label = if f.animate { "■ Stop" } else { "▶ Play" };
let r = crate::ui_kit::secondary_button(ui, label).on_hover_text(crate::i18n::tr_label("Play the joint's motion in the view"));
crate::scenario::publish_handle("dialog:Animate", r.rect.center());
if r.clicked() {
f.animate = !f.animate;
}
});
if f.animate {
let now = ui.input(|i| i.time);
// 48 steps over 4 s: each one a preview.
+2 -2
View File
@@ -72,7 +72,7 @@ fn picked_gear_faces_choose_their_joints_and_radii() {
d.pick(&app.session, pick);
}
app.dialog = Some(d);
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
let screen = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1600.0, 1000.0));
let frame = |app: &mut SolveApp| {
let input = egui::RawInput { screen_rect: Some(screen), ..Default::default() };
@@ -134,7 +134,7 @@ fn instances_of_one_gear_are_coupled_as_two() {
d.pick(&app.session, pick);
}
app.dialog = Some(d);
let ctx = egui::Context::default();
let ctx = crate::fonts::test_context();
for _ in 0..2 {
let input =
egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1600.0, 1000.0))), ..Default::default() };
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -1,6 +1,8 @@
//! The first local appearance-library consumer, inside the existing Appearance panel.
#[cfg(not(target_arch = "wasm32"))]
use crate::dialogs_appearance::selected_params;
#[cfg(not(target_arch = "wasm32"))]
use crate::fonts::RichTextExt as _;
use crate::{SolveApp, dialogs::row_label, dialogs_appearance::Ap, selection::SelInput, theme::Tokens};
use egui::RichText;
use serde_json::json;
@@ -153,7 +155,7 @@ fn import_rows(app: &mut SolveApp, ui: &mut egui::Ui, k: &mut Ap, inputs: &[SelI
}
});
if let Some(catalog) = &k.local.catalog {
ui.label(RichText::new(&catalog.name).strong());
ui.label(RichText::new(&catalog.name).semibold().color(crate::theme::Tokens::get().text));
let search = ui.add(egui::TextEdit::singleline(&mut k.local.search).hint_text("Search this library").desired_width(200.0));
crate::scenario::publish_handle("library:search", search.rect.center());
if search.changed() {

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