mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-10 18:55:14 +00:00
Compare commits
7 Commits
main
...
remove-view-cube
| Author | SHA1 | Date | |
|---|---|---|---|
| f39a35a090 | |||
| f2bed78bbb | |||
| 40b1815d34 | |||
| 96526c6f3a | |||
| 3ba860af7a | |||
| 443af2e92a | |||
| 3cbca9c470 |
@@ -706,8 +706,6 @@ Original SolidCraft drawings, Open for owner review; no runtime assignments.
|
||||
| docs/design/preferences/figures/mouse-mapping.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
|
||||
| docs/design/preferences/figures/navigator-axes.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
|
||||
| docs/design/preferences/figures/navigator-axes.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
|
||||
| docs/design/preferences/figures/navigator-cube.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
|
||||
| docs/design/preferences/figures/navigator-cube.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
|
||||
| docs/design/preferences/figures/orbit-centre.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
|
||||
| docs/design/preferences/figures/orbit-centre.light.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
|
||||
| docs/design/preferences/figures/orbit-cursor.dark.svg | SolidCraft contributors | original SolidCraft artwork drawn for the Preferences redesign (tracker #9863), extracted from the design board as a standalone SVG | MIT OR Apache-2.0 |
|
||||
|
||||
@@ -1631,7 +1631,7 @@ mod prefs_writer_tests {
|
||||
let now = Instant::now();
|
||||
assert_eq!(writer.store(&mut disk, app.prefs(), now), None);
|
||||
assert_eq!(disk.flushes, 0, "the settings read at start are not written again");
|
||||
app.preferences.navigator_style = NavigatorStyle::Cube;
|
||||
app.preferences.navigator_style = NavigatorStyle::Custom;
|
||||
app.preferences.display_quality = "fine".into();
|
||||
assert!(writer.due(true, now), "a frame with input is checked");
|
||||
assert_eq!(writer.store(&mut disk, app.prefs(), now), None);
|
||||
@@ -1643,7 +1643,7 @@ mod prefs_writer_tests {
|
||||
let mut next = new_app();
|
||||
let stored = solidcraft_ui_egui::prefs::stored(|k| disk.flushed.get(k).cloned()).expect("settings on disk");
|
||||
next.load_prefs(&stored);
|
||||
assert_eq!(next.preferences.navigator_style, NavigatorStyle::Cube);
|
||||
assert_eq!(next.preferences.navigator_style, NavigatorStyle::Custom);
|
||||
assert_eq!(next.preferences.display_quality, "fine");
|
||||
assert!(disk.flushed.contains_key(STORAGE_KEY));
|
||||
}
|
||||
|
||||
@@ -1,135 +1,12 @@
|
||||
//! Navigation drawing definitions. Camera projection and picking remain in the UI widgets.
|
||||
use egui::{Color32, FontId, Pos2, Rect, Shape, Stroke, pos2, vec2};
|
||||
use solidcore_record::Vec3;
|
||||
use solidcraft_engine::geom::Ring;
|
||||
use egui::{Pos2, Shape, Stroke, pos2, vec2};
|
||||
use solidcraft_theme::Tokens;
|
||||
pub(crate) struct Facet {
|
||||
pub(crate) direction: Vec3,
|
||||
pub(crate) points: Ring<Pos2>,
|
||||
pub(crate) outer_edges: Vec<bool>,
|
||||
pub(crate) centre: Pos2,
|
||||
pub(crate) label: String,
|
||||
pub(crate) text_axes: Option<(egui::Vec2, egui::Vec2)>,
|
||||
pub(crate) depth: f64,
|
||||
}
|
||||
// Private marker for label meshes with atlas-pixel UVs. The output hook replaces
|
||||
// it with the font texture before any renderer sees the frame.
|
||||
pub(crate) const LABEL_PIXELS: egui::TextureId = egui::TextureId::User(u64::from_le_bytes(*b"cubetext"));
|
||||
|
||||
struct LabelAtlas;
|
||||
|
||||
impl egui::plugin::Plugin for LabelAtlas {
|
||||
fn debug_name(&self) -> &'static str {
|
||||
"navigation cube label atlas"
|
||||
}
|
||||
|
||||
fn output_hook(&mut self, ctx: &egui::Context, output: &mut egui::FullOutput) {
|
||||
let size = ctx.fonts(|f| f.font_image_size());
|
||||
let normalize = vec2(1.0 / size[0].max(1) as f32, 1.0 / size[1].max(1) as f32);
|
||||
for shape in &mut output.shapes {
|
||||
if let Shape::Mesh(mesh) = &mut shape.shape
|
||||
&& mesh.texture_id == LABEL_PIXELS
|
||||
{
|
||||
let mesh = std::sync::Arc::make_mut(mesh);
|
||||
mesh.texture_id = egui::TextureId::default();
|
||||
for v in &mut mesh.vertices {
|
||||
v.uv = (v.uv.to_vec2() * normalize).to_pos2();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Warp the font mesh into the projected face, so labels turn with the model.
|
||||
pub(crate) fn face_text(painter: &egui::Painter, face: &Facet, ink: Color32, font_size: f32) {
|
||||
let Some((r, down)) = face.text_axes else { return };
|
||||
let opacity = ((face.depth - 0.18) / 0.17).clamp(0.0, 1.0) as f32;
|
||||
if opacity <= 0.0 {
|
||||
return;
|
||||
}
|
||||
let ink = ink.gamma_multiply(opacity);
|
||||
let galley = painter.layout_no_wrap(face.label.clone(), FontId::proportional(font_size), ink);
|
||||
let centre = galley.rect.center();
|
||||
// Keep atlas-pixel UVs until the frame is complete: another label or widget
|
||||
// can grow the atlas after this mesh is created, invalidating early UVs.
|
||||
painter.ctx().add_plugin(LabelAtlas);
|
||||
let text = Shape::Text(egui::epaint::TextShape::new(Pos2::ZERO, galley, ink));
|
||||
let atlas = painter.ctx().fonts(|f| f.font_image_size());
|
||||
let primitives = painter.ctx().tessellate(vec![egui::epaint::ClippedShape::new(Rect::EVERYTHING, text)], painter.ctx().pixels_per_point());
|
||||
for primitive in primitives {
|
||||
if let egui::epaint::Primitive::Mesh(mut mesh) = primitive.primitive {
|
||||
mesh.texture_id = LABEL_PIXELS;
|
||||
for v in &mut mesh.vertices {
|
||||
v.uv = pos2(v.uv.x * atlas[0] as f32, v.uv.y * atlas[1] as f32);
|
||||
let local = v.pos - centre;
|
||||
v.pos = face.centre + r * local.x + down * (local.y * 1.35);
|
||||
}
|
||||
painter.add(Shape::mesh(mesh));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn paint_cube(painter: &egui::Painter, faces: &[Facet], hovered: Option<usize>, t: Tokens, labels: bool, scale: f32) {
|
||||
// A shared, opaque triangle mesh has no antialiasing fringes between facets.
|
||||
// Per-polygon fringes and miter joins overlap as a face becomes edge-on.
|
||||
let mut fill_mesh = egui::epaint::Mesh::default();
|
||||
let mut edges: Vec<(Pos2, Pos2, usize, bool)> = Vec::new();
|
||||
let hovered_direction = hovered.and_then(|i| faces.get(i)).map(|f| f.direction);
|
||||
for face in faces {
|
||||
let base = t.cube_face;
|
||||
let shade = (0.72 + 0.28 * face.depth.min(1.0)) as f32;
|
||||
let highlighted = hovered_direction == Some(face.direction);
|
||||
let fill = if highlighted {
|
||||
t.cube_hover
|
||||
} else {
|
||||
Color32::from_rgb((f32::from(base.r()) * shade) as u8, (f32::from(base.g()) * shade) as u8, (f32::from(base.b()) * shade) as u8)
|
||||
};
|
||||
let centre = fill_mesh.vertices.len() as u32;
|
||||
fill_mesh.colored_vertex(face.centre, fill);
|
||||
for &p in &face.points {
|
||||
fill_mesh.colored_vertex(p, fill);
|
||||
}
|
||||
for (j, (&a, &b)) in face.points.edges().enumerate() {
|
||||
fill_mesh.add_triangle(centre, centre + 1 + j as u32, centre + 1 + ((j + 1) % face.points.len()) as u32);
|
||||
// Coplanar picking regions have no visible seams. Only actual cube
|
||||
// edges and the hovered target's boundary receive an outline.
|
||||
let outer = face.outer_edges.get(j).copied().unwrap_or(false);
|
||||
if !highlighted && !outer {
|
||||
continue;
|
||||
}
|
||||
if let Some(edge) = edges
|
||||
.iter_mut()
|
||||
.find(|(p, q, _, _)| (p.distance_sq(a) < 1e-6 && q.distance_sq(b) < 1e-6) || (p.distance_sq(b) < 1e-6 && q.distance_sq(a) < 1e-6))
|
||||
{
|
||||
edge.2 += usize::from(highlighted);
|
||||
edge.3 |= outer;
|
||||
} else {
|
||||
edges.push((a, b, usize::from(highlighted), outer));
|
||||
}
|
||||
}
|
||||
}
|
||||
painter.add(Shape::mesh(fill_mesh));
|
||||
for (a, b, highlights, outer) in edges {
|
||||
// Two highlighted coplanar patches share an internal subdivision, not
|
||||
// a target boundary. Actual cube edges remain visible across faces.
|
||||
if !outer && highlights != 1 {
|
||||
continue;
|
||||
}
|
||||
let highlighted = highlights > 0;
|
||||
painter.line_segment([a, b], Stroke::new(1.0, if highlighted { t.accent } else { t.cube_border }));
|
||||
}
|
||||
if labels {
|
||||
for face in faces {
|
||||
face_text(painter, face, t.cube_text, t.font_heading * scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
pub(crate) fn arrow(painter: &egui::Painter, at: Pos2, direction: egui::Vec2, hover: bool, t: Tokens) {
|
||||
let side = vec2(-direction.y, direction.x);
|
||||
painter.add(Shape::convex_polygon(
|
||||
vec![at + direction * 7.0, at - direction * 5.0 + side * 7.0, at - direction * 5.0 - side * 7.0],
|
||||
if hover { t.accent_soft } else { t.cube_face },
|
||||
Stroke::new(1.0, if hover { t.accent } else { t.cube_border }),
|
||||
if hover { t.accent_soft } else { t.navigator_face },
|
||||
Stroke::new(1.0, if hover { t.accent } else { t.navigator_border }),
|
||||
));
|
||||
}
|
||||
pub(crate) fn curved_arrow(painter: &egui::Painter, at: Pos2, clockwise: bool, hover: bool, t: Tokens, scale: f32) {
|
||||
@@ -141,8 +18,8 @@ pub(crate) fn curved_arrow(painter: &egui::Painter, at: Pos2, clockwise: bool, h
|
||||
at + vec2(angle.cos(), angle.sin()) * (32.0 * scale)
|
||||
})
|
||||
.collect();
|
||||
painter.add(Shape::line(points.clone(), Stroke::new(5.0 * scale, if hover { t.accent } else { t.cube_border })));
|
||||
painter.add(Shape::line(points.clone(), Stroke::new(3.0 * scale, if hover { t.accent_soft } else { t.cube_face })));
|
||||
painter.add(Shape::line(points.clone(), Stroke::new(5.0 * scale, if hover { t.accent } else { t.navigator_border })));
|
||||
painter.add(Shape::line(points.clone(), Stroke::new(3.0 * scale, if hover { t.accent_soft } else { t.navigator_face })));
|
||||
if let Some(tip) = points.last() {
|
||||
let sign = if clockwise { 1.0 } else { -1.0 };
|
||||
arrow(painter, *tip, vec2(-end.sin(), end.cos()) * (sign * scale), hover, t);
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "إنشاء بلاغ…",
|
||||
"Cross curves": "المنحنيات العرضية",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter يتابع في GitHub.",
|
||||
"Cube": "مكعب",
|
||||
"Current orthographic view (1:1 mm)": "العرض المتعامد الحالي (1:1 mm)",
|
||||
"Current perspective view": "العرض المنظوري الحالي",
|
||||
"Current plane": "المستوى الحالي",
|
||||
@@ -2683,9 +2682,9 @@
|
||||
"prefs.interface_note": "شكل SolidCraft وأماكن أجزائه.",
|
||||
"prefs.interval_minutes": "{n} دقيقة",
|
||||
"prefs.invert_curved_roll_arrows": "عكس سهمي التدوير المنحنيين",
|
||||
"prefs.invert_curved_roll_arrows_note": "سهما التدوير المنحنيان عند زاوية المكعب يدوران العرض داخل مستوى الشاشة. عند التشغيل: سهم التدوير مع عقارب الساعة يدور عكسها، وسهم العكس يدور معها. عند الإيقاف: يدور كل سهم بالعرض حسب انحنائه.",
|
||||
"prefs.invert_navigator_arrows": "عكس أسهم تدوير مكعب العرض",
|
||||
"prefs.invert_navigator_arrows_note": "تدوّر الأسهم المحيطة بالمكعب الكاميرا في الاتجاه الذي تشير إليه، كما في Fusion وInventor: السهم الموجود على اليسار يشير إلى اليمين ويدوّر الكاميرا إلى اليمين. عند الإيقاف: يدوّر السهم المكعب نحو الجهة التي يقع فيها، فيدوّر السهم الأيسر الكاميرا إلى اليسار. لا يتأثر سهما الدوران المنحنيان.",
|
||||
"prefs.invert_curved_roll_arrows_note": "سهما التدوير المنحنيان عند زاوية أداة التنقل يدوران العرض داخل مستوى الشاشة. عند التشغيل: سهم التدوير مع عقارب الساعة يدور عكسها، وسهم العكس يدور معها. عند الإيقاف: يدور كل سهم بالعرض حسب انحنائه.",
|
||||
"prefs.invert_navigator_arrows": "عكس أسهم تدوير أداة التنقل",
|
||||
"prefs.invert_navigator_arrows_note": "تدوّر الأسهم المحيطة بأداة التنقل الكاميرا في الاتجاه الذي تشير إليه، كما في Fusion وInventor: السهم الموجود على اليسار يشير إلى اليمين ويدوّر الكاميرا إلى اليمين. عند الإيقاف: يدوّر السهم العرض نحو الجهة التي يقع فيها، فيدوّر السهم الأيسر الكاميرا إلى اليسار. لا يتأثر سهما الدوران المنحنيان.",
|
||||
"prefs.keep_unsaved_also_asks": "السؤال أيضًا عند إغلاق علامة التبويب",
|
||||
"prefs.keep_unsaved_also_asks_tip": "عند إيقاف هذا الخيار، تُغلق علامة التبويب دون مربع حوار المتصفح بعد تحديث نسخة كل تصميم غير محفوظ.",
|
||||
"prefs.keep_unsaved_in_browser": "الاحتفاظ بالعمل غير المحفوظ في هذا المتصفح",
|
||||
@@ -2745,7 +2744,6 @@
|
||||
"prefs.move_drag_highlights_tip": "عند الإيقاف: لا يُميَّز أي شيء تحت المؤشر أثناء سحب مكوّن بأسهم أداة التحريك، فتبقى التجميعات الكبيرة سلسة. مع عرض مقطع أو تحليل يبقى التمييز كما هو، ولا يُميَّز شيء أبدًا عند سحب جزء على امتداد وصلاته.",
|
||||
"prefs.navigation": "التنقل",
|
||||
"prefs.navigation.axes_signed": "المحاور",
|
||||
"prefs.navigation.cube_compact": "المكعب",
|
||||
"prefs.navigation.device": "الجهاز",
|
||||
"prefs.navigation.free": "حر",
|
||||
"prefs.navigation.orbit_style": "نمط التدوير",
|
||||
@@ -2753,7 +2751,7 @@
|
||||
"prefs.navigation.turntable": "طاولة دوارة",
|
||||
"prefs.navigation_note": "كيف تحرك الفأرة ولوحة اللمس والفأرة ثلاثية الأبعاد العرض.",
|
||||
"prefs.navigator_fit": "ملاءمة النموذج بعد تغيير العرض من متصفح العرض",
|
||||
"prefs.navigator_fit_note": "النقر على وجه أو ركن أو سهم في المكعب، أو على محور في أداة المحاور، يوجّه العرض أيضًا نحو منتصف النموذج من المسافة الواحدة التي تُظهره كاملًا من كل جهة (كرته المحيطة). يستخدم العرض الرئيسي التكبير والمركز ذاتهما ما دام هذا مفعّلًا، فلا تغيّر العروض المختارة بعده سوى الاتجاه. عند الإيقاف: يدور العرض في مكانه محتفظًا بالهدف والتكبير.",
|
||||
"prefs.navigator_fit_note": "النقر على وجه أو ركن أو سهم في أداة التنقل، أو على محور في أداة المحاور، يوجّه العرض أيضًا نحو منتصف النموذج من المسافة الواحدة التي تُظهره كاملًا من كل جهة (كرته المحيطة). يستخدم العرض الرئيسي التكبير والمركز ذاتهما ما دام هذا مفعّلًا، فلا تغيّر العروض المختارة بعده سوى الاتجاه. عند الإيقاف: يدور العرض في مكانه محتفظًا بالهدف والتكبير.",
|
||||
"prefs.network_host_remove": "إزالة",
|
||||
"prefs.network_locations": "السماح بمواقع الشبكة في التصاميم",
|
||||
"prefs.network_locations_note": "للمؤسسات التي تحفظ التصاميم على خوادم الملفات. عند الإيقاف: الخوادم التي تسمح بها فقط.",
|
||||
|
||||
@@ -144,7 +144,6 @@
|
||||
"Create Issue…": "Create Issue…",
|
||||
"Cross curves": "Cross curves",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter continues on GitHub.",
|
||||
"Cube": "Cube",
|
||||
"Current orthographic view (1:1 mm)": "Current orthographic view (1:1 mm)",
|
||||
"Current perspective view": "Current perspective view",
|
||||
"Current plane": "Current plane",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Prijavi problem…",
|
||||
"Cross curves": "Presječne krive",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter nastavlja na GitHubu.",
|
||||
"Cube": "Kocka",
|
||||
"Current orthographic view (1:1 mm)": "Trenutni ortografski prikaz (1:1 mm)",
|
||||
"Current perspective view": "Trenutni perspektivni prikaz",
|
||||
"Current plane": "Trenutna ravan",
|
||||
@@ -2240,9 +2239,6 @@
|
||||
"prefs.interface_note": "Kako SolidCraft izgleda i gdje su njegovi dijelovi.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Obrni zakrivljene strelice za valjanje",
|
||||
"prefs.invert_curved_roll_arrows_note": "Dvije zakrivljene strelice u uglu kocke valjaju prikaz unutar ravni ekrana. Uključeno: strelica u smjeru kazaljke na satu valja prikaz suprotno od smjera kazaljke na satu, a strelica suprotno od smjera kazaljke na satu valja ga u smjeru kazaljke na satu. Isključeno: svaka strelica valja prikaz onako kako je zakrivljena.",
|
||||
"prefs.invert_navigator_arrows": "Obrni strelice za rotaciju kocke prikaza",
|
||||
"prefs.invert_navigator_arrows_note": "Strelice oko kocke orbitiraju kameru u smjeru u kojem pokazuju, kao u programima Fusion i Inventor: strelica s lijeve strane pokazuje udesno i zakreće kameru udesno. Isključeno: strelica okreće kocku prema strani na kojoj se nalazi, pa lijeva strelica zakreće kameru ulijevo. Postavka ne utiče na zakrivljene strelice za valjanje.",
|
||||
"prefs.keep_work_on_tab_switch": "Zadrži dijaloge i alate otvorenima pri prebacivanju između dizajna",
|
||||
"prefs.keep_work_on_tab_switch_note": "Svaka kartica dizajna zadržava svoj otvoreni dijalog ili alat, s onim što ste u njemu izabrali i upisali, te svoju karticu trake s alatima. Kada se vratite na dizajn, ponovo su tu. Isključeno: prebacivanje između dizajna otkazuje ih i prikazuje karticu Model.",
|
||||
"prefs.labels": "Oznake",
|
||||
@@ -2279,7 +2275,6 @@
|
||||
"prefs.navigation": "Navigacija",
|
||||
"prefs.navigation_note": "Kako miš, trackpad i 3D miš pomjeraju prikaz.",
|
||||
"prefs.navigator_fit": "Uklopi model nakon promjene prikaza u navigatoru",
|
||||
"prefs.navigator_fit_note": "Lice, ugao ili strelica kocke prikaza, odnosno osa alata za orijentaciju, također usmjerava pogled na sredinu modela s jedne udaljenosti na kojoj se uklapa iz svakog smjera (njegova granična sfera). Početni prikaz koristi isti zum i centar dok je ova opcija uključena, pa se prikazi koje izaberete poslije njega samo okreću. Isključeno: prikaz se okreće na mjestu i zadržava svoj cilj i zum.",
|
||||
"prefs.network_host_remove": "Ukloni",
|
||||
"prefs.network_locations": "Dozvoli mrežne lokacije u dizajnima",
|
||||
"prefs.network_locations_note": "Isključeno: povezane datoteke dizajna na drugom računaru (\\\\server\\share) otvaraju se samo sa servera navedenih ovdje ili nakon što ga dozvolite kada se to zatraži.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Crear una incidència…",
|
||||
"Cross curves": "Corbes transversals",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Retorn continua a GitHub.",
|
||||
"Cube": "Cub",
|
||||
"Current orthographic view (1:1 mm)": "Vista ortogràfica actual (1:1 mm)",
|
||||
"Current perspective view": "Vista en perspectiva actual",
|
||||
"Current plane": "Pla actual",
|
||||
@@ -2659,9 +2658,6 @@
|
||||
"prefs.interface_note": "Com es veu SolidCraft i on se situen les seves parts.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Invertir les fletxes de gir corbes",
|
||||
"prefs.invert_curved_roll_arrows_note": "Les dues fletxes corbes a la cantonada del cub giren la vista dins del pla de la pantalla. Activades: la fletxa horària gira en sentit antihorari i l'antihorària gira en sentit horari. Desactivades: cada fletxa gira la vista cap on es corba.",
|
||||
"prefs.invert_navigator_arrows": "Invertir les fletxes de rotació del cub de vista",
|
||||
"prefs.invert_navigator_arrows_note": "Les fletxes al voltant del cub orbiten la càmera cap on apunten, com a Fusion i Inventor: la fletxa de l'esquerra apunta a la dreta i gira la càmera a la dreta. Desactivades: una fletxa gira el cub cap al costat on és, així la fletxa de l'esquerra gira la càmera a l'esquerra. Les fletxes de gir corbes no en queden afectades.",
|
||||
"prefs.keep_unsaved_also_asks": "Continuar preguntant quan es tanca la pestanya",
|
||||
"prefs.keep_unsaved_also_asks_tip": "Amb això desactivat, la pestanya es tanca sense la finestra del navegador un cop la còpia de cada disseny sense desar està al dia.",
|
||||
"prefs.keep_unsaved_in_browser": "Conservar la feina sense desar en aquest navegador",
|
||||
@@ -2721,7 +2717,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Desactivat: mentre les fletxes de Moure arrosseguen un component, no es ressalta res del que hi ha sota el punter, cosa que manté àgils els ensamblatges grans. Amb una secció o una anàlisi mostrades, es ressalta igualment, i una peça arrossegada al llarg de les seves unions no ho ressalta mai.",
|
||||
"prefs.navigation": "Navegació",
|
||||
"prefs.navigation.axes_signed": "Eixos",
|
||||
"prefs.navigation.cube_compact": "Cub",
|
||||
"prefs.navigation.device": "Dispositiu",
|
||||
"prefs.navigation.free": "Lliure",
|
||||
"prefs.navigation.orbit_style": "Estil d'òrbita",
|
||||
@@ -2729,7 +2724,6 @@
|
||||
"prefs.navigation.turntable": "Plat giratori",
|
||||
"prefs.navigation_note": "Com mouen la vista el ratolí, el panel tàctil i el ratolí 3D.",
|
||||
"prefs.navigator_fit": "Ajustar el model després d'un canvi de vista del navegador",
|
||||
"prefs.navigator_fit_note": "Una cara, cantonada o fletxa del cub de vista, o un eix del gizmo, també miren el centre del model des de la distància que l'ajusta des de tots els costats (la seva esfera envolupant). Inici fa servir el mateix zoom i centre mentre això està activat, així les vistes triades després només giren. Desactivat: la vista gira al seu lloc, mantenint el seu objectiu i zoom.",
|
||||
"prefs.network_host_remove": "Eliminar",
|
||||
"prefs.network_locations": "Permetre ubicacions de xarxa als dissenys",
|
||||
"prefs.network_locations_note": "Per a organitzacions que desen dissenys en servidors de fitxers. Desactivat: només els servidors que permeteu.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Vytvořit hlášení…",
|
||||
"Cross curves": "Příčné křivky",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter pokračuje na GitHubu.",
|
||||
"Cube": "Krychle",
|
||||
"Current orthographic view (1:1 mm)": "Aktuální pravoúhlý pohled (1:1 mm)",
|
||||
"Current perspective view": "Aktuální perspektivní pohled",
|
||||
"Current plane": "Aktuální rovina",
|
||||
@@ -2659,9 +2658,6 @@
|
||||
"prefs.interface_note": "Vzhled aplikace SolidCraft a rozmístění jejích částí.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Obrátit zakřivené šipky natočení",
|
||||
"prefs.invert_curved_roll_arrows_note": "Dvě zakřivené šipky v rohu krychle natáčejí pohled v rovině obrazovky. Zapnuto: šipka po směru hodinových ručiček natáčí pohled proti směru hodinových ručiček a šipka proti směru hodinových ručiček ho natáčí po směru. Vypnuto: každá šipka natáčí pohled tak, jak je zakřivená.",
|
||||
"prefs.invert_navigator_arrows": "Obrátit šipky otáčení krychle pohledu",
|
||||
"prefs.invert_navigator_arrows_note": "Šipky kolem krychle otáčejí kameru tím směrem, kam míří, jako ve Fusion a Inventor: šipka vlevo míří doprava a stáčí kameru doprava. Vypnuto: šipka otáčí krychli na stranu, na které leží, takže šipka vlevo stáčí kameru doleva. Zakřivené šipky natočení tím nejsou dotčeny.",
|
||||
"prefs.keep_unsaved_also_asks": "Přesto se ptát při zavření karty",
|
||||
"prefs.keep_unsaved_also_asks_tip": "Když je vypnuto, karta se zavře bez dotazu prohlížeče, jakmile je kopie každého neuloženého návrhu aktuální.",
|
||||
"prefs.keep_unsaved_in_browser": "Uchovávat neuloženou práci v tomto prohlížeči",
|
||||
@@ -2721,7 +2717,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Vypnuto: když šipky Přesunout táhnou komponentu, nic pod ukazatelem se nezvýrazní, takže velké sestavy zůstanou plynulé. Při zobrazeném řezu nebo analýze se zvýrazňuje i tak a díl tažený po svých spojích nezvýrazňuje nikdy.",
|
||||
"prefs.navigation": "Navigace",
|
||||
"prefs.navigation.axes_signed": "Osy",
|
||||
"prefs.navigation.cube_compact": "Krychle",
|
||||
"prefs.navigation.device": "Zařízení",
|
||||
"prefs.navigation.free": "Volné",
|
||||
"prefs.navigation.orbit_style": "Styl otáčení",
|
||||
@@ -2729,7 +2724,6 @@
|
||||
"prefs.navigation.turntable": "Otočný stůl",
|
||||
"prefs.navigation_note": "Jak myš, trackpad a 3D myš pohybují pohledem.",
|
||||
"prefs.navigator_fit": "Přizpůsobit model po změně pohledu v navigátoru",
|
||||
"prefs.navigator_fit_note": "Plocha, roh nebo šipka krychle pohledu, případně osa orientačního ovladače, také zaměří pohled na střed modelu z jediné vzdálenosti, ze které je celý vidět ze všech stran (jeho ohraničující koule). Domů při zapnutí používá stejné přiblížení a střed, takže pohledy zvolené po něm se jen otáčejí. Vypnuto: pohled se otáčí na místě a zachovává svůj cíl a přiblížení.",
|
||||
"prefs.network_host_remove": "Odebrat",
|
||||
"prefs.network_locations": "Povolit síťová umístění v návrzích",
|
||||
"prefs.network_locations_note": "Vypnuto: propojené soubory návrhu na jiném počítači (\\\\server\\share) se otevírají jen ze zde uvedených serverů nebo poté, co jeden povolíte na výzvu.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Opret fejlrapport…",
|
||||
"Cross curves": "Tværkurver",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter fortsætter på GitHub.",
|
||||
"Cube": "Terning",
|
||||
"Current orthographic view (1:1 mm)": "Aktuel visning uden perspektiv (1:1 mm)",
|
||||
"Current perspective view": "Aktuel perspektivvisning",
|
||||
"Current plane": "Aktuelt plan",
|
||||
@@ -2240,9 +2239,6 @@
|
||||
"prefs.interface_note": "SolidCrafts udseende og placeringen af dets dele.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Vend de buede rulningspile om",
|
||||
"prefs.invert_curved_roll_arrows_note": "De to buede pile i kubens hjørne ruller visningen i skærmplanet. Slået til: Pilen med uret ruller mod uret, og pilen mod uret ruller med uret. Slået fra: Hver pil ruller visningen den vej, den krummer.",
|
||||
"prefs.invert_navigator_arrows": "Vend visningskubens rotationspile om",
|
||||
"prefs.invert_navigator_arrows_note": "Pilene rundt om kuben roterer kameraet i den retning, de peger, som i Fusion og Inventor: Pilen til venstre peger mod højre og svinger kameraet til højre. Slået fra: En pil drejer kuben mod den side, den sidder på, så venstre pil svinger kameraet til venstre. De buede rulningspile påvirkes ikke.",
|
||||
"prefs.keep_work_on_tab_switch": "Behold dialoger og værktøjer åbne, når du skifter design",
|
||||
"prefs.keep_work_on_tab_switch_note": "Hver designfane beholder sin åbne dialog eller sit åbne værktøj med det, du har valgt og skrevet i den, og sin fane på båndet. De er der igen, når du vender tilbage til designet. Slået fra: Skift af design annullerer dem og viser fanen Model.",
|
||||
"prefs.labels": "Etiketter",
|
||||
@@ -2279,7 +2275,6 @@
|
||||
"prefs.navigation": "Navigation",
|
||||
"prefs.navigation_note": "Hvordan musen, pegefeltet og 3D-musen styrer visningen.",
|
||||
"prefs.navigator_fit": "Tilpas modellen efter et skift af visning i navigatoren",
|
||||
"prefs.navigator_fit_note": "En flade, et hjørne eller en pil på visningskuben eller en akse på orienteringsgizmoen ser også mod modellens midte fra den ene afstand, der får den til at passe fra alle sider (dens omsluttende kugle). Hjem bruger samme zoom og centrum, mens dette er slået til, så visninger, der vælges bagefter, kun drejer. Slået fra: Visningen drejer på stedet og beholder sit mål og sin zoom.",
|
||||
"prefs.network_host_remove": "Fjern",
|
||||
"prefs.network_locations": "Tillad netværksplaceringer i designs",
|
||||
"prefs.network_locations_note": "Slået fra: Et designs linkede filer på en anden computer (\\\\server\\share) åbnes kun fra de servere, der er angivet her, eller efter at du har tilladt en, når du bliver spurgt.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Issue erstellen…",
|
||||
"Cross curves": "Querkurven",
|
||||
"Ctrl+Enter continues on GitHub.": "Strg+Enter geht weiter zu GitHub.",
|
||||
"Cube": "Würfel",
|
||||
"Current orthographic view (1:1 mm)": "Aktuelle orthogonale Ansicht (1:1 mm)",
|
||||
"Current perspective view": "Aktuelle perspektivische Ansicht",
|
||||
"Current plane": "Aktuelle Ebene",
|
||||
@@ -2469,8 +2468,6 @@
|
||||
"prefs.interface_language": "Oberflächensprache",
|
||||
"prefs.interface_note": "Legt das Erscheinungsbild von SolidCraft und die Anordnung seiner Bereiche fest.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_navigator_arrows": "Drehpfeile des Ansichtswürfels umkehren",
|
||||
"prefs.invert_navigator_arrows_note": "Die Pfeile um den Würfel drehen die Kamera in die Richtung, in die sie zeigen, wie in Fusion und Inventor: Der linke Pfeil zeigt nach rechts und schwenkt die Kamera nach rechts. Aus: Ein Pfeil dreht den Würfel zu der Seite hin, an der er sitzt, sodass der linke Pfeil die Kamera nach links schwenkt. Die gebogenen Rollpfeile sind davon nicht betroffen.",
|
||||
"prefs.keep_work_on_tab_switch": "Dialoge und Werkzeuge beim Wechsel zwischen Konstruktionen offen lassen",
|
||||
"prefs.keep_work_on_tab_switch_note": "Jeder Konstruktions-Tab behält seinen offenen Dialog oder sein Werkzeug mit allem, was darin ausgewählt und eingegeben wurde, sowie seinen Werkzeugleisten-Tab. Beim Zurückkehren zur Konstruktion ist alles wieder da. Aus: Ein Wechsel bricht sie ab und zeigt den Tab Modell.",
|
||||
"prefs.labels": "Beschriftungen",
|
||||
@@ -2526,7 +2523,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Aus: Solange die Pfeile von Verschieben eine Komponente ziehen, wird nichts unter dem Zeiger hervorgehoben; so bleiben große Baugruppen flüssig. Mit einem Schnitt oder einer Analyse wird es trotzdem hervorgehoben, und ein entlang seiner Gelenke gezogenes Teil hebt nie etwas hervor.",
|
||||
"prefs.navigation": "Navigation",
|
||||
"prefs.navigation.axes_signed": "Achsen",
|
||||
"prefs.navigation.cube_compact": "Würfel",
|
||||
"prefs.navigation.device": "Gerät",
|
||||
"prefs.navigation.free": "Frei",
|
||||
"prefs.navigation.orbit_style": "Drehstil",
|
||||
@@ -2534,7 +2530,6 @@
|
||||
"prefs.navigation.turntable": "Drehteller",
|
||||
"prefs.navigation_note": "Legt fest, wie Maus, Trackpad und 3D-Maus die Ansicht steuern.",
|
||||
"prefs.navigator_fit": "Modell nach einem Ansichtswechsel am Navigator einpassen",
|
||||
"prefs.navigator_fit_note": "Eine Fläche, Ecke oder ein Pfeil des Würfels oder eine Achse des Gizmos blickt auch auf die Mitte des Modells, aus dem einen Abstand, der es von jeder Seite einpasst (seine Hüllkugel). Home nutzt denselben Zoom und dieselbe Mitte, solange dies an ist, sodass danach gewählte Ansichten sich nur drehen. Aus: Die Ansicht dreht sich an Ort und Stelle und behält Ziel und Zoom.",
|
||||
"prefs.network_host_remove": "Entfernen",
|
||||
"prefs.network_locations": "Netzwerkspeicherorte in Designs zulassen",
|
||||
"prefs.network_locations_note": "Für Organisationen, die Entwürfe auf Dateiservern speichern. Aus: nur erlaubte Server.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Create Issue…",
|
||||
"Cross curves": "Cross curves",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter continues on GitHub.",
|
||||
"Cube": "Cube",
|
||||
"Current orthographic view (1:1 mm)": "Current orthographic view (1:1 mm)",
|
||||
"Current perspective view": "Current perspective view",
|
||||
"Current plane": "Current plane",
|
||||
@@ -2683,9 +2682,9 @@
|
||||
"prefs.interface_note": "How SolidCraft looks and where its parts sit.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Invert the curved roll arrows",
|
||||
"prefs.invert_curved_roll_arrows_note": "The two curved arrows at the cube's corner roll the view within the screen plane. On: the clockwise arrow rolls counterclockwise and the counterclockwise arrow rolls clockwise. Off: each arrow rolls the view the way it curls.",
|
||||
"prefs.invert_navigator_arrows": "Invert the view cube rotation arrows",
|
||||
"prefs.invert_navigator_arrows_note": "The arrows around the cube orbit the camera the way they point, as in Fusion and Inventor: the arrow on the left points right and swings the camera right. Off: an arrow rotates the cube toward the side it sits on, so the left arrow swings the camera left. The curved roll arrows are not affected.",
|
||||
"prefs.invert_curved_roll_arrows_note": "The two curved arrows at the navigator's corner roll the view within the screen plane. On: the clockwise arrow rolls counterclockwise and the counterclockwise arrow rolls clockwise. Off: each arrow rolls the view the way it curls.",
|
||||
"prefs.invert_navigator_arrows": "Invert the navigator rotation arrows",
|
||||
"prefs.invert_navigator_arrows_note": "The arrows around the navigator orbit the camera the way they point, as in Fusion and Inventor: the arrow on the left points right and swings the camera right. Off: an arrow rotates the view toward the side it sits on, so the left arrow swings the camera left. The curved roll arrows are not affected.",
|
||||
"prefs.keep_unsaved_also_asks": "Still ask when the tab closes",
|
||||
"prefs.keep_unsaved_also_asks_tip": "With this off, the tab closes without the browser's box once every unsaved design's copy is current.",
|
||||
"prefs.keep_unsaved_in_browser": "Keep unsaved work in this browser",
|
||||
@@ -2745,7 +2744,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Off: while Move's arrows drag a component, nothing under the pointer is highlighted, which keeps large assemblies smooth. With a section or an analysis shown it is highlighted all the same, and a part dragged along its joints never highlights it.",
|
||||
"prefs.navigation": "Navigation",
|
||||
"prefs.navigation.axes_signed": "Axes",
|
||||
"prefs.navigation.cube_compact": "Cube",
|
||||
"prefs.navigation.device": "Device",
|
||||
"prefs.navigation.free": "Free",
|
||||
"prefs.navigation.orbit_style": "Orbit style",
|
||||
@@ -2753,7 +2751,7 @@
|
||||
"prefs.navigation.turntable": "Turntable",
|
||||
"prefs.navigation_note": "How the mouse, trackpad and 3D mouse move the view.",
|
||||
"prefs.navigator_fit": "Fit the model after a navigator view change",
|
||||
"prefs.navigator_fit_note": "A face, corner or arrow of the view cube, or an axis of the gizmo, also looks at the middle of the model from the one distance that fits it from every side (its bounding sphere). Home uses the same zoom and centre while this is on, so views chosen after it only turn. Off: the view turns in place, keeping its target and zoom.",
|
||||
"prefs.navigator_fit_note": "A face, corner or arrow of a navigator, or an axis of the gizmo, also looks at the middle of the model from the one distance that fits it from every side (its bounding sphere). Home uses the same zoom and centre while this is on, so views chosen after it only turn. Off: the view turns in place, keeping its target and zoom.",
|
||||
"prefs.network_host_remove": "Remove",
|
||||
"prefs.network_locations": "Allow network locations in designs",
|
||||
"prefs.network_locations_note": "For organizations that keep designs on file servers. Off: only servers you allow.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Crear incidencia…",
|
||||
"Cross curves": "Curvas transversales",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Intro continúa en GitHub.",
|
||||
"Cube": "Cubo",
|
||||
"Current orthographic view (1:1 mm)": "Vista ortográfica actual (1:1 mm)",
|
||||
"Current perspective view": "Vista en perspectiva actual",
|
||||
"Current plane": "Plano actual",
|
||||
@@ -2683,9 +2682,6 @@
|
||||
"prefs.interface_note": "Cómo se ve SolidCraft y dónde se sitúan sus partes.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Invertir las flechas de giro curvo",
|
||||
"prefs.invert_curved_roll_arrows_note": "Las dos flechas curvas en la esquina del cubo giran la vista en el plano de la pantalla. Activado: la flecha horaria gira antihoraria y la antihoraria gira horaria. Desactivado: cada flecha gira la vista hacia donde se curva.",
|
||||
"prefs.invert_navigator_arrows": "Invertir las flechas de rotación del cubo de vista",
|
||||
"prefs.invert_navigator_arrows_note": "Las flechas alrededor del cubo orbitan la cámara hacia donde apuntan, como en Fusion e Inventor: la flecha de la izquierda apunta a la derecha y gira la cámara a la derecha. Desactivado: una flecha rota el cubo hacia el lado en que está, así la flecha izquierda gira la cámara a la izquierda. Las flechas de giro curvo no se ven afectadas.",
|
||||
"prefs.keep_unsaved_also_asks": "Preguntar igualmente al cerrar la pestaña",
|
||||
"prefs.keep_unsaved_also_asks_tip": "Con esto desactivado, la pestaña se cierra sin el cuadro del navegador en cuanto la copia de cada diseño sin guardar está al día.",
|
||||
"prefs.keep_unsaved_in_browser": "Conservar el trabajo sin guardar en este navegador",
|
||||
@@ -2745,7 +2741,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Desactivado: mientras las flechas de Mover arrastran un componente no se resalta nada bajo el puntero, y los ensamblajes grandes se mueven con fluidez. Con un corte o un análisis visible se resalta igualmente, y una pieza arrastrada a lo largo de sus uniones nunca lo resalta.",
|
||||
"prefs.navigation": "Navegación",
|
||||
"prefs.navigation.axes_signed": "Ejes",
|
||||
"prefs.navigation.cube_compact": "Cubo",
|
||||
"prefs.navigation.device": "Dispositivo",
|
||||
"prefs.navigation.free": "Libre",
|
||||
"prefs.navigation.orbit_style": "Estilo de órbita",
|
||||
@@ -2753,7 +2748,6 @@
|
||||
"prefs.navigation.turntable": "Plato giratorio",
|
||||
"prefs.navigation_note": "Cómo mueven la vista el ratón, el panel táctil y el ratón 3D.",
|
||||
"prefs.navigator_fit": "Ajustar el modelo tras un cambio de vista del navegador",
|
||||
"prefs.navigator_fit_note": "Una cara, esquina o flecha del cubo de vista, o un eje del gizmo, también mira el centro del modelo desde la única distancia que lo encaja desde todos los lados (su esfera envolvente). Inicio usa el mismo zoom y centro mientras esto está activado, así que las vistas elegidas después solo giran. Desactivado: la vista gira en su lugar, manteniendo su objetivo y zoom.",
|
||||
"prefs.network_host_remove": "Eliminar",
|
||||
"prefs.network_locations": "Permitir ubicaciones de red en diseños",
|
||||
"prefs.network_locations_note": "Desactivado: los archivos vinculados de un diseño en otro equipo (\\\\servidor\\\\carpeta) solo se abren desde los servidores listados aquí, o tras permitir uno cuando se pregunte.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Luo ilmoitus…",
|
||||
"Cross curves": "Poikkikäyrät",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter jatkaa GitHubissa.",
|
||||
"Cube": "Kuutio",
|
||||
"Current orthographic view (1:1 mm)": "Nykyinen ortografinen näkymä (1:1 mm)",
|
||||
"Current perspective view": "Nykyinen perspektiivinäkymä",
|
||||
"Current plane": "Nykyinen taso",
|
||||
@@ -2681,9 +2680,6 @@
|
||||
"prefs.interface_note": "Miltä SolidCraft näyttää ja missä sen osat sijaitsevat.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Käännä kaarevat kallistusnuolet",
|
||||
"prefs.invert_curved_roll_arrows_note": "Kuution kulman kaksi kaarevaa nuolta kallistavat näkymää näytön tasossa. Päällä: myötäpäivään osoittava nuoli kallistaa vastapäivään ja vastapäivään osoittava myötäpäivään. Pois: kumpikin nuoli kallistaa näkymää kaartumissuuntaansa.",
|
||||
"prefs.invert_navigator_arrows": "Käännä näkymäkuution kiertonuolet",
|
||||
"prefs.invert_navigator_arrows_note": "Kuution ympärillä olevat nuolet kiertävät kameraa osoittamaansa suuntaan kuten Fusionissa ja Inventorissa: vasemmalla oleva nuoli osoittaa oikealle ja kääntää kameraa oikealle. Pois: nuoli kiertää kuutiota omaa puoltaan kohti, joten vasen nuoli kääntää kameraa vasemmalle. Kaarevat kallistusnuolet eivät muutu.",
|
||||
"prefs.keep_unsaved_also_asks": "Kysy silti, kun välilehti suljetaan",
|
||||
"prefs.keep_unsaved_also_asks_tip": "Kun tämä on pois päältä, välilehti sulkeutuu ilman selaimen kyselyikkunaa, kun jokaisen tallentamattoman mallin kopio on ajan tasalla.",
|
||||
"prefs.keep_unsaved_in_browser": "Säilytä tallentamaton työ tässä selaimessa",
|
||||
@@ -2743,7 +2739,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Pois: kun Siirrä-toiminnon nuolilla vedetään komponenttia, osoittimen alla olevaa kohdetta ei korosteta, mikä pitää suuret kokoonpanot sulavina. Kun leikkaus tai analyysi on näkyvissä, kohde korostetaan silti, eikä niveliään pitkin vedetty osa koskaan korosta sitä.",
|
||||
"prefs.navigation": "Navigointi",
|
||||
"prefs.navigation.axes_signed": "Akselit",
|
||||
"prefs.navigation.cube_compact": "Kuutio",
|
||||
"prefs.navigation.device": "Laite",
|
||||
"prefs.navigation.free": "Vapaa",
|
||||
"prefs.navigation.orbit_style": "Kiertotapa",
|
||||
@@ -2751,7 +2746,6 @@
|
||||
"prefs.navigation.turntable": "Pyörivä alusta",
|
||||
"prefs.navigation_note": "Miten hiiri, kosketuslevy ja 3D-hiiri liikuttavat näkymää.",
|
||||
"prefs.navigator_fit": "Sovita malli navigaattorin näkymänvaihdon jälkeen",
|
||||
"prefs.navigator_fit_note": "Näkymäkuution pinta, kulma tai nuoli tai gizmon akseli katsoo myös mallin keskikohtaa siltä yhdeltä etäisyydeltä, joka sovittaa sen joka suunnasta (sen rajaava pallo). Aloitusnäkymä käyttää samaa zoomausta ja keskipistettä, kun tämä on päällä, joten sen jälkeen valitut näkymät vain kääntyvät. Pois: näkymä kääntyy paikallaan säilyttäen kohteensa ja zoomauksensa.",
|
||||
"prefs.network_host_remove": "Poista",
|
||||
"prefs.network_locations": "Salli verkkosijainnit malleissa",
|
||||
"prefs.network_locations_note": "Pois: mallin linkitetyt tiedostot toisella tietokoneella (\\\\server\\share) avataan vain tässä luetelluilta palvelimilta tai sen jälkeen, kun sallit palvelimen kysyttäessä.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Créer un ticket…",
|
||||
"Cross curves": "Courbes transversales",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Entrée continue sur GitHub.",
|
||||
"Cube": "Cube",
|
||||
"Current orthographic view (1:1 mm)": "Vue orthographique actuelle (1:1 mm)",
|
||||
"Current perspective view": "Vue en perspective actuelle",
|
||||
"Current plane": "Plan actuel",
|
||||
@@ -2256,9 +2255,9 @@
|
||||
"prefs.interface_note": "L'apparence de SolidCraft et la place de ses éléments.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Inverser les flèches courbes de roulis",
|
||||
"prefs.invert_curved_roll_arrows_note": "Les deux flèches courbes au coin du cube font rouler la vue dans le plan de l'écran. Activé : la flèche horaire fait rouler dans le sens antihoraire et la flèche antihoraire dans le sens horaire. Désactivé : chaque flèche fait rouler la vue dans le sens de sa courbure.",
|
||||
"prefs.invert_navigator_arrows": "Inverser les flèches de rotation du cube de vue",
|
||||
"prefs.invert_navigator_arrows_note": "Les flèches autour du cube font orbiter la caméra dans le sens où elles pointent, comme dans Fusion et Inventor : la flèche de gauche pointe vers la droite et fait pivoter la caméra vers la droite. Désactivé : une flèche fait tourner le cube vers le côté où elle se trouve, donc la flèche de gauche fait pivoter la caméra vers la gauche. Les flèches courbes de roulis ne sont pas concernées.",
|
||||
"prefs.invert_curved_roll_arrows_note": "Les deux flèches courbes au coin du navigateur font rouler la vue dans le plan de l'écran. Activé : la flèche horaire fait rouler dans le sens antihoraire et la flèche antihoraire dans le sens horaire. Désactivé : chaque flèche fait rouler la vue dans le sens de sa courbure.",
|
||||
"prefs.invert_navigator_arrows": "Inverser les flèches de rotation du navigateur de vue",
|
||||
"prefs.invert_navigator_arrows_note": "Les flèches autour du navigateur font orbiter la caméra dans le sens où elles pointent, comme dans Fusion et Inventor : la flèche de gauche pointe vers la droite et fait pivoter la caméra vers la droite. Désactivé : une flèche fait tourner la vue vers le côté où elle se trouve, donc la flèche de gauche fait pivoter la caméra vers la gauche. Les flèches courbes de roulis ne sont pas concernées.",
|
||||
"prefs.keep_work_on_tab_switch": "Garder dialogues et outils ouverts en changeant de conception",
|
||||
"prefs.keep_work_on_tab_switch_note": "Chaque onglet de conception garde son dialogue ou son outil ouvert, avec ce que vous y avez sélectionné et saisi, ainsi que son onglet de barre d'outils. Vous les retrouvez en revenant à la conception. Désactivé : changer de conception les annule et affiche l'onglet Modèle.",
|
||||
"prefs.labels": "Libellés",
|
||||
@@ -2297,7 +2296,7 @@
|
||||
"prefs.navigation": "Navigation",
|
||||
"prefs.navigation_note": "Comment la souris, le pavé tactile et la souris 3D déplacent la vue.",
|
||||
"prefs.navigator_fit": "Cadrer le modèle après un changement de vue du repère de navigation",
|
||||
"prefs.navigator_fit_note": "Une face, un coin ou une flèche du cube de vue, ou un axe du gizmo, regarde aussi le milieu du modèle depuis la distance unique qui le cadre sous tous les côtés (sa sphère englobante). Accueil utilise le même zoom et le même centre tant que cette option est activée, de sorte que les vues choisies ensuite ne font que tourner. Désactivé : la vue tourne sur place, en gardant sa cible et son zoom.",
|
||||
"prefs.navigator_fit_note": "Une face, un coin ou une flèche du navigateur de vue, ou un axe du gizmo, regarde aussi le milieu du modèle depuis la distance unique qui le cadre sous tous les côtés (sa sphère englobante). Accueil utilise le même zoom et le même centre tant que cette option est activée, de sorte que les vues choisies ensuite ne font que tourner. Désactivé : la vue tourne sur place, en gardant sa cible et son zoom.",
|
||||
"prefs.network_host_remove": "Retirer",
|
||||
"prefs.network_locations": "Autoriser les emplacements réseau dans les conceptions",
|
||||
"prefs.network_locations_note": "Désactivé : les fichiers liés d'une conception situés sur un autre ordinateur (\\\\server\\share) ne sont ouverts que depuis les serveurs listés ici, ou après en avoir autorisé un sur demande.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Crear incidencia…",
|
||||
"Cross curves": "Curvas transversais",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter continúa en GitHub.",
|
||||
"Cube": "Cubo",
|
||||
"Current orthographic view (1:1 mm)": "Vista ortográfica actual (1:1 mm)",
|
||||
"Current perspective view": "Vista en perspectiva actual",
|
||||
"Current plane": "Plano actual",
|
||||
@@ -2240,9 +2239,6 @@
|
||||
"prefs.interface_note": "Como se ve SolidCraft e onde están as súas partes.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Inverter as frechas curvas de balanceo",
|
||||
"prefs.invert_curved_roll_arrows_note": "As dúas frechas curvas da esquina do cubo fan xirar a vista no plano da pantalla. Activado: a frecha en sentido horario xira en sentido antihorario e a frecha en sentido antihorario xira en sentido horario. Desactivado: cada frecha xira a vista no sentido en que se curva.",
|
||||
"prefs.invert_navigator_arrows": "Invertir as frechas de rotación do cubo de vistas",
|
||||
"prefs.invert_navigator_arrows_note": "As frechas arredor do cubo fan orbitar a cámara na dirección na que apuntan, como en Fusion e Inventor: a frecha da esquerda apunta á dereita e move a cámara cara á dereita. Desactivado: unha frecha xira o cubo cara ao lado no que está, así que a frecha da esquerda move a cámara cara á esquerda. As frechas curvas de balanceo non se ven afectadas.",
|
||||
"prefs.keep_work_on_tab_switch": "Manter abertos os diálogos e as ferramentas ao cambiar de deseño",
|
||||
"prefs.keep_work_on_tab_switch_note": "Cada lapela de deseño conserva o seu diálogo ou ferramenta aberto, co que escolliches e escribiches nel, e a súa lapela da barra de ferramentas. Volven estar aí cando regresas ao deseño. Desactivado: cambiar de deseño cancélaos e mostra a lapela Modelo.",
|
||||
"prefs.labels": "Etiquetas",
|
||||
@@ -2279,7 +2275,6 @@
|
||||
"prefs.navigation": "Navegación",
|
||||
"prefs.navigation_note": "Como moven a vista o rato, o panel táctil e o rato 3D.",
|
||||
"prefs.navigator_fit": "Axustar o modelo despois dun cambio de vista do navegador",
|
||||
"prefs.navigator_fit_note": "Unha cara, esquina ou frecha do cubo de vistas, ou un eixe do gizmo, tamén mira ao centro do modelo desde a única distancia que o abarca por todos os lados (a súa esfera delimitadora). Inicio usa o mesmo zoom e centro mentres isto está activado, así que as vistas escollidas despois só xiran. Desactivado: a vista xira no sitio, conservando o seu punto de mira e o seu zoom.",
|
||||
"prefs.network_host_remove": "Quitar",
|
||||
"prefs.network_locations": "Permitir ubicacións de rede nos deseños",
|
||||
"prefs.network_locations_note": "Desactivado: os ficheiros ligados dun deseño que están noutro ordenador (\\\\server\\share) só se abren desde os servidores listados aquí, ou despois de que permitas un cando se che pregunte.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "יצירת דיווח…",
|
||||
"Cross curves": "עקומות חוצות",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter ממשיך ב־GitHub.",
|
||||
"Cube": "קובייה",
|
||||
"Current orthographic view (1:1 mm)": "התצוגה האורתוגרפית הנוכחית (1:1 mm)",
|
||||
"Current perspective view": "תצוגת הפרספקטיבה הנוכחית",
|
||||
"Current plane": "המישור הנוכחי",
|
||||
@@ -2683,9 +2682,9 @@
|
||||
"prefs.interface_note": "איך SolidCraft נראה והיכן חלקיו ממוקמים.",
|
||||
"prefs.interval_minutes": "{n} דק׳",
|
||||
"prefs.invert_curved_roll_arrows": "היפוך חצי הגלילה המעוגלים",
|
||||
"prefs.invert_curved_roll_arrows_note": "שני החצים המעוגלים בפינת הקובייה מסובבים את התצוגה במישור המסך. פועל: החץ עם כיוון השעון מסובב נגד כיוון השעון, והחץ נגד כיוון השעון מסובב עם כיוון השעון. כבוי: כל חץ מסובב את התצוגה לפי העקום שלו.",
|
||||
"prefs.invert_navigator_arrows": "היפוך חצי סיבוב קוביית התצוגה",
|
||||
"prefs.invert_navigator_arrows_note": "החצים סביב הקובייה מחוויים את המצלמה לכיוון שהחץ מצביע, כמו ב-Fusion ו-Inventor: החץ שמשמאל מצביע ימימה ומניע את המצלמה ימימה. כבוי: החץ מסובב את הקובייה אל הצד שבו הוא יושב, כך שחץ שמאל מניע את המצלמה שמאלה. חצי הגלילה המעוגלים אינם מושפעים.",
|
||||
"prefs.invert_curved_roll_arrows_note": "שני החצים המעוגלים בפינת הנווט מסובבים את התצוגה במישור המסך. פועל: החץ עם כיוון השעון מסובב נגד כיוון השעון, והחץ נגד כיוון השעון מסובב עם כיוון השעון. כבוי: כל חץ מסובב את התצוגה לפי העקום שלו.",
|
||||
"prefs.invert_navigator_arrows": "היפוך חצי סיבוב הנווט",
|
||||
"prefs.invert_navigator_arrows_note": "החצים סביב הנווט מחוויים את המצלמה לכיוון שהחץ מצביע, כמו ב-Fusion ו-Inventor: החץ שמשמאל מצביע ימימה ומניע את המצלמה ימימה. כבוי: החץ מסובב את התצוגה אל הצד שבו הוא יושב, כך שחץ שמאל מניע את המצלמה שמאלה. חצי הגלילה המעוגלים אינם מושפעים.",
|
||||
"prefs.keep_unsaved_also_asks": "לשאול גם כשהכרטיסייה נסגרת",
|
||||
"prefs.keep_unsaved_also_asks_tip": "כשאפשרות זו כבויה, הכרטיסייה נסגרת ללא חלון הדפדפן לאחר שהעותק של כל תכן שלא נשמר עודכן.",
|
||||
"prefs.keep_unsaved_in_browser": "לשמור עבודה שלא נשמרה בדפדפן זה",
|
||||
@@ -2745,7 +2744,6 @@
|
||||
"prefs.move_drag_highlights_tip": "כבוי: בזמן שחצי ההזזה גוררים רכיב, דבר אינו מודגש מתחת לסמן, וכך מכלולים גדולים נשארים חלקים. כשמוצג חתך או ניתוח ההדגשה נשארת, וחלק שנגרר לאורך המפרקים שלו לעולם אינו מדגיש.",
|
||||
"prefs.navigation": "ניווט",
|
||||
"prefs.navigation.axes_signed": "צירים",
|
||||
"prefs.navigation.cube_compact": "קובייה",
|
||||
"prefs.navigation.device": "התקן",
|
||||
"prefs.navigation.free": "חופשי",
|
||||
"prefs.navigation.orbit_style": "סגנון סיבוב",
|
||||
@@ -2753,7 +2751,7 @@
|
||||
"prefs.navigation.turntable": "שולחן מסתובב",
|
||||
"prefs.navigation_note": "איך העכבר, משטח המגע והעכבר התלת־ממדי מזיזים את המבט.",
|
||||
"prefs.navigator_fit": "התאמת המודל לאחר שינוי תצוגה בניווט התצוגה",
|
||||
"prefs.navigator_fit_note": "לחיצה על פאה, פינה או חץ בקובייה, או על ציר בגיזמו, גם מביטה אל מרכז המודל מהמרחק האחד שמכיל אותו מכל צד (הכדור החוסם שלו). תצוגת בית משתמשת באותו זום ובאותו מרכז כל עוד זה פעיל, כך שתצוגות שנבחרות אחריה רק מסתובבות. כבוי: התצוגה מסתובבת במקומה ושומרת על היעד ועל הזום.",
|
||||
"prefs.navigator_fit_note": "לחיצה על פאה, פינה או חץ בנווט, או על ציר בגיזמו, גם מביטה אל מרכז המודל מהמרחק האחד שמכיל אותו מכל צד (הכדור החוסם שלו). תצוגת בית משתמשת באותו זום ובאותו מרכז כל עוד זה פעיל, כך שתצוגות שנבחרות אחריה רק מסתובבות. כבוי: התצוגה מסתובבת במקומה ושומרת על היעד ועל הזום.",
|
||||
"prefs.network_host_remove": "הסרה",
|
||||
"prefs.network_locations": "התרת מיקומי רשת בתכנים",
|
||||
"prefs.network_locations_note": "לארגונים השומרים תכנונים בשרתי קבצים. כשהאפשרות כבויה: רק שרתים שאישרתם.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Prijavi problem…",
|
||||
"Cross curves": "Krivulje presjeka",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter nastavlja na GitHubu.",
|
||||
"Cube": "Kocka",
|
||||
"Current orthographic view (1:1 mm)": "Trenutni ortografski prikaz (1:1 mm)",
|
||||
"Current perspective view": "Trenutni perspektivni prikaz",
|
||||
"Current plane": "Trenutna ravnina",
|
||||
@@ -2240,9 +2239,6 @@
|
||||
"prefs.interface_note": "Kako SolidCraft izgleda i gdje su njegovi dijelovi.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Obrni zakrivljene strelice za valjanje",
|
||||
"prefs.invert_curved_roll_arrows_note": "Dvije zakrivljene strelice u kutu kocke valjaju prikaz unutar ravnine zaslona. Uključeno: strelica u smjeru kazaljke na satu valja prikaz suprotno od smjera kazaljke na satu, a strelica suprotno od smjera kazaljke na satu valja ga u smjeru kazaljke na satu. Isključeno: svaka strelica valja prikaz onako kako je zakrivljena.",
|
||||
"prefs.invert_navigator_arrows": "Obrni strelice za rotaciju kocke prikaza",
|
||||
"prefs.invert_navigator_arrows_note": "Strelice oko kocke orbitiraju kameru u smjeru u kojem pokazuju, kao u programima Fusion i Inventor: strelica s lijeve strane pokazuje udesno i zakreće kameru udesno. Isključeno: strelica okreće kocku prema strani na kojoj se nalazi, pa lijeva strelica zakreće kameru ulijevo. Postavka ne utječe na zakrivljene strelice za valjanje.",
|
||||
"prefs.keep_work_on_tab_switch": "Zadrži dijaloge i alate otvorenima pri prebacivanju između dizajna",
|
||||
"prefs.keep_work_on_tab_switch_note": "Svaka kartica dizajna zadržava svoj otvoreni dijalog ili alat, s onim što ste u njemu odabrali i upisali, te svoju karticu alatne trake. Kad se vratite na dizajn, ponovno su tu. Isključeno: prebacivanje između dizajna poništava ih i prikazuje karticu Model.",
|
||||
"prefs.labels": "Oznake",
|
||||
@@ -2279,7 +2275,6 @@
|
||||
"prefs.navigation": "Navigacija",
|
||||
"prefs.navigation_note": "Kako miš, dodirna pločica i 3D miš pomiču prikaz.",
|
||||
"prefs.navigator_fit": "Uklopi model nakon promjene prikaza u navigatoru",
|
||||
"prefs.navigator_fit_note": "Lice, kut ili strelica kocke prikaza, odnosno os orijentacijskog gizma, također usmjerava pogled na sredinu modela s jedne udaljenosti na kojoj se uklapa iz svakog smjera (njegova granična sfera). Početni prikaz koristi isti zum i središte dok je ova opcija uključena, pa se prikazi koje odaberete poslije njega samo okreću. Isključeno: prikaz se okreće na mjestu i zadržava svoj cilj i zum.",
|
||||
"prefs.network_host_remove": "Ukloni",
|
||||
"prefs.network_locations": "Dopusti mrežne lokacije u dizajnima",
|
||||
"prefs.network_locations_note": "Isključeno: povezane datoteke dizajna na drugom računalu (\\\\server\\share) otvaraju se samo s poslužitelja navedenih ovdje ili nakon što ga dopustite kad se to zatraži.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Hibajegy létrehozása…",
|
||||
"Cross curves": "Keresztgörbék",
|
||||
"Ctrl+Enter continues on GitHub.": "A Ctrl+Enter a GitHubon folytatja.",
|
||||
"Cube": "Kocka",
|
||||
"Current orthographic view (1:1 mm)": "Aktuális ortografikus nézet (1:1 mm)",
|
||||
"Current perspective view": "Aktuális perspektivikus nézet",
|
||||
"Current plane": "Aktuális sík",
|
||||
@@ -2240,9 +2239,6 @@
|
||||
"prefs.interface_note": "A SolidCraft megjelenése és elemeinek elhelyezése.",
|
||||
"prefs.interval_minutes": "{n} perc",
|
||||
"prefs.invert_curved_roll_arrows": "Az íves gördülőnyilak megfordítása",
|
||||
"prefs.invert_curved_roll_arrows_note": "A nézetkocka sarkában lévő két íves nyíl a nézetet a képernyő síkjában gördíti. Be: az óramutató járásával megegyező nyíl ellentétes irányba gördít, az ellentétes nyíl pedig az óramutató járásával megegyező irányba. Ki: minden nyíl abba az irányba gördíti a nézetet, amerre ível.",
|
||||
"prefs.invert_navigator_arrows": "A nézetkocka forgatónyilainak megfordítása",
|
||||
"prefs.invert_navigator_arrows_note": "A kocka körüli nyilak úgy keringetik a kamerát, ahogy mutatnak, mint a Fusion és az Inventor esetében: a bal oldali nyíl jobbra mutat, és a kamerát jobbra lendíti. Ki: a nyíl a kockát afelé az oldal felé forgatja, amelyiken van, így a bal nyíl a kamerát balra lendíti. Az íves gördülőnyilakat ez nem érinti.",
|
||||
"prefs.keep_work_on_tab_switch": "A párbeszédablakok és eszközök nyitva tartása tervek közötti váltáskor",
|
||||
"prefs.keep_work_on_tab_switch_note": "Minden tervfül megtartja a nyitott párbeszédablakát vagy eszközét azzal együtt, amit kijelölt és beírt benne, valamint a menüszalag-fülét. A tervhez visszatérve újra ott vannak. Ki: a tervek közötti váltás megszakítja őket, és a Modell fület mutatja.",
|
||||
"prefs.labels": "Feliratok",
|
||||
@@ -2279,7 +2275,6 @@
|
||||
"prefs.navigation": "Navigáció",
|
||||
"prefs.navigation_note": "Hogyan mozgatja a nézetet az egér, az érintőpad és a 3D-egér.",
|
||||
"prefs.navigator_fit": "A modell illesztése navigátornézet-váltás után",
|
||||
"prefs.navigator_fit_note": "A nézetkocka egy lapja, sarka vagy nyila, illetve a gizmo egy tengelye a modell közepére is ránéz abból az egyetlen távolságból, amelyből minden oldalról belefér (a határoló gömbje). Amíg ez be van kapcsolva, a Kezdőnézet ugyanazt a nagyítást és középpontot használja, így az utána választott nézetek csak elfordulnak. Ki: a nézet a helyén fordul el, megtartva a célpontját és a nagyítását.",
|
||||
"prefs.network_host_remove": "Eltávolítás",
|
||||
"prefs.network_locations": "Hálózati helyek engedélyezése a tervekben",
|
||||
"prefs.network_locations_note": "Ki: egy terv másik számítógépen lévő hivatkozott fájljai (\\\\server\\share) csak az itt felsorolt kiszolgálókról nyílnak meg, vagy miután kérdésre engedélyez egyet.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Buat Issue…",
|
||||
"Cross curves": "Kurva silang",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter melanjutkan di GitHub.",
|
||||
"Cube": "Kubus",
|
||||
"Current orthographic view (1:1 mm)": "Tampilan ortografis saat ini (1:1 mm)",
|
||||
"Current perspective view": "Tampilan perspektif saat ini",
|
||||
"Current plane": "Bidang saat ini",
|
||||
@@ -2240,9 +2239,6 @@
|
||||
"prefs.interface_note": "Tampilan SolidCraft dan letak bagian-bagiannya.",
|
||||
"prefs.interval_minutes": "{n} mnt",
|
||||
"prefs.invert_curved_roll_arrows": "Balikkan panah roll melengkung",
|
||||
"prefs.invert_curved_roll_arrows_note": "Dua panah melengkung di sudut kubus memutar (roll) tampilan di dalam bidang layar. Aktif: panah searah jarum jam memutar berlawanan arah jarum jam dan panah berlawanan arah jarum jam memutar searah jarum jam. Mati: tiap panah memutar tampilan sesuai arah lengkungannya.",
|
||||
"prefs.invert_navigator_arrows": "Balikkan panah rotasi kubus tampilan",
|
||||
"prefs.invert_navigator_arrows_note": "Panah di sekeliling kubus memutar orbit kamera ke arah yang ditunjuknya, seperti di Fusion dan Inventor: panah di kiri menunjuk ke kanan dan mengayunkan kamera ke kanan. Mati: panah memutar kubus ke sisi tempatnya berada, sehingga panah kiri mengayunkan kamera ke kiri. Panah roll yang melengkung tidak terpengaruh.",
|
||||
"prefs.keep_work_on_tab_switch": "Biarkan dialog dan alat tetap terbuka saat berpindah desain",
|
||||
"prefs.keep_work_on_tab_switch_note": "Setiap tab desain mempertahankan dialog atau alat yang terbuka, beserta apa yang Anda pilih dan ketik di dalamnya, dan tab toolbar-nya. Semuanya kembali saat Anda kembali ke desain itu. Mati: berpindah desain membatalkannya dan menampilkan tab Model.",
|
||||
"prefs.labels": "Label",
|
||||
@@ -2279,7 +2275,6 @@
|
||||
"prefs.navigation": "Navigasi",
|
||||
"prefs.navigation_note": "Cara mouse, trackpad, dan mouse 3D menggerakkan tampilan.",
|
||||
"prefs.navigator_fit": "Buat model pas di tampilan setelah perubahan tampilan lewat navigator",
|
||||
"prefs.navigator_fit_note": "Sebuah muka, sudut, atau panah pada kubus tampilan, atau sumbu pada gizmo, juga menghadap ke tengah model dari satu jarak yang membuatnya pas dari segala sisi (bola pembatasnya). Awal memakai zoom dan pusat yang sama selama opsi ini aktif, sehingga tampilan yang dipilih setelahnya hanya berputar. Mati: tampilan berputar di tempat, dengan target dan zoom tetap.",
|
||||
"prefs.network_host_remove": "Hapus",
|
||||
"prefs.network_locations": "Izinkan lokasi jaringan di desain",
|
||||
"prefs.network_locations_note": "Nonaktif: file tertaut sebuah desain di komputer lain (\\\\server\\share) hanya dibuka dari server yang tercantum di sini, atau setelah Anda mengizinkan salah satunya saat ditanya.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Crea segnalazione…",
|
||||
"Cross curves": "Curve trasversali",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter continua su GitHub.",
|
||||
"Cube": "Cubo",
|
||||
"Current orthographic view (1:1 mm)": "Vista ortografica corrente (1:1 mm)",
|
||||
"Current perspective view": "Vista prospettica corrente",
|
||||
"Current plane": "Piano corrente",
|
||||
@@ -2683,9 +2682,6 @@
|
||||
"prefs.interface_note": "Aspetto di SolidCraft e disposizione dei suoi elementi.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Inverti le frecce curve di rollio",
|
||||
"prefs.invert_curved_roll_arrows_note": "Le due frecce curve all'angolo del cubo fanno ruotare la vista nel piano dello schermo. Attivato: la freccia oraria ruota in senso antiorario e la freccia antioraria ruota in senso orario. Disattivato: ogni freccia ruota la vista nel verso in cui si curva.",
|
||||
"prefs.invert_navigator_arrows": "Inverti le frecce di rotazione del cubo della vista",
|
||||
"prefs.invert_navigator_arrows_note": "Le frecce attorno al cubo fanno orbitare la camera nella direzione in cui puntano, come in Fusion e Inventor: la freccia a sinistra punta a destra e sposta la camera a destra. Disattivato: una freccia ruota il cubo verso il lato in cui si trova, quindi la freccia sinistra sposta la camera a sinistra. Le frecce curve di rollio non sono interessate.",
|
||||
"prefs.keep_unsaved_also_asks": "Chiedi comunque alla chiusura della scheda",
|
||||
"prefs.keep_unsaved_also_asks_tip": "Se disattivato, la scheda si chiude senza la finestra del browser quando la copia di ogni progetto non salvato è aggiornata.",
|
||||
"prefs.keep_unsaved_in_browser": "Conserva il lavoro non salvato in questo browser",
|
||||
@@ -2745,7 +2741,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Disattivato: mentre le frecce di Sposta trascinano un componente, niente sotto il puntatore viene evidenziato, così i grandi assiemi restano fluidi. Con una sezione o un'analisi visibile viene evidenziato comunque, e un pezzo trascinato lungo i suoi giunti non lo evidenzia mai.",
|
||||
"prefs.navigation": "Navigazione",
|
||||
"prefs.navigation.axes_signed": "Assi",
|
||||
"prefs.navigation.cube_compact": "Cubo",
|
||||
"prefs.navigation.device": "Dispositivo",
|
||||
"prefs.navigation.free": "Libera",
|
||||
"prefs.navigation.orbit_style": "Stile di orbita",
|
||||
@@ -2753,7 +2748,6 @@
|
||||
"prefs.navigation.turntable": "Piatto girevole",
|
||||
"prefs.navigation_note": "Come mouse, trackpad e mouse 3D spostano la vista.",
|
||||
"prefs.navigator_fit": "Adatta il modello dopo un cambio di vista dal navigatore",
|
||||
"prefs.navigator_fit_note": "Una faccia, un angolo o una freccia del cubo della vista, o un asse del gizmo, guarda anche il centro del modello dall'unica distanza che lo inquadra da ogni lato (la sua sfera di ingombro). Inizio usa lo stesso zoom e lo stesso centro finché questa opzione è attiva, quindi le viste scelte dopo si limitano a ruotare. Disattivato: la vista ruota sul posto, mantenendo punto di mira e zoom.",
|
||||
"prefs.network_host_remove": "Rimuovi",
|
||||
"prefs.network_locations": "Consenti posizioni di rete nei progetti",
|
||||
"prefs.network_locations_note": "Disattivato: i file collegati di un progetto su un altro computer (\\\\server\\share) vengono aperti solo dai server elencati qui, o dopo che ne consenti uno quando richiesto.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Issueを作成…",
|
||||
"Cross curves": "交差する曲線",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+EnterでGitHubに進みます。",
|
||||
"Cube": "キューブ",
|
||||
"Current orthographic view (1:1 mm)": "現在の平行投影(実寸・mm)",
|
||||
"Current perspective view": "現在の透視投影",
|
||||
"Current plane": "現在の平面",
|
||||
@@ -2683,9 +2682,9 @@
|
||||
"prefs.interface_note": "SolidCraft の外観と各パネルの配置。",
|
||||
"prefs.interval_minutes": "{n} 分",
|
||||
"prefs.invert_curved_roll_arrows": "カーブしたロール矢印を反転",
|
||||
"prefs.invert_curved_roll_arrows_note": "キューブの隅にある2つのカーブした矢印は、画面内でビューをロールします。オン: 時計回りの矢印が反時計回りに、反時計回りの矢印が時計回りにロールします。オフ: 各矢印は、そのカーブの向きにビューをロールします。",
|
||||
"prefs.invert_navigator_arrows": "ビューキューブの回転矢印を反転",
|
||||
"prefs.invert_navigator_arrows_note": "キューブの周りの矢印が、矢印の指す方向にカメラを回します(Fusion や Inventor と同じ動き):左の矢印は右を指し、カメラを右に振ります。オフ: 矢印は、そのある面の方へキューブを回すため、左の矢印はカメラを左に振ります。カーブしたロール矢印は影響を受けません。",
|
||||
"prefs.invert_curved_roll_arrows_note": "ナビゲーターの隅にある2つのカーブした矢印は、画面内でビューをロールします。オン: 時計回りの矢印が反時計回りに、反時計回りの矢印が時計回りにロールします。オフ: 各矢印は、そのカーブの向きにビューをロールします。",
|
||||
"prefs.invert_navigator_arrows": "ナビゲーターの回転矢印を反転",
|
||||
"prefs.invert_navigator_arrows_note": "ナビゲーターの周りの矢印が、矢印の指す方向にカメラを回します(Fusion や Inventor と同じ動き):左の矢印は右を指し、カメラを右に振ります。オフ: 矢印は、その側へビューを回すため、左の矢印はカメラを左に振ります。カーブしたロール矢印は影響を受けません。",
|
||||
"prefs.keep_unsaved_also_asks": "タブを閉じるときにも確認する",
|
||||
"prefs.keep_unsaved_also_asks_tip": "オフにすると、未保存の各デザインのコピーが最新であれば、ブラウザーの確認なしでタブが閉じます。",
|
||||
"prefs.keep_unsaved_in_browser": "未保存の作業をこのブラウザーに保持する",
|
||||
@@ -2745,7 +2744,6 @@
|
||||
"prefs.move_drag_highlights_tip": "オフ: 移動の矢印でコンポーネントをドラッグしている間はポインターの下をハイライトしないため、大きなアセンブリでも滑らかに動きます。断面や解析を表示中は通常どおりハイライトし、ジョイントに沿ってドラッグする部品ではハイライトしません。",
|
||||
"prefs.navigation": "ナビゲーション",
|
||||
"prefs.navigation.axes_signed": "軸",
|
||||
"prefs.navigation.cube_compact": "キューブ",
|
||||
"prefs.navigation.device": "デバイス",
|
||||
"prefs.navigation.free": "自由",
|
||||
"prefs.navigation.orbit_style": "回転方式",
|
||||
@@ -2753,7 +2751,7 @@
|
||||
"prefs.navigation.turntable": "ターンテーブル",
|
||||
"prefs.navigation_note": "マウス、トラックパッド、3Dマウスによるビューの操作。",
|
||||
"prefs.navigator_fit": "ナビゲーターでの視点変更後にモデルを全体表示",
|
||||
"prefs.navigator_fit_note": "キューブの面・角・矢印やギズモの軸をクリックすると、どの方向からでも全体が収まる一定の距離(外接球)からモデルの中心を見ます。オンの間はホームビューも同じズームと中心を使うため、その後に選んだ視点は向きだけが変わります。オフ: 視点はその場で回転し、注視点とズームを保ちます。",
|
||||
"prefs.navigator_fit_note": "ナビゲーターの面・角・矢印やギズモの軸をクリックすると、どの方向からでも全体が収まる一定の距離(外接球)からモデルの中心を見ます。オンの間はホームビューも同じズームと中心を使うため、その後に選んだ視点は向きだけが変わります。オフ: 視点はその場で回転し、注視点とズームを保ちます。",
|
||||
"prefs.network_host_remove": "削除",
|
||||
"prefs.network_locations": "デザイン内のネットワーク上の場所を許可",
|
||||
"prefs.network_locations_note": "ファイルサーバーでデザインを管理する組織向け。オフの場合は許可したサーバーのみ。",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "შეტყობინების შექმნა…",
|
||||
"Cross curves": "განივი მრუდები",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter-ით GitHub-ზე გააგრძელებთ.",
|
||||
"Cube": "კუბი",
|
||||
"Current orthographic view (1:1 mm)": "მიმდინარე ორთოგრაფიული ხედი (1:1 mm)",
|
||||
"Current perspective view": "მიმდინარე პერსპექტიული ხედი",
|
||||
"Current plane": "მიმდინარე სიბრტყე",
|
||||
@@ -2316,9 +2315,6 @@
|
||||
"prefs.interface_note": "როგორ გამოიყურება SolidCraft და სად არის მისი ნაწილები.",
|
||||
"prefs.interval_minutes": "{n} წთ",
|
||||
"prefs.invert_curved_roll_arrows": "გორების მრუდე ისრების შებრუნება",
|
||||
"prefs.invert_curved_roll_arrows_note": "კუბის კუთხესთან მდებარე ორი მრუდე ისარი ხედს ეკრანის სიბრტყეში აგორებს. ჩართული: საათის ისრის მიმართულების ისარი საათის ისრის საწინააღმდეგოდ აგორებს, საწინააღმდეგო კი — საათის ისრის მიმართულებით. გამორთული: თითოეული ისარი ხედს თავისი მოხრის მიმართულებით აგორებს.",
|
||||
"prefs.invert_navigator_arrows": "ხედის კუბის ბრუნვის ისრების შებრუნება",
|
||||
"prefs.invert_navigator_arrows_note": "კუბის გარშემო ისრები კამერას ორბიტაზე იმ მიმართულებით ატრიალებს, საითაც მიუთითებს, როგორც Fusion-სა და Inventor-ში: მარცხენა ისარი მარჯვნივ მიუთითებს და კამერას მარჯვნივ აბრუნებს. გამორთული: ისარი კუბს იმ მხრისკენ აბრუნებს, რომელზეც მდებარეობს, ამიტომ მარცხენა ისარი კამერას მარცხნივ აბრუნებს. გორების მრუდე ისრებზე ეს არ მოქმედებს.",
|
||||
"prefs.keep_work_on_tab_switch": "პროექტებს შორის გადართვისას დიალოგებისა და ხელსაწყოების ღიად დატოვება",
|
||||
"prefs.keep_work_on_tab_switch_note": "პროექტის თითოეული ჩანართი ინარჩუნებს თავის ღია დიალოგს ან ხელსაწყოს, მასში არჩეულსა და აკრეფილს, და ხელსაწყოთა ზოლის ჩანართს. პროექტში დაბრუნებისას ისინი ისევ იქ დაგხვდებათ. გამორთული: პროექტების გადართვა მათ აუქმებს და „მოდელის“ ჩანართს აჩვენებს.",
|
||||
"prefs.labels": "წარწერები",
|
||||
@@ -2355,7 +2351,6 @@
|
||||
"prefs.navigation": "ნავიგაცია",
|
||||
"prefs.navigation_note": "როგორ ამოძრავებს ხედს მაუსი, სენსორული პანელი და 3D მაუსი.",
|
||||
"prefs.navigator_fit": "ნავიგატორით ხედის შეცვლის შემდეგ მოდელის ჩატევა",
|
||||
"prefs.navigator_fit_note": "ხედის კუბის წახნაგი, კუთხე ან ისარი, ან მანიპულატორის ღერძი ასევე მოდელის შუაგულს უყურებს ერთი მანძილიდან, საიდანაც ის ყველა მხრიდან ეტევა (მისი შემომსაზღვრელი სფერო). სანამ ეს ჩართულია, საწყისი ხედი იმავე მასშტაბსა და ცენტრს იყენებს, ამიტომ მის შემდეგ არჩეული ხედები მხოლოდ ბრუნავს. გამორთული: ხედი ადგილზე ბრუნავს, სამიზნისა და მასშტაბის შენარჩუნებით.",
|
||||
"prefs.network_host_remove": "წაშლა",
|
||||
"prefs.network_locations": "პროექტებში ქსელური მდებარეობების დაშვება",
|
||||
"prefs.network_locations_note": "ორგანიზაციებისთვის, რომლებიც პროექტებს ფაილურ სერვერებზე ინახავენ. გამორთული: მხოლოდ თქვენ მიერ დაშვებული სერვერები.",
|
||||
|
||||
@@ -151,7 +151,6 @@
|
||||
"Create Issue — review draft": "이슈 만들기 — 초안 검토",
|
||||
"Create Issue…": "이슈 만들기…",
|
||||
"Cross curves": "교차 곡선",
|
||||
"Cube": "큐브",
|
||||
"Current orthographic view (1:1 mm)": "현재 직교 투영 뷰 (1:1 mm)",
|
||||
"Current perspective view": "현재 원근 투영 뷰",
|
||||
"Current plane": "현재 평면",
|
||||
@@ -2083,7 +2082,6 @@
|
||||
"prefs.move_drag_highlights_tip": "끄면 이동 화살표로 구성 요소를 끄는 동안 포인터 아래 항목을 강조 표시하지 않아 큰 어셈블리도 부드럽게 움직입니다. 단면이나 해석이 표시된 동안에는 그대로 강조 표시하며, 조인트를 따라 끄는 부품은 강조 표시하지 않습니다.",
|
||||
"prefs.navigation": "탐색",
|
||||
"prefs.navigation.axes_signed": "축",
|
||||
"prefs.navigation.cube_compact": "큐브",
|
||||
"prefs.navigation.device": "장치",
|
||||
"prefs.navigation.free": "자유",
|
||||
"prefs.navigation.orbit_style": "회전 방식",
|
||||
@@ -2091,7 +2089,6 @@
|
||||
"prefs.navigation.turntable": "턴테이블",
|
||||
"prefs.navigation_note": "마우스, 트랙패드, 3D 마우스로 뷰를 움직이는 방식입니다.",
|
||||
"prefs.navigator_fit": "뷰 탐색기로 뷰를 바꾼 뒤 모델 맞춤",
|
||||
"prefs.navigator_fit_note": "큐브의 면, 모서리, 화살표나 기즈모의 축을 클릭하면 어느 방향에서든 전체가 들어가는 한 거리(경계 구)에서 모델의 중심을 바라봅니다. 켜져 있는 동안 홈 뷰도 같은 확대/축소와 중심을 쓰므로 그 뒤에 고른 뷰는 방향만 바뀝니다. 끄면 뷰가 제자리에서 회전하며 대상과 확대/축소를 유지합니다.",
|
||||
"prefs.network_locations_note": "파일 서버에 디자인을 보관하는 조직용입니다. 끄면 허용한 서버만 사용합니다.",
|
||||
"prefs.not_on_gpu": "이 GPU에서는 사용할 수 없음",
|
||||
"prefs.on": "켜짐",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Izveidot ziņojumu…",
|
||||
"Cross curves": "Šķērslīknes",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter turpina GitHub vietnē.",
|
||||
"Cube": "Kubs",
|
||||
"Current orthographic view (1:1 mm)": "Pašreizējais ortogrāfiskais skats (1:1 mm)",
|
||||
"Current perspective view": "Pašreizējais perspektīvas skats",
|
||||
"Current plane": "Pašreizējā plakne",
|
||||
@@ -2683,9 +2682,6 @@
|
||||
"prefs.interface_note": "Kā izskatās SolidCraft un kur atrodas tā daļas.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Apgriezt izliektās griešanas bultas",
|
||||
"prefs.invert_curved_roll_arrows_note": "Divas izliektās bultas kuba stūrī griež skatu ekrāna plaknē. Ieslēgts: pulksteņrādītāja virziena bulta griež pretēji pulksteņrādītājam, bet pretējā virziena bulta griež pulksteņrādītāja virzienā. Izslēgts: katra bulta griež skatu tā, kā tā ir izliekta.",
|
||||
"prefs.invert_navigator_arrows": "Apgriezt skata kuba rotācijas bultas",
|
||||
"prefs.invert_navigator_arrows_note": "Bultas ap kubu orbitē kameru tajā virzienā, kurp tās norāda, kā Fusion un Inventor: kreisā bulta norāda pa labi un pagriež kameru pa labi. Izslēgts: bulta pagriež kubu uz to pusi, kurā tā atrodas, tāpēc kreisā bulta pagriež kameru pa kreisi. Izliektās griešanas bultas netiek ietekmētas.",
|
||||
"prefs.keep_unsaved_also_asks": "Tomēr jautāt, kad cilne tiek aizvērta",
|
||||
"prefs.keep_unsaved_also_asks_tip": "Ja šis ir izslēgts, cilne aizveras bez pārlūka dialoga, tiklīdz katra nesaglabātā modeļa kopija ir aktuāla.",
|
||||
"prefs.keep_unsaved_in_browser": "Glabāt nesaglabāto darbu šajā pārlūkā",
|
||||
@@ -2745,7 +2741,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Izslēgts: kamēr Pārvietot bultiņas velk komponenti, nekas zem kursora netiek izcelts, tāpēc lielas montāžas darbojas raiti. Ja tiek rādīts šķērsgriezums vai analīze, izcelšana notiek tik un tā, bet, velkot detaļu pa tās savienojumiem, tā nenotiek nekad.",
|
||||
"prefs.navigation": "Navigācija",
|
||||
"prefs.navigation.axes_signed": "Asis",
|
||||
"prefs.navigation.cube_compact": "Kubs",
|
||||
"prefs.navigation.device": "Ierīce",
|
||||
"prefs.navigation.free": "Brīvs",
|
||||
"prefs.navigation.orbit_style": "Orbitēšanas stils",
|
||||
@@ -2753,7 +2748,6 @@
|
||||
"prefs.navigation.turntable": "Grozāmgalds",
|
||||
"prefs.navigation_note": "Kā pele, skārienpaliktnis un 3D pele pārvieto skatu.",
|
||||
"prefs.navigator_fit": "Ietilpināt modeli pēc navigatora skata maiņas",
|
||||
"prefs.navigator_fit_note": "Skata kuba skaldne, stūris vai bulta vai gizmo ass arī vērš skatu uz modeļa vidu no tāda attāluma, kas to ietilpina no jebkuras puses (tā aptverošā sfēra). Kamēr šis ir ieslēgts, Sākums izmanto to pašu tālummaiņu un centru, tāpēc pēc tam izvēlētie skati tikai pagriežas. Izslēgts: skats pagriežas uz vietas, saglabājot savu mērķi un tālummaiņu.",
|
||||
"prefs.network_host_remove": "Noņemt",
|
||||
"prefs.network_locations": "Atļaut tīkla atrašanās vietas modeļos",
|
||||
"prefs.network_locations_note": "Organizācijām, kas glabā modeļus failu serveros. Izslēgts: tikai jūsu atļautie serveri.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Cipta Isu…",
|
||||
"Cross curves": "Lengkung silang",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter meneruskan di GitHub.",
|
||||
"Cube": "Kubus",
|
||||
"Current orthographic view (1:1 mm)": "Pandangan ortografik semasa (1:1 mm)",
|
||||
"Current perspective view": "Pandangan perspektif semasa",
|
||||
"Current plane": "Satah semasa",
|
||||
@@ -2240,9 +2239,6 @@
|
||||
"prefs.interface_note": "Rupa SolidCraft dan kedudukan bahagiannya.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Songsangkan anak panah gelek melengkung",
|
||||
"prefs.invert_curved_roll_arrows_note": "Dua anak panah melengkung di sudut kubus menggelek pandangan dalam satah skrin. Hidup: anak panah ikut arah jam menggelek lawan arah jam dan anak panah lawan arah jam menggelek ikut arah jam. Mati: setiap anak panah menggelek pandangan mengikut arah lengkungannya.",
|
||||
"prefs.invert_navigator_arrows": "Songsangkan anak panah putaran kubus pandangan",
|
||||
"prefs.invert_navigator_arrows_note": "Anak panah di sekeliling kubus mengorbit kamera mengikut arah yang ditunjuknya, seperti dalam Fusion dan Inventor: anak panah di kiri menunjuk ke kanan dan mengayunkan kamera ke kanan. Mati: anak panah memutarkan kubus ke arah sisi tempat ia berada, jadi anak panah kiri mengayunkan kamera ke kiri. Anak panah gelek yang melengkung tidak terjejas.",
|
||||
"prefs.keep_work_on_tab_switch": "Kekalkan dialog dan alat terbuka apabila menukar reka bentuk",
|
||||
"prefs.keep_work_on_tab_switch_note": "Setiap tab reka bentuk mengekalkan dialog atau alat yang dibukanya, bersama apa yang anda pilih dan taip di dalamnya, serta tab bar alatnya. Semuanya ada semula apabila anda kembali ke reka bentuk itu. Mati: menukar reka bentuk membatalkannya dan menunjukkan tab Model.",
|
||||
"prefs.labels": "Label",
|
||||
@@ -2279,7 +2275,6 @@
|
||||
"prefs.navigation": "Navigasi",
|
||||
"prefs.navigation_note": "Cara tetikus, pad jejak dan tetikus 3D menggerakkan pandangan.",
|
||||
"prefs.navigator_fit": "Muatkan model selepas perubahan pandangan navigator",
|
||||
"prefs.navigator_fit_note": "Muka, sudut atau anak panah pada kubus pandangan, atau paksi pada gizmo, turut menghadap ke tengah model dari satu jarak yang memuatkannya dari semua sisi (sfera pembatasnya). Utama menggunakan zum dan pusat yang sama selagi ini dihidupkan, jadi pandangan yang dipilih selepasnya hanya berputar. Mati: pandangan berputar di tempat, dengan sasaran dan zumnya kekal.",
|
||||
"prefs.network_host_remove": "Buang",
|
||||
"prefs.network_locations": "Benarkan lokasi rangkaian dalam reka bentuk",
|
||||
"prefs.network_locations_note": "Dimatikan: fail terpaut bagi reka bentuk pada komputer lain (\\\\server\\share) hanya dibuka daripada pelayan yang disenaraikan di sini, atau selepas anda membenarkannya apabila ditanya.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Opprett sak…",
|
||||
"Cross curves": "Tverrkurver",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter fortsetter på GitHub.",
|
||||
"Cube": "Kube",
|
||||
"Current orthographic view (1:1 mm)": "Gjeldende ortografisk visning (1:1 mm)",
|
||||
"Current perspective view": "Gjeldende perspektivvisning",
|
||||
"Current plane": "Gjeldende plan",
|
||||
@@ -2240,9 +2239,6 @@
|
||||
"prefs.interface_note": "Hvordan SolidCraft ser ut, og hvor delene er plassert.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Inverter de krumme rullepilene",
|
||||
"prefs.invert_curved_roll_arrows_note": "De to krumme pilene i hjørnet av kuben ruller visningen i skjermplanet. På: pilen med klokken ruller mot klokken, og pilen mot klokken ruller med klokken. Av: hver pil ruller visningen i den retningen den krummer seg.",
|
||||
"prefs.invert_navigator_arrows": "Inverter rotasjonspilene på visningskuben",
|
||||
"prefs.invert_navigator_arrows_note": "Pilene rundt kuben roterer kameraet i den retningen de peker, som i Fusion og Inventor: pilen til venstre peker mot høyre og svinger kameraet mot høyre. Av: en pil roterer kuben mot siden den står på, så venstre pil svinger kameraet mot venstre. De krumme rullepilene påvirkes ikke.",
|
||||
"prefs.keep_work_on_tab_switch": "Behold dialoger og verktøy åpne når du bytter design",
|
||||
"prefs.keep_work_on_tab_switch_note": "Hver designfane beholder sin åpne dialog eller sitt åpne verktøy, med det du har valgt og skrevet i den, og sin fane på båndet. De er der igjen når du kommer tilbake til designet. Av: å bytte design avbryter dem og viser fanen Modell.",
|
||||
"prefs.labels": "Etiketter",
|
||||
@@ -2279,7 +2275,6 @@
|
||||
"prefs.navigation": "Navigasjon",
|
||||
"prefs.navigation_note": "Hvordan mus, styreflate og 3D-mus beveger visningen.",
|
||||
"prefs.navigator_fit": "Tilpass modellen etter en visningsendring fra navigatoren",
|
||||
"prefs.navigator_fit_note": "En flate, et hjørne eller en pil på visningskuben, eller en akse på orienteringsindikatoren, ser også mot midten av modellen fra den ene avstanden som får den til å passe fra alle sider (den omsluttende kulen). Hjem bruker samme zoom og senter mens dette er på, så visninger som velges etterpå bare dreier. Av: visningen dreier på stedet og beholder målpunktet og zoomen sin.",
|
||||
"prefs.network_host_remove": "Fjern",
|
||||
"prefs.network_locations": "Tillat nettverksplasseringer i design",
|
||||
"prefs.network_locations_note": "Av: lenkede filer i et design på en annen datamaskin (\\\\server\\share) åpnes bare fra serverne som er oppført her, eller etter at du har tillatt en når du blir spurt.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Issue aanmaken…",
|
||||
"Cross curves": "Kruiscurven",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter gaat verder op GitHub.",
|
||||
"Cube": "Kubus",
|
||||
"Current orthographic view (1:1 mm)": "Huidige orthografische weergave (1:1 mm)",
|
||||
"Current perspective view": "Huidige perspectiefweergave",
|
||||
"Current plane": "Huidig vlak",
|
||||
@@ -2251,9 +2250,6 @@
|
||||
"prefs.interface_note": "Hoe SolidCraft eruitziet en waar de onderdelen staan.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "De gebogen rolpijlen omkeren",
|
||||
"prefs.invert_curved_roll_arrows_note": "De twee gebogen pijlen op de hoek van de kubus laten de weergave in het schermvlak rollen. Aan: de pijl met de klok mee rolt tegen de klok in en de pijl tegen de klok in rolt met de klok mee. Uit: elke pijl rolt de weergave in de richting waarin hij krult.",
|
||||
"prefs.invert_navigator_arrows": "De rotatiepijlen van de weergavekubus omkeren",
|
||||
"prefs.invert_navigator_arrows_note": "De pijlen rond de kubus laten de camera roteren in de richting waarin ze wijzen, zoals in Fusion en Inventor: de pijl links wijst naar rechts en zwaait de camera naar rechts. Uit: een pijl draait de kubus naar de kant waar hij staat, dus de linkerpijl zwaait de camera naar links. De gebogen rolpijlen worden hierdoor niet beïnvloed.",
|
||||
"prefs.keep_work_on_tab_switch": "Dialoogvensters en gereedschappen open houden bij het wisselen van ontwerp",
|
||||
"prefs.keep_work_on_tab_switch_note": "Elk ontwerptabblad behoudt zijn geopende dialoogvenster of gereedschap, met wat je erin hebt gekozen en getypt, en zijn lint-tabblad. Ze zijn er weer als je terugkeert naar het ontwerp. Uit: wisselen van ontwerp breekt ze af en toont het tabblad Model.",
|
||||
"prefs.labels": "Labels",
|
||||
@@ -2290,7 +2286,6 @@
|
||||
"prefs.navigation": "Navigatie",
|
||||
"prefs.navigation_note": "Hoe de muis, het trackpad en de 3D-muis de weergave verplaatsen.",
|
||||
"prefs.navigator_fit": "Het model passend in beeld brengen na een wijziging van de navigatorweergave",
|
||||
"prefs.navigator_fit_note": "Een vlak, hoek of pijl van de weergavekubus, of een as van de gizmo, kijkt ook naar het midden van het model, vanaf de ene afstand waarop het van alle kanten in beeld past (de omsluitende bol). Beginweergave gebruikt dezelfde zoom en hetzelfde middelpunt zolang dit aan staat, zodat weergaven die je daarna kiest alleen draaien. Uit: de weergave draait ter plaatse en behoudt het richtpunt en de zoom.",
|
||||
"prefs.network_host_remove": "Verwijderen",
|
||||
"prefs.network_locations": "Netwerklocaties in ontwerpen toestaan",
|
||||
"prefs.network_locations_note": "Uit: gekoppelde bestanden van een ontwerp op een andere computer (\\\\server\\share) worden alleen geopend vanaf de servers in deze lijst, of nadat je er een toestaat wanneer erom wordt gevraagd.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Utwórz zgłoszenie…",
|
||||
"Cross curves": "Krzywe poprzeczne",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter przechodzi dalej na GitHubie.",
|
||||
"Cube": "Sześcian",
|
||||
"Current orthographic view (1:1 mm)": "Bieżący widok ortogonalny (1:1 mm)",
|
||||
"Current perspective view": "Bieżący widok perspektywiczny",
|
||||
"Current plane": "Bieżąca płaszczyzna",
|
||||
@@ -2659,9 +2658,6 @@
|
||||
"prefs.interface_note": "Wygląd SolidCraft i rozmieszczenie jego elementów.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Odwróć zakrzywione strzałki przechylenia",
|
||||
"prefs.invert_curved_roll_arrows_note": "Dwie zakrzywione strzałki w rogu kostki przechylają widok w płaszczyźnie ekranu. Włączone: strzałka zgodna z ruchem wskazówek zegara przechyla przeciwnie, a przeciwna – zgodnie. Wyłączone: każda strzałka przechyla widok w stronę, w którą jest zakrzywiona.",
|
||||
"prefs.invert_navigator_arrows": "Odwróć strzałki obrotu kostki widoku",
|
||||
"prefs.invert_navigator_arrows_note": "Strzałki wokół kostki obracają kamerę w kierunku, w który wskazują, jak w Fusion i Inventor: strzałka po lewej wskazuje w prawo i obraca kamerę w prawo. Wyłączone: strzałka obraca kostkę w stronę, po której się znajduje, więc lewa strzałka obraca kamerę w lewo. Zakrzywione strzałki przechylenia nie są zmieniane.",
|
||||
"prefs.keep_unsaved_also_asks": "Mimo to pytaj przy zamykaniu karty",
|
||||
"prefs.keep_unsaved_also_asks_tip": "Gdy wyłączone, karta zamyka się bez okna przeglądarki, jeśli kopia każdego niezapisanego projektu jest aktualna.",
|
||||
"prefs.keep_unsaved_in_browser": "Przechowuj niezapisaną pracę w tej przeglądarce",
|
||||
@@ -2721,7 +2717,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Wyłączone: gdy strzałki Przesuń przeciągają komponent, nic pod wskaźnikiem nie jest podświetlane, co zachowuje płynność dużych złożeń. Przy pokazanym przekroju lub analizie podświetlenie i tak działa, a część przeciągana wzdłuż złączy nigdy go nie podświetla.",
|
||||
"prefs.navigation": "Nawigacja",
|
||||
"prefs.navigation.axes_signed": "Osie",
|
||||
"prefs.navigation.cube_compact": "Kostka",
|
||||
"prefs.navigation.device": "Urządzenie",
|
||||
"prefs.navigation.free": "Swobodne",
|
||||
"prefs.navigation.orbit_style": "Styl obracania",
|
||||
@@ -2729,7 +2724,6 @@
|
||||
"prefs.navigation.turntable": "Obrotnica",
|
||||
"prefs.navigation_note": "Jak mysz, gładzik i mysz 3D poruszają widokiem.",
|
||||
"prefs.navigator_fit": "Dopasuj model po zmianie widoku w nawigatorze",
|
||||
"prefs.navigator_fit_note": "Ściana, narożnik lub strzałka kostki widoku albo oś wskaźnika orientacji kieruje też widok na środek modelu z odległości, z której mieści się on z każdej strony (jego sfera otaczająca). Gdy to jest włączone, Widok główny używa tego samego powiększenia i środka, więc widoki wybrane później tylko się obracają. Wyłączone: widok obraca się w miejscu, zachowując cel i powiększenie.",
|
||||
"prefs.network_host_remove": "Usuń",
|
||||
"prefs.network_locations": "Zezwalaj na lokalizacje sieciowe w projektach",
|
||||
"prefs.network_locations_note": "Wyłączone: połączone pliki projektu na innym komputerze (\\\\serwer\\udział) są otwierane tylko z serwerów wymienionych tutaj albo po zezwoleniu, gdy pojawi się pytanie.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Criar issue…",
|
||||
"Cross curves": "Curvas transversais",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter continua no GitHub.",
|
||||
"Cube": "Cubo",
|
||||
"Current orthographic view (1:1 mm)": "Vista ortográfica atual (1:1 mm)",
|
||||
"Current perspective view": "Vista em perspectiva atual",
|
||||
"Current plane": "Plano atual",
|
||||
@@ -2659,9 +2658,6 @@
|
||||
"prefs.interface_note": "A aparência do SolidCraft e onde ficam suas partes.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Inverter as setas curvas de rolagem",
|
||||
"prefs.invert_curved_roll_arrows_note": "As duas setas curvas no canto do cubo rolam a vista no plano da tela. Ativado: a seta horária rola no sentido anti-horário e a seta anti-horária rola no sentido horário. Desativado: cada seta rola a vista no sentido em que se curva.",
|
||||
"prefs.invert_navigator_arrows": "Inverter as setas de rotação do cubo de vista",
|
||||
"prefs.invert_navigator_arrows_note": "As setas em volta do cubo orbitam a câmera para onde apontam, como no Fusion e no Inventor: a seta da esquerda aponta para a direita e gira a câmera para a direita. Desativado: uma seta gira o cubo em direção ao lado em que está, então a seta da esquerda gira a câmera para a esquerda. As setas curvas de rolagem não são afetadas.",
|
||||
"prefs.keep_unsaved_also_asks": "Perguntar mesmo assim ao fechar a aba",
|
||||
"prefs.keep_unsaved_also_asks_tip": "Com isto desativado, a aba fecha sem a caixa do navegador quando a cópia de cada projeto não salvo estiver atualizada.",
|
||||
"prefs.keep_unsaved_in_browser": "Guardar trabalho não salvo neste navegador",
|
||||
@@ -2721,7 +2717,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Desativado: enquanto as setas de Mover arrastam um componente, nada sob o ponteiro é destacado, o que mantém montagens grandes fluidas. Com um corte ou uma análise exibidos, o destaque acontece mesmo assim, e uma peça arrastada ao longo de suas juntas nunca o destaca.",
|
||||
"prefs.navigation": "Navegação",
|
||||
"prefs.navigation.axes_signed": "Eixos",
|
||||
"prefs.navigation.cube_compact": "Cubo",
|
||||
"prefs.navigation.device": "Dispositivo",
|
||||
"prefs.navigation.free": "Livre",
|
||||
"prefs.navigation.orbit_style": "Estilo de órbita",
|
||||
@@ -2729,7 +2724,6 @@
|
||||
"prefs.navigation.turntable": "Mesa giratória",
|
||||
"prefs.navigation_note": "Como o mouse, o trackpad e o mouse 3D movem a vista.",
|
||||
"prefs.navigator_fit": "Ajustar o modelo após uma mudança de vista do navegador",
|
||||
"prefs.navigator_fit_note": "Uma face, um canto ou uma seta do cubo de vista, ou um eixo do gizmo, também olha para o meio do modelo a partir da distância única que o enquadra de todos os lados (sua esfera envolvente). Início usa o mesmo zoom e centro enquanto isto estiver ativado, então as vistas escolhidas depois só giram. Desativado: a vista gira no lugar, mantendo seu alvo e zoom.",
|
||||
"prefs.network_host_remove": "Remover",
|
||||
"prefs.network_locations": "Permitir locais de rede nos projetos",
|
||||
"prefs.network_locations_note": "Para organizações que mantêm projetos em servidores de arquivos. Desativado: apenas servidores que você permitir.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Creează raport…",
|
||||
"Cross curves": "Curbe transversale",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter continuă pe GitHub.",
|
||||
"Cube": "Cub",
|
||||
"Current orthographic view (1:1 mm)": "Vizualizare ortografică curentă (1:1 mm)",
|
||||
"Current perspective view": "Vizualizare în perspectivă curentă",
|
||||
"Current plane": "Planul curent",
|
||||
@@ -2240,9 +2239,6 @@
|
||||
"prefs.interface_note": "Cum arată SolidCraft și unde sunt așezate elementele sale.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Inversează săgețile curbe de ruliu",
|
||||
"prefs.invert_curved_roll_arrows_note": "Cele două săgeți curbe din colțul cubului rotesc vizualizarea în planul ecranului. Activat: săgeata în sens orar rotește în sens antiorar, iar săgeata în sens antiorar rotește în sens orar. Dezactivat: fiecare săgeată rotește vizualizarea în direcția în care se curbează.",
|
||||
"prefs.invert_navigator_arrows": "Inversează săgețile de rotație ale cubului de vizualizare",
|
||||
"prefs.invert_navigator_arrows_note": "Săgețile din jurul cubului rotesc camera în jurul modelului în direcția în care indică, ca în Fusion și Inventor: săgeata din stânga indică spre dreapta și rotește camera spre dreapta. Dezactivat: o săgeată rotește cubul spre partea pe care se află, deci săgeata din stânga rotește camera spre stânga. Săgețile curbe de ruliu nu sunt afectate.",
|
||||
"prefs.keep_work_on_tab_switch": "Păstrează deschise dialogurile și instrumentele la schimbarea proiectului",
|
||||
"prefs.keep_work_on_tab_switch_note": "Fiecare filă de proiect își păstrează dialogul sau instrumentul deschis, cu ce ați ales și ați tastat în el, și fila ei din bara de instrumente. Le regăsiți când reveniți la proiect. Dezactivat: schimbarea proiectului le anulează și afișează fila Model.",
|
||||
"prefs.labels": "Etichete",
|
||||
@@ -2279,7 +2275,6 @@
|
||||
"prefs.navigation": "Navigare",
|
||||
"prefs.navigation_note": "Cum mută vizualizarea mouse-ul, trackpadul și mouse-ul 3D.",
|
||||
"prefs.navigator_fit": "Potrivește modelul după o schimbare de vizualizare din navigator",
|
||||
"prefs.navigator_fit_note": "O față, un colț sau o săgeată a cubului de vizualizare ori o axă a reperului de orientare privește și spre mijlocul modelului, de la singura distanță care îl cuprinde din toate părțile (sfera lui de încadrare). Acasă folosește același zoom și același centru cât timp opțiunea este activată, așa că vizualizările alese după aceea doar se rotesc. Dezactivat: vizualizarea se rotește pe loc, păstrându-și ținta și zoomul.",
|
||||
"prefs.network_host_remove": "Elimină",
|
||||
"prefs.network_locations": "Permite locațiile de rețea în proiecte",
|
||||
"prefs.network_locations_note": "Dezactivat: fișierele legate ale unui proiect aflate pe alt computer (\\\\server\\share) se deschid doar de pe serverele listate aici sau după ce permiteți unul, când vi se cere.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Создать Issue…",
|
||||
"Cross curves": "Поперечные кривые",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter — продолжить на GitHub.",
|
||||
"Cube": "Куб",
|
||||
"Current orthographic view (1:1 mm)": "Текущий ортогональный вид (1:1 мм)",
|
||||
"Current perspective view": "Текущий перспективный вид",
|
||||
"Current plane": "Текущая плоскость",
|
||||
@@ -2232,9 +2231,6 @@
|
||||
"prefs.interface_note": "Как выглядит SolidCraft и где расположены его части.",
|
||||
"prefs.interval_minutes": "{n} мин",
|
||||
"prefs.invert_curved_roll_arrows": "Инвертировать изогнутые стрелки крена",
|
||||
"prefs.invert_curved_roll_arrows_note": "Две изогнутые стрелки в углу куба поворачивают вид в плоскости экрана. Вкл.: стрелка по часовой стрелке поворачивает вид против часовой, а стрелка против часовой — по часовой. Выкл.: каждая стрелка поворачивает вид в ту сторону, куда она изогнута.",
|
||||
"prefs.invert_navigator_arrows": "Инвертировать стрелки вращения куба видов",
|
||||
"prefs.invert_navigator_arrows_note": "Стрелки вокруг куба вращают камеру в ту сторону, куда указывают, как в Fusion и Inventor: стрелка слева указывает вправо и поворачивает камеру вправо. Выкл.: стрелка поворачивает куб в сторону, где она расположена, поэтому левая стрелка поворачивает камеру влево. Изогнутые стрелки крена не затрагиваются.",
|
||||
"prefs.keep_work_on_tab_switch": "Сохранять открытые диалоги и инструменты при переключении между дизайнами",
|
||||
"prefs.keep_work_on_tab_switch_note": "Каждая вкладка дизайна сохраняет свой открытый диалог или инструмент вместе с тем, что вы в нём выбрали и ввели, а также свою вкладку панели инструментов. Они снова на месте, когда вы возвращаетесь к дизайну. Выкл.: при переключении дизайнов они отменяются, и показывается вкладка «Модель».",
|
||||
"prefs.labels": "Подписи",
|
||||
@@ -2271,7 +2267,6 @@
|
||||
"prefs.navigation": "Навигация",
|
||||
"prefs.navigation_note": "Как мышь, тачпад и 3D-мышь двигают вид.",
|
||||
"prefs.navigator_fit": "Вписывать модель после смены вида в навигаторе",
|
||||
"prefs.navigator_fit_note": "Грань, угол или стрелка куба видов либо ось гизмо также направляет взгляд на середину модели с единственного расстояния, с которого она целиком видна со всех сторон (её габаритная сфера). «Главная» при включённом параметре использует тот же масштаб и центр, поэтому выбранные после неё виды только поворачиваются. Выкл.: вид поворачивается на месте, сохраняя свою цель и масштаб.",
|
||||
"prefs.network_host_remove": "Убрать",
|
||||
"prefs.network_locations": "Разрешить сетевые расположения в дизайнах",
|
||||
"prefs.network_locations_note": "Выкл.: связанные файлы дизайна на другом компьютере (\\\\server\\share) открываются только с перечисленных здесь серверов или после того, как вы разрешите сервер по запросу.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Пријави проблем…",
|
||||
"Cross curves": "Пресечне криве",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter наставља на GitHub-у.",
|
||||
"Cube": "Коцка",
|
||||
"Current orthographic view (1:1 mm)": "Тренутни ортографски приказ (1:1 mm)",
|
||||
"Current perspective view": "Тренутни перспективни приказ",
|
||||
"Current plane": "Тренутна раван",
|
||||
@@ -2240,9 +2239,6 @@
|
||||
"prefs.interface_note": "Како SolidCraft изгледа и где су његови делови.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Обрни закривљене стрелице за ваљање",
|
||||
"prefs.invert_curved_roll_arrows_note": "Две закривљене стрелице у углу коцке ваљају приказ унутар равни екрана. Укључено: стрелица у смеру казаљке на сату ваља приказ супротно од смера казаљке на сату, а стрелица супротно од смера казаљке на сату ваља га у смеру казаљке на сату. Искључено: свака стрелица ваља приказ онако како је закривљена.",
|
||||
"prefs.invert_navigator_arrows": "Обрни стрелице за ротацију коцке приказа",
|
||||
"prefs.invert_navigator_arrows_note": "Стрелице око коцке орбитирају камеру у смеру у којем показују, као у програмима Fusion и Inventor: стрелица са леве стране показује удесно и закреће камеру удесно. Искључено: стрелица окреће коцку ка страни на којој се налази, па лева стрелица закреће камеру улево. Подешавање не утиче на закривљене стрелице за ваљање.",
|
||||
"prefs.keep_work_on_tab_switch": "Задржи дијалоге и алате отвореним при пребацивању између дизајна",
|
||||
"prefs.keep_work_on_tab_switch_note": "Свака картица дизајна задржава свој отворени дијалог или алат, са оним што сте у њему изабрали и уписали, те своју картицу траке са алатима. Када се вратите на дизајн, поново су ту. Искључено: пребацивање између дизајна отказује их и приказује картицу Модел.",
|
||||
"prefs.labels": "Ознаке",
|
||||
@@ -2279,7 +2275,6 @@
|
||||
"prefs.navigation": "Навигација",
|
||||
"prefs.navigation_note": "Како миш, додирна табла и 3D миш померају приказ.",
|
||||
"prefs.navigator_fit": "Уклопи модел након промене приказа у навигатору",
|
||||
"prefs.navigator_fit_note": "Лице, угао или стрелица коцке приказа, односно оса гизма оријентације, такође усмерава поглед на средину модела са једног растојања на којем се уклапа из сваког смера (његова гранична сфера). Почетни приказ користи исти зум и центар док је ова опција укључена, па се прикази које изаберете после њега само окрећу. Искључено: приказ се окреће на месту и задржава свој циљ и зум.",
|
||||
"prefs.network_host_remove": "Уклони",
|
||||
"prefs.network_locations": "Дозволи мрежне локације у дизајнима",
|
||||
"prefs.network_locations_note": "Искључено: повезане датотеке дизајна на другом рачунару (\\\\server\\share) отварају се само са сервера наведених овде или након што га дозволите када се то затражи.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Skapa ärende…",
|
||||
"Cross curves": "Korskurvor",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter fortsätter på GitHub.",
|
||||
"Cube": "Kub",
|
||||
"Current orthographic view (1:1 mm)": "Aktuell ortografisk vy (1:1 mm)",
|
||||
"Current perspective view": "Aktuell perspektivvy",
|
||||
"Current plane": "Aktuellt plan",
|
||||
@@ -2241,9 +2240,6 @@
|
||||
"prefs.interface_note": "Hur SolidCraft ser ut och var dess delar placeras.",
|
||||
"prefs.interval_minutes": "{n} min",
|
||||
"prefs.invert_curved_roll_arrows": "Invertera de böjda rullningspilarna",
|
||||
"prefs.invert_curved_roll_arrows_note": "De två böjda pilarna vid kubens hörn rullar vyn i skärmplanet. På: medurspilen rullar moturs och moturspilen rullar medurs. Av: varje pil rullar vyn åt det håll den kröker sig.",
|
||||
"prefs.invert_navigator_arrows": "Invertera rotationspilarna på vykuben",
|
||||
"prefs.invert_navigator_arrows_note": "Pilarna runt kuben orbiterar kameran åt det håll de pekar, som i Fusion och Inventor: pilen till vänster pekar åt höger och svänger kameran åt höger. Av: en pil roterar kuben mot den sida den sitter på, så den vänstra pilen svänger kameran åt vänster. De böjda rullningspilarna påverkas inte.",
|
||||
"prefs.keep_work_on_tab_switch": "Behåll dialoger och verktyg öppna när du byter konstruktion",
|
||||
"prefs.keep_work_on_tab_switch_note": "Varje konstruktionsflik behåller sin öppna dialog eller sitt öppna verktyg, med det du har valt och skrivit i den, och sin flik i menyfliksområdet. De finns kvar när du kommer tillbaka till konstruktionen. Av: att byta konstruktion avbryter dem och visar fliken Modell.",
|
||||
"prefs.labels": "Etiketter",
|
||||
@@ -2280,7 +2276,6 @@
|
||||
"prefs.navigation": "Navigering",
|
||||
"prefs.navigation_note": "Hur musen, styrplattan och 3D-musen flyttar vyn.",
|
||||
"prefs.navigator_fit": "Anpassa modellen efter en vyändring i navigatorn",
|
||||
"prefs.navigator_fit_note": "En yta, ett hörn eller en pil på vykuben, eller en axel på orienteringsgizmot, tittar också mot modellens mitt från det enda avstånd som får den att rymmas från alla sidor (dess begränsningssfär). Hem använder samma zoom och centrum medan detta är på, så vyer som väljs efteråt bara vrids. Av: vyn vrids på stället och behåller sitt mål och sin zoom.",
|
||||
"prefs.network_host_remove": "Ta bort",
|
||||
"prefs.network_locations": "Tillåt nätverksplatser i konstruktioner",
|
||||
"prefs.network_locations_note": "Av: en konstruktions länkade filer på en annan dator (\\\\server\\share) öppnas bara från de servrar som listas här, eller efter att du tillåtit en när du tillfrågas.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "Sorun Oluştur…",
|
||||
"Cross curves": "Çapraz eğriler",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter ile GitHub'da devam edilir.",
|
||||
"Cube": "Küp",
|
||||
"Current orthographic view (1:1 mm)": "Geçerli ortografik görünüm (1:1 mm)",
|
||||
"Current perspective view": "Geçerli perspektif görünüm",
|
||||
"Current plane": "Geçerli düzlem",
|
||||
@@ -2240,9 +2239,6 @@
|
||||
"prefs.interface_note": "SolidCraft'ın nasıl göründüğü ve parçalarının nerede durduğu.",
|
||||
"prefs.interval_minutes": "{n} dk",
|
||||
"prefs.invert_curved_roll_arrows": "Eğri yuvarlanma oklarını ters çevir",
|
||||
"prefs.invert_curved_roll_arrows_note": "Küpün köşesindeki iki eğri ok, görünümü ekran düzlemi içinde yuvarlar. Açık: saat yönündeki ok saat yönünün tersine, saat yönünün tersindeki ok saat yönünde yuvarlar. Kapalı: her ok görünümü kıvrıldığı yöne yuvarlar.",
|
||||
"prefs.invert_navigator_arrows": "Görünüm küpünün döndürme oklarını ters çevir",
|
||||
"prefs.invert_navigator_arrows_note": "Küpün çevresindeki oklar kamerayı gösterdikleri yönde döndürür, tıpkı Fusion ve Inventor'daki gibi: soldaki ok sağı gösterir ve kamerayı sağa savurur. Kapalı: bir ok küpü bulunduğu tarafa doğru döndürür, yani sol ok kamerayı sola savurur. Kıvrık yuvarlanma okları bundan etkilenmez.",
|
||||
"prefs.keep_work_on_tab_switch": "Tasarımlar arasında geçerken diyalogları ve araçları açık tut",
|
||||
"prefs.keep_work_on_tab_switch_note": "Her tasarım sekmesi, açık diyaloğunu veya aracını, içinde seçtiklerinizi ve yazdıklarınızı ve şerit sekmesini korur. Tasarıma döndüğünüzde yeniden oradadırlar. Kapalı: tasarımlar arasında geçmek bunları iptal eder ve Model sekmesini gösterir.",
|
||||
"prefs.labels": "Etiketler",
|
||||
@@ -2279,7 +2275,6 @@
|
||||
"prefs.navigation": "Gezinme",
|
||||
"prefs.navigation_note": "Farenin, trackpad'in ve 3B farenin görünümü nasıl hareket ettirdiği.",
|
||||
"prefs.navigator_fit": "Gezgin görünümü değiştikten sonra modeli sığdır",
|
||||
"prefs.navigator_fit_note": "Görünüm küpünün bir yüzü, köşesi veya oku ya da gizmonun bir ekseni, modelin ortasına da modeli her yönden sığdıran tek bir uzaklıktan (sınırlayıcı küresi) bakar. Bu açıkken Ana görünüm aynı yakınlaştırmayı ve merkezi kullanır; böylece sonrasında seçilen görünümler yalnızca döner. Kapalı: görünüm hedefini ve yakınlaştırmasını koruyarak yerinde döner.",
|
||||
"prefs.network_host_remove": "Kaldır",
|
||||
"prefs.network_locations": "Tasarımlarda ağ konumlarına izin ver",
|
||||
"prefs.network_locations_note": "Kapalı: bir tasarımın başka bir bilgisayardaki bağlı dosyaları (\\\\server\\paylaşım) yalnızca burada listelenen sunuculardan veya sorulduğunda izin verdiklerinizden açılır.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Створити повідомлення про проблему…",
|
||||
"Cross curves": "Поперечні криві",
|
||||
"Ctrl+Enter continues on GitHub.": "Ctrl+Enter продовжує на GitHub.",
|
||||
"Cube": "Куб",
|
||||
"Current orthographic view (1:1 mm)": "Поточний ортографічний вид (1:1 mm)",
|
||||
"Current perspective view": "Поточний перспективний вид",
|
||||
"Current plane": "Поточна площина",
|
||||
@@ -2652,9 +2651,6 @@
|
||||
"prefs.interface_note": "Як виглядає SolidCraft і де розташовані його частини.",
|
||||
"prefs.interval_minutes": "{n} хв",
|
||||
"prefs.invert_curved_roll_arrows": "Інвертувати вигнуті стрілки обертання",
|
||||
"prefs.invert_curved_roll_arrows_note": "Дві вигнуті стрілки в куті куба обертають вид у площині екрана. Увімкнено: стрілка за годинниковою стрілкою обертає проти годинникової, а стрілка проти годинникової — за годинниковою. Вимкнено: кожна стрілка обертає вид у напрямку свого завитку.",
|
||||
"prefs.invert_navigator_arrows": "Інвертувати стрілки обертання куба виду",
|
||||
"prefs.invert_navigator_arrows_note": "Стрілки навколо куба обертають камеру в той бік, куди вказують, як у Fusion та Inventor: стрілка ліворуч вказує праворуч і повертає камеру праворуч. Вимк.: стрілка обертає куб у той бік, де вона розташована, тож ліва стрілка повертає камеру ліворуч. Вигнуті стрілки крену не змінюються.",
|
||||
"prefs.keep_unsaved_also_asks": "Усе одно запитувати під час закриття вкладки",
|
||||
"prefs.keep_unsaved_also_asks_tip": "Коли це вимкнено, вкладка закривається без вікна браузера, щойно копія кожного незбереженого проєкту актуальна.",
|
||||
"prefs.keep_unsaved_in_browser": "Зберігати незбережену роботу в цьому браузері",
|
||||
@@ -2714,7 +2710,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Вимкнено: коли стрілки «Перемістити» тягнуть компонент, нічого під вказівником не підсвічується, що зберігає плавність великих збірок. Якщо показано переріз чи аналіз, підсвічування все одно працює, а деталь, яку тягнуть уздовж її з’єднань, ніколи його не вмикає.",
|
||||
"prefs.navigation": "Навігація",
|
||||
"prefs.navigation.axes_signed": "Осі",
|
||||
"prefs.navigation.cube_compact": "Куб",
|
||||
"prefs.navigation.device": "Пристрій",
|
||||
"prefs.navigation.free": "Вільне",
|
||||
"prefs.navigation.orbit_style": "Стиль обертання",
|
||||
@@ -2722,7 +2717,6 @@
|
||||
"prefs.navigation.turntable": "Поворотний стіл",
|
||||
"prefs.navigation_note": "Як миша, трекпад і 3D-миша рухають вид.",
|
||||
"prefs.navigator_fit": "Вміщувати модель після зміни виду в навігаторі",
|
||||
"prefs.navigator_fit_note": "Грань, кут або стрілка куба виду чи вісь гізмо також дивляться на середину моделі з єдиної відстані, з якої її видно цілком з усіх боків (її обмежувальна сфера). «Головний вид» за ввімкненого параметра використовує той самий масштаб і центр, тож види, вибрані після нього, лише повертаються. Вимк.: вид повертається на місці, зберігаючи свою ціль і масштаб.",
|
||||
"prefs.network_host_remove": "Вилучити",
|
||||
"prefs.network_locations": "Дозволяти мережеві розташування в проєктах",
|
||||
"prefs.network_locations_note": "Для організацій, які зберігають проєкти на файлових серверах. Вимкнено: лише дозволені вами сервери.",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "Tạo Issue…",
|
||||
"Cross curves": "Đường cong giao cắt",
|
||||
"Ctrl+Enter continues on GitHub.": "Nhấn Ctrl+Enter để tiếp tục trên GitHub.",
|
||||
"Cube": "Khối lập phương",
|
||||
"Current orthographic view (1:1 mm)": "Góc nhìn trực giao hiện tại (1:1 mm)",
|
||||
"Current perspective view": "Góc nhìn phối cảnh hiện tại",
|
||||
"Current plane": "Mặt phẳng hiện tại",
|
||||
@@ -2683,9 +2682,9 @@
|
||||
"prefs.interface_note": "Diện mạo của SolidCraft và cách bố trí các bảng điều khiển.",
|
||||
"prefs.interval_minutes": "{n} phút",
|
||||
"prefs.invert_curved_roll_arrows": "Đảo ngược mũi tên cuộn cong",
|
||||
"prefs.invert_curved_roll_arrows_note": "Hai mũi tên cong ở góc khối cuộn khung nhìn trong mặt phẳng màn hình. Khi bật: mũi tên theo chiều kim đồng hồ cuộn ngược chiều kim đồng hồ và ngược lại. Khi tắt: mỗi mũi tên cuộn khung nhìn theo chiều cong của nó.",
|
||||
"prefs.invert_curved_roll_arrows_note": "Hai mũi tên cong ở góc bộ điều hướng cuộn khung nhìn trong mặt phẳng màn hình. Khi bật: mũi tên theo chiều kim đồng hồ cuộn ngược chiều kim đồng hồ và ngược lại. Khi tắt: mỗi mũi tên cuộn khung nhìn theo chiều cong của nó.",
|
||||
"prefs.invert_navigator_arrows": "Đảo ngược mũi tên xoay của khối điều hướng",
|
||||
"prefs.invert_navigator_arrows_note": "Các mũi tên quanh khối xoay camera theo hướng mũi tên chỉ, như trong Fusion và Inventor: mũi tên bên trái chỉ sang phải và đưa camera sang phải. Khi tắt: mũi tên xoay khối về phía cạnh chứa nó, nên mũi tên bên trái đưa camera sang trái. Hai mũi tên cuộn cong không bị ảnh hưởng.",
|
||||
"prefs.invert_navigator_arrows_note": "Các mũi tên quanh bộ điều hướng xoay camera theo hướng mũi tên chỉ, như trong Fusion và Inventor: mũi tên bên trái chỉ sang phải và đưa camera sang phải. Khi tắt: mũi tên xoay khung nhìn về phía chứa nó, nên mũi tên bên trái đưa camera sang trái. Hai mũi tên cuộn cong không bị ảnh hưởng.",
|
||||
"prefs.keep_unsaved_also_asks": "Vẫn hỏi khi đóng thẻ",
|
||||
"prefs.keep_unsaved_also_asks_tip": "Khi tắt, thẻ sẽ đóng mà không có hộp thoại của trình duyệt khi bản sao của mọi thiết kế chưa lưu đã được cập nhật.",
|
||||
"prefs.keep_unsaved_in_browser": "Giữ công việc chưa lưu trong trình duyệt này",
|
||||
@@ -2745,7 +2744,6 @@
|
||||
"prefs.move_drag_highlights_tip": "Tắt: khi các mũi tên của Di chuyển kéo một thành phần, không có gì dưới con trỏ được tô sáng, nhờ đó các cụm lắp ráp lớn vẫn mượt. Khi đang hiện mặt cắt hoặc phân tích thì vẫn tô sáng như thường, và chi tiết được kéo dọc theo khớp nối không bao giờ tô sáng.",
|
||||
"prefs.navigation": "Điều hướng góc nhìn",
|
||||
"prefs.navigation.axes_signed": "Trục",
|
||||
"prefs.navigation.cube_compact": "Khối lập phương",
|
||||
"prefs.navigation.device": "Thiết bị",
|
||||
"prefs.navigation.free": "Tự do",
|
||||
"prefs.navigation.orbit_style": "Kiểu xoay",
|
||||
@@ -2753,7 +2751,7 @@
|
||||
"prefs.navigation.turntable": "Bàn xoay",
|
||||
"prefs.navigation_note": "Cách chuột, bàn di cảm ứng và chuột 3D di chuyển góc nhìn.",
|
||||
"prefs.navigator_fit": "Khớp mô hình sau khi đổi góc nhìn bằng khối điều hướng",
|
||||
"prefs.navigator_fit_note": "Nhấp vào một mặt, góc hoặc mũi tên của khối lập phương, hoặc một trục của gizmo, cũng nhìn vào tâm mô hình từ một khoảng cách duy nhất chứa trọn nó từ mọi phía (khối cầu bao). Khi bật, góc nhìn chuẩn (Home) dùng cùng mức thu phóng và tâm đó, nên các góc nhìn chọn sau chỉ xoay. Tắt: góc nhìn xoay tại chỗ, giữ nguyên điểm nhìn và mức thu phóng.",
|
||||
"prefs.navigator_fit_note": "Nhấp vào một mặt, góc hoặc mũi tên của bộ điều hướng, hoặc một trục của gizmo, cũng nhìn vào tâm mô hình từ một khoảng cách duy nhất chứa trọn nó từ mọi phía (khối cầu bao). Khi bật, góc nhìn chuẩn (Home) dùng cùng mức thu phóng và tâm đó, nên các góc nhìn chọn sau chỉ xoay. Tắt: góc nhìn xoay tại chỗ, giữ nguyên điểm nhìn và mức thu phóng.",
|
||||
"prefs.network_host_remove": "Xóa",
|
||||
"prefs.network_locations": "Cho phép các vị trí mạng trong thiết kế",
|
||||
"prefs.network_locations_note": "Dành cho tổ chức lưu thiết kế trên máy chủ tệp. Khi tắt: chỉ các máy chủ bạn cho phép.",
|
||||
|
||||
@@ -154,7 +154,6 @@
|
||||
"Create Issue…": "創建 Issue…",
|
||||
"Cross curves": "交叉曲線",
|
||||
"Ctrl+Enter continues on GitHub.": "按Ctrl+Enter在GitHub中繼續。",
|
||||
"Cube": "立方體",
|
||||
"Current orthographic view (1:1 mm)": "目前正交視圖(1:1毫米)",
|
||||
"Current perspective view": "目前透視視圖",
|
||||
"Current plane": "目前平面",
|
||||
@@ -2249,9 +2248,6 @@
|
||||
"prefs.interface_note": "SolidCraft 的外觀和面板佈局。",
|
||||
"prefs.interval_minutes": "{n} 分鐘",
|
||||
"prefs.invert_curved_roll_arrows": "反轉彎曲的滾轉箭頭",
|
||||
"prefs.invert_curved_roll_arrows_note": "立方體角落的兩個彎曲箭頭會在螢幕平面內滾轉檢視。開啟時:順時針箭頭會逆時針滾轉,逆時針箭頭會順時針滾轉。關閉時:每個箭頭依其彎曲的方向滾轉檢視。",
|
||||
"prefs.invert_navigator_arrows": "反轉檢視立方體的旋轉箭頭",
|
||||
"prefs.invert_navigator_arrows_note": "立方體周圍的箭頭會依其所指方向環繞相機,與 Fusion 和 Inventor 相同:左側箭頭指向右方,並將相機向右擺動。關閉時:箭頭會將立方體轉向它所在的一側,因此左側箭頭會將相機向左擺動。彎曲的滾轉箭頭不受影響。",
|
||||
"prefs.keep_work_on_tab_switch": "切換設計時保持對話方塊與工具開啟",
|
||||
"prefs.keep_work_on_tab_switch_note": "每個設計分頁都會保留其開啟的對話方塊或工具、您在其中選取與輸入的內容,以及其工具列索引標籤。回到該設計時,它們會恢復原狀。關閉時:切換設計會取消它們,並顯示「模型」索引標籤。",
|
||||
"prefs.labels": "標籤",
|
||||
@@ -2288,7 +2284,6 @@
|
||||
"prefs.navigation": "導航",
|
||||
"prefs.navigation_note": "游標、觸控板和3D游標如何移動視圖。",
|
||||
"prefs.navigator_fit": "變更導覽器檢視後使模型符合視圖",
|
||||
"prefs.navigator_fit_note": "檢視立方體的面、角或箭頭,或方向控制器的某個軸,也會從能容納整個模型各側的單一距離(其邊界球)看向模型中心。啟用時,「主檢視」使用相同的縮放與中心,因此之後選擇的檢視只會旋轉。關閉時:檢視原地旋轉,保留其目標與縮放。",
|
||||
"prefs.network_host_remove": "刪除",
|
||||
"prefs.network_locations": "認可設計中的網絡位置",
|
||||
"prefs.network_locations_note": "關閉:設計中位於其他計算機 (\\\\server\\share) 上的鏈接檔案,只會從此處列出的服務器開啟,或在詢問時你認可的服務器開啟。",
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
"Create Issue…": "创建 Issue…",
|
||||
"Cross curves": "交叉曲线",
|
||||
"Ctrl+Enter continues on GitHub.": "按Ctrl+Enter在GitHub中继续。",
|
||||
"Cube": "立方体",
|
||||
"Current orthographic view (1:1 mm)": "当前正交视图(1:1毫米)",
|
||||
"Current perspective view": "当前透视视图",
|
||||
"Current plane": "当前平面",
|
||||
@@ -2683,9 +2682,9 @@
|
||||
"prefs.interface_note": "SolidCraft 的外观和面板布局。",
|
||||
"prefs.interval_minutes": "{n} 分钟",
|
||||
"prefs.invert_curved_roll_arrows": "反转弯曲的翻滚箭头",
|
||||
"prefs.invert_curved_roll_arrows_note": "立方体角落的两个弯曲箭头在屏幕平面内翻滚视图。开启:顺时针箭头逆时针翻滚,逆时针箭头顺时针翻滚。关闭:每个箭头按其弯曲方向翻滚视图。",
|
||||
"prefs.invert_navigator_arrows": "反转视图立方体的旋转箭头",
|
||||
"prefs.invert_navigator_arrows_note": "立方体周围的箭头按箭头所指的方向转动相机,与 Fusion 和 Inventor 相同:左侧箭头指向右,相机向右转动。关闭:箭头把立方体转向它所在的那一面,因此左侧箭头使相机向左转动。弯曲的翻滚箭头不受影响。",
|
||||
"prefs.invert_curved_roll_arrows_note": "导航器角落的两个弯曲箭头在屏幕平面内翻滚视图。开启:顺时针箭头逆时针翻滚,逆时针箭头顺时针翻滚。关闭:每个箭头按其弯曲方向翻滚视图。",
|
||||
"prefs.invert_navigator_arrows": "反转导航器的旋转箭头",
|
||||
"prefs.invert_navigator_arrows_note": "导航器周围的箭头按箭头所指的方向转动相机,与 Fusion 和 Inventor 相同:左侧箭头指向右,相机向右转动。关闭:箭头把视图转向它所在的那一侧,因此左侧箭头使相机向左转动。弯曲的翻滚箭头不受影响。",
|
||||
"prefs.keep_unsaved_also_asks": "关闭标签页时仍然询问",
|
||||
"prefs.keep_unsaved_also_asks_tip": "关闭此项后,只要每个未保存设计的副本都是最新的,标签页就会直接关闭,不显示浏览器的提示框。",
|
||||
"prefs.keep_unsaved_in_browser": "在此浏览器中保留未保存的工作",
|
||||
@@ -2745,7 +2744,6 @@
|
||||
"prefs.move_drag_highlights_tip": "关闭:用移动的箭头拖动组件时,不高亮指针下的对象,大型装配体也能保持流畅。显示剖切或分析时仍照常高亮;沿关节拖动零件时从不高亮。",
|
||||
"prefs.navigation": "导航",
|
||||
"prefs.navigation.axes_signed": "坐标轴",
|
||||
"prefs.navigation.cube_compact": "立方体",
|
||||
"prefs.navigation.device": "设备",
|
||||
"prefs.navigation.free": "自由",
|
||||
"prefs.navigation.orbit_style": "旋转方式",
|
||||
@@ -2753,7 +2751,7 @@
|
||||
"prefs.navigation.turntable": "转台",
|
||||
"prefs.navigation_note": "鼠标、触控板和3D鼠标如何移动视图。",
|
||||
"prefs.navigator_fit": "视图导航器切换视图后适配模型",
|
||||
"prefs.navigator_fit_note": "点击立方体的面、角或箭头,或坐标轴指示器的轴时,也会从各个方向都能容纳模型的同一距离(其包围球)注视模型中心。开启期间主视图使用相同的缩放和中心,因此之后选择的视图只改变方向。关闭:视图原地旋转,保持目标点和缩放。",
|
||||
"prefs.navigator_fit_note": "点击导航器的面、角或箭头,或坐标轴指示器的轴时,也会从各个方向都能容纳模型的同一距离(其包围球)注视模型中心。开启期间主视图使用相同的缩放和中心,因此之后选择的视图只改变方向。关闭:视图原地旋转,保持目标点和缩放。",
|
||||
"prefs.network_host_remove": "删除",
|
||||
"prefs.network_locations": "允许设计中的网络位置",
|
||||
"prefs.network_locations_note": "适用于将设计存放在文件服务器上的组织。关闭时:仅允许您授权的服务器。",
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
],
|
||||
"control_border": "#ffffff",
|
||||
"control_fill": "#000000",
|
||||
"cube_border": "#ffffff",
|
||||
"cube_face": "#000000",
|
||||
"cube_hover": "#000000",
|
||||
"cube_text": "#ffffff",
|
||||
"navigator_border": "#ffffff",
|
||||
"navigator_face": "#000000",
|
||||
"navigator_hover": "#000000",
|
||||
"navigator_text": "#ffffff",
|
||||
"dialog_bg": "#000000",
|
||||
"dialog_body": "#000000",
|
||||
"dialog_border": "#ffffff",
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
],
|
||||
"control_border": "#000000",
|
||||
"control_fill": "#ffffff",
|
||||
"cube_border": "#000000",
|
||||
"cube_face": "#ffffff",
|
||||
"cube_hover": "#ffffff",
|
||||
"cube_text": "#000000",
|
||||
"navigator_border": "#000000",
|
||||
"navigator_face": "#ffffff",
|
||||
"navigator_hover": "#ffffff",
|
||||
"navigator_text": "#000000",
|
||||
"dialog_bg": "#ffffff",
|
||||
"dialog_body": "#ffffff",
|
||||
"dialog_border": "#000000",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#d4d0ca",
|
||||
"control_fill": "#fffdfa",
|
||||
"cube_border": "#b5b0a9",
|
||||
"cube_face": "#fffdfa",
|
||||
"cube_hover": "#d4d0ca",
|
||||
"cube_text": "#13110e",
|
||||
"navigator_border": "#b5b0a9",
|
||||
"navigator_face": "#fffdfa",
|
||||
"navigator_hover": "#d4d0ca",
|
||||
"navigator_text": "#13110e",
|
||||
"dialog_bg": "#f9f6f2",
|
||||
"dialog_body": "#f9f6f2",
|
||||
"dialog_border": "#d4d0ca",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#533812",
|
||||
"control_fill": "#1d1406",
|
||||
"cube_border": "#533812",
|
||||
"cube_face": "#36250c",
|
||||
"cube_hover": "#563a13",
|
||||
"cube_text": "#efa335",
|
||||
"navigator_border": "#533812",
|
||||
"navigator_face": "#36250c",
|
||||
"navigator_hover": "#563a13",
|
||||
"navigator_text": "#efa335",
|
||||
"dialog_bg": "#100b04",
|
||||
"dialog_body": "#1d1406",
|
||||
"dialog_border": "#533812",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#315777",
|
||||
"control_fill": "#112d4b",
|
||||
"cube_border": "#315777",
|
||||
"cube_face": "#163b60",
|
||||
"cube_hover": "#285f89",
|
||||
"cube_text": "#e3f0fa",
|
||||
"navigator_border": "#315777",
|
||||
"navigator_face": "#163b60",
|
||||
"navigator_hover": "#285f89",
|
||||
"navigator_text": "#e3f0fa",
|
||||
"dialog_bg": "#0c223c",
|
||||
"dialog_body": "#112d4b",
|
||||
"dialog_border": "#315777",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#45475a",
|
||||
"control_fill": "#313244",
|
||||
"cube_border": "#45475a",
|
||||
"cube_face": "#313244",
|
||||
"cube_hover": "#302b46",
|
||||
"cube_text": "#cdd6f4",
|
||||
"navigator_border": "#45475a",
|
||||
"navigator_face": "#313244",
|
||||
"navigator_hover": "#302b46",
|
||||
"navigator_text": "#cdd6f4",
|
||||
"dialog_bg": "#1e1e2e",
|
||||
"dialog_body": "#1e1e2e",
|
||||
"dialog_border": "#45475a",
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
],
|
||||
"control_border": "#55ffff",
|
||||
"control_fill": "#000000",
|
||||
"cube_border": "#55ffff",
|
||||
"cube_face": "#000000",
|
||||
"cube_hover": "#aa00aa",
|
||||
"cube_text": "#ffffff",
|
||||
"navigator_border": "#55ffff",
|
||||
"navigator_face": "#000000",
|
||||
"navigator_hover": "#aa00aa",
|
||||
"navigator_text": "#ffffff",
|
||||
"dialog_bg": "#000000",
|
||||
"dialog_body": "#000000",
|
||||
"dialog_border": "#55ffff",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#5d5246",
|
||||
"control_fill": "#3c352d",
|
||||
"cube_border": "#706354",
|
||||
"cube_face": "#3c352d",
|
||||
"cube_hover": "#5d5246",
|
||||
"cube_text": "#e4e1dd",
|
||||
"navigator_border": "#706354",
|
||||
"navigator_face": "#3c352d",
|
||||
"navigator_hover": "#5d5246",
|
||||
"navigator_text": "#e4e1dd",
|
||||
"dialog_bg": "#312b25",
|
||||
"dialog_body": "#312b25",
|
||||
"dialog_border": "#4b4238",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#dcd3c2",
|
||||
"control_fill": "#fdfaf3",
|
||||
"cube_border": "#b7b1a7",
|
||||
"cube_face": "#fdfaf3",
|
||||
"cube_hover": "#dcd3c2",
|
||||
"cube_text": "#14110d",
|
||||
"navigator_border": "#b7b1a7",
|
||||
"navigator_face": "#fdfaf3",
|
||||
"navigator_hover": "#dcd3c2",
|
||||
"navigator_text": "#14110d",
|
||||
"dialog_bg": "#faf7f1",
|
||||
"dialog_body": "#faf7f1",
|
||||
"dialog_border": "#dcd3c2",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#b0b0b4",
|
||||
"control_fill": "#ececec",
|
||||
"cube_border": "#9a9aa0",
|
||||
"cube_face": "#f2f2f4",
|
||||
"cube_hover": "#cce5ff",
|
||||
"cube_text": "#262628",
|
||||
"navigator_border": "#9a9aa0",
|
||||
"navigator_face": "#f2f2f4",
|
||||
"navigator_hover": "#cce5ff",
|
||||
"navigator_text": "#262628",
|
||||
"dialog_bg": "#ececec",
|
||||
"dialog_body": "#f3f3f3",
|
||||
"dialog_border": "#c6c6c8",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#484d55",
|
||||
"control_fill": "#303338",
|
||||
"cube_border": "#484d55",
|
||||
"cube_face": "#303338",
|
||||
"cube_hover": "#293c49",
|
||||
"cube_text": "#e0e2e5",
|
||||
"navigator_border": "#484d55",
|
||||
"navigator_face": "#303338",
|
||||
"navigator_hover": "#293c49",
|
||||
"navigator_text": "#e0e2e5",
|
||||
"dialog_bg": "#25272b",
|
||||
"dialog_body": "#25272b",
|
||||
"dialog_border": "#484d55",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#285333",
|
||||
"control_fill": "#0b1d10",
|
||||
"cube_border": "#285333",
|
||||
"cube_face": "#0f3617",
|
||||
"cube_hover": "#175625",
|
||||
"cube_text": "#40ee66",
|
||||
"navigator_border": "#285333",
|
||||
"navigator_face": "#0f3617",
|
||||
"navigator_hover": "#175625",
|
||||
"navigator_text": "#40ee66",
|
||||
"dialog_bg": "#061009",
|
||||
"dialog_body": "#0b1d10",
|
||||
"dialog_border": "#285333",
|
||||
|
||||
@@ -45,10 +45,10 @@
|
||||
"preview_new": "#fabd2f",
|
||||
"preview_sketch": "#b8bb26",
|
||||
"preview_cut": "#fb49346e",
|
||||
"cube_face": "#ebdbb2",
|
||||
"cube_border": "#665c54",
|
||||
"cube_text": "#282828",
|
||||
"cube_hover": "#83a598",
|
||||
"navigator_face": "#ebdbb2",
|
||||
"navigator_border": "#665c54",
|
||||
"navigator_text": "#282828",
|
||||
"navigator_hover": "#83a598",
|
||||
"viewport_top": "#32302f",
|
||||
"viewport_bottom": "#32302f",
|
||||
"grid": "#443f3c",
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
"preview_new": "#d79921",
|
||||
"preview_sketch": "#98971a",
|
||||
"preview_cut": "#cc241d6e",
|
||||
"cube_face": "#fbf1c7",
|
||||
"cube_border": "#7c6f64",
|
||||
"cube_text": "#3c3836",
|
||||
"cube_hover": "#83a598",
|
||||
"navigator_face": "#fbf1c7",
|
||||
"navigator_border": "#7c6f64",
|
||||
"navigator_text": "#3c3836",
|
||||
"navigator_hover": "#83a598",
|
||||
"viewport_top": "#fcf5d8",
|
||||
"viewport_bottom": "#ebdbb2",
|
||||
"grid": "#d5c4a1",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#a0a0a0",
|
||||
"control_fill": "#151515",
|
||||
"cube_border": "#a0a0a0",
|
||||
"cube_face": "#151515",
|
||||
"cube_hover": "#002c45",
|
||||
"cube_text": "#ffffff",
|
||||
"navigator_border": "#a0a0a0",
|
||||
"navigator_face": "#151515",
|
||||
"navigator_hover": "#002c45",
|
||||
"navigator_text": "#ffffff",
|
||||
"dialog_bg": "#0c0c0c",
|
||||
"dialog_body": "#000000",
|
||||
"dialog_border": "#a0a0a0",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#4c566a",
|
||||
"control_fill": "#3b4252",
|
||||
"cube_border": "#4c566a",
|
||||
"cube_face": "#3b4252",
|
||||
"cube_hover": "#35495b",
|
||||
"cube_text": "#eceff4",
|
||||
"navigator_border": "#4c566a",
|
||||
"navigator_face": "#3b4252",
|
||||
"navigator_hover": "#35495b",
|
||||
"navigator_text": "#eceff4",
|
||||
"dialog_bg": "#2e3440",
|
||||
"dialog_body": "#2e3440",
|
||||
"dialog_border": "#4c566a",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#50546d",
|
||||
"control_fill": "#343746",
|
||||
"cube_border": "#50546d",
|
||||
"cube_face": "#343746",
|
||||
"cube_hover": "#393149",
|
||||
"cube_text": "#f8f8f2",
|
||||
"navigator_border": "#50546d",
|
||||
"navigator_face": "#343746",
|
||||
"navigator_hover": "#393149",
|
||||
"navigator_text": "#f8f8f2",
|
||||
"dialog_bg": "#282a36",
|
||||
"dialog_body": "#282a36",
|
||||
"dialog_border": "#50546d",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#474b4f",
|
||||
"control_fill": "#2c2e31",
|
||||
"cube_border": "#585b5f",
|
||||
"cube_face": "#2c2e31",
|
||||
"cube_hover": "#474b4f",
|
||||
"cube_text": "#e1e3e5",
|
||||
"navigator_border": "#585b5f",
|
||||
"navigator_face": "#2c2e31",
|
||||
"navigator_hover": "#474b4f",
|
||||
"navigator_text": "#e1e3e5",
|
||||
"dialog_bg": "#222527",
|
||||
"dialog_body": "#222527",
|
||||
"dialog_border": "#383b3e",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#4a5262",
|
||||
"control_fill": "#272b34",
|
||||
"cube_border": "#5c6370",
|
||||
"cube_face": "#abb2bf",
|
||||
"cube_hover": "#61afef",
|
||||
"cube_text": "#21252b",
|
||||
"navigator_border": "#5c6370",
|
||||
"navigator_face": "#abb2bf",
|
||||
"navigator_hover": "#61afef",
|
||||
"navigator_text": "#21252b",
|
||||
"dialog_bg": "#282c34",
|
||||
"dialog_body": "#3b4453",
|
||||
"dialog_border": "#4b5263",
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
],
|
||||
"control_border": "#4a4f54",
|
||||
"control_fill": "#303235",
|
||||
"cube_border": "#50565b",
|
||||
"cube_face": "#34373a",
|
||||
"cube_hover": "#53616c",
|
||||
"cube_text": "#dededc",
|
||||
"navigator_border": "#50565b",
|
||||
"navigator_face": "#34373a",
|
||||
"navigator_hover": "#53616c",
|
||||
"navigator_text": "#dededc",
|
||||
"dialog_bg": "#2b2d2f",
|
||||
"dialog_body": "#2b2d2f",
|
||||
"dialog_border": "#3d4145",
|
||||
@@ -451,7 +451,7 @@
|
||||
"hover_profile": "#b7bdc230",
|
||||
"origin_plane_hover": "#b7bdc260",
|
||||
"profile_fill": "#b7bdc228",
|
||||
"cube_hover": "#454b50",
|
||||
"navigator_hover": "#454b50",
|
||||
"chip": "#b7bdc2",
|
||||
"logo": [
|
||||
"#dde0e3",
|
||||
@@ -498,7 +498,7 @@
|
||||
"hover_profile": "#aabcae30",
|
||||
"origin_plane_hover": "#aabcae60",
|
||||
"profile_fill": "#aabcae28",
|
||||
"cube_hover": "#414d45",
|
||||
"navigator_hover": "#414d45",
|
||||
"chip": "#aabcae",
|
||||
"logo": [
|
||||
"#d1ddd4",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#888888",
|
||||
"control_fill": "#dddddd",
|
||||
"cube_border": "#888888",
|
||||
"cube_face": "#eeeeee",
|
||||
"cube_hover": "#ccccff",
|
||||
"cube_text": "#222222",
|
||||
"navigator_border": "#888888",
|
||||
"navigator_face": "#eeeeee",
|
||||
"navigator_hover": "#ccccff",
|
||||
"navigator_text": "#222222",
|
||||
"dialog_bg": "#dddddd",
|
||||
"dialog_body": "#eeeeee",
|
||||
"dialog_border": "#888888",
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
],
|
||||
"control_border": "#586e75",
|
||||
"control_fill": "#073642",
|
||||
"cube_border": "#586e75",
|
||||
"cube_face": "#073642",
|
||||
"cube_hover": "#586e75",
|
||||
"cube_text": "#93a1a1",
|
||||
"navigator_border": "#586e75",
|
||||
"navigator_face": "#073642",
|
||||
"navigator_hover": "#586e75",
|
||||
"navigator_text": "#93a1a1",
|
||||
"dialog_bg": "#073642",
|
||||
"dialog_body": "#073642",
|
||||
"dialog_border": "#586e75",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#b6b3a1",
|
||||
"control_fill": "#e3ddc9",
|
||||
"cube_border": "#b6b3a1",
|
||||
"cube_face": "#e3ddc9",
|
||||
"cube_hover": "#e1e8d9",
|
||||
"cube_text": "#586e75",
|
||||
"navigator_border": "#b6b3a1",
|
||||
"navigator_face": "#e3ddc9",
|
||||
"navigator_hover": "#e1e8d9",
|
||||
"navigator_text": "#586e75",
|
||||
"dialog_bg": "#eee8d5",
|
||||
"dialog_body": "#eee8d5",
|
||||
"dialog_border": "#b6b3a1",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#808080",
|
||||
"control_fill": "#c0c0c0",
|
||||
"cube_border": "#808080",
|
||||
"cube_face": "#c0c0c0",
|
||||
"cube_hover": "#8080ff",
|
||||
"cube_text": "#000000",
|
||||
"navigator_border": "#808080",
|
||||
"navigator_face": "#c0c0c0",
|
||||
"navigator_hover": "#8080ff",
|
||||
"navigator_text": "#000000",
|
||||
"dialog_bg": "#c0c0c0",
|
||||
"dialog_body": "#c0c0c0",
|
||||
"dialog_border": "#808080",
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
],
|
||||
"control_border": "#414868",
|
||||
"control_fill": "#24283b",
|
||||
"cube_border": "#414868",
|
||||
"cube_face": "#24283b",
|
||||
"cube_hover": "#253452",
|
||||
"cube_text": "#c0caf5",
|
||||
"navigator_border": "#414868",
|
||||
"navigator_face": "#24283b",
|
||||
"navigator_hover": "#253452",
|
||||
"navigator_text": "#c0caf5",
|
||||
"dialog_bg": "#1a1b26",
|
||||
"dialog_body": "#1a1b26",
|
||||
"dialog_border": "#414868",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Stateless camera commands shared by the navigation cube and programmatic callers.
|
||||
//! Stateless camera commands shared by the view navigators and programmatic callers.
|
||||
use serde_json::{Value, json};
|
||||
use solidcraft_geom::prelude::*;
|
||||
use solidcraft_viewport::{Camera, StandardView};
|
||||
@@ -83,7 +83,7 @@ CommandSpec::new("view.navigation_bar", "Navigation Bar", navigation_bar)
|
||||
CommandSpec::new("view.navigator", "Custom View Navigator", crate::checked!("view.navigator", navigator))
|
||||
.icon("nav_settings").noundo().doc_only()
|
||||
.contract(&NAVIGATOR_CONTRACT).output(output_schema_for::<NavigatorParams>)
|
||||
.params("style?: axes|cube|custom; body?: body name|null; texture?: themed|modeled; arrows?, home?: bool → the navigator as set; the app's view navigator, never saved in the design; never opens a dialog (a toolbar start opens the Custom View Navigator panel)"),
|
||||
.params("style?: axes|custom; body?: body name|null; texture?: themed|modeled; arrows?, home?: bool → the navigator as set; the app's view navigator, never saved in the design; never opens a dialog (a toolbar start opens the Custom View Navigator panel)"),
|
||||
CommandSpec::new("view.ribbon_tabs_only", "Ribbon Tabs Only", crate::checked!("view.ribbon_tabs_only", ribbon_tabs_only))
|
||||
.icon("chevron").noundo().doc_only().contract(&RIBBON_TABS_ONLY_CONTRACT).output(output_schema_for::<RibbonTabsOnly>)
|
||||
.params("on?: bool (omitted: switch) → on?; fold the ribbon to its tab row, a tab click shows its panels over the view (window setting)"),
|
||||
@@ -162,7 +162,7 @@ CommandSpec::new("view.previous_tab", "Previous Tab", crate::checked!("view.prev
|
||||
.icon("chevron_right").noundo().doc_only().key("Ctrl+Shift+Tab").contract(&TAB_STEP_CONTRACT).output(output_schema_for::<TabStep>)
|
||||
.params("no parameters → step: -1; the window shows the design tab to the left of the shown one (before the first, the last); never edits the design or opens a dialog")];
|
||||
|
||||
const STANDARD_PARAMS: &str = "camera?: Camera (default: current session camera or home view) → camera; turns to that standard view as the view cube does, keeping target, distance and projection";
|
||||
const STANDARD_PARAMS: &str = "camera?: Camera (default: current session camera or home view) → camera; turns to that standard view as the axes navigator does, keeping target, distance and projection";
|
||||
|
||||
/// The standard view a `view.front` … `view.isometric` command turns to.
|
||||
pub fn standard_view(id: &str) -> Option<StandardView> {
|
||||
@@ -550,7 +550,7 @@ fn navigate(_s: &mut Session, p: &Value) -> Result<Value> {
|
||||
} else {
|
||||
use std::f64::consts::FRAC_PI_2;
|
||||
let (r, u, b) = cam.basis();
|
||||
// Left, right, up and down turn the view a quarter turn (the navigation cube's arrows),
|
||||
// Left, right, up and down turn the view a quarter turn (the navigator's arrows),
|
||||
// or `degrees` (the arrow keys' 15° steps, #1541).
|
||||
let (sin, cos) = match p.get("degrees") {
|
||||
None => (1.0, 0.0),
|
||||
@@ -1026,7 +1026,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_cube_direction_preserves_framing_without_editing_the_design() {
|
||||
fn every_direction_preserves_framing_without_editing_the_design() {
|
||||
for up in [UpAxis::Z, UpAxis::Y] {
|
||||
let mut s = Session::default();
|
||||
let before = s.doc.to_json();
|
||||
|
||||
@@ -98,7 +98,7 @@ pub struct AngleReadoutResult {
|
||||
}
|
||||
|
||||
/// Turn the view to the command's standard orientation (front, back, left, right, top, bottom
|
||||
/// or isometric), as the view cube does, keeping the camera's target, distance, projection and
|
||||
/// or isometric), as the axes navigator does, keeping the camera's target, distance, projection and
|
||||
/// up axis. Display only: the design isn't changed and nothing is added to undo.
|
||||
#[derive(Debug, Deserialize, JsonSchema)]
|
||||
#[schemars(deny_unknown_fields)]
|
||||
@@ -275,25 +275,25 @@ pub struct RenderFrame {
|
||||
#[derive(Debug, Default, Deserialize, Serialize, JsonSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct NavigatorParams {
|
||||
/// The navigator: signed axes, the cube, or a custom body (the cube until a body is
|
||||
/// The navigator: signed axes, or a custom body (the signed axes until a body is
|
||||
/// chosen). Default: unchanged.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub style: Option<NavigatorStyle>,
|
||||
/// A body of the open design for the custom navigator to draw; the app keeps a snapshot of
|
||||
/// it, so it stays when the design closes. `null`: no body (the cube again). A body over
|
||||
/// it, so it stays when the design closes. `null`: no body (the signed axes again). A body over
|
||||
/// 10,000 triangles, or whose thinnest width is under a fifth of its widest, is refused.
|
||||
/// Default: unchanged.
|
||||
#[serde(default, deserialize_with = "nullable", skip_serializing_if = "Option::is_none")]
|
||||
#[schemars(with = "Option<String>")]
|
||||
pub body: Option<Option<String>>,
|
||||
/// The custom navigator's colours: the cube's (`themed`) or the body's own appearance and
|
||||
/// The custom navigator's colours: the theme's (`themed`) or the body's own appearance and
|
||||
/// edge colour (`modeled`). Default: unchanged.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub texture: Option<NavigatorTexture>,
|
||||
/// The cube's orbit and roll arrows around the custom navigator. Default: unchanged.
|
||||
/// The orbit and roll arrows around the custom navigator. Default: unchanged.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub arrows: Option<bool>,
|
||||
/// The cube's Home button beside the custom navigator. Default: unchanged.
|
||||
/// The Home button beside the custom navigator. Default: unchanged.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub home: Option<bool>,
|
||||
}
|
||||
@@ -303,7 +303,6 @@ pub struct NavigatorParams {
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum NavigatorStyle {
|
||||
Axes,
|
||||
Cube,
|
||||
Custom,
|
||||
}
|
||||
|
||||
|
||||
+25
-25
@@ -1074,7 +1074,7 @@ pub struct Tokens {
|
||||
pub origin_plane_hover: Color32,
|
||||
pub origin_point: Color32,
|
||||
/// The X, Y and Z colours, one set for every axis drawn (#976): the origin axes, the view
|
||||
/// triad, the navigation cube's triad, the Move gizmo, a 3D sketch point's triad, joint
|
||||
/// triad, the navigator's triad, the Move gizmo, a 3D sketch point's triad, joint
|
||||
/// origins, measured distances along the axes and the headless picture's origin axes.
|
||||
pub axis_x: Color32,
|
||||
pub axis_y: Color32,
|
||||
@@ -1100,12 +1100,12 @@ pub struct Tokens {
|
||||
pub preview_sketch: Color32,
|
||||
/// Removed material in a feature preview (translucent).
|
||||
pub preview_cut: Color32,
|
||||
/// Navigation cube faces, outline and labels.
|
||||
pub cube_face: Color32,
|
||||
pub cube_border: Color32,
|
||||
pub cube_text: Color32,
|
||||
/// Light blue hover fill, readable on the pale cube in either theme.
|
||||
pub cube_hover: Color32,
|
||||
/// Navigator faces, outline and labels.
|
||||
pub navigator_face: Color32,
|
||||
pub navigator_border: Color32,
|
||||
pub navigator_text: Color32,
|
||||
/// Light blue hover fill, readable on the pale navigator in either theme.
|
||||
pub navigator_hover: Color32,
|
||||
// ---- viewport ----
|
||||
/// Viewport background (top and bottom of the gradient; equal for a flat fill).
|
||||
pub viewport_top: Color32,
|
||||
@@ -1178,11 +1178,11 @@ pub struct Tokens {
|
||||
pub figure_highlight: Color32,
|
||||
/// Neutral shadow cast by a model in a Preferences figure, independent of theme polarity.
|
||||
pub figure_shadow: Color32,
|
||||
/// Top face of the Preferences figure cube.
|
||||
/// Top face of the Preferences figure box.
|
||||
pub figure_face_top: Color32,
|
||||
/// Left face of the Preferences figure cube.
|
||||
/// Left face of the Preferences figure box.
|
||||
pub figure_face_left: Color32,
|
||||
/// Right face of the Preferences figure cube.
|
||||
/// Right face of the Preferences figure box.
|
||||
pub figure_face_right: Color32,
|
||||
/// Paper, panels and pads drawn inside Preferences figures.
|
||||
pub figure_card: Color32,
|
||||
@@ -1378,7 +1378,7 @@ impl Tokens {
|
||||
&mut self.nav_field,
|
||||
&mut self.nav_viewport,
|
||||
&mut self.glyph_bg,
|
||||
&mut self.cube_face,
|
||||
&mut self.navigator_face,
|
||||
&mut self.viewport_top,
|
||||
&mut self.viewport_bottom,
|
||||
&mut self.grid,
|
||||
@@ -1389,7 +1389,7 @@ impl Tokens {
|
||||
&mut self.control_border,
|
||||
&mut self.app_bar_separator,
|
||||
&mut self.nav_tip_key_border,
|
||||
&mut self.cube_border,
|
||||
&mut self.navigator_border,
|
||||
&mut self.file_background,
|
||||
&mut self.file_surface,
|
||||
&mut self.file_border,
|
||||
@@ -1425,7 +1425,7 @@ impl Tokens {
|
||||
|
||||
/// These tokens with the colours drawn in the 3D view taken from `view`: the background and
|
||||
/// grid, bodies, selection and hover, the origin and construction geometry, previews, sketches
|
||||
/// and their dimensions and glyphs, the navigation cube and triads, box selection and the
|
||||
/// and their dimensions and glyphs, the navigator and triads, box selection and the
|
||||
/// analysis colours. The window keeps its own: panels, dialogs, menus, and the chips and cards
|
||||
/// over the view (`overlay` with its text, icons and borders).
|
||||
pub fn with_viewport(self, view: Tokens) -> Tokens {
|
||||
@@ -1459,10 +1459,10 @@ impl Tokens {
|
||||
preview_new: view.preview_new,
|
||||
preview_sketch: view.preview_sketch,
|
||||
preview_cut: view.preview_cut,
|
||||
cube_face: view.cube_face,
|
||||
cube_border: view.cube_border,
|
||||
cube_text: view.cube_text,
|
||||
cube_hover: view.cube_hover,
|
||||
navigator_face: view.navigator_face,
|
||||
navigator_border: view.navigator_border,
|
||||
navigator_text: view.navigator_text,
|
||||
navigator_hover: view.navigator_hover,
|
||||
viewport_top: view.viewport_top,
|
||||
viewport_bottom: view.viewport_bottom,
|
||||
grid: view.grid,
|
||||
@@ -1536,15 +1536,15 @@ impl Tokens {
|
||||
t
|
||||
}
|
||||
|
||||
/// Fade idle cube colours into the viewport while retaining opaque facets.
|
||||
pub fn navigation_cube(self, active: bool) -> Tokens {
|
||||
/// Fade idle navigator colours into the viewport while retaining opaque facets.
|
||||
pub fn navigator(self, active: bool) -> Tokens {
|
||||
if active {
|
||||
return self;
|
||||
}
|
||||
let mut t = self;
|
||||
t.cube_face = t.cube_face.lerp_to_gamma(t.viewport_top, 0.55);
|
||||
t.cube_border = t.cube_border.lerp_to_gamma(t.viewport_top, 0.55);
|
||||
t.cube_text = t.cube_text.lerp_to_gamma(t.viewport_top, 0.55);
|
||||
t.navigator_face = t.navigator_face.lerp_to_gamma(t.viewport_top, 0.55);
|
||||
t.navigator_border = t.navigator_border.lerp_to_gamma(t.viewport_top, 0.55);
|
||||
t.navigator_text = t.navigator_text.lerp_to_gamma(t.viewport_top, 0.55);
|
||||
t.axis_x = t.axis_x.lerp_to_gamma(t.viewport_top, 0.55);
|
||||
t.axis_y = t.axis_y.lerp_to_gamma(t.viewport_top, 0.55);
|
||||
t.axis_z = t.axis_z.lerp_to_gamma(t.viewport_top, 0.55);
|
||||
@@ -1931,7 +1931,7 @@ mod tests {
|
||||
// The two sides differ, so the checks below tell them apart.
|
||||
assert_ne!((w.viewport_top, w.panel), (v.viewport_top, v.panel));
|
||||
// The view's: background and grid, bodies, selection and hover, sketches with their
|
||||
// dimensions and glyphs, the origin, the cube and triads, box selection, analysis.
|
||||
// dimensions and glyphs, the origin, the navigator and triads, box selection, analysis.
|
||||
assert_eq!((t.viewport_top, t.viewport_bottom, t.grid, t.grid_major), (v.viewport_top, v.viewport_bottom, v.grid, v.grid_major));
|
||||
assert_eq!(
|
||||
(t.body, t.body_edge, t.body_selected, t.sel_face, t.sel_edge, t.hover_edge),
|
||||
@@ -1942,8 +1942,8 @@ mod tests {
|
||||
(v.sketch, v.sketch_fixed, v.dimension, v.glyph_bg, v.glyph_text, v.profile_fill)
|
||||
);
|
||||
assert_eq!(
|
||||
(t.origin_plane, t.axis_x, t.cube_face, t.cube_text, t.axis_y, t.axis_z),
|
||||
(v.origin_plane, v.axis_x, v.cube_face, v.cube_text, v.axis_y, v.axis_z)
|
||||
(t.origin_plane, t.axis_x, t.navigator_face, t.navigator_text, t.axis_y, t.axis_z),
|
||||
(v.origin_plane, v.axis_x, v.navigator_face, v.navigator_text, v.axis_y, v.axis_z)
|
||||
);
|
||||
assert_eq!(
|
||||
(t.box_window, t.section_cap, t.preview_add, t.sketch_construction, t.continuity),
|
||||
|
||||
@@ -196,10 +196,10 @@ impl Tokens {
|
||||
preview_new: Color32::from_rgb(240, 225, 105),
|
||||
preview_sketch: Color32::from_rgb(32, 190, 96),
|
||||
preview_cut: Color32::from_rgba_unmultiplied_const(232, 84, 44, 110),
|
||||
cube_face: Color32::from_rgb(236, 239, 244),
|
||||
cube_border: Color32::from_rgb(85, 94, 110),
|
||||
cube_text: Color32::from_rgb(38, 42, 50),
|
||||
cube_hover: Color32::from_rgb(190, 220, 252),
|
||||
navigator_face: Color32::from_rgb(236, 239, 244),
|
||||
navigator_border: Color32::from_rgb(85, 94, 110),
|
||||
navigator_text: Color32::from_rgb(38, 42, 50),
|
||||
navigator_hover: Color32::from_rgb(190, 220, 252),
|
||||
viewport_top: Color32::from_rgb(240, 243, 247),
|
||||
viewport_bottom: Color32::from_rgb(203, 210, 221),
|
||||
grid: Color32::from_rgb(196, 202, 212),
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//! The custom view gizmo: the body chosen in [`crate::view_gizmo`] drawn in place of the navigation
|
||||
//! cube, made the way the cube is: the same size, each face shaded by how squarely it meets the
|
||||
//! eye. Its texture is the cube's face and border colours, the hovered face in the cube's hover
|
||||
//! colour and accent (themed), or the body's own appearance with the view's edge colour, the
|
||||
//! hovered face lit as the view lights a face under the pointer (modeled); the cube's orbit and roll
|
||||
//! arrows and its Home button go around it when the `navigator_arrows` and `navigator_home`
|
||||
//! preferences say so. While the Custom View Navigator panel is open it shows the panel's choices.
|
||||
//! The custom view gizmo: the body chosen in [`crate::view_gizmo`] drawn in place of the signed
|
||||
//! axes, each face shaded by how squarely it meets the eye. Its texture is the theme's navigator
|
||||
//! face and border colours, the hovered face in the hover colour and accent (themed), or the
|
||||
//! body's own appearance with the view's edge colour, the hovered face lit as the view lights a
|
||||
//! face under the pointer (modeled); orbit and roll arrows and a Home button go around it when
|
||||
//! the `navigator_arrows` and `navigator_home` preferences say so. While the Custom View Navigator
|
||||
//! panel is open it shows the panel's choices.
|
||||
//! A click on a face looks straight at it; a drag orbits.
|
||||
//!
|
||||
//! A concave body cannot be drawn back to front as the cube's six faces are, so the faces go
|
||||
//! A concave body cannot be drawn back to front as a box's six faces are, so the faces go
|
||||
//! through a small depth-buffered raster (drawn on the CPU, shown as a texture): hidden faces
|
||||
//! stay hidden and each sample knows its triangle, so hover and click name the face actually
|
||||
//! seen. Edges stay crisp vector lines, cut where the raster says something nearer covers them.
|
||||
@@ -17,7 +17,7 @@ use crate::view_gizmo::Shape;
|
||||
use solidcraft_engine::geom::Mesh;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
/// The body's bounding sphere, in the navigation cube's design units: the cube's own (half
|
||||
/// The body's bounding sphere, in the navigator's design units: the navigator's own (half
|
||||
/// side 40, so its corners lie 40√3 from the centre).
|
||||
const RADIUS: f32 = 69.28;
|
||||
/// Samples per pixel along each side: smooth silhouettes.
|
||||
@@ -27,13 +27,13 @@ const MAX_PIXELS: usize = 512;
|
||||
/// No triangle.
|
||||
const NONE: u32 = u32::MAX;
|
||||
|
||||
/// Centre, radius (points) of the disc the body fills, and the cube's design scale.
|
||||
/// Centre, radius (points) of the disc the body fills, and the navigator's design scale.
|
||||
fn disc(app: &SolveApp, rect: Rect) -> (Pos2, f32, f32) {
|
||||
let scale = axis_rect(app, rect).width() / navigation_cube::DESIGN_SIZE;
|
||||
let scale = axis_rect(app, rect).width() / navigator_controls::DESIGN_SIZE;
|
||||
(axis_center(app, rect), scale * RADIUS, scale)
|
||||
}
|
||||
|
||||
/// A press anywhere on the body's disc orbits, as a press on the cube does.
|
||||
/// A press anywhere on the body's disc orbits, as a press on the axes does.
|
||||
pub(super) fn drag_origin(app: &SolveApp, rect: Rect, p: Pos2) -> bool {
|
||||
let (c, r, _) = disc(app, rect);
|
||||
c.distance(p) <= r
|
||||
@@ -102,7 +102,7 @@ fn raster(mesh: &Mesh, cam: &Camera, side: usize) -> Raster {
|
||||
let mut out = Raster { side, depth: vec![f64::NEG_INFINITY; n], tri: vec![NONE; n], shade: vec![0.0; n], edges: Vec::new() };
|
||||
let Some(view) = View::new(mesh, cam, side) else { return out };
|
||||
let back = view.basis.2;
|
||||
// The cube's shading: a face square to the eye is the full face colour, an edge-on one 72 %.
|
||||
// The face shading: a face square to the eye is the full face colour, an edge-on one 72 %.
|
||||
let shade = |n: Vec3| 0.72 + 0.28 * n.dot(back).clamp(0.0, 1.0) as f32;
|
||||
let limit = (side - 1) as f64;
|
||||
for (i, t) in mesh.triangles.iter().enumerate() {
|
||||
@@ -208,17 +208,17 @@ struct Look {
|
||||
hovered: Option<u32>,
|
||||
texture: NavigatorTexture,
|
||||
active: bool,
|
||||
/// Cube face, cube hover, the theme's body colour and the view's background.
|
||||
/// Face, hover, the theme's body colour and the view's background.
|
||||
colours: [Color32; 4],
|
||||
/// How much lighter the view draws a face under the pointer (grey levels; modeled).
|
||||
lift: u8,
|
||||
}
|
||||
|
||||
/// The hovered face's outline: the cube's accent (themed), or the view's mouse-over edge colour
|
||||
/// The hovered face's outline: the navigator's accent (themed), or the view's mouse-over edge colour
|
||||
/// (modeled).
|
||||
fn hover_outline(texture: NavigatorTexture, cube: &Tokens, view: &Tokens) -> Color32 {
|
||||
fn hover_outline(texture: NavigatorTexture, look: &Tokens, view: &Tokens) -> Color32 {
|
||||
match texture {
|
||||
NavigatorTexture::Themed => cube.accent,
|
||||
NavigatorTexture::Themed => look.accent,
|
||||
NavigatorTexture::Modeled => view.hover_edge,
|
||||
}
|
||||
}
|
||||
@@ -230,12 +230,12 @@ fn rgb(r: u8, g: u8, b: u8) -> Color32 {
|
||||
|
||||
/// The colour face `face` is painted before shading.
|
||||
fn face_colour(shape: &Shape, face: Option<u32>, look: &Look) -> Color32 {
|
||||
let [cube_face, hover, body, background] = look.colours;
|
||||
let [navigator_face, hover, body, background] = look.colours;
|
||||
let hovered = face.is_some() && face == look.hovered;
|
||||
match look.texture {
|
||||
// As on the cube, the hovered target is one flat colour.
|
||||
// As on the axes, the hovered target is one flat colour.
|
||||
NavigatorTexture::Themed if hovered => hover,
|
||||
NavigatorTexture::Themed => cube_face,
|
||||
NavigatorTexture::Themed => navigator_face,
|
||||
NavigatorTexture::Modeled => {
|
||||
let own = shape.colour_of(face).map_or(body, |[r, g, b]| rgb(r, g, b));
|
||||
if hovered {
|
||||
@@ -243,7 +243,7 @@ fn face_colour(shape: &Shape, face: Option<u32>, look: &Look) -> Color32 {
|
||||
let k = look.lift;
|
||||
return rgb(own.r().saturating_add(k), own.g().saturating_add(k), own.b().saturating_add(k));
|
||||
}
|
||||
// Idle, it fades into the view as the cube does.
|
||||
// Idle, it fades into the view as the axes does.
|
||||
if look.active { own } else { own.lerp_to_gamma(background, 0.55) }
|
||||
}
|
||||
}
|
||||
@@ -324,7 +324,7 @@ type Shared = Arc<Mutex<Option<Cache>>>;
|
||||
|
||||
/// Draw the custom navigator as `shown` says (the panel's choices while it is open).
|
||||
pub(super) fn show(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect, shown: crate::view_gizmo::Shown) {
|
||||
let Some(shape) = shown.shape else { return navigation_cube::show(app, ui, rect) };
|
||||
let Some(shape) = shown.shape else { return };
|
||||
let outer = axis_rect(app, rect);
|
||||
if !outer.is_positive() {
|
||||
app.viewport.axis_drag = None;
|
||||
@@ -335,8 +335,8 @@ pub(super) fn show(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect, shown: cra
|
||||
let (c, radius, scale) = disc(app, rect);
|
||||
let orbiting = axis_view_orbit(app, ui, rect);
|
||||
let active = orbiting || ui.rect_contains_pointer(outer);
|
||||
let t = Tokens::get().navigation_cube(active);
|
||||
crate::scenario::publish_count("navigation_cube:active", f64::from(u8::from(active)));
|
||||
let t = Tokens::get().navigator(active);
|
||||
crate::scenario::publish_count("navigator:active", f64::from(u8::from(active)));
|
||||
let ppp = ui.ctx().pixels_per_point();
|
||||
let px = ((2.0 * radius * ppp).ceil().max(1.0) as usize).min(MAX_PIXELS);
|
||||
let side = px * SS;
|
||||
@@ -373,7 +373,7 @@ pub(super) fn show(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect, shown: cra
|
||||
hovered: face,
|
||||
texture,
|
||||
active,
|
||||
colours: [t.cube_face, t.cube_hover, view.body, view.viewport_top],
|
||||
colours: [t.navigator_face, t.navigator_hover, view.body, view.viewport_top],
|
||||
lift: view.hover_face_lift,
|
||||
};
|
||||
if cache.look != Some(look) || cache.texture.is_none() {
|
||||
@@ -387,12 +387,12 @@ pub(super) fn show(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect, shown: cra
|
||||
if let Some(tex) = &cache.texture {
|
||||
painter.image(tex.id(), image, Rect::from_min_max(pos2(0.0, 0.0), pos2(1.0, 1.0)), Color32::WHITE);
|
||||
}
|
||||
// The body's edges in the cube's border colour; the hovered face's in the accent, on top.
|
||||
// The body's edges in the navigator's border colour; the hovered face's in the accent, on top.
|
||||
let of_hovered = |e: usize| face.is_some_and(|f| mesh.edge_faces.get(e).is_some_and(|fs| fs.contains(&f)));
|
||||
for lit in [false, true] {
|
||||
for (_, a, b) in cache.raster.edges.iter().filter(|(e, _, _)| of_hovered(*e) == lit) {
|
||||
let edge = match texture {
|
||||
NavigatorTexture::Themed => t.cube_border,
|
||||
NavigatorTexture::Themed => t.navigator_border,
|
||||
// Idle, the model's edges fade into the view with its faces.
|
||||
NavigatorTexture::Modeled if active => view.body_edge,
|
||||
NavigatorTexture::Modeled => view.body_edge.lerp_to_gamma(view.viewport_top, 0.55),
|
||||
@@ -416,14 +416,14 @@ pub(super) fn show(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect, shown: cra
|
||||
if ui.input(|i| i.pointer.primary_clicked())
|
||||
&& let Some(normal) = shape.face_normal(tri)
|
||||
{
|
||||
navigation_cube::navigate(app, None, Some(app.cam.to_frame(normal)));
|
||||
navigator_controls::navigate(app, None, Some(app.cam.to_frame(normal)));
|
||||
}
|
||||
}
|
||||
if shown.arrows {
|
||||
navigation_cube::arrows(app, ui, &painter, c, scale, active, false, t);
|
||||
navigator_controls::arrows(app, ui, &painter, c, scale, active, t);
|
||||
}
|
||||
if shown.home {
|
||||
navigation_cube::home(app, ui, &painter, c, scale, active, t);
|
||||
navigator_controls::home(app, ui, &painter, c, scale, active, t);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -517,26 +517,26 @@ mod tests {
|
||||
fn the_rotation_arrows_and_home_follow_their_settings_and_turn_the_view() {
|
||||
let mut h = boxed();
|
||||
custom(&mut h);
|
||||
assert!(crate::scenario::handle_at("navigation_cube:control:left").is_some(), "arrows by default");
|
||||
assert!(crate::scenario::handle_at("navigation_cube:control:home").is_some(), "Home by default");
|
||||
assert!(crate::scenario::handle_at("navigator:control:left").is_some(), "arrows by default");
|
||||
assert!(crate::scenario::handle_at("navigator:control:home").is_some(), "Home by default");
|
||||
h.app.run("view.navigator", json!({"arrows": false, "home": false})).unwrap();
|
||||
h.frames(2);
|
||||
assert!(crate::scenario::handle_at("navigation_cube:control:left").is_none(), "arrows off");
|
||||
assert!(crate::scenario::handle_at("navigation_cube:control:home").is_none(), "Home off");
|
||||
assert!(crate::scenario::handle_at("navigator:control:left").is_none(), "arrows off");
|
||||
assert!(crate::scenario::handle_at("navigator:control:home").is_none(), "Home off");
|
||||
h.app.run("view.navigator", json!({"arrows": true, "home": true})).unwrap();
|
||||
h.frames(2);
|
||||
let p = crate::scenario::handle_at("navigation_cube:control:clockwise").expect("the roll arrows are there");
|
||||
let p = crate::scenario::handle_at("navigator:control:clockwise").expect("the roll arrows are there");
|
||||
let camera = h.app.cam;
|
||||
h.call("ui.click", json!({"x": p.x, "y": p.y}));
|
||||
assert!((h.app.cam.roll - camera.roll - std::f64::consts::FRAC_PI_2).abs() < 1e-6);
|
||||
let p = crate::scenario::handle_at("navigation_cube:control:home").expect("Home is there");
|
||||
let p = crate::scenario::handle_at("navigator:control:home").expect("Home is there");
|
||||
h.call("ui.click", json!({"x": p.x, "y": p.y}));
|
||||
assert!(h.app.cam.back().dist(Camera::default().back()) < 1e-6, "Home turns to the home view");
|
||||
assert!(crate::scenario::handle_at("navigation_cube:control:fit").is_none(), "Fit stays the cube's");
|
||||
assert!(crate::scenario::handle_at("navigator:control:fit").is_none(), "Fit is not offered");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn modeled_texture_paints_the_body_in_its_own_colour_and_themed_in_the_cubes() {
|
||||
fn modeled_texture_paints_the_body_in_its_own_colour_and_themed_in_the_theme_colours() {
|
||||
let mut h = boxed();
|
||||
let name = body_name(&h);
|
||||
let mut shape = Shape::of_body(&h.app.session, &name).unwrap();
|
||||
@@ -547,11 +547,11 @@ mod tests {
|
||||
hovered: None,
|
||||
texture,
|
||||
active: true,
|
||||
colours: [t.cube_face, t.cube_hover, t.body, t.viewport_top],
|
||||
colours: [t.navigator_face, t.navigator_hover, t.body, t.viewport_top],
|
||||
lift: t.hover_face_lift,
|
||||
};
|
||||
assert_ne!(t.body_edge, t.cube_border, "the two textures' edges can be told apart");
|
||||
// A hovered face: the cube's hover colours when themed, the view's mouse-over when modeled.
|
||||
assert_ne!(t.body_edge, t.navigator_border, "the two textures' edges can be told apart");
|
||||
// A hovered face: the navigator's hover colours when themed, the view's mouse-over when modeled.
|
||||
assert_eq!(hover_outline(NavigatorTexture::Themed, &t, &t), t.accent);
|
||||
assert_eq!(hover_outline(NavigatorTexture::Modeled, &t, &t), t.hover_edge);
|
||||
assert!(t.hover_face_lift > 0);
|
||||
@@ -569,8 +569,8 @@ mod tests {
|
||||
let red = middle(&compose(&r, &shape, &look(NavigatorTexture::Modeled)));
|
||||
assert!(red.r() > red.g() * 3 && red.r() > red.b() * 3, "the body's red: {red:?}");
|
||||
let themed = middle(&compose(&r, &shape, &look(NavigatorTexture::Themed)));
|
||||
let shade = f32::from(themed.r()) / f32::from(t.cube_face.r().max(1));
|
||||
assert!((0.7..=1.01).contains(&shade), "the cube's face colour, shaded: {themed:?}");
|
||||
let shade = f32::from(themed.r()) / f32::from(t.navigator_face.r().max(1));
|
||||
assert!((0.7..=1.01).contains(&shade), "the navigator's face colour, shaded: {themed:?}");
|
||||
// The gizmo draws without a frame failing in both textures.
|
||||
custom(&mut h);
|
||||
for texture in ["modeled", "themed"] {
|
||||
@@ -581,11 +581,11 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn custom_without_a_body_draws_the_cube() {
|
||||
fn custom_without_a_body_draws_the_signed_axes() {
|
||||
let mut h = boxed();
|
||||
h.call("ui.prefs", json!({"navigator_style": "custom"}));
|
||||
h.frames(2);
|
||||
assert!(crate::scenario::handle_at("navigation_cube:front").is_some() || crate::scenario::handle_at("navigation_cube:top").is_some());
|
||||
assert!(crate::scenario::handle_at("axis_view:z").is_some());
|
||||
assert_eq!(crate::scenario::count_of("body_gizmo:faces"), None);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@ fn stroke_colours(shapes: &[egui::epaint::ClippedShape]) -> std::collections::BT
|
||||
|
||||
/// Every axis is drawn in one set of X, Y and Z colours, the `axis_*` tokens (#976), in both
|
||||
/// themes and every colour vision mode: the Move gizmo's arrows, squares and rings, the view
|
||||
/// triad's ends, and the headless picture's origin axes, as the origin axes, the navigation
|
||||
/// cube's triad, 3D sketch triads and joint origins draw them.
|
||||
/// triad's ends, and the headless picture's origin axes, as the origin axes, the
|
||||
/// navigator's triad, 3D sketch triads and joint origins draw them.
|
||||
#[test]
|
||||
fn every_axis_is_drawn_in_one_set_of_colours() {
|
||||
use egui::{Pos2, Rect, vec2};
|
||||
@@ -146,7 +146,7 @@ fn analysis_colours_reach_the_shader_in_its_order() {
|
||||
/// hold none at all.
|
||||
const ALLOWED_LITERALS: &[(&str, usize, &str)] = &[
|
||||
("gpu.rs", 1, "the white tint that shows the background picture as it is"),
|
||||
("navigation.rs", 1, "the navigation cube's face shading, made from a token"),
|
||||
("navigation.rs", 1, "the navigator's face shading, made from a token"),
|
||||
("canvas.rs", 3, "white rings around manipulator handles"),
|
||||
(
|
||||
"body_gizmo.rs",
|
||||
|
||||
@@ -334,7 +334,7 @@ fn groups(t: &Tokens) -> Vec<Group> {
|
||||
group("validation status", &[("form_success", t.form_success), ("error", t.error)], &[("panel", t.panel)]),
|
||||
group("validation surfaces", &[("form_success_fill", t.form_success_fill), ("form_error_fill", t.form_error_fill)], &[]),
|
||||
group("UI text", &[("error", t.error), ("warning", t.warning), ("text", t.text)], &[("panel", t.panel)]),
|
||||
// Every axis drawn: origin, view triad, navigation cube, Move gizmo… (one set, #976).
|
||||
// Every axis drawn: origin, view triad, navigator, Move gizmo… (one set, #976).
|
||||
group("axes", &[("axis_x", t.axis_x), ("axis_y", t.axis_y), ("axis_z", t.axis_z)], &[("viewport_top", t.viewport_top)]),
|
||||
group(
|
||||
"assembly Move",
|
||||
@@ -639,11 +639,11 @@ const NO_MEANING: &[(&str, &str)] = &[
|
||||
("profile_fill", "a closed profile's tint"),
|
||||
("glyph_bg", "a constraint glyph's ground"),
|
||||
("glyph_edge", "a constraint glyph's edge"),
|
||||
// The navigation cube: labelled faces.
|
||||
("cube_face", "labelled"),
|
||||
("cube_border", "labelled"),
|
||||
("cube_text", "labelled"),
|
||||
("cube_hover", "hover highlight"),
|
||||
// The navigator: labelled faces.
|
||||
("navigator_face", "labelled"),
|
||||
("navigator_border", "labelled"),
|
||||
("navigator_text", "labelled"),
|
||||
("navigator_hover", "hover highlight"),
|
||||
// Not a colour.
|
||||
("analysis.hatch", "a flag: stripes on the failing faces"),
|
||||
// Icon colours that are a shade of a measured one, or one mark alone.
|
||||
|
||||
@@ -102,7 +102,7 @@ pub enum Target {
|
||||
},
|
||||
/// The workspace switcher.
|
||||
Workspace,
|
||||
/// The view gizmo (axes, cube or a custom body) at the viewport's corner.
|
||||
/// The view gizmo (axes or a custom body) at the viewport's corner.
|
||||
ViewGizmo,
|
||||
/// The Named Views folder, and one view (saved or standard) in it.
|
||||
NamedViews,
|
||||
|
||||
@@ -1865,7 +1865,7 @@ impl SolveApp {
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Front … Isometric (Ctrl+1…7 by default) turn the view as the view cube's faces do. The
|
||||
// Front … Isometric (Ctrl+1…7 by default) turn the view as the navigator's faces do. The
|
||||
// flat pattern is a 2D page: it has no other side to turn to.
|
||||
if solidcraft_engine::standard_view(id).is_some() {
|
||||
if !dialogs_sheet::flat_active(self) {
|
||||
@@ -1935,7 +1935,7 @@ impl SolveApp {
|
||||
return;
|
||||
}
|
||||
// A display toggle leaves the current modelling tool and camera in place, and the ribbon
|
||||
// where it is: F6, the navigation bar and the view cube never went through `start`, so
|
||||
// where it is: F6, the navigation bar and the navigator never went through `start`, so
|
||||
// command search and the VIEW tab's menus must not move the tab either (#10540).
|
||||
if matches!(
|
||||
id,
|
||||
@@ -3138,7 +3138,7 @@ impl SolveApp {
|
||||
self.pending_fit = Some((to, bounds, true, shared));
|
||||
}
|
||||
|
||||
/// A view chosen on a navigator (a cube face, corner or arrow, an axis tip): the view turns
|
||||
/// A view chosen on a navigator (a face, corner or arrow, an axis tip): the view turns
|
||||
/// in place, or frames the whole model from the new direction when Preferences › Navigation
|
||||
/// asks for it (`navigator_fit`, #10091).
|
||||
pub fn animate_turn(&mut self, to: Camera) {
|
||||
|
||||
@@ -455,7 +455,7 @@ fn view_keys_blocked(app: &SolveApp, ctx: &egui::Context, canvas: Option<egui::I
|
||||
}
|
||||
|
||||
/// View keys (#1541): the arrows turn the view 15° (with Shift a quarter turn, as the navigation
|
||||
/// cube's arrows), Ctrl+arrows pan it a tenth of the view, and Ctrl+8 looks straight at the
|
||||
/// navigator's arrows), Ctrl+arrows pan it a tenth of the view, and Ctrl+8 looks straight at the
|
||||
/// selected face, plane or sketch. Held longer than a tap, an arrow keeps turning the view at a
|
||||
/// steady rate (`step_key_hold`); the operating system's key repeat does nothing. Not while a
|
||||
/// menu, the command box or a focused widget has the arrows. Returns whether the key was used.
|
||||
@@ -557,7 +557,7 @@ pub(crate) struct CameraInput {
|
||||
pub primary_pressed: bool,
|
||||
/// The pointer is over this view and available for canvas input.
|
||||
pub inside: bool,
|
||||
/// The axis view or navigation cube's rectangle.
|
||||
/// The axis view or navigator's rectangle.
|
||||
pub axes: Rect,
|
||||
pub pinch: f32,
|
||||
pub pan: egui::Vec2,
|
||||
@@ -3062,7 +3062,7 @@ mod view_key_tests {
|
||||
assert!((turn(before, h.app.cam.yaw).abs() - 30f64.to_radians()).abs() < 1e-6);
|
||||
}
|
||||
|
||||
/// Ctrl+1…7 run Front … Isometric View by default, turning the view as the view cube's faces
|
||||
/// Ctrl+1…7 run Front … Isometric View by default, turning the view as the navigator's faces
|
||||
/// do; the keys are ordinary shortcuts, so one can be moved to another command and back.
|
||||
#[test]
|
||||
fn ctrl_digits_turn_to_the_standard_views_and_can_be_rebound() {
|
||||
|
||||
@@ -62,7 +62,7 @@ fn measured_bar_drops_labels_then_overflows_in_order_without_compass_overlap() {
|
||||
canvas,
|
||||
&[],
|
||||
1.0,
|
||||
crate::prefs::NavigatorStyle::Cube,
|
||||
crate::prefs::NavigatorStyle::Custom,
|
||||
egui::Vec2::ZERO,
|
||||
bar.rect,
|
||||
);
|
||||
@@ -136,9 +136,9 @@ fn a_bar_on_the_top_edge_sits_under_the_top_and_keeps_the_corner_controls_below_
|
||||
}
|
||||
for corner in [egui::Vec2::ZERO, vec2(120.0, 32.0)] {
|
||||
let layout =
|
||||
crate::viewport_layout::Layout::with_content(canvas, canvas, &[], 1.0, crate::prefs::NavigatorStyle::Cube, corner, bar.rect);
|
||||
crate::viewport_layout::Layout::with_content(canvas, canvas, &[], 1.0, crate::prefs::NavigatorStyle::Custom, corner, bar.rect);
|
||||
// The axis view keeps its full size: on top, it moves down past the bar instead.
|
||||
assert_eq!(layout.axis_view.width(), crate::viewport::axis_view_size(crate::prefs::NavigatorStyle::Cube));
|
||||
assert_eq!(layout.axis_view.width(), crate::viewport::axis_view_size(crate::prefs::NavigatorStyle::Custom));
|
||||
assert!(!layout.axis_view.intersect(bar.rect).is_positive(), "{position:?} {edge:?}");
|
||||
assert!(!layout.confirm.intersect(bar.rect).is_positive(), "{position:?} {edge:?}");
|
||||
assert!(!layout.confirm.intersect(layout.axis_view).is_positive(), "{position:?} {edge:?}");
|
||||
|
||||
@@ -1,934 +0,0 @@
|
||||
//! Original, code-drawn navigation cube. Flat faces share invisible picking regions.
|
||||
use super::*;
|
||||
use crate::icons::navigation::{Facet, arrow, curved_arrow, paint_cube};
|
||||
use solidcraft_engine::geom::Ring;
|
||||
|
||||
pub(super) const SIZE: f32 = 112.0;
|
||||
// Paint and picking use the same original coordinate space, scaled as a group.
|
||||
pub(super) const DESIGN_SIZE: f32 = 164.0;
|
||||
const HALF: f64 = 40.0;
|
||||
// Corner squares lie on the six flat faces, preserving a sharp cube silhouette.
|
||||
// The remaining regions belong to the face, including the middle of each edge.
|
||||
const INSET: f64 = 0.68;
|
||||
|
||||
fn camera(app: &SolveApp) -> Camera {
|
||||
let mut cam = app.cam;
|
||||
if !crate::render_workspace::active(app) {
|
||||
cam.fov = app.view_fov();
|
||||
}
|
||||
cam
|
||||
}
|
||||
|
||||
fn inverse_focal_length(cam: &Camera) -> f64 {
|
||||
// The field of view spans the whole navigator, including the margin around its cube.
|
||||
let half_height = f64::from(DESIGN_SIZE) / (2.0 * HALF);
|
||||
if cam.fov.is_finite() { (cam.fov.clamp(0.0, std::f64::consts::FRAC_PI_2) * 0.5).tan() / half_height } else { 0.0 }
|
||||
}
|
||||
|
||||
fn project(cam: &Camera, v: Vec3, scale: f64) -> egui::Vec2 {
|
||||
let (r, u, b) = cam.basis();
|
||||
let v = cam.from_frame(v);
|
||||
// A unit cube has its own camera, independent of model size and zoom. Place its eye
|
||||
// one unit beyond the focal distance: the front face keeps its size beside the arrows.
|
||||
// At the maximum 90-degree field of view the eye is still outside the cube's sphere,
|
||||
// so every vertex stays in front of it. Zero fov gives the original parallel projection.
|
||||
let denominator = 1.0 + inverse_focal_length(cam) * (1.0 - v.dot(b));
|
||||
vec2((v.dot(r) * scale / denominator) as f32, -(v.dot(u) * scale / denominator) as f32)
|
||||
}
|
||||
|
||||
/// Local projected axes at a label's centre; a direction alone has no perspective position.
|
||||
fn project_direction(cam: &Camera, at: Vec3, direction: Vec3) -> egui::Vec2 {
|
||||
let (r, u, b) = cam.basis();
|
||||
let inverse_focal = inverse_focal_length(cam);
|
||||
let direction = cam.from_frame(direction);
|
||||
let denominator = 1.0 + inverse_focal * (1.0 - cam.from_frame(at).dot(b));
|
||||
let parallel = vec2(direction.dot(r) as f32, -direction.dot(u) as f32);
|
||||
(parallel + project(cam, at, 1.0) * (inverse_focal * direction.dot(b)) as f32) / denominator as f32
|
||||
}
|
||||
|
||||
fn direction_label(d: Vec3) -> String {
|
||||
[(d.z, "BOTTOM", "TOP"), (d.y, "FRONT", "BACK"), (d.x, "LEFT", "RIGHT")]
|
||||
.into_iter()
|
||||
.filter_map(|(v, neg, pos)| {
|
||||
if v < 0.0 {
|
||||
Some(neg)
|
||||
} else if v > 0.0 {
|
||||
Some(pos)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join(" · ")
|
||||
}
|
||||
|
||||
fn facets(cam: &Camera, c: Pos2, half: f64) -> Vec<Facet> {
|
||||
if !cam.is_valid() {
|
||||
return Vec::new();
|
||||
}
|
||||
let mut out = Vec::new();
|
||||
let inverse_focal = inverse_focal_length(cam);
|
||||
let inverse_eye_distance = inverse_focal / (1.0 + inverse_focal);
|
||||
let mut add = |d: Vec3, normal: Vec3, mut vertices: Vec<Vec3>, axes: Option<(Vec3, Vec3)>| {
|
||||
let depth = cam.from_frame(normal).dot(cam.back());
|
||||
// All face planes are one unit from the origin. In perspective a face must look
|
||||
// toward the finite eye, not merely toward the parallel view direction.
|
||||
if depth <= inverse_eye_distance + 1e-5 {
|
||||
return;
|
||||
}
|
||||
let centre = vertices.iter().copied().fold(Vec3::ZERO, |sum, p| sum + p) / vertices.len() as f64;
|
||||
let projected_centre = project(cam, centre, half);
|
||||
let at = c + projected_centre;
|
||||
vertices.sort_by(|a, b| {
|
||||
let a = project(cam, *a, half) - projected_centre;
|
||||
let b = project(cam, *b, half) - projected_centre;
|
||||
a.y.atan2(a.x).total_cmp(&b.y.atan2(b.x))
|
||||
});
|
||||
let vertices = Ring::new(vertices);
|
||||
let outer_edges = vertices
|
||||
.edges()
|
||||
.map(|(a, b)| [(a.x, b.x), (a.y, b.y), (a.z, b.z)].into_iter().filter(|(a, b)| a.abs() == 1.0 && a == b).count() >= 2)
|
||||
.collect();
|
||||
let points = vertices.into_iter().map(|v| c + project(cam, v, half)).collect();
|
||||
out.push(Facet {
|
||||
direction: d,
|
||||
points,
|
||||
outer_edges,
|
||||
centre: at,
|
||||
label: direction_label(d),
|
||||
text_axes: axes.map(|(r, u)| (project_direction(cam, centre, r), -project_direction(cam, centre, u))),
|
||||
depth,
|
||||
});
|
||||
};
|
||||
// Nine coplanar patches per square face. The middle and four side patches
|
||||
// share the face target; three corner squares share one isometric target.
|
||||
for (n, r, u) in [
|
||||
(Vec3::X, Vec3::Y, Vec3::Z),
|
||||
(-Vec3::X, -Vec3::Y, Vec3::Z),
|
||||
(Vec3::Y, -Vec3::X, Vec3::Z),
|
||||
(-Vec3::Y, Vec3::X, Vec3::Z),
|
||||
(Vec3::Z, Vec3::X, Vec3::Y),
|
||||
(-Vec3::Z, Vec3::X, -Vec3::Y),
|
||||
] {
|
||||
let bands = [(-1.0, -INSET, -1.0), (-INSET, INSET, 0.0), (INSET, 1.0, 1.0)];
|
||||
for (x0, x1, sx) in bands {
|
||||
for (y0, y1, sy) in bands {
|
||||
add(
|
||||
if sx != 0.0 && sy != 0.0 { n + r * sx + u * sy } else { n },
|
||||
n,
|
||||
[(x0, y0), (x1, y0), (x1, y1), (x0, y1)].into_iter().map(|(x, y)| n + r * x + u * y).collect(),
|
||||
if sx == 0.0 && sy == 0.0 { Some((r, u)) } else { None },
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
out.sort_by(|a, b| a.depth.total_cmp(&b.depth));
|
||||
out
|
||||
}
|
||||
|
||||
fn contains(points: &Ring<Pos2>, p: Pos2) -> bool {
|
||||
if !p.is_finite() || points.len() < 3 {
|
||||
return false;
|
||||
}
|
||||
let mut sign = 0.0_f32;
|
||||
for (a, b) in points.edges() {
|
||||
let edge = *b - *a;
|
||||
let offset = p - *a;
|
||||
let cross = edge.x * offset.y - edge.y * offset.x;
|
||||
if cross.abs() > 1e-3 {
|
||||
if sign != 0.0 && sign.signum() != cross.signum() {
|
||||
return false;
|
||||
}
|
||||
sign = cross;
|
||||
}
|
||||
}
|
||||
sign != 0.0
|
||||
}
|
||||
|
||||
fn hit(faces: &[Facet], p: Pos2) -> Option<usize> {
|
||||
faces.iter().enumerate().rev().find(|(_, f)| contains(&f.points, p)).map(|(i, _)| i)
|
||||
}
|
||||
|
||||
pub(super) fn drag_origin(app: &SolveApp, centre: Pos2, pointer: Pos2, scale: f32) -> bool {
|
||||
hit(&facets(&camera(app), centre, HALF * f64::from(scale)), pointer).is_some()
|
||||
}
|
||||
|
||||
pub(super) fn navigate(app: &mut SolveApp, action: Option<&str>, dir: Option<Vec3>) {
|
||||
// Same as arrow-key steps (#8912): turn from where a glide in flight is going, so rapid
|
||||
// clicks add full turns instead of restarting from a mid-animation camera.
|
||||
let from = app.cam_anim.map_or(app.cam, |a| a.to);
|
||||
let mut params = json!({"camera": from});
|
||||
if let Some(action) = action {
|
||||
params["action"] = json!(action);
|
||||
}
|
||||
if let Some(d) = dir {
|
||||
params["direction"] = json!([d.x, d.y, d.z]);
|
||||
}
|
||||
// Preferences › Navigation: a view chosen on the cube also frames the whole model (#10091).
|
||||
if app.preferences.navigator_fit {
|
||||
params["fit"] = json!(true);
|
||||
}
|
||||
let _ = app.run("view.navigate", params);
|
||||
}
|
||||
|
||||
fn control(app: &mut SolveApp, ui: &mut egui::Ui, bounds: Rect, action: &str, tooltip: &str) -> bool {
|
||||
crate::scenario::publish_handle(&format!("navigation_cube:control:{action}"), bounds.center());
|
||||
let response = ui.interact(bounds, ui.scope_id().with(("navigation_cube", action)), Sense::click()).backing_on_hover_text(tooltip);
|
||||
let hover = response.hovered();
|
||||
if response.clicked() {
|
||||
navigate(app, Some(action), None);
|
||||
}
|
||||
// The control takes the right-click from the viewport under it: open the gizmo's menu.
|
||||
if response.secondary_clicked()
|
||||
&& app.dialog.is_none()
|
||||
&& let Some(at) = response.interact_pointer_pos()
|
||||
{
|
||||
crate::context_menu::open_for(app, at, crate::context_menu::Target::ViewGizmo);
|
||||
}
|
||||
hover
|
||||
}
|
||||
|
||||
/// Preferences › Navigation: "Invert the view cube rotation arrows" (#10254). With it on, an
|
||||
/// arrow orbits the camera the way the arrow points (camera-centric, as in Fusion and Inventor)
|
||||
/// instead of rotating the cube toward the side the arrow sits on, so left and right, and up and
|
||||
/// down, trade places. The tooltip names the action actually performed. The curved roll arrows
|
||||
/// are not inverted: they name the rotation they perform, not a direction.
|
||||
fn inverted_arrow(action: &str) -> Option<&'static str> {
|
||||
match action {
|
||||
"left" => Some("right"),
|
||||
"right" => Some("left"),
|
||||
"up" => Some("down"),
|
||||
"down" => Some("up"),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Preferences › Navigation: "Invert the curved roll arrows" (#10483). With it on, the two
|
||||
/// curved arrows at the cube's corner roll the view the other way within the screen plane: the
|
||||
/// clockwise arrow rolls counterclockwise and the counterclockwise arrow rolls clockwise. The
|
||||
/// arrow keeps its curl; the tooltip names the roll actually performed.
|
||||
fn inverted_roll(action: &str) -> Option<&'static str> {
|
||||
match action {
|
||||
"clockwise" => Some("counterclockwise"),
|
||||
"counterclockwise" => Some("clockwise"),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn show(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect) {
|
||||
let outer = axis_rect(app, rect);
|
||||
if !outer.is_positive() {
|
||||
app.viewport.axis_drag = None;
|
||||
crate::scenario::publish_count("axis_view_highlights", 0.0);
|
||||
return;
|
||||
}
|
||||
crate::scenario::publish_rect("axis_view:outer", outer);
|
||||
let scale = outer.width() / DESIGN_SIZE;
|
||||
let c = axis_center(app, rect);
|
||||
let orbiting = axis_view_orbit(app, ui, rect);
|
||||
let active = orbiting || ui.rect_contains_pointer(outer);
|
||||
let t = Tokens::get().navigation_cube(active);
|
||||
crate::scenario::publish_count("navigation_cube:active", f64::from(u8::from(active)));
|
||||
let faces = facets(&camera(app), c, HALF * f64::from(scale));
|
||||
let hover = ui.input(|i| i.pointer.hover_pos()).filter(|p| ui.is_enabled() && ui.rect_contains_pointer(rect) && !crate::shell::covered(app, *p));
|
||||
let hovered = if orbiting { None } else { hover.and_then(|p| hit(&faces, p)) };
|
||||
let painter = ui.painter_at(outer);
|
||||
paint_cube(&painter, &faces, hovered, t, true, scale);
|
||||
for (i, face) in faces.iter().enumerate() {
|
||||
if faces.iter().take(i).any(|f| f.direction == face.direction) {
|
||||
continue;
|
||||
}
|
||||
let pieces: Vec<_> = faces.iter().filter(|f| f.direction == face.direction).collect();
|
||||
let centre = pieces.iter().fold(egui::Vec2::ZERO, |sum, f| sum + f.centre.to_vec2()) / pieces.len() as f32;
|
||||
crate::scenario::publish_handle(&format!("navigation_cube:{}", face.label.to_ascii_lowercase().replace(" · ", "_")), centre.to_pos2());
|
||||
// Keep principal-axis handles for existing automation, using only visible faces.
|
||||
let world = app.cam.from_frame(face.direction);
|
||||
let axis = match (world.x, world.y, world.z) {
|
||||
(1.0, 0.0, 0.0) => Some("x"),
|
||||
(-1.0, 0.0, 0.0) => Some("-x"),
|
||||
(0.0, 1.0, 0.0) => Some("y"),
|
||||
(0.0, -1.0, 0.0) => Some("-y"),
|
||||
(0.0, 0.0, 1.0) => Some("z"),
|
||||
(0.0, 0.0, -1.0) => Some("-z"),
|
||||
_ => None,
|
||||
};
|
||||
if let Some(axis) = axis {
|
||||
crate::scenario::publish_handle(&format!("axis_view:{axis}"), centre.to_pos2());
|
||||
}
|
||||
}
|
||||
crate::scenario::publish_count("axis_view_highlights", f64::from(u8::from(hovered.is_some())));
|
||||
if let Some(face) = hovered.and_then(|i| faces.get(i)) {
|
||||
ui.ctx().set_cursor_icon(egui::CursorIcon::PointingHand);
|
||||
ui.interact(Rect::from_center_size(hover.unwrap_or(face.centre), vec2(2.0, 2.0)), ui.scope_id().with("navigation_cube_tip"), Sense::hover())
|
||||
.backing_on_hover_text(format!(
|
||||
"{} view. Drag to orbit{}.",
|
||||
face.label,
|
||||
if app.preferences.free_orbit { "" } else { "; hold Shift to snap" }
|
||||
));
|
||||
if ui.input(|i| i.pointer.primary_clicked()) {
|
||||
navigate(app, None, Some(face.direction));
|
||||
}
|
||||
}
|
||||
let square_on = faces.iter().filter(|f| f.text_axes.is_some()).count() == 1;
|
||||
arrows(app, ui, &painter, c, scale, active, square_on, t);
|
||||
home(app, ui, &painter, c, scale, active, t);
|
||||
let fit = Rect::from_center_size(c + vec2(67.0, 67.0) * scale, vec2(22.0, 22.0) * scale);
|
||||
let fit_hover = control(app, ui, fit, "fit", "Fit model in view");
|
||||
if active {
|
||||
painter.circle(fit.center(), 6.0 * scale, if fit_hover { t.accent_soft } else { t.cube_face }, Stroke::new(1.0, t.cube_border));
|
||||
}
|
||||
// Small world-axis triad below the cube; it follows the selected up-axis frame.
|
||||
let origin = c + vec2(-60.0, 52.0) * scale;
|
||||
for (d, color, label) in [(Vec3::X, t.axis_x, "X"), (Vec3::Y, t.axis_y, "Y"), (Vec3::Z, t.axis_z, "Z")] {
|
||||
let (r, u, _) = app.cam.basis();
|
||||
let tip = origin + vec2((d.dot(r) * 17.0) as f32, -(d.dot(u) * 17.0) as f32) * scale;
|
||||
painter.line_segment([origin, tip], Stroke::new(1.5, color));
|
||||
painter.text(tip, Align2::CENTER_CENTER, label, FontId::proportional(solidcraft_theme::Tokens::get().font_triad), color);
|
||||
}
|
||||
}
|
||||
|
||||
/// The Home button at the top left of a gizmo centred at `c`, painted while it is `active`.
|
||||
pub(super) fn home(app: &mut SolveApp, ui: &mut egui::Ui, painter: &egui::Painter, c: Pos2, scale: f32, active: bool, t: Tokens) {
|
||||
let home = Rect::from_center_size(c + vec2(-65.0, -65.0) * scale, vec2(26.0, 26.0) * scale);
|
||||
crate::scenario::publish_target("axis_view:home", home);
|
||||
let home_hover = control(app, ui, home, "home", "Home: isometric view and fit model");
|
||||
if active {
|
||||
icons::paint_icon(painter, home.shrink(4.0 * scale), "home", f32::from((if home_hover { t.accent } else { t.cube_face }).a()) / 255.0);
|
||||
}
|
||||
}
|
||||
|
||||
/// The four orbit arrows and the two roll arrows around a gizmo centred at `c`: nearer and larger
|
||||
/// while a cube face is square on, painted while the gizmo is `active`.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(super) fn arrows(app: &mut SolveApp, ui: &mut egui::Ui, painter: &egui::Painter, c: Pos2, scale: f32, active: bool, square_on: bool, t: Tokens) {
|
||||
let (distance, button_size) = if square_on { (54.0, 20.0) } else { (74.0, 16.0) };
|
||||
for (action, offset, direction, tooltip) in [
|
||||
("left", vec2(-distance, 0.0), vec2(1.0, 0.0), "Orbit left 90°"),
|
||||
("right", vec2(distance, 0.0), vec2(-1.0, 0.0), "Orbit right 90°"),
|
||||
("up", vec2(0.0, -distance), vec2(0.0, 1.0), "Orbit up 90°"),
|
||||
("down", vec2(0.0, distance), vec2(0.0, -1.0), "Orbit down 90°"),
|
||||
] {
|
||||
let (action, tooltip) = match app.preferences.invert_navigator_arrows.then(|| inverted_arrow(action)).flatten() {
|
||||
Some(swapped) => (
|
||||
swapped,
|
||||
match swapped {
|
||||
"right" => "Orbit right 90°",
|
||||
"left" => "Orbit left 90°",
|
||||
"down" => "Orbit down 90°",
|
||||
_ => "Orbit up 90°",
|
||||
},
|
||||
),
|
||||
None => (action, tooltip),
|
||||
};
|
||||
let at = c + offset * scale;
|
||||
let hovered = control(app, ui, Rect::from_center_size(at, vec2(button_size, button_size) * scale), action, tooltip);
|
||||
if active {
|
||||
arrow(painter, at, direction * scale, hovered, t);
|
||||
}
|
||||
}
|
||||
for (action, offset, size, clockwise, tooltip) in [
|
||||
("counterclockwise", vec2(42.0, -72.0), vec2(40.0, 20.0), false, "Rotate view counterclockwise 90°"),
|
||||
("clockwise", vec2(72.0, -42.0), vec2(20.0, 40.0), true, "Rotate view clockwise 90°"),
|
||||
] {
|
||||
let (action, tooltip) = match app.preferences.invert_curved_roll_arrows.then(|| inverted_roll(action)).flatten() {
|
||||
Some(swapped) => (swapped, if swapped == "clockwise" { "Rotate view clockwise 90°" } else { "Rotate view counterclockwise 90°" }),
|
||||
None => (action, tooltip),
|
||||
};
|
||||
let hovered = control(app, ui, Rect::from_center_size(c + offset * scale, size * scale), action, tooltip);
|
||||
if active {
|
||||
curved_arrow(painter, c + vec2(42.0, -42.0) * scale, clockwise, hovered, t, scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
#[cfg(test)]
|
||||
use crate::icons::navigation::{LABEL_PIXELS, face_text};
|
||||
use solidcraft_viewport::{StandardView, UpAxis};
|
||||
|
||||
fn paint_frame(ctx: &egui::Context, paint: impl FnMut(&mut egui::Ui)) -> egui::FullOutput {
|
||||
let mut output = ctx.run_ui(egui::RawInput::default(), paint);
|
||||
// These tests inspect shapes without uploading textures to a renderer.
|
||||
output.textures_delta.clear();
|
||||
output
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cube_projection_foreshortens_depth_only_in_perspective() {
|
||||
for up in [UpAxis::Z, UpAxis::Y] {
|
||||
let mut cam = Camera { up, ..Default::default() };
|
||||
cam.set_view(StandardView::Front);
|
||||
let near = Vec3::new(0.5, -1.0, 0.0);
|
||||
let far = Vec3::new(0.5, 1.0, 0.0);
|
||||
assert_eq!(project(&cam, near, HALF), project(&cam, far, HALF));
|
||||
for fov in [0.2618, 0.6, std::f64::consts::FRAC_PI_2] {
|
||||
cam.fov = fov;
|
||||
let front = project(&cam, near, HALF);
|
||||
let back = project(&cam, far, HALF);
|
||||
assert!(back.x < front.x, "perspective must make the far edge smaller: {up:?}, {fov}");
|
||||
assert!((front.x - HALF as f32 * 0.5).abs() < 1e-4, "the front face must retain its size beside the orbit arrows");
|
||||
let focal_distance = f64::from(DESIGN_SIZE) / (2.0 * HALF * (fov * 0.5).tan());
|
||||
let ratio = focal_distance / (focal_distance + 2.0);
|
||||
assert!((f64::from(back.x / front.x) - ratio).abs() < 1e-6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn perspective_toggle_changes_the_cube_and_its_faces_still_navigate() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube", "look_at_anim":false}));
|
||||
h.call("ui.view", json!({"view":"iso"}));
|
||||
let orthographic = crate::scenario::handle_at("navigation_cube:front").unwrap();
|
||||
h.call("ui.set", json!({"perspective":true}));
|
||||
let fov = camera(&h.app).fov;
|
||||
assert!(fov > 0.0);
|
||||
let p = crate::scenario::handle_at("navigation_cube:front").unwrap();
|
||||
assert_ne!(p, orthographic, "the drawn cube must follow the viewport's projection selection");
|
||||
h.call("ui.click", json!({"x":p.x,"y":p.y}));
|
||||
assert_eq!(h.app.cam.aligned_standard_view(1e-5), Some(StandardView::Front));
|
||||
assert_eq!(camera(&h.app).fov, fov);
|
||||
h.call("ui.set", json!({"autoOrthoFaces":true}));
|
||||
assert_eq!(camera(&h.app).fov, 0.0, "automatic orthographic axis views also apply to the cube");
|
||||
h.call("ui.view", json!({"view":"iso"}));
|
||||
assert_eq!(camera(&h.app).fov, fov);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn perspective_cube_culls_sides_facing_away_and_ignores_model_framing() {
|
||||
let cam = Camera { yaw: -0.1, pitch: 0.1, fov: 0.6, ..Default::default() };
|
||||
let faces = facets(&cam, Pos2::ZERO, HALF);
|
||||
assert_eq!(faces.len(), 9, "only the front face is visible from this finite eye");
|
||||
assert!(faces.iter().all(|face| face.direction.y == -1.0));
|
||||
let points = |cam: &Camera| facets(cam, Pos2::ZERO, HALF).into_iter().flat_map(|face| face.points).collect::<Vec<_>>();
|
||||
let expected = points(&cam);
|
||||
for distance in [1e-3, 100.0, 1e12] {
|
||||
assert_eq!(points(&Camera { distance, target: Vec3::new(123.0, -456.0, 789.0), ..cam }), expected);
|
||||
}
|
||||
let parallel = Camera { fov: 0.0, ..cam };
|
||||
for fov in [f64::NAN, f64::INFINITY, -1.0] {
|
||||
assert_eq!(points(&Camera { fov, ..cam }), points(¶llel));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cube_targets_are_only_six_faces_and_eight_corners_in_both_up_frames() {
|
||||
for up in [UpAxis::Z, UpAxis::Y] {
|
||||
let mut directions = Vec::new();
|
||||
for view in [StandardView::Front, StandardView::Back, StandardView::Top, StandardView::Bottom, StandardView::Left, StandardView::Right] {
|
||||
let mut cam = Camera { up, ..Default::default() };
|
||||
cam.set_view(view);
|
||||
for facet in facets(&cam, Pos2::ZERO, HALF) {
|
||||
let axes = [facet.direction.x, facet.direction.y, facet.direction.z].into_iter().filter(|v| *v != 0.0).count();
|
||||
assert!(axes == 1 || axes == 3, "cube edges must not be independent targets: {}", facet.label);
|
||||
if !directions.contains(&facet.direction) {
|
||||
directions.push(facet.direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
assert_eq!(directions.len(), 14);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn former_edge_strips_click_the_face_and_hover_without_internal_seams() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube"}));
|
||||
let ctx = crate::fonts::test_context();
|
||||
h.app.preferences.look_at_anim = false;
|
||||
for up in ["z", "y"] {
|
||||
h.call("ui.prefs", json!({"up_axis":up}));
|
||||
h.call("ui.view", json!({"view":"front"}));
|
||||
let camera = h.app.cam;
|
||||
let outer = crate::scenario::rect_of("axis_view:outer").unwrap();
|
||||
let half = HALF * f64::from(outer.width() / DESIGN_SIZE);
|
||||
let faces = facets(&camera, outer.center(), half);
|
||||
assert!(crate::scenario::handle_at("navigation_cube:front_right").is_none());
|
||||
assert!(crate::scenario::handle_at("navigation_cube:top_front").is_none());
|
||||
for direction in [Vec3::X, -Vec3::X, Vec3::Z, -Vec3::Z] {
|
||||
let p = outer.center() + project(&camera, direction * 0.84, half);
|
||||
let hovered = hit(&faces, p).unwrap();
|
||||
assert_eq!(faces[hovered].direction, -Vec3::Y);
|
||||
h.call("ui.move", json!({"x":p.x,"y":p.y}));
|
||||
h.call("ui.click", json!({"x":p.x,"y":p.y}));
|
||||
assert_eq!(h.app.cam, camera, "a former edge strip must select FRONT, never a diagonal view");
|
||||
let t = Tokens::light();
|
||||
let output = paint_frame(&ctx, |ui| {
|
||||
paint_cube(ui.painter(), &faces, Some(hovered), t, false, 1.0);
|
||||
});
|
||||
let centre = Rect::from_center_size(outer.center(), vec2(2.0, 2.0) * (INSET * half) as f32);
|
||||
let mut outline = 0;
|
||||
for shape in &output.shapes {
|
||||
if let Shape::LineSegment { points: [a, b], stroke } = &shape.shape
|
||||
&& stroke.color == t.accent
|
||||
{
|
||||
outline += 1;
|
||||
assert!(!centre.contains(a.lerp(*b, 0.5)), "face subdivisions must not draw hover seams");
|
||||
}
|
||||
}
|
||||
assert_eq!(outline, 12, "one continuous face outline around the four corner targets");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hovering_cube_sections_activates_then_leaving_restores_idle_without_navigation() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube"}));
|
||||
let camera = h.app.cam;
|
||||
let design = h.app.session.doc.to_json();
|
||||
let viewport = h.app.viewport.rect.unwrap();
|
||||
for name in ["front", "right", "top_front_right"] {
|
||||
let p = crate::scenario::handle_at(&format!("navigation_cube:{name}")).unwrap();
|
||||
h.call("ui.move", json!({"x":p.x,"y":p.y}));
|
||||
assert_eq!(crate::scenario::count_of("navigation_cube:active"), Some(1.0));
|
||||
assert_eq!(crate::scenario::count_of("axis_view_highlights"), Some(1.0));
|
||||
h.call("ui.move", json!({"x":viewport.center().x,"y":viewport.center().y}));
|
||||
assert_eq!(crate::scenario::count_of("navigation_cube:active"), Some(0.0));
|
||||
assert_eq!(crate::scenario::count_of("axis_view_highlights"), Some(0.0));
|
||||
}
|
||||
// Reveal auxiliary controls even before the pointer touches a facet.
|
||||
let p = crate::scenario::handle_at("navigation_cube:control:home").unwrap();
|
||||
h.call("ui.move", json!({"x":p.x,"y":p.y}));
|
||||
assert_eq!(crate::scenario::count_of("navigation_cube:active"), Some(1.0));
|
||||
assert_eq!(crate::scenario::count_of("axis_view_highlights"), Some(0.0));
|
||||
assert_eq!(h.app.cam, camera);
|
||||
assert_eq!(h.app.session.doc.to_json(), design);
|
||||
assert!(h.app.session.undo.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hovered_face_and_corner_have_a_pale_blue_opaque_fill_in_both_themes() {
|
||||
let ctx = crate::fonts::test_context();
|
||||
let faces = facets(&Camera::default(), pos2(100.0, 100.0), HALF);
|
||||
for t in [Tokens::light(), Tokens::dark()] {
|
||||
assert_ne!(t.navigation_cube(false).cube_face, t.cube_face);
|
||||
for name in ["FRONT", "RIGHT", "TOP · FRONT · RIGHT"] {
|
||||
let hovered = faces.iter().position(|f| f.label == name).unwrap();
|
||||
let output = paint_frame(&ctx, |ui| {
|
||||
paint_cube(ui.painter(), &faces, Some(hovered), t.navigation_cube(true), false, 1.0);
|
||||
});
|
||||
let mesh = output.shapes.iter().find_map(|s| if let Shape::Mesh(m) = &s.shape { Some(m) } else { None }).unwrap();
|
||||
let highlighted: Vec<_> = mesh.vertices.iter().filter(|v| v.color == t.cube_hover).collect();
|
||||
let pieces: Vec<_> = faces.iter().filter(|f| f.direction == faces[hovered].direction).collect();
|
||||
assert_eq!(
|
||||
highlighted.len(),
|
||||
pieces.iter().map(|f| f.points.len() + 1).sum::<usize>(),
|
||||
"highlight the same target on adjacent flat faces"
|
||||
);
|
||||
assert!(highlighted.iter().all(|v| pieces.iter().any(|f| contains(&f.points, v.pos))));
|
||||
assert!(mesh.vertices.iter().all(|v| v.color.a() == 255));
|
||||
assert!(output.shapes.iter().any(|s| matches!(&s.shape, Shape::LineSegment { stroke, .. } if stroke.color == t.accent)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn idle_principal_views_have_square_faces_without_visible_picking_seams() {
|
||||
let ctx = crate::fonts::test_context();
|
||||
for up in [UpAxis::Z, UpAxis::Y] {
|
||||
for view in [StandardView::Front, StandardView::Back, StandardView::Top, StandardView::Bottom, StandardView::Left, StandardView::Right] {
|
||||
let mut cam = Camera { up, ..Default::default() };
|
||||
cam.set_view(view);
|
||||
let centre = pos2(100.0, 100.0);
|
||||
let faces = facets(&cam, centre, HALF);
|
||||
assert_eq!(faces.len(), 9, "one square face partitioned into nine coplanar picking regions");
|
||||
let bounds = Rect::from_points(&faces.iter().flat_map(|f| f.points.iter().copied()).collect::<Vec<_>>());
|
||||
let expected = Rect::from_center_size(centre, vec2(80.0, 80.0));
|
||||
assert!(
|
||||
bounds.min.distance(expected.min) < 1e-4 && bounds.max.distance(expected.max) < 1e-4,
|
||||
"the silhouette must reach all four square corners"
|
||||
);
|
||||
let output = paint_frame(&ctx, |ui| {
|
||||
paint_cube(ui.painter(), &faces, None, Tokens::light(), false, 1.0);
|
||||
});
|
||||
let mesh = output.shapes.iter().find_map(|s| if let Shape::Mesh(m) = &s.shape { Some(m) } else { None }).unwrap();
|
||||
let fill = mesh.vertices.first().unwrap().color;
|
||||
assert!(mesh.vertices.iter().all(|v| v.color == fill), "picking regions must have identical face shading");
|
||||
for s in &output.shapes {
|
||||
if let Shape::LineSegment { points: [a, b], .. } = &s.shape {
|
||||
assert!(
|
||||
(a.x - expected.left()).abs() < 1e-4 && (b.x - expected.left()).abs() < 1e-4
|
||||
|| (a.x - expected.right()).abs() < 1e-4 && (b.x - expected.right()).abs() < 1e-4
|
||||
|| (a.y - expected.top()).abs() < 1e-4 && (b.y - expected.top()).abs() < 1e-4
|
||||
|| (a.y - expected.bottom()).abs() < 1e-4 && (b.y - expected.bottom()).abs() < 1e-4,
|
||||
"idle outlines must lie on the cube perimeter, never on a picking boundary"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn projected_facets_pick_their_own_centres_in_all_views_and_up_frames() {
|
||||
for up in [UpAxis::Z, UpAxis::Y] {
|
||||
for view in [
|
||||
StandardView::Front,
|
||||
StandardView::Back,
|
||||
StandardView::Top,
|
||||
StandardView::Bottom,
|
||||
StandardView::Left,
|
||||
StandardView::Right,
|
||||
StandardView::Iso,
|
||||
] {
|
||||
let mut cam = Camera { up, ..Default::default() };
|
||||
cam.set_view(view);
|
||||
for roll in [0.0, 0.7, std::f64::consts::FRAC_PI_2] {
|
||||
cam.roll = roll;
|
||||
for fov in [0.0, 0.2618, 0.6, std::f64::consts::FRAC_PI_2] {
|
||||
cam.fov = fov;
|
||||
let faces = facets(&cam, Pos2::ZERO, HALF);
|
||||
assert!(!faces.is_empty());
|
||||
for (i, face) in faces.iter().enumerate() {
|
||||
assert_eq!(hit(&faces, face.centre), Some(i), "{up:?} {view:?} {roll} {fov} {}", face.label);
|
||||
assert!(face.points.iter().all(|p| p.is_finite() && p.to_vec2().length() <= (HALF * 3.0_f64.sqrt()) as f32 + 1e-4));
|
||||
}
|
||||
assert!(hit(&faces, pos2(80.0, 80.0)).is_none());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn face_labels_use_normalized_font_atlas_coordinates() {
|
||||
let ctx = crate::fonts::test_context();
|
||||
let output = paint_frame(&ctx, |ui| {
|
||||
let faces = facets(&Camera::default(), pos2(100.0, 100.0), HALF);
|
||||
for face in &faces {
|
||||
face_text(ui.painter(), face, Tokens::light().cube_text, Tokens::get().font_heading);
|
||||
}
|
||||
});
|
||||
let meshes: Vec<_> = output.shapes.iter().filter_map(|shape| if let Shape::Mesh(mesh) = &shape.shape { Some(mesh) } else { None }).collect();
|
||||
assert_eq!(meshes.len(), 3, "the isometric view must show three face labels");
|
||||
for mesh in meshes {
|
||||
assert!(!mesh.vertices.is_empty());
|
||||
assert!(mesh.vertices.iter().all(|v| (0.0..=1.0).contains(&v.uv.x) && (0.0..=1.0).contains(&v.uv.y)));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn label_uvs_follow_font_atlas_growth_later_in_the_same_frame() {
|
||||
let ctx = crate::fonts::test_context();
|
||||
let mut pixel_uv = Pos2::ZERO;
|
||||
let mut glyph_vertex = 0;
|
||||
let mut early_size = [0; 2];
|
||||
let output = paint_frame(&ctx, |ui| {
|
||||
let mut cam = Camera::default();
|
||||
cam.set_view(StandardView::Top);
|
||||
let faces = facets(&cam, pos2(100.0, 100.0), HALF);
|
||||
let face = faces.iter().find(|f| f.label == "TOP" && f.text_axes.is_some()).unwrap();
|
||||
let galley = ui.painter().layout_no_wrap(face.label.clone(), FontId::proportional(14.0), Tokens::light().cube_text);
|
||||
let (index, vertex) = galley.rows.first().unwrap().visuals.mesh.vertices.iter().enumerate().find(|(_, v)| v.uv.y > 1.0).unwrap();
|
||||
glyph_vertex = index;
|
||||
pixel_uv = vertex.uv;
|
||||
face_text(ui.painter(), face, Tokens::light().cube_text, Tokens::get().font_heading);
|
||||
early_size = ctx.fonts(|f| f.font_image_size());
|
||||
// Other widgets can allocate new glyphs after the cube has been drawn.
|
||||
let text: String = (32_u8..127).map(char::from).collect();
|
||||
let _ = ui.painter().layout_no_wrap(text, FontId::proportional(48.0), Color32::WHITE);
|
||||
});
|
||||
let size = ctx.fonts(|f| f.font_image_size());
|
||||
assert!(size[1] > early_size[1], "the reproduction must grow the font atlas");
|
||||
let vertex = output.shapes.iter().find_map(|s| if let Shape::Mesh(m) = &s.shape { m.vertices.get(glyph_vertex) } else { None }).unwrap();
|
||||
assert!(output.shapes.iter().all(|s| !matches!(&s.shape, Shape::Mesh(m) if m.texture_id == LABEL_PIXELS)));
|
||||
assert!((vertex.uv.x * size[0] as f32 - pixel_uv.x).abs() < 1e-3);
|
||||
assert!((vertex.uv.y * size[1] as f32 - pixel_uv.y).abs() < 1e-3);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rotating_cube_facets_stay_opaque_and_inside_the_projected_geometry() {
|
||||
let ctx = crate::fonts::test_context();
|
||||
for up in [UpAxis::Z, UpAxis::Y] {
|
||||
for view in [StandardView::Top, StandardView::Bottom, StandardView::Front, StandardView::Back, StandardView::Left, StandardView::Right] {
|
||||
let from = Camera { up, ..Default::default() };
|
||||
let mut to = from;
|
||||
to.set_view(view);
|
||||
for step in 0..=60 {
|
||||
let cam = Camera::interpolate(&from, &to, f64::from(step) / 60.0);
|
||||
let faces = facets(&cam, pos2(100.0, 100.0), HALF);
|
||||
let bounds = Rect::from_points(&faces.iter().flat_map(|f| f.points.iter().copied()).collect::<Vec<_>>());
|
||||
let output = paint_frame(&ctx, |ui| {
|
||||
paint_cube(ui.painter(), &faces, Some(0), Tokens::light(), false, 1.0);
|
||||
});
|
||||
let fills: Vec<_> = output.shapes.iter().filter_map(|s| if let Shape::Mesh(m) = &s.shape { Some(m) } else { None }).collect();
|
||||
assert_eq!(fills.len(), 1);
|
||||
let mesh = fills[0];
|
||||
assert!(mesh.is_valid());
|
||||
assert!(mesh.vertices.iter().all(|v| v.color.a() == 255 && v.pos.is_finite() && bounds.contains(v.pos)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn control_navigation_keeps_its_transition_in_a_single_body_design() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube"}));
|
||||
h.app.run("solid.box", json!({"length":20,"width":20,"height":20})).unwrap();
|
||||
h.frames(4);
|
||||
let cam = h.app.cam;
|
||||
let result = h.call("engine.execute", json!({"command":"view.navigate","params":{"camera":cam,"direction":[0,0,1]}}));
|
||||
assert_eq!(result["ok"], true);
|
||||
assert!(h.app.cam.back().dist(Vec3::Z) < 1e-6, "automatic model fitting must not cancel the navigation command");
|
||||
assert_eq!(h.app.cam.target, cam.target);
|
||||
assert_eq!(h.app.cam.distance, cam.distance);
|
||||
}
|
||||
|
||||
/// #10091: with Preferences › Navigation "Fit the model after a navigator view change" on, a
|
||||
/// cube face, corner or arrow frames the whole model from the new direction, as Home does;
|
||||
/// off (the default) the view turns in place, keeping its target and zoom.
|
||||
#[test]
|
||||
fn cube_views_frame_the_model_when_the_navigation_preference_asks() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube", "look_at_anim":false}));
|
||||
assert!(!h.app.preferences.navigator_fit, "off by default");
|
||||
h.app.run("solid.box", json!({"corner":[100,0,0],"length":20,"width":20,"height":20})).unwrap();
|
||||
h.settle();
|
||||
let undo = h.app.session.undo.len();
|
||||
let away = |h: &mut crate::scenario::Harness| {
|
||||
h.call("ui.view", json!({"view":"iso"}));
|
||||
h.app.cam.pan(600.0, 400.0, 500.0);
|
||||
h.app.cam.distance *= 4.0;
|
||||
h.frames(2);
|
||||
h.app.cam
|
||||
};
|
||||
let from = away(&mut h);
|
||||
let p = crate::scenario::handle_at("navigation_cube:front").unwrap();
|
||||
h.call("ui.click", json!({"x":p.x,"y":p.y}));
|
||||
h.frames(2);
|
||||
assert!(h.app.cam.back().dist(-Vec3::Y) < 1e-6);
|
||||
assert_eq!(h.app.cam.target, from.target, "off: the target stays");
|
||||
assert_eq!(h.app.cam.distance, from.distance, "off: the zoom stays");
|
||||
h.call("ui.prefs", json!({"navigator_fit":true}));
|
||||
for handle in ["navigation_cube:front", "navigation_cube:top_front_right", "navigation_cube:control:right"] {
|
||||
let from = away(&mut h);
|
||||
let p = crate::scenario::handle_at(handle).unwrap();
|
||||
h.call("ui.click", json!({"x":p.x,"y":p.y}));
|
||||
h.frames(2);
|
||||
if handle == "navigation_cube:front" {
|
||||
assert!(h.app.cam.back().dist(-Vec3::Y) < 1e-6);
|
||||
}
|
||||
assert!(h.app.cam.target.dist(Vec3::new(110.0, 10.0, 10.0)) < 1e-6, "{handle}: looks at the middle of the model, {:?}", h.app.cam.target);
|
||||
assert!(h.app.cam.distance < from.distance / 2.0, "{handle}: {} vs {}", h.app.cam.distance, from.distance);
|
||||
}
|
||||
// Home, then a face, a corner or an arrow: the zoom and the centre stay; only the
|
||||
// direction changes.
|
||||
let click = |h: &mut crate::scenario::Harness, handle: &str| {
|
||||
let p = crate::scenario::handle_at(handle).unwrap_or_else(|| panic!("{handle} is not on the cube"));
|
||||
h.call("ui.click", json!({"x":p.x,"y":p.y}));
|
||||
h.frames(2);
|
||||
};
|
||||
click(&mut h, "navigation_cube:control:home");
|
||||
let home = h.app.cam;
|
||||
for handle in ["navigation_cube:front", "navigation_cube:top", "navigation_cube:top_front_right", "navigation_cube:control:right"] {
|
||||
click(&mut h, "navigation_cube:control:home");
|
||||
click(&mut h, handle);
|
||||
assert!((h.app.cam.distance - home.distance).abs() < 1e-6, "{handle}: {} vs Home's {}", h.app.cam.distance, home.distance);
|
||||
assert!(h.app.cam.target.dist(home.target) < 1e-6, "{handle}: {:?} vs Home's {:?}", h.app.cam.target, home.target);
|
||||
}
|
||||
assert_eq!(h.app.session.undo.len(), undo, "a view change edits nothing");
|
||||
}
|
||||
|
||||
/// #10254: with Preferences › Navigation "Invert the view cube rotation arrows" on, the
|
||||
/// arrow on the left orbits the camera the way it points (right), and the other arrows swap
|
||||
/// the same way; the curved roll arrows keep their action.
|
||||
#[test]
|
||||
fn inverted_arrows_orbit_the_way_they_point() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube", "look_at_anim":false}));
|
||||
assert!(!h.app.preferences.invert_navigator_arrows, "off by default");
|
||||
let turn = |h: &mut crate::scenario::Harness, action: &str| -> Camera {
|
||||
h.call("ui.view", json!({"view":"front"}));
|
||||
h.frames(2);
|
||||
serde_json::from_value(h.app.session.execute("view.navigate", &json!({"camera": h.app.cam, "action": action})).unwrap()["camera"].clone())
|
||||
.unwrap()
|
||||
};
|
||||
let click = |h: &mut crate::scenario::Harness, handle: &str| {
|
||||
h.call("ui.view", json!({"view":"front"}));
|
||||
h.frames(2);
|
||||
let p = crate::scenario::handle_at(&format!("navigation_cube:control:{handle}")).unwrap();
|
||||
h.call("ui.click", json!({"x":p.x,"y":p.y}));
|
||||
h.frames(2);
|
||||
h.app.cam
|
||||
};
|
||||
let on_the_left = |handle: &str| {
|
||||
let outer = crate::scenario::rect_of("axis_view:outer").unwrap();
|
||||
crate::scenario::handle_at(&format!("navigation_cube:control:{handle}")).unwrap().x < outer.center().x
|
||||
};
|
||||
// Off (the default): the arrow on the left runs the "left" orbit, as before.
|
||||
assert!(on_the_left("left"), "off: the left action sits on the cube's left side");
|
||||
assert_eq!(click(&mut h, "left"), turn(&mut h, "left"));
|
||||
assert_eq!(click(&mut h, "up"), turn(&mut h, "up"));
|
||||
h.call("ui.prefs", json!({"invert_navigator_arrows":true}));
|
||||
h.frames(2);
|
||||
// On: the arrow on the left now runs the "right" orbit, and the sides trade places.
|
||||
assert!(on_the_left("right"), "on: the arrow on the left runs the right orbit");
|
||||
assert_eq!(click(&mut h, "right"), turn(&mut h, "right"));
|
||||
assert_eq!(click(&mut h, "left"), turn(&mut h, "left"));
|
||||
assert_eq!(click(&mut h, "down"), turn(&mut h, "down"));
|
||||
// The curved roll arrows are not inverted.
|
||||
h.call("ui.view", json!({"view":"front"}));
|
||||
h.frames(2);
|
||||
let camera = h.app.cam;
|
||||
let p = crate::scenario::handle_at("navigation_cube:control:clockwise").unwrap();
|
||||
h.call("ui.click", json!({"x":p.x,"y":p.y}));
|
||||
assert!((h.app.cam.roll - camera.roll - std::f64::consts::FRAC_PI_2).abs() < 1e-6, "clockwise still rolls clockwise");
|
||||
}
|
||||
|
||||
/// #10483: with Preferences › Navigation "Invert the curved roll arrows" on, the two curved
|
||||
/// arrows trade rolls: the clockwise arrow rolls counterclockwise, and the counterclockwise
|
||||
/// arrow rolls clockwise.
|
||||
#[test]
|
||||
fn inverted_curved_arrows_roll_the_other_way() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube", "look_at_anim":false}));
|
||||
assert!(!h.app.preferences.invert_curved_roll_arrows, "off by default");
|
||||
let roll_at = |h: &mut crate::scenario::Harness, p: egui::Pos2| -> f64 {
|
||||
h.call("ui.view", json!({"view":"front"}));
|
||||
h.frames(2);
|
||||
let camera = h.app.cam;
|
||||
h.call("ui.click", json!({"x":p.x,"y":p.y}));
|
||||
h.frames(2);
|
||||
h.app.cam.roll - camera.roll
|
||||
};
|
||||
let quarter = std::f64::consts::FRAC_PI_2;
|
||||
let turn = std::f64::consts::TAU;
|
||||
// The engine keeps roll in [0, τ), so compare quarter-turns modulo a full turn.
|
||||
let is_a_quarter_turn = |delta: f64, way: f64| (delta - way).rem_euclid(turn) < 1e-6 || (way - delta).rem_euclid(turn) < 1e-6;
|
||||
let top = crate::scenario::handle_at("navigation_cube:control:counterclockwise").unwrap();
|
||||
let right = crate::scenario::handle_at("navigation_cube:control:clockwise").unwrap();
|
||||
// Off (the default): each arrow rolls the view the way it curls.
|
||||
assert!(is_a_quarter_turn(roll_at(&mut h, right), quarter), "off: the clockwise arrow rolls clockwise");
|
||||
assert!(is_a_quarter_turn(roll_at(&mut h, top), -quarter), "off: the counterclockwise arrow rolls counterclockwise");
|
||||
h.call("ui.prefs", json!({"invert_curved_roll_arrows":true}));
|
||||
h.frames(2);
|
||||
// On: the same two arrows trade rolls.
|
||||
assert!(is_a_quarter_turn(roll_at(&mut h, right), -quarter), "on: the clockwise arrow rolls counterclockwise");
|
||||
assert!(is_a_quarter_turn(roll_at(&mut h, top), quarter), "on: the counterclockwise arrow rolls clockwise");
|
||||
// The handles name the roll actually performed, and trade places with it.
|
||||
assert_eq!(crate::scenario::handle_at("navigation_cube:control:clockwise").unwrap(), top);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cube_navigation_eases_through_intermediate_views_and_can_be_interrupted() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube"}));
|
||||
assert!(h.app.preferences.look_at_anim);
|
||||
for (action, direction) in [(None, Some(Vec3::Z)), (Some("right"), None), (Some("clockwise"), None), (Some("home"), None)] {
|
||||
let from = h.app.cam;
|
||||
navigate(&mut h.app, action, direction);
|
||||
let anim = h.app.cam_anim.expect("cube navigation must animate");
|
||||
assert_eq!(h.app.cam, from, "starting a transition must not jump the camera");
|
||||
let mut previous = from;
|
||||
for frame in 1..=60 {
|
||||
let now = anim.start + anim.duration * f64::from(frame) / 60.0 + if frame == 60 { 1e-9 } else { 0.0 };
|
||||
let (cam, done) = anim.sample(now);
|
||||
let angle = |a: Vec3, b: Vec3| a.dot(b).clamp(-1.0, 1.0).acos().to_degrees();
|
||||
assert!(angle(previous.back(), cam.back()).max(angle(previous.basis().0, cam.basis().0)) < 10.0);
|
||||
assert_eq!(done, frame == 60);
|
||||
if frame == 30 {
|
||||
assert_ne!(cam.basis(), from.basis());
|
||||
assert_ne!(cam.basis(), anim.to.basis());
|
||||
}
|
||||
previous = cam;
|
||||
}
|
||||
h.app.cam = anim.sample(anim.start + anim.duration / 2.0).0;
|
||||
let intermediate = h.app.cam;
|
||||
let first_to = anim.to;
|
||||
navigate(&mut h.app, Some("left"), None);
|
||||
let next = h.app.cam_anim.expect("retargeted glide");
|
||||
assert_eq!(next.from, intermediate, "the glide continues from the camera as it is");
|
||||
assert_ne!(next.to.basis(), first_to.basis(), "the destination is a further turn from the in-flight target");
|
||||
h.app.cam = next.to;
|
||||
h.app.cancel_view_animation();
|
||||
}
|
||||
}
|
||||
|
||||
/// #8912: two quick Right clicks retarget from the first glide's destination, not from mid-flight.
|
||||
#[test]
|
||||
fn rapid_cube_turns_compose_from_the_in_flight_target() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube"}));
|
||||
assert!(h.app.preferences.look_at_anim);
|
||||
navigate(&mut h.app, Some("right"), None);
|
||||
let first = h.app.cam_anim.expect("first turn");
|
||||
let first_to = first.to;
|
||||
let mid = first.sample(first.start + first.duration / 2.0).0;
|
||||
h.app.cam = mid;
|
||||
navigate(&mut h.app, Some("right"), None);
|
||||
let second = h.app.cam_anim.expect("retargeted turn");
|
||||
let composed: Camera = serde_json::from_value(
|
||||
h.app.session.execute("view.navigate", &json!({"camera": first_to, "action": "right"})).unwrap()["camera"].clone(),
|
||||
)
|
||||
.unwrap();
|
||||
let from_mid: Camera =
|
||||
serde_json::from_value(h.app.session.execute("view.navigate", &json!({"camera": mid, "action": "right"})).unwrap()["camera"].clone())
|
||||
.unwrap();
|
||||
assert!(second.to.back().dist(composed.back()) < 1e-6, "second click turns from the in-flight target");
|
||||
assert!(second.to.back().dist(from_mid.back()) > 1e-3, "not from the mid-glide camera");
|
||||
assert!(second.from.back().dist(mid.back()) < 1e-6, "ease still starts where the camera is");
|
||||
}
|
||||
|
||||
/// A view-cube click glides, but a mouse orbit started at once cancels the glide: the camera
|
||||
/// then follows the pointer one to one, and nothing keeps easing after the pointer stops.
|
||||
#[test]
|
||||
fn a_mouse_orbit_right_after_a_cube_click_follows_the_pointer_one_to_one() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube"}));
|
||||
h.app.run("solid.box", json!({"length":20,"width":20,"height":20})).unwrap();
|
||||
h.frames(4);
|
||||
let p = crate::scenario::handle_at("navigation_cube:top").unwrap();
|
||||
let button = |pressed| egui::Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed, modifiers: egui::Modifiers::NONE };
|
||||
h.app.synthetic.extend([egui::Event::PointerMoved(p), button(true), button(false)]);
|
||||
h.frames(3);
|
||||
assert!(h.app.cam_anim.is_some(), "the click glides");
|
||||
let mut expected = h.app.cam;
|
||||
h.call("ui.drag", json!({"x0":800,"y0":500,"x1":850,"y1":520,"button":"middle","shift":true,"steps":20}));
|
||||
assert!(h.app.cam_anim.is_none(), "the orbit cancels the glide");
|
||||
expected.orbit(50.0, 20.0);
|
||||
// The glide may step once, in the frame the orbit starts and cancels it.
|
||||
assert!((h.app.cam.yaw - expected.yaw).abs() < 0.03 && (h.app.cam.pitch - expected.pitch).abs() < 0.03, "{:?} vs {:?}", h.app.cam, expected);
|
||||
let done = h.app.cam;
|
||||
h.frames(30);
|
||||
assert_eq!(h.app.cam, done, "nothing keeps easing after the pointer stops");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cube_faces_corners_roll_and_home_drive_the_shared_command() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube"}));
|
||||
h.app.preferences.look_at_anim = false;
|
||||
let before = h.app.session.doc.to_json();
|
||||
for (name, direction) in [("top", Vec3::Z), ("front", -Vec3::Y), ("right", Vec3::X), ("top_front_right", Vec3::Z - Vec3::Y + Vec3::X)] {
|
||||
h.call("ui.view", json!({"view":"iso"}));
|
||||
let p = crate::scenario::handle_at(&format!("navigation_cube:{name}")).unwrap();
|
||||
let scale = crate::scenario::rect_of("axis_view:outer").unwrap().width() / DESIGN_SIZE;
|
||||
let offsets = if name == "top_front_right" {
|
||||
vec![vec2(0.0, 0.0), vec2(8.0, 0.0), vec2(-8.0, 0.0), vec2(0.0, 8.0), vec2(0.0, -8.0)]
|
||||
} else {
|
||||
vec![vec2(0.0, 0.0)]
|
||||
};
|
||||
for offset in offsets {
|
||||
let offset = offset * scale;
|
||||
h.call("ui.view", json!({"view":"iso"}));
|
||||
h.call("ui.click", json!({"x":p.x+offset.x,"y":p.y+offset.y}));
|
||||
assert!(h.app.cam.back().dist(direction.normalized().unwrap()) < 2e-6, "{name} {offset:?}");
|
||||
assert!(h.app.session.selection.is_empty());
|
||||
}
|
||||
}
|
||||
let camera = h.app.cam;
|
||||
let p = crate::scenario::handle_at("navigation_cube:control:clockwise").unwrap();
|
||||
h.call("ui.click", json!({"x":p.x,"y":p.y}));
|
||||
assert!((h.app.cam.roll - camera.roll - std::f64::consts::FRAC_PI_2).abs() < 1e-6);
|
||||
assert!(h.app.cam.back().dist(camera.back()) < 1e-6);
|
||||
let p = crate::scenario::handle_at("navigation_cube:control:home").unwrap();
|
||||
h.call("ui.click", json!({"x":p.x,"y":p.y}));
|
||||
assert!(h.app.cam.back().dist(Camera::default().back()) < 1e-6);
|
||||
assert_eq!(h.app.session.doc.to_json(), before);
|
||||
assert!(h.app.session.undo.is_empty());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
//! The orbit and roll arrows, Home button and view command shared by the custom body navigator.
|
||||
use super::*;
|
||||
use crate::icons::navigation::{arrow, curved_arrow};
|
||||
|
||||
pub(super) const SIZE: f32 = 112.0;
|
||||
// Paint and picking use the same original coordinate space, scaled as a group.
|
||||
pub(super) const DESIGN_SIZE: f32 = 164.0;
|
||||
pub(super) fn navigate(app: &mut SolveApp, action: Option<&str>, dir: Option<Vec3>) {
|
||||
// Same as arrow-key steps (#8912): turn from where a glide in flight is going, so rapid
|
||||
// clicks add full turns instead of restarting from a mid-animation camera.
|
||||
let from = app.cam_anim.map_or(app.cam, |a| a.to);
|
||||
let mut params = json!({"camera": from});
|
||||
if let Some(action) = action {
|
||||
params["action"] = json!(action);
|
||||
}
|
||||
if let Some(d) = dir {
|
||||
params["direction"] = json!([d.x, d.y, d.z]);
|
||||
}
|
||||
// Preferences › Navigation: a view chosen on the navigator also frames the whole model (#10091).
|
||||
if app.preferences.navigator_fit {
|
||||
params["fit"] = json!(true);
|
||||
}
|
||||
let _ = app.run("view.navigate", params);
|
||||
}
|
||||
|
||||
fn control(app: &mut SolveApp, ui: &mut egui::Ui, bounds: Rect, action: &str, tooltip: &str) -> bool {
|
||||
crate::scenario::publish_handle(&format!("navigator:control:{action}"), bounds.center());
|
||||
let response = ui.interact(bounds, ui.scope_id().with(("navigator", action)), Sense::click()).backing_on_hover_text(tooltip);
|
||||
let hover = response.hovered();
|
||||
if response.clicked() {
|
||||
navigate(app, Some(action), None);
|
||||
}
|
||||
// The control takes the right-click from the viewport under it: open the gizmo's menu.
|
||||
if response.secondary_clicked()
|
||||
&& app.dialog.is_none()
|
||||
&& let Some(at) = response.interact_pointer_pos()
|
||||
{
|
||||
crate::context_menu::open_for(app, at, crate::context_menu::Target::ViewGizmo);
|
||||
}
|
||||
hover
|
||||
}
|
||||
|
||||
/// Preferences › Navigation: "Invert the rotation arrows" (#10254). With it on, an
|
||||
/// arrow orbits the camera the way the arrow points (camera-centric)
|
||||
/// instead of rotating the view toward the side the arrow sits on, so left and right, and up and
|
||||
/// down, trade places. The tooltip names the action actually performed. The curved roll arrows
|
||||
/// are not inverted: they name the rotation they perform, not a direction.
|
||||
fn inverted_arrow(action: &str) -> Option<&'static str> {
|
||||
match action {
|
||||
"left" => Some("right"),
|
||||
"right" => Some("left"),
|
||||
"up" => Some("down"),
|
||||
"down" => Some("up"),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Preferences › Navigation: "Invert the curved roll arrows" (#10483). With it on, the two
|
||||
/// curved arrows at the navigator's corner roll the view the other way within the screen plane: the
|
||||
/// clockwise arrow rolls counterclockwise and the counterclockwise arrow rolls clockwise. The
|
||||
/// arrow keeps its curl; the tooltip names the roll actually performed.
|
||||
fn inverted_roll(action: &str) -> Option<&'static str> {
|
||||
match action {
|
||||
"clockwise" => Some("counterclockwise"),
|
||||
"counterclockwise" => Some("clockwise"),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// The Home button at the top left of a gizmo centred at `c`, painted while it is `active`.
|
||||
pub(super) fn home(app: &mut SolveApp, ui: &mut egui::Ui, painter: &egui::Painter, c: Pos2, scale: f32, active: bool, t: Tokens) {
|
||||
let home = Rect::from_center_size(c + vec2(-65.0, -65.0) * scale, vec2(26.0, 26.0) * scale);
|
||||
crate::scenario::publish_target("axis_view:home", home);
|
||||
let home_hover = control(app, ui, home, "home", "Home: isometric view and fit model");
|
||||
if active {
|
||||
icons::paint_icon(painter, home.shrink(4.0 * scale), "home", f32::from((if home_hover { t.accent } else { t.navigator_face }).a()) / 255.0);
|
||||
}
|
||||
}
|
||||
|
||||
/// The four orbit arrows and the two roll arrows around a gizmo centred at `c`: painted while the gizmo is `active`.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(super) fn arrows(app: &mut SolveApp, ui: &mut egui::Ui, painter: &egui::Painter, c: Pos2, scale: f32, active: bool, t: Tokens) {
|
||||
let (distance, button_size) = (74.0, 16.0);
|
||||
for (action, offset, direction, tooltip) in [
|
||||
("left", vec2(-distance, 0.0), vec2(1.0, 0.0), "Orbit left 90°"),
|
||||
("right", vec2(distance, 0.0), vec2(-1.0, 0.0), "Orbit right 90°"),
|
||||
("up", vec2(0.0, -distance), vec2(0.0, 1.0), "Orbit up 90°"),
|
||||
("down", vec2(0.0, distance), vec2(0.0, -1.0), "Orbit down 90°"),
|
||||
] {
|
||||
let (action, tooltip) = match app.preferences.invert_navigator_arrows.then(|| inverted_arrow(action)).flatten() {
|
||||
Some(swapped) => (
|
||||
swapped,
|
||||
match swapped {
|
||||
"right" => "Orbit right 90°",
|
||||
"left" => "Orbit left 90°",
|
||||
"down" => "Orbit down 90°",
|
||||
_ => "Orbit up 90°",
|
||||
},
|
||||
),
|
||||
None => (action, tooltip),
|
||||
};
|
||||
let at = c + offset * scale;
|
||||
let hovered = control(app, ui, Rect::from_center_size(at, vec2(button_size, button_size) * scale), action, tooltip);
|
||||
if active {
|
||||
arrow(painter, at, direction * scale, hovered, t);
|
||||
}
|
||||
}
|
||||
for (action, offset, size, clockwise, tooltip) in [
|
||||
("counterclockwise", vec2(42.0, -72.0), vec2(40.0, 20.0), false, "Rotate view counterclockwise 90°"),
|
||||
("clockwise", vec2(72.0, -42.0), vec2(20.0, 40.0), true, "Rotate view clockwise 90°"),
|
||||
] {
|
||||
let (action, tooltip) = match app.preferences.invert_curved_roll_arrows.then(|| inverted_roll(action)).flatten() {
|
||||
Some(swapped) => (swapped, if swapped == "clockwise" { "Rotate view clockwise 90°" } else { "Rotate view counterclockwise 90°" }),
|
||||
None => (action, tooltip),
|
||||
};
|
||||
let hovered = control(app, ui, Rect::from_center_size(c + offset * scale, size * scale), action, tooltip);
|
||||
if active {
|
||||
curved_arrow(painter, c + vec2(42.0, -42.0) * scale, clockwise, hovered, t, scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
+35
-28
@@ -479,26 +479,23 @@ pub const MSAA: [u32; 4] = [1, 2, 4, 8];
|
||||
/// Supersampling factors (#1288): off, 1.5× and 2× the viewport's pixels each way.
|
||||
pub const SUPERSAMPLING: [f32; 3] = [1.0, 1.5, 2.0];
|
||||
|
||||
/// Original view navigators, independent of the mouse navigation preset.
|
||||
/// View navigators, independent of the mouse navigation preset.
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum NavigatorStyle {
|
||||
/// Also what a navigator this version doesn't know reads as (`lenient`).
|
||||
#[default]
|
||||
Axes,
|
||||
Cube,
|
||||
/// A body of the user's choice, drawn the cube's size ([`crate::view_gizmo`]); the cube
|
||||
/// until one is chosen.
|
||||
/// A body of the user's choice ([`crate::view_gizmo`]); the signed axes until one is chosen.
|
||||
Custom,
|
||||
}
|
||||
|
||||
impl NavigatorStyle {
|
||||
pub const ALL: [Self; 3] = [Self::Axes, Self::Cube, Self::Custom];
|
||||
pub const ALL: [Self; 2] = [Self::Axes, Self::Custom];
|
||||
|
||||
pub fn label(self) -> &'static str {
|
||||
match self {
|
||||
Self::Axes => "Signed axes",
|
||||
Self::Cube => "Cube",
|
||||
Self::Custom => "Custom",
|
||||
}
|
||||
}
|
||||
@@ -508,7 +505,7 @@ impl NavigatorStyle {
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum NavigatorTexture {
|
||||
/// The navigation cube's colours. Also what a value this version doesn't know reads as
|
||||
/// The navigator's colours. Also what a value this version doesn't know reads as
|
||||
/// (`lenient`).
|
||||
#[default]
|
||||
Themed,
|
||||
@@ -948,13 +945,13 @@ preference_settings! {
|
||||
/// An orbit drag that reaches the edge of the view moves the cursor to the opposite edge and
|
||||
/// keeps turning; false stops the drag at the edge of the screen, as before.
|
||||
orbit_cursor_wrap: bool = true, PAGE_NAVIGATION => check_tr("nav.orbit_cursor_wrap.label");
|
||||
/// View orientation widget: original signed axes (default) or compact cube.
|
||||
/// View orientation widget: original signed axes (default) or a custom body.
|
||||
navigator_style: NavigatorStyle = NavigatorStyle::default(), PAGE_NAVIGATION;
|
||||
/// The custom view gizmo's colours: the cube's (themed) or the body's own (modeled).
|
||||
/// The custom view gizmo's colours: the theme's (themed) or the body's own (modeled).
|
||||
navigator_texture: NavigatorTexture = NavigatorTexture::default(), PAGE_NAVIGATION;
|
||||
/// The custom view gizmo has the cube's orbit and roll arrows around it.
|
||||
/// The custom view gizmo has the orbit and roll arrows around it.
|
||||
navigator_arrows: bool = true, PAGE_NAVIGATION;
|
||||
/// The custom view gizmo has the cube's Home button beside it.
|
||||
/// The custom view gizmo has the Home button beside it.
|
||||
navigator_home: bool = true, PAGE_NAVIGATION;
|
||||
/// Show the radial ring and enable hold/flick gestures for viewport context menus.
|
||||
radial_context_menu: bool = false, PAGE_NAVIGATION => check("Radial context menu");
|
||||
@@ -1401,15 +1398,15 @@ preference_settings! {
|
||||
network_hosts: Vec<String> = Vec::new(), PAGE_GENERAL;
|
||||
/// What a middle-button double-click in the view does: `home`, `fit` or `off`.
|
||||
middle_double_click: String = "home".into(), PAGE_NAVIGATION;
|
||||
/// A view chosen on the navigator (a cube face, corner or arrow, an axis tip) also frames the
|
||||
/// A view chosen on the navigator (a face, corner or arrow, an axis tip) also frames the
|
||||
/// whole model, as Home does (#10091). Off by default: the view turns in place, keeping its
|
||||
/// target and zoom.
|
||||
navigator_fit: bool = false, PAGE_NAVIGATION;
|
||||
/// The view cube's directional arrows orbit the camera the way the arrow points, as in
|
||||
/// The navigator's directional arrows orbit the camera the way the arrow points, as in
|
||||
/// Fusion and Inventor (`invert_navigator_arrows`, #10254). Off by default: an arrow rotates
|
||||
/// the cube toward the side it sits on, so the arrow on the left swings the camera left.
|
||||
/// the view toward the side it sits on, so the arrow on the left swings the camera left.
|
||||
invert_navigator_arrows: bool = false, PAGE_NAVIGATION;
|
||||
/// The view cube's two curved arrows roll the view the other way: the clockwise arrow rolls
|
||||
/// The navigator's two curved arrows roll the view the other way: the clockwise arrow rolls
|
||||
/// counterclockwise and the counterclockwise arrow rolls clockwise (`invert_curved_roll_arrows`,
|
||||
/// #10483). Off by default: each arrow rolls the view the way it curls.
|
||||
invert_curved_roll_arrows: bool = false, PAGE_NAVIGATION;
|
||||
@@ -8448,9 +8445,9 @@ mod tests {
|
||||
assert!(invalid["error"].as_str().is_some_and(|e| e.contains("radii.control_radius")));
|
||||
let out = h.call(
|
||||
"ui.prefs",
|
||||
json!({"theme_import": "{\"format\":\"solidcraft-theme/1\",\"name\":\"x\",\"base\":\"dark\",\"colors\":{\"nope\":\"#000000\"}}"}),
|
||||
json!({"theme_import": "{\"format\":\"solidcraft-theme/1\",\"name\":\"x\",\"base\":\"dark\",\"colors\":{\"text\":\"red\"}}"}),
|
||||
);
|
||||
assert!(out["error"].as_str().is_some_and(|e| e.contains("nope")), "{out}");
|
||||
assert!(out["error"].as_str().is_some_and(|e| e.contains("text")), "{out}");
|
||||
assert_eq!(h.app.preferences.theme, "paper", "a refused file changes nothing");
|
||||
assert!(h.call("ui.prefs", json!({"theme": "no-such-theme"}))["error"].is_string());
|
||||
|
||||
@@ -9604,23 +9601,36 @@ mod tests {
|
||||
assert_eq!(parse_length_mm("1e400", 1.0), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn an_unknown_navigator_style_loads_as_axes_and_is_refused_by_commands() {
|
||||
let saved = json!({"navigator_style":"zigzag", "length_decimals": 4});
|
||||
let p = super::lenient(&saved);
|
||||
assert_eq!(p.navigator_style, NavigatorStyle::Axes);
|
||||
assert_eq!(p.length_decimals, 4, "the rest of the saved preferences are kept");
|
||||
assert!(serde_json::from_value::<NavigatorStyle>(json!("zigzag")).is_err());
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
let before = h.app.preferences.clone();
|
||||
assert!(control(&mut h.app, &json!({"navigator_style":"zigzag"})).is_err());
|
||||
assert_eq!(h.app.preferences, before);
|
||||
assert!(h.app.run("view.navigator", json!({"style":"zigzag"})).is_err());
|
||||
assert_eq!(h.app.preferences.navigator_style, NavigatorStyle::Axes);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn navigator_picker_preserves_axes_and_follows_preferences_transactions() {
|
||||
let old: Prefs = serde_json::from_value(json!({"nav":"solidworks"})).unwrap();
|
||||
assert_eq!(old.navigator_style, NavigatorStyle::Axes);
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
assert!(crate::scenario::handle_at("axis_view:z").is_some());
|
||||
assert!(crate::scenario::handle_at("navigation_cube:front").is_none());
|
||||
let camera = h.app.cam;
|
||||
let design = h.app.session.doc.to_json();
|
||||
let nav = h.app.preferences.nav.clone();
|
||||
h.call("ui.prefs", json!({"open":"Navigation"}));
|
||||
super::reveal_preference(&mut h, "prefs:navigator");
|
||||
let cube = crate::scenario::rect_of("prefs:navigator:Cube").unwrap().center();
|
||||
let custom = crate::scenario::rect_of("prefs:navigator:Custom").unwrap().center();
|
||||
assert!(crate::scenario::rect_of("prefs:navigator:Signed axes").is_some());
|
||||
h.call("ui.click", json!({"x":cube.x,"y":cube.y}));
|
||||
assert_eq!(h.app.preferences.navigator_style, NavigatorStyle::Cube);
|
||||
assert!(crate::scenario::handle_at("navigation_cube:front").is_some());
|
||||
h.call("ui.click", json!({"x":custom.x,"y":custom.y}));
|
||||
assert_eq!(h.app.preferences.navigator_style, NavigatorStyle::Custom);
|
||||
assert_eq!(h.app.preferences.nav, nav);
|
||||
assert_eq!(h.app.cam, camera);
|
||||
assert_eq!(h.app.session.doc.to_json(), design);
|
||||
@@ -9632,13 +9642,12 @@ mod tests {
|
||||
assert_eq!(h.app.preferences, before, "invalid settings must fail atomically");
|
||||
h.call("ui.prefs", json!({"button":"cancel"}));
|
||||
assert_eq!(h.app.preferences.navigator_style, NavigatorStyle::Axes);
|
||||
assert!(crate::scenario::handle_at("navigation_cube:front").is_none());
|
||||
h.call("ui.prefs", json!({"open":"Navigation","navigator_style":"cube"}));
|
||||
h.call("ui.prefs", json!({"open":"Navigation","navigator_style":"custom"}));
|
||||
h.call("ui.prefs", json!({"button":"apply"}));
|
||||
h.call("ui.prefs", json!({"button":"defaults"}));
|
||||
assert_eq!(h.app.preferences.navigator_style, NavigatorStyle::Axes);
|
||||
h.call("ui.prefs", json!({"button":"cancel"}));
|
||||
assert_eq!(h.app.preferences.navigator_style, NavigatorStyle::Cube);
|
||||
assert_eq!(h.app.preferences.navigator_style, NavigatorStyle::Custom);
|
||||
h.call("ui.prefs", json!({"navigator_style":"axes", "look_at_anim":false}));
|
||||
h.call("ui.view", json!({"view":"front"}));
|
||||
let axis = crate::scenario::handle_at("axis_view:-y").unwrap();
|
||||
@@ -12400,7 +12409,6 @@ mod settings_search_tests {
|
||||
("Origin", crate::prefs::PAGE_NAVIGATION, "prefs:orbit_around:Origin"),
|
||||
("View navigator", crate::prefs::PAGE_NAVIGATION, "prefs:navigator:Signed axes"),
|
||||
("Axes", crate::prefs::PAGE_NAVIGATION, "prefs:navigator:Signed axes"),
|
||||
("Cube", crate::prefs::PAGE_NAVIGATION, "prefs:navigator:Cube"),
|
||||
("Turntable", crate::prefs::PAGE_NAVIGATION, "prefs:turntable"),
|
||||
("Wheel zoom speed", crate::prefs::PAGE_NAVIGATION, "prefs:wheel_zoom_speed"),
|
||||
("Zoom with two-finger scroll while holding", crate::prefs::PAGE_NAVIGATION, "prefs:trackpad_zoom_modifier"),
|
||||
@@ -12412,8 +12420,7 @@ mod settings_search_tests {
|
||||
h.app.prefs_window.shell.filter = query.into();
|
||||
h.frames(5);
|
||||
let (_, _, hits) = nav(&h.ctx);
|
||||
let matching: Vec<_> =
|
||||
hits.iter().enumerate().filter(|(_, hit)| hit.page == page && (query != "Cube" || hit.label == "Cube")).collect();
|
||||
let matching: Vec<_> = hits.iter().enumerate().filter(|(_, hit)| hit.page == page).collect();
|
||||
assert_eq!(matching.len(), 1, "{theme}: {query} has one indexed setting");
|
||||
set_cursor(&h.ctx, matching[0].0);
|
||||
h.frames(2);
|
||||
|
||||
@@ -286,7 +286,6 @@ fn view(app: &mut SolveApp, ui: &mut egui::Ui, t: &Tokens) {
|
||||
ui_kit::settings_section(ui, "navigation_view", app.tr("ui.tab_view"), |ui| {
|
||||
let options = [
|
||||
ui_kit::PictureChoice { key: "Signed axes", label: app.tr("prefs.navigation.axes_signed"), figure: paint_signed_axes },
|
||||
ui_kit::PictureChoice { key: "Cube", label: app.tr("prefs.navigation.cube_compact"), figure: ui_kit::paint_navigation_cube },
|
||||
ui_kit::PictureChoice { key: "Custom", label: solidcraft_ui_text::tr_label("Custom"), figure: ui_kit::paint_navigation_custom },
|
||||
];
|
||||
if let Some(index) = ui_kit::settings_picture_choices_sized(
|
||||
@@ -300,7 +299,7 @@ fn view(app: &mut SolveApp, ui: &mut egui::Ui, t: &Tokens) {
|
||||
) {
|
||||
app.preferences.navigator_style = NavigatorStyle::ALL.get(index).copied().unwrap_or_default();
|
||||
}
|
||||
if let Some(all) = ["Signed axes", "Cube", "Custom"]
|
||||
if let Some(all) = ["Signed axes", "Custom"]
|
||||
.into_iter()
|
||||
.map(|key| crate::scenario::rect_of(&format!("prefs:navigator:{key}")))
|
||||
.collect::<Option<Vec<_>>>()
|
||||
|
||||
@@ -3128,11 +3128,11 @@ fn render_preview_navigates_like_the_modelling_viewport_in_every_preset() {
|
||||
}
|
||||
}
|
||||
|
||||
/// #1454: Fit (F6), a middle double-click, and the axis view's and navigation cube's Home and
|
||||
/// #1454: Fit (F6), a middle double-click, and the axis view's and navigator's Home and
|
||||
/// view controls all work in the Render workspace, framing the product scene.
|
||||
#[test]
|
||||
fn render_workspace_view_keys_double_middle_click_and_navigators_work() {
|
||||
for style in [crate::prefs::NavigatorStyle::Axes, crate::prefs::NavigatorStyle::Cube] {
|
||||
for style in [crate::prefs::NavigatorStyle::Axes, crate::prefs::NavigatorStyle::Custom] {
|
||||
let mut h = Harness::new();
|
||||
h.app.preferences.navigator_style = style;
|
||||
h.app.preferences.look_at_anim = false;
|
||||
@@ -3175,9 +3175,8 @@ fn render_workspace_view_keys_double_middle_click_and_navigators_work() {
|
||||
// The navigator's Home control.
|
||||
off(&mut h);
|
||||
let handle = match style {
|
||||
crate::prefs::NavigatorStyle::Axes => "axis_view:home",
|
||||
// Custom draws the cube until a body is chosen.
|
||||
crate::prefs::NavigatorStyle::Cube | crate::prefs::NavigatorStyle::Custom => "navigation_cube:control:home",
|
||||
// Custom draws the signed axes until a body is chosen.
|
||||
crate::prefs::NavigatorStyle::Axes | crate::prefs::NavigatorStyle::Custom => "axis_view:home",
|
||||
};
|
||||
h.step(&json!({"click":{"handle":handle}})).unwrap();
|
||||
h.settle();
|
||||
|
||||
@@ -1115,7 +1115,7 @@ fn a_profile_carries_the_view_navigators_body_and_one_without_leaves_it_alone()
|
||||
assert!(exported["view_gizmo"]["v"].is_string(), "the body is packed into the profile: {}", exported["view_gizmo"]);
|
||||
assert!(exported.to_string().len() < 64 * 1024, "a box costs little");
|
||||
|
||||
// Elsewhere: a design without that body, the cube, and no custom body yet.
|
||||
// Elsewhere: a design without that body, the signed axes, and no custom body yet.
|
||||
let mut other = Harness::new();
|
||||
run(&mut other, "settings.profile.save", json!({"name": "Plain"}));
|
||||
assert_eq!(run(&mut other, "settings.profile.import", json!({"profile": exported})), json!({"name": "Gizmo"}));
|
||||
|
||||
@@ -1369,7 +1369,7 @@ fn cards_block_model_hover_wheel_and_drag_but_the_gap_remains_viewport() {
|
||||
|
||||
#[test]
|
||||
fn floating_sketch_palette_and_compass_share_measured_clearance() {
|
||||
for style in crate::prefs::NavigatorStyle::ALL {
|
||||
for style in [crate::prefs::NavigatorStyle::Axes] {
|
||||
for (width, height, scale) in [(1400.0, 900.0, 1.0), (700.0, 720.0, 2.0)] {
|
||||
let mut h = Harness::new();
|
||||
h.app.preferences.navigator_style = style;
|
||||
@@ -1404,7 +1404,7 @@ fn floating_sketch_palette_and_compass_share_measured_clearance() {
|
||||
|
||||
#[test]
|
||||
fn short_floating_palette_stays_in_viewport() {
|
||||
for style in crate::prefs::NavigatorStyle::ALL {
|
||||
for style in [crate::prefs::NavigatorStyle::Axes] {
|
||||
for height in [475, 385, 300] {
|
||||
let mut h = Harness::new();
|
||||
h.app.preferences.navigator_style = style;
|
||||
|
||||
@@ -502,7 +502,7 @@ theme_keys! {
|
||||
icon, timeline, hover, sel_face, sel_edge, sel_edge_rim, hover_edge, hover_edge_halo, sel_profile,
|
||||
sel_profile_edge, hover_profile, hover_profile_edge, sel_vertex, origin_plane, origin_plane_edge, origin_plane_hover,
|
||||
origin_point, axis_x, axis_y, axis_z, construction_plane, construction_geom, body, body_edge, manipulator, joint_manipulator, joint_axis,
|
||||
preview_add, preview_new, preview_sketch, preview_cut, cube_face, cube_border, cube_text, cube_hover, viewport_top,
|
||||
preview_add, preview_new, preview_sketch, preview_cut, navigator_face, navigator_border, navigator_text, navigator_hover, viewport_top,
|
||||
viewport_bottom, grid, grid_major, body_selected, sketch, sketch_fixed, sketch_halo, sketch_locked, sketch_conflict, dimension, dimension_driven,
|
||||
sketch_point, sketch_point_free, dialog_bg, dialog_border, chip, section_cap,
|
||||
profile_fill, glyph_bg, glyph_edge, glyph_text, overlay, rubber_band, app_bar_text, app_bar_hover, timeline_item,
|
||||
@@ -592,7 +592,7 @@ pub fn from_value(v: &Value) -> Result<ThemeFile, String> {
|
||||
None => default_requirements_level(),
|
||||
Some(value) => value.as_u64().ok_or("`requires` must be a nonnegative integer")?,
|
||||
};
|
||||
let layer = parse_layer(v)?;
|
||||
let layer = parse_layer(v, true)?;
|
||||
let tabs = parse_tabs(v.get("tabs"))?;
|
||||
let options = if requires > REQUIREMENTS_LEVEL { Vec::new() } else { parse_options(v.get("options"))? };
|
||||
if requires < 2 && options.iter().any(|option| option.effect.is_some()) {
|
||||
@@ -643,7 +643,9 @@ fn parse_tabs(v: Option<&Value>) -> Result<BTreeMap<String, BTreeMap<String, Val
|
||||
Ok(parsed)
|
||||
}
|
||||
|
||||
fn parse_layer(v: &Value) -> Result<ThemeLayer, String> {
|
||||
/// A theme's colours and shapes. With `ignore_unknown` (the base table of a file), a colour this
|
||||
/// version doesn't have is dropped with a warning; an overlay's table stays strict.
|
||||
fn parse_layer(v: &Value, ignore_unknown: bool) -> Result<ThemeLayer, String> {
|
||||
let mut src = match v.get("colors") {
|
||||
None => serde_json::Map::new(),
|
||||
Some(Value::Object(o)) => o.clone(),
|
||||
@@ -655,6 +657,7 @@ fn parse_layer(v: &Value) -> Result<ThemeLayer, String> {
|
||||
src.retain(|key, _| !RETIRED_COLORS.contains(&key.as_str()));
|
||||
let mut probe = Tokens::light();
|
||||
let mut bad = Vec::new();
|
||||
let mut ignored = Vec::new();
|
||||
for (k, c) in &src {
|
||||
if LEGACY_AXES.contains(&k.as_str()) {
|
||||
if let Err(e) = colors_of(c, 3) {
|
||||
@@ -663,6 +666,7 @@ fn parse_layer(v: &Value) -> Result<ThemeLayer, String> {
|
||||
continue;
|
||||
}
|
||||
match slot(&mut probe, k) {
|
||||
None if ignore_unknown => ignored.push(k.clone()),
|
||||
None => bad.push(format!("`{k}` is not a theme colour")),
|
||||
Some(s) => {
|
||||
if let Err(e) = colors_for_key(k, c, s.len()) {
|
||||
@@ -671,6 +675,10 @@ fn parse_layer(v: &Value) -> Result<ThemeLayer, String> {
|
||||
}
|
||||
}
|
||||
}
|
||||
if !ignored.is_empty() {
|
||||
log::warn!("theme: ignoring colours this version does not have ({}); their defaults apply", ignored.join(", "));
|
||||
src.retain(|key, _| !ignored.contains(key));
|
||||
}
|
||||
let radii = match v.get("radii") {
|
||||
None => BTreeMap::new(),
|
||||
Some(Value::Object(values)) => {
|
||||
@@ -940,7 +948,7 @@ fn parse_overlays(v: Option<&Value>, options: &[OptionDef]) -> Result<Vec<Overla
|
||||
.map(|(position, value)| {
|
||||
let parse = || {
|
||||
let when = parse_condition(value.get("when").ok_or("`when` is required")?, options)?;
|
||||
Ok(Overlay { when, values: parse_layer(value)? })
|
||||
Ok(Overlay { when, values: parse_layer(value, false)? })
|
||||
};
|
||||
parse().map_err(|e: String| format!("`overlays[{}]`: {e}", position + 1))
|
||||
})
|
||||
@@ -3090,14 +3098,14 @@ mod tests {
|
||||
(r#"{"format":"solidcraft-theme/1","name":" ","base":"dark"}"#.into(), "name"),
|
||||
(r#"{"format":"solidcraft-theme/1","name":"x","base":"blue"}"#.into(), "base"),
|
||||
(format!(r#"{{{ok},"colors":[]}}"#), "colors"),
|
||||
(format!(r##"{{{ok},"colors":{{"panle":"#000000","text":"red","triad":["#000000"],"icons.axes":"#000000"}}}}"##), "panle"),
|
||||
(format!(r##"{{{ok},"colors":{{"text":"red","triad":["#000000"],"icons.axes":"#000000"}}}}"##), "text"),
|
||||
("x".repeat(MAX_BYTES + 1), "KiB"),
|
||||
] {
|
||||
let e = parse(&text).unwrap_err();
|
||||
assert!(e.contains(want), "{text:.80}: {e}");
|
||||
}
|
||||
let e = parse(&format!(r##"{{{ok},"colors":{{"panle":"#000000","text":"red","triad":["#000000"]}}}}"##)).unwrap_err();
|
||||
for k in ["panle", "text", "triad"] {
|
||||
let e = parse(&format!(r##"{{{ok},"colors":{{"text":"red","triad":["#000000"]}}}}"##)).unwrap_err();
|
||||
for k in ["text", "triad"] {
|
||||
assert!(e.contains(k), "{e}");
|
||||
}
|
||||
for c in ["#12345", "#1234567", "#gggggg", "282828", "#2828281"] {
|
||||
@@ -3127,6 +3135,35 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn importing_a_theme_ignores_colour_keys_this_version_lacks() {
|
||||
let file = json!({
|
||||
"format": FORMAT, "name": "Old", "base": "dark",
|
||||
"colors": {"panel": "#102030", "zigzag_face": "#abcdef", "zigzag_border": 5},
|
||||
});
|
||||
let imported = from_value(&file).expect("unknown colour keys never refuse a theme file");
|
||||
assert!(!imported.colors.contains_key("zigzag_face") && !imported.colors.contains_key("zigzag_border"));
|
||||
assert_eq!(resolve(&imported).panel, Color32::from_rgb(0x10, 0x20, 0x30));
|
||||
let plain = resolve(&ThemeFile { colors: BTreeMap::new(), ..imported.clone() });
|
||||
assert_eq!(resolve(&imported).navigator_face, plain.navigator_face, "defaults for the ignored colours");
|
||||
let bad = json!({"format": FORMAT, "name": "Bad", "base": "dark", "colors": {"panel": "nope"}});
|
||||
assert!(from_value(&bad).is_err(), "a known colour with a bad value is still an error");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_saved_theme_with_colour_keys_this_version_lacks_loads_with_them_ignored() {
|
||||
let saved = json!({
|
||||
"id": "old", "name": "Old", "base": "dark",
|
||||
"colors": {"panel": "#102030", "zigzag_face": "#abcdef", "zigzag_border": "#123456"},
|
||||
});
|
||||
let theme: ThemeFile = serde_json::from_value(saved).expect("an unknown colour key never fails a saved theme");
|
||||
let resolved = resolve(&theme);
|
||||
assert_eq!(resolved.panel, Color32::from_rgb(0x10, 0x20, 0x30), "the valid key is applied");
|
||||
let plain = resolve(&ThemeFile { colors: BTreeMap::new(), ..theme.clone() });
|
||||
assert_eq!(resolved.navigator_face, plain.navigator_face, "the unknown keys change nothing");
|
||||
assert_eq!(resolved.navigator_border, plain.navigator_border);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn imported_ids_never_take_a_built_in_or_mode_id_and_replace_their_own() {
|
||||
crate::test_support::host_data();
|
||||
|
||||
@@ -4796,7 +4796,7 @@ mod command_start_tab_tests {
|
||||
}
|
||||
|
||||
/// #10540: View Fit, Home and the other view display commands act on the view the same way
|
||||
/// however they are started. F6, the navigation bar and the view cube never move the ribbon,
|
||||
/// however they are started. F6, the navigation bar and the navigator never move the ribbon,
|
||||
/// so command search and the VIEW tab's menus must not either.
|
||||
#[test]
|
||||
fn view_display_commands_keep_the_ribbon_on_the_tab_they_were_started_from() {
|
||||
|
||||
@@ -94,7 +94,7 @@ fn navigation_cards_keep_their_proportions_and_native_targets_at_narrow_widths()
|
||||
paint_navigation_axes(p, rect, &crate::viewport::navigator_axes(&solidcraft_viewport::Camera::default()))
|
||||
},
|
||||
},
|
||||
PictureChoice { key: "cube", label: "Cube (compact)", figure: paint_navigation_cube },
|
||||
PictureChoice { key: "custom", label: "Custom", figure: paint_navigation_custom },
|
||||
],
|
||||
),
|
||||
] {
|
||||
|
||||
@@ -2322,138 +2322,6 @@ pub(super) const NAVIGATOR_AXES: Figure = Figure {
|
||||
],
|
||||
};
|
||||
|
||||
pub(super) const NAVIGATOR_CUBE: Figure = Figure {
|
||||
size: [120.0, 64.0],
|
||||
ops: &[
|
||||
Op::Poly {
|
||||
pts: &[[60.0, 10.0], [79.053, 21.0], [60.0, 32.0], [40.947, 21.0]],
|
||||
closed: true,
|
||||
fill: Some(P { ink: Ink::Top, a: 1.0 }),
|
||||
grad: None,
|
||||
line: None,
|
||||
},
|
||||
Op::Poly {
|
||||
pts: &[[40.947, 21.0], [60.0, 32.0], [60.0, 54.0], [40.947, 43.0]],
|
||||
closed: true,
|
||||
fill: Some(P { ink: Ink::Left, a: 1.0 }),
|
||||
grad: None,
|
||||
line: None,
|
||||
},
|
||||
Op::Poly {
|
||||
pts: &[[60.0, 32.0], [79.053, 21.0], [79.053, 43.0], [60.0, 54.0]],
|
||||
closed: true,
|
||||
fill: Some(P { ink: Ink::Right, a: 1.0 }),
|
||||
grad: None,
|
||||
line: None,
|
||||
},
|
||||
Op::Poly {
|
||||
pts: &[[60.0, 10.0], [79.053, 21.0], [79.053, 43.0], [60.0, 54.0], [40.947, 43.0], [40.947, 21.0]],
|
||||
closed: true,
|
||||
fill: None,
|
||||
grad: None,
|
||||
line: Some(L { ink: Ink::Line, a: 1.0, w: 1.35, dash: [0.0, 0.0], round: true }),
|
||||
},
|
||||
Op::Poly {
|
||||
pts: &[[40.947, 21.0], [60.0, 32.0], [79.053, 21.0]],
|
||||
closed: false,
|
||||
fill: None,
|
||||
grad: None,
|
||||
line: Some(L { ink: Ink::Line, a: 1.0, w: 1.35, dash: [0.0, 0.0], round: true }),
|
||||
},
|
||||
Op::Poly {
|
||||
pts: &[[60.0, 32.0], [60.0, 54.0]],
|
||||
closed: false,
|
||||
fill: None,
|
||||
grad: None,
|
||||
line: Some(L { ink: Ink::Line, a: 1.0, w: 1.35, dash: [0.0, 0.0], round: true }),
|
||||
},
|
||||
Op::Poly { pts: &[[60.0, 5.4], [57.5, 1.2], [62.5, 1.2]], closed: true, fill: Some(P { ink: Ink::Line, a: 1.0 }), grad: None, line: None },
|
||||
Op::Poly { pts: &[[60.0, 58.6], [62.5, 62.8], [57.5, 62.8]], closed: true, fill: Some(P { ink: Ink::Line, a: 1.0 }), grad: None, line: None },
|
||||
Op::Poly { pts: &[[35.4, 32.0], [31.2, 34.5], [31.2, 29.5]], closed: true, fill: Some(P { ink: Ink::Line, a: 1.0 }), grad: None, line: None },
|
||||
Op::Poly { pts: &[[84.6, 32.0], [88.8, 29.5], [88.8, 34.5]], closed: true, fill: Some(P { ink: Ink::Line, a: 1.0 }), grad: None, line: None },
|
||||
Op::Poly {
|
||||
pts: &[
|
||||
[80.927, 8.977],
|
||||
[80.563, 8.68],
|
||||
[80.191, 8.393],
|
||||
[79.811, 8.117],
|
||||
[79.424, 7.851],
|
||||
[79.03, 7.596],
|
||||
[78.628, 7.352],
|
||||
[78.22, 7.119],
|
||||
[77.806, 6.898],
|
||||
[77.386, 6.688],
|
||||
[76.96, 6.49],
|
||||
[76.528, 6.304],
|
||||
[76.092, 6.129],
|
||||
[75.651, 5.967],
|
||||
[75.206, 5.817],
|
||||
[74.757, 5.679],
|
||||
[74.304, 5.554],
|
||||
[73.848, 5.441],
|
||||
[73.389, 5.341],
|
||||
[72.928, 5.254],
|
||||
[72.464, 5.179],
|
||||
[71.998, 5.118],
|
||||
[71.531, 5.069],
|
||||
[71.063, 5.033],
|
||||
[70.593, 5.01],
|
||||
],
|
||||
closed: false,
|
||||
fill: None,
|
||||
grad: None,
|
||||
line: Some(L { ink: Ink::Line, a: 1.0, w: 1.65, dash: [0.0, 0.0], round: true }),
|
||||
},
|
||||
Op::Poly {
|
||||
pts: &[[69.094, 4.958], [72.662, 3.081], [72.522, 7.079]],
|
||||
closed: true,
|
||||
fill: Some(P { ink: Ink::Line, a: 1.0 }),
|
||||
grad: None,
|
||||
line: None,
|
||||
},
|
||||
Op::Poly {
|
||||
pts: &[
|
||||
[83.753, 12.008],
|
||||
[84.024, 12.391],
|
||||
[84.284, 12.783],
|
||||
[84.534, 13.181],
|
||||
[84.772, 13.586],
|
||||
[84.998, 13.997],
|
||||
[85.214, 14.415],
|
||||
[85.418, 14.838],
|
||||
[85.61, 15.267],
|
||||
[85.79, 15.701],
|
||||
[85.958, 16.139],
|
||||
[86.114, 16.582],
|
||||
[86.257, 17.03],
|
||||
[86.388, 17.481],
|
||||
[86.507, 17.935],
|
||||
[86.613, 18.393],
|
||||
[86.706, 18.853],
|
||||
[86.787, 19.316],
|
||||
[86.855, 19.781],
|
||||
[86.909, 20.248],
|
||||
[86.951, 20.715],
|
||||
[86.98, 21.184],
|
||||
[86.996, 21.654],
|
||||
[87.0, 22.124],
|
||||
[86.99, 22.593],
|
||||
],
|
||||
closed: false,
|
||||
fill: None,
|
||||
grad: None,
|
||||
line: Some(L { ink: Ink::Line, a: 1.0, w: 1.65, dash: [0.0, 0.0], round: true }),
|
||||
},
|
||||
Op::Poly {
|
||||
pts: &[[86.937, 24.092], [85.061, 20.525], [89.058, 20.664]],
|
||||
closed: true,
|
||||
fill: Some(P { ink: Ink::Line, a: 1.0 }),
|
||||
grad: None,
|
||||
line: None,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
pub(super) const ORBIT_CENTRE: Figure = Figure {
|
||||
size: [120.0, 64.0],
|
||||
ops: &[
|
||||
@@ -4424,11 +4292,6 @@ pub(crate) fn paint_navigator_axes(p: &Painter, rect: Rect) {
|
||||
paint(p, rect, &NAVIGATOR_AXES, None, None);
|
||||
}
|
||||
|
||||
/// The `navigator-cube` figure of `docs/design/preferences/figures`.
|
||||
pub(crate) fn paint_navigator_cube(p: &Painter, rect: Rect) {
|
||||
paint(p, rect, &NAVIGATOR_CUBE, None, None);
|
||||
}
|
||||
|
||||
/// The `orbit-centre` figure of `docs/design/preferences/figures`.
|
||||
pub(crate) fn paint_orbit_centre(p: &Painter, rect: Rect) {
|
||||
paint(p, rect, &ORBIT_CENTRE, None, None);
|
||||
@@ -4586,7 +4449,6 @@ pub(crate) const FIGURES: &[(&str, [f32; 2], fn(&Painter, Rect))] = &[
|
||||
("measure-axis-distances", MEASURE_AXIS_DISTANCES.size, paint_measure_axis_distances),
|
||||
("mouse-mapping", MOUSE_MAPPING.size, paint_mouse_mapping),
|
||||
("navigator-axes", NAVIGATOR_AXES.size, paint_navigator_axes),
|
||||
("navigator-cube", NAVIGATOR_CUBE.size, paint_navigator_cube),
|
||||
("orbit-centre", ORBIT_CENTRE.size, paint_orbit_centre),
|
||||
("orbit-cursor", ORBIT_CURSOR.size, paint_orbit_cursor),
|
||||
("orbit-origin", ORBIT_ORIGIN.size, paint_orbit_origin),
|
||||
|
||||
@@ -122,7 +122,7 @@ pub(super) struct Figure {
|
||||
}
|
||||
|
||||
/// The twelve colours a theme thumbnail is drawn with: ground, bar and side panel, muted marks,
|
||||
/// accent, the window face's top and bottom, grid, cube top, cube outline, cube left, cube right
|
||||
/// accent, the window face's top and bottom, grid, box top, box outline, box left, box right
|
||||
/// and the thumbnail's border. A colour may carry alpha (a glass theme's panels).
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub struct ThemeSample {
|
||||
@@ -190,12 +190,12 @@ impl Ctx<'_> {
|
||||
};
|
||||
let semantic = if matches!(self.palette, Palette::Navigator) {
|
||||
match ink {
|
||||
Ink::Ground | Ink::Top => Some(t.cube_face),
|
||||
Ink::Left => Some(t.cube_face.lerp_to_gamma(t.cube_border, 0.12)),
|
||||
Ink::Right => Some(t.cube_face.lerp_to_gamma(t.cube_border, 0.24)),
|
||||
Ink::Ground | Ink::Top => Some(t.navigator_face),
|
||||
Ink::Left => Some(t.navigator_face.lerp_to_gamma(t.navigator_border, 0.12)),
|
||||
Ink::Right => Some(t.navigator_face.lerp_to_gamma(t.navigator_border, 0.24)),
|
||||
Ink::Line => Some(t.figure_line),
|
||||
Ink::Text => Some(t.cube_text),
|
||||
Ink::Accent => Some(t.cube_hover),
|
||||
Ink::Text => Some(t.navigator_text),
|
||||
Ink::Accent => Some(t.navigator_hover),
|
||||
Ink::AxisX => Some(t.axis_x),
|
||||
Ink::AxisY => Some(t.axis_y),
|
||||
Ink::AxisZ => Some(t.axis_z),
|
||||
@@ -264,14 +264,14 @@ impl Ctx<'_> {
|
||||
_ => None,
|
||||
};
|
||||
if let Some(axis) = axis {
|
||||
let ground = if matches!(ink, Ink::White) { axis } else { t.cube_face };
|
||||
let ground = if matches!(ink, Ink::White) { axis } else { t.navigator_face };
|
||||
let intended = if matches!(ink, Ink::White) { t.on_accent } else { axis };
|
||||
if solidcraft_theme::contrast_ratio(intended, ground) >= 4.5 {
|
||||
return intended;
|
||||
}
|
||||
// Lettering has its own foreground role. Preserve the actual axis colour on
|
||||
// discs and strokes, choosing a legible token only for the tiny glyph.
|
||||
return [intended, t.cube_text, t.on_accent, t.tab_on_fill_dark]
|
||||
return [intended, t.navigator_text, t.on_accent, t.tab_on_fill_dark]
|
||||
.into_iter()
|
||||
.max_by(|a, b| solidcraft_theme::contrast_ratio(*a, ground).total_cmp(&solidcraft_theme::contrast_ratio(*b, ground)))
|
||||
.unwrap_or(intended);
|
||||
@@ -361,10 +361,6 @@ pub(crate) fn paint_navigation_axes(p: &Painter, rect: Rect, axes: &[NavigatorAx
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn paint_navigation_cube(p: &Painter, rect: Rect) {
|
||||
paint_with_tokens(p, rect, &super::preferences_figure_data::NAVIGATOR_CUBE, None, None, &Tokens::get(), Palette::Navigator);
|
||||
}
|
||||
|
||||
/// A generic body (a hexagonal prism) in the navigator palette: the user's own body stands in its place.
|
||||
pub(crate) fn paint_navigation_custom(p: &Painter, rect: Rect) {
|
||||
let Some((p, scale)) = navigation_canvas(p, rect) else { return };
|
||||
@@ -520,7 +516,7 @@ fn draw(p: &Painter, ctx: &Ctx, op: &Op, clip: Option<&[Pos2]>) {
|
||||
// The board's captions are 6.5 to 7.5 units: too small to read at card size, so they
|
||||
// are drawn a third larger (never under 8 points). The SVG's `y` is the baseline, which
|
||||
// sits about 0.36 em below the middle of a line of digits and capitals.
|
||||
// Longer captions sit in tight pills and on cube faces, so they are drawn slightly smaller than the board (egui's monospace face is wider than the board's).
|
||||
// Longer captions sit in tight pills and on box faces, so they are drawn slightly smaller than the board (egui's monospace face is wider than the board's).
|
||||
let grow = match s.chars().count() {
|
||||
0..=4 => 1.2,
|
||||
5..=6 => 0.9,
|
||||
@@ -799,13 +795,13 @@ mod tests {
|
||||
fn navigator_palette_preserves_axis_hues_and_uses_legible_lettering() {
|
||||
for t in [Tokens::light(), Tokens::dark()] {
|
||||
let ctx = Ctx { t: &t, sample: None, palette: Palette::Navigator, origin: Pos2::ZERO, scale: 1.0 };
|
||||
assert_eq!(ctx.ink(Ink::Ground, 1.0), t.cube_face);
|
||||
assert_eq!(ctx.ink(Ink::Ground, 1.0), t.navigator_face);
|
||||
assert_eq!(ctx.ink(Ink::Line, 1.0), t.figure_line);
|
||||
assert_eq!(ctx.ink(Ink::Text, 1.0), t.cube_text);
|
||||
assert_eq!(ctx.ink(Ink::Text, 1.0), t.navigator_text);
|
||||
for (ink, axis, label) in [(Ink::AxisX, t.axis_x, "X"), (Ink::AxisY, t.axis_y, "Y"), (Ink::AxisZ, t.axis_z, "Z")] {
|
||||
assert_eq!(ctx.ink(ink, 1.0), axis, "the navigator's real axis palette");
|
||||
assert!(solidcraft_theme::contrast_ratio(ctx.text_ink(Ink::White, 1.0, label), axis) >= 4.5);
|
||||
assert!(solidcraft_theme::contrast_ratio(ctx.text_ink(ink, 1.0, label), t.cube_face) >= 4.5);
|
||||
assert!(solidcraft_theme::contrast_ratio(ctx.text_ink(ink, 1.0, label), t.navigator_face) >= 4.5);
|
||||
}
|
||||
let ordinary = Ctx { palette: Palette::Figure, ..ctx };
|
||||
assert_eq!(ordinary.ink(Ink::AxisX, 1.0), t.figure_axis_x, "other illustrations keep their palette");
|
||||
|
||||
@@ -135,7 +135,7 @@ fn orientation_axes(y_up: bool) -> [(f32, f32, usize, &'static str); 3] {
|
||||
}
|
||||
|
||||
/// Orientation uses the same 30-degree ground plane as the model cards, with unmistakable
|
||||
/// axis arrows and readable labels rather than an unrelated generic cube.
|
||||
/// axis arrows and readable labels rather than an unrelated generic box.
|
||||
pub(crate) fn paint_orientation(p: &Painter, rect: Rect, y_up: bool) {
|
||||
let t = Tokens::get();
|
||||
let c = Canvas { rect };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Compact navigation preference compositions and explanatory figures.
|
||||
pub(crate) use super::preferences_figure_data::{paint_orbit_centre, paint_orbit_cursor, paint_orbit_origin};
|
||||
pub(crate) use super::preferences_figure_ops::{NavigatorAxis, paint_navigation_axes, paint_navigation_cube, paint_navigation_custom};
|
||||
pub(crate) use super::preferences_figure_ops::{NavigatorAxis, paint_navigation_axes, paint_navigation_custom};
|
||||
use super::{metrics::dimension, text::paint_text};
|
||||
use crate::ui_kit::BackingTooltipExt as _;
|
||||
use egui::{FontId, Rect, Sense, Stroke, Ui, pos2, vec2};
|
||||
|
||||
@@ -679,7 +679,6 @@ fn keywords(text: &str) -> &'static [&'static str] {
|
||||
"model" => &["traced"],
|
||||
"view center" | "view centre" => &["classic"],
|
||||
"axes" | "axes (signed)" => &["axes", "signed axes", "axes (signed)"],
|
||||
"cube" | "cube (compact)" => &["cube", "cube (compact)"],
|
||||
"under cursor" => &["under the cursor"],
|
||||
_ => &[],
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ pub struct Orbit {
|
||||
|
||||
/// Track a drag on a view navigator. A press may start one (`may_start`: the pointer is over the
|
||||
/// view and free to act) where `starts_at` says the navigator is; once the drag is decided each
|
||||
/// frame's motion is an [`OrbitStep`]. The cube and the custom body share it.
|
||||
/// frame's motion is an [`OrbitStep`]. The custom body uses it.
|
||||
pub fn orbit(ui: &egui::Ui, drag: &mut Drag, may_start: bool, starts_at: impl Fn(Pos2) -> bool) -> Orbit {
|
||||
let mut out = Orbit::default();
|
||||
let (pressed, down, decided, origin, pos, shift) = ui.input(|i| {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//! The custom view navigator: a body of the user's choice drawn in place of the navigation cube
|
||||
//! (`viewport::body_gizmo` draws it). A right-click on any view navigator offers Axes, Cube and
|
||||
//! The custom view navigator: a body of the user's choice drawn in place of the signed axes
|
||||
//! (`viewport::body_gizmo` draws it). A right-click on any view navigator offers Axes and
|
||||
//! Custom ([`menu_items`]); Custom opens the Custom View Navigator panel, a feature panel with OK
|
||||
//! and Cancel ([`start`], [`rows`], [`run_dialog`]): the body is picked in the view, then its
|
||||
//! texture (the cube's colours, or the body's own) and whether the cube's rotation arrows and
|
||||
//! texture (the colours, or the body's own) and whether the rotation arrows and
|
||||
//! Home button go around it. The navigator previews the panel's choices while it is open. OK
|
||||
//! runs `view.navigator` ([`command`]), which scripts and the control channel run too.
|
||||
//!
|
||||
@@ -50,7 +50,7 @@ const UNIT: f64 = 10_000.0;
|
||||
/// The custom navigator's body.
|
||||
#[derive(Default)]
|
||||
pub struct State {
|
||||
/// The body drawn in place of the cube (`None`: the cube is drawn).
|
||||
/// The body drawn in place of the signed axes (`None`: the axes are drawn).
|
||||
pub shape: Option<Shape>,
|
||||
/// The stored form of `shape`, made once when it is chosen.
|
||||
stored: Option<Value>,
|
||||
@@ -344,7 +344,7 @@ fn snapshot(name: &str, mesh: &Mesh, colour: Option<[u8; 3]>, faces: &BTreeMap<u
|
||||
}))
|
||||
}
|
||||
|
||||
/// The menu a right-click on the view navigator opens: Axes, Cube and Custom, the current one
|
||||
/// The menu a right-click on the view navigator opens: Axes and Custom, the current one
|
||||
/// marked. Custom opens the Custom View Navigator panel, which sets it on OK.
|
||||
pub(crate) fn menu_items(app: &SolveApp) -> Vec<Item> {
|
||||
NavigatorStyle::ALL
|
||||
@@ -352,7 +352,6 @@ pub(crate) fn menu_items(app: &SolveApp) -> Vec<Item> {
|
||||
.map(|style| {
|
||||
let (label, icon) = match style {
|
||||
NavigatorStyle::Axes => (app.tr("prefs.axes"), "origin"),
|
||||
NavigatorStyle::Cube => (solidcraft_ui_text::tr_label("Cube"), "box"),
|
||||
NavigatorStyle::Custom => (solidcraft_ui_text::tr_label("Custom"), "body"),
|
||||
};
|
||||
act("ui.navigatorStyle", label, icon).with(json!({ "style": style })).key(if app.preferences.navigator_style == style {
|
||||
@@ -364,7 +363,7 @@ pub(crate) fn menu_items(app: &SolveApp) -> Vec<Item> {
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// A menu pick: Axes and Cube at once; Custom opens its panel, as the toolbar would.
|
||||
/// A menu pick: Axes at once; Custom opens its panel, as the toolbar would.
|
||||
pub(crate) fn pick_style(app: &mut SolveApp, style: NavigatorStyle) {
|
||||
if style == NavigatorStyle::Custom {
|
||||
app.start("view.navigator");
|
||||
@@ -373,7 +372,7 @@ pub(crate) fn pick_style(app: &mut SolveApp, style: NavigatorStyle) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Draw body `name` of the open design as the gizmo (`None`: no body, the cube again).
|
||||
/// Draw body `name` of the open design as the gizmo (`None`: no body, the signed axes again).
|
||||
fn set_body(app: &mut SolveApp, name: Option<&str>) -> Result<(), String> {
|
||||
let shape = match name {
|
||||
None => None,
|
||||
@@ -547,6 +546,14 @@ pub(crate) struct Shown {
|
||||
pub home: bool,
|
||||
}
|
||||
|
||||
/// The navigator the view lays out for: Custom stands as the signed axes until a body is chosen.
|
||||
pub(crate) fn style(app: &SolveApp) -> NavigatorStyle {
|
||||
match app.preferences.navigator_style {
|
||||
NavigatorStyle::Custom if app.view_gizmo.shape.is_none() => NavigatorStyle::Axes,
|
||||
style => style,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn shown(app: &SolveApp) -> Shown {
|
||||
let p = &app.preferences;
|
||||
match app.dialog.as_ref().map(|d| &d.kind) {
|
||||
@@ -730,19 +737,19 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_right_click_anywhere_on_the_navigator_offers_axes_cube_and_custom() {
|
||||
fn a_right_click_anywhere_on_the_navigator_offers_axes_and_custom() {
|
||||
use crate::context_menu::{Target, items};
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.app.run("solid.box", json!({"length": 40, "width": 20, "height": 10})).unwrap();
|
||||
h.frames(2);
|
||||
let design = h.app.session.doc.to_json();
|
||||
for (from, pick, to) in [("axes", "Cube", NavigatorStyle::Cube), ("cube", "Axes", NavigatorStyle::Axes)] {
|
||||
for (from, pick, to) in [("axes", "Axes", NavigatorStyle::Axes)] {
|
||||
h.call("ui.prefs", json!({"navigator_style": from}));
|
||||
h.frames(2);
|
||||
let outer = crate::scenario::rect_of("axis_view:outer").expect("the navigator is shown");
|
||||
// The middle, a corner of its box, and its Home button on the cube.
|
||||
// The middle, a corner of its box, and its Home button.
|
||||
let mut spots = vec![outer.center(), outer.left_bottom() + egui::vec2(3.0, -3.0)];
|
||||
spots.extend(crate::scenario::handle_at("navigation_cube:control:home"));
|
||||
spots.extend(crate::scenario::handle_at("navigator:control:home"));
|
||||
for at in spots {
|
||||
crate::context_menu::close(&mut h.app);
|
||||
h.call("ui.click", json!({"x": at.x, "y": at.y, "button": "right"}));
|
||||
@@ -751,12 +758,12 @@ mod tests {
|
||||
}
|
||||
let rows = items(&h.app, &Target::ViewGizmo);
|
||||
let labels: Vec<_> = rows.iter().map(|r| r.label.as_str()).collect();
|
||||
assert_eq!(labels, ["Axes", "Cube", "Custom"], "just the three types");
|
||||
assert_eq!(labels, ["Axes", "Custom"], "just the two types");
|
||||
let current: Vec<_> = rows.iter().filter(|i| i.shortcut == "current").collect();
|
||||
assert_eq!(current.len(), 1);
|
||||
assert_eq!(current[0].params.as_ref().map(|p| p["style"].clone()), Some(json!(from)));
|
||||
assert_eq!(h.call("ui.menuPick", json!({"item": pick}))["ok"], true, "{pick}");
|
||||
assert_eq!(h.app.preferences.navigator_style, to, "Axes and Cube apply at once");
|
||||
assert_eq!(h.app.preferences.navigator_style, to, "Axes applies at once");
|
||||
assert!(h.app.dialog.is_none());
|
||||
}
|
||||
assert_eq!(h.app.session.doc.to_json(), design);
|
||||
@@ -768,7 +775,6 @@ mod tests {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.app.preferences.look_at_anim = false;
|
||||
h.app.run("solid.box", json!({"length": 40, "width": 20, "height": 10})).unwrap();
|
||||
h.call("ui.prefs", json!({"navigator_style": "cube"}));
|
||||
h.frames(2);
|
||||
let body = h.app.session.world_state().unwrap().bodies[0].name.clone();
|
||||
let open = |h: &mut crate::scenario::Harness| {
|
||||
@@ -794,12 +800,12 @@ mod tests {
|
||||
open(&mut h);
|
||||
fill(&mut h);
|
||||
assert!(crate::scenario::count_of("body_gizmo:faces").is_some_and(|n| n >= 3.0), "the navigator previews the picked body");
|
||||
assert!(crate::scenario::handle_at("navigation_cube:control:home").is_none(), "and the panel's Home, off");
|
||||
assert!(crate::scenario::handle_at("navigation_cube:control:left").is_some(), "with its arrows");
|
||||
assert!(crate::scenario::handle_at("navigator:control:home").is_none(), "and the panel's Home, off");
|
||||
assert!(crate::scenario::handle_at("navigator:control:left").is_some(), "with its arrows");
|
||||
h.step(&json!({"click": {"handle": "dialog:cancel"}})).unwrap();
|
||||
h.frames(2);
|
||||
assert!(h.app.dialog.is_none());
|
||||
assert_eq!(h.app.preferences.navigator_style, NavigatorStyle::Cube, "Cancel keeps the cube");
|
||||
assert_eq!(h.app.preferences.navigator_style, NavigatorStyle::Axes, "Cancel keeps the axes");
|
||||
assert!(h.app.view_gizmo.shape.is_none() && h.app.preferences.navigator_home, "Cancel keeps Home on");
|
||||
|
||||
let undo = h.app.session.undo.len();
|
||||
|
||||
@@ -51,8 +51,8 @@ mod refine_wait_tests;
|
||||
#[path = "body_gizmo.rs"]
|
||||
mod body_gizmo;
|
||||
|
||||
#[path = "navigation_cube.rs"]
|
||||
mod navigation_cube;
|
||||
#[path = "navigator_controls.rs"]
|
||||
mod navigator_controls;
|
||||
|
||||
#[path = "viewport_drag_layer.rs"]
|
||||
mod drag_layer;
|
||||
@@ -3465,10 +3465,10 @@ fn section_clip(app: &SolveApp) -> [f32; 4] {
|
||||
pub(crate) fn axis_view_size(style: crate::prefs::NavigatorStyle) -> f32 {
|
||||
match style {
|
||||
crate::prefs::NavigatorStyle::Axes => 116.0,
|
||||
crate::prefs::NavigatorStyle::Cube | crate::prefs::NavigatorStyle::Custom => navigation_cube::SIZE,
|
||||
crate::prefs::NavigatorStyle::Custom => navigator_controls::SIZE,
|
||||
}
|
||||
}
|
||||
// Keep command panels anchored independently of the compact cube's display size.
|
||||
// Keep command panels anchored independently of the navigator's display size.
|
||||
pub const AXIS_VIEW_CLEARANCE: f32 = 168.0;
|
||||
|
||||
/// Axis length as a multiple of the origin plane size (solid part 1, dashed beyond).
|
||||
@@ -5951,7 +5951,7 @@ impl ToastPlace {
|
||||
pub(crate) const TOAST_WIDTH: f32 = 360.0;
|
||||
|
||||
/// Where the corner stack may go: the largest free rect in a `TOAST_WIDTH` column at the right of
|
||||
/// `view`, clear of `obstacles` (the axis view and cube at the top, the view toolbar when a narrow
|
||||
/// `view`, clear of `obstacles` (the axis view at the top, the view toolbar when a narrow
|
||||
/// window brings it under the column, docked panels), less the usual margin. A pane at the right
|
||||
/// edge (an edge-docked dialog, the Assistant) moves the column, at full width, to its left edge
|
||||
/// rather than leaving a strip beside it (#8804, as the frame-rate readout does, #6755). The first
|
||||
@@ -7145,14 +7145,14 @@ pub(crate) fn refresh_layout(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
let navigation = if app.ui.show_navigation_bar { crate::navigation_bar_view::measured(app, ctx, rect).rect } else { Rect::NOTHING };
|
||||
let orbit = crate::navigation_bar_view::canvas_caps(app).orbit;
|
||||
app.viewport.layout = Some(if let Some(confirm) = app.viewport.host_confirm {
|
||||
crate::viewport_layout::Layout::host_with_retained_confirm(rect, &usable, app.preferences.navigator_style, confirm, navigation, orbit)
|
||||
crate::viewport_layout::Layout::host_with_retained_confirm(rect, &usable, crate::view_gizmo::style(app), confirm, navigation, orbit)
|
||||
} else if orbit {
|
||||
crate::viewport_layout::Layout::host(rect, &usable, app.preferences.navigator_style, crate::view_confirm::size(app), navigation)
|
||||
crate::viewport_layout::Layout::host(rect, &usable, crate::view_gizmo::style(app), crate::view_confirm::size(app), navigation)
|
||||
} else {
|
||||
crate::viewport_layout::Layout::host_with_axis(
|
||||
rect,
|
||||
&usable,
|
||||
app.preferences.navigator_style,
|
||||
crate::view_gizmo::style(app),
|
||||
crate::view_confirm::size(app),
|
||||
navigation,
|
||||
false,
|
||||
@@ -7186,7 +7186,7 @@ pub(crate) fn refresh_layout(app: &mut SolveApp, ctx: &egui::Context) {
|
||||
}
|
||||
// OK and Cancel in the view's corner (#6709) take the top right; the axis view goes below.
|
||||
let corner = crate::view_confirm::size(app);
|
||||
let style = app.preferences.navigator_style;
|
||||
let style = crate::view_gizmo::style(app);
|
||||
let layout = if crate::render_workspace::active(app) {
|
||||
let navigation = if app.ui.show_navigation_bar { crate::navigation_bar_view::measured(app, ctx, content).rect } else { Rect::NOTHING };
|
||||
if app.preferences.render_inspector_side == "left" {
|
||||
@@ -7228,7 +7228,7 @@ fn axis_center(app: &SolveApp, rect: Rect) -> Pos2 {
|
||||
let c = axis_rect(app, rect).center();
|
||||
// The compass sits a little higher in its reserved box (less margin above, the same on the
|
||||
// right); the box itself is unchanged.
|
||||
if app.preferences.navigator_style == crate::prefs::NavigatorStyle::Axes { c - vec2(0.0, AXIS_CENTER_LIFT) } else { c }
|
||||
if crate::view_gizmo::style(app) == crate::prefs::NavigatorStyle::Axes { c - vec2(0.0, AXIS_CENTER_LIFT) } else { c }
|
||||
}
|
||||
|
||||
/// How far the signed-axis compass is lifted inside its reserved box.
|
||||
@@ -7236,7 +7236,7 @@ pub(crate) const AXIS_CENTER_LIFT: f32 = 4.0;
|
||||
|
||||
pub(crate) fn axis_rect(app: &SolveApp, rect: Rect) -> Rect {
|
||||
app.viewport.layout.as_ref().filter(|l| l.viewport == crate::render_workspace::camera_rect(app, rect)).map(|l| l.axis_view).unwrap_or_else(|| {
|
||||
let size = axis_view_size(app.preferences.navigator_style);
|
||||
let size = axis_view_size(crate::view_gizmo::style(app));
|
||||
Rect::from_min_size(pos2(rect.right() - size, rect.top()), vec2(size, size))
|
||||
})
|
||||
}
|
||||
@@ -7277,11 +7277,8 @@ fn axis_view_orbit(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect) -> bool {
|
||||
let orbit = crate::view_compass::orbit(ui, &mut drag, may_start, |p| {
|
||||
let shown = crate::view_gizmo::shown(app);
|
||||
match shown.style {
|
||||
crate::prefs::NavigatorStyle::Axes => axis_rect(app, rect).contains(p),
|
||||
crate::prefs::NavigatorStyle::Custom if shown.shape.is_some() => body_gizmo::drag_origin(app, rect, p),
|
||||
crate::prefs::NavigatorStyle::Cube | crate::prefs::NavigatorStyle::Custom => {
|
||||
navigation_cube::drag_origin(app, axis_center(app, rect), p, axis_rect(app, rect).width() / navigation_cube::DESIGN_SIZE)
|
||||
}
|
||||
crate::prefs::NavigatorStyle::Axes | crate::prefs::NavigatorStyle::Custom => axis_rect(app, rect).contains(p),
|
||||
}
|
||||
});
|
||||
(app.viewport.axis_drag, app.viewport.axis_warp) = (drag.at, drag.warp);
|
||||
@@ -7327,9 +7324,8 @@ pub(crate) fn axis_view(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect) {
|
||||
gizmo_menu(app, ui, rect);
|
||||
let shown = crate::view_gizmo::shown(app);
|
||||
match shown.style {
|
||||
crate::prefs::NavigatorStyle::Axes => signed_axis_view(app, ui, rect),
|
||||
crate::prefs::NavigatorStyle::Custom if shown.shape.is_some() => body_gizmo::show(app, ui, rect, shown),
|
||||
crate::prefs::NavigatorStyle::Cube | crate::prefs::NavigatorStyle::Custom => navigation_cube::show(app, ui, rect),
|
||||
crate::prefs::NavigatorStyle::Axes | crate::prefs::NavigatorStyle::Custom => signed_axis_view(app, ui, rect),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12806,27 +12802,6 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn navigation_cube_repeated_face_click_keeps_view_and_drag_snaps() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style":"cube"}));
|
||||
h.run(&json!([
|
||||
{"call":"ui.view","params":{"view":"home"}},
|
||||
{"click":{"handle":"axis_view:z"}},
|
||||
{"expect":{"camera":{"pitch_deg":90,"yaw_deg":0}}},
|
||||
{"click":{"handle":"axis_view:z"}},
|
||||
{"expect":{"camera":{"pitch_deg":90,"yaw_deg":0}}},
|
||||
{"call":"ui.view","params":{"view":"front"}}
|
||||
]))
|
||||
.unwrap();
|
||||
let c = axis_center(&h.app, h.app.viewport.rect.unwrap());
|
||||
h.call("ui.drag", json!({"x0":c.x,"y0":c.y,"x1":c.x+220.0,"y1":c.y,"shift":true,"steps":40}));
|
||||
assert!((h.app.cam.yaw - std::f64::consts::FRAC_PI_2).abs() < 1e-6);
|
||||
assert!(h.app.viewport.axis_drag.is_none());
|
||||
assert!(h.app.viewport.orbit_free.is_none());
|
||||
assert!(h.app.viewport.boxsel.is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn construction_point_is_pickable_only_while_visible() {
|
||||
let mut s = solidcraft_engine::Session::default();
|
||||
|
||||
@@ -252,13 +252,13 @@ impl Layout {
|
||||
let confirm = below_bar(confirm);
|
||||
// The axis view starts below the pair while it is shown.
|
||||
let top = if confirm.is_positive() { confirm.bottom() + CORNER_GAP } else { available.top() };
|
||||
let cube_size = if fit_in_content { 110.0 } else { super::viewport::axis_view_size(style) };
|
||||
let axis_size = if fit_in_content { 110.0 } else { super::viewport::axis_view_size(style) };
|
||||
let axis_left = |size| {
|
||||
if inspector_side == Some(crate::frame::Side::Left) { available.left() } else { available.right() - size }
|
||||
};
|
||||
let top = below_bar(Rect::from_min_size(pos2(axis_left(cube_size), top), vec2(cube_size, cube_size))).top();
|
||||
let mut axis_view = if available.width() >= cube_size && available.bottom() - top >= cube_size {
|
||||
Rect::from_min_size(pos2(axis_left(cube_size), top), vec2(cube_size, cube_size))
|
||||
let top = below_bar(Rect::from_min_size(pos2(axis_left(axis_size), top), vec2(axis_size, axis_size))).top();
|
||||
let mut axis_view = if available.width() >= axis_size && available.bottom() - top >= axis_size {
|
||||
Rect::from_min_size(pos2(axis_left(axis_size), top), vec2(axis_size, axis_size))
|
||||
} else {
|
||||
Rect::NOTHING
|
||||
};
|
||||
@@ -268,8 +268,8 @@ impl Layout {
|
||||
for _ in 0..obstacles.len() {
|
||||
let bottom = obstacles.iter().filter(|dock| axis_view.intersect(**dock).is_positive()).map(Rect::bottom).max_by(f32::total_cmp);
|
||||
let Some(bottom) = bottom else { break };
|
||||
axis_view = if available.bottom() - bottom >= cube_size {
|
||||
Rect::from_min_size(pos2(axis_view.left(), bottom), vec2(cube_size, cube_size))
|
||||
axis_view = if available.bottom() - bottom >= axis_size {
|
||||
Rect::from_min_size(pos2(axis_view.left(), bottom), vec2(axis_size, axis_size))
|
||||
} else {
|
||||
Rect::NOTHING
|
||||
};
|
||||
@@ -278,7 +278,7 @@ impl Layout {
|
||||
// On tiny viewports keep the bottom controls usable rather than overlapping them.
|
||||
// This decision depends only on viewport size, never on an overlay.
|
||||
if axis_view.intersect(navigation).is_positive() {
|
||||
let compact = (navigation.top() - top - 4.0).min(cube_size);
|
||||
let compact = (navigation.top() - top - 4.0).min(axis_size);
|
||||
axis_view = if style != crate::prefs::NavigatorStyle::Axes && compact >= 96.0 {
|
||||
Rect::from_min_size(pos2(axis_left(compact), top), vec2(compact, compact))
|
||||
} else {
|
||||
|
||||
@@ -279,7 +279,7 @@ fn host_picture_centring_keeps_distance_and_selected_focus_at_the_product_lens()
|
||||
#[test]
|
||||
fn render_compass_avoids_the_navigation_bar_on_either_inspector_side() {
|
||||
let viewport = Rect::from_min_size(pos2(0.0, 0.0), vec2(400.0, 140.0));
|
||||
for style in [crate::prefs::NavigatorStyle::Axes, crate::prefs::NavigatorStyle::Cube] {
|
||||
for style in [crate::prefs::NavigatorStyle::Axes] {
|
||||
for inspector_left in [false, true] {
|
||||
for bar_left in [false, true] {
|
||||
let navigation = Rect::from_min_size(pos2(if bar_left { 8.0 } else { 312.0 }, 100.0), vec2(80.0, 32.0));
|
||||
@@ -435,7 +435,7 @@ fn host_fit_uses_the_actual_contour_and_model_extent_with_the_full_projection()
|
||||
];
|
||||
let usable = resolve_usable_region(logical_rect(viewport), &obstacles.map(logical_rect)).unwrap();
|
||||
assert!(usable.free.iter().any(|piece| egui_rect(*piece).contains(pos2(100.0, 700.0))), "the short-panel gap is part of the retained contour");
|
||||
for style in [crate::prefs::NavigatorStyle::Axes, crate::prefs::NavigatorStyle::Cube] {
|
||||
for style in [crate::prefs::NavigatorStyle::Axes] {
|
||||
let navigation = bar_rect(viewport);
|
||||
let layout = Layout::host(viewport, &usable, style, egui::Vec2::ZERO, navigation);
|
||||
assert_eq!(layout.viewport, viewport);
|
||||
@@ -697,7 +697,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 mode in [crate::ui_kit::LayoutMode::Floating, crate::ui_kit::LayoutMode::Docked] {
|
||||
for style in crate::prefs::NavigatorStyle::ALL {
|
||||
for style in [crate::prefs::NavigatorStyle::Axes] {
|
||||
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.set", json!({"layout":mode}));
|
||||
@@ -743,25 +743,13 @@ fn measured_navigator_targets_home_and_drag_work_beside_the_palette_at_hidpi() {
|
||||
continue;
|
||||
}
|
||||
assert!(!layout.navigation.intersect(outer).is_positive());
|
||||
// Custom without a body draws the cube.
|
||||
if style != crate::prefs::NavigatorStyle::Axes {
|
||||
let front = crate::scenario::handle_at("navigation_cube:front").unwrap();
|
||||
assert!(outer.contains(front));
|
||||
let up = crate::scenario::handle_at("navigation_cube:control:up").unwrap();
|
||||
h.call("ui.click", json!({"x":up.x,"y":up.y}));
|
||||
assert!(h.app.cam.back().dist(Vec3::Z) < 1e-5);
|
||||
let top = crate::scenario::handle_at("navigation_cube:top").unwrap();
|
||||
h.call("ui.click", json!({"x":top.x,"y":top.y}));
|
||||
assert!(h.app.cam.back().dist(Vec3::Z) < 1e-5);
|
||||
} else {
|
||||
let z = crate::scenario::handle_at("axis_view:z").unwrap();
|
||||
assert!(outer.contains(z));
|
||||
h.call("ui.click", json!({"x":z.x,"y":z.y}));
|
||||
assert!(h.app.cam.back().dist(Vec3::Z) < 1e-5);
|
||||
let z = crate::scenario::handle_at("axis_view:z").unwrap();
|
||||
h.call("ui.click", json!({"x":z.x,"y":z.y}));
|
||||
assert!(h.app.cam.back().dist(-Vec3::Z) < 1e-5);
|
||||
}
|
||||
let z = crate::scenario::handle_at("axis_view:z").unwrap();
|
||||
assert!(outer.contains(z));
|
||||
h.call("ui.click", json!({"x":z.x,"y":z.y}));
|
||||
assert!(h.app.cam.back().dist(Vec3::Z) < 1e-5);
|
||||
let z = crate::scenario::handle_at("axis_view:z").unwrap();
|
||||
h.call("ui.click", json!({"x":z.x,"y":z.y}));
|
||||
assert!(h.app.cam.back().dist(-Vec3::Z) < 1e-5);
|
||||
h.call("ui.view", json!({"view":"front"}));
|
||||
h.app.viewport.nav = Some(crate::viewport::NavMode::Pan);
|
||||
let before = h.app.cam;
|
||||
@@ -869,12 +857,12 @@ fn opening_different_command_dialogs_keeps_published_navigation_positions() {
|
||||
}
|
||||
|
||||
/// OK and Cancel in the view's corner (#6709): the pair holds the content's top right corner and
|
||||
/// the axis view or cube moves down below it, clear of the pair and the navigation bar; without
|
||||
/// the axis view moves down below it, clear of the pair and the navigation bar; without
|
||||
/// the pair (or without room for it) nothing moves.
|
||||
#[test]
|
||||
fn the_corner_pair_takes_the_top_right_and_the_view_navigator_moves_below_it() {
|
||||
let corner = vec2(92.0, 48.0);
|
||||
for style in [crate::prefs::NavigatorStyle::Axes, crate::prefs::NavigatorStyle::Cube] {
|
||||
for style in [crate::prefs::NavigatorStyle::Axes] {
|
||||
for (width, height) in [(1400.0, 900.0), (700.0, 450.0), (310.0, 240.0), (160.0, 160.0), (90.0, 50.0)] {
|
||||
let vp = Rect::from_min_size(pos2(20.0, 30.0), vec2(width, height));
|
||||
let content = Rect::from_min_max(pos2(vp.left() + width * 0.25, vp.top()), vp.max);
|
||||
@@ -1078,7 +1066,7 @@ fn a_fit_centres_the_model_in_the_view_and_is_moved_only_by_panels() {
|
||||
let (x, y, _) = cam.to_screen(p, f64::from(viewport.width()), f64::from(viewport.height()), radius).unwrap();
|
||||
pos2(viewport.left() + x as f32, viewport.top() + y as f32)
|
||||
};
|
||||
for style in [crate::prefs::NavigatorStyle::Axes, crate::prefs::NavigatorStyle::Cube] {
|
||||
for style in [crate::prefs::NavigatorStyle::Axes] {
|
||||
// The compass and the navigation bar, and nothing else.
|
||||
let bare = layout(viewport, &[], 1.0, style, true);
|
||||
let cam = fit_bounds(Camera::default(), &bounds, &bare, 0.0).expect("framed");
|
||||
|
||||
@@ -1372,7 +1372,7 @@ fn view_analysis_buttons_are_one_toggle_group() {
|
||||
#[test]
|
||||
fn view_angles_readout_shows_only_when_on_and_applies_typed_angles() {
|
||||
use solidcraft_viewport::ViewAngles;
|
||||
for style in ["axes", "cube"] {
|
||||
for style in ["axes", "custom"] {
|
||||
let mut h = Harness::new();
|
||||
h.call("ui.prefs", json!({"navigator_style": style}));
|
||||
h.app.preferences.look_at_anim = false;
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
[
|
||||
{"call":"ui.prefs","params":{"navigator_style":"cube"}},
|
||||
{
|
||||
"note": "Cube facets own one highlight at a time and choose principal views."
|
||||
},
|
||||
{
|
||||
"call": "ui.view",
|
||||
"params": {
|
||||
"view": "home"
|
||||
}
|
||||
},
|
||||
{
|
||||
"move": {
|
||||
"handle": "navigation_cube:top"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
"count": {
|
||||
"name": "axis_view_highlights",
|
||||
"value": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": {
|
||||
"handle": "navigation_cube:top"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
"camera": {
|
||||
"yaw_deg": 0,
|
||||
"pitch_deg": 90
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": {
|
||||
"handle": "navigation_cube:control:down"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
"camera": {
|
||||
"yaw_deg": 0,
|
||||
"pitch_deg": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"move": [
|
||||
800,
|
||||
500
|
||||
]
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
"count": {
|
||||
"name": "axis_view_highlights",
|
||||
"value": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,74 +0,0 @@
|
||||
[
|
||||
{"call":"ui.prefs","params":{"navigator_style":"cube"}},
|
||||
{
|
||||
"note": "Cube top/bottom face clicks preserve the nearest square heading in each up frame."
|
||||
},
|
||||
{
|
||||
"camera": {
|
||||
"yaw": -2.356194490192345,
|
||||
"pitch": 0.6154797086703874
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": {
|
||||
"handle": "navigation_cube:top"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
"camera": {
|
||||
"yaw_deg": -90,
|
||||
"pitch_deg": 90
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"camera": {
|
||||
"yaw": 2.9670597283903604,
|
||||
"pitch": -0.6
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": {
|
||||
"handle": "navigation_cube:bottom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
"camera": {
|
||||
"yaw_deg": 180,
|
||||
"pitch_deg": -90
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"call": "ui.prefs",
|
||||
"params": {
|
||||
"up_axis": "y"
|
||||
}
|
||||
},
|
||||
{
|
||||
"camera": {
|
||||
"yaw": -1.3962634015954636,
|
||||
"pitch": 0.6
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": {
|
||||
"handle": "navigation_cube:top"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
"camera": {
|
||||
"yaw_deg": -90,
|
||||
"pitch_deg": 90,
|
||||
"back": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,54 +0,0 @@
|
||||
[
|
||||
{"call":"ui.prefs","params":{"navigator_style":"cube"}},
|
||||
{
|
||||
"note": "Cube face names follow the up-axis frame; with Y up, Top looks from +Y and Front from +Z."
|
||||
},
|
||||
{
|
||||
"call": "ui.prefs",
|
||||
"params": {
|
||||
"up_axis": "y"
|
||||
}
|
||||
},
|
||||
{
|
||||
"call": "ui.view",
|
||||
"params": {
|
||||
"view": "home"
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": {
|
||||
"handle": "navigation_cube:top"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
"camera": {
|
||||
"yaw_deg": 0,
|
||||
"pitch_deg": 90,
|
||||
"back": [
|
||||
0,
|
||||
1,
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"click": {
|
||||
"handle": "navigation_cube:control:down"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expect": {
|
||||
"camera": {
|
||||
"yaw_deg": 0,
|
||||
"pitch_deg": 0,
|
||||
"back": [
|
||||
0,
|
||||
0,
|
||||
1
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
+1
-1
@@ -17,7 +17,7 @@ versions. Two preferences opt into holding the model:
|
||||
but picks the point each frame because device apps do not report rest.
|
||||
|
||||
While editing a sketch, the cap pans and zooms without changing the sketch's initial view. After you
|
||||
adjust the view with the navigation cube, the cap can rotate it too. Turn on **Turn sketches with
|
||||
adjust the view with the view navigator, the cap can rotate it too. Turn on **Turn sketches with
|
||||
the 3D mouse** (`space_mouse_sketch_orbit: true`) to let the cap rotate a sketch seen square on as
|
||||
well, as the mouse can. The Navigation
|
||||
page in Preferences has an on/off switch, a speed control and, for each of the cap's six axes, an
|
||||
|
||||
@@ -127,7 +127,7 @@ view.
|
||||
home, framing what is shown now (Navigation › **Middle double-click** can make it Fit, which
|
||||
keeps the orientation, or turn it off).
|
||||
Interface › **OK and Cancel in the view's corner** puts a large check and cross at the view's
|
||||
top right while a dialog or a sketch is open, and moves the axis view or cube down below them.
|
||||
top right while a dialog or a sketch is open, and moves the axis view down below them.
|
||||
With a dialog open they do what its OK and Cancel do (the check is grey whenever OK is); in a
|
||||
sketch without a dialog they are Finish Sketch and Cancel Sketch.
|
||||
**View angles** in the navigation bar's View menu (or Preferences › Graphics, or the
|
||||
@@ -300,7 +300,7 @@ colours and corner radii by name:
|
||||
Colours are `#rrggbb`, or `#rrggbbaa` for translucent ones. A few colours, such as the four
|
||||
Continuity Analysis seams (`continuity`), take a list. Any colour the file leaves out keeps the
|
||||
base palette's value. `axis_x`, `axis_y` and `axis_z` colour every X, Y and Z axis: the origin,
|
||||
the view triad, the navigation cube and the Move gizmo. A file from an earlier version may set
|
||||
the view triad, the axes navigator and the Move gizmo. A file from an earlier version may set
|
||||
`triad` or `gizmo` instead; it still reads, and those colours now go to every axis.
|
||||
|
||||
`radii` is optional. Its six keys above accept integers from 0 to 32 in logical UI points;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user