* ui: spacing, radius and type tokens, per-tab accents, agent and on-accent tokens * ui: per-tab accent behaviour and a larger application bar with a Start page button * icons: silhouette master and flat assistant and agent link icons (open for review) * icons: apply review notes (sparkle assistant, refined plug, silhouette halo) * icons: wire the silhouette master to inspect.silhouette; record the accepted icons * ui: application bar to the design: separators, Save, house, assistant icon, readable hovers * ui: ribbon structure: Model to View tabs, contextual Sketch and Sheet Metal, migrated pins * ui: ribbon painting to the compact design * ui: smaller icon button highlight and assistant mark on the bubble corner * ui: short ribbon labels that wrap at spaces * ui: ribbon buttons fit their labels and Finish Sketch shows its full name * ui: constraint gallery, workspace menu, section list headings and richer tooltips * ui: lighter selected tab label, ribbon surface and dimmer bar separators match the dark design * ui: document tabs as rounded chips with a dimmer inactive label * ui: document tabs fit their names and show close only when active or hovered * icons: close and plus masters for the document tabs (open for review) * ui: centre the new-tab plus and overflow button on the bar * ui: a quiet rule under the ribbon tabs on non-contextual tabs * ui: the application bar mark separates its faces with the bar colour, not white * ui: open ribbon section label uses the selected tint and a chevron * ui: dim the tab close and plus icons until hovered * ui: every ribbon dropdown uses the chevron, the workspace card included * ui: the active document tab uses the design's surface colour * ui: the bug button's right padding mirrors its icon side * ui: square constraint cells and a rule before the grid * ui: constraint cells back to their earlier size, keeping the rule * ui: smaller constraint cells and icons, centred in the section * ui: constraint cells fit the height of the large buttons' icon and label * ui: sketch Create titles share the other labels' line * ui: format the application bar and ribbon changes * ui: active tab surface token and the colour and hover tests that follow the redesign * tests: the merged parameter and narrow toolbar tests follow the compact ribbon * i18n: the Malay Gap label has an English source and its Japanese and Chinese translations * apply_off_thread tests: the evaluation lingers in tests, so still computing never depends on machine speed --------- Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
This commit is contained in:
1 parent
3606d44ad9
commit
a0c1a67220
84 files changed
+3592
-910
No files matched your search
@@ -137,6 +137,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/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/fit.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/folder.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/help.svg | SolidCraft contributors | single-colour application/navigation icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
|
||||
@@ -145,6 +146,7 @@ Editable drawing code, native projects and shipped exports are collected under `
|
||||
| assets/icons/ui/design/svg/flat/moon.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/nav_settings.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/orbit.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/plus.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/pan.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/perspective.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/redo.svg | SolidCraft contributors | single-colour application/navigation icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
|
||||
@@ -281,6 +283,8 @@ Editable drawing code, native projects and shipped exports are collected under `
|
||||
| assets/icons/ui/design/svg/model/perforate.svg | SolidCraft contributors | two-tone modelling icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
|
||||
| assets/icons/ui/design/svg/model/pipe.svg | SolidCraft contributors | two-tone modelling icon master (64 grid), original SolidCraft artwork | MIT OR Apache-2.0 |
|
||||
| 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/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 |
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"accessibility": "012aa26ece9ffa8bd6a850b7a19279c3675164b12438f5fbfe560e575c8fe2eb",
|
||||
"activate": "9d28c47dcb0b733095eadc840a30fa898a19f9cf9eee203496386546666cb1f8",
|
||||
"agent_chat": "4a9ae0e7e2c360b4858b3175674c93d096705c92318fecd481e849f3ae650bf4",
|
||||
"agent_link": "2f20d89a0e3e9b28744910dddf7f282a1099ccd91aa160c9841c5b1d9ea9ed0f",
|
||||
"align": "05615db7dd9e4be56ae898e59a68c548b8a8447794442a9a394940651204bc4f",
|
||||
"appearance": "b3162edd92291a5ef402e8499cd52be05beb2fa7eda641163c3f6e98325de2bf",
|
||||
"arc3": "fdca3d501fd557ac989376a12e9c4fa8231fde2b455c20724d1079a466153e9c",
|
||||
@@ -12,6 +13,7 @@
|
||||
"arc_slot_center": "ba93e773e06e948fcf3c6dab28df341c07d35c6a3afa33a840b261bb82bcf32b",
|
||||
"arc_tangent": "d6910c8d42878cc34617b96e26c3018f4a6e4e793443ac81f2c294f88d70fa28",
|
||||
"as_built": "0f481932deca5586a8a8ea3d707efca0747f5c59559d53830b694d3458531013",
|
||||
"assistant": "8fac392b16b4f13c6a399c59962b97c1912282e0ec909976496959472f1d642d",
|
||||
"auto_constrain": "012e5da4ff83449f6a3a92ee2d9924998cbeea545281bdf97873710b7436183d",
|
||||
"axis": "66ebabe43a7b1b73b59a3a03b7bd92ab54d899947d0cc2d93ad6e6aac4d76501",
|
||||
"axis_edge": "5a65898bc38bdaaaf5b04f2c2f7556915b5b7b1fdc4de9708fcc30f64aa1ab18",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<title>Connected agent</title>
|
||||
<path d="M25 7L25 24M39 7L39 24" fill="none" stroke="currentColor" stroke-width="5" stroke-linejoin="round" stroke-linecap="round"/>
|
||||
<path d="M16 25L48 25L48 31Q48 41 38 41L36 41L36 47L28 47L28 41L26 41Q16 41 16 31Z" fill="currentColor" stroke="currentColor" stroke-width="3" stroke-linejoin="round" stroke-linecap="round"/>
|
||||
<path d="M32 47L32 57" fill="none" stroke="currentColor" stroke-width="4.25" stroke-linejoin="round" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 558 B |
@@ -0,0 +1,11 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<title>Assistant</title>
|
||||
<defs>
|
||||
<mask id="assistant-sparkle" maskUnits="userSpaceOnUse" x="-32" y="-32" width="128" height="128">
|
||||
<path d="M-32 -32L96 -32L96 96L-32 96Z" fill="white"/>
|
||||
<path d="M28 18.5Q30.3 27.7 39.5 30Q30.3 32.3 28 41.5Q25.7 32.3 16.5 30Q25.7 27.7 28 18.5Z" fill="black"/>
|
||||
<path d="M43.5 15.5Q44.6 19.9 49 21Q44.6 22.1 43.5 26.5Q42.4 22.1 38 21Q42.4 19.9 43.5 15.5Z" fill="black"/>
|
||||
</mask>
|
||||
</defs>
|
||||
<path d="M15 11.5L49 11.5Q55 11.5 55 17.5L55 40.5Q55 46.5 49 46.5L30 46.5L18 55L18 46.5L15 46.5Q9 46.5 9 40.5L9 17.5Q9 11.5 15 11.5Z" fill="currentColor" stroke="currentColor" stroke-width="3" stroke-linejoin="round" stroke-linecap="round" mask="url(#assistant-sparkle)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 792 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<title>Close</title>
|
||||
<path d="M19 19L45 45M45 19L19 45" fill="none" stroke="currentColor" stroke-width="5" stroke-linejoin="round" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 228 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<title>Plus</title>
|
||||
<path d="M32 14L32 50M14 32L50 32" fill="none" stroke="currentColor" stroke-width="5" stroke-linejoin="round" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 227 B |
@@ -98,10 +98,6 @@ pub(crate) fn breadcrumb(p: &egui::Painter, c: egui::Pos2, col: Color32) {
|
||||
p.line_segment([pos2(c.x + 1.5, c.y), pos2(c.x - 1.5, c.y + 3.0)], s);
|
||||
}
|
||||
|
||||
pub(crate) fn caret(p: &egui::Painter, c: egui::Pos2, col: Color32) {
|
||||
p.add(egui::Shape::convex_polygon(vec![pos2(c.x - 3.5, c.y - 2.0), pos2(c.x + 3.5, c.y - 2.0), pos2(c.x, c.y + 2.5)], col, Stroke::NONE));
|
||||
}
|
||||
|
||||
pub(crate) fn brand_mark(p: &egui::Painter, c: Pos2) {
|
||||
let s = 20.0 / 412.217;
|
||||
let m = |pts: &[(f32, f32)]| -> Vec<egui::Pos2> { pts.iter().map(|&(x, y)| pos2(c.x + (x - 178.5) * s, c.y + (y - 206.1) * s)).collect() };
|
||||
@@ -109,7 +105,9 @@ pub(crate) fn brand_mark(p: &egui::Painter, c: Pos2) {
|
||||
let face = |col: Color32, pts: &[(f32, f32)]| {
|
||||
p.add(egui::Shape::convex_polygon(m(pts), col, Stroke::NONE));
|
||||
};
|
||||
let [light, mid, dark, edge_col] = crate::theme::Tokens::get().logo;
|
||||
// The faces are separated by gaps that show the application bar, not by white lines.
|
||||
let [light, mid, dark, _] = crate::theme::Tokens::get().logo;
|
||||
let edge_col = crate::theme::Tokens::get().app_bar;
|
||||
face(light, &[(3.5, 105.9), (177.0, 5.8), (263.4, 55.6), (263.8, 156.0), (177.0, 406.4)]);
|
||||
face(light, &[(177.0, 206.1), (263.8, 156.0), (350.5, 206.2), (350.5, 306.3), (177.0, 406.4)]);
|
||||
face(mid, &[(3.5, 105.9), (177.0, 206.1), (177.0, 406.4)]);
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. Otevřete níže koncept na GitHubu a vložte hlášení zkopírované do schránky.",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. Otevřete níže koncept na GitHubu. Název a hlášení se vyplní automaticky.",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Přiložte snímek obrazovky: zkopírujte a vložte jej, nebo uložte a nahrajte PNG.",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. Hlášení odešlete na GitHubu tlačítkem Submit new issue.",
|
||||
"A new configuration, a copy of the active one": "Nová konfigurace, kopie aktivní",
|
||||
"AI": "AI",
|
||||
"ARRANGE": "USPOŘÁDAT",
|
||||
"About SolidCraft": "O aplikaci SolidCraft",
|
||||
"Active": "Aktivní",
|
||||
"Active rule": "Aktivní pravidlo",
|
||||
@@ -36,6 +38,12 @@
|
||||
"Body": "Těleso",
|
||||
"Boundary": "Hranice",
|
||||
"Bounding box": "Ohraničující kvádr",
|
||||
"CHECK": "KONTROLA",
|
||||
"COMPONENTS": "KOMPONENTY",
|
||||
"CONFIGURATIONS": "KONFIGURACE",
|
||||
"CONSTRAIN": "VAZBY",
|
||||
"CONTACT": "KONTAKT",
|
||||
"CONVERT": "PŘEVÉST",
|
||||
"CSV or JSON: updates existing parameters, adds new ones": "CSV nebo JSON: aktualizuje existující parametry, přidá nové",
|
||||
"Capture All Positions": "Zachytit všechny polohy",
|
||||
"Catch Direction": "Směr záchytu",
|
||||
@@ -101,6 +109,8 @@
|
||||
"Export hidden edges as dashed lines": "Exportovat skryté hrany čárkovaně",
|
||||
"Extend to meet": "Prodloužit k protnutí",
|
||||
"Extents": "Rozsahy",
|
||||
"FILES": "SOUBORY",
|
||||
"FLAT": "ROZVIN",
|
||||
"Face": "Plocha",
|
||||
"Face attachment lost": "Připojení k ploše ztraceno",
|
||||
"Faces": "Plochy",
|
||||
@@ -117,21 +127,26 @@
|
||||
"From edges": "Výchozí hrany",
|
||||
"Full Length": "Celá délka",
|
||||
"Grid": "Mřížka",
|
||||
"HISTORY": "HISTORIE",
|
||||
"Height": "Výška",
|
||||
"Hidden edges": "Skryté hrany",
|
||||
"Holes": "Otvory",
|
||||
"Holes (edges on them)": "Otvory (jejich hrany)",
|
||||
"Home view": "Výchozí pohled",
|
||||
"IMAGES": "OBRÁZKY",
|
||||
"In This Design": "V tomto návrhu",
|
||||
"In place (surfaces)": "Na místě (plochy)",
|
||||
"In plane": "V rovině",
|
||||
"Inside": "Uvnitř",
|
||||
"Interferes": "Koliduje",
|
||||
"Issue title": "Název hlášení",
|
||||
"JOINTS": "SPOJE",
|
||||
"Joint Origin1": "Počátek kloubu1",
|
||||
"Keep (points on it)": "Ponechat (body na ní)",
|
||||
"Keep Tools": "Ponechat nástroje",
|
||||
"Keep of the other surface": "Ponechat z druhé plochy",
|
||||
"LIBRARY": "KNIHOVNA",
|
||||
"LINKS": "ODKAZY",
|
||||
"Later": "Později",
|
||||
"Leave it": "Nechat být",
|
||||
"Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Starší typ připojení k ploše. Novým navázáním na ověřenou plochu vznikne přesné připojení.",
|
||||
@@ -141,6 +156,10 @@
|
||||
"Library": "Knihovna",
|
||||
"Line Spacing": "Řádkování",
|
||||
"Loop": "Smyčka",
|
||||
"MANAGE": "SPRÁVA",
|
||||
"MATERIALS": "MATERIÁLY",
|
||||
"MODEL": "MODEL",
|
||||
"MOTION": "POHYB",
|
||||
"Margin": "Okraj",
|
||||
"Mass": "Hmotnost",
|
||||
"Material": "Materiál",
|
||||
@@ -163,6 +182,7 @@
|
||||
"Normal to sketch": "Kolmo ke skice",
|
||||
"Not available yet": "Zatím není k dispozici",
|
||||
"Notch": "Zářez",
|
||||
"OUTPUT": "VÝSTUP",
|
||||
"Opacity": "Neprůhlednost",
|
||||
"Open GitHub draft": "Otevřít koncept na GitHubu",
|
||||
"Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "Open-source parametrický 3D CAD v jazyce Rust. Licence MIT OR Apache-2.0.",
|
||||
@@ -187,7 +207,9 @@
|
||||
"Profiles/Curves": "Profily/křivky",
|
||||
"Projection": "Promítání",
|
||||
"RECENT": "NEDÁVNÉ",
|
||||
"REFERENCE": "REFERENCE",
|
||||
"RULED SURFACE": "PŘÍMKOVÁ PLOCHA",
|
||||
"RULES": "PRAVIDLA",
|
||||
"Radius Fit": "Proložení poloměrem",
|
||||
"Ratio": "Poměr",
|
||||
"Reattach selected face": "Znovu připojit k vybrané ploše",
|
||||
@@ -219,6 +241,8 @@
|
||||
"Roll History Marker Here": "Přesunout značku historie sem",
|
||||
"Round": "Zaoblený",
|
||||
"Rule": "Pravidlo",
|
||||
"SECTION": "ŘEZ",
|
||||
"SURFACE QUALITY": "KVALITA POVRCHU",
|
||||
"Save Rule": "Uložit pravidlo",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "Uložit studii jako animovaný GIF tak, jak ji zobrazuje pohled",
|
||||
"Saved preview. Geometry is being checked before editing.": "Uložený náhled. Geometrie se před úpravou kontroluje.",
|
||||
@@ -285,6 +309,7 @@
|
||||
"Use saved fixed plane": "Použít uloženou pevnou rovinu",
|
||||
"Use selected face as fixed plane": "Použít vybranou plochu jako pevnou rovinu",
|
||||
"VIEW": "POHLED",
|
||||
"VIEWS": "POHLEDY",
|
||||
"Value": "Hodnota",
|
||||
"Vertices": "Vrcholy",
|
||||
"View navigator": "Navigátor pohledu",
|
||||
@@ -1351,6 +1376,8 @@
|
||||
"ui.restore_defaults": "Obnovit výchozí",
|
||||
"ui.reverse_zoom_direction": "Obrátit směr přiblížení",
|
||||
"ui.revolve": "Rotace",
|
||||
"ui.ribbon_exit": "Ukončit",
|
||||
"ui.ribbon_workspace": "Pracovní prostředí",
|
||||
"ui.right": "Zprava",
|
||||
"ui.save": "Uložit",
|
||||
"ui.save_as": "Uložit jako",
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. Unten den GitHub-Entwurf öffnen und den kopierten Bericht aus der Zwischenablage einfügen.",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. Unten den GitHub-Entwurf öffnen. Titel und Bericht werden vorausgefüllt.",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Screenshot anhängen: kopieren und einfügen oder als PNG speichern und hochladen.",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. Auf GitHub auf Submit new issue klicken, um den Bericht zu senden.",
|
||||
"AI": "KI",
|
||||
"ARRANGE": "ANORDNEN",
|
||||
"Acceleration": "Beschleunigung",
|
||||
"Against": "Gegen",
|
||||
"Alignment": "Ausrichtung",
|
||||
@@ -13,6 +15,12 @@
|
||||
"BROWSER": "BROWSER",
|
||||
"Bends": "Biegungen",
|
||||
"Boundary": "Begrenzung",
|
||||
"CHECK": "PRÜFEN",
|
||||
"COMPONENTS": "KOMPONENTEN",
|
||||
"CONFIGURATIONS": "KONFIGURATIONEN",
|
||||
"CONSTRAIN": "ABHÄNGIGKEITEN",
|
||||
"CONTACT": "KONTAKT",
|
||||
"CONVERT": "KONVERTIEREN",
|
||||
"Centre to centre": "Mitte zu Mitte",
|
||||
"Check collisions": "Kollisionen prüfen",
|
||||
"Circumference": "Umfang",
|
||||
@@ -41,20 +49,31 @@
|
||||
"Export DXF…": "DXF exportieren…",
|
||||
"Export hidden edges as dashed lines": "Verdeckte Kanten gestrichelt exportieren",
|
||||
"Extend to meet": "Verlängern, bis sie sich treffen",
|
||||
"FILES": "DATEIEN",
|
||||
"FLAT": "ABWICKLUNG",
|
||||
"Face": "Fläche",
|
||||
"Faces": "Flächen",
|
||||
"Find in Browser": "Im Browser suchen",
|
||||
"Flat": "Flach",
|
||||
"From edges": "Ausgangskanten",
|
||||
"HISTORY": "VERLAUF",
|
||||
"Hidden edges": "Verdeckte Kanten",
|
||||
"Holes": "Löcher",
|
||||
"Holes (edges on them)": "Löcher (ihre Kanten)",
|
||||
"IMAGES": "BILDER",
|
||||
"In place (surfaces)": "An Ort und Stelle (Flächen)",
|
||||
"In plane": "In der Ebene",
|
||||
"Inside": "Innen",
|
||||
"JOINTS": "GELENKE",
|
||||
"Keep (points on it)": "Behalten (Punkte darauf)",
|
||||
"Keep of the other surface": "Vom anderen Flächenkörper behalten",
|
||||
"LIBRARY": "BIBLIOTHEK",
|
||||
"LINKS": "VERKNÜPFUNGEN",
|
||||
"Length": "Länge",
|
||||
"MANAGE": "VERWALTEN",
|
||||
"MATERIALS": "MATERIALIEN",
|
||||
"MODEL": "MODELL",
|
||||
"MOTION": "BEWEGUNG",
|
||||
"Max": "Max",
|
||||
"Min": "Min",
|
||||
"Mitre": "Gehrung",
|
||||
@@ -63,6 +82,7 @@
|
||||
"None": "Keine",
|
||||
"Normal to sketch": "Normal zur Skizze",
|
||||
"Notch": "Ausklinkung",
|
||||
"OUTPUT": "AUSGABE",
|
||||
"Other surface (mutual trim)": "Anderer Flächenkörper (gegenseitig trimmen)",
|
||||
"Outside": "Außen",
|
||||
"Overall length": "Gesamtlänge",
|
||||
@@ -75,7 +95,9 @@
|
||||
"Profiles/Curves": "Profile/Kurven",
|
||||
"Projection": "Projektion",
|
||||
"Quantity": "Größe",
|
||||
"REFERENCE": "REFERENZ",
|
||||
"RULED SURFACE": "REGELFLÄCHE",
|
||||
"RULES": "REGELN",
|
||||
"Rectangular": "Rechteckig",
|
||||
"Reference face": "Referenzfläche",
|
||||
"Report a bug — review a screenshot and open a GitHub draft": "Fehler melden — Screenshot prüfen und einen GitHub-Entwurf öffnen",
|
||||
@@ -83,6 +105,8 @@
|
||||
"Restore outer boundary": "Äußere Begrenzung wiederherstellen",
|
||||
"Revert Position": "Position zurücksetzen",
|
||||
"Round": "Rund",
|
||||
"SECTION": "SCHNITT",
|
||||
"SURFACE QUALITY": "OBERFLÄCHENQUALITÄT",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "Die Studie als animiertes GIF speichern, so wie der Ansichtsbereich sie zeigt",
|
||||
"Select bodies (a face picks its body)": "Körper auswählen (eine Fläche wählt ihren Körper)",
|
||||
"Selection filter": "Auswahlfilter",
|
||||
@@ -108,6 +132,7 @@
|
||||
"Turn off section analysis before exporting the view.": "Deaktivieren Sie die Schnittanalyse, bevor Sie die Ansicht exportieren.",
|
||||
"Type": "Typ",
|
||||
"UNTRIM": "TRIMMEN AUFHEBEN",
|
||||
"VIEWS": "ANSICHTEN",
|
||||
"Velocity": "Geschwindigkeit",
|
||||
"Vertices": "Scheitelpunkte",
|
||||
"Visible bodies only. Curves use line segments (0.01 mm tolerance).": "Nur sichtbare Körper. Kurven werden durch Liniensegmente angenähert (Toleranz: 0,01 mm).",
|
||||
@@ -1133,6 +1158,8 @@
|
||||
"ui.restore_defaults": "Standardeinstellungen wiederherstellen",
|
||||
"ui.reverse_zoom_direction": "Zoomrichtung umkehren",
|
||||
"ui.revolve": "Drehen",
|
||||
"ui.ribbon_exit": "Beenden",
|
||||
"ui.ribbon_workspace": "Arbeitsbereich",
|
||||
"ui.right": "Rechts",
|
||||
"ui.save": "Speichern",
|
||||
"ui.save_as": "Speichern unter",
|
||||
|
||||
+81
-2
@@ -3,11 +3,14 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. Open GitHub draft below, then paste the report copied to your clipboard.",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. Open GitHub draft below. Your title and report will be filled in.",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Attach your screenshot: copy and paste it, or save and upload the PNG.",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. Click Submit new issue on GitHub to send your report.",
|
||||
"A new configuration, a copy of the active one": "A new configuration, a copy of the active one",
|
||||
"AI": "AI",
|
||||
"ARRANGE": "ARRANGE",
|
||||
"About SolidCraft": "About SolidCraft",
|
||||
"Acceleration": "Acceleration",
|
||||
"Access": "Access",
|
||||
"Active": "Active",
|
||||
"Active rule": "Active rule",
|
||||
"Add": "Add",
|
||||
@@ -30,6 +33,8 @@
|
||||
"Apply to selection": "Apply to selection",
|
||||
"Arc length": "Arc length",
|
||||
"Area": "Area",
|
||||
"As-Built": "As-Built",
|
||||
"Assign Rule": "Assign Rule",
|
||||
"Attachment": "Attachment",
|
||||
"BLEND SURFACE": "BLEND SURFACE",
|
||||
"BOUNDARY SURFACE": "BOUNDARY SURFACE",
|
||||
@@ -37,12 +42,21 @@
|
||||
"Bend Line Position": "Bend Line Position",
|
||||
"Bend Position": "Bend Position",
|
||||
"Bend Radius": "Bend Radius",
|
||||
"Bend Table": "Bend Table",
|
||||
"Bends": "Bends",
|
||||
"Bodies": "Bodies",
|
||||
"Body": "Body",
|
||||
"Boundary": "Boundary",
|
||||
"Bounding box": "Bounding box",
|
||||
"CHECK": "CHECK",
|
||||
"COMPONENTS": "COMPONENTS",
|
||||
"CONFIGURATIONS": "CONFIGURATIONS",
|
||||
"CONSTRAIN": "CONSTRAIN",
|
||||
"CONTACT": "CONTACT",
|
||||
"CONVERT": "CONVERT",
|
||||
"CSV or JSON: updates existing parameters, adds new ones": "CSV or JSON: updates existing parameters, adds new ones",
|
||||
"Capture All Positions": "Capture All Positions",
|
||||
"Capture Pos.": "Capture Pos.",
|
||||
"Catch Direction": "Catch Direction",
|
||||
"Cells": "Cells",
|
||||
"Center X": "Center X",
|
||||
@@ -53,15 +67,18 @@
|
||||
"Check collisions": "Check collisions",
|
||||
"Checked": "Checked",
|
||||
"Choose a new plane. Sketch geometry and dimensions stay unchanged in its two-dimensional coordinates.": "Choose a new plane. Sketch geometry and dimensions stay unchanged in its two-dimensional coordinates.",
|
||||
"Circular": "Circular",
|
||||
"Circumference": "Circumference",
|
||||
"Close draft": "Close draft",
|
||||
"Collisions": "Collisions",
|
||||
"Colour": "Colour",
|
||||
"Component1": "Component1",
|
||||
"Config Table": "Config Table",
|
||||
"Configuration": "Configuration",
|
||||
"Configuration rules": "Configuration rules",
|
||||
"Construction": "Construction",
|
||||
"Contact": "Contact",
|
||||
"Contact Sets": "Contact Sets",
|
||||
"Contact sets": "Contact sets",
|
||||
"Continuity": "Continuity",
|
||||
"Copy Error Message": "Copy Error Message",
|
||||
@@ -79,6 +96,7 @@
|
||||
"Cube": "Cube",
|
||||
"Current orthographic view (1:1 mm)": "Current orthographic view (1:1 mm)",
|
||||
"Current perspective view": "Current perspective view",
|
||||
"Curv. Comb": "Curv. Comb",
|
||||
"Curvature (G2)": "Curvature (G2)",
|
||||
"Curvature change (G3)": "Curvature change (G3)",
|
||||
"Customize Toolbar": "Customize Toolbar",
|
||||
@@ -88,6 +106,7 @@
|
||||
"Delete the set": "Delete the set",
|
||||
"Delete this parameter": "Delete this parameter",
|
||||
"Density": "Density",
|
||||
"Dependents": "Dependents",
|
||||
"Designs you open or save appear here.": "Designs you open or save appear here.",
|
||||
"Determined by To Object. Choose Angle to edit the angular extent.": "Determined by To Object. Choose Angle to edit the angular extent.",
|
||||
"Direction": "Direction",
|
||||
@@ -109,41 +128,56 @@
|
||||
"Export Animation…": "Export Animation…",
|
||||
"Export Current View as DXF": "Export Current View as DXF",
|
||||
"Export Current View as DXF…": "Export Current View as DXF…",
|
||||
"Export DXF": "Export DXF",
|
||||
"Export DXF…": "Export DXF…",
|
||||
"Export hidden edges as dashed lines": "Export hidden edges as dashed lines",
|
||||
"Extend to meet": "Extend to meet",
|
||||
"Extents": "Extents",
|
||||
"FILES": "FILES",
|
||||
"FLAT": "FLAT",
|
||||
"Face": "Face",
|
||||
"Face attachment lost": "Face attachment lost",
|
||||
"Faces": "Faces",
|
||||
"Faces / edges / vertices": "Faces / edges / vertices",
|
||||
"Fastener": "Fastener",
|
||||
"Favourite": "Favourite",
|
||||
"Files from many CAD programs have Y up, so they open lying on their back here (Z up).": "Files from many CAD programs have Y up, so they open lying on their back here (Z up).",
|
||||
"Filter": "Filter",
|
||||
"Find in Browser": "Find in Browser",
|
||||
"Finish": "Finish",
|
||||
"Flat": "Flat",
|
||||
"Flat Pattern": "Flat Pattern",
|
||||
"Flat size": "Flat size",
|
||||
"Follow camera (Look At sketches)": "Follow camera (Look At sketches)",
|
||||
"Follow the camera (Look At sketches)": "Follow the camera (Look At sketches)",
|
||||
"Font": "Font",
|
||||
"From Bodies": "From Bodies",
|
||||
"From edges": "From edges",
|
||||
"Full Length": "Full Length",
|
||||
"Gap": "Gap",
|
||||
"Grid": "Grid",
|
||||
"HISTORY": "HISTORY",
|
||||
"Height": "Height",
|
||||
"Hidden edges": "Hidden edges",
|
||||
"Holes": "Holes",
|
||||
"Holes (edges on them)": "Holes (edges on them)",
|
||||
"Home view": "Home view",
|
||||
"Horiz./Vert.": "Horiz./Vert.",
|
||||
"IMAGES": "IMAGES",
|
||||
"In This Design": "In This Design",
|
||||
"In place (surfaces)": "In place (surfaces)",
|
||||
"In plane": "In plane",
|
||||
"Inside": "Inside",
|
||||
"Interferes": "Interferes",
|
||||
"Isocurve": "Isocurve",
|
||||
"Issue title": "Issue title",
|
||||
"JOINTS": "JOINTS",
|
||||
"Joint Origin1": "Joint Origin1",
|
||||
"Keep (points on it)": "Keep (points on it)",
|
||||
"Keep Tools": "Keep Tools",
|
||||
"Keep of the other surface": "Keep of the other surface",
|
||||
"LIBRARY": "LIBRARY",
|
||||
"LINKS": "LINKS",
|
||||
"Later": "Later",
|
||||
"Leave it": "Leave it",
|
||||
"Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Legacy face attachment. Rebinding to a certified face creates an exact attachment.",
|
||||
@@ -153,8 +187,13 @@
|
||||
"Library": "Library",
|
||||
"Line Spacing": "Line Spacing",
|
||||
"Loop": "Loop",
|
||||
"MANAGE": "MANAGE",
|
||||
"MATERIALS": "MATERIALS",
|
||||
"MODEL": "MODEL",
|
||||
"MOTION": "MOTION",
|
||||
"Margin": "Margin",
|
||||
"Mass": "Mass",
|
||||
"Mass Center": "Mass Center",
|
||||
"Material": "Material",
|
||||
"Max": "Max",
|
||||
"Mid Radius": "Mid Radius",
|
||||
@@ -164,11 +203,14 @@
|
||||
"Modeled": "Modeled",
|
||||
"More toolbar panels": "More toolbar panels",
|
||||
"Motion": "Motion",
|
||||
"Move / Copy": "Move / Copy",
|
||||
"Move Type": "Move Type",
|
||||
"Move earlier": "Move earlier",
|
||||
"Move later": "Move later",
|
||||
"Name": "Name",
|
||||
"Nearest": "Nearest",
|
||||
"New Comp.": "New Comp.",
|
||||
"New Sketch": "New Sketch",
|
||||
"New study": "New study",
|
||||
"No crash reports.": "No crash reports.",
|
||||
"No matching appearances": "No matching appearances",
|
||||
@@ -177,6 +219,7 @@
|
||||
"Normal to sketch": "Normal to sketch",
|
||||
"Not available yet": "Not available yet",
|
||||
"Notch": "Notch",
|
||||
"OUTPUT": "OUTPUT",
|
||||
"Opacity": "Opacity",
|
||||
"Open GitHub draft": "Open GitHub draft",
|
||||
"Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.",
|
||||
@@ -184,14 +227,18 @@
|
||||
"Other surface (mutual trim)": "Other surface (mutual trim)",
|
||||
"Outside": "Outside",
|
||||
"Overall length": "Overall length",
|
||||
"Param. Graph": "Param. Graph",
|
||||
"Parameter values": "Parameter values",
|
||||
"Parts": "Parts",
|
||||
"Pass through": "Pass through",
|
||||
"Path": "Path",
|
||||
"Pattern": "Pattern",
|
||||
"Per Edge": "Per Edge",
|
||||
"Pick the tool bodies": "Pick the tool bodies",
|
||||
"Picked": "Picked",
|
||||
"Picked point": "Picked point",
|
||||
"Place at the origin instead": "Place at the origin instead",
|
||||
"Plastic Rules": "Plastic Rules",
|
||||
"Playback": "Playback",
|
||||
"Plot": "Plot",
|
||||
"Position": "Position",
|
||||
@@ -205,7 +252,9 @@
|
||||
"Projection": "Projection",
|
||||
"Quantity": "Quantity",
|
||||
"RECENT": "RECENT",
|
||||
"REFERENCE": "REFERENCE",
|
||||
"RULED SURFACE": "RULED SURFACE",
|
||||
"RULES": "RULES",
|
||||
"Radius Fit": "Radius Fit",
|
||||
"Ratio": "Ratio",
|
||||
"Reattach selected face": "Reattach selected face",
|
||||
@@ -223,6 +272,8 @@
|
||||
"Remove this point": "Remove this point",
|
||||
"Report a bug — review a screenshot and open a GitHub draft": "Report a bug — review a screenshot and open a GitHub draft",
|
||||
"Reset Toolbar": "Reset Toolbar",
|
||||
"Resize Part": "Resize Part",
|
||||
"Restore View": "Restore View",
|
||||
"Restore outer boundary": "Restore outer boundary",
|
||||
"Restore the inherited component or physical material appearance": "Restore the inherited component or physical material appearance",
|
||||
"Result": "Result",
|
||||
@@ -231,18 +282,24 @@
|
||||
"Reverse Direction": "Reverse Direction",
|
||||
"Revert": "Revert",
|
||||
"Revert All Positions": "Revert All Positions",
|
||||
"Revert Pos.": "Revert Pos.",
|
||||
"Revert Position": "Revert Position",
|
||||
"Review the report and screenshot before opening GitHub.": "Review the report and screenshot before opening GitHub.",
|
||||
"Rim Edge": "Rim Edge",
|
||||
"Roll History Marker Here": "Roll History Marker Here",
|
||||
"Round": "Round",
|
||||
"Rule": "Rule",
|
||||
"SECTION": "SECTION",
|
||||
"SURFACE QUALITY": "SURFACE QUALITY",
|
||||
"Save Rule": "Save Rule",
|
||||
"Save View": "Save View",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "Save the study as an animated GIF, seen as the viewport shows it",
|
||||
"Saved preview. Geometry is being checked before editing.": "Saved preview. Geometry is being checked before editing.",
|
||||
"Scale factor": "Scale factor",
|
||||
"Scene": "Scene",
|
||||
"Search": "Search",
|
||||
"Search commands": "Search commands",
|
||||
"Section": "Section",
|
||||
"Select Other: hold the left button still on the model (or right-click › Select Other…) to list everything under the cursor; click again on the same spot to select the next thing there. Double-click the middle button to go Home (Preferences › Navigation).": "Select Other: hold the left button still on the model (or right-click › Select Other…) to list everything under the cursor; click again on the same spot to select the next thing there. Double-click the middle button to go Home (Preferences › Navigation).",
|
||||
"Select bodies (a face picks its body)": "Select bodies (a face picks its body)",
|
||||
"Select bodies or faces instead": "Select bodies or faces instead",
|
||||
@@ -250,6 +307,7 @@
|
||||
"Semantic faces share their appearance across instances.": "Semantic faces share their appearance across instances.",
|
||||
"Send your report on GitHub": "Send your report on GitHub",
|
||||
"Shape": "Shape",
|
||||
"Sheet Rules": "Sheet Rules",
|
||||
"Show Agent Cursor": "Show Agent Cursor",
|
||||
"Show in folder": "Show in folder",
|
||||
"Show the pointer an AI agent moves (#35)": "Show the pointer an AI agent moves (#35)",
|
||||
@@ -263,6 +321,7 @@
|
||||
"Sketch points": "Sketch points",
|
||||
"Slot width": "Slot width",
|
||||
"SolidCraft closed before these designs were saved. Their last autosave can be opened.": "SolidCraft closed before these designs were saved. Their last autosave can be opened.",
|
||||
"Specialise": "Specialise",
|
||||
"Speed": "Speed",
|
||||
"Stand it up": "Stand it up",
|
||||
"Stand it up: a quarter turn about X, as one Move feature you can undo.": "Stand it up: a quarter turn about X, as one Move feature you can undo.",
|
||||
@@ -307,6 +366,7 @@
|
||||
"Use saved fixed plane": "Use saved fixed plane",
|
||||
"Use selected face as fixed plane": "Use selected face as fixed plane",
|
||||
"VIEW": "VIEW",
|
||||
"VIEWS": "VIEWS",
|
||||
"Value": "Value",
|
||||
"Velocity": "Velocity",
|
||||
"Vertices": "Vertices",
|
||||
@@ -319,6 +379,7 @@
|
||||
"When": "When",
|
||||
"Width": "Width",
|
||||
"Will fail": "Will fail",
|
||||
"Zebra": "Zebra",
|
||||
"angle, height": "angle, height",
|
||||
"appearance.dielectric_ior": "Dielectric IOR",
|
||||
"appearance.metallic": "Metallic",
|
||||
@@ -1070,8 +1131,8 @@
|
||||
"ui.ai_tool_running": "running",
|
||||
"ui.ai_tool_unfold": "Click to show what it returned",
|
||||
"ui.ai_tool_waiting": "waiting",
|
||||
"ui.ai_toolbar_button": "Show button in toolbar",
|
||||
"ui.ai_toolbar_button_note": "The AI button at the right end of the toolbar. Ctrl+Shift+A and the View menu still open the panel.",
|
||||
"ui.ai_toolbar_button": "Show Assistant button in application bar",
|
||||
"ui.ai_toolbar_button_note": "The Assistant button in the application bar. Ctrl+Shift+A and the View menu still open the panel.",
|
||||
"ui.ai_undo_tip": "Undo everything the agent changed for this message, as one step",
|
||||
"ui.all": "All",
|
||||
"ui.ambient_occlusion": "Ambient occlusion",
|
||||
@@ -1087,6 +1148,8 @@
|
||||
"ui.apply": "Apply",
|
||||
"ui.arc": "Arc",
|
||||
"ui.assemble": "Assemble",
|
||||
"ui.assistant": "Assistant",
|
||||
"ui.assistant_waiting": "{count} approvals waiting",
|
||||
"ui.autosave_every": "Autosave every",
|
||||
"ui.axes": "Axes",
|
||||
"ui.axis": "Axis",
|
||||
@@ -1476,6 +1539,9 @@
|
||||
"ui.reverse_horizontal_pan_tip": "Horizontal two-finger scrolling and the thumb wheel pan the other way",
|
||||
"ui.reverse_zoom_direction": "Reverse zoom direction",
|
||||
"ui.revolve": "Revolve",
|
||||
"ui.ribbon_exit": "Exit",
|
||||
"ui.ribbon_pin_footer": "Pinned commands show on the ribbon. Hover a row to pin or unpin it.",
|
||||
"ui.ribbon_workspace": "Workspace",
|
||||
"ui.right": "Right",
|
||||
"ui.save": "Save",
|
||||
"ui.save_as": "Save As",
|
||||
@@ -1569,6 +1635,7 @@
|
||||
"ui.stand_up_tip": "After a STEP or IGES file opens with Z up, offer a quarter turn about X",
|
||||
"ui.start": "Start",
|
||||
"ui.start_over": "Start over",
|
||||
"ui.start_page": "Start page",
|
||||
"ui.start_radius": "Start Radius",
|
||||
"ui.stretch": "Stretch",
|
||||
"ui.supersampling": "Supersampling (SSAA)",
|
||||
@@ -1626,6 +1693,18 @@
|
||||
"ui.visual_style": "Visual style",
|
||||
"ui.visual_wireframe": "Wireframe",
|
||||
"ui.workspace": "workspace",
|
||||
"ui.workspace_animation_description": "Exploded views, motion studies and storyboards",
|
||||
"ui.workspace_available": "Available",
|
||||
"ui.workspace_current": "Current",
|
||||
"ui.workspace_design_description": "Sketch, model, assemble and inspect",
|
||||
"ui.workspace_design_tabs": "Model · Surface · Assemble · Insert · Inspect · Manage · View",
|
||||
"ui.workspace_drawing_description": "2D drawings with views, dimensions and title blocks",
|
||||
"ui.workspace_footer": "Every workspace works on the same design, history and selection; only the ribbon tabs change. The switcher is locked while a sketch or feature is being edited.",
|
||||
"ui.workspace_manufacture_description": "Slicing, toolpaths and setup",
|
||||
"ui.workspace_planned": "Planned",
|
||||
"ui.workspace_render_description": "Product preview, scene settings and rendered images",
|
||||
"ui.workspace_render_tabs": "Scene · Image",
|
||||
"ui.workspace_simulation_description": "Loads, constraints and results",
|
||||
"ui.x_distance": "X Distance",
|
||||
"ui.y_distance": "Y Distance",
|
||||
"ui.y_up": "Y up",
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. Abre el borrador de GitHub de abajo y pega el informe copiado al portapapeles.",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. Abre el borrador de GitHub de abajo. El título y el informe se rellenarán automáticamente.",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Adjunta la captura de pantalla: cópiala y pégala, o guarda y sube el PNG.",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. Haz clic en «Submit new issue» en GitHub para enviar el informe.",
|
||||
"A new configuration, a copy of the active one": "Una configuración nueva, copia de la activa",
|
||||
"AI": "AI",
|
||||
"ARRANGE": "ORGANIZAR",
|
||||
"About SolidCraft": "Acerca de SolidCraft",
|
||||
"Acceleration": "Aceleración",
|
||||
"Active": "Activo",
|
||||
@@ -39,6 +41,12 @@
|
||||
"Body": "Cuerpo",
|
||||
"Boundary": "Contorno",
|
||||
"Bounding box": "Caja delimitadora",
|
||||
"CHECK": "COMPROBAR",
|
||||
"COMPONENTS": "COMPONENTES",
|
||||
"CONFIGURATIONS": "CONFIGURACIONES",
|
||||
"CONSTRAIN": "RESTRINGIR",
|
||||
"CONTACT": "CONTACTO",
|
||||
"CONVERT": "CONVERTIR",
|
||||
"CSV or JSON: updates existing parameters, adds new ones": "CSV o JSON: actualiza los parámetros existentes y añade otros nuevos",
|
||||
"Capture All Positions": "Capturar todas las posiciones",
|
||||
"Catch Direction": "Dirección de enganche",
|
||||
@@ -108,6 +116,8 @@
|
||||
"Export hidden edges as dashed lines": "Exportar aristas ocultas como líneas discontinuas",
|
||||
"Extend to meet": "Extender hasta encontrarla",
|
||||
"Extents": "Extensión",
|
||||
"FILES": "ARCHIVOS",
|
||||
"FLAT": "DESPLEGADO",
|
||||
"Face": "Cara",
|
||||
"Face attachment lost": "Se ha perdido la vinculación de la cara",
|
||||
"Faces": "Caras",
|
||||
@@ -124,21 +134,26 @@
|
||||
"From edges": "Aristas de origen",
|
||||
"Full Length": "Longitud total",
|
||||
"Grid": "Cuadrícula",
|
||||
"HISTORY": "HISTORIAL",
|
||||
"Height": "Altura",
|
||||
"Hidden edges": "Aristas ocultas",
|
||||
"Holes": "Agujeros",
|
||||
"Holes (edges on them)": "Agujeros (aristas que contienen)",
|
||||
"Home view": "Vista de inicio",
|
||||
"IMAGES": "IMÁGENES",
|
||||
"In This Design": "En este diseño",
|
||||
"In place (surfaces)": "En su posición (superficies)",
|
||||
"In plane": "En el plano",
|
||||
"Inside": "Interior",
|
||||
"Interferes": "Interfiere",
|
||||
"Issue title": "Título de la incidencia",
|
||||
"JOINTS": "UNIONES",
|
||||
"Joint Origin1": "Origen de unión1",
|
||||
"Keep (points on it)": "Conservar (puntos sobre ella)",
|
||||
"Keep Tools": "Conservar herramientas",
|
||||
"Keep of the other surface": "Conservar de la otra superficie",
|
||||
"LIBRARY": "BIBLIOTECA",
|
||||
"LINKS": "VÍNCULOS",
|
||||
"Later": "Más tarde",
|
||||
"Leave it": "Dejar como está",
|
||||
"Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Vinculación antigua de cara. Volver a vincularla a una cara verificada crea una vinculación exacta.",
|
||||
@@ -148,6 +163,10 @@
|
||||
"Library": "Biblioteca",
|
||||
"Line Spacing": "Interlineado",
|
||||
"Loop": "Bucle",
|
||||
"MANAGE": "GESTIONAR",
|
||||
"MATERIALS": "MATERIALES",
|
||||
"MODEL": "MODELO",
|
||||
"MOTION": "MOVIMIENTO",
|
||||
"Margin": "Margen",
|
||||
"Mass": "Masa",
|
||||
"Material": "Material",
|
||||
@@ -172,6 +191,7 @@
|
||||
"Normal to sketch": "Normal al boceto",
|
||||
"Not available yet": "Todavía no disponible",
|
||||
"Notch": "Muesca",
|
||||
"OUTPUT": "SALIDA",
|
||||
"Opacity": "Opacidad",
|
||||
"Open GitHub draft": "Abrir borrador de GitHub",
|
||||
"Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "CAD 3D paramétrico de código abierto desarrollado en Rust. Licencia MIT O Apache-2.0.",
|
||||
@@ -200,7 +220,9 @@
|
||||
"Projection": "Proyección",
|
||||
"Quantity": "Cantidad",
|
||||
"RECENT": "RECIENTES",
|
||||
"REFERENCE": "REFERENCIA",
|
||||
"RULED SURFACE": "SUPERFICIE REGLADA",
|
||||
"RULES": "REGLAS",
|
||||
"Radius Fit": "Ajuste de radio",
|
||||
"Ratio": "Relación",
|
||||
"Reattach selected face": "Volver a vincular la cara seleccionada",
|
||||
@@ -232,6 +254,8 @@
|
||||
"Roll History Marker Here": "Desplazar marcador de la línea de tiempo hasta aquí",
|
||||
"Round": "Redondo",
|
||||
"Rule": "Regla",
|
||||
"SECTION": "SECCIÓN",
|
||||
"SURFACE QUALITY": "CALIDAD DE SUPERFICIE",
|
||||
"Save Rule": "Guardar regla",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "Guardar el estudio como GIF animado, tal como se ve en el visor",
|
||||
"Saved preview. Geometry is being checked before editing.": "Vista previa guardada. Se está comprobando la geometría antes de editarla.",
|
||||
@@ -300,6 +324,7 @@
|
||||
"Use saved fixed plane": "Usar plano fijo guardado",
|
||||
"Use selected face as fixed plane": "Usar la cara seleccionada como plano fijo",
|
||||
"VIEW": "VISTA",
|
||||
"VIEWS": "VISTAS",
|
||||
"Value": "Valor",
|
||||
"Velocity": "Velocidad",
|
||||
"Vertices": "Vértices",
|
||||
@@ -1377,6 +1402,8 @@
|
||||
"ui.restore_defaults": "Restaurar valores predeterminados",
|
||||
"ui.reverse_zoom_direction": "Invertir dirección del zoom",
|
||||
"ui.revolve": "Revolución",
|
||||
"ui.ribbon_exit": "Salir",
|
||||
"ui.ribbon_workspace": "Espacio de trabajo",
|
||||
"ui.right": "Derecha",
|
||||
"ui.save": "Guardar",
|
||||
"ui.save_as": "Guardar como",
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. Ouvrir le brouillon GitHub ci-dessous, puis coller le rapport copié dans le presse-papiers.",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. Ouvrir le brouillon GitHub ci-dessous. Votre titre et votre rapport y seront déjà remplis.",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Joindre votre capture d'écran : la copier-coller, ou enregistrer le PNG puis le téléverser.",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. Cliquer sur Submit new issue sur GitHub pour envoyer votre rapport.",
|
||||
"A new configuration, a copy of the active one": "Nouvelle configuration, copie de la configuration active",
|
||||
"AI": "IA",
|
||||
"ARRANGE": "DISPOSER",
|
||||
"About SolidCraft": "À propos de SolidCraft",
|
||||
"Acceleration": "Accélération",
|
||||
"Active": "Actif",
|
||||
@@ -40,6 +42,12 @@
|
||||
"Body": "Corps",
|
||||
"Boundary": "Contour",
|
||||
"Bounding box": "Boîte englobante",
|
||||
"CHECK": "VÉRIFIER",
|
||||
"COMPONENTS": "COMPOSANTS",
|
||||
"CONFIGURATIONS": "CONFIGURATIONS",
|
||||
"CONSTRAIN": "CONTRAINDRE",
|
||||
"CONTACT": "CONTACT",
|
||||
"CONVERT": "CONVERTIR",
|
||||
"CSV or JSON: updates existing parameters, adds new ones": "CSV ou JSON : met à jour les paramètres existants, ajoute les nouveaux",
|
||||
"Capture All Positions": "Capturer toutes les positions",
|
||||
"Catch Direction": "Direction de l'ergot",
|
||||
@@ -110,6 +118,8 @@
|
||||
"Export hidden edges as dashed lines": "Exporter les arêtes cachées en tirets",
|
||||
"Extend to meet": "Prolonger jusqu'à la rencontre",
|
||||
"Extents": "Étendues",
|
||||
"FILES": "FICHIERS",
|
||||
"FLAT": "DÉPLIÉ",
|
||||
"Face": "Face",
|
||||
"Face attachment lost": "Rattachement à la face perdu",
|
||||
"Faces": "Faces",
|
||||
@@ -126,21 +136,26 @@
|
||||
"From edges": "Arêtes de départ",
|
||||
"Full Length": "Longueur totale",
|
||||
"Grid": "Grille",
|
||||
"HISTORY": "HISTORIQUE",
|
||||
"Height": "Hauteur",
|
||||
"Hidden edges": "Arêtes cachées",
|
||||
"Holes": "Trous",
|
||||
"Holes (edges on them)": "Trous (par leurs arêtes)",
|
||||
"Home view": "Vue d'accueil",
|
||||
"IMAGES": "IMAGES",
|
||||
"In This Design": "Dans cette conception",
|
||||
"In place (surfaces)": "En place (surfaces)",
|
||||
"In plane": "Dans le plan",
|
||||
"Inside": "Intérieur",
|
||||
"Interferes": "Interfère",
|
||||
"Issue title": "Titre du ticket",
|
||||
"JOINTS": "LIAISONS",
|
||||
"Joint Origin1": "Origine de liaison1",
|
||||
"Keep (points on it)": "À conserver (points dessus)",
|
||||
"Keep Tools": "Conserver les outils",
|
||||
"Keep of the other surface": "À conserver de l'autre surface",
|
||||
"LIBRARY": "BIBLIOTHÈQUE",
|
||||
"LINKS": "LIENS",
|
||||
"Later": "Plus tard",
|
||||
"Leave it": "Laisser tel quel",
|
||||
"Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Rattachement à la face hérité. Le relier à une face certifiée crée un rattachement exact.",
|
||||
@@ -150,6 +165,10 @@
|
||||
"Library": "Bibliothèque",
|
||||
"Line Spacing": "Interligne",
|
||||
"Loop": "Boucle",
|
||||
"MANAGE": "GÉRER",
|
||||
"MATERIALS": "MATÉRIAUX",
|
||||
"MODEL": "MODÈLE",
|
||||
"MOTION": "MOUVEMENT",
|
||||
"Margin": "Marge",
|
||||
"Mass": "Masse",
|
||||
"Material": "Matériau",
|
||||
@@ -174,6 +193,7 @@
|
||||
"Normal to sketch": "Normale à l'esquisse",
|
||||
"Not available yet": "Pas encore disponible",
|
||||
"Notch": "Encoche",
|
||||
"OUTPUT": "SORTIE",
|
||||
"Opacity": "Opacité",
|
||||
"Open GitHub draft": "Ouvrir le brouillon GitHub",
|
||||
"Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "CAO 3D paramétrique open source en Rust. Sous licence MIT OR Apache-2.0.",
|
||||
@@ -202,7 +222,9 @@
|
||||
"Projection": "Projection",
|
||||
"Quantity": "Grandeur",
|
||||
"RECENT": "RÉCENTS",
|
||||
"REFERENCE": "RÉFÉRENCE",
|
||||
"RULED SURFACE": "SURFACE RÉGLÉE",
|
||||
"RULES": "RÈGLES",
|
||||
"Radius Fit": "Ajustement du rayon",
|
||||
"Ratio": "Rapport",
|
||||
"Reattach selected face": "Rattacher la face sélectionnée",
|
||||
@@ -234,6 +256,8 @@
|
||||
"Roll History Marker Here": "Placer le marqueur d'historique ici",
|
||||
"Round": "Arrondi",
|
||||
"Rule": "Règle",
|
||||
"SECTION": "COUPE",
|
||||
"SURFACE QUALITY": "QUALITÉ DE SURFACE",
|
||||
"Save Rule": "Enregistrer la règle",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "Enregistrer l'étude en GIF animé, telle que la fenêtre d'affichage la montre",
|
||||
"Saved preview. Geometry is being checked before editing.": "Aperçu enregistré. La géométrie est en cours de vérification avant modification.",
|
||||
@@ -302,6 +326,7 @@
|
||||
"Use saved fixed plane": "Utiliser le plan fixe enregistré",
|
||||
"Use selected face as fixed plane": "Utiliser la face sélectionnée comme plan fixe",
|
||||
"VIEW": "VUE",
|
||||
"VIEWS": "VUES",
|
||||
"Value": "Valeur",
|
||||
"Velocity": "Vitesse",
|
||||
"Vertices": "Sommets",
|
||||
@@ -1438,6 +1463,8 @@
|
||||
"ui.reverse_horizontal_pan_tip": "Le défilement horizontal à deux doigts et la molette latérale font le panoramique dans l'autre sens",
|
||||
"ui.reverse_zoom_direction": "Inverser le sens du zoom",
|
||||
"ui.revolve": "Révolution",
|
||||
"ui.ribbon_exit": "Quitter",
|
||||
"ui.ribbon_workspace": "Espace de travail",
|
||||
"ui.right": "Droite",
|
||||
"ui.save": "Enregistrer",
|
||||
"ui.save_as": "Enregistrer sous",
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. Abre o borrador de GitHub de abaixo e pega o informe copiado no portapapeis.",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. Abre o borrador de GitHub de abaixo. O título e o informe encheranse automaticamente.",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Achega a captura de pantalla: cópiaa e pégaa, ou gárdaa e sube o PNG.",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. Preme Submit new issue en GitHub para enviar o informe.",
|
||||
"A new configuration, a copy of the active one": "Unha configuración nova, copia da activa",
|
||||
"AI": "IA",
|
||||
"ARRANGE": "ORGANIZAR",
|
||||
"About SolidCraft": "Acerca de SolidCraft",
|
||||
"Active": "Activa",
|
||||
"Active rule": "Regra activa",
|
||||
@@ -36,6 +38,12 @@
|
||||
"Body": "Corpo",
|
||||
"Boundary": "Contorno",
|
||||
"Bounding box": "Caixa delimitadora",
|
||||
"CHECK": "COMPROBAR",
|
||||
"COMPONENTS": "COMPOÑENTES",
|
||||
"CONFIGURATIONS": "CONFIGURACIÓNS",
|
||||
"CONSTRAIN": "RESTRINXIR",
|
||||
"CONTACT": "CONTACTO",
|
||||
"CONVERT": "CONVERTER",
|
||||
"CSV or JSON: updates existing parameters, adds new ones": "CSV ou JSON: actualiza os parámetros existentes e engade os novos",
|
||||
"Capture All Positions": "Capturar todas as posicións",
|
||||
"Catch Direction": "Dirección de captura",
|
||||
@@ -101,6 +109,8 @@
|
||||
"Export hidden edges as dashed lines": "Exportar as arestas ocultas como liñas descontinuas",
|
||||
"Extend to meet": "Estender ata atopala",
|
||||
"Extents": "Extensións",
|
||||
"FILES": "FICHEIROS",
|
||||
"FLAT": "DESPREGADO",
|
||||
"Face": "Cara",
|
||||
"Face attachment lost": "Perdeuse a ancoraxe á cara",
|
||||
"Faces": "Caras",
|
||||
@@ -117,21 +127,26 @@
|
||||
"From edges": "Arestas de orixe",
|
||||
"Full Length": "Lonxitude completa",
|
||||
"Grid": "Grella",
|
||||
"HISTORY": "HISTORIAL",
|
||||
"Height": "Altura",
|
||||
"Hidden edges": "Arestas ocultas",
|
||||
"Holes": "Furados",
|
||||
"Holes (edges on them)": "Furados (arestas sobre eles)",
|
||||
"Home view": "Vista de inicio",
|
||||
"IMAGES": "IMAXES",
|
||||
"In This Design": "Neste deseño",
|
||||
"In place (surfaces)": "No sitio (superficies)",
|
||||
"In plane": "No plano",
|
||||
"Inside": "Dentro",
|
||||
"Interferes": "Interfire",
|
||||
"Issue title": "Título da incidencia",
|
||||
"JOINTS": "UNIÓNS",
|
||||
"Joint Origin1": "Orixe da unión1",
|
||||
"Keep (points on it)": "Manter (puntos sobre ela)",
|
||||
"Keep Tools": "Manter as ferramentas",
|
||||
"Keep of the other surface": "Manter da outra superficie",
|
||||
"LIBRARY": "BIBLIOTECA",
|
||||
"LINKS": "LIGAZÓNS",
|
||||
"Later": "Máis tarde",
|
||||
"Leave it": "Deixalo",
|
||||
"Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Ancoraxe á cara antiga. Volver vincular a unha cara certificada crea unha ancoraxe exacta.",
|
||||
@@ -141,6 +156,10 @@
|
||||
"Library": "Biblioteca",
|
||||
"Line Spacing": "Espazado entre liñas",
|
||||
"Loop": "Bucle",
|
||||
"MANAGE": "XESTIONAR",
|
||||
"MATERIALS": "MATERIAIS",
|
||||
"MODEL": "MODELO",
|
||||
"MOTION": "MOVEMENTO",
|
||||
"Margin": "Marxe",
|
||||
"Mass": "Masa",
|
||||
"Material": "Material",
|
||||
@@ -163,6 +182,7 @@
|
||||
"Normal to sketch": "Normal ao bosquexo",
|
||||
"Not available yet": "Aínda non dispoñible",
|
||||
"Notch": "Entalle",
|
||||
"OUTPUT": "SAÍDA",
|
||||
"Opacity": "Opacidade",
|
||||
"Open GitHub draft": "Abrir o borrador de GitHub",
|
||||
"Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "CAD 3D paramétrico de código aberto en Rust. Con licenza MIT OR Apache-2.0.",
|
||||
@@ -187,7 +207,9 @@
|
||||
"Profiles/Curves": "Perfís/curvas",
|
||||
"Projection": "Proxección",
|
||||
"RECENT": "RECENTES",
|
||||
"REFERENCE": "REFERENCIA",
|
||||
"RULED SURFACE": "SUPERFICIE REGRADA",
|
||||
"RULES": "REGRAS",
|
||||
"Radius Fit": "Axuste do raio",
|
||||
"Ratio": "Proporción",
|
||||
"Reattach selected face": "Volver ancorar a cara seleccionada",
|
||||
@@ -219,6 +241,8 @@
|
||||
"Roll History Marker Here": "Levar o marcador do historial aquí",
|
||||
"Round": "Redondo",
|
||||
"Rule": "Regra",
|
||||
"SECTION": "SECCIÓN",
|
||||
"SURFACE QUALITY": "CALIDADE DA SUPERFICIE",
|
||||
"Save Rule": "Gardar a regra",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "Gardar o estudo como GIF animado, tal e como o mostra a vista",
|
||||
"Saved preview. Geometry is being checked before editing.": "Previsualización gardada. Estase a comprobar a xeometría antes de editar.",
|
||||
@@ -285,6 +309,7 @@
|
||||
"Use saved fixed plane": "Usar o plano fixo gardado",
|
||||
"Use selected face as fixed plane": "Usar a cara seleccionada como plano fixo",
|
||||
"VIEW": "VISTA",
|
||||
"VIEWS": "VISTAS",
|
||||
"Value": "Valor",
|
||||
"Vertices": "Vértices",
|
||||
"View navigator": "Navegador de vistas",
|
||||
@@ -1342,6 +1367,8 @@
|
||||
"ui.restore_defaults": "Restaurar os valores predeterminados",
|
||||
"ui.reverse_zoom_direction": "Inverter a dirección do zoom",
|
||||
"ui.revolve": "Revolución",
|
||||
"ui.ribbon_exit": "Saír",
|
||||
"ui.ribbon_workspace": "Espazo de traballo",
|
||||
"ui.right": "Dereita",
|
||||
"ui.save": "Gardar",
|
||||
"ui.save_as": "Gardar como",
|
||||
|
||||
+81
-2
@@ -3,11 +3,14 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. 下のボタンでGitHubの下書きを開き、クリップボードにコピーされたレポートを貼り付けます。",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. 下のボタンでGitHubの下書きを開きます。タイトルとレポートは入力済みです。",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. スクリーンショットを添付します。コピーして貼り付けるか、PNGを保存してアップロードします。",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. GitHubでSubmit new issueをクリックしてレポートを送信します。",
|
||||
"A new configuration, a copy of the active one": "アクティブな構成をコピーして新しい構成を作成",
|
||||
"AI": "AI",
|
||||
"ARRANGE": "配置",
|
||||
"About SolidCraft": "SolidCraft について",
|
||||
"Acceleration": "加速度",
|
||||
"Access": "アクセス性",
|
||||
"Active": "アクティブ",
|
||||
"Active rule": "有効なルール",
|
||||
"Add": "追加",
|
||||
@@ -30,6 +33,8 @@
|
||||
"Apply to selection": "選択項目に適用",
|
||||
"Arc length": "円弧の長さ",
|
||||
"Area": "表面積",
|
||||
"As-Built": "現状位置",
|
||||
"Assign Rule": "ルールを割当",
|
||||
"Attachment": "アタッチメント",
|
||||
"BLEND SURFACE": "ブレンドサーフェス",
|
||||
"BOUNDARY SURFACE": "境界サーフェス",
|
||||
@@ -37,12 +42,21 @@
|
||||
"Bend Line Position": "曲げ線位置",
|
||||
"Bend Position": "曲げ位置",
|
||||
"Bend Radius": "曲げ半径",
|
||||
"Bend Table": "曲げテーブル",
|
||||
"Bends": "曲げ",
|
||||
"Bodies": "ボディ",
|
||||
"Body": "ボディ",
|
||||
"Boundary": "境界",
|
||||
"Bounding box": "境界ボックス",
|
||||
"CHECK": "チェック",
|
||||
"COMPONENTS": "コンポーネント",
|
||||
"CONFIGURATIONS": "構成",
|
||||
"CONSTRAIN": "拘束",
|
||||
"CONTACT": "接触",
|
||||
"CONVERT": "変換",
|
||||
"CSV or JSON: updates existing parameters, adds new ones": "CSVまたはJSON:既存のパラメータを更新し、新しいパラメータを追加します",
|
||||
"Capture All Positions": "すべての位置をキャプチャ",
|
||||
"Capture Pos.": "位置を記録",
|
||||
"Catch Direction": "キャッチ方向",
|
||||
"Cells": "セル",
|
||||
"Center X": "中心 X",
|
||||
@@ -53,15 +67,18 @@
|
||||
"Check collisions": "衝突チェック",
|
||||
"Checked": "チェック済み",
|
||||
"Choose a new plane. Sketch geometry and dimensions stay unchanged in its two-dimensional coordinates.": "新しい平面を選択してください。スケッチジオメトリと寸法は2次元座標系のまま維持されます。",
|
||||
"Circular": "円形",
|
||||
"Circumference": "円周",
|
||||
"Close draft": "下書きを閉じる",
|
||||
"Collisions": "衝突",
|
||||
"Colour": "色",
|
||||
"Component1": "コンポーネント1",
|
||||
"Config Table": "構成テーブル",
|
||||
"Configuration": "構成",
|
||||
"Configuration rules": "構成ルール",
|
||||
"Construction": "コンストラクション",
|
||||
"Contact": "接触",
|
||||
"Contact Sets": "接触セット",
|
||||
"Contact sets": "接触セット",
|
||||
"Continuity": "連続性",
|
||||
"Copy Error Message": "エラーメッセージをコピー",
|
||||
@@ -79,6 +96,7 @@
|
||||
"Cube": "キューブ",
|
||||
"Current orthographic view (1:1 mm)": "現在の平行投影(実寸・mm)",
|
||||
"Current perspective view": "現在の透視投影",
|
||||
"Curv. Comb": "曲率コーム",
|
||||
"Curvature (G2)": "曲率 (G2)",
|
||||
"Curvature change (G3)": "曲率変化 (G3)",
|
||||
"Customize Toolbar": "ツールバーのカスタマイズ",
|
||||
@@ -88,6 +106,7 @@
|
||||
"Delete the set": "セットを削除",
|
||||
"Delete this parameter": "このパラメータを削除",
|
||||
"Density": "密度",
|
||||
"Dependents": "依存先",
|
||||
"Designs you open or save appear here.": "開いたデザインや保存したデザインがここに表示されます。",
|
||||
"Determined by To Object. Choose Angle to edit the angular extent.": "「対象オブジェクトまで」により決定されます。角度範囲を編集するには「角度」を選択してください。",
|
||||
"Direction": "方向",
|
||||
@@ -109,41 +128,56 @@
|
||||
"Export Animation…": "アニメーションをエクスポート…",
|
||||
"Export Current View as DXF": "現在の表示をDXFでエクスポート",
|
||||
"Export Current View as DXF…": "現在の表示をDXFでエクスポート…",
|
||||
"Export DXF": "DXF出力",
|
||||
"Export DXF…": "DXFをエクスポート…",
|
||||
"Export hidden edges as dashed lines": "点線で出力",
|
||||
"Extend to meet": "交わるまで延長",
|
||||
"Extents": "範囲",
|
||||
"FILES": "ファイル",
|
||||
"FLAT": "展開",
|
||||
"Face": "面",
|
||||
"Face attachment lost": "面アタッチメントが失われました",
|
||||
"Faces": "面",
|
||||
"Faces / edges / vertices": "面 / エッジ / 頂点",
|
||||
"Fastener": "締結部品",
|
||||
"Favourite": "お気に入り",
|
||||
"Files from many CAD programs have Y up, so they open lying on their back here (Z up).": "多くのCADではY軸を上向きとしているため、Z軸を上向きとするSolidCraftでは、読み込んだモデルが横倒しの向きで表示されることがあります。",
|
||||
"Filter": "フィルター",
|
||||
"Find in Browser": "ブラウザで検索",
|
||||
"Finish": "終了",
|
||||
"Flat": "展開",
|
||||
"Flat Pattern": "フラットパターン",
|
||||
"Flat size": "展開サイズ",
|
||||
"Follow camera (Look At sketches)": "カメラ追従(スケッチを正面視)",
|
||||
"Follow the camera (Look At sketches)": "カメラ追従(スケッチを正面視)",
|
||||
"Font": "フォント",
|
||||
"From Bodies": "ボディから",
|
||||
"From edges": "開始側エッジ",
|
||||
"Full Length": "全長",
|
||||
"Gap": "間隔",
|
||||
"Grid": "グリッド",
|
||||
"HISTORY": "履歴",
|
||||
"Height": "高さ",
|
||||
"Hidden edges": "隠線",
|
||||
"Holes": "穴",
|
||||
"Holes (edges on them)": "穴(そのエッジ)",
|
||||
"Home view": "ホームビュー",
|
||||
"Horiz./Vert.": "水平 / 垂直",
|
||||
"IMAGES": "画像",
|
||||
"In This Design": "このデザイン内",
|
||||
"In place (surfaces)": "その場で(サーフェス)",
|
||||
"In plane": "平面内",
|
||||
"Inside": "内側",
|
||||
"Interferes": "干渉あり",
|
||||
"Isocurve": "等パラメータ線",
|
||||
"Issue title": "Issueタイトル",
|
||||
"JOINTS": "ジョイント",
|
||||
"Joint Origin1": "ジョイント原点1",
|
||||
"Keep (points on it)": "残す部分(その上の点)",
|
||||
"Keep Tools": "ツールボディを保持",
|
||||
"Keep of the other surface": "相手のサーフェスで残す部分",
|
||||
"LIBRARY": "ライブラリ",
|
||||
"LINKS": "リンク",
|
||||
"Later": "後で",
|
||||
"Leave it": "そのままにする",
|
||||
"Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "従来の面アタッチメントです。確定された面に再バインドすると正確なアタッチメントが作成されます。",
|
||||
@@ -153,8 +187,13 @@
|
||||
"Library": "ライブラリ",
|
||||
"Line Spacing": "行間",
|
||||
"Loop": "ループ",
|
||||
"MANAGE": "管理",
|
||||
"MATERIALS": "材料",
|
||||
"MODEL": "モデル",
|
||||
"MOTION": "モーション",
|
||||
"Margin": "マージン",
|
||||
"Mass": "質量",
|
||||
"Mass Center": "重心",
|
||||
"Material": "材料",
|
||||
"Max": "最大",
|
||||
"Mid Radius": "中間半径",
|
||||
@@ -164,11 +203,14 @@
|
||||
"Modeled": "モデル化済み",
|
||||
"More toolbar panels": "その他のツールバーパネル",
|
||||
"Motion": "モーション",
|
||||
"Move / Copy": "移動 / コピー",
|
||||
"Move Type": "移動タイプ",
|
||||
"Move earlier": "前へ移動",
|
||||
"Move later": "後へ移動",
|
||||
"Name": "名前",
|
||||
"Nearest": "最も近い",
|
||||
"New Comp.": "新規コンポーネント",
|
||||
"New Sketch": "新規スケッチ",
|
||||
"New study": "新規スタディ",
|
||||
"No crash reports.": "クラッシュレポートはありません。",
|
||||
"No matching appearances": "一致する外観がありません",
|
||||
@@ -177,6 +219,7 @@
|
||||
"Normal to sketch": "スケッチに垂直",
|
||||
"Not available yet": "まだ利用できません",
|
||||
"Notch": "ノッチ",
|
||||
"OUTPUT": "出力",
|
||||
"Opacity": "不透明度",
|
||||
"Open GitHub draft": "GitHubの下書きを開く",
|
||||
"Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "Rust製オープンソース・パラメトリック3D CAD。ライセンス: MIT または Apache-2.0。",
|
||||
@@ -184,14 +227,18 @@
|
||||
"Other surface (mutual trim)": "相手のサーフェス(相互トリム)",
|
||||
"Outside": "外側",
|
||||
"Overall length": "全長",
|
||||
"Param. Graph": "パラメータ図",
|
||||
"Parameter values": "パラメータ値",
|
||||
"Parts": "部品",
|
||||
"Pass through": "通過点",
|
||||
"Path": "パス",
|
||||
"Pattern": "パターン",
|
||||
"Per Edge": "エッジごと",
|
||||
"Pick the tool bodies": "ツールボディを選択",
|
||||
"Picked": "選択したもの",
|
||||
"Picked point": "選択した点",
|
||||
"Place at the origin instead": "代わりに原点に配置",
|
||||
"Plastic Rules": "樹脂ルール",
|
||||
"Playback": "再生",
|
||||
"Plot": "グラフ",
|
||||
"Position": "位置",
|
||||
@@ -205,7 +252,9 @@
|
||||
"Projection": "投影",
|
||||
"Quantity": "量",
|
||||
"RECENT": "最近使用した項目",
|
||||
"REFERENCE": "参照",
|
||||
"RULED SURFACE": "ルールドサーフェス",
|
||||
"RULES": "ルール",
|
||||
"Radius Fit": "半径フィット",
|
||||
"Ratio": "比率",
|
||||
"Reattach selected face": "選択した面を再アタッチ",
|
||||
@@ -223,6 +272,8 @@
|
||||
"Remove this point": "この点を削除",
|
||||
"Report a bug — review a screenshot and open a GitHub draft": "バグを報告 — スクリーンショットを確認してGitHub下書きを作成",
|
||||
"Reset Toolbar": "ツールバーをリセット",
|
||||
"Resize Part": "部品サイズ変更",
|
||||
"Restore View": "ビューを復元",
|
||||
"Restore outer boundary": "外側の境界を復元",
|
||||
"Restore the inherited component or physical material appearance": "コンポーネントまたは物理マテリアルから継承した外観に戻す",
|
||||
"Result": "結果",
|
||||
@@ -231,18 +282,24 @@
|
||||
"Reverse Direction": "方向を反転",
|
||||
"Revert": "元に戻す",
|
||||
"Revert All Positions": "すべての位置を元に戻す",
|
||||
"Revert Pos.": "位置を復元",
|
||||
"Revert Position": "位置を元に戻す",
|
||||
"Review the report and screenshot before opening GitHub.": "GitHubを開く前にレポートとスクリーンショットを確認してください。",
|
||||
"Rim Edge": "リムエッジ",
|
||||
"Roll History Marker Here": "履歴マーカーをここに移動",
|
||||
"Round": "丸め",
|
||||
"Rule": "ルール",
|
||||
"SECTION": "断面",
|
||||
"SURFACE QUALITY": "サーフェス品質",
|
||||
"Save Rule": "ルールを保存",
|
||||
"Save View": "ビューを保存",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "ビューポートの表示どおりにスタディをアニメーション GIF として保存",
|
||||
"Saved preview. Geometry is being checked before editing.": "保存済みのプレビューです。編集前にジオメトリを検証しています。",
|
||||
"Scale factor": "尺度係数",
|
||||
"Scene": "シーン",
|
||||
"Search": "検索",
|
||||
"Search commands": "コマンドを検索",
|
||||
"Section": "断面",
|
||||
"Select Other: hold the left button still on the model (or right-click › Select Other…) to list everything under the cursor; click again on the same spot to select the next thing there. Double-click the middle button to go Home (Preferences › Navigation).": "その他を選択: モデル上で左ボタンを長押し(または右クリック › その他を選択…)するとカーソル下の要素が一覧表示されます。同じ場所を再度クリックすると次の要素が選択されます。中ボタンをダブルクリックするとホームビューに戻ります(環境設定 › ナビゲーション)。",
|
||||
"Select bodies (a face picks its body)": "ボディを選択(面をクリックするとそのボディが選択されます)",
|
||||
"Select bodies or faces instead": "代わりにボディまたは面を選択",
|
||||
@@ -250,6 +307,7 @@
|
||||
"Semantic faces share their appearance across instances.": "セマンティック面はインスタンス間で外観を共有します。",
|
||||
"Send your report on GitHub": "GitHubでレポートを送信",
|
||||
"Shape": "形状",
|
||||
"Sheet Rules": "板金ルール",
|
||||
"Show Agent Cursor": "エージェントカーソルを表示",
|
||||
"Show in folder": "フォルダに表示",
|
||||
"Show the pointer an AI agent moves (#35)": "エージェントが操作するポインターを表示 (#35)",
|
||||
@@ -263,6 +321,7 @@
|
||||
"Sketch points": "スケッチ点",
|
||||
"Slot width": "長穴の幅",
|
||||
"SolidCraft closed before these designs were saved. Their last autosave can be opened.": "これらのデザインが保存される前にSolidCraftが終了しました。最後の自動保存ファイルを開くことができます。",
|
||||
"Specialise": "特殊操作",
|
||||
"Speed": "速度",
|
||||
"Stand it up": "正立させる",
|
||||
"Stand it up: a quarter turn about X, as one Move feature you can undo.": "正立させる: 取り消し可能な1つの移動フィーチャーとして、X軸周りに90度回転します。",
|
||||
@@ -307,6 +366,7 @@
|
||||
"Use saved fixed plane": "保存された固定平面を使用",
|
||||
"Use selected face as fixed plane": "選択した面を固定平面として使用",
|
||||
"VIEW": "表示",
|
||||
"VIEWS": "ビュー",
|
||||
"Value": "値",
|
||||
"Velocity": "速度",
|
||||
"Vertices": "頂点",
|
||||
@@ -319,6 +379,7 @@
|
||||
"When": "条件 (When)",
|
||||
"Width": "幅",
|
||||
"Will fail": "失敗します",
|
||||
"Zebra": "ゼブラ",
|
||||
"angle, height": "角度, 高さ",
|
||||
"appearance.dielectric_ior": "誘電体の屈折率",
|
||||
"appearance.metallic": "金属度",
|
||||
@@ -1070,8 +1131,8 @@
|
||||
"ui.ai_tool_running": "実行中",
|
||||
"ui.ai_tool_unfold": "クリックして結果を表示",
|
||||
"ui.ai_tool_waiting": "待機中",
|
||||
"ui.ai_toolbar_button": "ツールバーにボタンを表示",
|
||||
"ui.ai_toolbar_button_note": "ツールバー右端の AI ボタン。Ctrl+Shift+A と表示メニューからも引き続きパネルを開けます。",
|
||||
"ui.ai_toolbar_button": "アプリケーションバーにアシスタントボタンを表示",
|
||||
"ui.ai_toolbar_button_note": "アプリケーションバーのアシスタントボタン。Ctrl+Shift+A と表示メニューからもパネルを開けます。",
|
||||
"ui.ai_undo_tip": "このメッセージでエージェントが行った変更を、1回でまとめて元に戻します",
|
||||
"ui.all": "すべて",
|
||||
"ui.ambient_occlusion": "アンビエントオクルージョン",
|
||||
@@ -1087,6 +1148,8 @@
|
||||
"ui.apply": "適用",
|
||||
"ui.arc": "円弧",
|
||||
"ui.assemble": "アセンブリ",
|
||||
"ui.assistant": "アシスタント",
|
||||
"ui.assistant_waiting": "{count} 件の承認待ち",
|
||||
"ui.autosave_every": "自動保存の間隔",
|
||||
"ui.axes": "軸",
|
||||
"ui.axis": "軸",
|
||||
@@ -1476,6 +1539,9 @@
|
||||
"ui.reverse_horizontal_pan_tip": "水平方向の2本指スクロールとサムホイールで、反対方向にパンします",
|
||||
"ui.reverse_zoom_direction": "ズーム方向を反転",
|
||||
"ui.revolve": "回転",
|
||||
"ui.ribbon_exit": "終了",
|
||||
"ui.ribbon_pin_footer": "ピン留めしたコマンドはリボンに表示されます。行にポインターを合わせて、ピン留めや解除ができます。",
|
||||
"ui.ribbon_workspace": "ワークスペース",
|
||||
"ui.right": "右側面",
|
||||
"ui.save": "保存",
|
||||
"ui.save_as": "名前を付けて保存",
|
||||
@@ -1569,6 +1635,7 @@
|
||||
"ui.stand_up_tip": "Z軸上向きで開いたSTEPまたはIGESファイルに対し、X軸周りに90度回転させるか確認します",
|
||||
"ui.start": "開始",
|
||||
"ui.start_over": "最初からやり直す",
|
||||
"ui.start_page": "スタートページ",
|
||||
"ui.start_radius": "開始半径",
|
||||
"ui.stretch": "伸縮",
|
||||
"ui.supersampling": "スーパーサンプリング (SSAA)",
|
||||
@@ -1626,6 +1693,18 @@
|
||||
"ui.visual_style": "表示スタイル",
|
||||
"ui.visual_wireframe": "ワイヤーフレーム",
|
||||
"ui.workspace": "ワークスペース",
|
||||
"ui.workspace_animation_description": "分解図、モーション スタディ、ストーリーボード",
|
||||
"ui.workspace_available": "利用可能",
|
||||
"ui.workspace_current": "現在",
|
||||
"ui.workspace_design_description": "スケッチ、モデリング、アセンブリ、検査",
|
||||
"ui.workspace_design_tabs": "モデル · サーフェス · アセンブリ · 挿入 · 検査 · 管理 · 表示",
|
||||
"ui.workspace_drawing_description": "ビュー、寸法、表題欄を含む2D図面",
|
||||
"ui.workspace_footer": "すべてのワークスペースで同じデザイン、履歴、選択を使用し、リボンのタブだけが変わります。スケッチやフィーチャーの編集中は切り替えできません。",
|
||||
"ui.workspace_manufacture_description": "スライス、ツールパス、セットアップ",
|
||||
"ui.workspace_planned": "予定",
|
||||
"ui.workspace_render_description": "製品プレビュー、シーン設定、レンダリング画像",
|
||||
"ui.workspace_render_tabs": "シーン · 画像",
|
||||
"ui.workspace_simulation_description": "荷重、拘束、結果",
|
||||
"ui.x_distance": "X 距離",
|
||||
"ui.y_distance": "Y 距離",
|
||||
"ui.y_up": "Y軸上向き",
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. 아래에서 GitHub 초안을 열고 클립보드에 복사된 보고서를 붙여넣으세요.",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. 아래에서 GitHub 초안을 여세요. 제목과 보고서가 자동으로 입력됩니다.",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. 스크린샷을 첨부하세요. 복사하여 붙여넣거나 PNG로 저장한 뒤 업로드하세요.",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. GitHub에서 Submit new issue를 클릭하여 보고서를 보내세요.",
|
||||
"AI": "AI",
|
||||
"ARRANGE": "배치",
|
||||
"Acceleration": "가속도",
|
||||
"Against": "상대",
|
||||
"Alignment": "정렬",
|
||||
@@ -13,6 +15,12 @@
|
||||
"BROWSER": "브라우저",
|
||||
"Bends": "벤딩",
|
||||
"Boundary": "경계",
|
||||
"CHECK": "검사",
|
||||
"COMPONENTS": "구성요소",
|
||||
"CONFIGURATIONS": "구성",
|
||||
"CONSTRAIN": "구속",
|
||||
"CONTACT": "접촉",
|
||||
"CONVERT": "변환",
|
||||
"Centre to centre": "중심 간",
|
||||
"Check collisions": "충돌 확인",
|
||||
"Circumference": "원주",
|
||||
@@ -41,20 +49,31 @@
|
||||
"Export DXF…": "DXF 내보내기…",
|
||||
"Export hidden edges as dashed lines": "숨겨진 모서리를 파선으로 내보내기",
|
||||
"Extend to meet": "만날 때까지 연장",
|
||||
"FILES": "파일",
|
||||
"FLAT": "전개",
|
||||
"Face": "면",
|
||||
"Faces": "면",
|
||||
"Find in Browser": "브라우저에서 찾기",
|
||||
"Flat": "플랫",
|
||||
"From edges": "시작 모서리",
|
||||
"HISTORY": "이력",
|
||||
"Hidden edges": "숨겨진 모서리",
|
||||
"Holes": "구멍",
|
||||
"Holes (edges on them)": "구멍 (구멍의 모서리)",
|
||||
"IMAGES": "이미지",
|
||||
"In place (surfaces)": "제자리에서 (서피스)",
|
||||
"In plane": "평면 내",
|
||||
"Inside": "안쪽",
|
||||
"JOINTS": "조인트",
|
||||
"Keep (points on it)": "유지할 부분(그 위의 점)",
|
||||
"Keep of the other surface": "다른 곡면에서 유지할 부분",
|
||||
"LIBRARY": "라이브러리",
|
||||
"LINKS": "링크",
|
||||
"Length": "길이",
|
||||
"MANAGE": "관리",
|
||||
"MATERIALS": "재질",
|
||||
"MODEL": "모델",
|
||||
"MOTION": "동작",
|
||||
"Max": "최대",
|
||||
"Min": "최소",
|
||||
"Mitre": "연귀",
|
||||
@@ -63,6 +82,7 @@
|
||||
"None": "없음",
|
||||
"Normal to sketch": "스케치에 수직",
|
||||
"Notch": "노치",
|
||||
"OUTPUT": "출력",
|
||||
"Other surface (mutual trim)": "다른 곡면(상호 트림)",
|
||||
"Outside": "바깥쪽",
|
||||
"Overall length": "전체 길이",
|
||||
@@ -75,7 +95,9 @@
|
||||
"Profiles/Curves": "프로파일/곡선",
|
||||
"Projection": "투영",
|
||||
"Quantity": "양",
|
||||
"REFERENCE": "참조",
|
||||
"RULED SURFACE": "룰드 서피스",
|
||||
"RULES": "규칙",
|
||||
"Rectangular": "직사각형",
|
||||
"Reference face": "참조 면",
|
||||
"Report a bug — review a screenshot and open a GitHub draft": "버그 신고 — 스크린샷을 검토하고 GitHub 초안 열기",
|
||||
@@ -83,6 +105,8 @@
|
||||
"Restore outer boundary": "외부 경계 복원",
|
||||
"Revert Position": "위치 복원",
|
||||
"Round": "둥글게",
|
||||
"SECTION": "단면",
|
||||
"SURFACE QUALITY": "곡면 품질",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "뷰포트에 보이는 대로 스터디를 애니메이션 GIF로 저장",
|
||||
"Select bodies (a face picks its body)": "바디 선택(면을 클릭하면 해당 바디 선택)",
|
||||
"Selection filter": "선택 필터",
|
||||
@@ -108,6 +132,7 @@
|
||||
"Turn off section analysis before exporting the view.": "뷰를 내보내기 전에 단면 분석을 끄세요.",
|
||||
"Type": "유형",
|
||||
"UNTRIM": "트림 해제",
|
||||
"VIEWS": "뷰",
|
||||
"Velocity": "속도",
|
||||
"Vertices": "꼭짓점",
|
||||
"Visible bodies only. Curves use line segments (0.01 mm tolerance).": "표시된 바디만 내보냅니다. 곡선은 선분으로 근사합니다 (허용오차 0.01 mm).",
|
||||
@@ -1131,6 +1156,8 @@
|
||||
"ui.restore_defaults": "기본값 복원",
|
||||
"ui.reverse_zoom_direction": "확대/축소 방향 반전",
|
||||
"ui.revolve": "회전",
|
||||
"ui.ribbon_exit": "종료",
|
||||
"ui.ribbon_workspace": "작업 공간",
|
||||
"ui.right": "우측면",
|
||||
"ui.save": "저장",
|
||||
"ui.save_as": "다른 이름으로 저장",
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. Abra o rascunho do GitHub abaixo e cole o relatório copiado para a área de transferência.",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. Abra o rascunho do GitHub abaixo. O título e o relatório serão preenchidos.",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Anexe a captura de tela: copie e cole, ou salve e envie o PNG.",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. Clique em Submit new issue no GitHub para enviar o relatório.",
|
||||
"A new configuration, a copy of the active one": "Uma nova configuração, cópia da ativa",
|
||||
"AI": "IA",
|
||||
"ARRANGE": "ORGANIZAR",
|
||||
"About SolidCraft": "Sobre o SolidCraft",
|
||||
"Active": "Ativo",
|
||||
"Active rule": "Regra ativa",
|
||||
@@ -36,6 +38,12 @@
|
||||
"Body": "Corpo",
|
||||
"Boundary": "Contorno",
|
||||
"Bounding box": "Caixa delimitadora",
|
||||
"CHECK": "VERIFICAR",
|
||||
"COMPONENTS": "COMPONENTES",
|
||||
"CONFIGURATIONS": "CONFIGURAÇÕES",
|
||||
"CONSTRAIN": "RESTRINGIR",
|
||||
"CONTACT": "CONTATO",
|
||||
"CONVERT": "CONVERTER",
|
||||
"CSV or JSON: updates existing parameters, adds new ones": "CSV ou JSON: atualiza parâmetros existentes e adiciona novos",
|
||||
"Capture All Positions": "Capturar todas as posições",
|
||||
"Catch Direction": "Direção do encaixe",
|
||||
@@ -101,6 +109,8 @@
|
||||
"Export hidden edges as dashed lines": "Exportar arestas ocultas como linhas tracejadas",
|
||||
"Extend to meet": "Estender até encontrar",
|
||||
"Extents": "Extensões",
|
||||
"FILES": "ARQUIVOS",
|
||||
"FLAT": "PLANIFICAÇÃO",
|
||||
"Face": "Face",
|
||||
"Face attachment lost": "Fixação à face perdida",
|
||||
"Faces": "Faces",
|
||||
@@ -117,21 +127,26 @@
|
||||
"From edges": "Arestas de origem",
|
||||
"Full Length": "Comprimento total",
|
||||
"Grid": "Grade",
|
||||
"HISTORY": "HISTÓRICO",
|
||||
"Height": "Altura",
|
||||
"Hidden edges": "Arestas ocultas",
|
||||
"Holes": "Furos",
|
||||
"Holes (edges on them)": "Furos (arestas neles)",
|
||||
"Home view": "Vista inicial",
|
||||
"IMAGES": "IMAGENS",
|
||||
"In This Design": "Neste projeto",
|
||||
"In place (surfaces)": "No lugar (superfícies)",
|
||||
"In plane": "No plano",
|
||||
"Inside": "Dentro",
|
||||
"Interferes": "Interfere",
|
||||
"Issue title": "Título da issue",
|
||||
"JOINTS": "JUNTAS",
|
||||
"Joint Origin1": "Origem da junta1",
|
||||
"Keep (points on it)": "Manter (pontos sobre ela)",
|
||||
"Keep Tools": "Manter ferramentas",
|
||||
"Keep of the other surface": "Manter da outra superfície",
|
||||
"LIBRARY": "BIBLIOTECA",
|
||||
"LINKS": "VÍNCULOS",
|
||||
"Later": "Depois",
|
||||
"Leave it": "Deixar assim",
|
||||
"Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Fixação de face antiga. Vincular novamente a uma face certificada cria uma fixação exata.",
|
||||
@@ -141,6 +156,10 @@
|
||||
"Library": "Biblioteca",
|
||||
"Line Spacing": "Espaçamento entre linhas",
|
||||
"Loop": "Laço",
|
||||
"MANAGE": "GERENCIAR",
|
||||
"MATERIALS": "MATERIAIS",
|
||||
"MODEL": "MODELO",
|
||||
"MOTION": "MOVIMENTO",
|
||||
"Margin": "Margem",
|
||||
"Mass": "Massa",
|
||||
"Material": "Material",
|
||||
@@ -163,6 +182,7 @@
|
||||
"Normal to sketch": "Normal ao esboço",
|
||||
"Not available yet": "Ainda não disponível",
|
||||
"Notch": "Entalhe",
|
||||
"OUTPUT": "SAÍDA",
|
||||
"Opacity": "Opacidade",
|
||||
"Open GitHub draft": "Abrir rascunho no GitHub",
|
||||
"Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "CAD 3D paramétrico de código aberto em Rust. Licenciado sob MIT OU Apache-2.0.",
|
||||
@@ -187,7 +207,9 @@
|
||||
"Profiles/Curves": "Perfis/Curvas",
|
||||
"Projection": "Projeção",
|
||||
"RECENT": "RECENTES",
|
||||
"REFERENCE": "REFERÊNCIA",
|
||||
"RULED SURFACE": "SUPERFÍCIE REGRADA",
|
||||
"RULES": "REGRAS",
|
||||
"Radius Fit": "Ajuste de raio",
|
||||
"Ratio": "Razão",
|
||||
"Reattach selected face": "Fixar novamente na face selecionada",
|
||||
@@ -219,6 +241,8 @@
|
||||
"Roll History Marker Here": "Mover o marcador do histórico para cá",
|
||||
"Round": "Arredondado",
|
||||
"Rule": "Regra",
|
||||
"SECTION": "SEÇÃO",
|
||||
"SURFACE QUALITY": "QUALIDADE DA SUPERFÍCIE",
|
||||
"Save Rule": "Salvar regra",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "Salvar o estudo como GIF animado, como a janela de visualização o mostra",
|
||||
"Saved preview. Geometry is being checked before editing.": "Visualização salva. A geometria está sendo verificada antes da edição.",
|
||||
@@ -285,6 +309,7 @@
|
||||
"Use saved fixed plane": "Usar o plano fixo salvo",
|
||||
"Use selected face as fixed plane": "Usar a face selecionada como plano fixo",
|
||||
"VIEW": "VISTA",
|
||||
"VIEWS": "VISTAS",
|
||||
"Value": "Valor",
|
||||
"Vertices": "Vértices",
|
||||
"View navigator": "Navegador de vistas",
|
||||
@@ -1325,6 +1350,8 @@
|
||||
"ui.restore_defaults": "Restaurar padrões",
|
||||
"ui.reverse_zoom_direction": "Inverter direção do zoom",
|
||||
"ui.revolve": "Revolução",
|
||||
"ui.ribbon_exit": "Sair",
|
||||
"ui.ribbon_workspace": "Espaço de trabalho",
|
||||
"ui.right": "Direita",
|
||||
"ui.save": "Salvar",
|
||||
"ui.save_as": "Salvar como",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"0 turns it off": "0 отключает",
|
||||
"2D": "2D",
|
||||
"A new configuration, a copy of the active one": "Новая конфигурация — копия активной",
|
||||
"ARRANGE": "РАСПОЛОЖЕНИЕ",
|
||||
"About SolidCraft": "О SolidCraft",
|
||||
"Acceleration": "Ускорение",
|
||||
"Active": "Активный",
|
||||
@@ -33,6 +35,12 @@
|
||||
"Body": "Тело",
|
||||
"Boundary": "Граница",
|
||||
"Bounding box": "Габаритная рамка",
|
||||
"CHECK": "ПРОВЕРКА",
|
||||
"COMPONENTS": "КОМПОНЕНТЫ",
|
||||
"CONFIGURATIONS": "КОНФИГУРАЦИИ",
|
||||
"CONSTRAIN": "ОГРАНИЧЕНИЯ",
|
||||
"CONTACT": "КОНТАКТ",
|
||||
"CONVERT": "ПРЕОБРАЗОВАНИЕ",
|
||||
"CSV or JSON: updates existing parameters, adds new ones": "CSV или JSON: обновляет существующие параметры, добавляет новые",
|
||||
"Capture All Positions": "Зафиксировать все положения",
|
||||
"Catch Direction": "Направление защёлкивания",
|
||||
@@ -91,6 +99,8 @@
|
||||
"Export Animation…": "Экспортировать анимацию…",
|
||||
"Extend to meet": "Продлить до пересечения",
|
||||
"Extents": "Пределы",
|
||||
"FILES": "ФАЙЛЫ",
|
||||
"FLAT": "РАЗВЁРТКА",
|
||||
"Face attachment lost": "Привязка к грани потеряна",
|
||||
"Faces": "Грани",
|
||||
"Faces / edges / vertices": "Грани / рёбра / вершины",
|
||||
@@ -106,16 +116,21 @@
|
||||
"From edges": "Начальные рёбра",
|
||||
"Full Length": "Полная длина",
|
||||
"Grid": "Сетка",
|
||||
"HISTORY": "ИСТОРИЯ",
|
||||
"Height": "Высота",
|
||||
"Home view": "Главный вид",
|
||||
"IMAGES": "ИЗОБРАЖЕНИЯ",
|
||||
"In This Design": "В этом дизайне",
|
||||
"In plane": "В плоскости",
|
||||
"Interferes": "Пересекается",
|
||||
"Issue title": "Заголовок Issue",
|
||||
"JOINTS": "СОЕДИНЕНИЯ",
|
||||
"Joint Origin1": "Точка сопряжения1",
|
||||
"Keep (points on it)": "Оставить (точки на нём)",
|
||||
"Keep Tools": "Оставить инструменты",
|
||||
"Keep of the other surface": "Оставить от другой поверхности",
|
||||
"LIBRARY": "БИБЛИОТЕКА",
|
||||
"LINKS": "ССЫЛКИ",
|
||||
"Later": "Позже",
|
||||
"Leave it": "Оставить как есть",
|
||||
"Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Устаревшая привязка к грани. Перепривязка к сертифицированной грани создаёт точную привязку.",
|
||||
@@ -125,6 +140,10 @@
|
||||
"Library": "Библиотека",
|
||||
"Line Spacing": "Межстрочный интервал",
|
||||
"Loop": "Контур",
|
||||
"MANAGE": "УПРАВЛЕНИЕ",
|
||||
"MATERIALS": "МАТЕРИАЛЫ",
|
||||
"MODEL": "МОДЕЛЬ",
|
||||
"MOTION": "ДВИЖЕНИЕ",
|
||||
"Margin": "Отступ",
|
||||
"Mass": "Масса",
|
||||
"Material": "Материал",
|
||||
@@ -143,6 +162,7 @@
|
||||
"Normal to sketch": "По нормали к эскизу",
|
||||
"Not available yet": "Пока недоступно",
|
||||
"Notch": "Вырез",
|
||||
"OUTPUT": "ВЫВОД",
|
||||
"Opacity": "Непрозрачность",
|
||||
"Open GitHub draft": "Открыть черновик на GitHub",
|
||||
"Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "Открытая параметрическая 3D CAD на Rust. Лицензия MIT OR Apache-2.0.",
|
||||
@@ -165,6 +185,8 @@
|
||||
"Preview leaves the current design unchanged.": "Предпросмотр не меняет текущий дизайн.",
|
||||
"Quantity": "Величина",
|
||||
"RECENT": "НЕДАВНИЕ",
|
||||
"REFERENCE": "ССЫЛОЧНАЯ ГЕОМЕТРИЯ",
|
||||
"RULES": "ПРАВИЛА",
|
||||
"Radius Fit": "Подобрать радиус",
|
||||
"Ratio": "Отношение",
|
||||
"Reattach selected face": "Перепривязать выбранную грань",
|
||||
@@ -194,6 +216,8 @@
|
||||
"Roll History Marker Here": "Переместить маркер истории сюда",
|
||||
"Round": "Круглая",
|
||||
"Rule": "Правило",
|
||||
"SECTION": "СЕЧЕНИЕ",
|
||||
"SURFACE QUALITY": "КАЧЕСТВО ПОВЕРХНОСТИ",
|
||||
"Save Rule": "Сохранить правило",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "Сохранить исследование как анимированный GIF, как его показывает видовой экран",
|
||||
"Saved preview. Geometry is being checked before editing.": "Сохранённый предпросмотр. Геометрия проверяется перед редактированием.",
|
||||
@@ -254,6 +278,7 @@
|
||||
"Use saved fixed plane": "Использовать сохранённую фиксированную плоскость",
|
||||
"Use selected face as fixed plane": "Использовать выбранную грань как фиксированную плоскость",
|
||||
"VIEW": "ВИД",
|
||||
"VIEWS": "ВИДЫ",
|
||||
"Value": "Значение",
|
||||
"Velocity": "Скорость",
|
||||
"Vertices": "Вершины",
|
||||
@@ -1131,6 +1156,8 @@
|
||||
"ui.restore_defaults": "Восстановить по умолчанию",
|
||||
"ui.reverse_zoom_direction": "Обратить направление масштабирования",
|
||||
"ui.revolve": "Вращение",
|
||||
"ui.ribbon_exit": "Выход",
|
||||
"ui.ribbon_workspace": "Рабочая область",
|
||||
"ui.right": "Справа",
|
||||
"ui.save": "Сохранить",
|
||||
"ui.save_as": "Сохранить как",
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. Aşağıdaki GitHub taslağını açın, ardından panoya kopyalanan raporu yapıştırın.",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. Aşağıdaki GitHub taslağını açın. Başlığınız ve raporunuz otomatik olarak doldurulur.",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Ekran görüntüsünü ekleyin: kopyalayıp yapıştırın veya PNG olarak kaydedip yükleyin.",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. Raporu göndermek için GitHub'da Submit new issue düğmesine tıklayın.",
|
||||
"A new configuration, a copy of the active one": "Etkin konfigürasyonun kopyası olan yeni bir konfigürasyon",
|
||||
"AI": "AI",
|
||||
"ARRANGE": "DÜZENLE",
|
||||
"About SolidCraft": "SolidCraft hakkında",
|
||||
"Acceleration": "İvme",
|
||||
"Active": "Etkin",
|
||||
@@ -38,6 +40,12 @@
|
||||
"Bends": "Bükümler",
|
||||
"Body": "Gövde",
|
||||
"Bounding box": "Sınırlayıcı kutu",
|
||||
"CHECK": "DENETLE",
|
||||
"COMPONENTS": "BİLEŞENLER",
|
||||
"CONFIGURATIONS": "YAPILANDIRMALAR",
|
||||
"CONSTRAIN": "KISITLA",
|
||||
"CONTACT": "TEMAS",
|
||||
"CONVERT": "DÖNÜŞTÜR",
|
||||
"CSV or JSON: updates existing parameters, adds new ones": "CSV veya JSON: mevcut parametreleri günceller, yenilerini ekler",
|
||||
"Capture All Positions": "Tüm konumları yakala",
|
||||
"Catch Direction": "Yakalama yönü",
|
||||
@@ -95,6 +103,8 @@
|
||||
"Export Animation…": "Animasyonu dışa aktar…",
|
||||
"Extend to meet": "Buluşana kadar uzat",
|
||||
"Extents": "Kapsamlar",
|
||||
"FILES": "DOSYALAR",
|
||||
"FLAT": "AÇINIM",
|
||||
"Face": "Yüz",
|
||||
"Face attachment lost": "Yüze bağlama kayboldu",
|
||||
"Faces": "Yüzler",
|
||||
@@ -111,20 +121,25 @@
|
||||
"From edges": "Başlangıç kenarları",
|
||||
"Full Length": "Tam uzunluk",
|
||||
"Grid": "Izgara",
|
||||
"HISTORY": "GEÇMİŞ",
|
||||
"Height": "Yükseklik",
|
||||
"Holes": "Delikler",
|
||||
"Holes (edges on them)": "Delikler (kenarları)",
|
||||
"Home view": "Başlangıç görünümü",
|
||||
"IMAGES": "GÖRSELLER",
|
||||
"In This Design": "Bu tasarımda",
|
||||
"In place (surfaces)": "Yerinde (yüzeyler)",
|
||||
"In plane": "Düzlemde",
|
||||
"Inside": "İç",
|
||||
"Interferes": "Girişim var",
|
||||
"Issue title": "Sorun başlığı",
|
||||
"JOINTS": "MAFSALLAR",
|
||||
"Joint Origin1": "Bağlantı orijini1",
|
||||
"Keep (points on it)": "Koru (üzerindeki noktalar)",
|
||||
"Keep Tools": "Araçları koru",
|
||||
"Keep of the other surface": "Diğer yüzeyden korunacak",
|
||||
"LIBRARY": "KİTAPLIK",
|
||||
"LINKS": "BAĞLANTILAR",
|
||||
"Later": "Daha sonra",
|
||||
"Leave it": "Olduğu gibi bırak",
|
||||
"Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Eski tip yüz bağlaması. Doğrulanmış bir yüze yeniden bağlamak tam bir bağlama oluşturur.",
|
||||
@@ -134,6 +149,10 @@
|
||||
"Library": "Kitaplık",
|
||||
"Line Spacing": "Satır aralığı",
|
||||
"Loop": "Döngü",
|
||||
"MANAGE": "YÖNET",
|
||||
"MATERIALS": "MALZEMELER",
|
||||
"MODEL": "MODEL",
|
||||
"MOTION": "HAREKET",
|
||||
"Margin": "Kenar boşluğu",
|
||||
"Mass": "Kütle",
|
||||
"Material": "Malzeme",
|
||||
@@ -155,6 +174,7 @@
|
||||
"None": "Hiçbiri",
|
||||
"Normal to sketch": "Eskize dik",
|
||||
"Not available yet": "Henüz kullanılamıyor",
|
||||
"OUTPUT": "ÇIKTI",
|
||||
"Opacity": "Opaklık",
|
||||
"Open GitHub draft": "GitHub taslağını aç",
|
||||
"Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "Rust ile yazılmış açık kaynaklı parametrik 3D CAD. Lisans: MIT OR Apache-2.0.",
|
||||
@@ -179,7 +199,9 @@
|
||||
"Profiles/Curves": "Profiller/Eğriler",
|
||||
"Quantity": "Büyüklük",
|
||||
"RECENT": "SON KULLANILANLAR",
|
||||
"REFERENCE": "REFERANS",
|
||||
"RULED SURFACE": "REGLE YÜZEY",
|
||||
"RULES": "KURALLAR",
|
||||
"Radius Fit": "Yarıçap uydurma",
|
||||
"Ratio": "Oran",
|
||||
"Reattach selected face": "Seçili yüze yeniden bağla",
|
||||
@@ -210,6 +232,8 @@
|
||||
"Roll History Marker Here": "Geçmiş işaretçisini buraya taşı",
|
||||
"Round": "Yuvarlak",
|
||||
"Rule": "Kural",
|
||||
"SECTION": "KESİT",
|
||||
"SURFACE QUALITY": "YÜZEY KALİTESİ",
|
||||
"Save Rule": "Kuralı kaydet",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "Etüdü görünüm alanında göründüğü gibi animasyonlu GIF olarak kaydet",
|
||||
"Saved preview. Geometry is being checked before editing.": "Kaydedilmiş önizleme. Düzenlemeden önce geometri kontrol ediliyor.",
|
||||
@@ -274,6 +298,7 @@
|
||||
"Use saved fixed plane": "Kaydedilmiş sabit düzlemi kullan",
|
||||
"Use selected face as fixed plane": "Seçili yüzü sabit düzlem olarak kullan",
|
||||
"VIEW": "GÖRÜNÜM",
|
||||
"VIEWS": "GÖRÜNÜMLER",
|
||||
"Value": "Değer",
|
||||
"Velocity": "Hız",
|
||||
"Vertices": "Köşe noktaları",
|
||||
@@ -1270,6 +1295,8 @@
|
||||
"ui.restore_defaults": "Varsayılanları geri yükle",
|
||||
"ui.reverse_zoom_direction": "Yakınlaştırma yönünü tersine çevir",
|
||||
"ui.revolve": "Döndür",
|
||||
"ui.ribbon_exit": "Çıkış",
|
||||
"ui.ribbon_workspace": "Çalışma alanı",
|
||||
"ui.right": "Sağ",
|
||||
"ui.save": "Kaydet",
|
||||
"ui.save_as": "Farklı kaydet",
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. Відкрийте чернетку GitHub нижче, а потім вставте звіт, скопійований у буфер обміну.",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. Відкрийте чернетку GitHub нижче. Заголовок і звіт буде заповнено.",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Додайте знімок екрана: скопіюйте й вставте його або збережіть і завантажте PNG.",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. Натисніть Submit new issue на GitHub, щоб надіслати звіт.",
|
||||
"A new configuration, a copy of the active one": "Нова конфігурація, копія активної",
|
||||
"AI": "ШІ",
|
||||
"ARRANGE": "РОЗТАШУВАННЯ",
|
||||
"About SolidCraft": "Про SolidCraft",
|
||||
"Acceleration": "Прискорення",
|
||||
"Active": "Активна",
|
||||
@@ -40,6 +42,12 @@
|
||||
"Body": "Тіло",
|
||||
"Boundary": "Межа",
|
||||
"Bounding box": "Обмежувальна рамка",
|
||||
"CHECK": "ПЕРЕВІРКА",
|
||||
"COMPONENTS": "КОМПОНЕНТИ",
|
||||
"CONFIGURATIONS": "КОНФІГУРАЦІЇ",
|
||||
"CONSTRAIN": "ОБМЕЖЕННЯ",
|
||||
"CONTACT": "КОНТАКТ",
|
||||
"CONVERT": "ПЕРЕТВОРЕННЯ",
|
||||
"CSV or JSON: updates existing parameters, adds new ones": "CSV або JSON: оновлює наявні параметри, додає нові",
|
||||
"Capture All Positions": "Зафіксувати всі положення",
|
||||
"Catch Direction": "Напрямок зачеплення",
|
||||
@@ -110,6 +118,8 @@
|
||||
"Export hidden edges as dashed lines": "Експортувати приховані ребра як штрихові лінії",
|
||||
"Extend to meet": "Подовжити до перетину",
|
||||
"Extents": "Межі",
|
||||
"FILES": "ФАЙЛИ",
|
||||
"FLAT": "РОЗГОРТКА",
|
||||
"Face": "Грань",
|
||||
"Face attachment lost": "Втрачено прив'язку до грані",
|
||||
"Faces": "Грані",
|
||||
@@ -126,21 +136,26 @@
|
||||
"From edges": "Початкові ребра",
|
||||
"Full Length": "Повна довжина",
|
||||
"Grid": "Сітка",
|
||||
"HISTORY": "ІСТОРІЯ",
|
||||
"Height": "Висота",
|
||||
"Hidden edges": "Приховані ребра",
|
||||
"Holes": "Отвори",
|
||||
"Holes (edges on them)": "Отвори (ребра на них)",
|
||||
"Home view": "Головний вид",
|
||||
"IMAGES": "ЗОБРАЖЕННЯ",
|
||||
"In This Design": "У цьому проєкті",
|
||||
"In place (surfaces)": "На місці (поверхні)",
|
||||
"In plane": "У площині",
|
||||
"Inside": "Усередину",
|
||||
"Interferes": "Перетинається",
|
||||
"Issue title": "Заголовок повідомлення",
|
||||
"JOINTS": "З’ЄДНАННЯ",
|
||||
"Joint Origin1": "Початок з'єднання1",
|
||||
"Keep (points on it)": "Залишити (точки на ньому)",
|
||||
"Keep Tools": "Зберегти інструменти",
|
||||
"Keep of the other surface": "Залишити від іншої поверхні",
|
||||
"LIBRARY": "БІБЛІОТЕКА",
|
||||
"LINKS": "ПОСИЛАННЯ",
|
||||
"Later": "Пізніше",
|
||||
"Leave it": "Залишити як є",
|
||||
"Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Застаріла прив'язка до грані. Повторна прив'язка до перевіреної грані створює точну прив'язку.",
|
||||
@@ -150,6 +165,10 @@
|
||||
"Library": "Бібліотека",
|
||||
"Line Spacing": "Міжрядковий інтервал",
|
||||
"Loop": "Контур",
|
||||
"MANAGE": "КЕРУВАННЯ",
|
||||
"MATERIALS": "МАТЕРІАЛИ",
|
||||
"MODEL": "МОДЕЛЬ",
|
||||
"MOTION": "РУХ",
|
||||
"Margin": "Відступ",
|
||||
"Mass": "Маса",
|
||||
"Material": "Матеріал",
|
||||
@@ -174,6 +193,7 @@
|
||||
"Normal to sketch": "За нормаллю до ескізу",
|
||||
"Not available yet": "Ще недоступно",
|
||||
"Notch": "Виріз",
|
||||
"OUTPUT": "ВИВЕДЕННЯ",
|
||||
"Opacity": "Непрозорість",
|
||||
"Open GitHub draft": "Відкрити чернетку GitHub",
|
||||
"Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "Параметричний 3D-CAD з відкритим вихідним кодом на Rust. Ліцензовано за MIT OR Apache-2.0.",
|
||||
@@ -202,7 +222,9 @@
|
||||
"Projection": "Проєкція",
|
||||
"Quantity": "Величина",
|
||||
"RECENT": "НЕДАВНІ",
|
||||
"REFERENCE": "ДОПОМІЖНА ГЕОМЕТРІЯ",
|
||||
"RULED SURFACE": "ЛІНІЙЧАСТА ПОВЕРХНЯ",
|
||||
"RULES": "ПРАВИЛА",
|
||||
"Radius Fit": "Підгонка за радіусом",
|
||||
"Ratio": "Співвідношення",
|
||||
"Reattach selected face": "Повторно приєднати вибрану грань",
|
||||
@@ -234,6 +256,8 @@
|
||||
"Roll History Marker Here": "Перемістити маркер історії сюди",
|
||||
"Round": "Круглий",
|
||||
"Rule": "Правило",
|
||||
"SECTION": "ПЕРЕРІЗ",
|
||||
"SURFACE QUALITY": "ЯКІСТЬ ПОВЕРХНІ",
|
||||
"Save Rule": "Зберегти правило",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "Зберегти дослідження як анімований GIF, як його показує вікно перегляду",
|
||||
"Saved preview. Geometry is being checked before editing.": "Збережений перегляд. Геометрію перевіряють перед редагуванням.",
|
||||
@@ -302,6 +326,7 @@
|
||||
"Use saved fixed plane": "Використати збережену фіксовану площину",
|
||||
"Use selected face as fixed plane": "Використати вибрану грань як фіксовану площину",
|
||||
"VIEW": "ВИД",
|
||||
"VIEWS": "ВИГЛЯДИ",
|
||||
"Value": "Значення",
|
||||
"Velocity": "Швидкість",
|
||||
"Vertices": "Вершини",
|
||||
@@ -1437,6 +1462,8 @@
|
||||
"ui.reverse_horizontal_pan_tip": "Горизонтальна прокрутка двома пальцями та бічне колесо панорамують у зворотний бік",
|
||||
"ui.reverse_zoom_direction": "Змінити напрямок масштабування",
|
||||
"ui.revolve": "Обертання",
|
||||
"ui.ribbon_exit": "Вихід",
|
||||
"ui.ribbon_workspace": "Робоча область",
|
||||
"ui.right": "Справа",
|
||||
"ui.save": "Зберегти",
|
||||
"ui.save_as": "Зберегти як",
|
||||
|
||||
@@ -3,11 +3,14 @@
|
||||
"1. Open GitHub draft below, then paste the report copied to your clipboard.": "1. 点击下方按钮打开 GitHub 草稿,然后粘贴已复制到剪贴板的报告。",
|
||||
"1. Open GitHub draft below. Your title and report will be filled in.": "1. 点击下方按钮打开 GitHub 草稿。标题和报告将自动填入。",
|
||||
"2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. 附上截图:复制并粘贴,或保存为 PNG 后上传。",
|
||||
"2D": "2D",
|
||||
"3. Click Submit new issue on GitHub to send your report.": "3. 在 GitHub 上点击 Submit new issue 发送报告。",
|
||||
"A new configuration, a copy of the active one": "新建配置,为当前配置的副本",
|
||||
"AI": "AI",
|
||||
"ARRANGE": "排列",
|
||||
"About SolidCraft": "关于 SolidCraft",
|
||||
"Acceleration": "加速度",
|
||||
"Access": "可达性",
|
||||
"Active": "活动",
|
||||
"Active rule": "活动规则",
|
||||
"Add": "添加",
|
||||
@@ -30,6 +33,8 @@
|
||||
"Apply to selection": "应用到选择",
|
||||
"Arc length": "弧长",
|
||||
"Area": "面积",
|
||||
"As-Built": "现有位置",
|
||||
"Assign Rule": "分配规则",
|
||||
"Attachment": "附着",
|
||||
"BLEND SURFACE": "混合曲面",
|
||||
"BOUNDARY SURFACE": "边界曲面",
|
||||
@@ -37,12 +42,21 @@
|
||||
"Bend Line Position": "弯折线位置",
|
||||
"Bend Position": "折弯位置",
|
||||
"Bend Radius": "折弯半径",
|
||||
"Bend Table": "折弯表",
|
||||
"Bends": "折弯",
|
||||
"Bodies": "实体",
|
||||
"Body": "实体",
|
||||
"Boundary": "边界",
|
||||
"Bounding box": "边界框",
|
||||
"CHECK": "检查",
|
||||
"COMPONENTS": "组件",
|
||||
"CONFIGURATIONS": "配置",
|
||||
"CONSTRAIN": "约束",
|
||||
"CONTACT": "接触",
|
||||
"CONVERT": "转换",
|
||||
"CSV or JSON: updates existing parameters, adds new ones": "CSV 或 JSON:更新现有参数、添加新参数",
|
||||
"Capture All Positions": "捕获所有位置",
|
||||
"Capture Pos.": "捕获位置",
|
||||
"Catch Direction": "卡扣方向",
|
||||
"Cells": "区域",
|
||||
"Center X": "中心 X",
|
||||
@@ -53,15 +67,18 @@
|
||||
"Check collisions": "检查碰撞",
|
||||
"Checked": "已检查",
|
||||
"Choose a new plane. Sketch geometry and dimensions stay unchanged in its two-dimensional coordinates.": "选择一个新平面。草图几何和尺寸在其二维坐标中保持不变。",
|
||||
"Circular": "圆周",
|
||||
"Circumference": "周长",
|
||||
"Close draft": "关闭草稿",
|
||||
"Collisions": "碰撞",
|
||||
"Colour": "颜色",
|
||||
"Component1": "组件1",
|
||||
"Config Table": "配置表",
|
||||
"Configuration": "配置",
|
||||
"Configuration rules": "配置规则",
|
||||
"Construction": "构造",
|
||||
"Contact": "接触",
|
||||
"Contact Sets": "接触集",
|
||||
"Contact sets": "接触集",
|
||||
"Continuity": "连续性",
|
||||
"Copy Error Message": "复制错误消息",
|
||||
@@ -79,6 +96,7 @@
|
||||
"Cube": "立方体",
|
||||
"Current orthographic view (1:1 mm)": "当前正交视图(1:1毫米)",
|
||||
"Current perspective view": "当前透视视图",
|
||||
"Curv. Comb": "曲率梳",
|
||||
"Curvature (G2)": "曲率 (G2)",
|
||||
"Curvature change (G3)": "曲率变化 (G3)",
|
||||
"Customize Toolbar": "自定义工具栏",
|
||||
@@ -88,6 +106,7 @@
|
||||
"Delete the set": "删除此集合",
|
||||
"Delete this parameter": "删除此参数",
|
||||
"Density": "密度",
|
||||
"Dependents": "依赖项",
|
||||
"Designs you open or save appear here.": "你打开或保存的设计会显示在此处。",
|
||||
"Determined by To Object. Choose Angle to edit the angular extent.": "由“到对象”确定。选择“角度”可编辑角度范围。",
|
||||
"Direction": "方向",
|
||||
@@ -109,41 +128,56 @@
|
||||
"Export Animation…": "导出动画…",
|
||||
"Export Current View as DXF": "将当前视图导出为DXF",
|
||||
"Export Current View as DXF…": "将当前视图导出为DXF…",
|
||||
"Export DXF": "导出DXF",
|
||||
"Export DXF…": "导出DXF…",
|
||||
"Export hidden edges as dashed lines": "以虚线导出隐藏线",
|
||||
"Extend to meet": "延伸至相交",
|
||||
"Extents": "范围",
|
||||
"FILES": "文件",
|
||||
"FLAT": "展开",
|
||||
"Face": "面",
|
||||
"Face attachment lost": "面附着丢失",
|
||||
"Faces": "面",
|
||||
"Faces / edges / vertices": "面 / 边 / 顶点",
|
||||
"Fastener": "紧固件",
|
||||
"Favourite": "收藏",
|
||||
"Files from many CAD programs have Y up, so they open lying on their back here (Z up).": "许多 CAD 程序的文件以 Y 为上轴,因此在此处打开时会平躺(Z 朝上)。",
|
||||
"Filter": "筛选",
|
||||
"Find in Browser": "在浏览器中查找",
|
||||
"Finish": "完成",
|
||||
"Flat": "平面",
|
||||
"Flat Pattern": "展开图",
|
||||
"Flat size": "平板尺寸",
|
||||
"Follow camera (Look At sketches)": "跟随相机(注视草图)",
|
||||
"Follow the camera (Look At sketches)": "跟随相机(注视草图)",
|
||||
"Font": "字体",
|
||||
"From Bodies": "从实体创建",
|
||||
"From edges": "起始边",
|
||||
"Full Length": "全长",
|
||||
"Gap": "间隙",
|
||||
"Grid": "网格",
|
||||
"HISTORY": "历史",
|
||||
"Height": "高度",
|
||||
"Hidden edges": "隐藏线",
|
||||
"Holes": "孔",
|
||||
"Holes (edges on them)": "孔(孔上的边)",
|
||||
"Home view": "主视图",
|
||||
"Horiz./Vert.": "水平 / 垂直",
|
||||
"IMAGES": "图像",
|
||||
"In This Design": "在此设计中",
|
||||
"In place (surfaces)": "原位(曲面)",
|
||||
"In plane": "在平面内",
|
||||
"Inside": "内侧",
|
||||
"Interferes": "发生干涉",
|
||||
"Isocurve": "等参线",
|
||||
"Issue title": "Issue 标题",
|
||||
"JOINTS": "关节",
|
||||
"Joint Origin1": "接头原点1",
|
||||
"Keep (points on it)": "保留(其上的点)",
|
||||
"Keep Tools": "保留工具",
|
||||
"Keep of the other surface": "另一曲面保留的部分",
|
||||
"LIBRARY": "库",
|
||||
"LINKS": "链接",
|
||||
"Later": "稍后",
|
||||
"Leave it": "保持原样",
|
||||
"Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "旧版面附着。重新绑定到经验证的面可创建精确附着。",
|
||||
@@ -153,8 +187,13 @@
|
||||
"Library": "零件库",
|
||||
"Line Spacing": "行间距",
|
||||
"Loop": "循环",
|
||||
"MANAGE": "管理",
|
||||
"MATERIALS": "材料",
|
||||
"MODEL": "模型",
|
||||
"MOTION": "运动",
|
||||
"Margin": "余量",
|
||||
"Mass": "质量",
|
||||
"Mass Center": "质心",
|
||||
"Material": "材质",
|
||||
"Max": "最大",
|
||||
"Mid Radius": "中间半径",
|
||||
@@ -164,11 +203,14 @@
|
||||
"Modeled": "已建模",
|
||||
"More toolbar panels": "更多工具栏面板",
|
||||
"Motion": "运动",
|
||||
"Move / Copy": "移动 / 复制",
|
||||
"Move Type": "移动类型",
|
||||
"Move earlier": "向前移动",
|
||||
"Move later": "向后移动",
|
||||
"Name": "名称",
|
||||
"Nearest": "最近",
|
||||
"New Comp.": "新建组件",
|
||||
"New Sketch": "新建草图",
|
||||
"New study": "新建研究",
|
||||
"No crash reports.": "没有崩溃报告。",
|
||||
"No matching appearances": "没有匹配的外观",
|
||||
@@ -177,6 +219,7 @@
|
||||
"Normal to sketch": "垂直于草图",
|
||||
"Not available yet": "暂不可用",
|
||||
"Notch": "缺口",
|
||||
"OUTPUT": "输出",
|
||||
"Opacity": "不透明度",
|
||||
"Open GitHub draft": "打开 GitHub 草稿",
|
||||
"Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "使用 Rust 编写的开源参数化 3D CAD。基于 MIT OR Apache-2.0 许可。",
|
||||
@@ -184,14 +227,18 @@
|
||||
"Other surface (mutual trim)": "另一曲面(相互修剪)",
|
||||
"Outside": "外侧",
|
||||
"Overall length": "总长",
|
||||
"Param. Graph": "参数图",
|
||||
"Parameter values": "参数值",
|
||||
"Parts": "零件",
|
||||
"Pass through": "通过点",
|
||||
"Path": "路径",
|
||||
"Pattern": "阵列",
|
||||
"Per Edge": "每条边",
|
||||
"Pick the tool bodies": "选择工具实体",
|
||||
"Picked": "所选",
|
||||
"Picked point": "选取的点",
|
||||
"Place at the origin instead": "改为放置在原点",
|
||||
"Plastic Rules": "塑料规则",
|
||||
"Playback": "播放",
|
||||
"Plot": "图表",
|
||||
"Position": "位置",
|
||||
@@ -205,7 +252,9 @@
|
||||
"Projection": "投影",
|
||||
"Quantity": "物理量",
|
||||
"RECENT": "最近使用",
|
||||
"REFERENCE": "参考",
|
||||
"RULED SURFACE": "直纹曲面",
|
||||
"RULES": "规则",
|
||||
"Radius Fit": "半径拟合",
|
||||
"Ratio": "比率",
|
||||
"Reattach selected face": "重新附着所选面",
|
||||
@@ -223,6 +272,8 @@
|
||||
"Remove this point": "移除此点",
|
||||
"Report a bug — review a screenshot and open a GitHub draft": "报告缺陷 — 复核截图并开启 GitHub 草稿",
|
||||
"Reset Toolbar": "重置工具栏",
|
||||
"Resize Part": "调整零件大小",
|
||||
"Restore View": "恢复视图",
|
||||
"Restore outer boundary": "恢复外边界",
|
||||
"Restore the inherited component or physical material appearance": "还原继承的组件或物理材质外观",
|
||||
"Result": "结果",
|
||||
@@ -231,18 +282,24 @@
|
||||
"Reverse Direction": "反向",
|
||||
"Revert": "还原",
|
||||
"Revert All Positions": "还原所有位置",
|
||||
"Revert Pos.": "还原位置",
|
||||
"Revert Position": "恢复位置",
|
||||
"Review the report and screenshot before opening GitHub.": "打开 GitHub 前请审阅报告和截图。",
|
||||
"Rim Edge": "轮缘边",
|
||||
"Roll History Marker Here": "将历史标记滚动到此处",
|
||||
"Round": "圆角",
|
||||
"Rule": "规则",
|
||||
"SECTION": "剖面",
|
||||
"SURFACE QUALITY": "曲面质量",
|
||||
"Save Rule": "保存规则",
|
||||
"Save View": "保存视图",
|
||||
"Save the study as an animated GIF, seen as the viewport shows it": "按视口中的显示将研究保存为动画 GIF",
|
||||
"Saved preview. Geometry is being checked before editing.": "已保存预览。编辑前正在检查几何。",
|
||||
"Scale factor": "比例因子",
|
||||
"Scene": "场景",
|
||||
"Search": "搜索",
|
||||
"Search commands": "搜索命令",
|
||||
"Section": "剖面",
|
||||
"Select Other: hold the left button still on the model (or right-click › Select Other…) to list everything under the cursor; click again on the same spot to select the next thing there. Double-click the middle button to go Home (Preferences › Navigation).": "“选择其他”:在模型上按住左键(或右键单击 › 选择其他…)列出光标下的所有对象;在同一位置再次单击可选择该处的下一个对象。双击中键转到主视图(首选项 › 导航)。",
|
||||
"Select bodies (a face picks its body)": "选择实体(单击面即选择其所属实体)",
|
||||
"Select bodies or faces instead": "改为选择实体或面",
|
||||
@@ -250,6 +307,7 @@
|
||||
"Semantic faces share their appearance across instances.": "语义面在各实例间共享外观。",
|
||||
"Send your report on GitHub": "在 GitHub 上发送报告",
|
||||
"Shape": "形状",
|
||||
"Sheet Rules": "钣金规则",
|
||||
"Show Agent Cursor": "显示代理光标",
|
||||
"Show in folder": "在文件夹中显示",
|
||||
"Show the pointer an AI agent moves (#35)": "显示 AI 代理移动的指针(#35)",
|
||||
@@ -263,6 +321,7 @@
|
||||
"Sketch points": "草图点",
|
||||
"Slot width": "槽宽",
|
||||
"SolidCraft closed before these designs were saved. Their last autosave can be opened.": "SolidCraft 在这些设计保存前已关闭。可以打开它们的上次自动保存。",
|
||||
"Specialise": "专用操作",
|
||||
"Speed": "速度",
|
||||
"Stand it up": "将其立起",
|
||||
"Stand it up: a quarter turn about X, as one Move feature you can undo.": "将其立起:绕 X 轴旋转四分之一周,作为一个可撤销的移动特征。",
|
||||
@@ -307,6 +366,7 @@
|
||||
"Use saved fixed plane": "使用已保存的固定平面",
|
||||
"Use selected face as fixed plane": "使用所选面作为固定平面",
|
||||
"VIEW": "视图",
|
||||
"VIEWS": "视图",
|
||||
"Value": "值",
|
||||
"Velocity": "速度",
|
||||
"Vertices": "顶点",
|
||||
@@ -319,6 +379,7 @@
|
||||
"When": "条件",
|
||||
"Width": "宽度",
|
||||
"Will fail": "将失败",
|
||||
"Zebra": "斑马纹",
|
||||
"angle, height": "角度、高度",
|
||||
"appearance.dielectric_ior": "电介质折射率",
|
||||
"appearance.metallic": "金属度",
|
||||
@@ -1087,6 +1148,8 @@
|
||||
"ui.apply": "应用",
|
||||
"ui.arc": "圆弧",
|
||||
"ui.assemble": "装配",
|
||||
"ui.assistant": "助手",
|
||||
"ui.assistant_waiting": "{count} 个批准请求等待中",
|
||||
"ui.autosave_every": "自动保存间隔",
|
||||
"ui.axes": "轴",
|
||||
"ui.axis": "轴",
|
||||
@@ -1476,6 +1539,9 @@
|
||||
"ui.reverse_horizontal_pan_tip": "水平双指滚动和拇指滚轮向相反方向平移",
|
||||
"ui.reverse_zoom_direction": "反转缩放方向",
|
||||
"ui.revolve": "旋转",
|
||||
"ui.ribbon_exit": "退出",
|
||||
"ui.ribbon_pin_footer": "固定的命令显示在功能区中。将指针悬停在行上可固定或取消固定。",
|
||||
"ui.ribbon_workspace": "工作区",
|
||||
"ui.right": "右视",
|
||||
"ui.save": "保存",
|
||||
"ui.save_as": "另存为",
|
||||
@@ -1569,6 +1635,7 @@
|
||||
"ui.stand_up_tip": "当 Z 朝上的 STEP 或 IGES 文件打开后,提示绕 X 轴旋转四分之一周",
|
||||
"ui.start": "开始",
|
||||
"ui.start_over": "重新开始",
|
||||
"ui.start_page": "起始页",
|
||||
"ui.start_radius": "起始半径",
|
||||
"ui.stretch": "伸展",
|
||||
"ui.supersampling": "超级采样 (SSAA)",
|
||||
@@ -1626,6 +1693,18 @@
|
||||
"ui.visual_style": "视觉样式",
|
||||
"ui.visual_wireframe": "线框",
|
||||
"ui.workspace": "工作区",
|
||||
"ui.workspace_animation_description": "爆炸视图、运动研究和故事板",
|
||||
"ui.workspace_available": "可用",
|
||||
"ui.workspace_current": "当前",
|
||||
"ui.workspace_design_description": "草图、建模、装配和检查",
|
||||
"ui.workspace_design_tabs": "模型 · 曲面 · 装配 · 插入 · 检查 · 管理 · 视图",
|
||||
"ui.workspace_drawing_description": "包含视图、尺寸和标题栏的二维图纸",
|
||||
"ui.workspace_footer": "所有工作区使用同一设计、历史记录和选择,仅功能区选项卡发生变化。编辑草图或特征时,切换器将被锁定。",
|
||||
"ui.workspace_manufacture_description": "切片、刀具路径和设置",
|
||||
"ui.workspace_planned": "计划中",
|
||||
"ui.workspace_render_description": "产品预览、场景设置和渲染图像",
|
||||
"ui.workspace_render_tabs": "场景 · 图像",
|
||||
"ui.workspace_simulation_description": "载荷、约束和结果",
|
||||
"ui.x_distance": "X 距离",
|
||||
"ui.y_distance": "Y 距离",
|
||||
"ui.y_up": "Y 朝上",
|
||||
|
||||
@@ -8,7 +8,31 @@ const fn icon_primary(rgb: [u8; 3]) -> Color32 {
|
||||
impl Tokens {
|
||||
pub const fn light() -> Tokens {
|
||||
Tokens {
|
||||
space_2: 2.0,
|
||||
space_3: 3.0,
|
||||
space_4: 4.0,
|
||||
space_6: 6.0,
|
||||
space_8: 8.0,
|
||||
space_10: 10.0,
|
||||
space_12: 12.0,
|
||||
space_14: 14.0,
|
||||
space_16: 16.0,
|
||||
space_24: 24.0,
|
||||
radius_sm: 4,
|
||||
radius_md: 6,
|
||||
radius_lg: 8,
|
||||
radius_xl: 10,
|
||||
font_badge: 9.5,
|
||||
font_micro: 10.0,
|
||||
font_panel: 10.5,
|
||||
font_small: 11.0,
|
||||
font_caption: 11.5,
|
||||
font_body: 12.0,
|
||||
font_label: 12.5,
|
||||
font_button: 13.0,
|
||||
font_heading: 14.0,
|
||||
app_bar: Color32::from_rgb(52, 56, 64),
|
||||
app_bar_separator: Color32::from_rgb(136, 145, 160),
|
||||
toolbar: Color32::from_rgb(246, 247, 249),
|
||||
panel: Color32::from_rgb(250, 251, 252),
|
||||
panel_header: Color32::from_rgb(236, 238, 242),
|
||||
@@ -18,6 +42,14 @@ impl Tokens {
|
||||
accent: Color32::from_rgb(38, 120, 218),
|
||||
accent_soft: Color32::from_rgb(214, 230, 250),
|
||||
sketch_accent: icon_primary(crate::icon_svg::SKETCH_PRIMARY[0]),
|
||||
// Icon palette active-3 ramps; these accents have no compiled constants yet.
|
||||
surface_accent: Color32::from_rgb(164, 80, 0),
|
||||
mesh_accent: Color32::from_rgb(130, 103, 0),
|
||||
form_accent: Color32::from_rgb(115, 73, 205),
|
||||
render_accent: Color32::from_rgb(174, 45, 113),
|
||||
on_accent: Color32::WHITE,
|
||||
agent_ok: Color32::from_rgb(76, 194, 122),
|
||||
agent_busy: Color32::from_rgb(108, 180, 240),
|
||||
error: Color32::from_rgb(214, 54, 54),
|
||||
warning: Color32::from_rgb(222, 150, 30),
|
||||
icon: Color32::from_rgb(70, 78, 92),
|
||||
@@ -81,6 +113,10 @@ impl Tokens {
|
||||
rubber_band: Color32::from_rgb(30, 120, 230),
|
||||
app_bar_text: Color32::from_rgb(230, 234, 242),
|
||||
app_bar_hover: Color32::from_rgba_unmultiplied_const(255, 255, 255, 28),
|
||||
app_bar_hover_subtle: Color32::from_rgba_unmultiplied_const(255, 255, 255, 18),
|
||||
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),
|
||||
timeline_item: Color32::WHITE,
|
||||
timeline_item_error: Color32::from_rgb(250, 220, 220),
|
||||
timeline_marker: Color32::from_rgb(70, 76, 88),
|
||||
@@ -135,7 +171,7 @@ impl Tokens {
|
||||
pub const fn dark() -> Tokens {
|
||||
let mut t = Tokens::light();
|
||||
t.app_bar = Color32::from_rgb(28, 31, 38);
|
||||
t.toolbar = Color32::from_rgb(37, 41, 49);
|
||||
t.toolbar = Color32::from_rgb(39, 43, 52);
|
||||
t.panel = Color32::from_rgb(39, 43, 52);
|
||||
t.panel_header = Color32::from_rgb(47, 52, 62);
|
||||
t.border = Color32::from_rgb(63, 69, 82);
|
||||
@@ -144,6 +180,10 @@ impl Tokens {
|
||||
t.accent = Color32::from_rgb(58, 136, 238);
|
||||
t.accent_soft = Color32::from_rgb(42, 70, 110);
|
||||
t.sketch_accent = icon_primary(crate::icon_svg::SKETCH_PRIMARY[1]);
|
||||
t.surface_accent = Color32::from_rgb(149, 104, 45);
|
||||
t.mesh_accent = Color32::from_rgb(133, 113, 0);
|
||||
t.form_accent = Color32::from_rgb(123, 99, 166);
|
||||
t.render_accent = Color32::from_rgb(224, 116, 174);
|
||||
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);
|
||||
@@ -210,6 +250,9 @@ impl Tokens {
|
||||
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.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) };
|
||||
t.form_accent = if dark { Color32::from_rgb(165, 135, 220) } else { Color32::from_rgb(115, 73, 205) };
|
||||
if dark {
|
||||
t.bend_up = Color32::from_rgb(110, 165, 255);
|
||||
t.bend_down = Color32::from_rgb(240, 180, 70);
|
||||
@@ -229,6 +272,11 @@ impl Tokens {
|
||||
pub(super) const fn blue_yellow(self, dark: bool) -> Tokens {
|
||||
let mut t = self;
|
||||
t.analysis.hatch = true;
|
||||
t.surface_accent = if dark { Color32::from_rgb(210, 120, 95) } else { Color32::from_rgb(164, 65, 50) };
|
||||
t.mesh_accent = if dark { Color32::from_rgb(200, 175, 135) } else { Color32::from_rgb(130, 103, 65) };
|
||||
t.form_accent = if dark { Color32::from_rgb(150, 140, 210) } else { Color32::from_rgb(115, 73, 170) };
|
||||
// Green and blue status lights merge for tritan vision; use rose for working.
|
||||
t.agent_busy = Color32::from_rgb(232, 150, 190);
|
||||
t.preview_sketch = Color32::from_rgb(125, 180, 105);
|
||||
t.glyph_text = icon_primary(crate::icon_svg::CONSTRAINT_BLUE_YELLOW[dark as usize]);
|
||||
t.construction_geom = icon_primary(crate::icon_svg::CONSTRUCTION_BLUE_YELLOW[dark as usize]);
|
||||
|
||||
@@ -638,11 +638,67 @@ pub fn shown(app: &SolveApp) -> bool {
|
||||
app.preferences.ai_features && cfg!(not(target_arch = "wasm32"))
|
||||
}
|
||||
|
||||
/// The AI button at the toolbar row's right end is shown.
|
||||
pub fn toolbar_button_shown(app: &SolveApp) -> bool {
|
||||
/// The Assistant button in the application bar is shown (honours the existing preference).
|
||||
pub fn app_bar_button_shown(app: &SolveApp) -> bool {
|
||||
shown(app) && app.preferences.ai_toolbar_button
|
||||
}
|
||||
|
||||
/// The application bar's status mark, independent of panel layout and painting.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub(crate) enum AssistantMark {
|
||||
Quiet,
|
||||
Ready,
|
||||
Busy,
|
||||
NeedsAuth,
|
||||
Stopped,
|
||||
Waiting(usize),
|
||||
}
|
||||
|
||||
fn assistant_mark_for(state: State, login: &str, configured: bool, waiting: usize, stopped: bool, failed: bool) -> AssistantMark {
|
||||
if waiting > 0 {
|
||||
return AssistantMark::Waiting(waiting);
|
||||
}
|
||||
if state == State::NeedsAuth {
|
||||
return AssistantMark::NeedsAuth;
|
||||
}
|
||||
if state == State::Exited || stopped || failed {
|
||||
return AssistantMark::Stopped;
|
||||
}
|
||||
match state {
|
||||
State::Busy | State::Starting => AssistantMark::Busy,
|
||||
// A live session is stronger evidence than an older discovery login probe.
|
||||
State::Ready => AssistantMark::Ready,
|
||||
State::Off if configured && matches!(login, "signed_in" | "key") => AssistantMark::Ready,
|
||||
State::Off if configured && login == "signed_out" => AssistantMark::NeedsAuth,
|
||||
_ => AssistantMark::Quiet,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn assistant_mark(app: &SolveApp) -> AssistantMark {
|
||||
let chat = &app.agent_chat;
|
||||
let current = agents::current(app);
|
||||
assistant_mark_for(
|
||||
chat.state(),
|
||||
current.as_ref().map_or("", |e| e.login),
|
||||
current.is_some(),
|
||||
chat.waiting(),
|
||||
chat.stopped,
|
||||
chat.ended.as_deref() == Some("error"),
|
||||
)
|
||||
}
|
||||
|
||||
pub(crate) fn assistant_tip(mark: AssistantMark) -> String {
|
||||
let state = match mark {
|
||||
AssistantMark::Quiet => tr("ui.agent_chat_state_off").to_string(),
|
||||
AssistantMark::Ready => tr("ui.agent_chat_state_ready").to_string(),
|
||||
AssistantMark::Busy => tr("ui.agent_chat_state_busy").to_string(),
|
||||
AssistantMark::NeedsAuth => tr("ui.agent_chat_state_auth").to_string(),
|
||||
AssistantMark::Stopped => tr("ui.agent_chat_state_exited").to_string(),
|
||||
AssistantMark::Waiting(count) => trf("ui.assistant_waiting", &[("count", &count.to_string())]),
|
||||
};
|
||||
format!("{} (Ctrl+Shift+A) — {state}", tr("ui.assistant"))
|
||||
}
|
||||
|
||||
/// Whether a permission question is about one of SolidCraft's own tools (which SolidCraft's own
|
||||
/// gate checks): the agents name MCP tools after their server.
|
||||
fn solidcraft_tool(title: &str) -> bool {
|
||||
|
||||
@@ -198,7 +198,7 @@ fn with_ai_features_off_nothing_of_the_chat_shows_or_runs() {
|
||||
let shortcut = json!({"key": "A", "shift": true, "cmd": true});
|
||||
h.app.preferences.ai_features = false;
|
||||
h.frames(3);
|
||||
assert!(handle_at("toolbar:ai").is_none(), "no toolbar button");
|
||||
assert!(handle_at("titlebar:assistant").is_none(), "no Assistant button");
|
||||
h.call("ui.key", shortcut.clone());
|
||||
h.frames(3);
|
||||
h.call("ui.agent_chat", json!({"open": true, "send": "hello", "connect": true}));
|
||||
@@ -216,7 +216,7 @@ fn with_ai_features_off_nothing_of_the_chat_shows_or_runs() {
|
||||
// On (the default): the button shows; discovery waits until the panel opens.
|
||||
h.app.preferences.ai_features = true;
|
||||
h.frames(3);
|
||||
assert!(handle_at("toolbar:ai").is_some(), "the toolbar button");
|
||||
assert!(handle_at("titlebar:assistant").is_some(), "the Assistant button");
|
||||
assert!(h.app.agent_chat.detection.is_none() && h.app.agent_chat.detecting.is_none(), "nothing looked for yet");
|
||||
h.call("ui.key", shortcut.clone());
|
||||
h.frames(3);
|
||||
@@ -227,7 +227,7 @@ fn with_ai_features_off_nothing_of_the_chat_shows_or_runs() {
|
||||
h.app.preferences.ai_toolbar_button = false;
|
||||
h.call("ui.key", shortcut);
|
||||
h.frames(3);
|
||||
assert!(handle_at("toolbar:ai").is_none() && !h.app.agent_chat.open);
|
||||
assert!(handle_at("titlebar:assistant").is_none() && !h.app.agent_chat.open);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -1413,6 +1413,44 @@ fn an_agents_markdown_is_drawn_as_blocks() {
|
||||
h.frames(3);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn assistant_marks_follow_chat_login_turns_and_approvals() {
|
||||
use AssistantMark::*;
|
||||
let mark = |state, login, configured| assistant_mark_for(state, login, configured, 0, false, false);
|
||||
assert_eq!(mark(State::Off, "", false), Quiet);
|
||||
assert_eq!(mark(State::Off, "signed_in", false), Quiet);
|
||||
for login in ["", "unknown"] {
|
||||
assert_eq!(mark(State::Off, login, true), Quiet);
|
||||
}
|
||||
for login in ["signed_in", "key"] {
|
||||
assert_eq!(mark(State::Off, login, true), Ready);
|
||||
}
|
||||
assert_eq!(mark(State::Off, "signed_out", true), NeedsAuth);
|
||||
for login in ["", "signed_out", "unknown", "signed_in"] {
|
||||
for (state, expected) in
|
||||
[(State::Ready, Ready), (State::Busy, Busy), (State::Starting, Busy), (State::NeedsAuth, NeedsAuth), (State::Exited, Stopped)]
|
||||
{
|
||||
assert_eq!(mark(state, login, true), expected);
|
||||
assert_eq!(assistant_mark_for(state, login, true, 12, false, false), Waiting(12));
|
||||
}
|
||||
}
|
||||
assert_eq!(assistant_mark_for(State::Ready, "signed_in", true, 0, true, false), Stopped);
|
||||
assert_eq!(assistant_mark_for(State::Ready, "signed_in", true, 0, false, true), Stopped);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn assistant_click_and_shortcut_toggle_the_same_panel_without_a_connection() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.frames(3);
|
||||
assert_eq!(assistant_mark(&h.app), AssistantMark::Quiet);
|
||||
assert!(crate::scenario::handle_at("toolbar:ai").is_none());
|
||||
h.step(&json!({"click":{"handle":"titlebar:assistant"}})).unwrap();
|
||||
assert!(h.app.agent_chat.open);
|
||||
h.step(&json!({"key":"A", "shift":true,"cmd":true})).unwrap();
|
||||
assert!(!h.app.agent_chat.open);
|
||||
assert!(h.app.agent_chat.backend.is_none());
|
||||
}
|
||||
|
||||
/// A long message scrolls inside its box: the buttons under the box stay in the window (#2224).
|
||||
/// Measured against the panel's bottom once the agents on this machine have been looked for:
|
||||
/// what that finds (and the status it reports) arrives in its own time and may change what is
|
||||
|
||||
@@ -197,7 +197,8 @@ const NOT_PLACES: [&str; 14] =
|
||||
/// A command's toolbar button, or its panel when the button sits in a drop-down.
|
||||
fn button(command: &str) -> Option<Pos2> {
|
||||
let spec = solidcraft_engine::find_command(command)?;
|
||||
crate::scenario::handle_at(&format!("toolbar:{}", spec.id)).or_else(|| crate::scenario::handle_at(&format!("panel:{}:{}", spec.tab, spec.panel)))
|
||||
crate::scenario::handle_at(&format!("toolbar:{}", spec.id))
|
||||
.or_else(|| crate::workspace::destination(spec).and_then(|(t, p)| crate::scenario::handle_at(&format!("panel:{t}:{p}"))))
|
||||
}
|
||||
|
||||
/// Where the pointer goes for a command: its toolbar button (or its panel), then its picks on
|
||||
|
||||
@@ -348,7 +348,7 @@ pub(crate) fn draw_row(ui: &mut egui::Ui, id: egui::Id, row: &Row) -> RowResp {
|
||||
let dragged_over = egui::DragAndDrop::has_any_payload(ui.ctx()) && ui.input(|i| i.pointer.hover_pos()).is_some_and(|p| r.contains(p));
|
||||
let mut out = RowResp { rect: Some(r), hovered: resp.hovered() || dragged_over, ..Default::default() };
|
||||
if row.selected {
|
||||
ui.painter().rect_filled(r, 3.0, t.accent_soft);
|
||||
ui.painter().rect_filled(r, 3.0, crate::theme::TabAccent::current(ui.ctx()).soft);
|
||||
} else if resp.hovered() || row.mark == Mark::Here {
|
||||
ui.painter().rect_filled(r, 3.0, t.hover);
|
||||
}
|
||||
@@ -425,7 +425,7 @@ pub(crate) fn draw_row(ui: &mut egui::Ui, id: egui::Id, row: &Row) -> RowResp {
|
||||
}
|
||||
let col = 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(12.5), col);
|
||||
let galley = ui.painter().layout_no_wrap(label_display, FontId::proportional(t.font_label), 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);
|
||||
@@ -674,7 +674,7 @@ fn browser_panel(app: &mut SolveApp, ui: &mut egui::Ui, timeline_above: bool) {
|
||||
let panel = egui::Panel::left("sc_browser")
|
||||
.exact_size(width)
|
||||
.resizable(false)
|
||||
.frame(egui::Frame::NONE.fill(t.panel).inner_margin(egui::Margin::symmetric(6, 6)))
|
||||
.frame(egui::Frame::NONE.fill(t.panel).inner_margin(egui::Margin::symmetric(t.space_6 as i8, t.space_6 as i8)))
|
||||
.show(ui, |ui| {
|
||||
if timeline_above {
|
||||
let available = ui.available_height();
|
||||
@@ -702,13 +702,13 @@ fn browser_panel(app: &mut SolveApp, ui: &mut egui::Ui, timeline_above: bool) {
|
||||
}
|
||||
let arrow = if browser_collapsed { "▶" } else { "▼" };
|
||||
let response =
|
||||
ui.add(egui::Button::new(RichText::new(format!("{arrow} BROWSER")).size(11.0).strong().color(t.text_dim)).frame(false));
|
||||
ui.add(egui::Button::new(RichText::new(format!("{arrow} BROWSER")).size(t.font_small).strong().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;
|
||||
}
|
||||
if !browser_collapsed {
|
||||
ui.add_space(4.0);
|
||||
ui.add_space(t.space_4);
|
||||
browser_rows(app, ui, &mut acts);
|
||||
}
|
||||
} else {
|
||||
@@ -766,8 +766,8 @@ pub fn floating(app: &mut SolveApp, ui: &mut egui::Ui, viewport: egui::Rect) {
|
||||
|
||||
fn browser_contents(app: &mut SolveApp, ui: &mut egui::Ui, acts: &mut Actions) {
|
||||
let t = Tokens::get();
|
||||
ui.label(RichText::new(crate::i18n::tr_label("BROWSER")).size(11.0).strong().color(t.text_dim));
|
||||
ui.add_space(4.0);
|
||||
ui.label(RichText::new(crate::i18n::tr_label("BROWSER")).size(t.font_small).strong().color(t.text_dim));
|
||||
ui.add_space(t.space_4);
|
||||
browser_rows(app, ui, acts);
|
||||
}
|
||||
|
||||
@@ -2253,7 +2253,7 @@ pub fn dims_overlay(app: &SolveApp, ctx: &egui::Context) {
|
||||
let col = if c.driven { tk.dimension_driven } else { tk.dimension };
|
||||
let galley = painter.layout_no_wrap(
|
||||
crate::dim_view::label(&c.kind, expr, c.driven, &app.session.doc.units, app.preferences.length_decimals),
|
||||
FontId::proportional(11.5),
|
||||
FontId::proportional(tk.font_caption),
|
||||
col,
|
||||
);
|
||||
let size = galley.size() + vec2(6.0, 2.0);
|
||||
|
||||
@@ -75,17 +75,14 @@ const ALLOWED_LITERALS: &[(&str, usize, &str)] = &[
|
||||
("dialogs_library.rs", 1, "a library appearance's swatch: the colour is the fact"),
|
||||
("dialogs_assembly.rs", 1, "the interference fill, shaded from its token"),
|
||||
("dialogs_motion.rs", 1, "a white outline"),
|
||||
("documents.rs", 4, "white hover overlays on document tabs"),
|
||||
("frame.rs", 1, "the window shadow"),
|
||||
("gizmo.rs", 2, "the gizmo's neutral grey ball"),
|
||||
("icons.rs", 1, "the white tint that carries an icon image's opacity"),
|
||||
("home.rs", 4, "white ink on accent buttons, and thumbnail tints"),
|
||||
("home.rs", 2, "thumbnail tints"),
|
||||
("ref_images.rs", 1, "a reference image's opacity tint"),
|
||||
("sketch_palette.rs", 1, "white text on the accent button"),
|
||||
("sketch_text.rs", 1, "white text on the selection chip"),
|
||||
("theme_files.rs", 1, "a colour read from a theme file, which sets tokens"),
|
||||
("titlebar.rs", 4, "the window close button's red hover (the system's convention), white hovers and ink"),
|
||||
("toolbar.rs", 3, "white hover overlays and the version text"),
|
||||
("titlebar.rs", 2, "the window close button's red hover (the system's convention) and white ink"),
|
||||
("toolbar.rs", 1, "the version text"),
|
||||
];
|
||||
|
||||
const COLOUR_LITERALS: &[&str] = &[
|
||||
|
||||
@@ -356,6 +356,11 @@ fn groups(t: &Tokens) -> Vec<Group> {
|
||||
&[("app_bar_icon[0]", t.app_bar_icon[0]), ("app_bar_icon[1]", t.app_bar_icon[1]), ("app_bar_icon[2]", t.app_bar_icon[2])],
|
||||
&[("app_bar", t.app_bar)],
|
||||
),
|
||||
// Tab names and icons identify the tabs; each accent must read against the toolbar.
|
||||
group("surface tab", &[("surface_accent", t.surface_accent)], &[("toolbar", t.toolbar)]),
|
||||
group("mesh tab", &[("mesh_accent", t.mesh_accent)], &[("toolbar", t.toolbar)]),
|
||||
group("form tab", &[("form_accent", t.form_accent)], &[("toolbar", t.toolbar)]),
|
||||
group("agent status", &[("agent_ok", t.agent_ok), ("agent_busy", t.agent_busy)], &[("app_bar", t.app_bar)]),
|
||||
group("logo", &[("logo[0]", t.logo[0]), ("logo[1]", t.logo[1]), ("logo[2]", t.logo[2])], &[("app_bar", t.app_bar)]),
|
||||
];
|
||||
// The removed part of a cut preview is translucent over the body.
|
||||
@@ -371,6 +376,35 @@ const SHADED: [&str; 2] = ["analysis.draft", "analysis.access"];
|
||||
/// Tokens no colour vision mode needs to keep apart, and why. A new token fails
|
||||
/// `every_token_is_measured_or_carries_no_meaning` until it is in a group above or here.
|
||||
const NO_MEANING: &[(&str, &str)] = &[
|
||||
("space_2", "layout dimension"),
|
||||
("space_3", "layout dimension"),
|
||||
("space_4", "layout dimension"),
|
||||
("space_6", "layout dimension"),
|
||||
("space_8", "layout dimension"),
|
||||
("space_10", "layout dimension"),
|
||||
("space_12", "layout dimension"),
|
||||
("space_14", "layout dimension"),
|
||||
("space_16", "layout dimension"),
|
||||
("space_24", "layout dimension"),
|
||||
("radius_sm", "layout dimension"),
|
||||
("radius_md", "layout dimension"),
|
||||
("radius_lg", "layout dimension"),
|
||||
("radius_xl", "layout dimension"),
|
||||
("font_badge", "layout dimension"),
|
||||
("font_micro", "layout dimension"),
|
||||
("font_panel", "layout dimension"),
|
||||
("font_small", "layout dimension"),
|
||||
("font_caption", "layout dimension"),
|
||||
("font_body", "layout dimension"),
|
||||
("font_label", "layout dimension"),
|
||||
("font_button", "layout dimension"),
|
||||
("font_heading", "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"),
|
||||
("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"),
|
||||
("border", "chrome"),
|
||||
@@ -384,6 +418,7 @@ const NO_MEANING: &[(&str, &str)] = &[
|
||||
("subheading_bg", "chrome"),
|
||||
("overlay", "a chip's ground over the view"),
|
||||
("app_bar_text", "text"),
|
||||
("app_bar_separator", "neutral chrome divider"),
|
||||
("app_bar_hover", "a hovered tab, translucent white"),
|
||||
("timeline_marker", "the rollback marker, alone"),
|
||||
("field", "a field's ground"),
|
||||
@@ -635,18 +670,51 @@ fn each_mode_changes_only_its_table() {
|
||||
"icons.draft",
|
||||
"bend_up",
|
||||
"bend_down",
|
||||
"surface_accent",
|
||||
"mesh_accent",
|
||||
"form_accent",
|
||||
"sketch_accent",
|
||||
"preview_sketch",
|
||||
];
|
||||
let mut red_green_light = red_green_both.to_vec();
|
||||
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"]);
|
||||
for (dark, mode, want) in [
|
||||
(false, ColorVision::Protan, set(&red_green_light)),
|
||||
(true, ColorVision::Protan, set(&red_green_both)),
|
||||
(false, ColorVision::Deutan, set(&red_green_light)),
|
||||
(true, ColorVision::Deutan, set(&red_green_both)),
|
||||
(false, ColorVision::Tritan, set(&["sketch_locked", "box_crossing", "construction_geom", "preview_sketch", "analysis.hatch"])),
|
||||
(true, ColorVision::Tritan, set(&["sketch_locked", "box_crossing", "construction_geom", "glyph_text", "preview_sketch", "analysis.hatch"])),
|
||||
(
|
||||
false,
|
||||
ColorVision::Tritan,
|
||||
set(&[
|
||||
"surface_accent",
|
||||
"mesh_accent",
|
||||
"form_accent",
|
||||
"agent_busy",
|
||||
"sketch_locked",
|
||||
"box_crossing",
|
||||
"construction_geom",
|
||||
"preview_sketch",
|
||||
"analysis.hatch",
|
||||
]),
|
||||
),
|
||||
(
|
||||
true,
|
||||
ColorVision::Tritan,
|
||||
set(&[
|
||||
"surface_accent",
|
||||
"mesh_accent",
|
||||
"form_accent",
|
||||
"agent_busy",
|
||||
"sketch_locked",
|
||||
"box_crossing",
|
||||
"construction_geom",
|
||||
"glyph_text",
|
||||
"preview_sketch",
|
||||
"analysis.hatch",
|
||||
]),
|
||||
),
|
||||
] {
|
||||
let base = Tokens::themed(dark, ColorVision::Off);
|
||||
assert_eq!(changed_fields(&base, &Tokens::themed(dark, mode)), want, "{mode:?}, dark {dark}");
|
||||
|
||||
@@ -360,8 +360,8 @@ pub fn items(app: &SolveApp, target: &Target) -> Vec<Item> {
|
||||
.key(if rendering { "current" } else { "" })
|
||||
.on(app.session.active_sketch.is_none() && app.tool.is_none() && app.dialog.is_none() && !app.file_load.busy()),
|
||||
];
|
||||
for w in ["Animation", "Simulation", "Manufacture", "Drawing"] {
|
||||
v.push(act("ui.workspace", w, "").key("coming later").on(false));
|
||||
for (w, icon) in [("Animation", "ws_animate"), ("Simulation", ""), ("Manufacture", ""), ("Drawing", "ws_drawing")] {
|
||||
v.push(act("ui.workspace", w, icon).key("coming later").on(false));
|
||||
}
|
||||
v
|
||||
}
|
||||
@@ -1672,7 +1672,9 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
let pointer = ctx.input(|i| i.pointer.latest_pos());
|
||||
let mut inside = app.menu.opener.is_some_and(|r| pointer.is_some_and(|p| r.contains(p)));
|
||||
|
||||
let list_at = if app.menu.radial {
|
||||
let list_at = if target == Target::Workspace {
|
||||
pos2(at.x.clamp(screen.left(), (screen.right() - 470.0).max(screen.left())), at.y)
|
||||
} else if app.menu.radial {
|
||||
let c = radial_center(at, screen);
|
||||
let radial = radial_items(app);
|
||||
let area = Rect::from_center_size(c, vec2(2.0 * (RX + 165.0), 2.0 * (RY + 34.0)));
|
||||
@@ -1738,13 +1740,17 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
let key_row = app.menu.key_row;
|
||||
let resp =
|
||||
crate::frame::area(egui::Id::new("sc_context_menu")).fixed_pos(list_at).constrain(true).order(egui::Order::Foreground).show(ctx, |ui| {
|
||||
menu_frame(ui, |ui| {
|
||||
for (k, item) in list.iter().enumerate() {
|
||||
if let Some(p) = list_row_lit(ui, item, key_row == Some(k)) {
|
||||
picked = Some(p);
|
||||
if target == Target::Workspace {
|
||||
picked = workspace_menu(ui, &list, key_row, (screen.bottom() - list_at.y).max(160.0)).or(picked.take());
|
||||
} else {
|
||||
menu_frame(ui, |ui| {
|
||||
for (k, item) in list.iter().enumerate() {
|
||||
if let Some(p) = list_row_lit(ui, item, key_row == Some(k)) {
|
||||
picked = Some(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
inside |= resp.response.contains_pointer() || resp.response.rect.contains(pointer.unwrap_or(Pos2::ZERO));
|
||||
|
||||
@@ -1767,6 +1773,108 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Workspace cards retain the context-menu items and dispatch, including keyboard and
|
||||
/// control-channel picks. Only the presentation differs from ordinary command lists.
|
||||
fn workspace_menu(ui: &mut egui::Ui, items: &[Item], key_row: Option<usize>, height: f32) -> Option<Item> {
|
||||
let t = Tokens::get();
|
||||
let mut picked = None;
|
||||
egui::Frame::popup(ui.style()).fill(t.panel).stroke(Stroke::new(1.0, t.border)).corner_radius(10.0).inner_margin(9).show(ui, |ui| {
|
||||
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.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() {
|
||||
let (slug, description, tabs) = match item.label.as_str() {
|
||||
"Design" => ("design", "ui.workspace_design_description", Some("ui.workspace_design_tabs")),
|
||||
"Render" => ("render", "ui.workspace_render_description", Some("ui.workspace_render_tabs")),
|
||||
"Animation" => ("animation", "ui.workspace_animation_description", None),
|
||||
"Simulation" => ("simulation", "ui.workspace_simulation_description", None),
|
||||
"Manufacture" => ("manufacture", "ui.workspace_manufacture_description", None),
|
||||
"Drawing" => ("drawing", "ui.workspace_drawing_description", None),
|
||||
_ => continue,
|
||||
};
|
||||
let planned = tabs.is_none();
|
||||
let current = item.shortcut == "current";
|
||||
let accent = if planned {
|
||||
t.text_dim
|
||||
} else if slug == "render" {
|
||||
t.render_accent
|
||||
} else {
|
||||
t.accent
|
||||
};
|
||||
let soft = t.panel.lerp_to_gamma(accent, 0.10);
|
||||
let (r, resp) = ui
|
||||
.allocate_exact_size(vec2(450.0, if planned { 60.0 } else { 72.0 }), if item.enabled { Sense::click() } else { Sense::hover() });
|
||||
for handle in [format!("menu:{}", item.id), format!("workspace:menu:{slug}")] {
|
||||
crate::scenario::publish_handle(&handle, r.center());
|
||||
crate::scenario::publish_rect(&handle, r);
|
||||
}
|
||||
if current || (item.enabled && (resp.hovered() || key_row == Some(k))) {
|
||||
ui.painter().rect_filled(r, 5.0, soft);
|
||||
}
|
||||
ui.painter().rect_filled(Rect::from_min_max(r.min + vec2(2.0, 7.0), pos2(r.left() + 6.0, r.bottom() - 7.0)), 2.0, accent);
|
||||
let tile = Rect::from_center_size(pos2(r.left() + 40.0, r.center().y), vec2(44.0, 44.0));
|
||||
ui.painter().rect_filled(tile, 9.0, if planned { t.panel_header } else { soft });
|
||||
if !item.icon.is_empty() {
|
||||
icons::paint_icon(ui.painter(), tile.shrink(7.0), &item.icon, if item.enabled { 1.0 } else { 0.35 });
|
||||
}
|
||||
let text = if item.enabled { t.text } else { t.text_dim };
|
||||
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 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 badge = crate::i18n::tr(if planned {
|
||||
"ui.workspace_planned"
|
||||
} else if current {
|
||||
"ui.workspace_current"
|
||||
} 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_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);
|
||||
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);
|
||||
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.
|
||||
let labels = crate::i18n::tr(tabs).split('·').map(|label| crate::i18n::tr_label(label.trim())).collect::<Vec<_>>().join(" · ");
|
||||
line(&labels, r.top() + 47.0);
|
||||
}
|
||||
resp.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, item.enabled, name));
|
||||
if resp.clicked() && item.enabled {
|
||||
picked = Some(item.clone());
|
||||
}
|
||||
}
|
||||
});
|
||||
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_space(4.0);
|
||||
});
|
||||
picked
|
||||
}
|
||||
|
||||
/// The frame every menu uses.
|
||||
pub fn menu_frame<R>(ui: &mut egui::Ui, add: impl FnOnce(&mut egui::Ui) -> R) -> R {
|
||||
let t = Tokens::get();
|
||||
@@ -2051,3 +2159,40 @@ mod tests {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod workspace_menu_tests {
|
||||
use super::*;
|
||||
use crate::scenario::{Harness, rect_of};
|
||||
|
||||
#[test]
|
||||
fn workspace_rows_keep_switching_handles_and_disabled_render_behavior() {
|
||||
let mut h = Harness::new();
|
||||
h.call("ui.resize", json!({"width":1200,"height":1000}));
|
||||
h.step(&json!({"click":{"handle":"ribbon:workspace"}})).unwrap();
|
||||
let opener = rect_of("ribbon:workspace").unwrap();
|
||||
let rows: Vec<_> = ["design", "render", "animation", "simulation", "manufacture", "drawing"]
|
||||
.iter()
|
||||
.map(|slug| rect_of(&format!("workspace:menu:{slug}")).unwrap())
|
||||
.collect();
|
||||
assert!(rows.windows(2).all(|pair| pair[0].bottom() <= pair[1].top()));
|
||||
assert!(rows[0].top() > opener.bottom());
|
||||
assert_eq!(rows[0].width(), 450.0);
|
||||
assert!(items(&h.app, &Target::Workspace).iter().skip(2).all(|item| !item.enabled));
|
||||
h.step(&json!({"click":{"handle":"workspace:menu:animation"}})).unwrap();
|
||||
assert!(!crate::render_workspace::active(&h.app));
|
||||
assert!(h.app.viewport.context_menu.is_some());
|
||||
h.step(&json!({"click":{"handle":"workspace:menu:render"}})).unwrap();
|
||||
assert!(crate::render_workspace::active(&h.app));
|
||||
h.step(&json!({"click":{"handle":"ribbon:workspace"}})).unwrap();
|
||||
h.step(&json!({"click":{"handle":"workspace:menu:design"}})).unwrap();
|
||||
assert!(!crate::render_workspace::active(&h.app));
|
||||
h.app.run("sketch.create", json!({"plane":"XY"})).unwrap();
|
||||
h.frames(2);
|
||||
h.step(&json!({"click":{"handle":"ribbon:workspace"}})).unwrap();
|
||||
assert!(!items(&h.app, &Target::Workspace).iter().find(|i| i.id == "ui.workspace.render").unwrap().enabled);
|
||||
h.step(&json!({"click":{"handle":"workspace:menu:render"}})).unwrap();
|
||||
assert!(!crate::render_workspace::active(&h.app));
|
||||
assert!(h.app.viewport.context_menu.is_some());
|
||||
}
|
||||
}
|
||||
@@ -367,12 +367,13 @@ fn dispatch(app: &mut SolveApp, ctx: &egui::Context, method: &str, p: &Value) ->
|
||||
}
|
||||
}
|
||||
match (serde_json::from_value::<crate::UiState>(cur), serde_json::from_value::<solidcraft_engine::Visibility>(vis)) {
|
||||
(Ok(u), Ok(v)) => {
|
||||
(Ok(mut u), Ok(v)) => {
|
||||
if (u.tab == "RENDER") != crate::render_workspace::active(app)
|
||||
&& let Err(e) = crate::render_workspace::enter(app, u.tab == "RENDER")
|
||||
{
|
||||
return err(e);
|
||||
}
|
||||
u.ribbon_context = app.ui.ribbon_context.clone();
|
||||
app.ui = u;
|
||||
app.session.visibility = v;
|
||||
ok(serde_json::to_value(&app.ui).unwrap_or_default())
|
||||
|
||||
@@ -1543,6 +1543,7 @@ fn plane_value(s: &Session, sel: Option<&Sel>) -> Option<Value> {
|
||||
/// A value field; true when Enter was pressed in it.
|
||||
pub(crate) fn field(ui: &mut egui::Ui, s: &mut String) -> bool {
|
||||
let r = ui.text_edit_singleline(s);
|
||||
crate::theme::TabAccent::number_focus(ui, &r);
|
||||
publish_row(&r);
|
||||
crate::params_dialog::complete(ui, &r, s);
|
||||
r.lost_focus() && ui.input(|i| i.key_pressed(egui::Key::Enter))
|
||||
@@ -1584,7 +1585,7 @@ pub(crate) fn icon_choice(ui: &mut egui::Ui, labels: &[&str], icons: &[&str], se
|
||||
} else if resp.hovered() {
|
||||
ui.painter().rect_filled(r, 4.0, t.hover);
|
||||
}
|
||||
let ink = if on { Color32::WHITE } else { t.icon };
|
||||
let ink = if on { t.on_accent } else { t.icon };
|
||||
crate::icons::paint(ui.painter(), r.shrink(3.0), icons.get(i).copied().unwrap_or(""), ink, t.icon_fill, ink);
|
||||
crate::scenario::publish_handle(&format!("dialog:{row}:{label}"), r.center());
|
||||
if on {
|
||||
@@ -1937,7 +1938,7 @@ fn input_rows_range(d: &mut Dialog, ui: &mut egui::Ui, s: &Session, range: std::
|
||||
} else {
|
||||
crate::i18n::format("dialog.selected_count", &[("count", &inp.items.len().to_string())])
|
||||
})
|
||||
.color(Color32::WHITE)
|
||||
.color(t.on_accent)
|
||||
} else {
|
||||
RichText::new(crate::i18n::tr("dialog.select")).color(t.text)
|
||||
};
|
||||
@@ -3341,7 +3342,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
let buttons = close_width + if has_ok { ok_width + ui.spacing().item_spacing.x } else { 0.0 };
|
||||
crate::frame::right_aligned(ui, total, buttons, |ui| {
|
||||
if has_ok {
|
||||
let b = egui::Button::new(RichText::new(label).color(if valid { Color32::WHITE } else { t.text_dim }))
|
||||
let b = egui::Button::new(RichText::new(label).color(if valid { t.on_accent } else { t.text_dim }))
|
||||
.fill(if valid { t.accent } else { Color32::TRANSPARENT })
|
||||
.wrap_mode(egui::TextWrapMode::Extend)
|
||||
.min_size(vec2(ok_width, 24.0));
|
||||
|
||||
@@ -200,7 +200,12 @@ fn flat_pattern_islands_fit_before_the_actual_command_panel() {
|
||||
ui.label("Flat size: 50 × 10 × 2.5 mm");
|
||||
});
|
||||
let painter = ui.ctx().layer_painter(egui::LayerId::new(egui::Order::Background, egui::Id::new("island-fit")));
|
||||
assert!(overlay(&mut app, &painter, Rect::from_min_max(pos2(250.0, 126.0), pos2(1400.0, 832.0)), &dialog));
|
||||
assert!(overlay(
|
||||
&mut app,
|
||||
&painter,
|
||||
Rect::from_min_max(pos2(250.0, crate::toolbar::APP_BAR_HEIGHT + crate::toolbar::RIBBON_HEIGHT), pos2(1400.0, 832.0)),
|
||||
&dialog
|
||||
));
|
||||
});
|
||||
output.textures_delta.clear();
|
||||
}
|
||||
|
||||
@@ -222,6 +222,7 @@ pub fn rows(ui: &mut egui::Ui, k: &mut Surf) -> bool {
|
||||
Surf::Stitch { tolerance } => {
|
||||
row_label(ui, "Tolerance");
|
||||
let r = ui.add(egui::TextEdit::singleline(tolerance).hint_text("tight"));
|
||||
crate::theme::TabAccent::number_focus(ui, &r);
|
||||
crate::params_dialog::complete(ui, &r, tolerance);
|
||||
enter |= r.lost_focus() && ui.input(|i| i.key_pressed(egui::Key::Enter));
|
||||
ui.end_row();
|
||||
|
||||
@@ -701,6 +701,7 @@ fn edit_box(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
ui.label(egui::RichText::new(format!("Dimension: {}", e.param)).strong())
|
||||
.on_hover_text("Click another driving dimension to insert its name");
|
||||
let r = ui.add(egui::TextEdit::singleline(&mut e.expr).id(id).desired_width(popup_width));
|
||||
crate::theme::TabAccent::number_focus(ui, &r);
|
||||
if r.has_focus() {
|
||||
e.selection = egui::TextEdit::load_state(ctx, id).and_then(|s| s.cursor.char_range());
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//! Closing a design with unsaved changes asks first, and so does quitting: one "save changes?"
|
||||
//! per design with unsaved changes ([`request_quit`]).
|
||||
|
||||
use egui::{Align2, Color32, FontId, Rect, Sense, Stroke, pos2, vec2};
|
||||
use egui::{Align2, FontId, Rect, Sense, pos2, vec2};
|
||||
use serde_json::{Value, json};
|
||||
use solidcraft_engine::Session;
|
||||
use solidcraft_engine::render::Camera;
|
||||
@@ -119,7 +119,9 @@ fn swap_in(app: &mut SolveApp, slot: DocSlot) -> DocSlot {
|
||||
app.session.auto_project = out.session.auto_project;
|
||||
// Views cache by revision: the incoming design must not look unchanged.
|
||||
app.session.invalidate_view(out_rev);
|
||||
app.ui.tab = if app.session.active_sketch.is_some() { "SKETCH".into() } else { "SOLID".into() };
|
||||
app.ui.ribbon_context = None;
|
||||
app.ui.tab = "MODEL".into();
|
||||
crate::workspace::sync_context(app);
|
||||
out
|
||||
}
|
||||
|
||||
@@ -367,33 +369,31 @@ pub fn control(app: &mut SolveApp, p: &Value) -> Value {
|
||||
/// + for a new design.
|
||||
pub fn tabs(app: &mut SolveApp, ui: &mut egui::Ui, r: Rect, x0: f32, x1: f32) {
|
||||
let t = Tokens::get();
|
||||
let home = Rect::from_min_size(pos2(x0, r.top() + 5.0), vec2(66.0, r.height() - 5.0));
|
||||
let response = ui.interact(home, ui.id().with("home_tab"), Sense::click());
|
||||
tab_shape(ui.painter(), &t, home, app.home.open, response.hovered());
|
||||
let home_text = app.tr("ui.home");
|
||||
ui.painter().text(
|
||||
home.center(),
|
||||
Align2::CENTER_CENTER,
|
||||
home_text,
|
||||
FontId::proportional(13.0),
|
||||
if app.home.open { t.text } else { t.app_bar_text },
|
||||
);
|
||||
crate::scenario::publish_handle("tab:home", home.center());
|
||||
if response.clicked() && !app.file_load.busy() {
|
||||
app.home.show(app.session.revision);
|
||||
}
|
||||
let x0 = x0 + 70.0;
|
||||
let info = tabs_info(app);
|
||||
let n = info.len();
|
||||
let (first, shown, w) = layout(n, app.docs.active, x1 - x0);
|
||||
let mut x = x0;
|
||||
let mut pick: Option<usize> = None;
|
||||
let mut shut: Option<usize> = None;
|
||||
// Each tab fits its name (up to MAX_FIT) while all of them fit; otherwise they share the room.
|
||||
const MAX_FIT: f32 = 200.0;
|
||||
let natural: Vec<f32> = info
|
||||
.iter()
|
||||
.map(|(name, dirty)| {
|
||||
let shown_name = crate::i18n::Locale::for_language(&app.preferences.language).given_name(name);
|
||||
let label = format!("{shown_name}{}", if *dirty { " •" } else { "" });
|
||||
let text = ui.painter().layout_no_wrap(label, FontId::proportional(13.0), t.app_bar_text).size().x;
|
||||
(text + 40.0).clamp(72.0, MAX_FIT)
|
||||
})
|
||||
.collect();
|
||||
let fit_all = shown == n && natural.iter().sum::<f32>() <= x1 - x0 - 34.0;
|
||||
for (i, (name, dirty)) in info.iter().enumerate().skip(first).take(shown) {
|
||||
let tr = Rect::from_min_size(pos2(x, r.top() + 5.0), vec2(w - 2.0, r.height() - 5.0));
|
||||
let w = if fit_all { natural.get(i).copied().unwrap_or(w) } else { w };
|
||||
let tr = Rect::from_min_size(pos2(x, r.top() + 4.0), vec2(w - 2.0, r.height() - 8.0));
|
||||
let active = !app.home.open && (i == app.docs.active || app.docs.slots.is_empty());
|
||||
let resp = ui.interact(tr, ui.id().with(("doc_tab", i)), Sense::click_and_drag());
|
||||
crate::scenario::publish_handle(&format!("tab:design:{i}"), tr.center());
|
||||
crate::scenario::publish_rect(&format!("tab:design:{i}"), tr);
|
||||
// The tabs are part of the title bar: dragging one moves the window, a double click
|
||||
// maximizes it.
|
||||
if app.custom_titlebar || app.integrated_titlebar {
|
||||
@@ -403,8 +403,8 @@ pub fn tabs(app: &mut SolveApp, ui: &mut egui::Ui, r: Rect, x0: f32, x1: f32) {
|
||||
crate::titlebar::toggle_maximize(ui.ctx());
|
||||
}
|
||||
}
|
||||
tab_shape(ui.painter(), &t, tr, active, resp.hovered());
|
||||
let ink = if active { t.text } else { t.app_bar_text };
|
||||
tab_shape(ui.painter(), &t, tr, active, resp.hovered() || resp.has_focus());
|
||||
let ink = if active || resp.hovered() { t.app_bar_text } else { t.app_bar_text.gamma_multiply(0.7) };
|
||||
let label = format!("{}{}", crate::i18n::Locale::for_language(&app.preferences.language).given_name(name), if *dirty { " •" } else { "" });
|
||||
let g = ui.painter().layout_no_wrap(label, FontId::proportional(13.0), ink);
|
||||
let text_w = (tr.width() - 30.0).max(10.0);
|
||||
@@ -412,14 +412,21 @@ pub fn tabs(app: &mut SolveApp, ui: &mut egui::Ui, r: Rect, x0: f32, x1: f32) {
|
||||
ui.painter().with_clip_rect(clip).galley(pos2(tr.left() + 10.0, tr.center().y - g.size().y / 2.0), g, ink);
|
||||
// ×
|
||||
let xr = Rect::from_center_size(pos2(tr.right() - 13.0, tr.center().y), vec2(16.0, 16.0));
|
||||
let xresp = ui.interact(xr, ui.id().with(("doc_close", i)), Sense::click());
|
||||
if xresp.hovered() {
|
||||
ui.painter().rect_filled(xr, 3.0, Color32::from_white_alpha(40));
|
||||
let show_close = active || resp.hovered() || ui.rect_contains_pointer(tr);
|
||||
let xresp = ui.interact(xr, ui.id().with(("doc_close", i)), if show_close { Sense::click() } else { Sense::hover() });
|
||||
crate::scenario::publish_handle(&format!("tab:close:{i}"), xr.center());
|
||||
crate::scenario::publish_rect(&format!("tab:close:{i}"), xr);
|
||||
if show_close && (xresp.hovered() || xresp.has_focus()) {
|
||||
ui.painter().rect_filled(xr, 3.0, t.app_bar_hover_strong);
|
||||
}
|
||||
if show_close {
|
||||
crate::icons::paint_app_bar(
|
||||
ui.painter(),
|
||||
Rect::from_center_size(xr.center(), vec2(14.0, 14.0)),
|
||||
"close",
|
||||
if xresp.hovered() || xresp.has_focus() { 1.0 } else { 0.55 },
|
||||
);
|
||||
}
|
||||
let c = xr.center();
|
||||
let s = Stroke::new(1.3, if active { t.text_dim } else { t.app_bar_text });
|
||||
ui.painter().line_segment([c - vec2(3.5, 3.5), c + vec2(3.5, 3.5)], s);
|
||||
ui.painter().line_segment([c - vec2(3.5, -3.5), c + vec2(3.5, -3.5)], s);
|
||||
if xresp.on_hover_text("Close").clicked() {
|
||||
shut = Some(i);
|
||||
} else if resp.on_hover_text(name.as_str()).clicked() {
|
||||
@@ -429,10 +436,10 @@ pub fn tabs(app: &mut SolveApp, ui: &mut egui::Ui, r: Rect, x0: f32, x1: f32) {
|
||||
}
|
||||
// More tabs than fit: a chevron lists them all.
|
||||
if shown < n {
|
||||
let mr = Rect::from_center_size(pos2(x + 12.0, r.center().y + 2.0), vec2(20.0, 22.0));
|
||||
let mr = Rect::from_center_size(pos2(x + 12.0, r.center().y), vec2(20.0, 22.0));
|
||||
let mresp = ui.interact(mr, ui.id().with("doc_more"), Sense::click());
|
||||
if mresp.hovered() {
|
||||
ui.painter().rect_filled(mr, 4.0, Color32::from_white_alpha(30));
|
||||
ui.painter().rect_filled(mr, 4.0, t.app_bar_hover_button);
|
||||
}
|
||||
ui.painter().text(mr.center(), egui::Align2::CENTER_CENTER, format!("»{}", n - shown), FontId::proportional(12.0), t.app_bar_text);
|
||||
let id = egui::Id::new("sc_doc_more");
|
||||
@@ -463,15 +470,17 @@ pub fn tabs(app: &mut SolveApp, ui: &mut egui::Ui, r: Rect, x0: f32, x1: f32) {
|
||||
x += 26.0;
|
||||
}
|
||||
// New design: a new tab showing the start page.
|
||||
let pr = Rect::from_center_size(pos2(x + 14.0, r.center().y + 2.0), vec2(22.0, 22.0));
|
||||
let pr = Rect::from_center_size(pos2(x + 14.0, r.center().y), vec2(22.0, 22.0));
|
||||
let presp = ui.interact(pr, ui.id().with("doc_new"), Sense::click());
|
||||
if presp.hovered() {
|
||||
ui.painter().rect_filled(pr, 4.0, Color32::from_white_alpha(30));
|
||||
ui.painter().rect_filled(pr, 4.0, t.app_bar_hover_button);
|
||||
}
|
||||
let c = pr.center();
|
||||
let s = Stroke::new(1.6, t.app_bar_text);
|
||||
ui.painter().line_segment([c - vec2(6.0, 0.0), c + vec2(6.0, 0.0)], s);
|
||||
ui.painter().line_segment([c - vec2(0.0, 6.0), c + vec2(0.0, 6.0)], s);
|
||||
crate::icons::paint_app_bar(
|
||||
ui.painter(),
|
||||
Rect::from_center_size(pr.center(), vec2(16.0, 16.0)),
|
||||
"plus",
|
||||
if presp.hovered() { 1.0 } else { 0.55 },
|
||||
);
|
||||
// A file loading into the window keeps the tabs as they are (dragging still moves it).
|
||||
let idle = !app.file_load.busy();
|
||||
if presp.on_hover_text("New Design (Ctrl+N)").clicked() && idle {
|
||||
@@ -485,18 +494,16 @@ pub fn tabs(app: &mut SolveApp, ui: &mut egui::Ui, r: Rect, x0: f32, x1: f32) {
|
||||
}
|
||||
}
|
||||
|
||||
/// One tab of the strip: the active tab takes the toolbar's colour and runs into it; the others
|
||||
/// sit on the application bar, lighter while hovered.
|
||||
/// Tabs are rounded chips on the bar; the active design has the stronger fill.
|
||||
fn tab_shape(painter: &egui::Painter, t: &Tokens, r: Rect, active: bool, hovered: bool) {
|
||||
let corners = egui::CornerRadius { nw: 5, ne: 5, sw: 0, se: 0 };
|
||||
let fill = if active {
|
||||
t.toolbar
|
||||
t.app_bar_tab_active
|
||||
} else if hovered {
|
||||
t.app_bar_hover
|
||||
} else {
|
||||
t.app_bar
|
||||
egui::Color32::TRANSPARENT
|
||||
};
|
||||
painter.rect_filled(r, corners, fill);
|
||||
painter.rect_filled(r, t.radius_md, fill);
|
||||
}
|
||||
|
||||
/// Which tabs the strip shows in `room` points: (first, how many, tab width). Tabs shrink to
|
||||
@@ -637,6 +644,7 @@ pub(crate) fn saved_for_close(app: &mut SolveApp) {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::Services;
|
||||
use egui::Color32;
|
||||
|
||||
fn app() -> SolveApp {
|
||||
SolveApp::new(Session::default(), Services::default())
|
||||
@@ -654,8 +662,7 @@ mod tests {
|
||||
assert_eq!(layout(12, 0, 600.0).0, 0);
|
||||
}
|
||||
|
||||
/// The tabs sit on the dark application bar in both themes: a hovered tab (the Home tab
|
||||
/// included) keeps the bar's light text readable, and no tab is outlined.
|
||||
/// Active and hovered document tabs keep the bar's light text readable in both themes.
|
||||
#[test]
|
||||
fn title_bar_tabs_keep_their_text_readable_on_hover() {
|
||||
fn luminance(c: Color32) -> f32 {
|
||||
@@ -682,11 +689,9 @@ mod tests {
|
||||
})
|
||||
.collect();
|
||||
let fill = rects.iter().find(|(rect, _)| rect.fill.a() > 0).map(|(rect, _)| rect.fill).unwrap_or_default();
|
||||
if !active {
|
||||
let bg = over(fill, t.app_bar);
|
||||
let (hi, lo) = (luminance(t.app_bar_text).max(luminance(bg)), luminance(t.app_bar_text).min(luminance(bg)));
|
||||
assert!((hi + 0.05) / (lo + 0.05) >= 4.5, "text on a tab (hovered: {hovered}) must stay readable: {bg:?} {t:?}");
|
||||
}
|
||||
let bg = over(fill, t.app_bar);
|
||||
let (hi, lo) = (luminance(t.app_bar_text).max(luminance(bg)), luminance(t.app_bar_text).min(luminance(bg)));
|
||||
assert!((hi + 0.05) / (lo + 0.05) >= 4.5, "text on a tab (hovered: {hovered}) must stay readable: {bg:?} {t:?}");
|
||||
assert!(rects.iter().all(|(rect, _)| rect.stroke.width == 0.0), "tabs have no outline (active: {active})");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,8 +53,8 @@ impl Side {
|
||||
pub fn dock_frame(ctx: &egui::Context, side: Side) -> egui::Frame {
|
||||
let t = crate::theme::Tokens::get();
|
||||
let (corner_radius, shadow_x) = match side {
|
||||
Side::Right => (egui::CornerRadius { nw: 4, sw: 4, ne: 0, se: 0 }, -2),
|
||||
Side::Left => (egui::CornerRadius { nw: 0, sw: 0, ne: 4, se: 4 }, 2),
|
||||
Side::Right => (egui::CornerRadius { nw: t.radius_sm, sw: t.radius_sm, ne: 0, se: 0 }, -2),
|
||||
Side::Left => (egui::CornerRadius { nw: 0, sw: 0, ne: t.radius_sm, se: t.radius_sm }, 2),
|
||||
};
|
||||
egui::Frame::window(&ctx.global_style())
|
||||
.fill(t.dialog_bg)
|
||||
@@ -245,7 +245,7 @@ mod tests {
|
||||
fn feature_forms_use_available_height_and_keep_actions_visible() {
|
||||
use crate::scenario::Harness;
|
||||
use serde_json::json;
|
||||
for (width, height, scale) in [(1400.0, 900.0, 1.0), (1400.0, 900.0, 2.0)] {
|
||||
for (width, height, scale) in [(1400.0, 900.0, 1.0), (1400.0, 950.0, 2.0)] {
|
||||
let mut h = Harness::new();
|
||||
h.app.preferences.ui_scale = scale;
|
||||
h.call("ui.resize", json!({"width":width / scale,"height":height / scale}));
|
||||
@@ -302,8 +302,8 @@ mod tests {
|
||||
h.frames(6);
|
||||
let hovered = h.app.viewport.dialog_rect.unwrap();
|
||||
assert!((hovered.size() - rest.size()).length() < 0.01, "hovering resized the dialog: {rest:?} -> {hovered:?}");
|
||||
// Dragged by its title text.
|
||||
let title = h.widget("CREATE SKETCH").map(|[x, y]| egui::pos2(x as f32, y as f32)).unwrap();
|
||||
// Drag the published title band, independent of similarly labelled toolbar controls.
|
||||
let title = crate::scenario::handle_at("dialog:title").unwrap();
|
||||
h.call("ui.drag", json!({"x0": title.x, "y0": title.y, "x1": title.x - 300.0, "y1": title.y + 120.0, "steps": 8}));
|
||||
h.frames(4);
|
||||
let moved = h.app.viewport.dialog_rect.unwrap();
|
||||
|
||||
+25
-18
@@ -455,15 +455,15 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
egui::ScrollArea::vertical().auto_shrink([false, false]).show(ui, |ui| {
|
||||
ui.horizontal(|ui| {
|
||||
ui.label(RichText::new("SolidCraft").size(26.0).strong().color(t.text));
|
||||
ui.add_space(12.0);
|
||||
ui.add_space(t.space_12);
|
||||
ui.label(RichText::new(crate::i18n::tr_label("Start")).size(16.0).color(t.text_dim));
|
||||
});
|
||||
ui.add_space(16.0);
|
||||
ui.add_space(t.space_16);
|
||||
ui.horizontal(|ui| {
|
||||
let big = |ui: &mut egui::Ui, icon: &str, label: &str, primary: bool| -> bool {
|
||||
// The label sets the width: a translation longer than the English one widens
|
||||
// the button instead of running past its edge.
|
||||
let ink_text = if primary { Color32::WHITE } else { t.text };
|
||||
let ink_text = if primary { t.on_accent } else { t.text };
|
||||
let galley = ui.painter().layout_no_wrap(label.to_owned(), egui::FontId::proportional(15.0), ink_text);
|
||||
let width = (56.0 + galley.size().x + 20.0).max(170.0);
|
||||
let (r, resp) = ui.allocate_exact_size(vec2(width, 64.0), Sense::click());
|
||||
@@ -474,8 +474,8 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
} else {
|
||||
t.field
|
||||
};
|
||||
ui.painter().rect(r, 6.0, fill, Stroke::new(1.0, if primary { t.accent } else { t.border }), egui::StrokeKind::Inside);
|
||||
let ink = if primary { Color32::WHITE } else { t.icon };
|
||||
ui.painter().rect(r, t.radius_md, fill, Stroke::new(1.0, if primary { t.accent } else { t.border }), egui::StrokeKind::Inside);
|
||||
let ink = if primary { t.on_accent } else { t.icon };
|
||||
crate::icons::paint(
|
||||
ui.painter(),
|
||||
egui::Rect::from_center_size(r.left_center() + vec2(30.0, 0.0), vec2(30.0, 30.0)),
|
||||
@@ -490,7 +490,7 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
if big(ui, "new", app.tr("ui.new_design"), true) {
|
||||
action = Some(Box::new(|app: &mut SolveApp| crate::documents::new_design(app)));
|
||||
}
|
||||
ui.add_space(10.0);
|
||||
ui.add_space(t.space_10);
|
||||
if big(ui, "open", app.tr("home.open"), false) {
|
||||
action = Some(Box::new(|app: &mut SolveApp| {
|
||||
app.pick_open(|app, path| {
|
||||
@@ -502,7 +502,7 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
}));
|
||||
}
|
||||
});
|
||||
ui.add_space(24.0);
|
||||
ui.add_space(t.space_24);
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.hyperlink_to(app.tr("home.documentation"), crate::help::DOCS_URL);
|
||||
ui.hyperlink_to(app.tr("home.report_issue"), "https://github.com/tangency-labs/solidcraft/issues/new");
|
||||
@@ -515,7 +515,7 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
crate::prefs::open_at(app, 0);
|
||||
}
|
||||
});
|
||||
ui.add_space(16.0);
|
||||
ui.add_space(t.space_16);
|
||||
section(ui, app.tr("home.recent"));
|
||||
if recent.is_empty() {
|
||||
ui.label(RichText::new(crate::i18n::tr_label("Designs you open or save appear here.")).color(t.text_dim));
|
||||
@@ -570,7 +570,7 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
}
|
||||
});
|
||||
}
|
||||
ui.add_space(24.0);
|
||||
ui.add_space(t.space_24);
|
||||
section(ui, app.tr("home.samples"));
|
||||
grid(ui, samples.len(), |ui, i| {
|
||||
let Some(s) = samples.get(i) else { return };
|
||||
@@ -597,21 +597,22 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
fn section(ui: &mut egui::Ui, title: &str) {
|
||||
let t = Tokens::get();
|
||||
ui.label(RichText::new(title).size(15.0).strong().color(t.text));
|
||||
ui.add_space(8.0);
|
||||
ui.add_space(t.space_8);
|
||||
}
|
||||
|
||||
/// Cards in rows that fill the width.
|
||||
fn grid(ui: &mut egui::Ui, n: usize, mut each: impl FnMut(&mut egui::Ui, usize)) {
|
||||
let t = Tokens::get();
|
||||
let w = THUMB[0] as f32 + 16.0;
|
||||
let per_row = ((ui.available_width() + 14.0) / (w + 14.0)).floor().max(1.0) as usize;
|
||||
let per_row = ((ui.available_width() + t.space_14) / (w + t.space_14)).floor().max(1.0) as usize;
|
||||
for row in 0..n.div_ceil(per_row) {
|
||||
ui.horizontal(|ui| {
|
||||
ui.spacing_mut().item_spacing.x = 14.0;
|
||||
ui.spacing_mut().item_spacing.x = t.space_14;
|
||||
for i in row * per_row..((row + 1) * per_row).min(n) {
|
||||
each(ui, i);
|
||||
}
|
||||
});
|
||||
ui.add_space(14.0);
|
||||
ui.add_space(t.space_14);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,7 +630,7 @@ fn card(ui: &mut egui::Ui, pic: Pic, name: &str, sub: &str, dim: bool) -> egui::
|
||||
let hover = resp.hovered();
|
||||
ui.painter().rect(
|
||||
r,
|
||||
6.0,
|
||||
t.radius_md,
|
||||
if hover { t.hover } else { t.field },
|
||||
Stroke::new(1.0, if hover { t.accent } else { t.border }),
|
||||
egui::StrokeKind::Inside,
|
||||
@@ -637,7 +638,7 @@ fn card(ui: &mut egui::Ui, pic: Pic, name: &str, sub: &str, dim: bool) -> egui::
|
||||
let img = egui::Rect::from_min_size(r.min + vec2(8.0, 8.0), vec2(THUMB[0] as f32, THUMB[1] as f32));
|
||||
match pic {
|
||||
Pic::Icon(icon) => {
|
||||
ui.painter().rect_filled(img, CornerRadius::same(4), t.panel_header);
|
||||
ui.painter().rect_filled(img, CornerRadius::same(t.radius_sm), t.panel_header);
|
||||
crate::icons::paint(ui.painter(), egui::Rect::from_center_size(img.center(), vec2(56.0, 56.0)), icon, t.icon, t.icon_fill, t.icon);
|
||||
}
|
||||
Pic::Ready(Some(tx)) => {
|
||||
@@ -645,7 +646,7 @@ fn card(ui: &mut egui::Ui, pic: Pic, name: &str, sub: &str, dim: bool) -> egui::
|
||||
ui.painter().image(tx.id(), img, egui::Rect::from_min_max(egui::pos2(0.0, 0.0), egui::pos2(1.0, 1.0)), tint);
|
||||
}
|
||||
Pic::Ready(None) => {
|
||||
ui.painter().rect_filled(img, CornerRadius::same(4), t.panel_header);
|
||||
ui.painter().rect_filled(img, CornerRadius::same(t.radius_sm), t.panel_header);
|
||||
if !dim {
|
||||
egui::Spinner::new().size(18.0).paint_at(ui, egui::Rect::from_center_size(img.center(), vec2(18.0, 18.0)));
|
||||
}
|
||||
@@ -654,8 +655,14 @@ fn card(ui: &mut egui::Ui, pic: Pic, name: &str, sub: &str, dim: bool) -> egui::
|
||||
let ty = img.bottom() + 8.0;
|
||||
let clip = egui::Rect::from_min_max(egui::pos2(r.left() + 8.0, ty), egui::pos2(r.right() - 8.0, r.bottom()));
|
||||
let p = ui.painter().with_clip_rect(clip);
|
||||
p.text(egui::pos2(r.left() + 10.0, ty), egui::Align2::LEFT_TOP, name, egui::FontId::proportional(14.0), if dim { t.text_dim } else { t.text });
|
||||
p.text(egui::pos2(r.left() + 10.0, ty + 20.0), egui::Align2::LEFT_TOP, sub, egui::FontId::proportional(11.5), t.text_dim);
|
||||
p.text(
|
||||
egui::pos2(r.left() + 10.0, ty),
|
||||
egui::Align2::LEFT_TOP,
|
||||
name,
|
||||
egui::FontId::proportional(t.font_heading),
|
||||
if dim { t.text_dim } else { t.text },
|
||||
);
|
||||
p.text(egui::pos2(r.left() + 10.0, ty + 20.0), egui::Align2::LEFT_TOP, sub, egui::FontId::proportional(t.font_caption), t.text_dim);
|
||||
if hover {
|
||||
ui.ctx().set_cursor_icon(egui::CursorIcon::PointingHand);
|
||||
}
|
||||
|
||||
@@ -301,6 +301,10 @@ mod tests {
|
||||
let texts = english_texts();
|
||||
let mut wanted: Vec<&str> = crate::toolbar::TABS.to_vec();
|
||||
wanted.push(crate::toolbar_custom::WORKSPACE);
|
||||
for section in crate::workspace::SECTIONS {
|
||||
wanted.push(section.tab);
|
||||
wanted.push(section.panel);
|
||||
}
|
||||
for spec in solidcraft_engine::command_specs() {
|
||||
wanted.push(spec.tab);
|
||||
wanted.push(spec.panel);
|
||||
|
||||
@@ -95,7 +95,8 @@ fn window_chrome_renders_in_the_active_language() {
|
||||
// The browser heading is on screen from the start; the selection filter lives in the
|
||||
// SELECT panel, which is not the one shown by default.
|
||||
assert!(h.widget(browser).is_some(), "{lang}: the browser heading must show {browser:?}");
|
||||
let select = scenario::handle_at("panel:SOLID:SELECT").expect("the SELECT panel is on the SOLID tab");
|
||||
h.step(&json!({"click":{"handle":"tab:VIEW"}})).unwrap();
|
||||
let select = scenario::handle_at("panel:VIEW:SELECT").expect("the selection filter is on VIEW");
|
||||
h.step(&json!({"click": [select.x, select.y]})).unwrap();
|
||||
h.frames(2);
|
||||
assert!(h.widget(filter).is_some(), "{lang}: the selection filter must show {filter:?}");
|
||||
@@ -248,10 +249,10 @@ fn translated_dialog_buttons_do_not_wrap() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn long_panel_label_wraps_centred_and_its_button_is_centred() {
|
||||
fn finish_exit_label_and_its_button_are_centred() {
|
||||
fn label_rows(shape: &egui::Shape) -> Option<Vec<egui::Rect>> {
|
||||
match shape {
|
||||
egui::Shape::Text(text) if text.galley.job.text == "SKIZZE BEENDEN" => {
|
||||
egui::Shape::Text(text) if text.galley.job.text == "Beenden" => {
|
||||
Some(text.galley.rows.iter().map(|row| row.rect().translate(text.pos.to_vec2())).collect())
|
||||
}
|
||||
egui::Shape::Vec(shapes) => shapes.iter().find_map(label_rows),
|
||||
@@ -282,12 +283,11 @@ fn long_panel_label_wraps_centred_and_its_button_is_centred() {
|
||||
out.textures_delta.clear();
|
||||
let mut out = h.ctx.run_ui(egui::RawInput { screen_rect: Some(screen), ..Default::default() }, |ui| h.app.ui(ui));
|
||||
let rows = out.shapes.iter().find_map(|shape| label_rows(&shape.shape)).expect("the Finish Sketch panel label is drawn");
|
||||
assert_eq!(rows.len(), 2, "the label wider than its one-button panel wraps: {rows:?}");
|
||||
assert!(rows[0].width() != rows[1].width(), "the lines differ in width: {rows:?}");
|
||||
assert!((rows[0].center().x - rows[1].center().x).abs() < 1.0, "each line is centred: {rows:?}");
|
||||
assert_eq!(rows.len(), 1, "the translated Exit section label fits one row: {rows:?}");
|
||||
assert!((rows[0].center().x - label.x).abs() < 1.0, "the label is centred: {rows:?}");
|
||||
let hover = crate::theme::Tokens::get().hover;
|
||||
let lr = out.shapes.iter().find_map(|shape| hover_rect(&shape.shape, hover, label)).expect("the hovered label is highlighted");
|
||||
assert!(rows.iter().all(|row| lr.contains_rect(*row)), "the highlight holds both lines: {lr:?} {rows:?}");
|
||||
assert!(rows.iter().all(|row| lr.contains_rect(*row)), "the highlight holds the label: {lr:?} {rows:?}");
|
||||
out.textures_delta.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ pub(crate) mod pointer;
|
||||
|
||||
/// Textures already rasterised: one per (master, look, pixel size).
|
||||
#[derive(Clone, Default)]
|
||||
struct Cache(Arc<Mutex<HashMap<(&'static str, Look, u32), TextureHandle>>>);
|
||||
struct Cache(Arc<Mutex<HashMap<(&'static str, Look, u32, Option<Color32>), TextureHandle>>>);
|
||||
|
||||
/// Draw the icon `name` in `r`. The ink, fill and accent colours the callers pass are no longer
|
||||
/// used: the palette decides. Only the ink's opacity is kept, so a dimmed (disabled) button dims
|
||||
@@ -39,6 +39,20 @@ pub fn paint_icon(p: &Painter, r: Rect, name: &str, opacity: f32) {
|
||||
/// Draw the icon `name` for a surface that is always dark (the application bar), whatever the
|
||||
/// theme: `dark: Some(true)`. `None` follows the theme.
|
||||
pub fn paint_on(p: &Painter, r: Rect, name: &str, dark: Option<bool>, opacity: f32) {
|
||||
paint_with_ink(p, r, name, dark, opacity, None);
|
||||
}
|
||||
|
||||
/// Monochrome flat controls on the application bar use its text token exactly.
|
||||
pub(crate) fn paint_app_bar(p: &Painter, r: Rect, name: &str, opacity: f32) {
|
||||
paint_with_ink(p, r, name, Some(true), opacity, Some(crate::theme::Tokens::get().app_bar_text));
|
||||
}
|
||||
|
||||
/// Paint a single-colour icon in `ink`.
|
||||
pub(crate) fn paint_ink(p: &Painter, r: Rect, name: &str, ink: Color32) {
|
||||
paint_with_ink(p, r, name, Some(true), 1.0, Some(ink));
|
||||
}
|
||||
|
||||
fn paint_with_ink(p: &Painter, r: Rect, name: &str, dark: Option<bool>, opacity: f32, ink: Option<Color32>) {
|
||||
let ctx = p.ctx();
|
||||
let ppp = ctx.pixels_per_point().max(0.5);
|
||||
let side = r.width().min(r.height());
|
||||
@@ -47,11 +61,16 @@ pub fn paint_on(p: &Painter, r: Rect, name: &str, dark: Option<bool>, opacity: f
|
||||
let look = Look { dark: dark.unwrap_or_else(|| ctx.global_style().visuals.dark_mode), accent: resolved.accent, vision: crate::theme::vision() };
|
||||
let cache = ctx.data_mut(|d| d.get_temp_mut_or_insert_with(egui::Id::new("sc_icon_cache"), Cache::default).clone());
|
||||
let Ok(mut map) = cache.0.lock() else { return };
|
||||
let key = (resolved.master, look, px);
|
||||
let key = (resolved.master, look, px, ink);
|
||||
if let std::collections::hash_map::Entry::Vacant(slot) = map.entry(key) {
|
||||
let Some(doc) = icon_svg::doc_for(resolved.master, px) else { return };
|
||||
let Some(pm) = icon_svg::render(doc, look, px) else { return };
|
||||
let image = egui::ColorImage::from_rgba_premultiplied([px as usize, px as usize], pm.data());
|
||||
let mut image = egui::ColorImage::from_rgba_premultiplied([px as usize, px as usize], pm.data());
|
||||
if let Some(ink) = ink {
|
||||
for pixel in &mut image.pixels {
|
||||
*pixel = ink.gamma_multiply(f32::from(pixel.a()) / 255.0);
|
||||
}
|
||||
}
|
||||
slot.insert(ctx.load_texture(format!("icon:{}:{px}", resolved.master), image, TextureOptions::LINEAR));
|
||||
}
|
||||
let Some(tex) = map.get(&key) else { return };
|
||||
@@ -67,6 +86,24 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::theme::{self, ColorVision};
|
||||
|
||||
#[test]
|
||||
fn assistant_pixels_use_the_application_bar_text_token() {
|
||||
let previous = theme::is_dark();
|
||||
for dark in [false, true] {
|
||||
let ctx = egui::Context::default();
|
||||
theme::set_dark(dark);
|
||||
let mut out = ctx.run_ui(egui::RawInput::default(), |ui| {
|
||||
paint_app_bar(ui.painter(), Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(32.0, 32.0)), "assistant", 1.0);
|
||||
});
|
||||
let ink = theme::Tokens::get().app_bar_text;
|
||||
assert!(out.textures_delta.set.iter().any(|(_, deltas)| deltas.iter().any(|delta| match &delta.image {
|
||||
egui::ImageData::Color(image) => image.pixels.contains(&ink),
|
||||
})));
|
||||
out.textures_delta.clear();
|
||||
}
|
||||
theme::set_dark(previous);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn actual_uploaded_icon_pixels_follow_semantics_and_vision_cache_changes() {
|
||||
let ctx = egui::Context::default();
|
||||
|
||||
@@ -228,8 +228,11 @@ pub use control::{ControlRequest, ControlResponse};
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
pub struct UiState {
|
||||
/// Toolbar tab: SOLID, SURFACE, MESH, SHEET METAL, PLASTIC, UTILITIES (SKETCH while sketching).
|
||||
/// Ribbon tab; contextual SKETCH and SHEET METAL join the seven design tabs.
|
||||
pub tab: String,
|
||||
/// Last contextual body/sketch, only used to select on entry.
|
||||
#[serde(skip)]
|
||||
pub ribbon_context: Option<String>,
|
||||
pub show_browser: bool,
|
||||
pub show_timeline: bool,
|
||||
pub show_grid: bool,
|
||||
@@ -262,7 +265,8 @@ pub struct UiState {
|
||||
impl Default for UiState {
|
||||
fn default() -> Self {
|
||||
UiState {
|
||||
tab: "SOLID".into(),
|
||||
tab: "MODEL".into(),
|
||||
ribbon_context: None,
|
||||
show_browser: true,
|
||||
show_timeline: true,
|
||||
show_grid: true,
|
||||
@@ -781,12 +785,10 @@ impl SolveApp {
|
||||
self.set_status(msg, true);
|
||||
}
|
||||
}
|
||||
if self.session.active_sketch.is_some() && self.ui.tab != "SKETCH" {
|
||||
self.ui.tab = "SKETCH".into();
|
||||
} else if self.session.active_sketch.is_none() && self.ui.tab == "SKETCH" {
|
||||
self.ui.tab = "SOLID".into();
|
||||
if self.session.active_sketch.is_none() && self.ui.tab == "SKETCH" {
|
||||
self.tool = None;
|
||||
}
|
||||
workspace::sync_context(self);
|
||||
}
|
||||
|
||||
/// Start a command the way a toolbar click does: interactive tools and dialogs for commands
|
||||
@@ -806,6 +808,7 @@ impl SolveApp {
|
||||
self.set_status(format!("{label}: {why}"), true);
|
||||
return;
|
||||
}
|
||||
workspace::select_command_tab(self, id);
|
||||
if id == "material.properties.validate" {
|
||||
self.material_card_review = Some(material_card_review::ReviewWindow::default());
|
||||
self.home.open = false;
|
||||
@@ -1485,6 +1488,7 @@ impl SolveApp {
|
||||
}
|
||||
}
|
||||
toolbar::toolbar(self, ui);
|
||||
theme::TabAccent::publish(self, ui.ctx());
|
||||
let show_timeline = self.ui.show_timeline && !render_workspace::active(self);
|
||||
let left_timeline = show_timeline && self.preferences.timeline_left;
|
||||
if show_timeline && !left_timeline {
|
||||
|
||||
@@ -627,25 +627,25 @@ fn occurrence_moves_turn_about_their_origin_then_move() {
|
||||
fn toolbar_pins_removes_reorders_and_keeps_its_layout() {
|
||||
use crate::toolbar_custom as tc;
|
||||
let mut app = sample_app();
|
||||
app.ui.tab = "SOLID".into();
|
||||
app.ui.tab = "MODEL".into();
|
||||
let ids = |app: &SolveApp, panel: &str| -> Vec<&'static str> {
|
||||
let lists = tc::panel_lists("SOLID");
|
||||
let lists = tc::panel_lists("MODEL");
|
||||
let (_, cmds, n) = lists.iter().find(|(p, ..)| *p == panel).unwrap();
|
||||
tc::buttons(app, "SOLID", panel, cmds, *n).iter().map(|c| c.id).collect()
|
||||
tc::buttons(app, "MODEL", panel, cmds, *n).iter().map(|c| c.id).collect()
|
||||
};
|
||||
let create = ids(&app, "CREATE");
|
||||
// Pin a command that isn't a button yet: it lands at the end of its panel.
|
||||
let extra =
|
||||
tc::panel_lists("SOLID").iter().find(|(p, ..)| *p == "CREATE").unwrap().1.iter().map(|c| c.id).find(|id| !create.contains(id)).unwrap();
|
||||
tc::panel_lists("MODEL").iter().find(|(p, ..)| *p == "CREATE").unwrap().1.iter().map(|c| c.id).find(|id| !create.contains(id)).unwrap();
|
||||
act(&mut app, &Target::ToolbarCommand { id: extra.into() }, "Pin to Toolbar");
|
||||
assert_eq!(ids(&app, "CREATE").last(), Some(&extra));
|
||||
// Remove a default button.
|
||||
act(&mut app, &Target::ToolbarCommand { id: create[0].into() }, "Remove from Toolbar");
|
||||
assert!(!ids(&app, "CREATE").contains(&create[0]));
|
||||
// Reorder: the pinned one before the second default; then into another panel.
|
||||
tc::reorder(&mut app, "SOLID", extra, "CREATE", Some(create[1]));
|
||||
tc::reorder(&mut app, "MODEL", extra, "CREATE", Some(create[1]));
|
||||
assert_eq!(ids(&app, "CREATE")[0], extra);
|
||||
tc::reorder(&mut app, "SOLID", extra, "MODIFY", None);
|
||||
tc::reorder(&mut app, "MODEL", extra, "MODIFY", None);
|
||||
assert!(!ids(&app, "CREATE").contains(&extra) && ids(&app, "MODIFY").last() == Some(&extra));
|
||||
// Pin to Shortcuts goes to the S box's favourites.
|
||||
act(&mut app, &Target::ToolbarCommand { id: "solid.extrude".into() }, "Pin to Shortcuts");
|
||||
|
||||
@@ -374,7 +374,7 @@ pub struct Prefs {
|
||||
/// AI features (docs/agent-chat.md): the master switch. Off: no AI button, shortcut, menu
|
||||
/// entry or panel, and nothing is looked for or started.
|
||||
pub ai_features: bool,
|
||||
/// The AI button at the toolbar row's right end (the shortcut and View menu entry stay).
|
||||
/// The Assistant button in the application bar (the shortcut and View menu entry stay).
|
||||
pub ai_toolbar_button: bool,
|
||||
/// Agents the user added (the installed ones are found by themselves). API keys are never
|
||||
/// here: they live in the system keychain.
|
||||
|
||||
@@ -38,6 +38,17 @@ impl Colors {
|
||||
let c = |c: egui::Color32| c.to_srgba_unmultiplied();
|
||||
Colors { body: c(t.body), added: c(t.preview_add), new_body: c(t.preview_new), removed: c(t.preview_cut), edge: c(t.body_edge) }
|
||||
}
|
||||
|
||||
fn for_tool(t: &Tokens, tab: &str, active: bool) -> Colors {
|
||||
let mut colors = Self::from_tokens(t);
|
||||
let accent = crate::theme::TabAccent::for_tab(t, tab);
|
||||
if active && accent.color != t.accent {
|
||||
colors.added = accent.color.to_srgba_unmultiplied();
|
||||
colors.new_body = t.body.lerp_to_gamma(accent.color, 0.45).to_srgba_unmultiplied();
|
||||
}
|
||||
// Removed material retains its warning colour and opacity.
|
||||
colors
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SketchPreview {
|
||||
@@ -308,7 +319,7 @@ pub fn update(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
return;
|
||||
}
|
||||
};
|
||||
let colors = Colors::from_tokens(&Tokens::get());
|
||||
let colors = Colors::for_tool(&Tokens::get(), &app.ui.tab, app.tool.is_some() || app.dialog.is_some());
|
||||
let key = job_key(&cmds, app.session.revision, colors);
|
||||
let stream_key = stream_key(&cmds, app.session.revision, colors);
|
||||
let tool = as_new_body(&cmds).is_some();
|
||||
@@ -812,6 +823,32 @@ mod tests {
|
||||
use super::*;
|
||||
use serde_json::json;
|
||||
|
||||
#[test]
|
||||
fn tool_preview_follows_tab_without_recolouring_removal_or_idle_previews() {
|
||||
for dark in [false, true] {
|
||||
for vision in crate::theme::ColorVision::ALL {
|
||||
let t = Tokens::themed(dark, vision);
|
||||
let base = Colors::from_tokens(&t);
|
||||
for tab in ["MODEL", "SKETCH", "SURFACE", "ASSEMBLE", "INSERT", "INSPECT", "MANAGE", "VIEW", "SHEET METAL", "RENDER"] {
|
||||
for active in [false, true] {
|
||||
let colors = Colors::for_tool(&t, tab, active);
|
||||
assert_eq!(colors.removed, base.removed);
|
||||
assert_eq!(colors.body, base.body);
|
||||
assert_eq!(colors.edge, base.edge);
|
||||
if !active || crate::theme::TabAccent::for_tab(&t, tab).color == t.accent {
|
||||
assert_eq!(colors.added, base.added);
|
||||
assert_eq!(colors.new_body, base.new_body);
|
||||
} else {
|
||||
let accent = crate::theme::TabAccent::for_tab(&t, tab);
|
||||
assert_eq!(colors.added, accent.color.to_srgba_unmultiplied());
|
||||
assert_ne!(colors.new_body, colors.added);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn colors() -> Colors {
|
||||
Colors { body: [1, 1, 1, 255], added: [2, 2, 2, 255], new_body: [4, 4, 4, 255], removed: [3, 3, 3, 100], edge: [0, 0, 0, 255] }
|
||||
}
|
||||
|
||||
@@ -125,11 +125,12 @@ pub fn tick(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
}
|
||||
|
||||
pub fn reset_document(app: &mut SolveApp) {
|
||||
app.ui.ribbon_context = None;
|
||||
let host = app.render_workspace.host.clone();
|
||||
let image_host = app.render_workspace.image_host.clone();
|
||||
app.render_workspace = State { host, image_host, ..Default::default() };
|
||||
if active(app) {
|
||||
app.ui.tab = "SOLID".into();
|
||||
app.ui.tab = "MODEL".into();
|
||||
}
|
||||
sync_backend(app);
|
||||
}
|
||||
@@ -161,7 +162,7 @@ pub fn enter(app: &mut SolveApp, render: bool) -> Result<(), String> {
|
||||
app.ui.up_axis = camera.up;
|
||||
app.ui.perspective = perspective;
|
||||
}
|
||||
app.ui.tab = "SOLID".into();
|
||||
app.ui.tab = "MODEL".into();
|
||||
}
|
||||
app.cancel_view_animation();
|
||||
Ok(())
|
||||
|
||||
@@ -112,13 +112,14 @@ pub fn search(app: &SolveApp, q: &str) -> Vec<Row> {
|
||||
let mut v: Vec<(u32, Row)> = command_specs()
|
||||
.into_iter()
|
||||
.filter_map(|c| {
|
||||
let (label, tab, panel) = (crate::i18n::tr_label(c.label), crate::i18n::tr_label(c.tab), crate::i18n::tr_label(c.panel));
|
||||
let place = (!c.tab.is_empty()).then_some((tab, panel));
|
||||
let (home_tab, home_panel) = crate::workspace::destination(c).unwrap_or(("", ""));
|
||||
let (label, tab, panel) = (crate::i18n::tr_label(c.label), crate::i18n::tr_label(home_tab), crate::i18n::tr_label(home_panel));
|
||||
let place = (!home_tab.is_empty()).then_some((tab, panel));
|
||||
let s = score(&q, label)
|
||||
.max(score(&q, c.label))
|
||||
.max(score(&q, c.id) * 9 / 10)
|
||||
.max(score(&q, tab).max(score(&q, c.tab)) / 3)
|
||||
.max(score(&q, panel).max(score(&q, c.panel)) / 3);
|
||||
.max(score(&q, tab).max(score(&q, home_tab)) / 3)
|
||||
.max(score(&q, panel).max(score(&q, home_panel)) / 3);
|
||||
let recent = app.sbox.recent.iter().position(|r| r == c.id).map_or(0, |i| 2000 - i as u32);
|
||||
// Commands that can run now come before those that can't.
|
||||
let usable = if c.info(&app.session).enabled { 150 } else { 0 };
|
||||
@@ -200,14 +201,15 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
let mut picked: Option<&'static str> = None;
|
||||
let mut pin: Option<&'static str> = None;
|
||||
let mut menu: Option<(Pos2, &'static str)> = None;
|
||||
let h = 380.0;
|
||||
let w = W.min((screen.width() - 8.0).max(32.0));
|
||||
let h = 380.0_f32.min((screen.height() - 8.0).max(120.0));
|
||||
let pos = pos2(
|
||||
at.x.clamp(screen.left() + 4.0, (screen.right() - W - 4.0).max(screen.left())),
|
||||
at.y.clamp(screen.top() + 4.0, (screen.bottom() - h).max(screen.top())),
|
||||
at.x.clamp(screen.left() + 4.0, (screen.right() - w - 4.0).max(screen.left() + 4.0)),
|
||||
at.y.clamp(screen.top() + 4.0, (screen.bottom() - h).max(screen.top() + 4.0)),
|
||||
);
|
||||
let resp = crate::frame::area(egui::Id::new("sc_sbox")).fixed_pos(pos).order(egui::Order::Foreground).show(ctx, |ui| {
|
||||
crate::context_menu::menu_frame(ui, |ui| {
|
||||
ui.set_width(W - 10.0);
|
||||
ui.set_width(w - 10.0);
|
||||
// Pinned commands: a mini toolbar.
|
||||
if !app.sbox.pinned.is_empty() {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
@@ -228,7 +230,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
let te = ui.add(
|
||||
egui::TextEdit::singleline(&mut app.sbox.text)
|
||||
.hint_text(crate::i18n::tr_label("Search commands"))
|
||||
.desired_width(W - 20.0)
|
||||
.desired_width(w - 20.0)
|
||||
.id(egui::Id::new("sc_sbox_text")),
|
||||
);
|
||||
if std::mem::take(&mut app.sbox.focus) {
|
||||
@@ -245,7 +247,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
ui.spacing_mut().item_spacing.y = 0.0;
|
||||
for (i, (id, label, icon, place)) in list.iter().enumerate().take(80) {
|
||||
let enabled = solidcraft_engine::find_command(id).is_some_and(|c| c.info(&app.session).enabled);
|
||||
let (r, resp) = ui.allocate_exact_size(vec2(W - 20.0, 26.0), Sense::click());
|
||||
let (r, resp) = ui.allocate_exact_size(vec2(w - 20.0, 26.0), Sense::click());
|
||||
let lit = i == app.sbox.index || resp.hovered();
|
||||
if lit {
|
||||
ui.painter().rect_filled(r, 4.0, t.hover);
|
||||
@@ -296,6 +298,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
});
|
||||
});
|
||||
});
|
||||
crate::scenario::publish_rect("ribbon:search_popup", resp.response.rect);
|
||||
if let Some(id) = pin {
|
||||
app.sbox.toggle_pin(id);
|
||||
}
|
||||
@@ -366,7 +369,7 @@ mod tests {
|
||||
let mut app = SolveApp::new(solidcraft_engine::Session::default(), Default::default());
|
||||
assert_eq!(search(&app, "extr").first().map(|x| x.0), Some("solid.extrude"));
|
||||
assert_eq!(search(&app, "solid.fil").first().map(|x| x.0), Some("solid.fillet"));
|
||||
assert!(search(&app, "constraints").iter().any(|x| x.0 == "sketch.constraint.parallel"), "by panel");
|
||||
assert!(search(&app, "constrain").iter().any(|x| x.0 == "sketch.constraint.parallel"), "by panel");
|
||||
app.sbox.used("solid.shell");
|
||||
app.sbox.used("solid.revolve");
|
||||
let all = search(&app, "");
|
||||
@@ -393,6 +396,19 @@ mod tests {
|
||||
assert_eq!((row.1, row.3), (name, place), "{query:?}");
|
||||
}
|
||||
assert_eq!(search(&app, name).first().map(|r| r.0), Some("sketch.rectangle.center"), "the exact name comes first");
|
||||
// Search shows and matches the redesigned destination, including translated panels.
|
||||
for (id, tab, panel) in
|
||||
[("solid.extrude", "MODEL", "CREATE"), ("inspect.draft", "INSPECT", "CHECK"), ("sketch.constraint.parallel", "SKETCH", "CONSTRAIN")]
|
||||
{
|
||||
let c = solidcraft_engine::find_command(id).unwrap();
|
||||
let label = ja.label(c.label);
|
||||
let place = Some((ja.label(tab), ja.label(panel)));
|
||||
for query in [label, c.label, id, ja.label(tab), tab, ja.label(panel), panel] {
|
||||
let rows = search(&app, query);
|
||||
let row = rows.iter().find(|r| r.0 == id).unwrap_or_else(|| panic!("{query:?} doesn't find {id}"));
|
||||
assert_eq!((row.1, row.3), (label, place), "{query:?}: {id}");
|
||||
}
|
||||
}
|
||||
// English is unchanged.
|
||||
drop(_ja);
|
||||
let row = search(&app, "center rect").into_iter().find(|r| r.0 == "sketch.rectangle.center").unwrap();
|
||||
|
||||
@@ -436,6 +436,7 @@ fn boxes(app: &SolveApp, ui: &mut egui::Ui, proj: &Proj, t: &mut Tool) -> Option
|
||||
..Default::default()
|
||||
}))
|
||||
.on_hover_text(b.label);
|
||||
crate::theme::TabAccent::number_focus(ui, &r);
|
||||
// A completion gets first use of forward Tab. Shift+Tab always moves back;
|
||||
// the box reached by egui's generic traversal must not complete its text.
|
||||
let changed = (source.is_none() || (source == Some(i) && tab != Some(true))) && crate::params_dialog::complete(ui, &r, &mut b.value);
|
||||
|
||||
@@ -583,7 +583,7 @@ fn sketch_pattern_tools_are_promoted_together_and_open_from_the_toolbar() {
|
||||
let panels = crate::toolbar_custom::panel_lists("SKETCH");
|
||||
let (_, cmds, promoted) = panels.iter().find(|(panel, ..)| *panel == "PATTERN").unwrap();
|
||||
let ids: Vec<_> = cmds.iter().take(*promoted).map(|c| c.id).collect();
|
||||
assert_eq!(ids, ["sketch.mirror", "sketch.pattern.rectangular", "sketch.pattern.circular"]);
|
||||
assert_eq!(ids, ["sketch.mirror", "sketch.pattern.circular", "sketch.pattern.rectangular"]);
|
||||
for id in ids {
|
||||
h.settle();
|
||||
h.step(&json!({"click":{"handle":format!("toolbar:{id}")}})).unwrap();
|
||||
|
||||
@@ -574,7 +574,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
ui.add_space((line - gap).max(0.0));
|
||||
// A row as tall as the button, so the gap below it is just the line.
|
||||
ui.allocate_ui_with_layout(vec2(ui.available_width(), 0.0), egui::Layout::right_to_left(egui::Align::Min), |ui| {
|
||||
let button = ui.add(egui::Button::new(RichText::new(app.tr("ui.finish_sketch")).color(Color32::WHITE)).fill(t.accent));
|
||||
let button = ui.add(egui::Button::new(RichText::new(app.tr("ui.finish_sketch")).color(t.on_accent)).fill(t.accent));
|
||||
crate::scenario::publish_rect("sketch_palette:finish", button.rect);
|
||||
crate::scenario::publish_handle("sketch_palette:finish", button.rect.center());
|
||||
if button.clicked() {
|
||||
|
||||
@@ -513,7 +513,7 @@ fn path_row(ui: &mut egui::Ui, k: &mut Tx, inputs: &mut [SelInput], active: &mut
|
||||
ui.horizontal(|ui| {
|
||||
let on = k.style.path.is_some();
|
||||
let text = if on {
|
||||
egui::RichText::new(crate::i18n::format("dialog.selected_count", &[("count", "1")])).color(egui::Color32::WHITE)
|
||||
egui::RichText::new(crate::i18n::format("dialog.selected_count", &[("count", "1")])).color(t.on_accent)
|
||||
} else {
|
||||
egui::RichText::new(crate::i18n::tr("dialog.select")).color(t.text)
|
||||
};
|
||||
|
||||
@@ -160,40 +160,6 @@ pub fn trim_drag_end(app: &mut SolveApp) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
/// Commands registered on one panel that another panel also lists: the analyses (sketch
|
||||
/// INSPECT) on SOLID INSPECT, and Interference (SOLID INSPECT) on sketch INSPECT.
|
||||
const ALSO_IN: &[(&str, &str, &str)] = &[
|
||||
("SOLID", "INSPECT", "inspect.zebra"),
|
||||
("SOLID", "INSPECT", "inspect.draft"),
|
||||
("SOLID", "INSPECT", "inspect.curvature_map"),
|
||||
("SOLID", "INSPECT", "inspect.environment_map"),
|
||||
("SOLID", "INSPECT", "inspect.accessibility"),
|
||||
("SOLID", "INSPECT", "inspect.minimum_radius"),
|
||||
("SOLID", "INSPECT", "inspect.isocurve"),
|
||||
("SOLID", "INSPECT", "inspect.curvature_comb"),
|
||||
("SOLID", "INSPECT", "inspect.center_of_mass"),
|
||||
("SKETCH", "INSPECT", "inspect.interference"),
|
||||
];
|
||||
|
||||
/// A panel's commands plus the ones it shares with another panel (see [`ALSO_IN`]).
|
||||
pub fn also_in<'a>(
|
||||
tab: &str,
|
||||
panel: &str,
|
||||
mut cmds: Vec<&'a solidcraft_engine::CommandSpec>,
|
||||
specs: &[&'a solidcraft_engine::CommandSpec],
|
||||
) -> Vec<&'a solidcraft_engine::CommandSpec> {
|
||||
for (t, p, id) in ALSO_IN {
|
||||
if *t == tab
|
||||
&& *p == panel
|
||||
&& !cmds.iter().any(|c| c.id == *id)
|
||||
&& let Some(c) = specs.iter().find(|c| c.id == *id)
|
||||
{
|
||||
cmds.push(c);
|
||||
}
|
||||
}
|
||||
cmds
|
||||
}
|
||||
|
||||
/// Run an analysis and keep its result as a marker.
|
||||
fn analysis(app: &mut SolveApp, cmd: &str, p: Value) {
|
||||
let Ok(v) = app.run(cmd, p) else { return };
|
||||
|
||||
+126
-3
@@ -40,6 +40,52 @@ pub fn set_custom(custom: Option<Custom>) -> bool {
|
||||
CUSTOM.with(|c| c.replace(custom) != custom)
|
||||
}
|
||||
|
||||
/// A tab's selection colours. This is deliberately separate from the global widget style:
|
||||
/// application chrome, checkboxes, status colours and dialog actions retain their own tokens.
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub(crate) struct TabAccent {
|
||||
pub color: Color32,
|
||||
pub soft: Color32,
|
||||
}
|
||||
|
||||
impl TabAccent {
|
||||
pub fn for_tab(t: &Tokens, tab: &str) -> Self {
|
||||
let color = match tab {
|
||||
"SKETCH" => t.sketch_accent,
|
||||
"SURFACE" => t.surface_accent,
|
||||
"MESH" => t.mesh_accent,
|
||||
"FORM" => t.form_accent,
|
||||
_ => t.accent,
|
||||
};
|
||||
// Preserve the existing Solid selection exactly. Other tabs blend against the same
|
||||
// panel surface in either theme rather than introducing independent palette entries.
|
||||
let soft = if color == t.accent { t.accent_soft } else { t.panel.lerp_to_gamma(color, 0.18) };
|
||||
Self { color, soft }
|
||||
}
|
||||
|
||||
pub fn current(ctx: &egui::Context) -> Self {
|
||||
ctx.data(|d| d.get_temp::<Self>(egui::Id::new("sc_tab_accent"))).unwrap_or_else(|| Self::for_tab(&Tokens::get(), "MODEL"))
|
||||
}
|
||||
|
||||
pub fn publish(app: &crate::SolveApp, ctx: &egui::Context) {
|
||||
let accent = Self::for_tab(&Tokens::get(), &app.ui.tab);
|
||||
ctx.data_mut(|d| {
|
||||
d.insert_temp(egui::Id::new("sc_tab_accent"), accent);
|
||||
d.insert_temp(egui::Id::new("sc_tool_accent"), app.tool.is_some() || app.dialog.is_some());
|
||||
});
|
||||
}
|
||||
|
||||
/// Paint only the focused numeric editor, without changing sibling buttons or checkboxes.
|
||||
pub fn number_focus(ui: &egui::Ui, response: &egui::Response) {
|
||||
let active = ui.ctx().data(|d| d.get_temp::<bool>(egui::Id::new("sc_tool_accent"))).unwrap_or(false);
|
||||
let accent = Self::current(ui.ctx());
|
||||
let t = Tokens::get();
|
||||
if active && response.has_focus() && accent.color != t.accent {
|
||||
ui.painter().rect_stroke(response.rect, t.radius_sm, Stroke::new(1.0, accent.color), egui::StrokeKind::Inside);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Is the dark theme on?
|
||||
pub fn is_dark() -> bool {
|
||||
DARK.get()
|
||||
@@ -170,7 +216,33 @@ pub struct IconColors {
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub struct Tokens {
|
||||
// Shared dimensions in logical pixels; identical in both themes.
|
||||
pub space_2: f32,
|
||||
pub space_3: f32,
|
||||
pub space_4: f32,
|
||||
pub space_6: f32,
|
||||
pub space_8: f32,
|
||||
pub space_10: f32,
|
||||
pub space_12: f32,
|
||||
pub space_14: f32,
|
||||
pub space_16: f32,
|
||||
pub space_24: f32,
|
||||
pub radius_sm: u8,
|
||||
pub radius_md: u8,
|
||||
pub radius_lg: u8,
|
||||
pub radius_xl: u8,
|
||||
pub font_badge: f32,
|
||||
pub font_micro: f32,
|
||||
pub font_panel: f32,
|
||||
pub font_small: f32,
|
||||
pub font_caption: f32,
|
||||
pub font_body: f32,
|
||||
pub font_label: f32,
|
||||
pub font_button: f32,
|
||||
pub font_heading: f32,
|
||||
pub app_bar: Color32,
|
||||
/// Dividers between the application bar groups.
|
||||
pub app_bar_separator: Color32,
|
||||
pub toolbar: Color32,
|
||||
pub panel: Color32,
|
||||
pub panel_header: Color32,
|
||||
@@ -180,6 +252,15 @@ pub struct Tokens {
|
||||
pub accent: Color32,
|
||||
pub accent_soft: Color32,
|
||||
pub sketch_accent: Color32,
|
||||
pub surface_accent: Color32,
|
||||
pub mesh_accent: Color32,
|
||||
pub form_accent: Color32,
|
||||
pub render_accent: Color32,
|
||||
/// Ink on accent-filled buttons and selection chips.
|
||||
pub on_accent: Color32,
|
||||
/// Agent status on the dark application bar, in either theme.
|
||||
pub agent_ok: Color32,
|
||||
pub agent_busy: Color32,
|
||||
pub error: Color32,
|
||||
pub warning: Color32,
|
||||
pub icon: Color32,
|
||||
@@ -279,6 +360,11 @@ pub struct Tokens {
|
||||
pub app_bar_text: Color32,
|
||||
/// A hovered tab on the application bar (keeps `app_bar_text` readable).
|
||||
pub app_bar_hover: Color32,
|
||||
pub app_bar_hover_subtle: Color32,
|
||||
pub app_bar_hover_button: Color32,
|
||||
pub app_bar_hover_strong: Color32,
|
||||
/// The active document tab: a solid surface lifted from the bar.
|
||||
pub app_bar_tab_active: Color32,
|
||||
/// Timeline items: normal and failed.
|
||||
pub timeline_item: Color32,
|
||||
pub timeline_item_error: Color32,
|
||||
@@ -386,7 +472,7 @@ fn visuals(dark: bool) -> egui::Visuals {
|
||||
v.widgets.hovered.bg_fill = t.hover;
|
||||
// egui uses the open-state fill for a movable window's active title bar.
|
||||
v.widgets.open.weak_bg_fill = t.panel_header;
|
||||
v.window_corner_radius = egui::CornerRadius::same(6);
|
||||
v.window_corner_radius = egui::CornerRadius::same(t.radius_md);
|
||||
v
|
||||
}
|
||||
|
||||
@@ -394,14 +480,51 @@ pub fn apply(ctx: &egui::Context) {
|
||||
let dark = is_dark();
|
||||
ctx.set_theme(if dark { egui::Theme::Dark } else { egui::Theme::Light });
|
||||
ctx.set_visuals(visuals(dark));
|
||||
let t = Tokens::get();
|
||||
ctx.global_style_mut(|s| {
|
||||
s.spacing.item_spacing = egui::vec2(6.0, 4.0);
|
||||
s.spacing.button_padding = egui::vec2(6.0, 3.0);
|
||||
s.spacing.item_spacing = egui::vec2(t.space_6, t.space_4);
|
||||
s.spacing.button_padding = egui::vec2(t.space_6, t.space_3);
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn tab_accents_map_tokens_and_derive_selection_without_changing_solid() {
|
||||
for dark in [false, true] {
|
||||
for vision in super::ColorVision::ALL {
|
||||
let t = super::Tokens::themed(dark, vision);
|
||||
for (tab, color) in [("SKETCH", t.sketch_accent), ("SURFACE", t.surface_accent), ("MESH", t.mesh_accent), ("FORM", t.form_accent)] {
|
||||
let accent = super::TabAccent::for_tab(&t, tab);
|
||||
assert_eq!(accent.color, color);
|
||||
assert_eq!(accent.soft, t.panel.lerp_to_gamma(color, 0.18));
|
||||
assert_ne!(accent.soft, color);
|
||||
assert_ne!(accent.soft, t.panel);
|
||||
}
|
||||
for tab in ["MODEL", "ASSEMBLE", "INSERT", "INSPECT", "MANAGE", "VIEW", "SHEET METAL", "RENDER", "unknown"] {
|
||||
assert_eq!(super::TabAccent::for_tab(&t, tab), super::TabAccent { color: t.accent, soft: t.accent_soft });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tab_accent_context_is_per_app_and_does_not_change_widget_visuals() {
|
||||
let mut harness = crate::scenario::Harness::new();
|
||||
let app = &mut harness.app;
|
||||
let first = egui::Context::default();
|
||||
let second = egui::Context::default();
|
||||
let before = first.style_of(egui::Theme::Dark).visuals.clone();
|
||||
app.ui.tab = "SURFACE".into();
|
||||
super::TabAccent::publish(app, &first);
|
||||
assert_eq!(super::TabAccent::current(&first).color, super::Tokens::get().surface_accent);
|
||||
assert_eq!(super::TabAccent::current(&second).color, super::Tokens::get().accent);
|
||||
assert_eq!(first.style_of(egui::Theme::Dark).visuals, before, "dialog OK, checkboxes and status styles must not inherit the tab");
|
||||
app.ui.tab = "MODEL".into();
|
||||
super::TabAccent::publish(app, &first);
|
||||
assert_eq!(super::TabAccent::current(&first).soft, super::Tokens::get().accent_soft);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn concurrent_ui_renderers_keep_their_own_theme_and_vision() {
|
||||
let barrier = std::sync::Barrier::new(2);
|
||||
|
||||
@@ -78,7 +78,14 @@ macro_rules! theme_keys {
|
||||
#[allow(dead_code)]
|
||||
fn every_colour_has_a_key(t: &Tokens) {
|
||||
// Not colours: the hover lift is a grey step, the analysis colours belong to shaders.
|
||||
let Tokens { $($one: _,)* $($many: _,)* hover_face_lift: _, analysis: _, icons: _ } = t;
|
||||
let Tokens {
|
||||
$($one: _,)* $($many: _,)*
|
||||
hover_face_lift: _, analysis: _, icons: _,
|
||||
space_2: _, space_3: _, space_4: _, space_6: _, space_8: _, space_10: _, space_12: _, space_14: _, space_16: _, space_24: _,
|
||||
radius_sm: _, radius_md: _, radius_lg: _, radius_xl: _,
|
||||
font_badge: _, font_micro: _, font_panel: _, font_small: _, font_caption: _, font_body: _, font_label: _, font_button: _,
|
||||
font_heading: _,
|
||||
} = t;
|
||||
let IconColors { $($ione: _,)* $($imany: _,)* } = &t.icons;
|
||||
}
|
||||
};
|
||||
@@ -96,6 +103,8 @@ theme_keys! {
|
||||
profile_fill, glyph_bg, glyph_edge, glyph_text, overlay, rubber_band, app_bar_text, app_bar_hover, timeline_item,
|
||||
timeline_item_error, timeline_marker, field, box_window, box_crossing, sketch_projected, sketch_lost,
|
||||
sketch_construction, sketch_centerline, bend_up, bend_down, interference,
|
||||
app_bar_separator, surface_accent, mesh_accent, form_accent, render_accent, on_accent, agent_ok, agent_busy, app_bar_hover_subtle,
|
||||
app_bar_hover_button, app_bar_hover_strong, app_bar_tab_active,
|
||||
],
|
||||
many: [triad, gizmo, continuity, app_bar_icon, logo],
|
||||
icons_one: [
|
||||
|
||||
@@ -250,6 +250,7 @@ fn toggle_feature(app: &mut SolveApp, id: u64) {
|
||||
|
||||
pub fn timeline(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
let t = Tokens::get();
|
||||
let accent = crate::theme::TabAccent::for_tab(&t, &app.ui.tab);
|
||||
egui::Panel::bottom("sc_timeline").exact_size(40.0).frame(egui::Frame::NONE.fill(t.timeline)).show(ui, |ui| {
|
||||
let r = ui.max_rect();
|
||||
let p = ui.painter().clone();
|
||||
@@ -336,7 +337,7 @@ pub fn timeline(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
let bg = if err.is_some() {
|
||||
t.timeline_item_error
|
||||
} else if sel {
|
||||
t.accent_soft
|
||||
accent.soft
|
||||
} else if resp.hovered() || from_view == Some(*id) {
|
||||
t.hover
|
||||
} else {
|
||||
@@ -345,7 +346,7 @@ pub fn timeline(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
let edge = if err.is_some() {
|
||||
t.error
|
||||
} else if from_view == Some(*id) {
|
||||
t.accent
|
||||
accent.color
|
||||
} else {
|
||||
t.border
|
||||
};
|
||||
@@ -459,7 +460,13 @@ pub fn timeline(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
if resp.drag_started() {
|
||||
drag = Some(Drag::Marker);
|
||||
}
|
||||
let col = if resp.hovered() || drag == Some(Drag::Marker) { t.accent } else { t.timeline_marker };
|
||||
let col = if resp.hovered() || drag == Some(Drag::Marker) {
|
||||
accent.color
|
||||
} else if accent.color == t.accent {
|
||||
t.timeline_marker
|
||||
} else {
|
||||
accent.color
|
||||
};
|
||||
p.rect_filled(mr, 1.0, col);
|
||||
resp.on_hover_text("History marker: drag to roll the model back; new features go here");
|
||||
}
|
||||
@@ -472,7 +479,7 @@ pub fn timeline(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
let sx = xs.get(slot).copied().unwrap_or(end) - 4.0;
|
||||
p.line_segment(
|
||||
[pos2(sx, r.top() + 3.0), pos2(sx, r.bottom() - 3.0)],
|
||||
Stroke::new(2.0, if matches!(dg, Drag::Marker) { t.accent } else { t.sketch_accent }),
|
||||
Stroke::new(2.0, if matches!(dg, Drag::Marker) { accent.color } else { t.sketch_accent }),
|
||||
);
|
||||
}
|
||||
let released = ui.input(|i| i.pointer.any_released());
|
||||
|
||||
@@ -195,7 +195,7 @@ fn vertical_marker(app: &mut SolveApp, ui: &mut egui::Ui, drag: &mut Option<Drag
|
||||
let t = Tokens::get();
|
||||
let (rect, response) = ui.allocate_exact_size(vec2(ui.available_width(), 7.0), Sense::drag());
|
||||
let line = Rect::from_min_max(pos2(rect.left() + 8.0, rect.center().y - 1.5), pos2(rect.right() - 5.0, rect.center().y + 1.5));
|
||||
let colour = t.accent;
|
||||
let colour = crate::theme::TabAccent::for_tab(&t, &app.ui.tab).color;
|
||||
ui.painter().rect_filled(line, 1.5, colour);
|
||||
ui.painter().circle_filled(pos2(line.right(), line.center().y), 4.0, colour);
|
||||
crate::scenario::publish_handle("timeline:rollback", rect.center());
|
||||
@@ -562,7 +562,7 @@ fn vertical_group_row(
|
||||
drop_zones.push((rect, group.id));
|
||||
slots.push(VerticalSlot { y: rect.bottom(), position: if open { position } else { end_position }, group: Some(group.id), indent_group: None });
|
||||
if selected || response.hovered() {
|
||||
ui.painter().rect_filled(rect, 3.0, if selected { t.accent_soft } else { t.hover });
|
||||
ui.painter().rect_filled(rect, 3.0, if selected { crate::theme::TabAccent::current(ui.ctx()).soft } else { t.hover });
|
||||
}
|
||||
let offset = depth as f32 * 14.0;
|
||||
let centre = pos2(rect.left() + 9.0 + offset, rect.center().y);
|
||||
@@ -708,7 +708,7 @@ fn vertical_features(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
let background = if error.is_some() {
|
||||
t.timeline_item_error
|
||||
} else if selected {
|
||||
t.accent_soft
|
||||
crate::theme::TabAccent::current(ui.ctx()).soft
|
||||
} else if response.hovered() || from_view == Some(*id) {
|
||||
t.hover
|
||||
} else {
|
||||
@@ -868,7 +868,7 @@ fn vertical_features(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
let left = vertical_drop_bar_left(ui.min_rect().left(), folder_target, &groups);
|
||||
ui.painter().line_segment(
|
||||
[pos2(left, slot.y), pos2(ui.max_rect().right() - 5.0, slot.y)],
|
||||
Stroke::new(2.0, if matches!(active, Drag::Marker) { t.accent } else { t.sketch_accent }),
|
||||
Stroke::new(2.0, if matches!(active, Drag::Marker) { crate::theme::TabAccent::current(ui.ctx()).color } else { t.sketch_accent }),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,6 @@ pub const WIDTH: f32 = 3.0 * BUTTON_WIDTH;
|
||||
pub const TRAFFIC_LIGHTS: f32 = 76.0;
|
||||
/// Windows' resize border at 100 % (96 DPI): `SM_CXSIZEFRAME` + `SM_CXPADDEDBORDER`, 4 + 4 px.
|
||||
pub const RESIZE_BORDER_AT_96_DPI: f32 = 8.0;
|
||||
/// The Close button's hover colour (as on Windows).
|
||||
const CLOSE_HOVER: Color32 = Color32::from_rgb(196, 43, 28);
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||
pub enum Caption {
|
||||
@@ -103,16 +101,14 @@ pub fn caption_buttons(app: &mut SolveApp, ui: &mut Ui, bar: Rect) {
|
||||
for (i, c) in CAPTIONS.into_iter().enumerate() {
|
||||
let r = Rect::from_min_size(pos2(bar.right() - WIDTH + i as f32 * BUTTON_WIDTH, bar.top()), vec2(BUTTON_WIDTH, bar.height()));
|
||||
let resp = ui.interact(r, caption_id(c), Sense::click());
|
||||
let close = c == Caption::Close;
|
||||
let fill = match (resp.is_pointer_button_down_on(), resp.hovered()) {
|
||||
(true, _) if close => CLOSE_HOVER.gamma_multiply(0.8),
|
||||
(_, true) if close => CLOSE_HOVER,
|
||||
(true, _) => Color32::from_white_alpha(18),
|
||||
(_, true) => Color32::from_white_alpha(30),
|
||||
(true, _) => t.app_bar_hover_subtle,
|
||||
(_, true) => t.app_bar_hover_button,
|
||||
_ if resp.has_focus() => t.app_bar_hover_button,
|
||||
_ => Color32::TRANSPARENT,
|
||||
};
|
||||
ui.painter().rect_filled(r, 0.0, fill);
|
||||
let ink = if close && resp.hovered() { Color32::WHITE } else { t.app_bar_text };
|
||||
let ink = t.app_bar_text;
|
||||
paint_glyph(ui, c, max, r.center(), Stroke::new(1.0, ink));
|
||||
let tip = match c {
|
||||
Caption::Minimize => "Minimize",
|
||||
@@ -288,6 +284,53 @@ mod tests {
|
||||
v
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_bar_control_uses_translucent_hover_chrome() {
|
||||
let previous = crate::theme::is_dark();
|
||||
for dark in [false, true] {
|
||||
crate::theme::set_dark(dark);
|
||||
let mut w = Win::new(1600.0);
|
||||
w.app.home.open = false;
|
||||
w.frame(vec![]);
|
||||
w.frame(vec![]);
|
||||
let t = Tokens::get();
|
||||
let mut controls: Vec<Rect> = [
|
||||
"titlebar:home",
|
||||
"appbar:file",
|
||||
"titlebar:save",
|
||||
"appbar:undo",
|
||||
"appbar:redo",
|
||||
"tab:design:0",
|
||||
"tab:close:0",
|
||||
"titlebar:assistant",
|
||||
"titlebar:preferences",
|
||||
"appbar:help",
|
||||
"titlebar:report",
|
||||
]
|
||||
.into_iter()
|
||||
.map(|name| crate::scenario::rect_of(name).unwrap_or_else(|| panic!("{name}")))
|
||||
.collect();
|
||||
controls.extend(CAPTIONS.map(|c| w.caption(c)));
|
||||
for rect in controls {
|
||||
w.frame(vec![Event::PointerMoved(rect.center())]);
|
||||
let out = w.frame(vec![]);
|
||||
let fills: Vec<_> = out
|
||||
.shapes
|
||||
.iter()
|
||||
.filter_map(|s| match &s.shape {
|
||||
egui::Shape::Rect(shape) if shape.rect == rect || shape.rect == rect.shrink(3.0) => Some(shape.fill),
|
||||
_ => None,
|
||||
})
|
||||
.collect();
|
||||
assert!(
|
||||
fills.iter().any(|fill| [t.app_bar_hover, t.app_bar_hover_button, t.app_bar_hover_strong, t.app_bar_tab_active].contains(fill)),
|
||||
"dark={dark}: {rect:?} has no application bar hover fill: {fills:?}"
|
||||
);
|
||||
}
|
||||
}
|
||||
crate::theme::set_dark(previous);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn caption_buttons_sit_in_the_corner_and_nothing_runs_under_them() {
|
||||
for width in [960.0, 1600.0] {
|
||||
|
||||
+1068
-421
File diff suppressed because it is too large.
Load diff
@@ -30,10 +30,12 @@ pub struct ToolbarCustom {
|
||||
|
||||
impl ToolbarCustom {
|
||||
pub fn prefs(&self) -> Value {
|
||||
json!(self.panels)
|
||||
json!({"version": 2, "panels": self.panels})
|
||||
}
|
||||
pub fn load(&mut self, v: &Value) {
|
||||
self.panels = v
|
||||
let current = v.get("version").and_then(Value::as_u64) == Some(2);
|
||||
let panels = if current { v.get("panels").unwrap_or(&Value::Null) } else { v };
|
||||
self.panels = panels
|
||||
.as_object()
|
||||
.map(|o| {
|
||||
o.iter()
|
||||
@@ -45,6 +47,63 @@ impl ToolbarCustom {
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_default();
|
||||
if !current {
|
||||
self.migrate();
|
||||
}
|
||||
}
|
||||
fn migrate(&mut self) {
|
||||
use std::collections::BTreeSet;
|
||||
let specs = command_specs();
|
||||
let mut pins: BTreeMap<String, Vec<String>> = BTreeMap::new();
|
||||
let mut removals: BTreeMap<String, BTreeSet<String>> = BTreeMap::new();
|
||||
let old = std::mem::take(&mut self.panels);
|
||||
for (k, ids) in old {
|
||||
let parts: Vec<_> = k.split('/').collect();
|
||||
let ["DESIGN", tab, panel] = parts.as_slice() else {
|
||||
self.panels.insert(k, ids);
|
||||
continue;
|
||||
};
|
||||
if crate::workspace::legacy_panel(tab, panel).is_none() {
|
||||
self.panels.insert(k, ids);
|
||||
continue;
|
||||
}
|
||||
if let Some((t, p)) = crate::workspace::legacy_panel(tab, panel) {
|
||||
pins.entry(key(t, p)).or_default();
|
||||
}
|
||||
for id in crate::workspace::legacy_buttons(tab, panel) {
|
||||
if !ids.iter().any(|x| x == id)
|
||||
&& let Some((t, p)) = crate::workspace::legacy_destination(tab, panel, id)
|
||||
{
|
||||
removals.entry(key(t, p)).or_default().insert(id.into());
|
||||
}
|
||||
}
|
||||
for id in ids {
|
||||
if let Some((t, p)) = crate::workspace::legacy_destination(tab, panel, &id) {
|
||||
let list = pins.entry(key(t, p)).or_default();
|
||||
if !list.contains(&id) {
|
||||
list.push(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let touched: BTreeSet<_> = pins.keys().chain(removals.keys()).cloned().collect();
|
||||
for k in touched {
|
||||
if self.panels.contains_key(&k) {
|
||||
continue;
|
||||
} // An existing new destination wins.
|
||||
let mut ids = pins.remove(&k).unwrap_or_default();
|
||||
let parts: Vec<_> = k.split('/').collect();
|
||||
if let [_, tab, panel] = parts.as_slice()
|
||||
&& let Some((cmds, n)) = crate::workspace::layout(tab, panel, &specs)
|
||||
{
|
||||
for c in cmds.iter().take(n) {
|
||||
if !ids.iter().any(|id| id == c.id) && !removals.get(&k).is_some_and(|r| r.contains(c.id)) {
|
||||
ids.push(c.id.into());
|
||||
}
|
||||
}
|
||||
}
|
||||
self.panels.insert(k, ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,13 +124,9 @@ pub fn panel_lists(tab: &str) -> Vec<(&'static str, Vec<&'static CommandSpec>, u
|
||||
let specs = command_specs();
|
||||
crate::toolbar::panels(tab)
|
||||
.iter()
|
||||
.map(|panel| {
|
||||
let (cmds, promote) = match crate::workspace::layout(tab, panel, &specs) {
|
||||
Some(l) => l,
|
||||
None => (specs.iter().filter(|c| c.tab == tab && c.panel == *panel).copied().collect(), crate::toolbar::promoted(tab, panel)),
|
||||
};
|
||||
let cmds = crate::sketch_tools::also_in(tab, panel, cmds, &specs);
|
||||
(*panel, cmds, promote)
|
||||
.filter_map(|panel| {
|
||||
let (cmds, n) = crate::workspace::layout(tab, panel, &specs)?;
|
||||
(!cmds.is_empty() || *panel == "SELECT").then_some((*panel, cmds, n))
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
@@ -280,3 +335,44 @@ pub fn window(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
}
|
||||
app.toolbar_custom.customizing = open;
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod migration_tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn legacy_pins_split_merge_and_preserve_removals_and_unknown_keys() {
|
||||
let mut custom = ToolbarCustom::default();
|
||||
custom.load(&json!({
|
||||
"DESIGN/SOLID/CREATE":["solid.hole","solid.revolve","solid.move"],
|
||||
"DESIGN/PLASTIC/CREATE":["plastic.boss","plastic.rest","sketch.create"],
|
||||
"DESIGN/SOLID/MODIFY":["solid.chamfer"],
|
||||
"DESIGN/UTILITIES/SELECT":[],
|
||||
"DESIGN/future/panel":["future.command"],
|
||||
"OTHER/SOLID/CREATE":["solid.extrude"]
|
||||
}));
|
||||
let create = &custom.panels["DESIGN/MODEL/CREATE"];
|
||||
assert_eq!(create, &["plastic.boss", "plastic.rest", "solid.hole", "solid.revolve"]);
|
||||
assert!(!create.iter().any(|id| id == "solid.extrude"));
|
||||
assert!(custom.panels["DESIGN/MODEL/ARRANGE"].contains(&"solid.move".into()));
|
||||
assert!(!custom.panels["DESIGN/MODEL/MODIFY"].contains(&"solid.fillet".into()));
|
||||
assert!(custom.panels["DESIGN/MODEL/MODIFY"].contains(&"solid.chamfer".into()));
|
||||
assert_eq!(custom.panels["DESIGN/future/panel"], vec!["future.command"]);
|
||||
assert!(custom.panels.contains_key("OTHER/SOLID/CREATE"));
|
||||
assert!(!custom.panels.contains_key("DESIGN/SOLID/CREATE"));
|
||||
let saved = custom.prefs();
|
||||
let mut reloaded = ToolbarCustom::default();
|
||||
reloaded.load(&saved);
|
||||
assert_eq!(custom, reloaded, "migration runs once, even for unchanged SKETCH/SURFACE keys");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn empty_old_panels_keep_default_button_removals() {
|
||||
let mut custom = ToolbarCustom::default();
|
||||
custom.load(&json!({"DESIGN/SOLID/CREATE":[],"DESIGN/SKETCH/CONSTRAINTS":[],"DESIGN/PLASTIC/SETUP":[]}));
|
||||
assert!(!custom.panels["DESIGN/MODEL/SKETCH"].contains(&"sketch.create".into()));
|
||||
assert!(!custom.panels["DESIGN/MODEL/CREATE"].contains(&"solid.extrude".into()));
|
||||
assert!(!custom.panels["DESIGN/MANAGE/RULES"].contains(&"plastic.manage_rules".into()));
|
||||
assert_eq!(custom.panels["DESIGN/SKETCH/CONSTRAIN"], vec!["sketch.dimension"]);
|
||||
}
|
||||
}
|
||||
@@ -369,12 +369,13 @@ fn the_title_bar_offers_the_new_version_and_opens_the_update_window() {
|
||||
h.frame();
|
||||
wait_for_check(&mut h);
|
||||
h.frames(2);
|
||||
// An accent pill reading "Update to <version>", just left of Report a bug, on the bar.
|
||||
// An accent pill reading "Update to <version>", left of the Settings/Help/Report cluster.
|
||||
let label = format!("Update to {version}");
|
||||
let at = h.widget(&label).unwrap_or_else(|| panic!("no `{label}` in the title bar"));
|
||||
let pill = crate::scenario::rect_of("titlebar:update").unwrap();
|
||||
assert!(pill.contains(egui::pos2(at[0] as f32, at[1] as f32)));
|
||||
assert!(pill.right() <= report.left() && report.left() - pill.right() < 12.0, "beside Report a bug: {pill:?} {report:?}");
|
||||
let assistant = crate::scenario::rect_of("titlebar:assistant").unwrap();
|
||||
assert!(pill.right() < assistant.left() && assistant.left() - pill.right() < 12.0, "beside Assistant: {pill:?} {assistant:?}");
|
||||
assert!((pill.center().y - report.center().y).abs() < 1.0 && pill.height() <= report.height());
|
||||
assert_eq!(crate::scenario::rect_of("titlebar:report"), Some(report), "Report a bug stays where it was");
|
||||
assert!(!h.app.updater.open, "no window pops up by itself");
|
||||
@@ -419,7 +420,7 @@ fn the_pill_shortens_in_a_narrow_title_bar() {
|
||||
last = p.width();
|
||||
}
|
||||
shortened |= pill.is_none_or(|p| p.width() < wide.width());
|
||||
if width == 800.0 {
|
||||
if width == 1000.0 {
|
||||
assert!(h.widget("Update").is_some() && h.widget(&label).is_none(), "the short label keeps room for the tabs");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1671,13 +1671,13 @@ fn analysis_legend(app: &SolveApp, painter: &egui::Painter, rect: Rect) {
|
||||
let (pad, row) = (8.0, 18.0);
|
||||
let h = pad * 2.0 + 18.0 + along.as_ref().map_or(0.0, |_| row) + row * rows.len() as f32;
|
||||
let r = Rect::from_min_size(pos2(rect.left() + 12.0, rect.bottom() - 12.0 - h), vec2(230.0, h));
|
||||
painter.rect(r, 6.0, t.overlay, Stroke::new(1.0, t.border), egui::StrokeKind::Inside);
|
||||
painter.rect(r, t.radius_md, t.overlay, Stroke::new(1.0, t.border), egui::StrokeKind::Inside);
|
||||
crate::scenario::publish_handle("analysis:legend", r.center());
|
||||
let mut y = r.top() + pad;
|
||||
painter.text(pos2(r.left() + pad, y), Align2::LEFT_TOP, title, FontId::proportional(13.0), t.text);
|
||||
painter.text(pos2(r.left() + pad, y), Align2::LEFT_TOP, title, FontId::proportional(t.font_button), t.text);
|
||||
y += 18.0;
|
||||
if let Some(along) = along {
|
||||
painter.text(pos2(r.left() + pad, y), Align2::LEFT_TOP, along, FontId::proportional(11.5), t.text_dim);
|
||||
painter.text(pos2(r.left() + pad, y), Align2::LEFT_TOP, along, FontId::proportional(t.font_caption), t.text_dim);
|
||||
y += row;
|
||||
}
|
||||
for (c, text, hatched) in rows {
|
||||
@@ -1692,7 +1692,7 @@ fn analysis_legend(app: &SolveApp, painter: &egui::Painter, rect: Rect) {
|
||||
);
|
||||
}
|
||||
}
|
||||
painter.text(pos2(sw.right() + 8.0, y), Align2::LEFT_TOP, text, FontId::proportional(12.0), t.text);
|
||||
painter.text(pos2(sw.right() + 8.0, y), Align2::LEFT_TOP, text, FontId::proportional(t.font_body), t.text);
|
||||
y += row;
|
||||
}
|
||||
}
|
||||
@@ -2941,7 +2941,13 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
&& let Some((low, high)) = sketch.bounds()
|
||||
&& let Some(at) = proj.to_screen(plane.to_world(solidcraft_engine::geom::Vec2::new((low.x + high.x) * 0.5, high.y)))
|
||||
{
|
||||
painter.text(at - vec2(0.0, 12.0), Align2::CENTER_BOTTOM, "Saved sketch plane — attachment lost", FontId::proportional(12.0), t.warning);
|
||||
painter.text(
|
||||
at - vec2(0.0, 12.0),
|
||||
Align2::CENTER_BOTTOM,
|
||||
"Saved sketch plane — attachment lost",
|
||||
FontId::proportional(t.font_body),
|
||||
t.warning,
|
||||
);
|
||||
}
|
||||
if let Some(bx) = app.viewport.boxsel {
|
||||
let col = if bx.crossing { t.box_crossing } else { t.box_window };
|
||||
@@ -2970,9 +2976,9 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
let seconds = ((crate::now_ms() - since) / 1000.0).floor().max(0.0);
|
||||
let text = crate::i18n::format("dialog.computing", &[("seconds", &format!("{seconds:.0}"))]);
|
||||
let pos = pos2(rect.left() + 12.0, rect.bottom() - 76.0);
|
||||
let galley = painter.layout_no_wrap(text, FontId::proportional(12.5), t.text);
|
||||
let galley = painter.layout_no_wrap(text, FontId::proportional(t.font_label), t.text);
|
||||
let r = Rect::from_min_size(pos, galley.size() + vec2(34.0, 8.0));
|
||||
painter.rect_filled(r, 4.0, t.overlay);
|
||||
painter.rect_filled(r, t.radius_sm, t.overlay);
|
||||
egui::Spinner::new().size(12.0).paint_at(ui, Rect::from_center_size(pos2(r.left() + 13.0, r.center().y), vec2(12.0, 12.0)));
|
||||
painter.galley(pos + vec2(26.0, 4.0), galley, t.text);
|
||||
ui.ctx().request_repaint_after(std::time::Duration::from_millis(100));
|
||||
@@ -2981,9 +2987,9 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
if let Some((msg, at, err)) = app.status.clone() {
|
||||
if crate::now_ms() - at < 6000.0 {
|
||||
let pos = pos2(rect.left() + 12.0, rect.bottom() - 46.0);
|
||||
let galley = painter.layout_no_wrap(msg, FontId::proportional(12.5), if err { t.error } else { t.text });
|
||||
let galley = painter.layout_no_wrap(msg, FontId::proportional(t.font_label), if err { t.error } else { t.text });
|
||||
let r = Rect::from_min_size(pos, galley.size() + vec2(16.0, 8.0));
|
||||
painter.rect_filled(r, 4.0, t.overlay);
|
||||
painter.rect_filled(r, t.radius_sm, t.overlay);
|
||||
painter.galley(pos + vec2(8.0, 4.0), galley, t.text);
|
||||
// A click opens every message of the run, to read and copy (#2763).
|
||||
crate::scenario::publish_handle("status:chip", r.center());
|
||||
@@ -3447,7 +3453,7 @@ fn overlays(app: &SolveApp, painter: &egui::Painter, proj: &Proj) {
|
||||
format!("{} — {} degrees of freedom", ss.name, ss.report.dof)
|
||||
};
|
||||
let c = if ss.report.ok() { t.sketch_accent } else { t.error };
|
||||
painter.text(pos2(r.left() + 12.0, r.top() + 12.0), Align2::LEFT_TOP, msg, FontId::proportional(13.0), c);
|
||||
painter.text(pos2(r.left() + 12.0, r.top() + 12.0), Align2::LEFT_TOP, msg, FontId::proportional(t.font_button), c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3720,7 +3726,7 @@ fn nav_bar(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect) {
|
||||
|| menu_open;
|
||||
let mut painter = ui.painter_at(rect);
|
||||
painter.set_opacity(if active || app.preferences.navigator_style == crate::prefs::NavigatorStyle::Axes { 1.0 } else { 0.45 });
|
||||
painter.rect(bar, 6.0, t.overlay, Stroke::new(1.0, t.border), egui::StrokeKind::Inside);
|
||||
painter.rect(bar, t.radius_md, t.overlay, Stroke::new(1.0, t.border), egui::StrokeKind::Inside);
|
||||
let columns = ((bar.width() - 10.0) / 30.0).round().clamp(1.0, 10.0) as usize;
|
||||
for (i, (icon, tip)) in items.iter().enumerate() {
|
||||
let br = Rect::from_min_size(
|
||||
@@ -3738,7 +3744,7 @@ fn nav_bar(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect) {
|
||||
_ => false,
|
||||
};
|
||||
if active || resp.hovered() {
|
||||
painter.rect_filled(br, 4.0, if active { t.accent_soft } else { t.hover });
|
||||
painter.rect_filled(br, t.radius_sm, if active { t.accent_soft } else { t.hover });
|
||||
}
|
||||
icons::paint(&painter, br.shrink(4.0), icon, t.icon, t.icon_fill, t.accent);
|
||||
if resp.on_hover_text(*tip).clicked() {
|
||||
@@ -3772,6 +3778,7 @@ fn nav_bar(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect) {
|
||||
/// The View settings above the navigation bar's last button: grid, ground shadow and the agent
|
||||
/// cursor (#35). False once it should close (a click outside it).
|
||||
fn view_menu(app: &mut SolveApp, ui: &mut egui::Ui, button: Rect) -> bool {
|
||||
let t = crate::theme::Tokens::get();
|
||||
// A preset dropdown extends beyond this menu; let it consume its own clicks.
|
||||
let child_popup_open = egui::Popup::is_any_open(ui.ctx());
|
||||
let area = crate::frame::area(egui::Id::new("sc_view_menu"))
|
||||
@@ -3781,7 +3788,7 @@ fn view_menu(app: &mut SolveApp, ui: &mut egui::Ui, button: Rect) -> bool {
|
||||
let r = area.show(ui.ctx(), |ui| {
|
||||
egui::Frame::popup(ui.style()).show(ui, |ui| {
|
||||
ui.set_width(220.0);
|
||||
ui.label(egui::RichText::new(crate::i18n::tr_label("VIEW")).strong().size(11.5));
|
||||
ui.label(egui::RichText::new(crate::i18n::tr_label("VIEW")).strong().size(t.font_caption));
|
||||
ui.label(app.tr("ui.graphics_preset"));
|
||||
crate::prefs::graphics_preset_selector(app, ui);
|
||||
ui.separator();
|
||||
|
||||
@@ -6,7 +6,7 @@ use solidcraft_engine::render::StandardView;
|
||||
#[test]
|
||||
fn thin_rotated_bounds_fit_using_the_original_full_projection() {
|
||||
for (width, height, scale) in [(1400.0, 900.0, 1.0), (700.0, 450.0, 2.0), (700.0, 360.0, 2.0), (900.0, 720.0, 1.0)] {
|
||||
let vp = Rect::from_min_max(pos2(250.0, 126.0), pos2(width, height - 30.0));
|
||||
let vp = Rect::from_min_max(pos2(250.0, crate::toolbar::APP_BAR_HEIGHT + crate::toolbar::RIBBON_HEIGHT), pos2(width, height - 30.0));
|
||||
let dock = Rect::from_min_max(pos2(width - 205.0, vp.top()), vp.max);
|
||||
let layout = Layout::new(vp, &[dock], scale, crate::prefs::NavigatorStyle::Axes);
|
||||
assert!(layout.drawable.width() >= 80.0 && layout.drawable.height() >= 30.0, "{layout:?}");
|
||||
@@ -46,7 +46,7 @@ fn measured_palette_fit_exposes_endpoints_and_layout_changes_preserve_manual_vie
|
||||
h.app.run("sketch.line", json!({"points":[[0,0],[20,0]]})).unwrap();
|
||||
h.call("ui.view", json!({"view":"top"}));
|
||||
h.settle();
|
||||
for (scale, width, height) in [(1.0, 1400.0, 900.0), (2.0, 700.0, 450.0), (2.0, 700.0, 360.0), (1.0, 900.0, 720.0)] {
|
||||
for (scale, width, height) in [(1.0, 1400.0, 900.0), (2.0, 700.0, 475.0), (2.0, 700.0, 385.0), (1.0, 900.0, 720.0)] {
|
||||
h.call("ui.prefs", json!({"ui_scale":scale}));
|
||||
h.call("ui.resize", json!({"width":width,"height":height}));
|
||||
h.settle();
|
||||
@@ -124,7 +124,7 @@ fn fit_home_animation_and_manual_takeover_use_one_layout_solution() {
|
||||
#[test]
|
||||
fn measured_navigator_targets_home_and_drag_work_beside_the_palette_at_hidpi() {
|
||||
for style in crate::prefs::NavigatorStyle::ALL {
|
||||
for (scale, width, height) in [(1.0, 900.0, 720.0), (2.0, 700.0, 450.0), (2.0, 700.0, 360.0)] {
|
||||
for (scale, width, height) in [(1.0, 900.0, 720.0), (2.0, 700.0, 475.0), (2.0, 700.0, 385.0)] {
|
||||
let mut h = Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":style}));
|
||||
h.app.preferences.look_at_anim = false;
|
||||
@@ -221,7 +221,7 @@ fn immediate_standard_view_cancels_fit_before_the_measured_frame() {
|
||||
#[test]
|
||||
fn navigation_anchors_ignore_positioned_resized_and_covering_dialogs() {
|
||||
for (width, height, scale) in [(1400.0, 900.0, 1.0), (700.0, 450.0, 2.0), (700.0, 360.0, 2.0)] {
|
||||
let vp = Rect::from_min_max(pos2(250.0, 126.0), pos2(width, height - 30.0));
|
||||
let vp = Rect::from_min_max(pos2(250.0, crate::toolbar::APP_BAR_HEIGHT + crate::toolbar::RIBBON_HEIGHT), pos2(width, height - 30.0));
|
||||
let baseline = Layout::new(vp, &[], scale, crate::prefs::NavigatorStyle::Axes);
|
||||
assert!(baseline.axis_view.is_positive() && baseline.navigation.is_positive());
|
||||
assert_eq!(baseline.axis_view.right_top(), vp.right_top());
|
||||
|
||||
+678
-154
@@ -1,144 +1,392 @@
|
||||
//! Explicit toolbar layouts: Sketch CREATE, the SOLID tab's ASSEMBLE panel, SHEET METAL and
|
||||
//! PLASTIC. A command is registered on one tab and panel;
|
||||
//! these panels list the commands they show in order (the first few get big buttons), so Extrude
|
||||
//! or Joint appear on several tabs. Commands registered on such a panel but not listed follow at
|
||||
//! the end.
|
||||
//! Ribbon structure is UI data; command registrations retain their original placements.
|
||||
//! Explicit ids override the old placement table and can also share a command across sections.
|
||||
|
||||
use solidcraft_engine::CommandSpec;
|
||||
use solidcraft_engine::doc::FeatureKind;
|
||||
|
||||
const ASSEMBLE: &[&str] = &[
|
||||
"component.create",
|
||||
"joint.create",
|
||||
"joint.as_built",
|
||||
"component.insert_design",
|
||||
"joint.origin",
|
||||
"joint.rigid_group",
|
||||
"joint.drive",
|
||||
"joint.motion_link",
|
||||
"joint.gear",
|
||||
"joint.rack_pinion",
|
||||
"joint.screw",
|
||||
"joint.cam",
|
||||
"motion.study",
|
||||
"motion.trace",
|
||||
"explode.create",
|
||||
"contact.enable_sets",
|
||||
"contact.enable_all",
|
||||
"contact.disable_all",
|
||||
"contact.create",
|
||||
"inspect.interference",
|
||||
pub const TABS: &[&str] = &["MODEL", "SURFACE", "ASSEMBLE", "INSERT", "INSPECT", "MANAGE", "VIEW"];
|
||||
|
||||
/// Reading order of the compact, three-column constraint gallery. Icons come from each spec.
|
||||
pub const CONSTRAINT_GALLERY: &[&str] = &[
|
||||
"sketch.constraint.horizontal_vertical",
|
||||
"sketch.constraint.coincident",
|
||||
"sketch.constraint.tangent",
|
||||
"sketch.constraint.equal",
|
||||
"sketch.constraint.parallel",
|
||||
"sketch.constraint.perpendicular",
|
||||
];
|
||||
|
||||
const SHEET_CREATE: &[&str] = &[
|
||||
"sketch.create",
|
||||
"sheet.flange",
|
||||
"sheet.flat_pattern",
|
||||
"sheet.hem",
|
||||
"sheet.fold",
|
||||
"sheet.convert",
|
||||
"component.create",
|
||||
"solid.extrude",
|
||||
"solid.hole",
|
||||
"solid.thread",
|
||||
"solid.pattern.rectangular",
|
||||
"solid.pattern.circular",
|
||||
"solid.pattern.path",
|
||||
"solid.mirror",
|
||||
"joint.origin",
|
||||
];
|
||||
pub struct CommandGroup {
|
||||
pub label: &'static str,
|
||||
pub ids: &'static [&'static str],
|
||||
}
|
||||
|
||||
const SHEET_MODIFY: &[&str] = &[
|
||||
"sheet.manage_rules",
|
||||
"sheet.unfold",
|
||||
"sheet.refold",
|
||||
"solid.fillet",
|
||||
"solid.chamfer",
|
||||
"solid.move",
|
||||
"solid.align",
|
||||
"timeline.delete",
|
||||
"solid.remove",
|
||||
"material.assign",
|
||||
"parameters.change",
|
||||
];
|
||||
|
||||
const PLASTIC_SETUP: &[&str] = &["plastic.manage_rules", "plastic.assign_rule"];
|
||||
|
||||
const PLASTIC_CREATE: &[&str] = &[
|
||||
"sketch.create",
|
||||
"plastic.boss",
|
||||
"plastic.snap_fit",
|
||||
"plastic.lip",
|
||||
"plastic.rest",
|
||||
"component.create",
|
||||
"solid.extrude",
|
||||
"solid.revolve",
|
||||
"solid.sweep",
|
||||
"solid.loft",
|
||||
"solid.rib",
|
||||
"solid.web",
|
||||
"solid.emboss",
|
||||
"solid.hole",
|
||||
"solid.thread",
|
||||
"solid.box",
|
||||
"solid.cylinder",
|
||||
"solid.sphere",
|
||||
"solid.torus",
|
||||
"solid.coil",
|
||||
"solid.pipe",
|
||||
"solid.pattern.rectangular",
|
||||
"solid.pattern.circular",
|
||||
"solid.pattern.path",
|
||||
"solid.mirror",
|
||||
"joint.origin",
|
||||
];
|
||||
|
||||
/// Panels of a tab, when this module lays the tab out.
|
||||
pub fn panels(tab: &str) -> Option<&'static [&'static str]> {
|
||||
match tab {
|
||||
"SOLID" => Some(&["CREATE", "MODIFY", "ASSEMBLE", "CONFIGURE", "CONSTRUCT", "INSPECT", "INSERT", "SELECT"]),
|
||||
"PLASTIC" => Some(&["SETUP", "CREATE", "MODIFY", "ASSEMBLE", "CONSTRUCT", "INSPECT", "INSERT", "SELECT"]),
|
||||
_ => None,
|
||||
/// Optional headings for section lists. Unlisted commands retain their order at the end.
|
||||
pub fn groups(tab: &str, panel: &str) -> &'static [CommandGroup] {
|
||||
match (tab, panel) {
|
||||
("MODEL", "MODIFY") => &[
|
||||
CommandGroup { label: "Edges", ids: &["solid.fillet", "solid.chamfer"] },
|
||||
CommandGroup {
|
||||
label: "Faces",
|
||||
ids: &["solid.press_pull", "solid.draft", "solid.offset_face", "solid.replace_face", "solid.split_face", "face.delete"],
|
||||
},
|
||||
CommandGroup { label: "Bodies", ids: &["solid.shell", "solid.combine", "solid.split_body", "solid.scale", "solid.remove"] },
|
||||
CommandGroup { label: "Specialise", ids: &["sheet.convert"] },
|
||||
],
|
||||
_ => &[],
|
||||
}
|
||||
}
|
||||
|
||||
/// The commands a panel shows, in order, and how many get a big button; `None` leaves the panel
|
||||
/// to the registry.
|
||||
pub fn layout<'a>(tab: &str, panel: &str, specs: &[&'a CommandSpec]) -> Option<(Vec<&'a CommandSpec>, usize)> {
|
||||
let (ids, promoted, own_tab): (&[&str], usize, &str) = match (tab, panel) {
|
||||
("SKETCH", "CREATE") => (
|
||||
&[
|
||||
"sketch.line",
|
||||
"sketch.rectangle.two_point",
|
||||
"sketch.circle.center",
|
||||
"sketch.arc.three_point",
|
||||
"sketch.slot.center_to_center",
|
||||
"sketch.polygon.inscribed",
|
||||
"sketch.spline.fit_point",
|
||||
"sketch.point",
|
||||
],
|
||||
8,
|
||||
tab,
|
||||
),
|
||||
("SOLID", "CONFIGURE") => (&["parameters.change", "config.table"], 2, tab),
|
||||
("SKETCH", "PATTERN") => (&["sketch.mirror", "sketch.pattern.rectangular", "sketch.pattern.circular"], 3, tab),
|
||||
("SOLID" | "SHEET METAL" | "PLASTIC", "ASSEMBLE") => (ASSEMBLE, 3, tab),
|
||||
("SHEET METAL", "CREATE") => (SHEET_CREATE, 3, tab),
|
||||
("SHEET METAL", "MODIFY") => (SHEET_MODIFY, 2, tab),
|
||||
("PLASTIC", "SETUP") => (PLASTIC_SETUP, 2, tab),
|
||||
("PLASTIC", "CREATE") => (PLASTIC_CREATE, 5, tab),
|
||||
// The solid tab's panels.
|
||||
("PLASTIC", "MODIFY") => (&[], 4, "SOLID"),
|
||||
("SHEET METAL" | "PLASTIC", "CONSTRUCT" | "INSPECT" | "INSERT") => (&[], 2, "SOLID"),
|
||||
_ => return None,
|
||||
/// Menu order is independent of the ribbon's promoted-button order.
|
||||
pub fn grouped_commands<'a>(tab: &str, panel: &str, commands: &[&'a CommandSpec]) -> Vec<(Option<&'static str>, &'a CommandSpec)> {
|
||||
let groups = groups(tab, panel);
|
||||
let mut out = Vec::new();
|
||||
for group in groups {
|
||||
let mut heading = Some(group.label);
|
||||
for id in group.ids {
|
||||
if let Some(command) = commands.iter().find(|c| c.id == *id) {
|
||||
out.push((heading.take(), *command));
|
||||
}
|
||||
}
|
||||
}
|
||||
out.extend(commands.iter().filter(|c| !groups.iter().any(|g| g.ids.contains(&c.id))).map(|c| (None, *c)));
|
||||
out
|
||||
}
|
||||
|
||||
pub struct Section {
|
||||
pub tab: &'static str,
|
||||
pub panel: &'static str,
|
||||
pub promoted: usize,
|
||||
pub ids: &'static [&'static str],
|
||||
}
|
||||
|
||||
pub const SECTIONS: &[Section] = &[
|
||||
Section {
|
||||
tab: "MODEL",
|
||||
panel: "SKETCH",
|
||||
promoted: 1,
|
||||
ids: &["sketch.create", "sketch.edit", "sketch.line3d", "sketch.spline3d", "sketch.point3d", "sketch.move3d"],
|
||||
},
|
||||
Section { tab: "MODEL", panel: "CREATE", promoted: 3, ids: &["solid.extrude", "solid.revolve", "solid.hole"] },
|
||||
Section {
|
||||
tab: "MODEL",
|
||||
panel: "MODIFY",
|
||||
promoted: 4,
|
||||
ids: &["solid.fillet", "solid.chamfer", "solid.shell", "solid.press_pull", "sheet.convert"],
|
||||
},
|
||||
Section {
|
||||
tab: "MODEL",
|
||||
panel: "ARRANGE",
|
||||
promoted: 3,
|
||||
ids: &["solid.move", "solid.mirror", "solid.pattern.rectangular", "solid.align", "solid.pattern.circular", "solid.pattern.path"],
|
||||
},
|
||||
Section { tab: "MODEL", panel: "CONSTRUCT", promoted: 1, ids: &["construct.plane.offset"] },
|
||||
Section { tab: "SURFACE", panel: "CREATE", promoted: 4, ids: &["surface.extrude", "surface.revolve", "surface.sweep", "surface.loft"] },
|
||||
Section { tab: "SURFACE", panel: "EDIT", promoted: 4, ids: &["surface.trim", "surface.untrim", "surface.extend", "surface.stitch"] },
|
||||
Section { tab: "SURFACE", panel: "CONVERT", promoted: 2, ids: &["surface.thicken", "mesh.convert"] },
|
||||
Section {
|
||||
tab: "ASSEMBLE",
|
||||
panel: "COMPONENTS",
|
||||
promoted: 4,
|
||||
ids: &["component.create", "component.from_bodies", "component.insert_design", "parts.library"],
|
||||
},
|
||||
Section {
|
||||
tab: "ASSEMBLE",
|
||||
panel: "JOINTS",
|
||||
promoted: 4,
|
||||
ids: &[
|
||||
"joint.create",
|
||||
"joint.as_built",
|
||||
"joint.origin",
|
||||
"joint.rigid_group",
|
||||
"joint.limits",
|
||||
"joint.gear",
|
||||
"joint.rack_pinion",
|
||||
"joint.screw",
|
||||
"joint.cam",
|
||||
"joint.reach",
|
||||
],
|
||||
},
|
||||
Section {
|
||||
tab: "ASSEMBLE",
|
||||
panel: "POSITION",
|
||||
promoted: 3,
|
||||
ids: &["occurrence.ground", "component.capture_position", "component.revert_position"],
|
||||
},
|
||||
Section {
|
||||
tab: "ASSEMBLE",
|
||||
panel: "MOTION",
|
||||
promoted: 4,
|
||||
ids: &["joint.drive", "joint.motion_link", "motion.study", "motion.trace", "explode.create"],
|
||||
},
|
||||
Section {
|
||||
tab: "ASSEMBLE",
|
||||
panel: "CONTACT",
|
||||
promoted: 2,
|
||||
ids: &["contact.enable_sets", "contact.check", "contact.enable_all", "contact.disable_all", "contact.create", "contact.edit", "contact.list"],
|
||||
},
|
||||
Section {
|
||||
tab: "INSERT",
|
||||
panel: "FILES",
|
||||
promoted: 3,
|
||||
ids: &["file.insert_step", "file.insert_mesh", "component.insert_design", "file.save_mesh"],
|
||||
},
|
||||
Section { tab: "INSERT", panel: "IMAGES", promoted: 3, ids: &["canvas.insert", "canvas.decal", "canvas.edit"] },
|
||||
Section { tab: "INSERT", panel: "2D", promoted: 2, ids: &["sketch.insert_dxf", "sketch.insert_svg"] },
|
||||
Section { tab: "INSERT", panel: "LIBRARY", promoted: 3, ids: &["parts.fastener", "parts.library", "parts.resize", "parts.insert"] },
|
||||
Section { tab: "INSERT", panel: "LINKS", promoted: 2, ids: &["component.update_links", "component.break_link"] },
|
||||
Section { tab: "INSPECT", panel: "MEASURE", promoted: 3, ids: &["inspect.measure", "inspect.center_of_mass", "component.properties"] },
|
||||
Section { tab: "INSPECT", panel: "SECTION", promoted: 1, ids: &["inspect.section"] },
|
||||
Section {
|
||||
tab: "INSPECT",
|
||||
panel: "CHECK",
|
||||
promoted: 4,
|
||||
ids: &["inspect.interference", "inspect.draft", "inspect.accessibility", "contact.check", "inspect.compare"],
|
||||
},
|
||||
Section {
|
||||
tab: "INSPECT",
|
||||
panel: "SURFACE QUALITY",
|
||||
promoted: 4,
|
||||
ids: &[
|
||||
"inspect.zebra",
|
||||
"inspect.curvature_map",
|
||||
"inspect.curvature_comb",
|
||||
"inspect.isocurve",
|
||||
"inspect.minimum_radius",
|
||||
"inspect.environment_map",
|
||||
"inspect.continuity",
|
||||
],
|
||||
},
|
||||
Section { tab: "INSPECT", panel: "HISTORY", promoted: 2, ids: &["timeline.dependents", "document.inspect"] },
|
||||
Section {
|
||||
tab: "MANAGE",
|
||||
panel: "PARAMETERS",
|
||||
promoted: 2,
|
||||
ids: &["parameters.change", "parameters.graph", "parameters.move", "parameters.import", "parameters.export"],
|
||||
},
|
||||
Section { tab: "MANAGE", panel: "CONFIGURATIONS", promoted: 2, ids: &["config.table", "config.configure", "config.rules", "config.preview"] },
|
||||
Section {
|
||||
tab: "MANAGE",
|
||||
panel: "MATERIALS",
|
||||
promoted: 2,
|
||||
ids: &["material.assign", "appearance.assign", "material.properties.validate", "library.inspect", "library.export", "library.apply"],
|
||||
},
|
||||
Section { tab: "MANAGE", panel: "RULES", promoted: 3, ids: &["sheet.manage_rules", "plastic.manage_rules", "plastic.assign_rule"] },
|
||||
Section {
|
||||
tab: "MANAGE",
|
||||
panel: "DESIGN",
|
||||
promoted: 2,
|
||||
ids: &["document.units", "timeline.compute_all", "edit.checkpoint", "edit.restore_checkpoint"],
|
||||
},
|
||||
Section {
|
||||
tab: "VIEW",
|
||||
panel: "VIEWS",
|
||||
promoted: 2,
|
||||
ids: &["view.apply", "view.save", "view.rename", "view.delete", "view.list", "view.navigate"],
|
||||
},
|
||||
Section { tab: "VIEW", panel: "SELECT", promoted: 0, ids: &[] },
|
||||
Section {
|
||||
tab: "SKETCH",
|
||||
panel: "CREATE",
|
||||
promoted: 4,
|
||||
ids: &["sketch.line", "sketch.rectangle.two_point", "sketch.circle.center", "sketch.arc.three_point", "sketch.infinite"],
|
||||
},
|
||||
Section {
|
||||
tab: "SKETCH",
|
||||
panel: "MODIFY",
|
||||
promoted: 3,
|
||||
ids: &["sketch.trim", "sketch.offset", "sketch.fillet", "sketch.copy", "sketch.cut", "sketch.paste"],
|
||||
},
|
||||
Section { tab: "SKETCH", panel: "PATTERN", promoted: 3, ids: &["sketch.mirror", "sketch.pattern.circular", "sketch.pattern.rectangular"] },
|
||||
Section {
|
||||
tab: "SKETCH",
|
||||
panel: "CONSTRAIN",
|
||||
promoted: 7,
|
||||
ids: &[
|
||||
"sketch.dimension",
|
||||
"sketch.constraint.horizontal_vertical",
|
||||
"sketch.constraint.coincident",
|
||||
"sketch.constraint.tangent",
|
||||
"sketch.constraint.equal",
|
||||
"sketch.constraint.parallel",
|
||||
"sketch.constraint.perpendicular",
|
||||
"sketch.construction",
|
||||
"sketch.constrainer",
|
||||
],
|
||||
},
|
||||
Section {
|
||||
tab: "SKETCH",
|
||||
panel: "REFERENCE",
|
||||
promoted: 1,
|
||||
ids: &[
|
||||
"sketch.project",
|
||||
"sketch.intersect",
|
||||
"sketch.include_3d",
|
||||
"sketch.project_to_surface",
|
||||
"sketch.intersection_curve",
|
||||
"sketch.spun_profile",
|
||||
"sketch.isoparametric_curve",
|
||||
"sketch.fit_curves_to_section",
|
||||
"sketch.insert_dxf",
|
||||
"sketch.insert_svg",
|
||||
"canvas.insert",
|
||||
],
|
||||
},
|
||||
Section { tab: "SKETCH", panel: "FINISH SKETCH", promoted: 1, ids: &["sketch.finish"] },
|
||||
Section {
|
||||
tab: "SHEET METAL",
|
||||
panel: "CREATE",
|
||||
promoted: 4,
|
||||
ids: &["sheet.flange", "sheet.hem", "sheet.fold", "sheet.perforate", "sheet.convert"],
|
||||
},
|
||||
Section { tab: "SHEET METAL", panel: "FLAT", promoted: 3, ids: &["sheet.unfold", "sheet.refold", "sheet.flat_pattern"] },
|
||||
Section { tab: "SHEET METAL", panel: "OUTPUT", promoted: 2, ids: &["sheet.export_dxf", "sheet.export_bend_table"] },
|
||||
Section { tab: "SHEET METAL", panel: "RULES", promoted: 1, ids: &["sheet.manage_rules"] },
|
||||
Section { tab: "RENDER", panel: "SCENE", promoted: 2, ids: &["render.scene"] },
|
||||
Section { tab: "RENDER", panel: "IMAGE", promoted: 1, ids: &["render.start"] },
|
||||
];
|
||||
|
||||
/// Compact source labels for painted big buttons only. Menus, search and tooltips
|
||||
/// retain the engine label. Route these through `tr_label`, like other UI labels.
|
||||
pub const RIBBON_LABELS: &[(&str, &str)] = &[
|
||||
("appearance.assign", "Appearance"),
|
||||
("component.capture_position", "Capture Pos."),
|
||||
("component.create", "New Comp."),
|
||||
("component.from_bodies", "From Bodies"),
|
||||
("component.insert_design", "Insert"),
|
||||
("component.properties", "Properties"),
|
||||
("component.revert_position", "Revert Pos."),
|
||||
("config.table", "Config Table"),
|
||||
("contact.check", "Contact"),
|
||||
("contact.enable_sets", "Contact Sets"),
|
||||
("document.inspect", "Inspect"),
|
||||
("document.units", "Units"),
|
||||
("inspect.accessibility", "Access"),
|
||||
("inspect.center_of_mass", "Mass Center"),
|
||||
("inspect.curvature_comb", "Curv. Comb"),
|
||||
("inspect.curvature_map", "Curvature"),
|
||||
("inspect.draft", "Draft"),
|
||||
("inspect.interference", "Interference"),
|
||||
("inspect.isocurve", "Isocurve"),
|
||||
("inspect.section", "Section"),
|
||||
("inspect.zebra", "Zebra"),
|
||||
("joint.as_built", "As-Built"),
|
||||
("material.assign", "Material"),
|
||||
("parameters.change", "Parameters"),
|
||||
("parameters.graph", "Param. Graph"),
|
||||
("parts.fastener", "Fastener"),
|
||||
("parts.library", "Parts"),
|
||||
("parts.resize", "Resize Part"),
|
||||
("plastic.assign_rule", "Assign Rule"),
|
||||
("plastic.manage_rules", "Plastic Rules"),
|
||||
("render.scene", "Scene"),
|
||||
("sheet.export_bend_table", "Bend Table"),
|
||||
("sheet.export_dxf", "Export DXF"),
|
||||
("sheet.flat_pattern", "Flat Pattern"),
|
||||
("sheet.manage_rules", "Sheet Rules"),
|
||||
("sketch.circle.center", "Circle"),
|
||||
("sketch.constraint.coincident", "Coincident"),
|
||||
("sketch.constraint.horizontal_vertical", "Horiz./Vert."),
|
||||
("sketch.create", "New Sketch"),
|
||||
("sketch.dimension", "Dimension"),
|
||||
("sketch.finish", "Finish Sketch"),
|
||||
("sketch.pattern.circular", "Circular"),
|
||||
("sketch.pattern.rectangular", "Rectangular"),
|
||||
("sketch.rectangle.two_point", "Rectangle"),
|
||||
("solid.move", "Move / Copy"),
|
||||
("solid.pattern.rectangular", "Pattern"),
|
||||
("surface.extrude", "Extrude"),
|
||||
("surface.revolve", "Revolve"),
|
||||
("surface.sweep", "Sweep"),
|
||||
("timeline.dependents", "Dependents"),
|
||||
("view.apply", "Restore View"),
|
||||
("view.save", "Save View"),
|
||||
];
|
||||
|
||||
pub fn ribbon_button_label(command: &CommandSpec) -> &str {
|
||||
RIBBON_LABELS.iter().find(|(id, _)| *id == command.id).map_or(command.label, |(_, label)| *label)
|
||||
}
|
||||
|
||||
/// Registry placement → default ribbon destination, after explicit id overrides.
|
||||
pub const PLACEMENTS: &[(&str, &str, &str, &str)] = &[
|
||||
("SOLID", "CREATE", "MODEL", "CREATE"),
|
||||
("SOLID", "MODIFY", "MODEL", "MODIFY"),
|
||||
("SOLID", "CONSTRUCT", "MODEL", "CONSTRUCT"),
|
||||
("SOLID", "ASSEMBLE", "ASSEMBLE", "JOINTS"),
|
||||
("SOLID", "POSITION", "ASSEMBLE", "POSITION"),
|
||||
("SOLID", "CONFIGURE", "MANAGE", "CONFIGURATIONS"),
|
||||
("SOLID", "INSPECT", "INSPECT", "CHECK"),
|
||||
("SOLID", "INSERT", "INSERT", "FILES"),
|
||||
("SURFACE", "CREATE", "SURFACE", "CREATE"),
|
||||
("SURFACE", "MODIFY", "SURFACE", "EDIT"),
|
||||
("SURFACE", "INSPECT", "INSPECT", "SURFACE QUALITY"),
|
||||
("SKETCH", "CREATE", "SKETCH", "CREATE"),
|
||||
("SKETCH", "MODIFY", "SKETCH", "MODIFY"),
|
||||
("SKETCH", "PATTERN", "SKETCH", "PATTERN"),
|
||||
("SKETCH", "CONSTRAINTS", "SKETCH", "CONSTRAIN"),
|
||||
("SKETCH", "INSERT", "INSERT", "IMAGES"),
|
||||
("SKETCH", "INSPECT", "INSPECT", "SURFACE QUALITY"),
|
||||
("SKETCH", "FINISH SKETCH", "SKETCH", "FINISH SKETCH"),
|
||||
("SHEET METAL", "CREATE", "SHEET METAL", "CREATE"),
|
||||
("SHEET METAL", "MODIFY", "SHEET METAL", "FLAT"),
|
||||
("PLASTIC", "CREATE", "MODEL", "CREATE"),
|
||||
("PLASTIC", "SETUP", "MANAGE", "RULES"),
|
||||
("MESH", "MODIFY", "INSERT", "FILES"),
|
||||
("RENDER", "SCENE", "RENDER", "SCENE"),
|
||||
("RENDER", "IMAGE", "RENDER", "IMAGE"),
|
||||
];
|
||||
|
||||
pub fn panels(tab: &str) -> Vec<&'static str> {
|
||||
SECTIONS.iter().filter(|s| s.tab == tab).map(|s| s.panel).collect()
|
||||
}
|
||||
|
||||
pub fn destination(c: &CommandSpec) -> Option<(&'static str, &'static str)> {
|
||||
// A few shared commands have a canonical home that differs from their first occurrence.
|
||||
let primary = match c.id {
|
||||
"sheet.manage_rules" => Some(("MANAGE", "RULES")),
|
||||
"sheet.convert" => Some(("MODEL", "MODIFY")),
|
||||
_ => None,
|
||||
};
|
||||
let mut out: Vec<&CommandSpec> = ids.iter().filter_map(|id| specs.iter().find(|c| c.id == *id).copied()).collect();
|
||||
for c in specs.iter().filter(|c| (c.tab == tab || c.tab == own_tab) && c.panel == panel) {
|
||||
primary
|
||||
.or_else(|| SECTIONS.iter().find(|s| s.ids.contains(&c.id)).map(|s| (s.tab, s.panel)))
|
||||
.or_else(|| PLACEMENTS.iter().find(|(t, p, ..)| *t == c.tab && *p == c.panel).map(|(_, _, t, p)| (*t, *p)))
|
||||
}
|
||||
|
||||
/// Ordered menu commands, with the promoted commands first. Empty sections are omitted by
|
||||
/// panel_lists, except the selection filter, which has its own existing controls.
|
||||
pub fn layout<'a>(tab: &str, panel: &str, specs: &[&'a CommandSpec]) -> Option<(Vec<&'a CommandSpec>, usize)> {
|
||||
let section = SECTIONS.iter().find(|s| s.tab == tab && s.panel == panel)?;
|
||||
let mut out: Vec<_> = section.ids.iter().filter_map(|id| specs.iter().find(|c| c.id == *id).copied()).collect();
|
||||
for c in specs.iter().filter(|c| destination(c) == Some((section.tab, section.panel))) {
|
||||
if !out.iter().any(|o| o.id == c.id) {
|
||||
out.push(*c);
|
||||
}
|
||||
}
|
||||
Some((out, promoted))
|
||||
Some((out, section.promoted))
|
||||
}
|
||||
|
||||
/// Old keys may be split across sections. Resolve each saved button by the same command map;
|
||||
/// unknown command ids follow the old panel's default destination.
|
||||
pub fn legacy_destination(tab: &str, panel: &str, id: &str) -> Option<(&'static str, &'static str)> {
|
||||
legacy_panel(tab, panel)?;
|
||||
solidcraft_engine::find_command(id).and_then(destination).or_else(|| legacy_panel(tab, panel))
|
||||
}
|
||||
|
||||
pub fn legacy_panel(tab: &str, panel: &str) -> Option<(&'static str, &'static str)> {
|
||||
if panel == "SELECT" && matches!(tab, "SOLID" | "SURFACE" | "MESH" | "SHEET METAL" | "PLASTIC" | "UTILITIES" | "SKETCH") {
|
||||
return Some(("VIEW", "SELECT"));
|
||||
}
|
||||
PLACEMENTS.iter().find(|(t, p, ..)| *t == tab && *p == panel).map(|(_, _, t, p)| (*t, *p)).or(match (tab, panel) {
|
||||
("PLASTIC" | "SHEET METAL", "MODIFY") => Some(("MODEL", "MODIFY")),
|
||||
("PLASTIC" | "SHEET METAL" | "SURFACE" | "MESH", "ASSEMBLE") => Some(("ASSEMBLE", "JOINTS")),
|
||||
("PLASTIC" | "SHEET METAL" | "SURFACE" | "MESH", "CONSTRUCT") => Some(("MODEL", "CONSTRUCT")),
|
||||
("PLASTIC" | "SHEET METAL" | "SURFACE" | "MESH", "INSPECT") => Some(("INSPECT", "CHECK")),
|
||||
("PLASTIC" | "SHEET METAL" | "SURFACE" | "MESH", "INSERT") => Some(("INSERT", "FILES")),
|
||||
("MESH", "CREATE" | "PREPARE") => Some(("SURFACE", "CONVERT")),
|
||||
("UTILITIES", "MAKE" | "ADD-INS" | "UTILITY") => Some(("MANAGE", "DESIGN")),
|
||||
("UTILITIES", "INSPECT") => Some(("INSPECT", "CHECK")),
|
||||
_ => None,
|
||||
})
|
||||
}
|
||||
|
||||
/// Timeline and browser icon of the sheet metal and plastic features (`None`: not one of them).
|
||||
@@ -160,23 +408,279 @@ pub fn feature_icon(k: &FeatureKind) -> Option<&'static str> {
|
||||
})
|
||||
}
|
||||
|
||||
/// Selected geometry identifies the active body; without a body selection use the last body
|
||||
/// of the active component, matching feature dialogs. Rules on unrelated bodies do not count.
|
||||
pub fn sheet_body(app: &crate::SolveApp) -> Option<String> {
|
||||
use solidcraft_engine::Sel;
|
||||
let state = app.session.model.state();
|
||||
let selected = app.session.selection.iter().find_map(|s| match s {
|
||||
Sel::Body { name } => Some(name.as_str()),
|
||||
Sel::Face { body, .. } | Sel::Edge { body, .. } => Some(body.as_str()),
|
||||
_ => None,
|
||||
});
|
||||
let body = selected.or_else(|| {
|
||||
state.bodies.iter().rev().find(|b| app.session.doc.model_body_component(b) == app.session.active_component).map(|b| b.name.as_str())
|
||||
})?;
|
||||
state.sheets.iter().find(|s| s.body == body).map(|s| s.body.clone())
|
||||
}
|
||||
|
||||
pub fn visible_tabs(app: &crate::SolveApp) -> Vec<&'static str> {
|
||||
if crate::render_workspace::active(app) {
|
||||
return vec!["RENDER"];
|
||||
}
|
||||
let mut tabs = TABS.to_vec();
|
||||
if app.session.active_sketch.is_some() {
|
||||
tabs.push("SKETCH");
|
||||
}
|
||||
if sheet_body(app).is_some() {
|
||||
tabs.push("SHEET METAL");
|
||||
}
|
||||
tabs
|
||||
}
|
||||
|
||||
/// Select contextual tabs on entry (or a different sheet body), allowing the other tabs to
|
||||
/// remain usable for the rest of that context. Sketch takes precedence over sheet metal.
|
||||
pub fn sync_context(app: &mut crate::SolveApp) {
|
||||
if crate::render_workspace::active(app) {
|
||||
return;
|
||||
}
|
||||
let context = app.session.active_sketch.map(|id| format!("sketch:{id}")).or_else(|| sheet_body(app).map(|body| format!("sheet:{body}")));
|
||||
if app.ui.ribbon_context != context {
|
||||
app.ui.tab = if app.session.active_sketch.is_some() {
|
||||
"SKETCH"
|
||||
} else if context.is_some() {
|
||||
"SHEET METAL"
|
||||
} else {
|
||||
"MODEL"
|
||||
}
|
||||
.into();
|
||||
app.ui.ribbon_context = context;
|
||||
}
|
||||
if !visible_tabs(app).contains(&app.ui.tab.as_str()) {
|
||||
app.ui.tab = "MODEL".into();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn select_command_tab(app: &mut crate::SolveApp, id: &str) {
|
||||
sync_context(app);
|
||||
let Some(c) = solidcraft_engine::find_command(id) else { return };
|
||||
// Keep the tab a toolbar click came from when it already lists this shared command.
|
||||
if crate::toolbar_custom::panel_lists(&app.ui.tab).iter().any(|(_, cmds, _)| cmds.iter().any(|c| c.id == id)) {
|
||||
return;
|
||||
}
|
||||
if let Some((tab, _)) = destination(c) {
|
||||
if tab == "RENDER" {
|
||||
return;
|
||||
} // The Render workspace owns its entry/exit lifecycle.
|
||||
if visible_tabs(app).contains(&tab) {
|
||||
app.ui.tab = tab.into();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Defaults from the previous ribbon, used only to carry removals into the new layout.
|
||||
pub fn legacy_buttons(tab: &str, panel: &str) -> Vec<&'static str> {
|
||||
let (ids, n, source): (&[&str], usize, &str) = match (tab, panel) {
|
||||
("SKETCH", "CREATE") => (
|
||||
&[
|
||||
"sketch.line",
|
||||
"sketch.rectangle.two_point",
|
||||
"sketch.circle.center",
|
||||
"sketch.arc.three_point",
|
||||
"sketch.slot.center_to_center",
|
||||
"sketch.polygon.inscribed",
|
||||
"sketch.spline.fit_point",
|
||||
"sketch.point",
|
||||
],
|
||||
8,
|
||||
tab,
|
||||
),
|
||||
("SKETCH", "PATTERN") => (&["sketch.mirror", "sketch.pattern.rectangular", "sketch.pattern.circular"], 3, tab),
|
||||
("SKETCH", "CONSTRAINTS") => (&[], 6, tab),
|
||||
("SOLID", "CONFIGURE") => (&["parameters.change", "config.table"], 2, tab),
|
||||
("SOLID" | "SHEET METAL" | "PLASTIC", "ASSEMBLE") => (&["component.create", "joint.create", "joint.as_built"], 3, tab),
|
||||
("SHEET METAL", "CREATE") => (&["sketch.create", "sheet.flange", "sheet.flat_pattern"], 3, tab),
|
||||
("SHEET METAL", "MODIFY") => (&["sheet.manage_rules", "sheet.unfold"], 2, tab),
|
||||
("PLASTIC", "SETUP") => (&["plastic.manage_rules", "plastic.assign_rule"], 2, tab),
|
||||
("PLASTIC", "CREATE") => (&["sketch.create", "plastic.boss", "plastic.snap_fit", "plastic.lip", "plastic.rest"], 5, tab),
|
||||
("SOLID" | "PLASTIC", "MODIFY") => (&[], 4, "SOLID"),
|
||||
("SOLID", "CREATE") => (&[], 4, tab),
|
||||
("SHEET METAL" | "PLASTIC", "CONSTRUCT" | "INSPECT" | "INSERT") => (&[], 2, "SOLID"),
|
||||
(_, "FINISH SKETCH") => (&[], 1, tab),
|
||||
_ => (&[], 2, tab),
|
||||
};
|
||||
let mut out = ids.to_vec();
|
||||
for c in solidcraft_engine::command_specs().into_iter().filter(|c| c.tab == source && c.panel == panel) {
|
||||
if !out.contains(&c.id) {
|
||||
out.push(c.id);
|
||||
}
|
||||
}
|
||||
out.truncate(n);
|
||||
out
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use serde_json::json;
|
||||
|
||||
fn ids(tab: &str, panel: &str) -> Vec<&'static str> {
|
||||
#[test]
|
||||
fn modify_groups_order_commands_and_keep_unlisted_commands_at_the_end() {
|
||||
let specs = solidcraft_engine::command_specs();
|
||||
layout(tab, panel, &specs).map(|(v, _)| v.iter().map(|c| c.id).collect()).unwrap_or_default()
|
||||
let (commands, _) = layout("MODEL", "MODIFY", &specs).unwrap();
|
||||
let grouped = grouped_commands("MODEL", "MODIFY", &commands);
|
||||
assert_eq!(grouped.iter().filter_map(|(h, _)| *h).collect::<Vec<_>>(), ["Edges", "Faces", "Bodies", "Specialise"]);
|
||||
assert_eq!(grouped.len(), commands.len());
|
||||
assert_eq!(
|
||||
grouped.iter().map(|(_, c)| c.id).collect::<Vec<_>>(),
|
||||
[
|
||||
"solid.fillet",
|
||||
"solid.chamfer",
|
||||
"solid.press_pull",
|
||||
"solid.draft",
|
||||
"solid.offset_face",
|
||||
"solid.replace_face",
|
||||
"solid.split_face",
|
||||
"face.delete",
|
||||
"solid.shell",
|
||||
"solid.combine",
|
||||
"solid.split_body",
|
||||
"solid.scale",
|
||||
"solid.remove",
|
||||
"sheet.convert",
|
||||
"timeline.delete",
|
||||
]
|
||||
);
|
||||
let plain = grouped_commands("SURFACE", "CREATE", &commands);
|
||||
assert!(plain.iter().all(|(h, _)| h.is_none()));
|
||||
assert_eq!(plain.iter().map(|(_, c)| c.id).collect::<Vec<_>>(), commands.iter().map(|c| c.id).collect::<Vec<_>>());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn configure_header_clicks_open_parameters_and_configurations_separately() {
|
||||
fn promoted_long_labels_have_compact_ribbon_names() {
|
||||
let specs = solidcraft_engine::command_specs();
|
||||
let english: std::collections::BTreeMap<String, String> = serde_json::from_str(include_str!("../../../assets/locales/en.json")).unwrap();
|
||||
for section in SECTIONS {
|
||||
let (commands, count) = layout(section.tab, section.panel, &specs).unwrap();
|
||||
for command in commands.iter().take(count) {
|
||||
// Gallery cells are icon-only; they retain full names in their tooltips.
|
||||
if section.tab == "SKETCH" && section.panel == "CONSTRAIN" && CONSTRAINT_GALLERY.contains(&command.id) {
|
||||
continue;
|
||||
}
|
||||
if command.label.chars().count() > 12 || command.label.split_whitespace().any(|word| word.chars().count() > 9) {
|
||||
assert!(RIBBON_LABELS.iter().any(|(id, _)| *id == command.id), "missing compact label for {}", command.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (id, label) in RIBBON_LABELS {
|
||||
assert!(solidcraft_engine::find_command(id).is_some(), "unknown command {id}");
|
||||
assert!(label.chars().count() <= 13, "{id}: {label}");
|
||||
assert!(english.values().any(|value| value == label), "untranslated ribbon label {label}");
|
||||
}
|
||||
assert_eq!(ribbon_button_label(solidcraft_engine::find_command("sketch.create").unwrap()), "New Sketch");
|
||||
assert_eq!(solidcraft_engine::find_command("sketch.create").unwrap().label, "Create Sketch");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_placed_command_is_reachable_and_every_layout_id_exists() {
|
||||
let specs = solidcraft_engine::command_specs();
|
||||
let lists: Vec<_> = SECTIONS.iter().map(|s| (s, layout(s.tab, s.panel, &specs).unwrap())).collect();
|
||||
for c in specs.iter().filter(|c| !c.tab.is_empty()) {
|
||||
assert!(lists.iter().any(|(_, (cmds, _))| cmds.iter().any(|x| x.id == c.id)), "lost toolbar command {} ({}/{})", c.id, c.tab, c.panel);
|
||||
}
|
||||
for (s, (cmds, n)) in lists {
|
||||
assert!(n <= 4 || (s.tab == "SKETCH" && s.panel == "CONSTRAIN" && n == 7), "{}/{} promotes {n} commands", s.tab, s.panel);
|
||||
for id in s.ids {
|
||||
assert!(specs.iter().any(|c| c.id == *id), "unknown layout id {id}");
|
||||
}
|
||||
let unique: std::collections::BTreeSet<_> = cmds.iter().map(|c| c.id).collect();
|
||||
assert_eq!(unique.len(), cmds.len());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn model_defaults_and_shared_commands_follow_the_map() {
|
||||
let specs = solidcraft_engine::command_specs();
|
||||
for (panel, expected) in [
|
||||
("SKETCH", vec!["sketch.create"]),
|
||||
("CREATE", vec!["solid.extrude", "solid.revolve", "solid.hole"]),
|
||||
("MODIFY", vec!["solid.fillet", "solid.chamfer", "solid.shell", "solid.press_pull"]),
|
||||
("ARRANGE", vec!["solid.move", "solid.mirror", "solid.pattern.rectangular"]),
|
||||
("CONSTRUCT", vec!["construct.plane.offset"]),
|
||||
] {
|
||||
let (cmds, n) = layout("MODEL", panel, &specs).unwrap();
|
||||
assert_eq!(cmds.iter().take(n).map(|c| c.id).collect::<Vec<_>>(), expected);
|
||||
}
|
||||
for (tab, panel, id) in [
|
||||
("MODEL", "CREATE", "plastic.boss"),
|
||||
("INSERT", "FILES", "component.insert_design"),
|
||||
("ASSEMBLE", "COMPONENTS", "component.insert_design"),
|
||||
("SHEET METAL", "CREATE", "sheet.convert"),
|
||||
("SKETCH", "REFERENCE", "canvas.insert"),
|
||||
] {
|
||||
assert!(layout(tab, panel, &specs).unwrap().0.iter().any(|c| c.id == id));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn contextual_tabs_follow_the_active_body_and_allow_other_tabs() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
assert_eq!(visible_tabs(&h.app), TABS);
|
||||
h.app.run("sketch.create", json!({"plane":"XY"})).unwrap();
|
||||
assert_eq!(h.app.ui.tab, "SKETCH");
|
||||
h.app.run("sketch.rectangle.two_point", json!({"p0":[0,0],"p1":[40,30]})).unwrap();
|
||||
h.app.run("sketch.finish", json!({})).unwrap();
|
||||
h.app.run("sheet.flange", json!({"name":"Sheet", "body_name":"Sheet"})).unwrap();
|
||||
assert_eq!(h.app.ui.tab, "SHEET METAL");
|
||||
assert!(visible_tabs(&h.app).contains(&"SHEET METAL"));
|
||||
let path = h.dir.join("sheet.solidcraft");
|
||||
h.app.run("file.save", json!({"path":path})).unwrap();
|
||||
h.app.ui.tab = "INSPECT".into();
|
||||
h.app.run("doc.open", json!({"path":path})).unwrap();
|
||||
assert_eq!(h.app.ui.tab, "SHEET METAL", "opening a document re-enters its sheet context");
|
||||
|
||||
h.app.ui.tab = "INSPECT".into();
|
||||
sync_context(&mut h.app);
|
||||
assert_eq!(h.app.ui.tab, "INSPECT");
|
||||
h.app.run("solid.box", json!({"body_name":"Solid", "operation":"new", "length":10, "width":10, "height":10})).unwrap();
|
||||
h.app.run("select.set", json!({"items":[{"type":"body","name":"Solid"}]})).unwrap();
|
||||
sync_context(&mut h.app);
|
||||
assert!(!visible_tabs(&h.app).contains(&"SHEET METAL"));
|
||||
h.app.run("select.set", json!({"items":[{"type":"body","name":"Sheet"}]})).unwrap();
|
||||
sync_context(&mut h.app);
|
||||
assert_eq!(h.app.ui.tab, "SHEET METAL");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn starts_palette_and_control_use_the_new_destinations() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
for (id, tab) in [("parameters.change", "MANAGE"), ("solid.box", "MODEL"), ("surface.patch", "SURFACE")] {
|
||||
h.step(&json!({"start":id})).unwrap();
|
||||
assert_eq!(h.app.ui.tab, tab, "{id}");
|
||||
h.step(&json!({"key":"Escape"})).unwrap();
|
||||
}
|
||||
h.step(&json!({"key":"S"})).unwrap();
|
||||
h.step(&json!({"text":"Change Parameters"})).unwrap();
|
||||
h.step(&json!({"key":"Enter"})).unwrap();
|
||||
assert_eq!(h.app.ui.tab, "MANAGE");
|
||||
h.step(&json!({"key":"Escape"})).unwrap();
|
||||
crate::palette::submit(&mut h.app, "parameters.change");
|
||||
assert_eq!(h.app.ui.tab, "MANAGE");
|
||||
h.frames(2);
|
||||
for tab in TABS {
|
||||
assert!(crate::scenario::handle_at(&format!("tab:{tab}")).is_some(), "{tab}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parameters_and_configurations_open_separately() {
|
||||
use serde_json::json;
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
let commands = ids("SOLID", "CONFIGURE");
|
||||
assert_eq!(&commands[..2], &["parameters.change", "config.table"]);
|
||||
assert!(commands.contains(&"config.configure"), "Configure remains available in the dropdown");
|
||||
h.step(&json!({"widget":"Parameters"})).unwrap();
|
||||
let specs = solidcraft_engine::command_specs();
|
||||
let (commands, _) = layout("MANAGE", "CONFIGURATIONS", &specs).unwrap();
|
||||
assert!(commands.iter().any(|c| c.id == "config.configure"));
|
||||
h.step(&json!({"click":{"handle":"tab:MANAGE"}})).unwrap();
|
||||
h.step(&json!({"click":{"handle":"button:parameters.change"}})).unwrap();
|
||||
assert!(h.app.params.is_some(), "the ordinary Parameters button opens the editor");
|
||||
assert!(h.app.dialog.is_none());
|
||||
assert!(h.widget("User Parameters").is_some());
|
||||
@@ -191,7 +695,7 @@ mod tests {
|
||||
assert!(values["parameters"].as_array().unwrap().iter().any(|p| p["name"] == "width" && p["value"] == 25.0));
|
||||
h.step(&json!({"click":{"handle":"params:close"}})).unwrap();
|
||||
assert!(h.app.params.is_none());
|
||||
h.step(&json!({"widget":"Configurations"})).unwrap();
|
||||
h.step(&json!({"click":{"handle":"button:config.table"}})).unwrap();
|
||||
assert!(h.app.params.is_none());
|
||||
assert!(matches!(
|
||||
h.app.dialog.as_ref().map(|d| &d.kind),
|
||||
@@ -201,24 +705,46 @@ mod tests {
|
||||
assert!(h.widget("Add Row").is_some());
|
||||
}
|
||||
|
||||
/// Layout: joints on every tab's ASSEMBLE panel, sheet metal and plastic tabs
|
||||
/// reach the shared solid commands, the plastic rules sit on SETUP.
|
||||
/// Shared assembly, sheet and plastic commands remain reachable in their ribbon sections.
|
||||
#[test]
|
||||
fn tabs_share_commands_in_fusion_order() {
|
||||
for tab in ["SOLID", "SHEET METAL", "PLASTIC"] {
|
||||
let a = ids(tab, "ASSEMBLE");
|
||||
assert_eq!(a.get(1).copied(), Some("joint.create"), "{tab}: {a:?}");
|
||||
assert!(a.contains(&"joint.drive") && a.contains(&"component.create"));
|
||||
fn ribbon_sections_keep_shared_commands_reachable() {
|
||||
let specs = solidcraft_engine::command_specs();
|
||||
let ids = |tab, panel| layout(tab, panel, &specs).unwrap().0.iter().map(|c| c.id).collect::<Vec<_>>();
|
||||
let joints = ids("ASSEMBLE", "JOINTS");
|
||||
assert_eq!(joints.first().copied(), Some("joint.create"));
|
||||
assert!(ids("ASSEMBLE", "MOTION").contains(&"joint.drive"));
|
||||
assert!(ids("ASSEMBLE", "COMPONENTS").contains(&"component.create"));
|
||||
let sheet = ids("SHEET METAL", "CREATE");
|
||||
assert_eq!(sheet.first().copied(), Some("sheet.flange"));
|
||||
assert!(ids("MODEL", "CREATE").contains(&"solid.extrude"));
|
||||
assert!(ids("SHEET METAL", "FLAT").contains(&"sheet.flat_pattern"));
|
||||
assert!(ids("SHEET METAL", "FLAT").contains(&"sheet.unfold"));
|
||||
assert!(ids("MANAGE", "RULES").contains(&"plastic.manage_rules"));
|
||||
let create = ids("MODEL", "CREATE");
|
||||
assert!(create.contains(&"plastic.boss") && create.contains(&"solid.rib") && create.contains(&"plastic.lip"));
|
||||
assert!(ids("MODEL", "MODIFY").contains(&"solid.shell"));
|
||||
assert_eq!(panels("MANAGE"), ["PARAMETERS", "CONFIGURATIONS", "MATERIALS", "RULES", "DESIGN"]);
|
||||
// The former sketch/solid INSPECT panels now share a global INSPECT tab.
|
||||
for (panel, commands) in [
|
||||
("CHECK", vec!["inspect.interference", "inspect.draft", "inspect.accessibility"]),
|
||||
("MEASURE", vec!["inspect.center_of_mass"]),
|
||||
(
|
||||
"SURFACE QUALITY",
|
||||
vec![
|
||||
"inspect.zebra",
|
||||
"inspect.curvature_map",
|
||||
"inspect.environment_map",
|
||||
"inspect.minimum_radius",
|
||||
"inspect.isocurve",
|
||||
"inspect.curvature_comb",
|
||||
],
|
||||
),
|
||||
] {
|
||||
let actual = ids("INSPECT", panel);
|
||||
for id in commands {
|
||||
assert!(actual.contains(&id), "{panel}: {id}");
|
||||
}
|
||||
}
|
||||
let c = ids("SHEET METAL", "CREATE");
|
||||
assert_eq!(c.get(1).copied(), Some("sheet.flange"));
|
||||
assert!(c.contains(&"solid.extrude") && c.contains(&"sheet.flat_pattern"));
|
||||
assert!(ids("SHEET METAL", "MODIFY").contains(&"sheet.unfold"));
|
||||
assert!(ids("PLASTIC", "SETUP").contains(&"plastic.manage_rules"));
|
||||
let p = ids("PLASTIC", "CREATE");
|
||||
assert!(p.contains(&"plastic.boss") && p.contains(&"solid.rib") && p.contains(&"plastic.lip"));
|
||||
assert!(ids("PLASTIC", "MODIFY").contains(&"solid.shell"));
|
||||
assert!(panels("PLASTIC").is_some_and(|p| p.first() == Some(&"SETUP")));
|
||||
}
|
||||
|
||||
/// #1240: a saved part reaches an assembly from the ASSEMBLE panel (and the File menu) as a
|
||||
@@ -226,10 +752,8 @@ mod tests {
|
||||
#[test]
|
||||
fn insert_design_is_on_the_assemble_panel_and_inserts_a_saved_part() {
|
||||
use serde_json::json;
|
||||
for tab in ["SOLID", "SHEET METAL", "PLASTIC"] {
|
||||
assert!(ids(tab, "ASSEMBLE").contains(&"component.insert_design"), "{tab}");
|
||||
}
|
||||
assert!(!ids("SOLID", "ASSEMBLE")[..3].contains(&"component.insert_design"), "Component, Joint and As-built Joint keep the big buttons");
|
||||
let specs = solidcraft_engine::command_specs();
|
||||
assert!(layout("ASSEMBLE", "COMPONENTS", &specs).unwrap().0.iter().any(|c| c.id == "component.insert_design"));
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
let part = h.dir.join("part1.solidcraft");
|
||||
let mut s = solidcraft_engine::Session::default();
|
||||
|
||||
@@ -5,7 +5,10 @@ use solidcraft_ui_egui::scenario::Harness;
|
||||
|
||||
fn open() -> Harness {
|
||||
let mut h = Harness::new();
|
||||
h.step(&json!({"widget":"Parameters"})).unwrap();
|
||||
// The Browser's Parameters row starts this command; the ribbon shows only the active tab, so no
|
||||
// Parameters button is on screen to click.
|
||||
h.call("ui.start", json!({"command":"parameters.change"}));
|
||||
h.frames(3);
|
||||
assert!(h.app.params.is_some());
|
||||
h
|
||||
}
|
||||
|
||||
@@ -13,7 +13,9 @@ fn arrows_move_user_parameters_up_and_down() {
|
||||
for (n, e) in [("a", "1 mm"), ("b", "2 mm"), ("c", "3 mm")] {
|
||||
h.app.session.execute("parameters.add", &json!({"name": n, "expression": e})).unwrap();
|
||||
}
|
||||
h.step(&json!({"widget":"Parameters"})).unwrap();
|
||||
// The Browser's Parameters row starts this command; the ribbon shows only the active tab.
|
||||
h.call("ui.start", json!({"command":"parameters.change"}));
|
||||
h.frames(3);
|
||||
assert!(h.app.params.is_some());
|
||||
h.frames(3);
|
||||
h.run(&json!([{"click":{"handle":"param:after:a"}}])).unwrap();
|
||||
|
||||
@@ -190,15 +190,12 @@ fn narrow_toolbar_reaches_collapsed_commands() {
|
||||
use serde_json::json;
|
||||
let mut h = Harness::new();
|
||||
h.run(&json!([
|
||||
// Too narrow for every button: the last panels collapse into their drop-down.
|
||||
// The compact ribbon still fits every button at 640 wide.
|
||||
{"call":"ui.resize","params":{"width":640,"height":800}},
|
||||
{"expect":{"shown_handles":["collapsed:SOLID:CONSTRUCT"],"hidden_handles":["button:construct.plane.offset"]}},
|
||||
{"click":{"handle":"collapsed:SOLID:CONSTRUCT"}},
|
||||
{"expect":{"shown_handles":["dropdown:construct.plane.offset"]}},
|
||||
{"key":"Escape"},
|
||||
// Narrower: they go into the » menu.
|
||||
{"call":"ui.resize","params":{"width":480,"height":800}},
|
||||
{"expect":{"shown_handles":["toolbar:overflow"],"hidden_handles":["collapsed:SOLID:CONSTRUCT"]}},
|
||||
{"expect":{"shown_handles":["button:construct.plane.offset"],"hidden_handles":["toolbar:overflow"]}},
|
||||
// Too narrow for every button: the panels go into the » menu.
|
||||
{"call":"ui.resize","params":{"width":440,"height":800}},
|
||||
{"expect":{"shown_handles":["toolbar:overflow"],"hidden_handles":["button:construct.plane.offset"]}},
|
||||
{"click":{"handle":"toolbar:overflow"}},
|
||||
{"widget":"CONSTRUCT"},
|
||||
{"expect":{"shown_handles":["toolbar:construct.plane.offset"]}},
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{"note":"Docked ribbon entry points keep the existing workspace menu, section menus, command search and Sketch exit usable after resizing."},
|
||||
{"expect":{"shown_handles":["ribbon:workspace","ribbon:search","ribbon:section:MODEL:CREATE","tab:MODEL"],"spans":{"inner":"ribbon:workspace","outer":"toolbar","axis":"y","tol":1}}},
|
||||
{"click":{"handle":"ribbon:workspace"}},
|
||||
{"call":"ui.menuPick","params":{"item":"ui.workspace.render"}},
|
||||
{"expect":{"shown_handles":["tab:RENDER","ribbon:search","ribbon:workspace"]}},
|
||||
{"click":{"handle":"ribbon:workspace"}},
|
||||
{"call":"ui.menuPick","params":{"item":"ui.workspace.design"}},
|
||||
{"click":{"handle":"ribbon:section:MODEL:CREATE"}},
|
||||
{"expect":{"shown_handles":["dropdown:solid.extrude"]}},
|
||||
{"key":"Escape"},
|
||||
{"call":"engine.execute","params":{"command":"sketch.create","params":{"plane":"XY"}}},
|
||||
{"call":"ui.resize","params":{"width":640,"height":800}},
|
||||
{"expect":{"shown_handles":["ribbon:search","button:sketch.finish","ribbon:section:SKETCH:FINISH SKETCH"]}},
|
||||
{"click":{"handle":"ribbon:search"}},
|
||||
{"text":"sketch.line"},
|
||||
{"key":"Enter"},
|
||||
{"expect":{"tool":"sketch.line","errors":0}},
|
||||
{"key":"Escape"},
|
||||
{"click":{"handle":"button:sketch.finish"}},
|
||||
{"expect":{"sketching":false,"errors":0}},
|
||||
{"call":"ui.resize","params":{"width":320,"height":800}},
|
||||
{"key":"S"},
|
||||
{"key":"Escape"},
|
||||
{"expect":{"errors":0,"shown_handles":["ribbon:search","ribbon:workspace"]}}
|
||||
]
|
||||
@@ -48,10 +48,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": [
|
||||
127,
|
||||
16
|
||||
]
|
||||
"click": {"handle": "appbar:file"}
|
||||
},
|
||||
{
|
||||
"widget": "Export STEP\u2026"
|
||||
@@ -75,10 +72,7 @@
|
||||
"choose_file": "Untitled.step"
|
||||
},
|
||||
{
|
||||
"click": [
|
||||
127,
|
||||
16
|
||||
]
|
||||
"click": {"handle": "appbar:file"}
|
||||
},
|
||||
{
|
||||
"widget": "Insert STEP\u2026"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"call": "ui.set",
|
||||
"params": {
|
||||
"tab": "PLASTIC"
|
||||
"tab": "MODEL"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -77,10 +77,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": [
|
||||
127,
|
||||
16
|
||||
]
|
||||
"click": {"handle": "appbar:file"}
|
||||
},
|
||||
{
|
||||
"widget": "Export STEP\u2026"
|
||||
@@ -95,10 +92,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": [
|
||||
127,
|
||||
16
|
||||
]
|
||||
"click": {"handle": "appbar:file"}
|
||||
},
|
||||
{
|
||||
"widget": "Save as mesh\u2026"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[
|
||||
{"click": [248, 17]},
|
||||
{"click": {"handle": "titlebar:home"}},
|
||||
{"expect": {"home": true}},
|
||||
{"call": "ui.home", "params": {"sample": 0}},
|
||||
{"until": {"home": false}},
|
||||
@@ -12,7 +12,7 @@
|
||||
{"key": "Enter"},
|
||||
{"widget": "Close window"},
|
||||
{"expect": {"param": {"width": 100}, "errors": 0}},
|
||||
{"key": "S", "cmd": true},
|
||||
{"click": {"handle": "titlebar:save"}},
|
||||
{"expect": {"file": "Sample Plate.solidcraft"}},
|
||||
{"key": "N", "cmd": true},
|
||||
{"expect": {"bodies": 0}},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"note": "Toolbar customizing like Fusion survives a restart: Pin to Toolbar, Remove from Toolbar, drag to reorder. Toolbar buttons publish handles `toolbar:<command id>`. The workspace switcher spans the toolbar's height."
|
||||
"note": "Toolbar customization survives a restart: Pin to Toolbar, Remove from Toolbar, drag to reorder. Toolbar buttons publish handles `toolbar:<command id>`. The workspace switcher spans the toolbar's height."
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
@@ -19,7 +19,7 @@
|
||||
"toolbar:solid.revolve"
|
||||
],
|
||||
"hidden_handles": [
|
||||
"toolbar:solid.shell"
|
||||
"toolbar:solid.draft"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -30,7 +30,7 @@
|
||||
"y": 80,
|
||||
"target": {
|
||||
"type": "toolbar_command",
|
||||
"id": "solid.shell"
|
||||
"id": "solid.draft"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -43,7 +43,7 @@
|
||||
{
|
||||
"expect": {
|
||||
"shown_handles": [
|
||||
"toolbar:solid.shell"
|
||||
"toolbar:solid.draft"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -74,7 +74,7 @@
|
||||
{
|
||||
"drag": [
|
||||
{
|
||||
"handle": "toolbar:solid.shell"
|
||||
"handle": "toolbar:solid.draft"
|
||||
},
|
||||
{
|
||||
"handle": "toolbar:solid.extrude"
|
||||
@@ -85,7 +85,7 @@
|
||||
{
|
||||
"expect": {
|
||||
"handle_order": [
|
||||
"toolbar:solid.shell",
|
||||
"toolbar:solid.draft",
|
||||
"toolbar:solid.extrude"
|
||||
]
|
||||
}
|
||||
@@ -96,7 +96,7 @@
|
||||
{
|
||||
"expect": {
|
||||
"shown_handles": [
|
||||
"toolbar:solid.shell"
|
||||
"toolbar:solid.draft"
|
||||
],
|
||||
"hidden_handles": [
|
||||
"toolbar:solid.revolve"
|
||||
@@ -106,7 +106,7 @@
|
||||
{
|
||||
"expect": {
|
||||
"handle_order": [
|
||||
"toolbar:solid.shell",
|
||||
"toolbar:solid.draft",
|
||||
"toolbar:solid.extrude"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
},
|
||||
{
|
||||
"click": {
|
||||
"handle": "panel:SOLID:CREATE"
|
||||
"handle": "panel:MODEL:CREATE"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -52,7 +52,7 @@
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
"shown_handles": ["dropdown_hot:sketch.create"]
|
||||
"shown_handles": ["dropdown_hot:solid.extrude"]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -60,8 +60,8 @@
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
"shown_handles": ["dropdown_hot:solid.extrude"],
|
||||
"hidden_handles": ["dropdown_hot:sketch.create"]
|
||||
"shown_handles": ["dropdown_hot:solid.revolve"],
|
||||
"hidden_handles": ["dropdown_hot:solid.extrude"]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": {"handle": "panel:SOLID:CREATE"}
|
||||
"click": {"handle": "panel:MODEL:CREATE"}
|
||||
},
|
||||
{
|
||||
"drag": [{"handle": "dropdown:solid.sphere"}, {"handle": "button:solid.extrude"}],
|
||||
@@ -41,7 +41,7 @@
|
||||
"note": "The pin icon on a hovered drop-down row pins the command."
|
||||
},
|
||||
{
|
||||
"click": {"handle": "panel:SOLID:CREATE"}
|
||||
"click": {"handle": "panel:MODEL:CREATE"}
|
||||
},
|
||||
{
|
||||
"move": {"handle": "dropdown:solid.torus"}
|
||||
@@ -74,7 +74,7 @@
|
||||
"note": "A button dragged back into its open drop-down leaves the toolbar."
|
||||
},
|
||||
{
|
||||
"click": {"handle": "panel:SOLID:CREATE"}
|
||||
"click": {"handle": "panel:MODEL:CREATE"}
|
||||
},
|
||||
{
|
||||
"drag": [{"handle": "button:solid.torus"}, {"handle": "dropdown:solid.box"}],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"note": "#323: every pinned command gets a toolbar button, with no fixed cap. Ten commands pinned to SOLID > CREATE all show as buttons at a wide window; at a narrower one the panel keeps the buttons that fit and its drop-down lists the rest (#2108), then it moves into the » menu, and none is dropped."
|
||||
"note": "#323: every pinned command gets a toolbar button, with no fixed cap. Ten commands pinned to MODEL > CREATE all show as buttons at a wide window; at a narrower one the panel keeps the buttons that fit and its drop-down lists the rest (#2108), then it moves into the » menu, and none is dropped."
|
||||
},
|
||||
{
|
||||
"call": "ui.resize",
|
||||
@@ -18,8 +18,8 @@
|
||||
"button:solid.torus",
|
||||
"button:solid.coil",
|
||||
"button:solid.loft",
|
||||
"button:solid.mirror",
|
||||
"button:solid.hole",
|
||||
"button:solid.rib",
|
||||
"button:solid.sweep",
|
||||
"button:solid.pipe",
|
||||
"button:solid.thread"
|
||||
]
|
||||
@@ -134,7 +134,7 @@
|
||||
"y": 60,
|
||||
"target": {
|
||||
"type": "toolbar_command",
|
||||
"id": "solid.mirror"
|
||||
"id": "solid.rib"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -151,7 +151,7 @@
|
||||
"y": 60,
|
||||
"target": {
|
||||
"type": "toolbar_command",
|
||||
"id": "solid.hole"
|
||||
"id": "solid.sweep"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -204,8 +204,8 @@
|
||||
"button:solid.torus",
|
||||
"button:solid.coil",
|
||||
"button:solid.loft",
|
||||
"button:solid.mirror",
|
||||
"button:solid.hole",
|
||||
"button:solid.rib",
|
||||
"button:solid.sweep",
|
||||
"button:solid.pipe",
|
||||
"button:solid.thread"
|
||||
],
|
||||
@@ -217,8 +217,8 @@
|
||||
"button:solid.torus",
|
||||
"button:solid.coil",
|
||||
"button:solid.loft",
|
||||
"button:solid.mirror",
|
||||
"button:solid.hole",
|
||||
"button:solid.rib",
|
||||
"button:solid.sweep",
|
||||
"button:solid.pipe",
|
||||
"button:solid.thread"
|
||||
],
|
||||
@@ -246,13 +246,13 @@
|
||||
],
|
||||
"shown_handles": [
|
||||
"button:solid.extrude",
|
||||
"panel:SOLID:CREATE"
|
||||
"panel:MODEL:CREATE"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": {
|
||||
"handle": "panel:SOLID:CREATE"
|
||||
"handle": "panel:MODEL:CREATE"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -264,8 +264,8 @@
|
||||
"dropdown:solid.torus",
|
||||
"dropdown:solid.coil",
|
||||
"dropdown:solid.loft",
|
||||
"dropdown:solid.mirror",
|
||||
"dropdown:solid.hole",
|
||||
"dropdown:solid.rib",
|
||||
"dropdown:solid.sweep",
|
||||
"dropdown:solid.pipe",
|
||||
"dropdown:solid.thread"
|
||||
]
|
||||
@@ -283,8 +283,8 @@
|
||||
"dropdown:solid.torus",
|
||||
"dropdown:solid.coil",
|
||||
"dropdown:solid.loft",
|
||||
"dropdown:solid.mirror",
|
||||
"dropdown:solid.hole",
|
||||
"dropdown:solid.rib",
|
||||
"dropdown:solid.sweep",
|
||||
"dropdown:solid.pipe",
|
||||
"dropdown:solid.thread"
|
||||
]
|
||||
@@ -303,16 +303,16 @@
|
||||
{
|
||||
"expect": {
|
||||
"hidden_handles": [
|
||||
"panel:SOLID:CREATE",
|
||||
"collapsed:SOLID:CREATE",
|
||||
"panel:MODEL:CREATE",
|
||||
"collapsed:MODEL:CREATE",
|
||||
"button:solid.box",
|
||||
"button:solid.cylinder",
|
||||
"button:solid.sphere",
|
||||
"button:solid.torus",
|
||||
"button:solid.coil",
|
||||
"button:solid.loft",
|
||||
"button:solid.mirror",
|
||||
"button:solid.hole",
|
||||
"button:solid.rib",
|
||||
"button:solid.sweep",
|
||||
"button:solid.pipe",
|
||||
"button:solid.thread"
|
||||
],
|
||||
@@ -338,8 +338,8 @@
|
||||
"toolbar:solid.torus",
|
||||
"toolbar:solid.coil",
|
||||
"toolbar:solid.loft",
|
||||
"toolbar:solid.mirror",
|
||||
"toolbar:solid.hole",
|
||||
"toolbar:solid.rib",
|
||||
"toolbar:solid.sweep",
|
||||
"toolbar:solid.pipe",
|
||||
"toolbar:solid.thread"
|
||||
]
|
||||
@@ -370,8 +370,8 @@
|
||||
"button:solid.torus",
|
||||
"button:solid.coil",
|
||||
"button:solid.loft",
|
||||
"button:solid.mirror",
|
||||
"button:solid.hole",
|
||||
"button:solid.rib",
|
||||
"button:solid.sweep",
|
||||
"button:solid.pipe",
|
||||
"button:solid.thread"
|
||||
],
|
||||
@@ -406,8 +406,8 @@
|
||||
"button:solid.torus",
|
||||
"button:solid.coil",
|
||||
"button:solid.loft",
|
||||
"button:solid.mirror",
|
||||
"button:solid.hole",
|
||||
"button:solid.rib",
|
||||
"button:solid.sweep",
|
||||
"button:solid.pipe",
|
||||
"button:solid.thread"
|
||||
],
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
[
|
||||
{"note":"#191: Point remains a default Sketch CREATE button alongside the drawing families."},
|
||||
{"note":"#191: Point is in the Sketch CREATE list; a saved pin can promote it alongside the four drawing families."},
|
||||
{"call":"engine.execute","params":{"command":"sketch.create","params":{"plane":"XY"}}},
|
||||
{"expect":{"shown_handles":["button:sketch.line","family:Rectangle","family:Circle","family:Arc","family:Slot","family:Polygon","family:Spline","button:sketch.point"]}},
|
||||
{"expect":{"shown_handles":["button:sketch.line","family:Rectangle","family:Circle","family:Arc"],"hidden_handles":["button:sketch.point"]}},
|
||||
{"call":"ui.menu","params":{"x":400,"y":80,"target":{"type":"toolbar_command","id":"sketch.point"}}},
|
||||
{"call":"ui.menuPick","params":{"item":"Pin to Toolbar"}},
|
||||
{"expect":{"shown_handles":["button:sketch.point"]}},
|
||||
{"click":{"handle":"button:sketch.point"}},
|
||||
{"expect":{"tool":"sketch.point","dialog":null}},
|
||||
{"click":{"sketch":[20,15]}},
|
||||
@@ -19,7 +22,7 @@
|
||||
{"key":"Escape"},
|
||||
{"call":"ui.menu","params":{"x":400,"y":80,"target":{"type":"toolbar"}}},
|
||||
{"call":"ui.menuPick","params":{"item":"Reset Toolbar"}},
|
||||
{"expect":{"shown_handles":["button:sketch.point","button:sketch.line"],"errors":0}},
|
||||
{"expect":{"shown_handles":["button:sketch.line"],"hidden_handles":["button:sketch.point"],"errors":0}},
|
||||
{"call":"ui.resize","params":{"width":640,"height":720}},
|
||||
{"click":{"handle":"panel:SKETCH:CREATE"}},
|
||||
{"click":{"handle":"dropdown:sketch.point"}},
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
[
|
||||
{"note":"#333: dropping a dropdown command on a panel label appends it; moving between labels keeps the chosen order after restart."},
|
||||
{"click":{"handle":"panel:SOLID:CREATE"}},
|
||||
{"drag":[{"handle":"dropdown:solid.cylinder"},{"handle":"panel:SOLID:CREATE"}],"steps":12},
|
||||
{"click":{"handle":"panel:MODEL:CREATE"}},
|
||||
{"drag":[{"handle":"dropdown:solid.cylinder"},{"handle":"panel:MODEL:CREATE"}],"steps":12},
|
||||
{"key":"Escape"},
|
||||
{"expect":{"handle_order":["button:solid.sweep","button:solid.cylinder"],"dialog":null,"tool":null,"errors":0}},
|
||||
{"click":{"handle":"panel:SOLID:CREATE"}},
|
||||
{"drag":[{"handle":"dropdown:solid.torus"},{"handle":"panel:SOLID:MODIFY"}],"steps":12},
|
||||
{"expect":{"handle_order":["button:solid.hole","button:solid.cylinder"],"dialog":null,"tool":null,"errors":0}},
|
||||
{"click":{"handle":"panel:MODEL:CREATE"}},
|
||||
{"drag":[{"handle":"dropdown:solid.torus"},{"handle":"panel:MODEL:MODIFY"}],"steps":12},
|
||||
{"key":"Escape"},
|
||||
{"expect":{"handle_order":["button:solid.scale","button:solid.torus"],"dialog":null,"tool":null,"errors":0}},
|
||||
{"drag":[{"handle":"button:solid.torus"},{"handle":"panel:SOLID:CREATE"}],"steps":12},
|
||||
{"expect":{"handle_order":["button:solid.press_pull","button:solid.torus"],"dialog":null,"tool":null,"errors":0}},
|
||||
{"drag":[{"handle":"button:solid.torus"},{"handle":"panel:MODEL:CREATE"}],"steps":12},
|
||||
{"expect":{"handle_order":["button:solid.cylinder","button:solid.torus"]}},
|
||||
{"restart":"close"},
|
||||
{"expect":{"handle_order":["button:solid.sweep","button:solid.cylinder","button:solid.torus"],"errors":0}},
|
||||
{"expect":{"handle_order":["button:solid.hole","button:solid.cylinder","button:solid.torus"],"errors":0}},
|
||||
{"call":"ui.resize","params":{"width":640,"height":720}},
|
||||
{"click":{"handle":"panel:SOLID:CREATE"}},
|
||||
{"drag":[{"handle":"dropdown:solid.box"},{"handle":"panel:SOLID:CREATE"}],"steps":12},
|
||||
{"click":{"handle":"panel:MODEL:CREATE"}},
|
||||
{"drag":[{"handle":"dropdown:solid.box"},{"handle":"panel:MODEL:CREATE"}],"steps":12},
|
||||
{"key":"Escape"},
|
||||
{"call":"ui.resize","params":{"width":1600,"height":1000}},
|
||||
{"expect":{"handle_order":["button:solid.torus","button:solid.box"],"tool":null,"dialog":null,"errors":0}}
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
{"click": {"plane": "XY"}},
|
||||
{"expect": {"dialog": null}},
|
||||
{"click": {"handle": "panel:SKETCH:CREATE"}},
|
||||
{"expect": {"shown_handles": ["toolbar:sketch.construction", "toolbar:sketch.centerline"]}},
|
||||
{"expect": {"shown_handles": ["toolbar:sketch.centerline"]}},
|
||||
{"key": "Escape"},
|
||||
{"click": {"handle": "panel:SKETCH:CONSTRAIN"}},
|
||||
{"expect": {"shown_handles": ["toolbar:sketch.construction"]}},
|
||||
{"click": [1000, 500]},
|
||||
{"start": "sketch.rectangle.two_point"},
|
||||
{"click": {"sketch": [0, 0]}},
|
||||
|
||||
@@ -64,3 +64,78 @@ fn other_windows_fit_on_screen() {
|
||||
}
|
||||
assert!(bad.is_empty(), "{}", bad.join("\n"));
|
||||
}
|
||||
|
||||
/// The docked ribbon reserves the same space in both themes and at narrow widths. The
|
||||
/// existing panel menus and S box remain usable through the new painted hit targets.
|
||||
#[test]
|
||||
fn docked_ribbon_geometry_and_search() {
|
||||
use solidcraft_ui_egui::{scenario::handle_at, toolbar};
|
||||
for theme in ["light", "dark"] {
|
||||
let mut h = harness();
|
||||
h.app.preferences.theme = theme.into();
|
||||
for width in [1600.0, 640.0, 320.0] {
|
||||
h.call("ui.resize", json!({"width":width,"height":1000}));
|
||||
h.frames(4);
|
||||
let ribbon = rect_of("toolbar").unwrap();
|
||||
let workspace = rect_of("ribbon:workspace").unwrap();
|
||||
let search = rect_of("ribbon:search").unwrap();
|
||||
assert_eq!(ribbon.top(), toolbar::APP_BAR_HEIGHT);
|
||||
assert_eq!(ribbon.height(), 117.0);
|
||||
assert_eq!(ribbon.width(), width);
|
||||
assert_eq!(workspace.width(), 88.0);
|
||||
assert_eq!(workspace.top(), ribbon.top());
|
||||
assert_eq!(workspace.bottom(), ribbon.bottom() - 1.0);
|
||||
assert_eq!(search.height(), 24.0);
|
||||
assert_eq!(search.width(), if width == 1600.0 { 188.0 } else { 24.0 });
|
||||
assert!(ribbon.contains_rect(search));
|
||||
assert!(search.left() > workspace.right());
|
||||
assert!(h.app.viewport.rect.unwrap().top() >= toolbar::APP_BAR_HEIGHT + toolbar::RIBBON_HEIGHT);
|
||||
h.step(&json!({"click":{"handle":"ribbon:search"}})).unwrap();
|
||||
assert!(h.app.ui.palette_open);
|
||||
let popup = rect_of("ribbon:search_popup").unwrap();
|
||||
assert!(popup.top() >= search.bottom());
|
||||
assert!(popup.left() <= search.left());
|
||||
h.step(&json!({"key":"Escape"})).unwrap();
|
||||
assert!(!h.app.ui.palette_open);
|
||||
h.step(&json!({"key":"S"})).unwrap();
|
||||
assert!(h.app.ui.palette_open);
|
||||
assert_eq!(rect_of("ribbon:search_popup").unwrap().min, popup.min);
|
||||
h.step(&json!({"key":"Escape"})).unwrap();
|
||||
}
|
||||
h.call("ui.resize", json!({"width":1600,"height":1000}));
|
||||
h.frames(4);
|
||||
let button = rect_of("button:solid.extrude").unwrap();
|
||||
assert_eq!(button.height(), 60.0);
|
||||
assert!(button.width() >= 54.0);
|
||||
let section = rect_of("ribbon:section:MODEL:CREATE").unwrap();
|
||||
assert_eq!(section.height(), 20.0);
|
||||
assert!(section.top() > button.bottom());
|
||||
assert_eq!(section.bottom(), rect_of("toolbar").unwrap().bottom() - 4.0);
|
||||
assert_eq!(handle_at("panel:MODEL:CREATE"), handle_at("ribbon:section:MODEL:CREATE"));
|
||||
h.step(&json!({"click":{"handle":"ribbon:section:MODEL:CREATE"}})).unwrap();
|
||||
assert!(rect_of("toolbar_dropdown").is_some());
|
||||
h.step(&json!({"key":"Escape"})).unwrap();
|
||||
h.step(&json!({"click":{"handle":"ribbon:workspace"}})).unwrap();
|
||||
assert!(h.app.viewport.context_menu.is_some());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn finish_sketch_stays_at_the_right_when_groups_collapse() {
|
||||
use solidcraft_ui_egui::scenario::handle_at;
|
||||
let mut h = Harness::new();
|
||||
h.call("engine.execute", json!({"command":"sketch.create","params":{"plane":"XY"}}));
|
||||
for width in [1600.0, 640.0, 320.0] {
|
||||
h.call("ui.resize", json!({"width":width,"height":1000}));
|
||||
h.frames(5);
|
||||
let ribbon = rect_of("toolbar").unwrap();
|
||||
let exit = rect_of("ribbon:section:SKETCH:FINISH SKETCH").unwrap();
|
||||
let finish = rect_of("button:sketch.finish").unwrap();
|
||||
assert_eq!(exit.right(), ribbon.right() - 3.0);
|
||||
assert!(ribbon.contains_rect(finish));
|
||||
assert!(finish.bottom() < exit.top());
|
||||
assert!(handle_at("tab:SKETCH").is_some(), "the selected contextual tab scrolls into view");
|
||||
}
|
||||
h.step(&json!({"click":{"handle":"button:sketch.finish"}})).unwrap();
|
||||
assert!(h.app.session.active_sketch.is_none());
|
||||
}
|
||||
+2
-2
@@ -16,13 +16,13 @@ Everything about it is on one page: **Preferences → AI**.
|
||||
- **Show AI features** (on by default) is the master switch. Turned off, SolidCraft shows nothing
|
||||
of it: no AI button, no shortcut, no menu entry, no panel, and nothing is looked for or
|
||||
started. The page stays, so you can turn it back on.
|
||||
- **Show button in toolbar** (on by default): the **AI** button at the right end of the toolbar
|
||||
- **Show Assistant button in application bar** (on by default): the **Assistant** icon in the application bar
|
||||
row, which stays there however wide the window is. Turn it off to keep only the shortcut and
|
||||
the menu entry.
|
||||
|
||||
With AI features on, the panel opens from:
|
||||
|
||||
- the **AI** button at the right end of the toolbar;
|
||||
- the **Assistant** icon in the application bar;
|
||||
- **Ctrl+Shift+A** (Cmd+Shift+A on a Mac), which also works from the chat's own text box;
|
||||
- **View settings** (the last button of the navigation bar under the view) → **Agent chat**.
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ cursor, replacing selected text and keeping what you typed, so typing `10 + ` an
|
||||
the expression or **Escape** to cancel the edit.
|
||||
Add and edit user parameters through the existing **Change Parameters** command.
|
||||
|
||||
In the SOLID toolbar's CONFIGURE panel, click **Parameters** to open the user and model
|
||||
parameter editor. The separate **Configurations** button opens the configuration table;
|
||||
In the MANAGE tab's PARAMETERS section, click **Parameters** to open the user and model
|
||||
parameter editor. The **Configurations** button in CONFIGURATIONS opens the configuration table;
|
||||
**Configure** remains in the dropdown for configuring columns.
|
||||
|
||||
Press **Enter** in the new parameter's name, expression or comment field to add it.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Plastic parts
|
||||
|
||||
The PLASTIC tab has a small enclosure subset:
|
||||
MODEL → CREATE lists the plastic enclosure features:
|
||||
|
||||
- **Boss** (`plastic.boss`): screw bosses with a hole, fillets and optional ribs.
|
||||
- **Lip / Groove** (`plastic.lip`): the mating lip and groove along a shell's opening.
|
||||
@@ -9,5 +9,5 @@ The PLASTIC tab has a small enclosure subset:
|
||||
- **Plastic Rules** (`plastic.manage_rules`, `plastic.assign_rule`): wall thickness, draft and
|
||||
clearance per material, used as the features' defaults.
|
||||
|
||||
Rib and web (on the SOLID tab) complete the set. These features are checked against
|
||||
Plastic Rules are in MANAGE → RULES. Rib and web in MODEL → CREATE complete the set. These features are checked against
|
||||
hand-computed geometry.
|
||||
@@ -1,6 +1,7 @@
|
||||
# Sheet metal
|
||||
|
||||
The SHEET METAL tab builds parts from a sheet of constant thickness under a **sheet metal rule**
|
||||
MODEL → MODIFY offers Convert to Sheet Metal. The contextual SHEET METAL tab appears
|
||||
when the active body is a sheet, and builds parts from a sheet of constant thickness under a **sheet metal rule**
|
||||
(thickness, bend radius, K-factor), set in **Sheet Metal Rules** (`sheet.manage_rules`).
|
||||
|
||||
- **Flange** (`sheet.flange`): a base flange from a sketch profile, a contour flange from an open
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
and one tab per open design (each with its own undo history, selection and camera; a dot marks
|
||||
unsaved changes). On the right: Report a bug, Help (?), Preferences (which hold the theme) and the
|
||||
window's buttons.
|
||||
- **Toolbar.** The workspace switcher (DESIGN) sits on the left. The tabs (SOLID, SURFACE,
|
||||
SHEET METAL, PLASTIC, UTILITIES, and SKETCH while you sketch) hold panels of commands. Click a
|
||||
- **Toolbar.** The workspace switcher (DESIGN) sits on the left. The tabs (MODEL, SURFACE,
|
||||
ASSEMBLE, INSERT, INSPECT, MANAGE and VIEW) hold sections of commands. SKETCH appears while
|
||||
editing a sketch; SHEET METAL appears for the active sheet body. Both select automatically
|
||||
when entered, and the other tabs remain available. Click a
|
||||
panel's name for all its commands. Drag a command from the dropdown onto a panel's label
|
||||
or empty space to append it; the insertion line shows its destination. Drop onto an existing
|
||||
button to insert before it. Buttons can also move between panels, and the layout is saved.
|
||||
|
||||
@@ -139,7 +139,7 @@ labels; `prefs:measure_axis_distances` identifies the checkbox.
|
||||
| `ui.sketchToScreen` | `points`: `[[x, y]…]` in active-sketch coordinates | their screen points (null when behind the camera) |
|
||||
| `ui.dialogInput` | `index` | what clicking an input's Select chip does: picks go to that input |
|
||||
| `ui.at` | `world: [x,y,z]` \| `sketch: [x,y]` \| `plane: "XY"` \| `axis: "Z"` \| `dimension: "d1"` (its value text) \| `handle: "arrow"` (a manipulator handle, see `scenario::publish_handle`) | the screen point (a scenario step's target; see `crates/ui-egui/src/scenario.rs`) |
|
||||
| `ui.handles` | `prefix?` | the handles drawn last frame, `[{name, x, y}]`: toolbar buttons and drop-down items `toolbar:<command id>` (the button alone: `button:<command id>`; a drop-down row: `dropdown:<command id>`, highlighted `dropdown_hot:<command id>`, its pin `dropdown_pin:<command id>`; Customize Toolbar's check boxes `customize:<command id>`), panel labels `panel:<tab>:<panel>`, browser rows `row:<label>` and fold arrows `fold:<label>`, manipulator handles; signed-axis tips `axis_view:z`, `axis_view:-y`; optional cube facets `navigation_cube:top`, `navigation_cube:top_front_right`, controls `navigation_cube:control:home` (and other actions), plus signed-axis aliases for visible cube faces; Preferences navigator picker `prefs:navigator`, options `prefs:navigator:Signed axes` and `prefs:navigator:Cube`; in the Motion Study dialog, where the chart puts its first and last step `motion:chart_start` and `motion:chart_end`, the Check collisions button `motion:check` and each collision found `motion:collision:<n>` |
|
||||
| `ui.handles` | `prefix?` | the handles drawn last frame, `[{name, x, y}]`: toolbar buttons and drop-down items `toolbar:<command id>` (the button alone: `button:<command id>`; a drop-down row: `dropdown:<command id>`, highlighted `dropdown_hot:<command id>`, its pin `dropdown_pin:<command id>`; Customize Toolbar's check boxes `customize:<command id>`), ribbon tabs `tab:<name>` (MODEL, SURFACE, ASSEMBLE, INSERT, INSPECT, MANAGE, VIEW; contextual SKETCH and SHEET METAL; workspace RENDER), panel labels `panel:<tab>:<panel>` (also `ribbon:section:<TAB>:<SECTION>`), workspace column `ribbon:workspace`, command-search launcher `ribbon:search`, browser rows `row:<label>` and fold arrows `fold:<label>`, manipulator handles; signed-axis tips `axis_view:z`, `axis_view:-y`; optional cube facets `navigation_cube:top`, `navigation_cube:top_front_right`, controls `navigation_cube:control:home` (and other actions), plus signed-axis aliases for visible cube faces; Preferences navigator picker `prefs:navigator`, options `prefs:navigator:Signed axes` and `prefs:navigator:Cube`; in the Motion Study dialog, where the chart puts its first and last step `motion:chart_start` and `motion:chart_end`, the Check collisions button `motion:check` and each collision found `motion:collision:<n>` |
|
||||
| `ui.editFeature` | `feature` (id or name) | what double-clicking a timeline item does: rolls back to it and opens its dialog filled in (sketches open in sketch mode) |
|
||||
| `ui.scroll` | `x`, `y`, `delta?` | wheel zoom at the cursor |
|
||||
| `ui.key` | `key` (egui key name, `Enter`, `Escape`…), `cmd?`, `shift?` | |
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
# Ribbon structure
|
||||
|
||||
The UI layout in `crates/ui-egui/src/workspace.rs` maps the original engine registry placements into ribbon sections. `docs/features.md` continues to document registry placements; command registrations and ids are unchanged.
|
||||
|
||||
Always shown, in order: MODEL, SURFACE, ASSEMBLE, INSERT, INSPECT, MANAGE, VIEW. SKETCH appears during sketch editing; SHEET METAL appears for the selected body (or the last body of the active component) when it has evaluated sheet-metal data. Entering a new context selects its tab; the other tabs remain available. RENDER belongs to the Render workspace.
|
||||
|
||||
**Bold command ids are default promoted buttons.** Every listed command remains in the section menu. Saved user pins can add buttons, as before.
|
||||
|
||||
| Tab | Section | Command ids, in menu order |
|
||||
|---|---|---|
|
||||
| MODEL | SKETCH | **`sketch.create`**, `sketch.edit`, `sketch.line3d`, `sketch.spline3d`, `sketch.point3d`, `sketch.move3d` |
|
||||
| MODEL | CREATE | **`solid.extrude`**, **`solid.revolve`**, **`solid.hole`**, `solid.sweep`, `solid.loft`, `solid.box`, `solid.cylinder`, `solid.sphere`, `solid.torus`, `solid.pipe`, `solid.bounding_solid`, `solid.thread`, `solid.boundary_fill`, `solid.coil`, `solid.rib`, `solid.web`, `solid.emboss`, `plastic.boss`, `plastic.lip`, `plastic.snap_fit`, `plastic.rest` |
|
||||
| MODEL | MODIFY | **`solid.fillet`**, **`solid.chamfer`**, **`solid.shell`**, **`solid.press_pull`**, `sheet.convert`, `solid.combine`, `solid.scale`, `solid.offset_face`, `solid.draft`, `solid.split_face`, `solid.split_body`, `solid.replace_face`, `solid.remove`, `timeline.delete`, `face.delete` |
|
||||
| MODEL | ARRANGE | **`solid.move`**, **`solid.mirror`**, **`solid.pattern.rectangular`**, `solid.align`, `solid.pattern.circular`, `solid.pattern.path` |
|
||||
| MODEL | CONSTRUCT | **`construct.plane.offset`**, `construct.plane.at_angle`, `construct.axis.through_cylinder`, `construct.axis.normal_to_face`, `construct.axis.two_planes`, `construct.axis.two_points`, `construct.axis.edge`, `construct.point.vertex`, `construct.point.two_edges`, `construct.point.three_planes`, `construct.point.center`, `construct.point.edge_plane`, `construct.point.along_path`, `construct.plane.midplane`, `construct.plane.two_edges`, `construct.plane.three_points`, `construct.plane.tangent`, `construct.plane.along_path`, `construct.plane.perpendicular` |
|
||||
| SURFACE | CREATE | **`surface.extrude`**, **`surface.revolve`**, **`surface.sweep`**, **`surface.loft`**, `surface.boundary`, `surface.patch`, `surface.offset`, `surface.ruled`, `surface.blend` |
|
||||
| SURFACE | EDIT | **`surface.trim`**, **`surface.untrim`**, **`surface.extend`**, **`surface.stitch`**, `surface.unstitch`, `surface.reverse_normal`, `surface.fair`, `surface.fillet`, `surface.match` |
|
||||
| SURFACE | CONVERT | **`surface.thicken`**, **`mesh.convert`** |
|
||||
| ASSEMBLE | COMPONENTS | **`component.create`**, **`component.from_bodies`**, **`component.insert_design`**, **`parts.library`** |
|
||||
| ASSEMBLE | JOINTS | **`joint.create`**, **`joint.as_built`**, **`joint.origin`**, **`joint.rigid_group`**, `joint.limits`, `joint.gear`, `joint.rack_pinion`, `joint.screw`, `joint.cam`, `joint.reach` |
|
||||
| ASSEMBLE | POSITION | **`occurrence.ground`**, **`component.capture_position`**, **`component.revert_position`** |
|
||||
| ASSEMBLE | MOTION | **`joint.drive`**, **`joint.motion_link`**, **`motion.study`**, **`motion.trace`**, `explode.create` |
|
||||
| ASSEMBLE | CONTACT | **`contact.enable_sets`**, **`contact.check`**, `contact.enable_all`, `contact.disable_all`, `contact.create`, `contact.edit`, `contact.list` |
|
||||
| INSERT | FILES | **`file.insert_step`**, **`file.insert_mesh`**, **`component.insert_design`**, `file.save_mesh` |
|
||||
| INSERT | IMAGES | **`canvas.insert`**, **`canvas.decal`**, **`canvas.edit`** |
|
||||
| INSERT | 2D | **`sketch.insert_dxf`**, **`sketch.insert_svg`** |
|
||||
| INSERT | LIBRARY | **`parts.fastener`**, **`parts.library`**, **`parts.resize`**, `parts.insert` |
|
||||
| INSERT | LINKS | **`component.update_links`**, **`component.break_link`** |
|
||||
| INSPECT | MEASURE | **`inspect.measure`**, **`inspect.center_of_mass`**, **`component.properties`** |
|
||||
| INSPECT | SECTION | **`inspect.section`** |
|
||||
| INSPECT | CHECK | **`inspect.interference`**, **`inspect.draft`**, **`inspect.accessibility`**, **`contact.check`**, `inspect.compare` |
|
||||
| INSPECT | SURFACE QUALITY | **`inspect.zebra`**, **`inspect.curvature_map`**, **`inspect.curvature_comb`**, **`inspect.isocurve`**, `inspect.minimum_radius`, `inspect.environment_map`, `inspect.continuity` |
|
||||
| INSPECT | HISTORY | **`timeline.dependents`**, **`document.inspect`** |
|
||||
| MANAGE | PARAMETERS | **`parameters.change`**, **`parameters.graph`**, `parameters.move`, `parameters.import`, `parameters.export` |
|
||||
| MANAGE | CONFIGURATIONS | **`config.table`**, **`config.configure`**, `config.rules`, `config.preview` |
|
||||
| MANAGE | MATERIALS | **`material.assign`**, **`appearance.assign`**, `material.properties.validate`, `library.inspect`, `library.export`, `library.apply` |
|
||||
| MANAGE | RULES | **`sheet.manage_rules`**, **`plastic.manage_rules`**, **`plastic.assign_rule`** |
|
||||
| MANAGE | DESIGN | **`document.units`**, **`timeline.compute_all`**, `edit.checkpoint`, `edit.restore_checkpoint` |
|
||||
| VIEW | VIEWS | **`view.apply`**, **`view.save`**, `view.rename`, `view.delete`, `view.list`, `view.navigate` |
|
||||
| VIEW | SELECT | Selection-filter controls (existing UI, no command ids) |
|
||||
| SKETCH | CREATE | **`sketch.line`**, **`sketch.rectangle.two_point`**, **`sketch.circle.center`**, **`sketch.arc.three_point`**, `sketch.infinite`, `sketch.rectangle.three_point`, `sketch.rectangle.rounded`, `sketch.rectangle.center`, `sketch.circle.two_point`, `sketch.circle.three_point`, `sketch.arc.center_point`, `sketch.polygon.inscribed`, `sketch.polygon.circumscribed`, `sketch.polygon.edge`, `sketch.slot.center_to_center`, `sketch.slot.overall`, `sketch.point`, `sketch.line.midpoint`, `sketch.arc.tangent`, `sketch.circle.two_tangent`, `sketch.circle.three_tangent`, `sketch.slot.center_point`, `sketch.slot.arc_three_point`, `sketch.slot.arc_center`, `sketch.ellipse`, `sketch.spline.fit_point`, `sketch.spline.control_point`, `sketch.spline.control_point_5`, `sketch.conic`, `sketch.centerline`, `sketch.text` |
|
||||
| SKETCH | MODIFY | **`sketch.trim`**, **`sketch.offset`**, **`sketch.fillet`**, `sketch.copy`, `sketch.cut`, `sketch.paste`, `sketch.blend_curve`, `sketch.chamfer.equal_distance`, `sketch.chamfer.distance_angle`, `sketch.chamfer.two_distance`, `sketch.extend`, `sketch.break`, `sketch.scale`, `sketch.move` |
|
||||
| SKETCH | PATTERN | **`sketch.mirror`**, **`sketch.pattern.circular`**, **`sketch.pattern.rectangular`** |
|
||||
| SKETCH | CONSTRAIN | **`sketch.dimension`**, **`sketch.constraint.horizontal_vertical`**, **`sketch.constraint.coincident`**, **`sketch.constraint.tangent`**, **`sketch.constraint.equal`**, **`sketch.constraint.parallel`**, **`sketch.constraint.perpendicular`**, `sketch.construction`, `sketch.constrainer`, `sketch.constraint.fix`, `sketch.constraint.midpoint`, `sketch.constraint.concentric`, `sketch.constraint.collinear`, `sketch.constraint.symmetry`, `sketch.constraint.curvature`, `sketch.constraint.polygon`, `sketch.auto_constrain`, `sketch.auto_constrain_from_datum` |
|
||||
| SKETCH | REFERENCE | **`sketch.project`**, `sketch.intersect`, `sketch.include_3d`, `sketch.project_to_surface`, `sketch.intersection_curve`, `sketch.spun_profile`, `sketch.isoparametric_curve`, `sketch.fit_curves_to_section`, `sketch.insert_dxf`, `sketch.insert_svg`, `canvas.insert` |
|
||||
| SKETCH | FINISH SKETCH | **`sketch.finish`**, `sketch.finish_auto_constrain` |
|
||||
| SHEET METAL | CREATE | **`sheet.flange`**, **`sheet.hem`**, **`sheet.fold`**, **`sheet.perforate`**, `sheet.convert` |
|
||||
| SHEET METAL | FLAT | **`sheet.unfold`**, **`sheet.refold`**, **`sheet.flat_pattern`** |
|
||||
| SHEET METAL | OUTPUT | **`sheet.export_dxf`**, **`sheet.export_bend_table`** |
|
||||
| SHEET METAL | RULES | **`sheet.manage_rules`** |
|
||||
| RENDER | SCENE | **`render.scene`** |
|
||||
| RENDER | IMAGE | **`render.start`** |
|
||||
|
||||
## Original placements to ribbon destinations
|
||||
|
||||
Explicit command-id lists override the default placement mapping. Shared commands appear in every section that lists them above. This table includes every command with an original toolbar placement.
|
||||
|
||||
| Original tab / panel | New tab / section | Command ids |
|
||||
|---|---|---|
|
||||
| MESH / MODIFY | INSERT / FILES | `file.save_mesh` |
|
||||
| PLASTIC / CREATE | MODEL / CREATE | `plastic.boss`, `plastic.lip`, `plastic.snap_fit`, `plastic.rest` |
|
||||
| PLASTIC / SETUP | MANAGE / RULES | `plastic.manage_rules`, `plastic.assign_rule` |
|
||||
| RENDER / IMAGE | RENDER / IMAGE | `render.start` |
|
||||
| RENDER / SCENE | RENDER / SCENE | `render.scene` |
|
||||
| SHEET METAL / CREATE | MODEL / MODIFY | `sheet.convert` |
|
||||
| SHEET METAL / CREATE | SHEET METAL / CREATE | `sheet.flange`, `sheet.perforate`, `sheet.hem`, `sheet.fold` |
|
||||
| SHEET METAL / CREATE | SHEET METAL / FLAT | `sheet.flat_pattern` |
|
||||
| SHEET METAL / MODIFY | MANAGE / RULES | `sheet.manage_rules` |
|
||||
| SHEET METAL / MODIFY | SHEET METAL / FLAT | `sheet.unfold`, `sheet.refold` |
|
||||
| SKETCH / CONSTRAINTS | SKETCH / CONSTRAIN | `sketch.constraint.horizontal_vertical`, `sketch.constraint.coincident`, `sketch.constraint.tangent`, `sketch.constraint.equal`, `sketch.constraint.parallel`, `sketch.constraint.perpendicular`, `sketch.constraint.fix`, `sketch.constraint.midpoint`, `sketch.constraint.concentric`, `sketch.constraint.collinear`, `sketch.constraint.symmetry`, `sketch.constraint.curvature`, `sketch.constraint.polygon`, `sketch.auto_constrain`, `sketch.auto_constrain_from_datum` |
|
||||
| SKETCH / CREATE | SKETCH / CONSTRAIN | `sketch.dimension`, `sketch.construction`, `sketch.constrainer` |
|
||||
| SKETCH / CREATE | SKETCH / CREATE | `sketch.line`, `sketch.rectangle.two_point`, `sketch.rectangle.three_point`, `sketch.rectangle.rounded`, `sketch.rectangle.center`, `sketch.circle.center`, `sketch.circle.two_point`, `sketch.circle.three_point`, `sketch.arc.three_point`, `sketch.arc.center_point`, `sketch.polygon.inscribed`, `sketch.polygon.circumscribed`, `sketch.polygon.edge`, `sketch.slot.center_to_center`, `sketch.slot.overall`, `sketch.point`, `sketch.line.midpoint`, `sketch.arc.tangent`, `sketch.circle.two_tangent`, `sketch.circle.three_tangent`, `sketch.slot.center_point`, `sketch.slot.arc_three_point`, `sketch.slot.arc_center`, `sketch.ellipse`, `sketch.spline.fit_point`, `sketch.spline.control_point`, `sketch.spline.control_point_5`, `sketch.conic`, `sketch.centerline`, `sketch.text` |
|
||||
| SKETCH / CREATE | SKETCH / REFERENCE | `sketch.project`, `sketch.intersect`, `sketch.include_3d`, `sketch.project_to_surface`, `sketch.intersection_curve`, `sketch.spun_profile`, `sketch.isoparametric_curve`, `sketch.fit_curves_to_section` |
|
||||
| SKETCH / FINISH SKETCH | SKETCH / FINISH SKETCH | `sketch.finish`, `sketch.finish_auto_constrain` |
|
||||
| SKETCH / INSERT | INSERT / 2D | `sketch.insert_dxf`, `sketch.insert_svg` |
|
||||
| SKETCH / INSERT | INSERT / IMAGES | `canvas.insert`, `canvas.decal`, `canvas.edit` |
|
||||
| SKETCH / INSPECT | INSPECT / CHECK | `inspect.draft`, `inspect.accessibility` |
|
||||
| SKETCH / INSPECT | INSPECT / MEASURE | `inspect.center_of_mass` |
|
||||
| SKETCH / INSPECT | INSPECT / SURFACE QUALITY | `inspect.curvature_comb`, `inspect.minimum_radius`, `inspect.isocurve`, `inspect.zebra`, `inspect.environment_map`, `inspect.curvature_map` |
|
||||
| SKETCH / MODIFY | SKETCH / MODIFY | `sketch.blend_curve`, `sketch.fillet`, `sketch.chamfer.equal_distance`, `sketch.chamfer.distance_angle`, `sketch.chamfer.two_distance`, `sketch.offset`, `sketch.trim`, `sketch.extend`, `sketch.break`, `sketch.scale`, `sketch.move` |
|
||||
| SKETCH / PATTERN | SKETCH / PATTERN | `sketch.mirror`, `sketch.pattern.circular`, `sketch.pattern.rectangular` |
|
||||
| SOLID / ASSEMBLE | ASSEMBLE / COMPONENTS | `component.create`, `component.insert_design` |
|
||||
| SOLID / ASSEMBLE | ASSEMBLE / CONTACT | `contact.enable_sets`, `contact.enable_all`, `contact.disable_all`, `contact.create` |
|
||||
| SOLID / ASSEMBLE | ASSEMBLE / JOINTS | `joint.create`, `joint.as_built`, `joint.rigid_group`, `joint.gear`, `joint.rack_pinion`, `joint.screw`, `joint.cam` |
|
||||
| SOLID / ASSEMBLE | ASSEMBLE / MOTION | `joint.drive`, `joint.motion_link`, `explode.create`, `motion.study`, `motion.trace` |
|
||||
| SOLID / CONFIGURE | MANAGE / CONFIGURATIONS | `config.configure`, `config.table` |
|
||||
| SOLID / CONSTRUCT | MODEL / CONSTRUCT | `construct.plane.offset`, `construct.plane.at_angle`, `construct.axis.through_cylinder`, `construct.axis.normal_to_face`, `construct.axis.two_planes`, `construct.axis.two_points`, `construct.axis.edge`, `construct.point.vertex`, `construct.point.two_edges`, `construct.point.three_planes`, `construct.point.center`, `construct.point.edge_plane`, `construct.point.along_path`, `construct.plane.midplane`, `construct.plane.two_edges`, `construct.plane.three_points`, `construct.plane.tangent`, `construct.plane.along_path`, `construct.plane.perpendicular` |
|
||||
| SOLID / CREATE | ASSEMBLE / JOINTS | `joint.origin` |
|
||||
| SOLID / CREATE | MODEL / ARRANGE | `solid.pattern.rectangular`, `solid.pattern.circular`, `solid.pattern.path`, `solid.mirror` |
|
||||
| SOLID / CREATE | MODEL / CREATE | `solid.extrude`, `solid.revolve`, `solid.sweep`, `solid.loft`, `solid.box`, `solid.cylinder`, `solid.sphere`, `solid.torus`, `solid.hole`, `solid.pipe`, `solid.bounding_solid`, `solid.thread`, `solid.boundary_fill`, `solid.coil`, `solid.rib`, `solid.web`, `solid.emboss` |
|
||||
| SOLID / CREATE | MODEL / SKETCH | `sketch.create` |
|
||||
| SOLID / INSERT | INSERT / FILES | `file.insert_step`, `file.insert_mesh` |
|
||||
| SOLID / INSERT | INSERT / LIBRARY | `parts.fastener` |
|
||||
| SOLID / INSPECT | INSPECT / CHECK | `inspect.interference` |
|
||||
| SOLID / INSPECT | INSPECT / MEASURE | `inspect.measure` |
|
||||
| SOLID / INSPECT | INSPECT / SECTION | `inspect.section` |
|
||||
| SOLID / MODIFY | MANAGE / DESIGN | `timeline.compute_all` |
|
||||
| SOLID / MODIFY | MANAGE / MATERIALS | `appearance.assign`, `material.assign` |
|
||||
| SOLID / MODIFY | MANAGE / PARAMETERS | `parameters.change` |
|
||||
| SOLID / MODIFY | MODEL / ARRANGE | `solid.move`, `solid.align` |
|
||||
| SOLID / MODIFY | MODEL / MODIFY | `solid.fillet`, `solid.chamfer`, `solid.combine`, `solid.scale`, `solid.offset_face`, `solid.shell`, `solid.draft`, `solid.split_face`, `solid.split_body`, `solid.press_pull`, `solid.replace_face`, `solid.remove`, `timeline.delete`, `face.delete` |
|
||||
| SOLID / POSITION | ASSEMBLE / POSITION | `component.capture_position`, `component.revert_position` |
|
||||
| SURFACE / CREATE | SURFACE / CONVERT | `surface.thicken` |
|
||||
| SURFACE / CREATE | SURFACE / CREATE | `surface.boundary`, `surface.patch`, `surface.extrude`, `surface.revolve`, `surface.sweep`, `surface.loft`, `surface.offset`, `surface.ruled`, `surface.blend` |
|
||||
| SURFACE / INSPECT | INSPECT / SURFACE QUALITY | `inspect.continuity` |
|
||||
| SURFACE / MODIFY | SURFACE / EDIT | `surface.stitch`, `surface.extend`, `surface.trim`, `surface.untrim`, `surface.unstitch`, `surface.reverse_normal`, `surface.fair`, `surface.fillet`, `surface.match` |
|
||||
|
||||
## Placement decisions and missing commands
|
||||
|
||||
- Save As Mesh (`file.save_mesh`), previously MESH / MODIFY, is in INSERT / FILES. The existing File menu continues to offer it.
|
||||
- The selection filter, previously in SELECT on multiple tabs including UTILITIES, is in VIEW / SELECT. This is a populated control group, although it has no command ids.
|
||||
- MODEL’s Pattern button uses the existing `solid.pattern.rectangular` command; Circular and Path stay in its menu. No generic pattern command is registered.
|
||||
- There is no separate New 3D Sketch command. MODEL / SKETCH lists the existing 3D line, spline, point and move-point commands. Infinite Line (`sketch.infinite`) is in SKETCH / CREATE.
|
||||
- Physical Properties maps to the existing `component.properties` command. Material data checks map to `material.properties.validate`. Calibrate maps to the existing canvas editor (`canvas.edit`).
|
||||
- VIEW / VIEWS lists the existing named-view and navigation commands. Display, Show, Agent and Window are omitted: their requested settings have no engine commands. No Fit or Orientation commands were invented.
|
||||
- RENDER / IMAGE exposes the already registered `render.start`, which previously had no visible panel. The Render workspace and its existing SCENE command are preserved.
|
||||
- Constrain is the gallery exception to the four-promoted-button cap: the large Dimension button is followed by a 3 × 2 icon-only constraint gallery (Horizontal/Vertical, Coincident, Tangent; Equal, Parallel, Perpendicular). Every command remains in the section list and saved pins still apply.
|
||||
|
||||
## Saved customizations
|
||||
|
||||
Legacy toolbar preferences are plain maps keyed by `DESIGN/<tab>/<panel>`. On load, known keys migrate using the same command destinations. Previously promoted buttons absent from a saved list remain removed. Merging panels retains saved order within each source; sources merge in sorted-key order, and duplicates are removed. New promoted defaults are retained unless an old saved removal applies. Unknown keys and unknown command ids are preserved. An existing new destination takes precedence over a legacy destination.
|
||||
|
||||
Preferences and shortcut exports now wrap the map as `{"version":2,"panels":{...}}`. The version prevents repeated migration of unchanged SKETCH, SURFACE and SHEET METAL keys. Legacy imports still migrate. Reset restores the new defaults.
|
||||
|
||||
Additional old panels used for shared layouts migrate as follows: SELECT on any old tab → VIEW / SELECT; ASSEMBLE → ASSEMBLE / JOINTS; CONSTRUCT → MODEL / CONSTRUCT; INSPECT → INSPECT / CHECK; INSERT → INSERT / FILES; PLASTIC / MODIFY → MODEL / MODIFY; MESH / CREATE or PREPARE → SURFACE / CONVERT; UTILITIES / MAKE, ADD-INS or UTILITY → MANAGE / DESIGN. Command-id destinations override these panel defaults.
|
||||
|
||||
## Automation handles
|
||||
|
||||
The tab handle form stays `tab:<UPPERCASE NAME>`. Added: `tab:MODEL`, `tab:ASSEMBLE`, `tab:INSERT`, `tab:INSPECT`, `tab:MANAGE`, `tab:VIEW`. SURFACE and RENDER retain their names; SKETCH and SHEET METAL are available only in context. Legacy aliases remain: `tab:SOLID` and `tab:PLASTIC` → MODEL; `tab:MESH` → SURFACE; `tab:UTILITIES` → MANAGE. The Home and document-tab handles are unchanged.
|
||||
|
||||
Section labels retain `panel:<tab>:<section>` and collapsed sections retain `collapsed:<tab>:<section>`, with destinations from the tables above. In particular, `panel:SOLID:CREATE` becomes `panel:MODEL:CREATE`, selection-filter panels become `panel:VIEW:SELECT`, and `panel:SKETCH:CONSTRAINTS` becomes `panel:SKETCH:CONSTRAIN`. Command button and menu handles keep their command ids.
|
||||
|
||||
## Docked ribbon painting
|
||||
|
||||
The ribbon is a full-width surface immediately below the 34 px application bar, with no outer gap or rounding. `toolbar::{TAB_ROW_HEIGHT,GROUP_HEIGHT,RIBBON_HEIGHT}` reserve 30 + 86 + 1 px; browser and viewport placement follows the panel allocation. The workspace column is 88 px wide. Promoted buttons are 54 × 60 px with 3 px gaps (Sketch Create retains wider family selectors). Section labels occupy a 20 px row, inset 3 px, and retain the existing command lists, pin actions and drag targets.
|
||||
|
||||
Tab labels use normal word casing. Selected standard tabs use their soft accent; contextual tabs use their solid accent and add a row-wide line when selected. The existing `TabAccent` helper supplies all selection colours. Search is a 188 × 24 px launcher for the S box, using the existing `zoom` magnifier; it shrinks to 24 px before the tabs scroll horizontally. The selected tab scrolls into view after a context change or resize. Clicking Search or pressing S anchors the existing search popup below the field. The bottom command line remains available.
|
||||
|
||||
Sketch's Finish group reserves space at the far right even when other groups collapse. Its unfilled Finish Sketch button uses the existing `finish` icon. The chevron-free Exit row still opens the existing command list, preserving Finish with Auto-Constrain and saved pin customizations.
|
||||
|
||||
Additional handles: `ribbon:workspace`, `ribbon:search`, and `ribbon:section:<TAB>:<SECTION>`. Existing workspace, tab, panel, collapsed, family and command handles remain available. Layout evidence also publishes rectangles for these handles, `button:<command id>`, and the open `ribbon:search_popup`.
|
||||
|
||||
## Workspace and section lists
|
||||
|
||||
The workspace popup is 470 px wide, anchored below the workspace column. Design and Render keep their existing menu actions and enablement; planned workspaces cannot be selected. Each row also publishes `workspace:menu:<design|render|animation|simulation|manufacture|drawing>`. The constraint cells publish `ribbon:constraint:<command id>` alongside their existing `button:` and `toolbar:` handles. No icon assets or command ids were added.
|
||||
|
||||
Section lists use 30 px command rows, 20 px semantic icons, monospace shortcuts, hover pins and a pinning footer. `workspace::groups` optionally supplies headings and command order. MODEL / MODIFY uses EDGES, FACES, BODIES and SPECIALISE; unlisted commands follow the final heading in their original order. This ordering does not change promoted buttons or saved pins.
|
||||
|
||||
Ribbon tooltips show the full command name in bold and its registered shortcut in a key cap. Existing Render catalog descriptions are reused; commands without prose descriptions show the header alone (and their existing disabled reason when applicable). Registry parameter syntax is not presented as a description.
|
||||
Reference in new issue
Block a user