From d9ccba01349e177bb7b2b428e8509edbef70bc27 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:29:09 +0000 Subject: [PATCH 001/102] Report a bug: scale a large window's screenshot down instead of refusing it (#7091) (#7092) * claim: #7091 * Report a bug: scale a large window's screenshot down instead of refusing it (#7091) A frame over 16 million pixels (a 6K display, a window across two 4K screens) was refused with "Screenshot dimensions are unsupported", so the report went out without its picture. Such a frame is now averaged down by the smallest whole factor that fits. The frame is also fitted to the longest side a texture can have: a frame under the pixel limit but wider than the GPU's limit (three ultrawide screens, 10320 x 1440, on a device limited to 8192) made the preview's upload fail wgpu validation, and the window's device panics on that. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/issue_report.rs | 128 +++++++++++++++++++++++++++-- 1 file changed, 120 insertions(+), 8 deletions(-) diff --git a/crates/ui-egui/src/issue_report.rs b/crates/ui-egui/src/issue_report.rs index 93a9b8457..d037b9075 100644 --- a/crates/ui-egui/src/issue_report.rs +++ b/crates/ui-egui/src/issue_report.rs @@ -178,6 +178,8 @@ struct Pending { deadline: f64, window: egui::Rect, pixels_per_point: f32, + /// The longest side a texture can have here: the screenshot's preview is one. + max_side: usize, } /// A bounded formatting sink also avoids allocating a full hostile Debug/JSON value first. @@ -526,6 +528,7 @@ fn capture(app: &mut SolveApp, ctx: &egui::Context, dialog: Option<&dialogs::Dia deadline: now + 8000.0, window: ctx.content_rect(), pixels_per_point: ctx.pixels_per_point(), + max_side: ctx.input(|i| i.max_texture_side), }); app.queued_shots.push((token, now + 150.0, 0)); ctx.request_repaint(); @@ -557,9 +560,9 @@ pub(crate) fn tick(app: &mut SolveApp, ctx: &egui::Context) { } pub(crate) fn receive(app: &mut SolveApp, token: u64, image: Arc) { - if !app.issue_report.pending.as_ref().is_some_and(|p| p.token == token) { + let Some(max_side) = app.issue_report.pending.as_ref().filter(|p| p.token == token).map(|p| p.max_side) else { return; - } + }; let stale = app.issue_report.pending.as_ref().is_some_and(|p| p.signature != signature(app, app.dialog.as_ref())); app.issue_report.pending = None; if let Some(draft) = app.issue_report.draft.as_mut() { @@ -567,16 +570,57 @@ pub(crate) fn receive(app: &mut SolveApp, token: u64, image: Arc) { draft.note = "The model, inputs or view changed during capture. Retake the current view.".into(); return; } - let pixels = image.width().checked_mul(image.height()); - if !pixels.is_some_and(|n| n > 0 && n <= MAX_IMAGE_PIXELS && n == image.pixels.len()) { - draft.note = "Screenshot dimensions are unsupported. The text draft is still available.".into(); - } else { - draft.image = Some(image); - draft.note = "Screenshot captured locally. Review it before attaching it on GitHub.".into(); + match fitted(image, MAX_IMAGE_PIXELS, max_side) { + Some(image) => { + draft.image = Some(image); + draft.note = "Screenshot captured locally. Review it before attaching it on GitHub.".into(); + } + None => draft.note = "Screenshot dimensions are unsupported. The text draft is still available.".into(), } } } +/// `image` with at most `max` pixels and no side longer than `max_side`: a larger frame (a 6K +/// display, a window across several screens, #7091) is averaged down by the smallest whole +/// factor that fits. A preview texture over the GPU's limit fails its upload, and the window's +/// device panics on that. `None` only for a frame whose size doesn't match its pixels. +fn fitted(image: Arc, max: usize, max_side: usize) -> Option> { + let [w, h] = image.size; + let n = w.checked_mul(h)?; + if n == 0 || n != image.pixels.len() || max == 0 || max_side == 0 { + return None; + } + let fits = |k: usize| w.div_ceil(k) <= max_side && h.div_ceil(k) <= max_side && w.div_ceil(k).saturating_mul(h.div_ceil(k)) <= max; + if fits(1) { + return Some(image); + } + // Ends: at a factor of the longer side the frame is one pixel. + let mut k = 2; + while !fits(k) { + k += 1; + } + let [ow, oh] = [w.div_ceil(k), h.div_ceil(k)]; + let mut pixels = Vec::with_capacity(ow * oh); + for oy in 0..oh { + let rows = oy * k..((oy + 1) * k).min(h); + for ox in 0..ow { + let cols = ox * k..((ox + 1) * k).min(w); + let (mut sum, mut count) = ([0_u64; 4], 0_u64); + for y in rows.clone() { + for p in image.pixels.get(y * w + cols.start..y * w + cols.end).unwrap_or_default() { + for (s, c) in sum.iter_mut().zip(p.to_array()) { + *s += u64::from(c); + } + count += 1; + } + } + let [r, g, b, a] = sum.map(|s| u8::try_from(s / count.max(1)).unwrap_or(u8::MAX)); + pixels.push(egui::Color32::from_rgba_premultiplied(r, g, b, a)); + } + } + Some(Arc::new(ColorImage::new([ow, oh], pixels))) +} + /// The report card is hidden only while a frame is captured, so it cannot cover the evidence. pub fn show(app: &mut SolveApp, ctx: &egui::Context) { if pending(app) { @@ -1281,6 +1325,74 @@ mod tests { assert!(draft.image.is_none() && draft.note.contains("changed")); } + /// A 6K display's frame, 20.4 million pixels, is over the limit: the report keeps it at half + /// size instead of refusing it (#7091). + #[test] + fn issue_report_capture_keeps_a_frame_over_the_limit_scaled_down() { + let mut app = app(); + let ctx = crate::fonts::test_context(); + begin(&mut app, &ctx, None, None); + // As the app's window device has it (vendor/egui-wgpu asks for at least 8192). + app.issue_report.pending.as_mut().unwrap().max_side = 8192; + let token = app.issue_report.pending.as_ref().unwrap().token; + let [w, h] = [6016, 3384]; + let pixels = (0..w * h).map(|i| if i % w < w / 2 { egui::Color32::RED } else { egui::Color32::BLUE }).collect(); + receive(&mut app, token, Arc::new(ColorImage::new([w, h], pixels))); + let draft = app.issue_report.draft.as_ref().unwrap(); + assert!(draft.note.contains("captured"), "{}", draft.note); + let image = draft.image.as_ref().expect("the report keeps a screenshot"); + assert_eq!(image.size, [3008, 1692]); + // The halves still meet in the middle. + assert_eq!( + [image.pixels[0], image.pixels[1503], image.pixels[1504], image.pixels[3007]], + [egui::Color32::RED, egui::Color32::RED, egui::Color32::BLUE, egui::Color32::BLUE] + ); + } + + /// Three ultrawide screens side by side, 10320 × 1440: under the pixel limit, but wider than + /// the GPU can make a texture. The preview's upload would fail and the window's device panic + /// on it; here, where the limit is egui's default 2048, egui's own check panicked. + #[test] + fn issue_report_preview_of_a_frame_wider_than_a_texture_fits_the_gpu() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + let ctx = h.ctx.clone(); + begin(&mut h.app, &ctx, None, None); + let token = h.app.shot_token; + receive(&mut h.app, token, Arc::new(ColorImage::new([10_320, 1440], vec![egui::Color32::GREEN; 10_320 * 1440]))); + h.frames(4); + let max_side = h.ctx.input(|i| i.max_texture_side); + let draft = h.app.issue_report.draft.as_ref().unwrap(); + let size = draft.image.as_ref().expect("the report keeps a screenshot").size; + assert!(size[0] <= max_side && size[1] <= max_side, "{size:?} over {max_side}"); + assert!(draft.texture.is_some(), "the preview is drawn"); + } + + #[test] + fn a_frame_over_the_limit_is_averaged_down_by_a_whole_factor() { + let frame = |[w, h]: [usize; 2], colour: &dyn Fn(usize, usize) -> egui::Color32| { + Arc::new(ColorImage::new([w, h], (0..w * h).map(|i| colour(i % w, i / w)).collect())) + }; + let small = frame([4, 3], &|_, _| egui::Color32::GREEN); + assert!(Arc::ptr_eq(&fitted(small.clone(), 12, 4).unwrap(), &small), "a frame within the limits is kept as it is"); + // 15 pixels over a limit of 6: by 2, into 3 × 2; the last column and row average the + // pixels they cover. + let grey = egui::Color32::from_gray; + let checks = frame([5, 3], &|x, y| grey(if (x + y) % 2 == 0 { 0 } else { 200 })); + let image = fitted(checks, 6, 16).unwrap(); + assert_eq!(image.size, [3, 2]); + assert_eq!(image.pixels, [grey(100), grey(100), grey(100), grey(100), grey(100), grey(0)]); + // A long strip goes down by the factor its area or its length needs: 1000 × 2 into 4 + // pixels is by 250, and into a side of 300 by 4. + let strip = frame([1000, 2], &|_, _| egui::Color32::GREEN); + assert_eq!(fitted(strip.clone(), 4, 16).unwrap().size, [4, 1]); + assert_eq!(fitted(strip, 10_000, 300).unwrap().size, [250, 1]); + let mut short = ColorImage::new([2, 2], vec![egui::Color32::GREEN; 4]); + short.pixels.pop(); + assert!(fitted(Arc::new(short), 16, 16).is_none(), "a frame with fewer pixels than its size is refused"); + assert!(fitted(Arc::new(ColorImage::new([0, 0], vec![])), 16, 16).is_none()); + } + #[test] fn issue_report_capture_rejects_changed_inputs_timeout_and_malformed_images() { let mut app = app(); From 7895c14e3f9000b79d924b1c8bc4ffe3bccf74df Mon Sep 17 00:00:00 2001 From: sascha2101 Date: Tue, 27 Oct 2026 12:29:55 +0000 Subject: [PATCH 002/102] Preferences: the Colour vision preview shows the chosen mode again (#7152) (#7169) * claim: #7152 * Preferences: the Colour vision preview shows the chosen mode again (#7152) Since the preferences redesign the Colour vision section previewed a mode with four status chips (Selected, Warning, Error, Done). No colour vision mode changes those colours, so the chips looked the same in every mode. The section shows the sample of what the modes recolour again (sketch lines, axes, bends, Draft Analysis, a failed feature), drawn in the mode being chosen (Tokens::get_in). The status chips stay as they are. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FN5eEMrqWWXqi65FcK8GXq --------- Co-authored-by: sascha2101 <221609842+sascha2101@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/colour_vision_tests.rs | 33 +++++++++++++++++++++++ crates/ui-egui/src/prefs/interface.rs | 3 +++ crates/ui-egui/src/theme.rs | 10 +++++-- crates/ui-egui/src/ui_kit/preferences.rs | 5 ++-- 4 files changed, 46 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/colour_vision_tests.rs b/crates/ui-egui/src/colour_vision_tests.rs index b1559249a..9b54848c7 100644 --- a/crates/ui-egui/src/colour_vision_tests.rs +++ b/crates/ui-egui/src/colour_vision_tests.rs @@ -965,6 +965,39 @@ fn ui_prefs_sets_each_mode_and_refuses_anything_else() { /// Random values (fixed seed): strings near the four ids and far from them, numbers, nesting. /// `ui.prefs` takes exactly the four ids and refuses the rest without a change; saved /// preferences load every value, unknown ones as Off. Nothing panics. +/// The section previews the mode being chosen (#7152): the sample's lines take that mode's +/// colours. The status chips beside it keep theirs in every mode. +#[test] +fn the_sample_previews_the_mode_being_chosen() { + let mut h = crate::scenario::Harness::new(); + crate::prefs::control(&mut h.app, &json!({"open": "Interface"})).unwrap(); + let lines = |h: &crate::scenario::Harness| { + let mut out = BTreeSet::new(); + for s in &h.shapes { + crate::test_support::each_shape(&s.shape, &mut |shape| { + if let egui::Shape::LineSegment { stroke, .. } = shape { + out.insert(stroke.color.to_array()); + } + }); + } + out + }; + for mode in [ColorVision::Protan, ColorVision::Tritan, ColorVision::Off] { + crate::prefs::control(&mut h.app, &json!({"color_vision": mode.id()})).unwrap(); + h.frames(2); + let (want, off) = (Tokens::get_in(mode), Tokens::get_in(ColorVision::Off)); + let painted = lines(&h); + for (name, c) in [("axis_x", want.axis_x), ("axis_y", want.axis_y), ("sketch_locked", want.sketch_locked)] { + assert!(painted.contains(&c.to_array()), "{mode:?}: the sample draws {name} {c:?}"); + } + if mode != ColorVision::Off { + let changed = [(want.axis_x, off.axis_x), (want.sketch_locked, off.sketch_locked)]; + assert!(changed.iter().any(|(a, b)| a != b), "{mode:?} recolours what the sample shows"); + } + } + crate::prefs::control(&mut h.app, &json!({"button": "cancel"})).unwrap(); +} + #[test] fn random_values_never_panic_and_only_the_four_ids_are_taken() { fn value(next: &mut impl FnMut() -> u64, depth: u32) -> serde_json::Value { diff --git a/crates/ui-egui/src/prefs/interface.rs b/crates/ui-egui/src/prefs/interface.rs index 3f8660ba8..c9665e7f0 100644 --- a/crates/ui-egui/src/prefs/interface.rs +++ b/crates/ui-egui/src/prefs/interface.rs @@ -201,6 +201,9 @@ pub(super) fn interface(app: &mut SolveApp, ui: &mut egui::Ui, t: &Tokens) { } ui_kit::status_palette_sample(ui, app.preferences.color_vision); }); + // What the modes recolour, in the mode being chosen (#7152): the status chips above keep + // their colours in every mode. + ui_kit::colour_vision_sample(ui, &crate::theme::Tokens::get_in(app.preferences.color_vision)); if app.preferences.color_vision != mode { ui.ctx().request_repaint(); } diff --git a/crates/ui-egui/src/theme.rs b/crates/ui-egui/src/theme.rs index c1c859197..71086dba5 100644 --- a/crates/ui-egui/src/theme.rs +++ b/crates/ui-egui/src/theme.rs @@ -840,8 +840,14 @@ impl Tokens { /// The tokens of the current theme and colour vision mode, the colours drawn in the 3D view /// from the view's own dark or light ([`viewport_dark`]). pub fn get() -> Tokens { - let window = Tokens::themed(is_dark(), vision()); - if viewport_dark() == is_dark() { window } else { window.with_viewport(Tokens::themed(viewport_dark(), vision())) } + Tokens::get_in(vision()) + } + + /// [`Tokens::get`] in another colour vision mode: the Colour vision preference previews the + /// mode being chosen before it is applied (#7152). + pub fn get_in(mode: ColorVision) -> Tokens { + let window = Tokens::themed(is_dark(), mode); + if viewport_dark() == is_dark() { window } else { window.with_viewport(Tokens::themed(viewport_dark(), mode)) } } /// The tokens of the 3D view's side (#4146), for a window colour drawn straight onto the view diff --git a/crates/ui-egui/src/ui_kit/preferences.rs b/crates/ui-egui/src/ui_kit/preferences.rs index c42763b7a..7c2799546 100644 --- a/crates/ui-egui/src/ui_kit/preferences.rs +++ b/crates/ui-egui/src/ui_kit/preferences.rs @@ -641,14 +641,13 @@ pub(crate) fn status_palette_sample(ui: &mut Ui, mode: ColorVision) { } /// The names under the Colour vision sample (message ids). -#[cfg(test)] pub(crate) const COLOUR_VISION_SAMPLE: [&str; 6] = ["ui.colour_vision_fixed", "ui.colour_vision_projected", "ui.axes", "Bends", "ui.draft", "ui.colour_vision_failed"]; /// The Colour vision sample (#778): fixed and projected sketch lines, the X and Y axes, bends up /// and down, Draft Analysis and a failed feature, each drawn as it is where it appears, in the -/// colours on now. The six cells share one responsive, clipped area. -#[cfg(test)] +/// colours of `t` (the preference passes the mode being chosen, #7152). The six cells share one +/// responsive, clipped area. pub(crate) fn colour_vision_sample(ui: &mut egui::Ui, t: &Tokens) { let width = (dimension(ui.available_width()) / COLOUR_VISION_SAMPLE.len() as f32).min(t.space_24 * 3.0); let line_width = t.space_4; From 22ede1bde3626394f61cd98c2ee1807faf96ffb7 Mon Sep 17 00:00:00 2001 From: Colin Faulkingham Date: Tue, 27 Oct 2026 12:33:33 +0000 Subject: [PATCH 003/102] Mouse gestures: keep the tool search open while editing (#7121) (#7132) * claim: #7121 * Fix mouse gesture tool-search focus --- crates/ui-egui/src/mouse_gesture.rs | 103 ++++++++++++++++++++++----- crates/ui-egui/src/ui_kit/fields.rs | 13 ++++ crates/ui-egui/src/ui_kit/gallery.rs | 8 +++ 3 files changed, 105 insertions(+), 19 deletions(-) diff --git a/crates/ui-egui/src/mouse_gesture.rs b/crates/ui-egui/src/mouse_gesture.rs index 4fc2b729b..cc2758dfe 100644 --- a/crates/ui-egui/src/mouse_gesture.rs +++ b/crates/ui-egui/src/mouse_gesture.rs @@ -663,26 +663,37 @@ fn editor(app: &mut SolveApp, ctx: &egui::Context) { let shown = label_of(&list[i]).unwrap_or_default(); ui.scope(|ui| { ui.set_max_width(200.0); - crate::ui_kit::dropdown_menu(ui, ("gesture_tool", i), &shown, |ui| { - let filter_id = ui.id().with("filter"); - let mut filter: String = ui.data_mut(|d| d.get_temp(filter_id).unwrap_or_default()); - crate::ui_kit::text_field(ui, &mut filter, crate::i18n::tr_label("Filter…")); - ui.data_mut(|d| d.insert_temp(filter_id, filter.clone())); - let needle = filter.trim().to_lowercase(); - egui::ScrollArea::vertical().max_height(260.0).show(ui, |ui| { - for (id, label) in &catalog { - if !needle.is_empty() && !label.to_lowercase().contains(&needle) && !id.to_lowercase().contains(&needle) { - continue; + let picker = crate::ui_kit::dropdown_menu_with_close_behavior( + ui, + ("gesture_tool", i), + &shown, + egui::PopupCloseBehavior::CloseOnClickOutside, + |ui| { + let filter_id = ui.id().with("filter"); + let mut filter: String = ui.data_mut(|d| d.get_temp(filter_id).unwrap_or_default()); + crate::ui_kit::text_field(ui, &mut filter, crate::i18n::tr_label("Filter…")); + ui.data_mut(|d| d.insert_temp(filter_id, filter.clone())); + let needle = filter.trim().to_lowercase(); + egui::ScrollArea::vertical().max_height(260.0).show(ui, |ui| { + for (id, label) in &catalog { + if !needle.is_empty() + && !label.to_lowercase().contains(&needle) + && !id.to_lowercase().contains(&needle) + { + continue; + } + let taken = list.contains(id) && *id != list[i]; + let r = + ui.add_enabled_ui(!taken, |ui| crate::ui_kit::list_picker(ui, id, label, *id == list[i])).inner; + if r.clicked() { + op = Some(Op::Set(i, id.clone())); + ui.close(); + } } - let taken = list.contains(id) && *id != list[i]; - let r = ui.add_enabled_ui(!taken, |ui| crate::ui_kit::list_picker(ui, id, label, *id == list[i])).inner; - if r.clicked() { - op = Some(Op::Set(i, id.clone())); - ui.close(); - } - } - }); - }); + }); + }, + ); + crate::scenario::publish_target(&format!("gestures:tool:{i}"), picker.rect); }); if crate::ui_kit::button(ui, "↑", crate::ui_kit::Button::Enabled(i > 0)).clicked() { op = Some(Op::Up(i)); @@ -982,6 +993,60 @@ mod tests { } } + #[test] + fn tool_search_keeps_focus_after_click_and_closes_only_when_finished() { + use crate::scenario::{Harness, handle_at}; + use crate::test_support::{click, pointer}; + use serde_json::json; + + let mut h = Harness::new(); + h.app.home.open = false; + h.app.preferences.mouse_gestures.set_tools(Studio::Part, vec!["undo".into(), "solid.extrude".into()]); + h.app.gesture.editor.open = true; + h.app.gesture.editor.studio = Studio::Part; + h.frames(6); + click(&mut h, "gestures:tool:0"); + let search = h + .shapes + .iter() + .find_map(|shape| match &shape.shape { + egui::Shape::Text(text) if text.galley.job.text == "Filter…" => Some(text.pos + text.galley.size() * 0.5), + _ => None, + }) + .expect("the picker displays its search field"); + h.frame_with(pointer(search, true)); + h.frame_with(pointer(search, false)); + h.frames(2); + assert!(egui::Popup::is_any_open(&h.ctx), "releasing a click in the search field must keep the picker open"); + + h.step(&json!({"text":"solid.extrude"})).unwrap(); + h.frames(2); + assert!(handle_at("dialog:list:solid.extrude").is_some(), "search matches command ids"); + assert!(handle_at("dialog:list:solid.box").is_none(), "unmatched tools are filtered out"); + click(&mut h, "dialog:list:solid.extrude"); + assert!(egui::Popup::is_any_open(&h.ctx), "a tool already in another slot is disabled"); + assert_eq!(h.app.preferences.mouse_gestures.tools(Studio::Part), ["undo", "solid.extrude"]); + + h.frame_with(pointer(search, true)); + h.frame_with(pointer(search, false)); + h.step(&json!({"key":"A","cmd":true})).unwrap(); + h.step(&json!({"text":"Box"})).unwrap(); + h.frames(2); + click(&mut h, "dialog:list:solid.box"); + assert!(!egui::Popup::is_any_open(&h.ctx), "choosing a tool closes the picker"); + assert_eq!(h.app.preferences.mouse_gestures.tools(Studio::Part), ["solid.box", "solid.extrude"]); + + click(&mut h, "gestures:tool:0"); + h.step(&json!({"key":"Escape"})).unwrap(); + h.frames(2); + assert!(!egui::Popup::is_any_open(&h.ctx), "Escape dismisses the picker"); + click(&mut h, "gestures:tool:0"); + h.frame_with(pointer(egui::pos2(20.0, 400.0), true)); + h.frame_with(pointer(egui::pos2(20.0, 400.0), false)); + h.frames(2); + assert!(!egui::Popup::is_any_open(&h.ctx), "clicking outside dismisses the picker"); + } + #[test] fn the_editor_changes_how_many_tools_and_where_they_sit() { let mut list: Vec = ["solid.extrude", "undo", "solid.hole"].iter().map(|s| s.to_string()).collect(); diff --git a/crates/ui-egui/src/ui_kit/fields.rs b/crates/ui-egui/src/ui_kit/fields.rs index 286e225b8..515ce5b03 100644 --- a/crates/ui-egui/src/ui_kit/fields.rs +++ b/crates/ui-egui/src/ui_kit/fields.rs @@ -278,11 +278,24 @@ pub(crate) fn dropdown(ui: &mut Ui, id: &str, selected: &mut usize, options: &[& /// Dropdown with caller-supplied kit choices/actions, including disabled entries and stable /// application handles. Tokens: dropdown tokens. Use `dropdown` for a simple indexed list. pub(crate) fn dropdown_menu(ui: &mut Ui, id: impl egui::AsIdSalt, current: &str, add: impl FnOnce(&mut Ui)) -> Response { + dropdown_menu_with_close_behavior(ui, id, current, egui::PopupCloseBehavior::CloseOnClick, add) +} + +/// Dropdown with explicit dismissal behavior. For editable content use `CloseOnClickOutside` +/// and close the popup when a choice is accepted. +pub(crate) fn dropdown_menu_with_close_behavior( + ui: &mut Ui, + id: impl egui::AsIdSalt, + current: &str, + close_behavior: egui::PopupCloseBehavior, + add: impl FnOnce(&mut Ui), +) -> Response { let response = egui::ComboBox::from_id_salt(id) .width(dimension(ui.available_width())) .height(Tokens::get().space_24 * 14.0) .selected_text(current) .icon(dropdown_arrow) + .close_behavior(close_behavior) .show_ui(ui, add) .response; publish(ui, &response, egui::WidgetType::ComboBox); diff --git a/crates/ui-egui/src/ui_kit/gallery.rs b/crates/ui-egui/src/ui_kit/gallery.rs index 4c9d9e1e7..12ba53451 100644 --- a/crates/ui-egui/src/ui_kit/gallery.rs +++ b/crates/ui-egui/src/ui_kit/gallery.rs @@ -682,6 +682,14 @@ const ELEMENTS: &[Element] = &[ list_picker(ui, "preset", "Preset", true); }); }), + element!("dropdown_menu_with_close_behavior", |ui, s| { + dropdown_menu_with_close_behavior(ui, "gallery_editable_menu", "Preset", egui::PopupCloseBehavior::CloseOnClickOutside, |ui| { + text_field(ui, &mut s.value, "Filter…"); + if list_picker(ui, "preset", "Preset", true).clicked() { + ui.close(); + } + }); + }), element!("message_field", |ui, s| { message_field(ui, ui.id().with("message"), &mut s.value, "Message"); }), From 17339cf65cefc0a4981daa272e61bf76a14f5a3b Mon Sep 17 00:00:00 2001 From: Kai Evans Date: Tue, 27 Oct 2026 12:35:32 +0000 Subject: [PATCH 004/102] Redefine: the features after the edited one are computed once (#7076) timeline.redefine evaluated every later feature in its trial session, then again in the session: the evaluation cache keeps only the last few states of a design with large bodies, so the trial's results were gone by then. The trial keeps them in the session's kept results (or its own), and the session's evaluation takes them from there. EvalCache::with_budget gives tests a small cache. --- crates/doc/src/eval.rs | 6 ++++++ crates/doc/src/lib.rs | 2 +- crates/engine/src/cmd/edit.rs | 7 +++++++ crates/engine/src/cmd/edit_tests.rs | 18 ++++++++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/crates/doc/src/eval.rs b/crates/doc/src/eval.rs index 988876a11..5b410c68f 100644 --- a/crates/doc/src/eval.rs +++ b/crates/doc/src/eval.rs @@ -1047,6 +1047,12 @@ const CACHE_ENTRIES: usize = 4096; const CACHE_BYTES: usize = 64 << 20; impl EvalCache { + /// A cache that keeps `bytes` of results (always at least the last one): a small budget + /// stands in for a design whose states are large. + pub fn with_budget(bytes: usize) -> Self { + EvalCache { budget: bytes, ..EvalCache::default() } + } + fn get(&mut self, key: u64) -> Option { let r = self.map.get(&key).cloned(); if r.is_some() { diff --git a/crates/doc/src/lib.rs b/crates/doc/src/lib.rs index ac4fefdc0..327918ef2 100644 --- a/crates/doc/src/lib.rs +++ b/crates/doc/src/lib.rs @@ -73,7 +73,6 @@ pub use assembly::{ mat_mul, rigid, }; pub use document::*; -pub use eval::KeptResults; pub use eval::{ EdgeRef, FeatureResult, Model, ModelBody, ModelState, PlacedBodies, RevolveExtent, SavedModel, SolvedSketch, ThreadInfo, curve_pick_error, edge_names_for, edge_refs, face_point_names, face_point_state, hole_direction_at, import_body_names, map_wire, metric_thread_sizes, @@ -81,6 +80,7 @@ pub use eval::{ sketch_line_plane, state_in_frame, state_in_frame_at, suggested_thread, tangent_face_chain, through_all_distance, world_state, world_state_reusing, }; +pub use eval::{EvalCache, KeptResults}; pub use expr::Expr; pub use names::{BodyName, FeatureId, FeatureName, SketchId, copy_name}; pub use params::{ParamRow, ParamUser, cycles}; diff --git a/crates/engine/src/cmd/edit.rs b/crates/engine/src/cmd/edit.rs index 2a6e00e98..9c677d192 100644 --- a/crates/engine/src/cmd/edit.rs +++ b/crates/engine/src/cmd/edit.rs @@ -1440,6 +1440,11 @@ fn redefine(s: &mut Session, p: &Value) -> Result { // Run the constructor on a scratch session: failed edits must not disturb sketch mode, // selections, component authoring state or the original feature's definition. let mut trial = s.scratch(); + // What the trial computes is kept for the session's own evaluation at the end: the cache may + // hold only the last few states of a large design, which would be computed twice. + let kept = s.model.kept(); + let shared = kept.clone().unwrap_or_default(); + trial.model.keep(Some(shared.clone())); trial.active_component = old.component; if let FeatureKind::Emboss { face: Some(face), .. } = &old.kind { trial.active_occurrence_path = (!face.author_path.is_empty()).then(|| face.author_path.clone()); @@ -1549,7 +1554,9 @@ fn redefine(s: &mut Session, p: &Value) -> Result { } s.pending_moves = trial.pending_moves; s.doc = trial.doc; + s.model.keep(Some(shared)); s.refresh(); + s.model.keep(kept); if let Some(e) = s.model.result(id).and_then(|r| r.error.clone()) { return Err(EngineError::Other(e)); } diff --git a/crates/engine/src/cmd/edit_tests.rs b/crates/engine/src/cmd/edit_tests.rs index 01d8317eb..ad75da637 100644 --- a/crates/engine/src/cmd/edit_tests.rs +++ b/crates/engine/src/cmd/edit_tests.rs @@ -144,6 +144,24 @@ fn redefining_a_blend_replaces_persistent_edge_selection_and_survives_resize() { assert!(s.model.result(old.id).unwrap().warning.is_none()); } +/// A redefine computes the features after the edited one once: its trial's results are kept +/// for the session's own evaluation, though the cache holds only the last state (a large +/// design's). +#[test] +fn redefining_computes_the_later_features_once() { + let mut s = Session::default(); + run(&mut s, "solid.box", json!({"length": 20, "width": 10, "height": 5, "name": "Base"})); + for x in [30, 40, 50] { + run(&mut s, "solid.box", json!({"length": 5, "width": 5, "height": 5, "corner": [x, 0, 0]})); + } + *s.model.cache.lock().unwrap() = solidcraft_doc::EvalCache::with_budget(1); + let reply = + run(&mut s, "timeline.redefine", json!({"feature": "Base", "command": "solid.box", "params": {"length": 25, "width": 10, "height": 5}})); + assert_eq!(reply["recomputed"], 0, "{reply}"); + let volume = run(&mut s, "inspect.measure", json!({}))["total"]["volume_mm3"].as_f64().unwrap(); + assert!((volume - (25.0 * 10.0 * 5.0 + 3.0 * 125.0)).abs() < 1e-6, "{volume}"); +} + #[test] fn redefining_preserves_body_names_participants_and_marker_without_temporary_features() { let mut s = Session::default(); From e0809b427ca41eb83807e2da52be46b5c88bb59f Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:36:25 +0000 Subject: [PATCH 005/102] =?UTF-8?q?Web=20app:=20Import=E2=80=A6=20reads=20?= =?UTF-8?q?shortcuts=20and=20theme=20files=20through=20vfs=20(#7643)=20(#7?= =?UTF-8?q?644)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * claim: #7643 * Web app: Import… reads shortcuts and theme files through vfs (#7643) Import… on the Keyboard Shortcuts page and the theme strip's Import… tile read the picked file with std::fs::read_to_string. In the browser a picked file is kept in vfs's in-memory files under /upload/, and std::fs on wasm32 is unsupported, so every import failed. Both now read through vfs::read_to_string, capped (a theme file at theme_files::MAX_BYTES, a shortcuts file at the new toolbar_custom::MAX_IMPORT_BYTES), like the other imports. Natively it is the same file on the disk. The new tests import a file outside a vfs folder scope (refused, nothing imported) and inside it (imported). With std::fs both fail: the file outside the scope is imported. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/keymap.rs | 39 +++++++++++++++++++++++++- crates/ui-egui/src/prefs.rs | 42 +++++++++++++++++++++++++++- crates/ui-egui/src/theme_files.rs | 2 +- crates/ui-egui/src/toolbar_custom.rs | 3 ++ 4 files changed, 83 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/keymap.rs b/crates/ui-egui/src/keymap.rs index 2e1bb4258..e35336a25 100644 --- a/crates/ui-egui/src/keymap.rs +++ b/crates/ui-egui/src/keymap.rs @@ -651,7 +651,8 @@ pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) { Some((_, "import")) => { app.pick_open(|app, path| { let Some(path) = path else { return }; - let r = std::fs::read_to_string(&path) + // Through `vfs`, like every other import: in the web app a picked file is there. + let r = solidcraft_engine::io::vfs::read_to_string(&path, crate::toolbar_custom::MAX_IMPORT_BYTES) .map_err(|e| e.to_string()) .and_then(|t| serde_json::from_str::(&t).map_err(|e| e.to_string())) .and_then(|v| crate::toolbar_custom::import(app, &v)); @@ -1161,4 +1162,40 @@ mod card_tests { } assert_eq!(effective(&h.app, "solid.extrude").as_deref(), Some("E")); } + + /// Import… reads the shortcuts file through `vfs`, like the other imports: in the web app a + /// picked file is kept there, where `std::fs` can't read it (#7643). On the disk it is the same + /// file; a folder scope active while it is read refuses a path outside it, which shows the + /// read goes through `vfs`. + #[test] + fn shortcut_import_reads_through_vfs() { + use solidcraft_engine::io::vfs; + let mut h = Harness::new(); + h.app.home.open = false; + bind(&mut h.app, "solid.extrude", "Shift+E", true).unwrap(); + let text = crate::toolbar_custom::export(&h.app).to_string(); + reset(&mut h.app, None); + h.call("ui.prefs", json!({"open":"Keyboard Shortcuts"})); + h.frames(2); + let (root, out) = (h.dir.join("root"), h.dir.join("out")); + std::fs::create_dir_all(&root).unwrap(); + std::fs::create_dir_all(&out).unwrap(); + for (path, inside) in [(out.join("keys.json"), false), (root.join("keys.json"), true)] { + std::fs::write(&path, &text).unwrap(); + let answer = path.to_string_lossy().to_string(); + h.app.services.pick_open = Some(Box::new(move |_| Box::pin(std::future::ready(Some(answer.clone()))))); + vfs::scoped(Some(vfs::PathScope::new([root.clone()])), || { + h.step(&json!({"widget":"Import…"})).unwrap(); + h.frames(4); + }); + let message = h.app.keymap.message.clone(); + if inside { + assert_eq!(message, None); + assert_eq!(effective(&h.app, "solid.extrude").as_deref(), Some("Shift+E")); + } else { + assert!(message.as_deref().is_some_and(|m| m.contains("outside the folders this agent may use")), "{message:?}"); + assert_eq!(effective(&h.app, "solid.extrude").as_deref(), Some("E"), "nothing imported"); + } + } + } } diff --git a/crates/ui-egui/src/prefs.rs b/crates/ui-egui/src/prefs.rs index db332f59b..003f00a52 100644 --- a/crates/ui-egui/src/prefs.rs +++ b/crates/ui-egui/src/prefs.rs @@ -992,7 +992,10 @@ fn theme_row(app: &mut SolveApp, ui: &mut egui::Ui) { match action { Some("import") => app.pick_open_for(&["json"], |app, path| { let Some(path) = path else { return }; - let r = std::fs::read_to_string(&path).map_err(|e| e.to_string()).and_then(|text| import_theme(app, &serde_json::Value::String(text))); + // Through `vfs`, like every other import: in the web app a picked file is there. + let r = solidcraft_engine::io::vfs::read_to_string(&path, crate::theme_files::MAX_BYTES) + .map_err(|e| e.to_string()) + .and_then(|text| import_theme(app, &serde_json::Value::String(text))); match r { Ok(id) => { let name = crate::theme_files::find(&id, &app.preferences.custom_themes).map(|t| t.name.clone()).unwrap_or(id); @@ -3589,6 +3592,43 @@ mod tests { assert_eq!(read, crate::theme::ViewportTheme::Theme); } + /// The theme strip's Import… reads the theme file through `vfs`, like the other imports: in the + /// web app a picked file is kept there, where `std::fs` can't read it (#7643). On the disk it + /// is the same file; a folder scope active while it is read refuses a path outside it, which + /// shows the read goes through `vfs`. + #[test] + fn theme_import_reads_through_vfs() { + use serde_json::json; + use solidcraft_engine::io::vfs; + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.call("ui.prefs", json!({"theme": "dark", "open": "Interface"})); + h.frames(2); + super::reveal_preference(&mut h, "dialog:Import…"); + let (root, out) = (h.dir.join("root"), h.dir.join("out")); + std::fs::create_dir_all(&root).unwrap(); + std::fs::create_dir_all(&out).unwrap(); + let file = json!({"format": "solidcraft-theme/1", "name": "Paper", "base": "light", "colors": {"panel": "#fffdf0"}}); + for (path, inside) in [(out.join("Paper.json"), false), (root.join("Paper.json"), true)] { + std::fs::write(&path, file.to_string()).unwrap(); + let answer = path.to_string_lossy().to_string(); + h.app.services.pick_open = Some(Box::new(move |_| Box::pin(std::future::ready(Some(answer.clone()))))); + h.app.status = None; + vfs::scoped(Some(vfs::PathScope::new([root.clone()])), || { + h.step(&json!({"click":{"handle":"dialog:Import…"}})).unwrap(); + h.frames(4); + }); + let status = h.app.status.clone().map(|(text, ..)| text); + if inside { + assert_eq!(status.as_deref(), Some("Theme imported: Paper")); + assert_eq!(h.app.preferences.theme, "paper"); + } else { + assert!(status.as_deref().is_some_and(|s| s.contains("outside the folders this agent may use")), "{status:?}"); + assert!(h.app.preferences.custom_themes.is_empty(), "nothing imported"); + } + } + } + #[test] fn theme_files_import_apply_export_save_and_remove() { use crate::theme::{ColorVision, Tokens}; diff --git a/crates/ui-egui/src/theme_files.rs b/crates/ui-egui/src/theme_files.rs index 4d4b7487d..1b064af94 100644 --- a/crates/ui-egui/src/theme_files.rs +++ b/crates/ui-egui/src/theme_files.rs @@ -21,7 +21,7 @@ use crate::theme::{IconColors, Tokens}; /// The `format` tag of a theme file. pub const FORMAT: &str = "solidcraft-theme/1"; /// Hostile-input caps: file size, colours per file, name length, imported themes kept. -const MAX_BYTES: usize = 256 * 1024; +pub const MAX_BYTES: usize = 256 * 1024; pub const MAX_COLORS: usize = 512; const MAX_NAME: usize = 80; pub const MAX_CUSTOM: usize = 64; diff --git a/crates/ui-egui/src/toolbar_custom.rs b/crates/ui-egui/src/toolbar_custom.rs index 7638cd3df..4cffd9bca 100644 --- a/crates/ui-egui/src/toolbar_custom.rs +++ b/crates/ui-egui/src/toolbar_custom.rs @@ -302,6 +302,9 @@ pub fn export(app: &SolveApp) -> Value { json!({ "format": "solidcraft-shortcuts/1", "shortcuts": app.keymap.prefs(), "favourites": app.sbox.pinned, "toolbar": app.toolbar_custom.prefs() }) } +/// The largest shortcuts file Import… reads (hostile input; an export is a few tens of KiB). +pub const MAX_IMPORT_BYTES: usize = 1 << 20; + pub fn import(app: &mut SolveApp, v: &Value) -> Result<(), String> { // "solvecraft-shortcuts/1": files exported before the rename (compatibility shim). if !matches!(v.get("format").and_then(Value::as_str), Some("solidcraft-shortcuts/1" | "solvecraft-shortcuts/1")) { From 98762fd20be4ad7f8cbd0de1ee28c36fe391961c Mon Sep 17 00:00:00 2001 From: Lars Jansen Date: Tue, 27 Oct 2026 12:36:46 +0000 Subject: [PATCH 006/102] i18n test: compare pending right-to-left messages in display order (#7527) (#7532) * claim: #7527 * fix(i18n): compare pending right-to-left messages in display order (#7527) From e8302b575757cfc5d9136e8a5b6199f503739145 Mon Sep 17 00:00:00 2001 From: Colin Faulkingham Date: Tue, 27 Oct 2026 12:36:55 +0000 Subject: [PATCH 007/102] Sketch: delete dimensions from the right-click menu (#7155) (#7170) * claim: #7155 * fix(ui): delete sketch dimensions from the context menu --- crates/ui-egui/src/context_menu.rs | 10 +++- crates/ui-egui/src/menu_tests.rs | 82 ++++++++++++++++++++++++++++++ crates/ui-egui/src/viewport.rs | 29 ++++++----- 3 files changed, 106 insertions(+), 15 deletions(-) diff --git a/crates/ui-egui/src/context_menu.rs b/crates/ui-egui/src/context_menu.rs index bbe2c82e9..96118ef69 100644 --- a/crates/ui-egui/src/context_menu.rs +++ b/crates/ui-egui/src/context_menu.rs @@ -995,6 +995,9 @@ fn sketch_entity_items(app: &SolveApp) -> Vec { if curves.is_empty() && points.is_empty() { if dims.len() == 1 { v.push(cmd(app, "sketch.toggle_driven", "Toggle Driven Dimension").with(json!({ "constraint": dims[0] }))); + } + if app.session.selection.iter().any(|s| matches!(s, Sel::SketchConstraint { .. })) { + v.push(act("ui.delete", "Delete", "delete").key("Del")); v.push(Item::sep()); } if crate::sketch_text::selected_entity(app).is_some() { @@ -1716,7 +1719,12 @@ pub fn open(app: &mut SolveApp, at: Pos2, held: crate::tool_modifiers::Held) { _ => None, }); crate::select_other::close(app); - if app.session.active_sketch.is_none() + if let Some(sel) = crate::viewport::sketch_constraint_at(app, at, app.viewport.hover.as_ref()) { + if !in_selection(app, &sel) { + let _ = app.run("select.set", json!({ "items": [sel] })); + app.menu.picked = Some((at, before, app.session.selection.clone())); + } + } else if app.session.active_sketch.is_none() && let Some(h) = app.viewport.hover.clone() && let Some((_, sel)) = crate::viewport::candidate(app, &[h]) && !in_selection(app, &sel) diff --git a/crates/ui-egui/src/menu_tests.rs b/crates/ui-egui/src/menu_tests.rs index 3d84c601d..f9eb3323b 100644 --- a/crates/ui-egui/src/menu_tests.rs +++ b/crates/ui-egui/src/menu_tests.rs @@ -347,6 +347,88 @@ fn sketch_entities_offer_the_constraints_that_fit() { assert!(ss.sketch.constraints.iter().any(|c| format!("{:?}", c.kind).contains("Parallel")), "{:?}", ss.sketch.constraints); } +#[test] +fn sketch_dimension_menu_deletes_only_the_dimension_and_supports_undo() { + for (driven, preselected) in [(false, false), (false, true), (true, false), (true, true)] { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); + let line = h.app.run("sketch.line", json!({"points":[[0,0],[30,0]],"connect":false,"infer":false})).unwrap()["curves"][0] + .as_str() + .unwrap() + .to_owned(); + let horizontal = h.app.run("sketch.constrainer", json!({"entities":[line]})).unwrap()["constraint"].as_str().unwrap().to_owned(); + let dimension = h.app.run("sketch.dimension", json!({"entities":[line],"value":30})).unwrap(); + let id = dimension["created"]["dimensions"][0].as_str().unwrap(); + if driven { + h.app.run("sketch.toggle_driven", json!({"constraint":id})).unwrap(); + } + let saved = h.app.session.doc.to_json(); + let undo = h.app.session.undo.len(); + h.call("ui.view", json!({"view":"top"})); + h.call("ui.view", json!({"view":"fit"})); + if preselected { + h.step(&json!({"click":{"dimension":id}})).unwrap(); + } + h.step(&json!({"click":{"dimension":id},"button":"right"})).unwrap(); + assert_eq!(h.app.session.selection, vec![solidcraft_engine::Sel::SketchConstraint { id: id.to_owned() }]); + let menu = h.call("ui.menu", json!({})); + assert!(menu["result"]["items"].as_array().unwrap().iter().any(|i| i["id"] == "ui.delete" && i["enabled"] == true), "{menu}"); + assert_eq!(h.call("ui.menuPick", json!({"item":"ui.delete"}))["ok"], true); + let after = h.app.run("sketch.inspect", json!({})).unwrap(); + assert_eq!(after["curves"].as_array().unwrap().len(), 1); + assert_eq!(after["curves"][0]["id"], line); + assert_eq!(after["constraints"].as_array().unwrap().len(), 1); + assert_eq!(after["constraints"][0]["id"], horizontal); + assert_eq!(h.app.session.undo.len(), undo + 1); + h.app.run("edit.undo", json!({})).unwrap(); + assert_eq!(h.app.session.doc.to_json(), saved); + h.app.run("edit.redo", json!({})).unwrap(); + assert_eq!(h.app.run("sketch.inspect", json!({})).unwrap(), after); + } +} + +#[test] +fn sketch_constraint_menu_keeps_the_selection_and_respects_pick_filters() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); + let line = + h.app.run("sketch.line", json!({"points":[[0,0],[30,0]],"connect":false,"infer":false})).unwrap()["curves"][0].as_str().unwrap().to_owned(); + let horizontal = h.app.run("sketch.constrainer", json!({"entities":[line]})).unwrap()["constraint"].as_str().unwrap().to_owned(); + let dimension = h.app.run("sketch.dimension", json!({"entities":[line],"value":30})).unwrap(); + let id = dimension["created"]["dimensions"][0].as_str().unwrap(); + h.call("ui.view", json!({"view":"top"})); + h.call("ui.view", json!({"view":"fit"})); + + // An empty selection, including a dimension whose picking is disabled, has no Delete. + assert!(!context_menu::items(&h.app, &Target::Viewport).iter().any(|i| i.id == "ui.delete")); + h.app.ui.pick_off.push("dimensions".into()); + h.step(&json!({"click":{"dimension":id},"button":"right"})).unwrap(); + assert!(h.app.session.selection.is_empty()); + assert!(!context_menu::items(&h.app, &Target::Viewport).iter().any(|i| i.id == "ui.delete")); + h.call("ui.menu", json!({"close":true})); + h.app.ui.pick_off.clear(); + + // A non-dimensional constraint can be deleted too. Right-clicking a dimension already + // in a multi-selection retains all the selected constraints for the same Delete action. + for ids in [vec![horizontal.clone()], vec![horizontal.clone(), id.to_owned()]] { + let selection: Vec<_> = ids.iter().map(|id| solidcraft_engine::Sel::SketchConstraint { id: id.clone() }).collect(); + h.app.session.selection = selection.clone(); + if ids.len() > 1 { + h.step(&json!({"click":{"dimension":id},"button":"right"})).unwrap(); + assert_eq!(h.app.session.selection, selection); + } + let item = find(&context_menu::items(&h.app, &Target::Viewport), "Delete"); + assert!(item.enabled); + context_menu::run_item(&mut h.app, &item, pos2(0.0, 0.0)); + let after = h.app.run("sketch.inspect", json!({})).unwrap(); + assert_eq!(after["curves"].as_array().unwrap().len(), 1); + assert_eq!(after["constraints"].as_array().unwrap().len(), 2 - ids.len()); + h.app.run("edit.undo", json!({})).unwrap(); + } +} + #[test] fn component_menu_activates_grounds_and_pastes() { let mut app = sample_app(); diff --git a/crates/ui-egui/src/viewport.rs b/crates/ui-egui/src/viewport.rs index 3ce8c1fa9..41488a2e7 100644 --- a/crates/ui-egui/src/viewport.rs +++ b/crates/ui-egui/src/viewport.rs @@ -2683,6 +2683,18 @@ fn tool_hover(app: &SolveApp, hits: &[Hit]) -> Option { hits.iter().find(|h| crate::sketch_tools::takes(cmd, h)).cloned() } +/// A sketch annotation under either a left-click or a context-menu click. Dimension text +/// wins over geometry; dimension lines yield to points and curves, and glyphs to midpoints. +pub(crate) fn sketch_constraint_at(app: &SolveApp, pos: Pos2, hit: Option<&Hit>) -> Option { + app.session.active_sketch?; + let off = |kind: &str| app.ui.pick_off.iter().any(|x| x == kind); + let on_geometry = matches!(hit, Some(Hit::SketchPoint { .. } | Hit::SketchMidpoint { .. } | Hit::SketchCurve { .. })); + let dimension = + crate::dim_view::hit_text(pos).or_else(|| if on_geometry { None } else { crate::dim_view::hit(pos) }).filter(|_| !off("dimensions")); + let glyph = crate::sketch_tools::glyph_at(pos).filter(|_| !off("constraints") && !matches!(hit, Some(Hit::SketchMidpoint { .. }))); + dimension.or(glyph).map(|id| Sel::SketchConstraint { id }) +} + /// What a click would pick: the first hit the open dialog's active input accepts, or with no /// dialog the first hit (sketch entities only belong to the active sketch). pub fn candidate(app: &SolveApp, hits: &[Hit]) -> Option<(Hit, Sel)> { @@ -4018,23 +4030,12 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) { app.dialog = Some(dialog); } } else { - // Dimensions and constraint glyphs sit on top of the geometry. - let off = |k: &str| app.ui.pick_off.iter().any(|x| x == k); - let sketching = app.session.active_sketch.is_some(); - // A dimension's text wins; its lines only where no sketch point or curve is (a - // diameter's line runs through the centre point). - let on_geometry = - matches!(cand.as_ref().map(|c| &c.0), Some(Hit::SketchPoint { .. } | Hit::SketchMidpoint { .. } | Hit::SketchCurve { .. })); - let on_dim = crate::dim_view::hit_text(p) - .or_else(|| if on_geometry { None } else { crate::dim_view::hit(p) }) - .filter(|_| sketching && !off("dimensions")); - let on_midpoint = matches!(cand.as_ref().map(|c| &c.0), Some(Hit::SketchMidpoint { .. })); - let on_glyph = crate::sketch_tools::glyph_at(p).filter(|_| sketching && !off("constraints") && !on_midpoint); + let annotation = sketch_constraint_at(app, p, cand.as_ref().map(|c| &c.0)); if crate::sketch_text_handles::over(app, &proj, p) { // A text's resize or rotation handle: the text stays selected. } else if !crate::sketch3d::click(app, &proj, p) { - match on_dim.or(on_glyph) { - Some(id) => select(app, Some(Sel::SketchConstraint { id }), add, allow_toggle), + match annotation { + Some(sel) => select(app, Some(sel), add, allow_toggle), // Clicking again on the same spot selects the next thing under it (not // the second click of a double-click, which has its own actions). None if !add && !resp.double_clicked() && crate::select_other::cycle_click(app, &proj, p) => {} From f82e517bcbd5926505835989f774f29c2aa481cf Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:36:57 +0000 Subject: [PATCH 008/102] Toolbar: a panel with no buttons keeps one that opens its menu (#7166) (#7503) * claim: #7166 * Toolbar: a panel with no buttons keeps one that opens its menu (#7166) Removing New Sketch from the Model tab (Remove from Toolbar, or a drag off the toolbar) left the Sketch panel empty above its label, so Sketch seemed to be missing from the toolbar. A panel whose buttons are all gone is now drawn like a collapsed panel: its first command's icon over a caret, which opens the panel's drop-down, in the same room. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/toolbar.rs | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/toolbar.rs b/crates/ui-egui/src/toolbar.rs index b33959a88..c6cf08a46 100644 --- a/crates/ui-egui/src/toolbar.rs +++ b/crates/ui-egui/src/toolbar.rs @@ -1227,7 +1227,10 @@ pub fn toolbar(app: &mut SolveApp, ui: &mut egui::Ui) { overflow.push((*panel, menu_commands(&cmds, &shown))); continue; } - let collapsed = plan.fit == Fit::Collapsed; + // A panel left with no buttons (all removed from the toolbar, or saved buttons that no + // longer exist) is drawn collapsed too: one button that opens its drop-down, so its + // commands never vanish from the toolbar (#7166). Both are COLLAPSED_WIDTH wide. + let collapsed = plan.fit == Fit::Collapsed || (shown.is_empty() && !cmds.is_empty()); let trimmed = plan.shown < plan.widths.len(); let finish = tab == "SKETCH" && *panel == "FINISH SKETCH"; let pinned = finish || (tab == "RENDER" && *panel == "IMAGE"); @@ -3489,6 +3492,29 @@ mod fill_width_tests { } } } + + /// #7166: a panel whose buttons were all removed keeps one button, its first command's icon, + /// which opens the panel's drop-down: New Sketch stays reachable from the Model tab instead of + /// leaving an empty Sketch panel. It takes the room an empty panel took before. + #[test] + fn a_panel_without_buttons_keeps_one_that_opens_its_menu() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.call("ui.resize", json!({"width":1600,"height":900})); + crate::toolbar_custom::remove(&mut h.app, "MODEL", "sketch.create"); + assert!(crate::toolbar_custom::pinned_on(&h.app, "MODEL", "sketch.create").is_none()); + h.frames(3); + assert!(crate::scenario::handle_at("button:sketch.create").is_none(), "New Sketch is no longer a full button"); + let panel = crate::scenario::rect_of("panel:MODEL:SKETCH").unwrap(); + assert_eq!(panel.width(), COLLAPSED_WIDTH, "the panel takes a collapsed panel's room"); + let button = crate::scenario::handle_at("collapsed:MODEL:SKETCH").expect("the Sketch panel keeps a button"); + assert!(panel.contains(button)); + h.step(&json!({"click":[button.x, button.y]})).unwrap(); + h.frames(2); + assert!(crate::scenario::rect_of("toolbar_dropdown").is_some(), "the button opens the panel's drop-down"); + h.step(&json!({"click":{"handle":"dropdown:sketch.create"}})).unwrap(); + assert!(matches!(h.app.dialog.as_ref().map(|d| &d.kind), Some(crate::dialogs::Kind::Sketch)), "New Sketch starts from it"); + } } #[cfg(test)] From 329ef29f248847c5f881b2d8c35a2b94c555f5e5 Mon Sep 17 00:00:00 2001 From: Kai Evans Date: Tue, 27 Oct 2026 12:37:08 +0000 Subject: [PATCH 009/102] Value fields on the canvas grow with an expression typed into them (#7470) The value box beside a command's geometry and the placement fields kept a number's width, so a formula or parameter names scrolled out of sight while typing. They keep that width for a number and grow with the text, up to three times it. --- crates/ui-egui/src/ui_kit/fields.rs | 17 ++++++++++-- crates/ui-egui/src/ui_kit/fields_tests.rs | 34 +++++++++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/ui_kit/fields.rs b/crates/ui-egui/src/ui_kit/fields.rs index 515ce5b03..78aff2153 100644 --- a/crates/ui-egui/src/ui_kit/fields.rs +++ b/crates/ui-egui/src/ui_kit/fields.rs @@ -654,7 +654,9 @@ fn length_drag<'a>(value: &'a mut f64, units: &str, decimals: u8) -> egui::DragV /// keyboard to the next widget. pub(crate) fn canvas_value_field(ui: &mut Ui, id: egui::Id, value: &mut String, keep_tab: bool) -> Response { let t = Tokens::get(); - let mut edit = egui::TextEdit::singleline(value).id(id).desired_width(t.space_24 * 3.0).background_color(t.input_fill()); + let width = grown_width(ui, value, &egui::TextStyle::Body.resolve(ui.style()), t.space_24 * 3.0); + // At least that wide: in an area the space left is last frame's width, which can't grow. + let mut edit = egui::TextEdit::singleline(value).id(id).desired_width(width).min_size(vec2(width, 0.0)).background_color(t.input_fill()); if keep_tab { edit = edit.event_filter(egui::EventFilter { tab: true, horizontal_arrows: true, ..Default::default() }); } @@ -665,6 +667,14 @@ pub(crate) fn canvas_value_field(ui: &mut Ui, id: egui::Id, value: &mut String, response } +/// How wide a value field on the canvas is: `base` for a number, as wide as an expression typed +/// into it (parameter names, a formula), up to three times `base`. +fn grown_width(ui: &Ui, value: &str, font: &egui::FontId, base: f32) -> f32 { + let text = ui.fonts_mut(|fonts| fonts.layout_no_wrap(value.to_owned(), font.clone(), egui::Color32::PLACEHOLDER).size().x); + // Room for the cursor after the last character. + (text + Tokens::get().space_6).clamp(base, base * 3.0) +} + /// Placement editor whose owner routes Enter and Tab (including rejected expressions). /// Completion remains with the caller. Tokens: cell_editor tokens. pub(crate) fn placement_field(ui: &mut Ui, id: egui::Id, value: &mut String, hint: &str) -> Response { @@ -673,11 +683,12 @@ pub(crate) fn placement_field(ui: &mut Ui, id: egui::Id, value: &mut String, hin // Canvas editors must retain their native hit target: enlarging it intercepts nearby // sketch picks. Keep the former line + space_2 above/below, with shared galley alignment. let height = ui.fonts_mut(|fonts| fonts.row_height(&font)) + ui.spacing().extra_text_line_spacing + t.space_4; + let width = grown_width(ui, value, &font, t.control_height * 3.0 - t.space_6); let response = ui.add( text_input(egui::TextEdit::singleline(value)) .id(id) - .min_size(vec2(0.0, height)) - .desired_width(t.control_height * 3.0 - t.space_6) + .min_size(vec2(width, height)) + .desired_width(width) .return_key(None) .event_filter(egui::EventFilter { tab: true, horizontal_arrows: true, vertical_arrows: true, ..Default::default() }) .font(font) diff --git a/crates/ui-egui/src/ui_kit/fields_tests.rs b/crates/ui-egui/src/ui_kit/fields_tests.rs index 38c3f9d44..4a57eb5c7 100644 --- a/crates/ui-egui/src/ui_kit/fields_tests.rs +++ b/crates/ui-egui/src/ui_kit/fields_tests.rs @@ -203,6 +203,40 @@ fn growing_message_field_retains_its_id_and_does_not_consume_enter() { assert_eq!(message, "First\nSecond\n"); } +/// The value fields on the canvas keep their width for a number and grow with an expression typed +/// into them (parameter names, a formula), up to three times that width, also in the area they +/// float in on the canvas, whose space is last frame's size. +#[test] +fn canvas_value_fields_grow_with_an_expression_up_to_three_times_their_width() { + for case in ["canvas", "placement"] { + let ctx = crate::fonts::test_context(); + let width = |value: &str| { + let mut value = value.to_owned(); + let mut rect = egui::Rect::NOTHING; + let mut output = ctx.run_ui(egui::RawInput::default(), |ui| { + egui::Area::new(egui::Id::new("grow")).fixed_pos(egui::pos2(10.0, 10.0)).show(ui.ctx(), |ui| { + ui.horizontal(|ui| { + let id = ui.id().with(case); + rect = match case { + "canvas" => canvas_value_field(ui, id, &mut value, false).rect, + _ => placement_field(ui, id, &mut value, "").rect, + }; + }); + }); + }); + output.textures_delta.clear(); + rect.width() + }; + let number = width("12.5 mm"); + assert!((width("4") - number).abs() < 0.5, "{case}: a number keeps the field's width"); + let formula = width("CellWidth * X + 2 * Wall"); + assert!(formula > number * 1.5, "{case}: {formula} for a formula, {number} for a number"); + let long = width("CellWidth * X + 2 * WallThickness - Clearance / 2 + LipHeight * Y"); + assert!(long > formula && long <= number * 3.0 + 1.0, "{case}: {long} capped at three times {number}"); + assert!((width("4") - number).abs() < 0.5, "{case}: and back to a number's width"); + } +} + #[test] fn placement_field_keeps_focus_for_owner_validation_on_enter() { let ctx = crate::fonts::test_context(); From 6081226fa641fcbd7e81d98958d28e02aaeda580 Mon Sep 17 00:00:00 2001 From: Jackson Oursland Date: Tue, 27 Oct 2026 12:37:16 +0000 Subject: [PATCH 010/102] Test: the render-guides picture test keeps its evidence when it fails (#7440) model_render_follows_the_grid_and_origin_switches_unless_asked compares nine renders byte for byte and has failed once in a full run without coming back alone. A mismatch now names the step, counts the differing pixels, lists the renderer that drew each picture and keeps both PNGs. Co-authored-by: Claude Opus 5.5 (1M context) --- crates/ui-egui/src/control.rs | 52 +++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rs index 62d7c376b..d2314521c 100644 --- a/crates/ui-egui/src/control.rs +++ b/crates/ui-egui/src/control.rs @@ -1452,17 +1452,21 @@ mod tests { } /// `ui.render` with extra request parameters. - fn render_with(app: &mut SolveApp, path: &std::path::Path, extra: serde_json::Value) -> Vec { + /// A `ui.render` of `app` to `path` with `extra` parameters: the PNG, and what drew it. + fn render_with(app: &mut SolveApp, path: &std::path::Path, extra: serde_json::Value) -> (Vec, String) { let mut params = json!({"path": path.to_string_lossy(), "width": 200, "height": 140}); for (k, v) in extra.as_object().into_iter().flatten() { params[k.as_str()] = v.clone(); } let (req, _rx) = ControlRequest::new("ui.render", params); - match handle(app, &crate::fonts::test_context(), &req) { - Outcome::Done(v) => assert_eq!(v["ok"], true, "{v}"), + let renderer = match handle(app, &crate::fonts::test_context(), &req) { + Outcome::Done(v) => { + assert_eq!(v["ok"], true, "{v}"); + v["result"]["renderer"].as_str().or(v["renderer"].as_str()).unwrap_or("unknown").to_string() + } Outcome::Screenshot { .. } => panic!("ui.render took a screenshot"), - } - std::fs::read(path).unwrap() + }; + (std::fs::read(path).unwrap(), renderer) } /// A model render draws the ground grid (it cuts through a part that straddles Z 0) and the @@ -1480,7 +1484,13 @@ mod tests { let dir = std::env::temp_dir().join(format!("solidcraft-render-guides-{}", std::process::id())); std::fs::create_dir_all(&dir).unwrap(); let path = dir.join("shot.png"); - let shot = |app: &mut SolveApp, extra: serde_json::Value| render_with(app, &path, extra); + // Every picture is compared byte for byte, so each must come from the same renderer. + let drawn_by = std::cell::RefCell::new(Vec::new()); + let shot = |app: &mut SolveApp, extra: serde_json::Value| { + let (png, renderer) = render_with(app, &path, extra); + drawn_by.borrow_mut().push(renderer); + png + }; let all = shot(&mut app, json!({})); let no_grid = shot(&mut app, json!({"grid": false})); let no_axes = shot(&mut app, json!({"axes": false})); @@ -1491,18 +1501,38 @@ mod tests { assert!(a != b, "two of the pictures are the same"); } } + // A picture that is not the one expected: both are kept, with how much they differ, so a + // failure that does not come back on a rerun still leaves its evidence. + let same = |step: &str, got: Vec, want: &Vec| { + if got == *want { + return; + } + let kept = std::env::temp_dir().join(format!("solidcraft-render-guides-failed-{}", std::process::id())); + let _ = std::fs::create_dir_all(&kept); + let _ = std::fs::write(kept.join(format!("{step}-got.png")), &got); + let _ = std::fs::write(kept.join(format!("{step}-want.png")), want); + let differ = match (image::load_from_memory(&got), image::load_from_memory(want)) { + (Ok(a), Ok(b)) if a.width() == b.width() && a.height() == b.height() => { + let (a, b) = (a.to_rgba8(), b.to_rgba8()); + format!("{} of {} pixels differ", a.pixels().zip(b.pixels()).filter(|(x, y)| x != y).count(), a.width() * a.height()) + } + (Ok(a), Ok(b)) => format!("{}×{} against {}×{}", a.width(), a.height(), b.width(), b.height()), + _ => "a picture does not decode".to_string(), + }; + panic!("{step}: not the picture expected ({differ}; drawn by {:?}); both kept in {}", drawn_by.borrow(), kept.display()); + }; // With the Grid switch off the render has no grid, and `grid: true` brings it back. app.ui.show_grid = false; - assert!(shot(&mut app, json!({})) == no_grid); - assert!(shot(&mut app, json!({"grid": true})) == all); + same("grid-off", shot(&mut app, json!({})), &no_grid); + same("grid-off-asked-on", shot(&mut app, json!({"grid": true})), &all); // With the Origin off too it has neither; `axes: true` puts the axes back. app.set_origin_shown(false); - assert!(shot(&mut app, json!({})) == bare); - assert!(shot(&mut app, json!({"axes": true})) == no_grid); + same("both-off", shot(&mut app, json!({})), &bare); + same("both-off-axes-asked-on", shot(&mut app, json!({"axes": true})), &no_grid); // The Origin and the Grid back on: the first picture again. app.ui.show_grid = true; app.set_origin_shown(true); - assert!(shot(&mut app, json!({})) == all); + same("both-on-again", shot(&mut app, json!({})), &all); let _ = std::fs::remove_dir_all(&dir); } From 0b0886b87cf2e1ea7e7c05f0666e8a6c13307923 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:37:31 +0000 Subject: [PATCH 011/102] A surface left without a configuration is configured again, not a crash (#7007) (#7401) * claim: #7007 * A surface left without a configuration is configured again, not a crash (#7007) wgpu reports device-loss errors to no error scope. On D3D12 a driver reset found by Surface::configure drops the old configuration and reports nothing, so the surface was taken as configured and the next acquire panicked with "Surface is not configured for presentation". A configure that meets a lost device or an unsupported surface is now a refused configure, the acquire runs under an error scope, and its Validation status reconfigures the surface. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/surface_errors_tests.rs | 60 +++++++++++++++++++++- vendor/README.md | 7 +++ vendor/egui-wgpu/src/lib.rs | 51 ++++++++++++++++++ vendor/egui-wgpu/src/winit.rs | 29 +++++++---- 4 files changed, 134 insertions(+), 13 deletions(-) diff --git a/crates/ui-egui/src/surface_errors_tests.rs b/crates/ui-egui/src/surface_errors_tests.rs index 9d3b41f61..8d5ea044d 100644 --- a/crates/ui-egui/src/surface_errors_tests.rs +++ b/crates/ui-egui/src/surface_errors_tests.rs @@ -5,9 +5,14 @@ //! driver's refusal can't be provoked here, so these check the capture on a real device with an //! error the validation always reports, and the retry policy with a stand-in clock and device. //! An error no scope catches at all is reported by the device's handler -//! (`gpu::log_uncaptured_errors`) instead of panicking (#5486). +//! (`gpu::log_uncaptured_errors`) instead of panicking (#5486). A configure that meets a lost +//! device isn't taken as configured, and an acquire wgpu refuses configures the surface again +//! (#7007). -use egui_wgpu::{Attempt, ConfigureRetry, SURFACE_RECREATE_AFTER, capture_errors, wgpu}; +use egui_wgpu::{ + Attempt, ConfigureError, ConfigureRetry, DeviceLost, SURFACE_RECREATE_AFTER, SurfaceErrorAction, WgpuConfiguration, capture_errors, + configure_captured, wgpu, +}; use std::time::Duration; use web_time::Instant; @@ -27,6 +32,57 @@ fn an_error_under_capture_is_returned_not_a_panic() { assert_eq!(buffer.size(), 4); } +/// A driver reset found by a surface configure (D3D12 waits for the present queue after wgpu has +/// dropped the surface's old configuration) reports nothing: wgpu passes device-loss errors to no +/// error scope. The configure was taken, the next acquire met a surface without a configuration, +/// and the device's default handler panicked: "Surface is not configured for presentation" +/// (#7007). `destroy` loses the device as a driver reset does; wgpu calls the lost callback once +/// it has polled. +#[test] +fn a_configure_that_meets_a_lost_device_is_not_taken() { + // The queue is kept: wgpu calls a destroyed device's lost callback only while it has one. + let Some((_, device, _queue)) = crate::gpu::offscreen_device() else { return }; + let lost = DeviceLost::watch(&device); + let bad = wgpu::BufferDescriptor { label: Some("bad"), size: 3, usage: wgpu::BufferUsages::MAP_WRITE, mapped_at_creation: true }; + // On a working device a clean configure is taken and a refused one returns its error. + assert!(configure_captured(&device, &lost, || {}).is_ok()); + let refused = configure_captured(&device, &lost, || { + let _ = device.create_buffer(&bad); + }); + assert!(matches!(refused, Err(ConfigureError::Refused(wgpu::Error::Validation { .. }))), "{refused:?}"); + + // The device is lost during the configure, which goes on and fails quietly. + let met_loss = configure_captured(&device, &lost, || { + device.destroy(); + let _ = device.poll(wgpu::PollType::wait_indefinitely()); + let _ = device.create_buffer(&bad); + }); + assert!(matches!(met_loss, Err(ConfigureError::DeviceLost)), "{met_loss:?}"); + assert!(met_loss.is_err_and(|e| e.to_string() == "the graphics device was lost")); + // Why the scope alone can't tell: on the lost device the same invalid call reports nothing. + let (_, error) = capture_errors(&device, || device.create_buffer(&bad)); + assert!(error.is_none(), "{error:?}"); +} + +/// wgpu hands back `CurrentSurfaceTexture::Validation` for an acquire whose error was captured: +/// most often a surface without a configuration. Skipping the frame, as before, met the same +/// error on every later frame (#7007); the surface is configured again instead. The other +/// statuses keep their actions. +#[test] +fn an_acquire_wgpu_refuses_configures_the_surface_again() { + let status = WgpuConfiguration::default().on_surface_status; + let action = |s: wgpu::CurrentSurfaceTexture| match status(&s) { + SurfaceErrorAction::SkipFrame => "skip", + SurfaceErrorAction::Reconfigure => "reconfigure", + SurfaceErrorAction::RecreateSurface => "recreate", + }; + assert_eq!(action(wgpu::CurrentSurfaceTexture::Validation), "reconfigure"); + assert_eq!(action(wgpu::CurrentSurfaceTexture::Outdated), "reconfigure"); + assert_eq!(action(wgpu::CurrentSurfaceTexture::Lost), "recreate"); + assert_eq!(action(wgpu::CurrentSurfaceTexture::Occluded), "skip"); + assert_eq!(action(wgpu::CurrentSurfaceTexture::Timeout), "skip"); +} + /// An error no scope caught on the window's device used to reach wgpu's default handler, which /// panics ("wgpu error: Out of Memory", #5486). With the handler installed it is reported and /// the device goes on working. diff --git a/vendor/README.md b/vendor/README.md index 408a8a10d..aaf33cc51 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -318,6 +318,13 @@ SolidCraft changes: submits nothing (`DeviceLost::probe`), so a device the driver lost is found by that submission rather than by the first queue write, which panicked inside wgpu-core (`PendingWrites::activate`, #4172). +- `src/lib.rs`, `src/winit.rs`: a surface configure that meets a lost device is not taken as + configured (`configure_captured`): wgpu reports device-loss errors to no error scope, and on + D3D12 a driver reset found by the configure has already dropped the surface's configuration. + The next acquire failed with "Surface is not configured for presentation" and the device's + default handler panicked (#7007). An unsupported surface is a refused configure too. The + acquire runs under `capture_errors`, and the `Validation` status it then returns reconfigures + the surface instead of skipping every later frame. - `src/lib.rs`: creation of the egui renderer uses validation, internal and out-of-memory error scopes, awaiting every result before returning it. A refused UI pipeline (D3D12 `egui_pipeline` shader compilation, #6648) returns `WgpuError::CreateRendererError` through diff --git a/vendor/egui-wgpu/src/lib.rs b/vendor/egui-wgpu/src/lib.rs index 0bba44e09..ca4d9c1e0 100644 --- a/vendor/egui-wgpu/src/lib.rs +++ b/vendor/egui-wgpu/src/lib.rs @@ -568,6 +568,13 @@ impl Default for WgpuConfiguration { log::trace!("Skipping frame due to occlusion."); SurfaceErrorAction::SkipFrame } + wgpu::CurrentSurfaceTexture::Validation => { + // SolidCraft: the acquire's error was captured; most often the surface has + // no configuration ("Surface is not configured for presentation", #7007). + // Skipping alone would meet the same error on every frame after. + log::debug!("Dropped frame with error: {status:?}"); + SurfaceErrorAction::Reconfigure + } _ => { log::warn!("Dropped frame with error: {status:?}"); SurfaceErrorAction::SkipFrame @@ -830,6 +837,50 @@ pub fn capture_errors(device: &wgpu::Device, f: impl FnOnce() -> T) -> (T, Op (value, failed) } +/// SolidCraft: why a surface configure ([`configure_captured`]) left the surface without its +/// configuration. +#[derive(Debug)] +pub enum ConfigureError { + /// The device refused it, with this error (#1935). + Refused(wgpu::Error), + /// The device was lost (#7007). + DeviceLost, + /// The adapter doesn't support the surface. + Unsupported, +} + +impl std::fmt::Display for ConfigureError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::Refused(error) => error.fmt(f), + Self::DeviceLost => f.write_str("the graphics device was lost"), + Self::Unsupported => f.write_str("the surface isn't supported by this adapter"), + } + } +} + +/// SolidCraft: run a surface configure on `device` under [`capture_errors`], and say whether the +/// surface has its configuration. A configure that meets a lost device reports nothing: wgpu +/// passes device-loss errors to no error scope and no handler, only to the lost callback. On +/// D3D12 a driver reset is found that way, when the configure waits for the present queue, after +/// wgpu has dropped the surface's old configuration. Taken as configured, the surface's next +/// acquire failed with "Surface is not configured for presentation", and the device's default +/// error handler panicked (#7007). `lost` is the device's [`DeviceLost`], marked by then. +pub fn configure_captured( + device: &wgpu::Device, + lost: &DeviceLost, + configure: impl FnOnce(), +) -> Result<(), ConfigureError> { + let ((), failed) = capture_errors(device, configure); + if let Some(error) = failed { + return Err(ConfigureError::Refused(error)); + } + if lost.is_lost() { + return Err(ConfigureError::DeviceLost); + } + Ok(()) +} + /// SolidCraft: refused configures in a row after which the surface is recreated (#1935). pub const SURFACE_RECREATE_AFTER: u32 = 3; diff --git a/vendor/egui-wgpu/src/winit.rs b/vendor/egui-wgpu/src/winit.rs index c78ac8c4f..9f728d835 100644 --- a/vendor/egui-wgpu/src/winit.rs +++ b/vendor/egui-wgpu/src/winit.rs @@ -107,13 +107,14 @@ impl Painter { /// SolidCraft: a configuration the device refuses (D3D12: "Failed to wait for GPU to come /// idle before reconfiguring the Surface", #1935) comes back as the error instead of reaching - /// the device's uncaptured-error handler, which panics. Called only through - /// [`Self::try_configure`], which says what follows. + /// the device's uncaptured-error handler, which panics; so does a configure that met a lost + /// device, or a surface the adapter doesn't support, neither of which configured it (#7007). + /// Called only through [`Self::try_configure`], which says what follows. fn configure_surface( surface_state: &SurfaceState, render_state: &RenderState, config: &SurfaceConfig, - ) -> Result<(), wgpu::Error> { + ) -> Result<(), crate::ConfigureError> { profiling::function_scope!(); let SurfaceConfig { @@ -133,13 +134,12 @@ impl Painter { let width = surface_state.width; let height = surface_state.height; - // SolidCraft: an unsupported surface is logged, not a panic. + // SolidCraft: an unsupported surface is a refused configure, not a panic. let Some(default_config) = surface_state .surface .get_default_config(&render_state.adapter, width, height) else { - log::error!("The surface isn't supported by this adapter"); - return Ok(()); + return Err(crate::ConfigureError::Unsupported); }; let mut surf_config = wgpu::SurfaceConfiguration { usage: wgpu::TextureUsages::RENDER_ATTACHMENT, @@ -155,10 +155,9 @@ impl Painter { } let device = &render_state.device; - let ((), failed) = crate::capture_errors(device, || { - surface_state.surface.configure(device, &surf_config) - }); - failed.map_or(Ok(()), Err) + crate::configure_captured(device, &render_state.device_lost, || { + surface_state.surface.configure(device, &surf_config); + }) } /// SolidCraft: configures the surface at `now` unless a refused configure's retry isn't due @@ -723,7 +722,15 @@ impl Painter { if !FIRST_PRESENT.swap(true, std::sync::atomic::Ordering::Relaxed) { crate::startup_step(crate::STEP_FIRST_PRESENT, ""); } - let output_frame = surface_state.surface.get_current_texture(); + // SolidCraft: an acquire wgpu refuses (a surface left without its configuration, + // #7007) comes back as `CurrentSurfaceTexture::Validation` instead of reaching the + // device's uncaptured-error handler, which panics by default. + let (output_frame, failed) = crate::capture_errors(&render_state.device, || { + surface_state.surface.get_current_texture() + }); + if let Some(error) = failed { + log::warn!("The surface gave no frame: {error}"); + } vsync_sec += start.elapsed().as_secs_f32(); output_frame }; From 9d01dcb358b055e01bc877df6c0869784bc88786 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:38:02 +0000 Subject: [PATCH 012/102] Open from computer: let iOS and iPadOS pick .solidcraft files (#6977) (#7351) * claim: #6977 * Open from computer: let iOS and iPadOS pick .solidcraft files (#6977) The iOS file picker matches an input's accept list by system file type, not by extension. No system type has the .solidcraft extension, so the designs were greyed out. On an iPhone or iPad the file inputs now offer every file; other devices keep the extension filter. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- apps/solidcraft-web/src/disk.rs | 35 ++++++++++++++++++++++++++++++++ apps/solidcraft-web/src/files.rs | 16 +++++++++++---- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/apps/solidcraft-web/src/disk.rs b/apps/solidcraft-web/src/disk.rs index 10e0ca596..a8abac6f7 100644 --- a/apps/solidcraft-web/src/disk.rs +++ b/apps/solidcraft-web/src/disk.rs @@ -147,6 +147,21 @@ pub fn accept_list(extensions: &[&str]) -> String { list.join(",") } +/// The `accept` of a file input for `extensions` on this device (`apple_touch`: an iPhone or +/// iPad). The picker there offers only files of a type the system knows from the list and greys +/// out the rest, `.solidcraft` designs among them, since no system type has that extension +/// (#6977). So it offers every file there, and the opener checks what it gets. +pub fn input_accept(extensions: &[&str], apple_touch: bool) -> String { + if apple_touch { String::new() } else { accept_list(extensions) } +} + +/// The browser runs on an iPhone or iPad (every browser there is WebKit), from its +/// `navigator.userAgent` and `navigator.maxTouchPoints`. iPadOS presents itself as a Mac; only its +/// touch screen tells them apart. +pub fn apple_touch(user_agent: &str, touch_points: i32) -> bool { + ["iPhone", "iPad", "iPod"].iter().any(|d| user_agent.contains(d)) || (user_agent.contains("Macintosh") && touch_points > 1) +} + /// The largest file an upload for `extensions` reads: images go into a canvas, which has a size /// limit, so a bigger one is refused before it is read. `None`: the importer checks the file. pub fn upload_limit(extensions: &[&str]) -> Option { @@ -671,6 +686,26 @@ mod tests { assert_eq!(upload_limit(&["dxf"]), None); } + /// An iPhone or iPad greys out a `.solidcraft` design the `accept` list names, as it knows no + /// type for that extension, so its inputs offer every file; other devices keep the list (#6977). + #[test] + fn file_inputs_on_an_iphone_or_ipad_offer_every_file() { + let iphone = + "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1"; + let mac = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15"; + let chrome_ios = "Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/138.0.7204.156 Mobile/15E148 Safari/604.1"; + let chrome = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"; + assert!(apple_touch(iphone, 5)); + assert!(apple_touch(chrome_ios, 5), "every browser on iOS has the same picker"); + assert!(apple_touch(mac, 5), "an iPad presents itself as a Mac"); + assert!(!apple_touch(mac, 0), "a Mac has no touch screen"); + assert!(!apple_touch(chrome, 10), "a touch screen elsewhere filters as before"); + assert!(!apple_touch("", 0), "hostile input is just not an iPhone"); + let designs = ["solidcraft", "json", "step"]; + assert_eq!(input_accept(&designs, true), ""); + assert_eq!(input_accept(&designs, false), ".solidcraft,.json,.step"); + } + #[test] fn the_save_dialog_offers_the_type_of_the_name() { assert_eq!(save_type("Plate.solidcraft").2, ".solidcraft"); diff --git a/apps/solidcraft-web/src/files.rs b/apps/solidcraft-web/src/files.rs index 228924dc1..0f610567c 100644 --- a/apps/solidcraft-web/src/files.rs +++ b/apps/solidcraft-web/src/files.rs @@ -513,9 +513,9 @@ fn input_picker(files: &Rc, intent: Intent) { input.set_type("file"); // Everything the browser build imports, from the format registry: cadmpeg is pure Rust, so // FreeCAD and Rhino files are part of it; plus the DXF and SVG drawings Open and Insert take. - let accept = - solidcraft_engine::io::formats::open_extensions(true).iter().chain(&["dxf", "svg"]).map(|e| format!(".{e}")).collect::>().join(","); - input.set_accept(&accept); + let mut extensions = solidcraft_engine::io::formats::open_extensions(true); + extensions.extend(["dxf", "svg"]); + input.set_accept(&disk::input_accept(&extensions, apple_touch())); // Attached (hidden) while it is open: some browsers ignore a click on a detached input. let _ = input.set_attribute("style", "display:none"); if let Some(body) = doc.body() { @@ -546,7 +546,7 @@ fn input_picker(files: &Rc, intent: Intent) { /// `None` when the dialog was closed or the file could not be read. pub fn pick_upload(files: &Rc, extensions: &[&str]) -> impl std::future::Future> + use<> { // Shown now, in the click: a file dialog needs the user's gesture. - let chosen = choose_file(&disk::accept_list(extensions)); + let chosen = choose_file(&disk::input_accept(extensions, apple_touch())); let limit = disk::upload_limit(extensions); let files = files.clone(); async move { @@ -573,6 +573,14 @@ pub fn pick_upload(files: &Rc, extensions: &[&str]) -> impl std::future:: } } +/// The page runs on an iPhone or iPad, whose file inputs offer every file (`disk::input_accept`). +fn apple_touch() -> bool { + web_sys::window().is_some_and(|w| { + let nav = w.navigator(); + disk::apple_touch(&nav.user_agent().unwrap_or_default(), nav.max_touch_points()) + }) +} + /// Show a hidden `` offering `accept` (call in the click). The promise answers /// the picked `File`, or `null` when the dialog is closed (the input's `cancel` event). fn choose_file(accept: &str) -> Result { From 9b84789da00351adfef736c151121850cb585b6d Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:38:07 +0000 Subject: [PATCH 013/102] Report a bug: include the Messages log and other failing features (#7348) (#7349) * claim: #7348 * Report a bug: include the Messages log and other failing features (#7348) About half of the reports say "No command error was recorded" and often can't be reproduced. The error was often in the Messages log, or on a feature that was neither selected nor the latest. The technical details now list every failing feature (id, name, kind, error; at most 10) and the last 8 messages with level and age. Each entry is one quoted line of at most 300 characters, with the home folder shown as ~. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/issue_report.rs | 148 +++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/crates/ui-egui/src/issue_report.rs b/crates/ui-egui/src/issue_report.rs index d037b9075..b2a75b24e 100644 --- a/crates/ui-egui/src/issue_report.rs +++ b/crates/ui-egui/src/issue_report.rs @@ -304,6 +304,84 @@ fn feature_context(feature: &solidcraft_engine::doc::Feature) -> String { format!("Feature {}: {}\n{}", feature.id, debug(&feature.name, 160), block(&json_context(&feature.kind, 2000))) } +/// Messages and feature errors listed in a report (#7348), each entry cut to `MAX_ENTRY_CHARS`. +const REPORT_MESSAGES: usize = 8; +const REPORT_FAILURES: usize = 10; +const MAX_ENTRY_CHARS: usize = 300; + +/// The user's home folder as text, for [`report_text`]; a bare root is never replaced. +fn home_text() -> Option { + let home = std::env::var_os(if cfg!(windows) { "USERPROFILE" } else { "HOME" })?; + let home = home.to_string_lossy().trim_end_matches(['/', '\\']).to_string(); + (home.chars().count() > 1).then_some(home) +} + +/// Untrusted text (messages, feature errors) as one quoted line: the home folder shown as `~`, +/// cut to `MAX_ENTRY_CHARS` characters. +fn report_text(text: &str, home: Option<&str>) -> String { + let mut text = limited(text, MAX_ENTRY_CHARS * 8); + if let Some(home) = home.filter(|h| h.chars().count() > 1) { + text = text.replace(home, "~"); + } + if text.chars().count() > MAX_ENTRY_CHARS { + text = format!("{}…", text.chars().take(MAX_ENTRY_CHARS).collect::()); + } + format!("{text:?}") +} + +/// How long ago `at` was, at `now` (both ms), in English like the rest of the report. +fn report_ago(now: f64, at: f64) -> String { + let s = ((now - at) / 1000.0).max(0.0); + let s = if s.is_finite() { s.floor() } else { 0.0 }; + if s < 60.0 { + format!("{s:.0} s ago") + } else if s < 3600.0 { + format!("{:.0} min ago", (s / 60.0).floor()) + } else { + format!("{:.0} h ago", (s / 3600.0).floor()) + } +} + +/// The last messages of the Messages log, oldest first. +fn messages_context(messages: &crate::messages::Messages, now: f64, home: Option<&str>) -> String { + let all = messages.iter(); + let total = all.len(); + if total == 0 { + return "\nMessages: none\n".into(); + } + let shown = total.min(REPORT_MESSAGES); + let mut out = format!("\nMessages (last {shown} of {total}):\n"); + for m in all.skip(total.saturating_sub(shown)) { + let level = if m.error { "error" } else { "info" }; + let repeats = if m.count > 1 { format!(" (×{})", m.count) } else { String::new() }; + out.push_str(&format!(" {} {level}: {}{repeats}\n", report_ago(now, m.at), report_text(&m.text, home))); + } + out +} + +/// Every feature whose result has an error, in timeline order, not only the selected or latest one. +fn failures_context(app: &SolveApp, home: Option<&str>) -> String { + let mut failing = app.session.doc.features.iter().filter_map(|f| app.session.model.result(f.id)?.error.as_deref().map(|e| (f, e))); + let mut out = String::new(); + let mut count = 0usize; + for (feature, error) in failing.by_ref().take(REPORT_FAILURES) { + count += 1; + out.push_str(&format!( + " Feature {} {} ({}): {}\n", + feature.id, + report_text(&feature.name, home), + feature.kind.type_name(), + report_text(error, home) + )); + } + let more = failing.count(); + match (count, more) { + (0, _) => "\nFailing features: none\n".into(), + (n, 0) => format!("\nFailing features ({n}):\n{out}"), + (n, more) => format!("\nFailing features (first {n} of {}):\n{out}", n + more), + } +} + /// Read-only context excludes whole documents, sketch geometry and imported file contents. pub fn draft_for(app: &SolveApp, dialog: Option<&dialogs::Dialog>, error: Option<&str>) -> Draft { let mut context = String::new(); @@ -341,6 +419,9 @@ pub fn draft_for(app: &SolveApp, dialog: Option<&dialogs::Dialog>, error: Option context.push_str(&format!("Feature error: {}\n", debug(&e, 1000))); } } + let home = home_text(); + context.push_str(&failures_context(app, home.as_deref())); + context.push_str(&messages_context(&app.messages, crate::now_ms(), home.as_deref())); let actual = error.map(|e| debug(&e, 4000)).unwrap_or_else(|| "No command error was recorded.".into()); let image_state = if error.is_some() { "A failed preview may display the last valid geometry; that geometry is not evidence that the failed operation succeeded." @@ -877,6 +958,73 @@ mod tests { assert_eq!(before, (app.session.doc.to_json(), app.session.revision, app.session.undo.len(), app.session.redo.len(), app.cam)); } + /// The sample with Fillet1 failing (the plate made narrower than its fillets). + fn failing_sample() -> SolveApp { + let mut s = Session::default(); + s.run_script(&solidcraft_engine::sample::script()).unwrap(); + s.execute("parameters.change", &json!({"name": "width", "expression": "5 mm"})).unwrap(); + SolveApp::new(s, Default::default()) + } + + #[test] + fn issue_report_lists_the_last_messages_and_a_failing_feature_that_is_not_the_latest() { + let mut app = failing_sample(); + let fillet = app.session.doc.features.iter().find(|f| f.name == "Fillet1").unwrap(); + let error = app.session.model.result(fillet.id).and_then(|r| r.error.clone()).unwrap(); + let latest = app.session.doc.features.iter().rev().find(|f| reportable(f)).unwrap(); + assert_ne!(latest.id, fillet.id, "Fillet1 must not be the latest operation"); + assert!(app.session.selection.is_empty()); + let at = crate::now_ms() - 125_000.0; + for i in 0..12 { + app.messages.push(&format!("message number {i:02}"), i % 2 == 0, at); + } + app.messages.push("message number 11", false, at); + let draft = draft_for(&app, None, None); + let line = format!("Feature {} \"Fillet1\" (FilletFeature): {:?}", fillet.id, error); + assert!(draft.body.contains("Failing features (1):") && draft.body.contains(&line), "missing {line}: {}", draft.body); + assert!(draft.body.contains("Messages (last 8 of 12):"), "{}", draft.body); + for i in 0..4 { + assert!(!draft.body.contains(&format!("message number {i:02}")), "only the last 8 messages: {}", draft.body); + } + assert!(draft.body.contains("2 min ago error: \"message number 10\"\n"), "{}", draft.body); + assert!(draft.body.contains("2 min ago info: \"message number 11\" (×2)\n"), "{}", draft.body); + let latest = draft.body.find("Latest modeling operation").unwrap(); + assert!(latest < draft.body.find("Failing features").unwrap() && latest < draft.body.find("Messages (").unwrap()); + assert!(draft.body.find("Messages (").unwrap() < draft.body.find("## Environment").unwrap()); + } + + #[test] + fn issue_report_messages_and_feature_errors_hide_the_home_folder_and_stay_bounded() { + assert_eq!(report_text("Could not write /home/sample/Designs/part.step", Some("/home/sample")), "\"Could not write ~/Designs/part.step\""); + assert_eq!(report_text("/home/sample", Some("/")), "\"/home/sample\"", "a bare root is never replaced"); + let mut app = app(); + if let Some(home) = home_text() { + app.messages.push(&format!("Export failed: {home}/Designs/part.step is read-only"), true, crate::now_ms()); + let draft = draft_for(&app, None, None); + assert!(draft.body.contains("error: \"Export failed: ~/Designs/part.step is read-only\""), "{}", draft.body); + assert!(!draft.body.contains(&home), "the home folder leaks: {}", draft.body); + } + for i in 0..12 { + app.run("solid.box", json!({"length":10,"width":10,"height":10,"body_name":format!("Box{i}")})).unwrap(); + } + let hostile = "錯誤 ```\n## fake section 🚀".repeat(50_000); + for result in &mut app.session.model.results { + result.error = Some(hostile.clone()); + } + app.messages.push(&hostile, true, f64::NAN); + let draft = draft_for(&app, None, None); + assert!(draft.body.len() <= MAX_BODY); + assert!(draft.body.contains("Failing features (first 10 of 12):"), "{}", draft.body); + assert!(!draft.body.contains("\n## fake section"), "untrusted text stays on one quoted line"); + let section = draft.body.split("Failing features").nth(1).unwrap(); + let section = section.split("\n## Environment").next().unwrap(); + assert_eq!(section.lines().filter(|l| l.contains("錯誤")).count(), 11, "ten features and one message"); + for line in section.lines() { + assert!(line.chars().count() < 2 * MAX_ENTRY_CHARS, "an entry is bounded: {} characters", line.chars().count()); + } + assert!(section.contains("0 s ago error: \"錯誤"), "a broken time still reads: {section}"); + } + #[test] fn issue_report_hostile_context_and_url_are_bounded_without_new_query_parameters() { let mut app = app(); From fb7ca86dc7485db824c6a4192a8288dfbf5b82e9 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:38:11 +0000 Subject: [PATCH 014/102] Highlight the selected sketch in the viewport (#7156) (#7347) * claim: #7156 * Highlight the selected sketch in the viewport (#7156) Picking a sketch in the Browser or the timeline selected it, but the viewport lit nothing: the highlight only drew the bodies and faces a feature made. It now draws all of a picked sketch's curves in the selection colour, over the model and also while the sketch is hidden, so a sketch is easy to find without hiding and showing it. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/viewport.rs | 111 ++++++++++++++++++++++++++++----- 1 file changed, 96 insertions(+), 15 deletions(-) diff --git a/crates/ui-egui/src/viewport.rs b/crates/ui-egui/src/viewport.rs index 41488a2e7..08c3b4033 100644 --- a/crates/ui-egui/src/viewport.rs +++ b/crates/ui-egui/src/viewport.rs @@ -1538,17 +1538,7 @@ fn build_sketch_scene(app: &SolveApp, proj: &Proj) -> GpuScene { for (pts, col, cons) in sketch_lines_with_sampler(&ss.sketch, &ss.plane, active, &ss.report.curve_determined, |_, index, plane| { crate::sketch_display::curve_sample(app, sid, index, plane, proj).parts.clone() }) { - let segs = sketch_segments( - &pts, - if !cons { - 0 - } else if col == colors::SKETCH_CENTERLINE { - 2 - } else { - 1 - }, - unit, - ); + let segs = sketch_segments(&pts, sketch_line_mode(col, cons), unit); let haloed = app.preferences.sketch_halo && !active && col != colors::SKETCH_PROJECTED && col != colors::SKETCH_LOST; strokes.push((segs, sc.color(sketch_color(&tk, col)), if cons { 1.2 } else { 2.0 }, haloed)); } @@ -1629,6 +1619,18 @@ fn ground_shadow(sc: &mut GpuScene, app: &SolveApp, st: &std::sync::Arc u8 { + if !cons { + 0 + } else if col == colors::SKETCH_CENTERLINE { + 2 + } else { + 1 + } +} + /// Sketch line types share the same world-space dash phase in the scene and overlays. pub(crate) fn sketch_segments(pts: &[Vec3], mode: u8, unit: f64) -> Vec<(Vec3, Vec3)> { match mode { @@ -2468,6 +2470,23 @@ fn feature_parts(app: &SolveApp, id: u64, shown_only: bool) -> Vec { out } +/// The sketches picked among `items` (a sketch row in the Browser or the timeline) that the +/// highlight draws, shown or hidden (#7156). The sketch being edited shows its own selection. +fn selected_sketches(app: &SolveApp, items: &[Sel]) -> Vec { + let st = crate::open_meshing::shown_world(app); + let mut out = Vec::new(); + for item in items { + if let Sel::Feature { id } = item + && app.session.active_sketch != Some(*id) + && st.sketch(*id).is_some() + && !out.contains(id) + { + out.push(*id); + } + } + out +} + fn displayed_selection(app: &SolveApp, item: &Sel) -> Vec { match item { Sel::Feature { id } => feature_geometry(app, *id), @@ -3025,7 +3044,8 @@ fn highlight_key(app: &SolveApp) -> u64 { // Body triangles and outlines live in world space; the GPU applies the new camera. // Only sketch feedback needs projected tessellation and the profile's lift toward the eye. let projected = selected.iter().any(|s| matches!(s, Sel::Profile { .. } | Sel::SketchCurve { .. } | Sel::ExternalSketchCurve { .. })) - || matches!(app.viewport.hover, Some(Hit::Profile { .. })); + || matches!(app.viewport.hover, Some(Hit::Profile { .. })) + || !selected_sketches(app, &selected).is_empty(); if projected { crate::sketch_display::projection_key(&display_proj(app), app.viewport.pixels_per_point()).hash(&mut h); } @@ -3224,9 +3244,11 @@ pub(crate) fn build_highlight(app: &SolveApp) -> GpuScene { let active_bodies = s.active_occurrence_path.as_ref().and_then(|p| s.occurrence_bodies(p, true).ok()); // Faces lit over the model use the triangles the model shows them with. let shown = |b: &solidcraft_engine::doc::ModelBody| shown_mesh(app, b, &active_bodies); + let items = app.highlighted(); + let sketches = selected_sketches(app, &items); let mut sel = Vec::new(); - for item in app.highlighted() { - for piece in displayed_selection(app, &item) { + for item in &items { + for piece in displayed_selection(app, item) { if !sel.iter().any(|x| crate::selection::same_item(x, &piece)) { sel.push(piece); } @@ -3318,7 +3340,8 @@ pub(crate) fn build_highlight(app: &SolveApp) -> GpuScene { } // Reference widgets follow zoom; the often much larger world-space feedback does not. let projected = sel.iter().any(|s| matches!(s, Sel::Profile { .. } | Sel::SketchCurve { .. } | Sel::ExternalSketchCurve { .. })) - || matches!(hover, Some(Hit::Profile { .. })); + || matches!(hover, Some(Hit::Profile { .. })) + || !sketches.is_empty(); if !projected && let Some(cached) = app.viewport.hover_block.lock().ok().and_then(|cache| { cache.as_ref().filter(|c| c.key == key && std::sync::Arc::ptr_eq(&c.state, &st) && std::sync::Arc::ptr_eq(&c.doc, &s.doc)).cloned() @@ -3419,6 +3442,19 @@ pub(crate) fn build_highlight(app: &SolveApp) -> GpuScene { _ => {} } } + // A sketch picked in the Browser or the timeline: all its curves in their line types, over + // the model, also while the sketch is hidden or inside a body, so it is easy to find. + let (unit, proj) = (grid_step(app.cam.half_height()).0, display_proj(app)); + let sel_edge = feedback.color(c4(t.sel_edge)); + for ss in sketches.iter().filter_map(|id| st.sketch(*id)) { + for (pts, col, cons) in sketch_lines_with_sampler(&ss.sketch, &ss.plane, false, &[], |_, index, plane| { + crate::sketch_display::curve_sample(app, ss.feature, index, plane, &proj).parts.clone() + }) { + for (a, b) in sketch_segments(&pts, sketch_line_mode(col, cons), unit) { + feedback.line(a.to_f32(), b.to_f32(), sel_edge, 3.5, true); + } + } + } // Timeline modifiers light only their resulting faces; browser rows light whole bodies. let mut hovered = app.viewport.hover_feature.map(|id| feature_geometry(app, id)).unwrap_or_default(); hovered.extend(app.viewport.hover_bodies.iter().map(|name| Sel::Body { name: name.clone() })); @@ -6673,6 +6709,51 @@ mod tests { } } + /// A sketch picked in the timeline or the Browser lights all its curves in the selection + /// colour, also while it is hidden (#7156); nothing is lit once it is no longer picked. + #[test] + fn a_picked_sketch_lights_its_curves_shown_or_hidden() { + let mut h = crate::scenario::Harness::new(); + h.app.set_origin_shown(false); + h.app.run("solid.box", json!({"length":20,"width":20,"height":20})).unwrap(); + h.app.run("sketch.create", json!({"plane":"XY","name":"Outline"})).unwrap(); + h.app.run("sketch.rectangle.two_point", json!({"p0":[30,0],"p1":[40,10]})).unwrap(); + h.app.run("sketch.circle.center", json!({"center":[35,5],"radius":3,"construction":true})).unwrap(); + h.app.run("sketch.finish", json!({})).unwrap(); + let id = h.app.session.doc.find_feature("Outline").unwrap().id; + h.frames(2); + let sel_edge = c4(Tokens::get().sel_edge); + // The selection-coloured strokes of the highlight, drawn over the model (a line holds its + // colour's palette index). + let lit = |app: &SolveApp| { + let scene = build_highlight(app).merged(); + scene + .overlay + .as_chunks::<{ crate::gpu::LINE_SIZE }>() + .0 + .iter() + .filter(|line| { + let index = line.get(24..28).and_then(|b| b.try_into().ok()).map_or(0, u32::from_le_bytes); + scene.palette.get(crate::gpu::PaletteIndex(index)) == Some(sel_edge) + }) + .count() + }; + assert_eq!(lit(&h.app), 0, "nothing is picked"); + let p = crate::scenario::handle_at("timeline:Outline").unwrap(); + h.step(&json!({"click":[p.x,p.y]})).unwrap(); + assert_eq!(h.app.session.selection, vec![Sel::Feature { id }]); + let shown = lit(&h.app); + // Four sides, the circle's many segments and its dashes. + assert!(shown > 20, "the picked sketch's curves are lit: {shown}"); + h.app.session.visibility.hidden_sketches.push(id); + assert!(!visible_sketches(&h.app).contains(&id)); + assert_eq!(lit(&h.app), shown, "a hidden sketch is lit too"); + h.app.session.selection = vec![Sel::Feature { id: h.app.session.doc.features[0].id }]; + assert_eq!(lit(&h.app), 0, "another feature picked"); + h.app.session.selection.clear(); + assert_eq!(lit(&h.app), 0, "nothing is picked"); + } + #[test] fn history_marker_shows_only_its_sketch_without_changing_visibility() -> Result<(), Box> { for explicitly_hidden in [false, true] { From fac811565b8b50e5199f29be23b146a75dd1cb8a Mon Sep 17 00:00:00 2001 From: phanoob Date: Tue, 27 Oct 2026 12:38:15 +0000 Subject: [PATCH 015/102] Sketch: an arc centred on an existing point shows its Coincident glyph (Refs #7299) (#7346) * Claim: centre arc on an existing point shows its Coincident glyph (Refs #7299) Co-Authored-By: Claude Opus 5.5 * Sketch: an arc centred on an existing point shows its Coincident glyph (Refs #7299) The Centre arc tool sent a centre snapped to an existing point as that point's id, so the arc shared it with no constraint and the sketch drew no glyph. A plain point snap now goes as its place, where draw's connect ties the new centre with a Coincident; midpoint, on-curve, crossing and body-vertex snaps still go as refs. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Phanoob Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/sketch_corner_ui_tests.rs | 35 ++++++++++++++++++++ crates/ui-egui/src/tools.rs | 17 +++++++--- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/sketch_corner_ui_tests.rs b/crates/ui-egui/src/sketch_corner_ui_tests.rs index aa14d0629..1cdead5c1 100644 --- a/crates/ui-egui/src/sketch_corner_ui_tests.rs +++ b/crates/ui-egui/src/sketch_corner_ui_tests.rs @@ -712,6 +712,41 @@ fn centre_circle_clicked_through_a_line_end_stays_on_it() { ); } +/// #7299: the centre arc tool, its centre snapped to a rectangle's corner, ties the arc to the +/// corner with a Coincident (which the sketch shows as a glyph), not by quietly sharing the corner +/// as its centre. +#[test] +fn centre_arc_on_an_existing_point_is_tied_by_a_coincident() { + use solidcraft_engine::sketch::ConstraintKind; + let mut h = crate::scenario::Harness::new(); + h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); + h.app.run("sketch.rectangle.two_point", json!({"p0":[10,10],"p1":[40,30]})).unwrap(); + h.step(&json!({"call":"ui.view","params":{"view":"fit"}})).unwrap(); + h.settle(); + let sid = h.app.session.active_sketch.unwrap(); + let sk = h.app.session.model.state().sketch(sid).unwrap().sketch.clone(); + let at_corner = |p: Option<_>| p.is_some_and(|p: Vec2| (p.x - 40.0).abs() < 1e-9 && (p.y - 30.0).abs() < 1e-9); + let corner = (0..sk.points.len()).find(|&i| at_corner(sk.point(i))).unwrap(); + h.step(&json!({"start":"sketch.arc.center_point"})).unwrap(); + for at in [[40, 30, 0], [34, 30, 0], [40, 24, 0]] { + h.step(&json!({"move":{"world":at}})).unwrap(); + h.step(&json!({"click":{"world":at}})).unwrap(); + } + let sk = h.app.session.model.state().sketch(sid).unwrap().sketch.clone(); + let centre = sk.curves.iter().find_map(|c| match c.kind { + CurveKind::Arc { c, .. } => Some(c), + _ => None, + }); + let centre = centre.unwrap_or_else(|| panic!("an arc is drawn: {:?}", h.app.status)); + assert_ne!(centre, corner, "the arc has a centre of its own"); + assert!(at_corner(sk.point(centre)), "the centre is on the corner"); + let tied = sk + .constraints + .iter() + .any(|k| matches!(k.kind, ConstraintKind::Coincident { p, q } if (p, q) == (corner, centre) || (p, q) == (centre, corner))); + assert!(tied, "a Coincident ties the centre to the corner: {:?}", sk.constraints); +} + /// #4691: the Point tool clicked on a line's midpoint makes a point held there (a MidPoint /// constraint), not a free point that happens to sit on the middle. #[test] diff --git a/crates/ui-egui/src/tools.rs b/crates/ui-egui/src/tools.rs index 4e2af4da2..2e1bfcd19 100644 --- a/crates/ui-egui/src/tools.rs +++ b/crates/ui-egui/src/tools.rs @@ -534,10 +534,19 @@ fn run_shape(app: &mut SolveApp, t: &Tool) -> Result, String> { "sketch.circle.two_point" => json!({"p0": xy(&p[0]), "p1": xy(&p[1])}), "sketch.circle.three_point" => json!({"p0": xy(&p[0]), "p1": xy(&p[1]), "p2": xy(&p[2])}), "sketch.arc.three_point" => json!({"start": arg(&p[0]), "end": arg(&p[1]), "through": arg(&p[2])}), - "sketch.arc.center_point" => match crate::sketch_dims::locked_value(app, t, "Sweep") { - Some(sweep) => json!({"center": arg(&p[0]), "start": arg(&p[1]), "sweep": sweep.to_degrees()}), - None => json!({"center": arg(&p[0]), "start": arg(&p[1]), "end": xy(&p[2])}), - }, + "sketch.arc.center_point" => { + // A centre snapped to an existing point goes as its place, where `connect` ties + // them with a Coincident the sketch shows (#7299); a midpoint, on-curve, crossing or + // body-vertex snap goes as itself, so the centre is held there. + let center = match &p[0].1 { + Some(id) if ["mid:", "on:", "vertex:", "x:"].iter().any(|k| id.starts_with(k)) => json!(id), + _ => xy(&p[0]), + }; + match crate::sketch_dims::locked_value(app, t, "Sweep") { + Some(sweep) => json!({"center": center, "start": arg(&p[1]), "sweep": sweep.to_degrees()}), + None => json!({"center": center, "start": arg(&p[1]), "end": xy(&p[2])}), + } + } "sketch.polygon.inscribed" | "sketch.polygon.circumscribed" => { let a = (p[1].0 - p[0].0).angle().to_degrees(); json!({"center": xy(&p[0]), "radius": d(0, 1), "sides": sides, "angle": a}) From 75c8700724dbd2189014049f5eb1df99e1c8af5e Mon Sep 17 00:00:00 2001 From: phanoob Date: Tue, 27 Oct 2026 12:38:23 +0000 Subject: [PATCH 016/102] Sketch: a circle centred on an existing point shows its Coincident glyph (#7299) (#7331) * claim: #7299 Co-Authored-By: Claude Opus 5.5 * Sketch: a circle centred on an existing point shows its Coincident glyph (#7299) The centre circle tool sent a centre snapped to an existing point as that point's id, so the circle shared it: attached, but with no constraint and so no glyph to see, pick or delete. A plain point snap now goes as its place, where `connect` ties the new centre to the point with a Coincident the sketch draws. Midpoint, on-curve, crossing and body-vertex snaps still go as refs, so the centre stays held there (#3099 keeps passing). Fixes #7299 Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Phanoob Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/sketch_corner_ui_tests.rs | 35 ++++++++++++++++++++ crates/ui-egui/src/tools.rs | 11 ++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/sketch_corner_ui_tests.rs b/crates/ui-egui/src/sketch_corner_ui_tests.rs index 1cdead5c1..1a17b4f95 100644 --- a/crates/ui-egui/src/sketch_corner_ui_tests.rs +++ b/crates/ui-egui/src/sketch_corner_ui_tests.rs @@ -763,3 +763,38 @@ fn a_point_clicked_on_a_line_midpoint_is_held_there() { let held = sk.constraints.iter().any(|c| matches!(c.kind, solidcraft_engine::sketch::ConstraintKind::Midpoint { .. })); assert!(held, "no MidPoint constraint: {:?}", sk.constraints.iter().map(|c| &c.kind).collect::>()); } + +/// #7299: the centre circle tool, its centre snapped to a rectangle's corner, ties the circle +/// to the corner with a Coincident (which the sketch shows as a glyph that can be picked and +/// deleted), not by quietly sharing the corner as its centre. +#[test] +fn centre_circle_on_an_existing_point_is_tied_by_a_coincident() { + use solidcraft_engine::sketch::ConstraintKind; + let mut h = crate::scenario::Harness::new(); + h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); + h.app.run("sketch.rectangle.two_point", json!({"p0":[10,10],"p1":[40,30]})).unwrap(); + h.step(&json!({"call":"ui.view","params":{"view":"fit"}})).unwrap(); + h.settle(); + let sid = h.app.session.active_sketch.unwrap(); + let sk = h.app.session.model.state().sketch(sid).unwrap().sketch.clone(); + let at_corner = |p: Option<_>| p.is_some_and(|p: Vec2| (p.x - 40.0).abs() < 1e-9 && (p.y - 30.0).abs() < 1e-9); + let corner = (0..sk.points.len()).find(|&i| at_corner(sk.point(i))).unwrap(); + h.step(&json!({"start":"sketch.circle.center"})).unwrap(); + for at in [[40, 30, 0], [34, 24, 0]] { + h.step(&json!({"move":{"world":at}})).unwrap(); + h.step(&json!({"click":{"world":at}})).unwrap(); + } + let sk = h.app.session.model.state().sketch(sid).unwrap().sketch.clone(); + let centre = sk.curves.iter().find_map(|c| match c.kind { + CurveKind::Circle { c, .. } => Some(c), + _ => None, + }); + let centre = centre.unwrap_or_else(|| panic!("a circle is drawn: {:?}", h.app.status)); + assert_ne!(centre, corner, "the circle has a centre of its own"); + assert!(at_corner(sk.point(centre)), "the centre is on the corner"); + let tied = sk + .constraints + .iter() + .any(|k| matches!(k.kind, ConstraintKind::Coincident { p, q } if (p, q) == (corner, centre) || (p, q) == (centre, corner))); + assert!(tied, "a Coincident ties the centre to the corner: {:?}", sk.constraints); +} diff --git a/crates/ui-egui/src/tools.rs b/crates/ui-egui/src/tools.rs index 2e1bfcd19..33d67dea0 100644 --- a/crates/ui-egui/src/tools.rs +++ b/crates/ui-egui/src/tools.rs @@ -524,8 +524,15 @@ fn run_shape(app: &mut SolveApp, t: &Tool) -> Result, String> { } "sketch.rectangle.three_point" => json!({"p0": xy(&p[0]), "p1": xy(&p[1]), "p2": xy(&p[2])}), "sketch.circle.center" => { - // A second click snapped to a point keeps the circle on that point (#3099). - let mut v = json!({"center": arg(&p[0]), "radius": d(0, 1)}); + // A centre snapped to an existing point goes as its place, where `connect` ties + // them with a Coincident the sketch shows (#7299); a midpoint, on-curve, crossing or + // body-vertex snap goes as itself, so the centre is held there. A second click + // snapped to a point keeps the circle on that point (#3099). + let center = match &p[0].1 { + Some(id) if ["mid:", "on:", "vertex:", "x:"].iter().any(|k| id.starts_with(k)) => json!(id), + _ => xy(&p[0]), + }; + let mut v = json!({"center": center, "radius": d(0, 1)}); if p[1].1.is_some() { v["through"] = arg(&p[1]); } From d95646378bad73399256111e4c1359b0b8247c88 Mon Sep 17 00:00:00 2001 From: CamWight <91156642+CamWight@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:38:34 +0000 Subject: [PATCH 017/102] cargo xtask skills: read SKILL.md front matter on a CRLF checkout (#7281) (#7284) * claim: #7281 * cargo xtask skills: check the files as Git stores them, on a CRLF checkout too (#7281) A Windows checkout with core.autocrlf gives AGENTS.md and the SKILL.md files CRLF line endings, so `front_matter` found no `---\n` and every skill was reported, and each line's `\r` counted towards the size caps. The check now reads the files with CRLF taken as LF, as #4960 did for icon_audit. The new test checks a CRLF skill filled to the cap. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- xtask/src/skills.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/xtask/src/skills.rs b/xtask/src/skills.rs index 0e881fa86..a47bb10b6 100644 --- a/xtask/src/skills.rs +++ b/xtask/src/skills.rs @@ -39,7 +39,8 @@ pub struct Repo<'a> { pub fn run(root: &Path) -> Result<(), String> { let mut docs = Vec::new(); - let read = |rel: &str| std::fs::read_to_string(root.join(rel)).map_err(|e| format!("{rel}: {e}")); + // A Windows checkout (core.autocrlf) has CRLF line endings: check the text as Git stores it (#7281). + let read = |rel: &str| std::fs::read_to_string(root.join(rel)).map(|t| t.replace("\r\n", "\n")).map_err(|e| format!("{rel}: {e}")); docs.push(Doc { path: "AGENTS.md".into(), text: read("AGENTS.md")? }); let mut names = Vec::new(); let dir = root.join("skills"); @@ -420,6 +421,23 @@ mod tests { assert!(!p.iter().any(|m| m.contains("solidcraft-modeling/SKILL.md: ") && m.contains("split it")), "{p:?}"); } + /// A SKILL.md filled to the size cap, read from a CRLF checkout: its front matter is found + /// and the line endings don't count towards the cap (#7281). + #[test] + fn a_crlf_checkout_is_checked_as_git_stores_it() { + let root = std::env::temp_dir().join(format!("xtask-skills-crlf-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&root); + std::fs::create_dir_all(root.join("skills/solidcraft-a")).unwrap(); + let lines = "x\n".repeat((SKILL_MAX_CHARS - SKILL.len()) / 2); + let skill = format!("{SKILL}{lines}{}", "x".repeat(SKILL_MAX_CHARS - SKILL.len() - lines.len())); + let crlf = |t: &str| t.replace('\n', "\r\n"); + std::fs::write(root.join("AGENTS.md"), crlf("# Router\n\n| a | `skills/solidcraft-a/SKILL.md` |\n")).unwrap(); + std::fs::write(root.join("skills/solidcraft-a/SKILL.md"), crlf(&skill)).unwrap(); + let result = run(&root); + let _ = std::fs::remove_dir_all(&root); + assert_eq!(result, Ok(())); + } + #[test] fn mentions_are_found() { assert_eq!(command_mentions("run cargo xtask ci, cargo xtask lists --fix; `cargo xtask`"), ["ci", "lists"]); From 53cba0cf51500aa461884a015c855faabf0bdae1 Mon Sep 17 00:00:00 2001 From: CamWight <91156642+CamWight@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:38:38 +0000 Subject: [PATCH 018/102] AGENTS.md: drop the leftover merge-conflict marker (#7279) (#7282) The last line was a `>>>>>>>` marker left from resolving a conflict in #6444. Co-authored-by: Claude Opus 5.5 --- AGENTS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 0f8ea99e1..af4304973 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -45,4 +45,3 @@ Work: ROADMAP.md, "Where help is wanted most" in CONTRIBUTING.md, issues labelle | A bug report, a crash, a wrong result | `skills/solidcraft-reporting/SKILL.md` | | Checking, porting, designs in git | `skills/solidcraft-checking/SKILL.md` | | Assemblies, joints, motion | `skills/solidcraft-mechanisms/SKILL.md` | ->>>>>>> 4a3e0772a (Agents: AGENTS.md becomes a router to focused skills, with a staleness check (Refs #6439)) From f9c8abb3294b4ac8fb0c355b6adf6edbcc728ab3 Mon Sep 17 00:00:00 2001 From: Badger B <134829689+badgerisda@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:38:47 +0000 Subject: [PATCH 019/102] Add German translations, batch 1 (#7237) (#7260) * Add German translations, batch 1 (#7237) * Update translation for 'Import material into design' --- assets/locales/pending/de-batch-1.json | 96 ++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 assets/locales/pending/de-batch-1.json diff --git a/assets/locales/pending/de-batch-1.json b/assets/locales/pending/de-batch-1.json new file mode 100644 index 000000000..4f55f3407 --- /dev/null +++ b/assets/locales/pending/de-batch-1.json @@ -0,0 +1,96 @@ +{ + "de": { + "A Single hole snaps to the middle of its face and to the centres of its round edges": "Eine einzelne Bohrung rastet am Flächenmittelpunkt und an den Mittelpunkten ihrer kreisförmigen Kanten ein", + "A placed Single hole has a handle to drag it, and picking its face again moves the hole there instead of taking it out": "Eine platzierte einzelne Bohrung lässt sich über einen Ziehgriff verschieben. Durch erneutes Anklicken ihrer Fläche wird die Bohrung dorthin verschoben, statt entfernt zu werden", + "A short title for the problem (optional)": "Kurzer Problemtitel (optional)", + "Add bend": "Biegung hinzufügen", + "All Lines": "Alle Linien", + "Anchor": "Anker", + "Angle Display": "Winkelanzeige", + "Another bend on the far edge of the last flange": "Eine weitere Biegung an der gegenüberliegenden Kante des letzten Flansches", + "App/system information and command settings are included. Review private details before sharing.": "App- und Systeminformationen sowie Befehlseinstellungen werden mit übermittelt. Prüfen Sie vor dem Teilen, ob private Angaben enthalten sind.", + "Bar": "Flachstab", + "Bend": "Biegung", + "Bottom Left": "Unten links", + "Bottom Middle": "Unten Mitte", + "Bottom Right": "Unten rechts", + "Centroid": "Flächenschwerpunkt", + "Channel": "U-Profil", + "Circle center": "Kreismittelpunkt", + "Continue on GitHub": "Auf GitHub fortfahren", + "Copies the definition only. Assign it from Physical Material when ready.": "Kopiert nur die Materialdefinition. Weisen Sie das Material anschließend unter „Physikalisches Material“ zu.", + "Corner radius": "Eckenradius", + "Create Hole": "Bohrung erstellen", + "Current plane": "Aktuelle Ebene", + "Custom": "Benutzerdefiniert", + "Describe the problem you saw": "Beschreiben Sie das aufgetretene Problem", + "Describe what happened before continuing.": "Beschreiben Sie, was passiert ist, bevor Sie fortfahren.", + "Drag to move the hole; click to remove it": "Ziehen, um die Bohrung zu verschieben; anklicken, um sie zu entfernen", + "Expected result (optional)": "Erwartetes Ergebnis (optional)", + "Exported by SolidWorks, which usually saves Y up": "Aus SolidWorks exportiert; dort zeigt die Y-Achse normalerweise nach oben", + "Face center": "Flächenmittelpunkt", + "Flange thickness": "Flanschdicke", + "Flanges": "Flansche", + "Full thread depth": "Volle Gewindetiefe", + "Further Bends": "Weitere Biegungen", + "Halo under sketch curves": "Hervorhebung unter Skizzenkurven", + "Height From": "Höhe ab", + "History names": "Namen im Konstruktionsverlauf", + "I-Beam": "I-Träger", + "Import material into design": "Material ins Design importieren", + "Included": "Enthalten", + "Inner Sharp": "Innenkante", + "L-Angle": "L-Profil", + "Left Middle": "Links Mitte", + "Lines": "Linien", + "M5, M5x0.5, 1/4-20 UNC": "M5, M5x0.5, 1/4-20 UNC", + "Material Outside": "Material außen", + "Material copied. Existing body assignments are unchanged.": "Material kopiert. Bestehende Materialzuweisungen der Körper bleiben unverändert.", + "Move holes by clicking or dragging": "Bohrungen durch Anklicken oder Ziehen verschieben", + "Name on import": "Name beim Import", + "No matching physical materials.": "Keine passenden physikalischen Materialien gefunden.", + "Nominal diameter": "Nenndurchmesser", + "Not saved yet": "Noch nicht gespeichert", + "Open bodies (no volume)": "Offene Körper (ohne Volumen)", + "Open surface — no volume": "Offene Oberfläche – kein Volumen", + "Opens your browser and copies the report text for you to paste into GitHub.": "Öffnet den Browser und kopiert den Berichtstext, den Sie anschließend auf GitHub einfügen können.", + "Opens your browser. Review and submit your report on GitHub.": "Öffnet den Browser. Prüfen Sie den Bericht und reichen Sie ihn auf GitHub ein.", + "Other way": "Entgegengesetzte Richtung", + "Outer Sharp": "Außenkante", + "Outer radius": "Außenradius", + "Physical material definitions": "Definitionen physikalischer Materialien", + "Pitch": "Steigung", + "Rectangular Tube": "Rechteckrohr", + "Remove this bend": "Diese Biegung entfernen", + "Report text copied. Paste it into GitHub and submit your report there.": "Berichtstext kopiert. Fügen Sie ihn auf GitHub ein und reichen Sie den Bericht dort ein.", + "Reports are public. A GitHub account is required.": "Berichte sind öffentlich. Ein GitHub-Konto ist erforderlich.", + "Review your report on GitHub and click Submit new issue to publish it.": "Prüfen Sie Ihren Bericht auf GitHub und klicken Sie auf „Submit new issue“, um ihn zu veröffentlichen.", + "Right Middle": "Rechts Mitte", + "Root radius": "Kehlradius", + "Round Bar": "Rundstab", + "Round Tube": "Rundrohr", + "Same way": "Gleiche Richtung", + "Save screenshot…": "Screenshot speichern…", + "Screenshot (optional)": "Screenshot (optional)", + "Section (optional)": "Abschnitt (optional)", + "Show ghost": "Geistermodell anzeigen", + "Snap to face and edge centres": "An Flächen- und Kantenmittelpunkten einrasten", + "Steps to reproduce (optional)": "Schritte zur Reproduktion (optional)", + "Summary": "Zusammenfassung", + "Tangent": "Tangential", + "Tangent to Edge": "Tangential an Kante", + "Tap drill diameter": "Kernlochdurchmesser", + "Technical details": "Technische Details", + "This image is not attached to GitHub yet. Copy or save it, then attach it on GitHub.": "Dieses Bild wurde noch nicht an GitHub angehängt. Kopieren oder speichern Sie es und fügen Sie es anschließend Ihrem GitHub-Bericht hinzu.", + "Thread depth": "Gewindetiefe", + "Thread diameter": "Gewindedurchmesser", + "Toe radius": "Kantenradius", + "Top Left": "Oben links", + "Top Middle": "Oben Mitte", + "Top Right": "Oben rechts", + "Web thickness": "Stegdicke", + "What did you do just before the problem? A short list is enough": "Was haben Sie unmittelbar vor dem Auftreten des Problems getan? Eine kurze Liste genügt.", + "What did you expect to see?": "Was hatten Sie erwartet?", + "What happened?": "Was ist passiert?" + } +} From 6b7f1934b1900c160ad9ce6135e4e05bc39ede64 Mon Sep 17 00:00:00 2001 From: yhamil04 <147720712+yhamil04@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:39:01 +0000 Subject: [PATCH 020/102] Startup tests: start the backends the app would, no OpenGL driver on Windows (#1156) (#7217) * claim: #1156 Co-Authored-By: Claude Opus 5.5 * Startup tests: start the backends the app would, no OpenGL driver on Windows (#1156) The software-adapter test enumerated every wgpu backend and the probe test asked OpenGL on its own even where the app stops at D3D12, so both loaded the GPU vendor's OpenGL driver (atio6axx.dll on AMD) into the test process, where it once aborted the process at exit with c0000409. The adapter test now starts what the software renderer starts (D3D12 alone on Windows) and the probe test probes in the app's order, stopping at the first backend with a GPU. Co-Authored-By: Claude Opus 5.5 * Startup tests: read the software renderer's backends from wgpu_options Review: the adapter test now takes the backends from the app's own wgpu_options(true, None) instead of a copy of its choice, and the probe test no longer re-checks the order choose_backends' own test covers. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- apps/solidcraft/src/startup.rs | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/apps/solidcraft/src/startup.rs b/apps/solidcraft/src/startup.rs index 0a3c8cde8..c03de00b6 100644 --- a/apps/solidcraft/src/startup.rs +++ b/apps/solidcraft/src/startup.rs @@ -543,9 +543,16 @@ mod tests { #[test] fn probing_a_backend_alone_never_panics() { - // Whatever this machine has (often nothing): an answer, not a crash. - for b in WINDOWS_ORDER { - let _ = has_hardware_adapter(b); + // Whatever this machine has (often nothing): an answer, not a crash. On Windows the probe + // goes the way the app's does, stopping at the first backend with a GPU: a machine with + // D3D12 never loads its OpenGL driver into the test process, and AMD's (`atio6axx.dll`) + // aborted the process as it exited (#1156). + if cfg!(target_os = "windows") { + let _ = choose_backends(true, false, false, None, has_hardware_adapter); + } else { + for b in WINDOWS_ORDER { + let _ = has_hardware_adapter(b); + } } } @@ -558,8 +565,18 @@ mod tests { #[test] fn the_software_adapter_is_preferred_and_its_absence_is_an_error_not_a_panic() { assert!(pick_cpu_adapter(&[], None).unwrap_err().contains("none")); - let instance = eframe::wgpu::Instance::new(eframe::wgpu::InstanceDescriptor::new_without_display_handle()); - let adapters = pollster::block_on(instance.enumerate_adapters(eframe::wgpu::Backends::all())); + // The adapters the software renderer chooses among: it starts D3D12 alone on Windows + // (WARP), not every backend, so the test doesn't load the OpenGL driver either (#1156). + let options = crate::wgpu_options(true, None); + let eframe::egui_wgpu::WgpuSetup::CreateNew(setup) = &options.wgpu_setup else { panic!("the software renderer makes its own device") }; + let backends = setup.instance_descriptor.backends; + if cfg!(target_os = "windows") && std::env::var_os(WGPU_BACKEND_ENV).is_none() { + assert_eq!(backends, eframe::wgpu::Backends::DX12); + } + let mut desc = eframe::wgpu::InstanceDescriptor::new_without_display_handle_from_env(); + desc.backends = backends; + let instance = eframe::wgpu::Instance::new(desc); + let adapters = pollster::block_on(instance.enumerate_adapters(backends)); if adapters.is_empty() { return; } From 05eb2832425545e3118df0895f072bd3f6b1a7ee Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:39:17 +0000 Subject: [PATCH 021/102] Report a bug: focus the empty description once, not every frame (#7190) (#7195) * claim: #7190 * Report a bug: focus the empty description once, not every frame (#7190) After Continue on GitHub found What happened? empty, the form moved the focus back to it on every frame, so typing in Summary went into the description. Continue now re-arms the one-time focus (and scroll into view) instead; the other fields stay free to type in. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/issue_report.rs | 28 +++++++++++++++++++++++++ crates/ui-egui/src/issue_report/form.rs | 7 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/issue_report.rs b/crates/ui-egui/src/issue_report.rs index b2a75b24e..887cdb37e 100644 --- a/crates/ui-egui/src/issue_report.rs +++ b/crates/ui-egui/src/issue_report.rs @@ -119,6 +119,8 @@ pub struct Draft { texture: Option, pub note: String, source_signature: u64, + /// The description has taken the focus it gets on opening; Continue finding it empty clears + /// this, so it takes the focus once more (#7190). focus_requested: bool, missing_description: bool, opened_github: bool, @@ -844,6 +846,32 @@ mod tests { } } + /// Continue with an empty description gives it the focus once (#7190). It used to take the + /// focus back every frame, so what was typed in Summary went into the description. + #[test] + fn issue_report_empty_description_takes_the_focus_once() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.issue_report.draft = Some(draft_for(&h.app, None, None)); + h.frames(16); + let description = Some(egui::Id::new("issue_report_body")); + click_commands(&mut h, "Continue on GitHub"); + assert_eq!(h.ctx.memory(|m| m.focused()), description); + // Click the Summary field (found by its id: it has no label of its own) and type. + let title = egui::Id::new("issue_report_title").accesskit_id(); + let tree = h.output.accesskit_update.as_ref().unwrap(); + let b = tree.nodes.iter().find(|(id, _)| *id == title).and_then(|(_, n)| n.bounds()).unwrap(); + h.step(&json!({"click":[(b.x0 + b.x1) / 2.0, (b.y0 + b.y1) / 2.0]})).unwrap(); + h.step(&json!({"text":"My title"})).unwrap(); + h.frames(4); + let draft = h.app.issue_report.draft.as_ref().unwrap(); + assert_eq!((draft.title.as_str(), draft.description.as_str()), ("My title", "")); + assert!(draft.missing_description && h.widget("Describe what happened before continuing.").is_some()); + // Still empty: the next Continue gives it the focus again. + click_commands(&mut h, "Continue on GitHub"); + assert_eq!(h.ctx.memory(|m| m.focused()), description); + } + #[test] fn issue_report_handoff_includes_edits_from_the_click_frame() { for field in ["issue_report_body", "issue_report_title", "issue_report_steps", "issue_report_expected", "issue_report_technical"] { diff --git a/crates/ui-egui/src/issue_report/form.rs b/crates/ui-egui/src/issue_report/form.rs index 55d169719..742d82a3f 100644 --- a/crates/ui-egui/src/issue_report/form.rs +++ b/crates/ui-egui/src/issue_report/form.rs @@ -153,7 +153,7 @@ pub(super) fn show(app: &mut SolveApp, draft: &mut Draft, ctx: &egui::Context) - draft.opened_github = false; } crate::scenario::publish_rect("report:description", response.rect); - if !draft.focus_requested || draft.missing_description { + if !draft.focus_requested { response.scroll_to_me(Some(egui::Align::Center)); response.request_focus(); draft.focus_requested = true; @@ -217,5 +217,10 @@ pub(super) fn show(app: &mut SolveApp, draft: &mut Draft, ctx: &egui::Context) - } _ => {} } + // Found empty, the description takes the focus once more, not every frame: the other + // fields stay free to type in (#7190). + if action == ui_kit::Action::Ok && draft.missing_description { + draft.focus_requested = false; + } (retake, closed || action == ui_kit::Action::Cancel) } From ae3d4faf53a63054caa2dd2ad93c5cff270159ce Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:39:27 +0000 Subject: [PATCH 022/102] macOS menu: disable design commands behind an open Report a bug draft (#7188) (#7193) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * claim: #7188 * macOS menu: disable design commands behind an open Report a bug draft (#7188) The native menu bar kept running its actions while a Report a bug draft was open, although the app's own toolbar and shortcuts wait behind it: Edit > Undo or Cmd+Z removed the last feature, so the report described a design that no longer existed. FileAction::enabled now refuses every action but Quit while a draft is open. Settings, Keyboard Shortcuts and Agent Chat are refused too: their windows open over the report but take no input until it closes. The menu's Undo and Redo still go to a focused report field (FileAction::menu_enabled), which no longer leans on Settings being enabled. Co-Authored-By: Claude Opus 5.5 * Menus: Quit and Help's windows wait behind an open Report a bug draft Quit switched to the first design with unsaved changes under the draft and asked about it in a prompt that can't be answered while the report blocks the app; with nothing unsaved it quit and lost the typed report. Like any modal window, the draft now turns Quit off. Help's items that open a window (About, Keyboard Shortcuts, Messages, Crash Reports, Connect AI assistants) wait too, in the native menu and in the app's Help menu; Documentation and Report an Issue… stay. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- apps/solidcraft/src/native_menu.rs | 9 ++++- crates/ui-egui/src/help.rs | 12 +++++- crates/ui-egui/src/toolbar.rs | 65 +++++++++++++++++++++++++++++- 3 files changed, 81 insertions(+), 5 deletions(-) diff --git a/apps/solidcraft/src/native_menu.rs b/apps/solidcraft/src/native_menu.rs index 4df20439a..1d75df7a8 100644 --- a/apps/solidcraft/src/native_menu.rs +++ b/apps/solidcraft/src/native_menu.rs @@ -146,8 +146,7 @@ impl NativeMenu { } fn action_enabled(action: &FileAction, app: &SolveApp, ctx: &egui::Context) -> bool { - action.enabled(app) - || (matches!(action, FileAction::Undo | FileAction::Redo) && ctx.egui_wants_keyboard_input() && FileAction::Settings.enabled(app)) + action.menu_enabled(app, ctx.egui_wants_keyboard_input()) } pub fn tick(&mut self, app: &mut SolveApp, ctx: &egui::Context) { @@ -157,6 +156,12 @@ impl NativeMenu { item.set_enabled(enabled); } } + for (item, action) in &self.help_actions { + let enabled = solidcraft_ui_egui::help::available(app, action); + if item.is_enabled() != enabled { + item.set_enabled(enabled); + } + } if !self.recent_paths.iter().eq(app.home.recent.iter().take(32)) && let Err(error) = self.update_recent(app) { diff --git a/crates/ui-egui/src/help.rs b/crates/ui-egui/src/help.rs index 90132c8a3..d7b5e653b 100644 --- a/crates/ui-egui/src/help.rs +++ b/crates/ui-egui/src/help.rs @@ -40,9 +40,18 @@ pub fn diagnostics(app: &SolveApp) -> String { ) } +/// Whether a Help menu item can run now: behind an open bug report, the items that open a +/// window would cover it (#7188). Report an Issue… shows the report. +pub fn available(app: &SolveApp, item: &str) -> bool { + app.issue_report.draft.is_none() || !matches!(item, "about" | "shortcuts" | "messages" | "crashes" | "connect") +} + /// Run a Help menu item: `docs`, `about`, `shortcuts`, `messages`, `report`, `crashes`, `connect`, `install_cli` (macOS). pub fn run(app: &mut SolveApp, ctx: &egui::Context, item: &str) { app.help.menu = false; + if !available(app, item) { + return; + } match item { "docs" => ctx.open_url(egui::OpenUrl::new_tab(DOCS_URL)), "about" => app.help.about = true, @@ -131,7 +140,8 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context, anchor: egui::Pos2) { .into_iter() .filter(|(id, ..)| *id != "install_cli" || cfg!(target_os = "macos")) { - if crate::context_menu::list_row(ui, &crate::context_menu::Item::action(id, label, icon)).is_some() { + let item = crate::context_menu::Item::action(id, label, icon).on_if(available(app, id)); + if crate::context_menu::list_row(ui, &item).is_some() { pick = Some(id); } } diff --git a/crates/ui-egui/src/toolbar.rs b/crates/ui-egui/src/toolbar.rs index c6cf08a46..458513106 100644 --- a/crates/ui-egui/src/toolbar.rs +++ b/crates/ui-egui/src/toolbar.rs @@ -529,10 +529,14 @@ pub enum FileAction { } impl FileAction { - /// Whether this action is available in the current document and picker state. + /// Whether this action is available in the current document, picker and report state. pub fn enabled(&self, app: &SolveApp) -> bool { let needs_design = matches!(self, Self::Save | Self::SaveAs | Self::Undo | Self::Redo | Self::ExportMesh(_) | Self::Command(_)) || matches!(self, Self::Export(extension) if *extension != "json"); + // An open bug report describes the designs as they are, and a window opened behind it + // covers it (#7188). Quit too, as behind any modal window: it would switch to a design + // with unsaved changes under the report, and ask about it where it can't be answered. + let behind_report = app.issue_report.draft.is_some(); let available = match self { Self::Undo => !app.session.undo.is_empty(), Self::Redo => !app.session.redo.is_empty(), @@ -540,7 +544,13 @@ impl FileAction { Self::AgentChat => crate::agent_chat::app_bar_button_shown(app), _ => true, }; - !app.file_picker_busy() && !app.file_load.busy() && (!needs_design || design_shown(app)) && available + !app.file_picker_busy() && !app.file_load.busy() && !behind_report && (!needs_design || design_shown(app)) && available + } + + /// Whether the native menu offers this action: while a widget has keyboard focus (a report's + /// text field too), its Undo and Redo go to that widget instead of the design. + pub fn menu_enabled(&self, app: &SolveApp, keyboard_focus: bool) -> bool { + self.enabled(app) || (matches!(self, Self::Undo | Self::Redo) && keyboard_focus && !app.file_picker_busy() && !app.file_load.busy()) } /// Execute through the same document, save-job and preferences paths as the toolbar. @@ -2308,6 +2318,57 @@ mod header_report_tests { assert!(FileAction::Export("step").enabled(&h.app)); } + #[test] + fn native_menu_actions_are_disabled_behind_an_open_issue_report() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.run("solid.box", json!({"length":2,"width":3,"height":4})).unwrap(); + h.app.home.recent = vec!["elsewhere.solidcraft".into()]; + h.app.issue_report.draft = Some(crate::issue_report::draft_for(&h.app, None, None)); + let before = (h.app.session.doc.to_json(), h.app.session.undo.len(), h.app.docs.count(), h.app.home.recent.clone()); + for action in [ + FileAction::Undo, + FileAction::New, + FileAction::Open, + FileAction::OpenRecent("elsewhere.solidcraft".into()), + FileAction::ClearRecent, + FileAction::Command("file.insert_step"), + FileAction::Save, + FileAction::SaveAs, + FileAction::SaveJson, + FileAction::ExportMesh("stl"), + FileAction::Export("step"), + FileAction::Export("json"), + FileAction::Command("document.metadata"), + FileAction::Settings, + FileAction::Shortcuts, + FileAction::AgentChat, + ] { + assert!(!action.enabled(&h.app), "{action:?} behind the report"); + action.run(&mut h.app); + } + assert_eq!(before, (h.app.session.doc.to_json(), h.app.session.undo.len(), h.app.docs.count(), h.app.home.recent.clone())); + assert!(h.app.dialog.is_none() && h.app.file_picker.is_none() && !h.app.prefs_window.open && !h.app.keymap.open && !h.app.agent_chat.open); + // A focused report field still gets the menu's Undo and Redo. + assert!(FileAction::Undo.menu_enabled(&h.app, true) && !FileAction::Undo.menu_enabled(&h.app, false)); + assert!(!FileAction::Save.menu_enabled(&h.app, true)); + // Quit waits as behind any modal window: it would switch to a design with unsaved changes + // under the report. + assert!(!FileAction::Quit.enabled(&h.app)); + FileAction::Quit.run(&mut h.app); + assert!(h.app.docs.quitting.is_none() && h.app.docs.closing.is_none()); + // Help's windows wait too; Report an Issue… shows the report. + for item in ["about", "shortcuts", "messages", "crashes", "connect"] { + assert!(!crate::help::available(&h.app, item), "{item}"); + crate::help::run(&mut h.app, &h.ctx, item); + } + assert!(!h.app.help.about && !h.app.keymap.open && !h.app.messages.open && h.app.help.connect.is_none()); + assert!(crate::help::available(&h.app, "report") && crate::help::available(&h.app, "docs")); + h.app.issue_report.draft = None; + assert!(FileAction::Undo.enabled(&h.app) && FileAction::Settings.enabled(&h.app) && FileAction::Quit.enabled(&h.app)); + assert!(crate::help::available(&h.app, "shortcuts")); + } + #[test] fn native_menu_actions_share_json_save_and_recent_cleanup() { let mut h = crate::scenario::Harness::new(); From 46552bdc3ab82dd8390871480e26df3262f9c798 Mon Sep 17 00:00:00 2001 From: Victor Santos Oliveira <56417388+Vittuu@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:39:31 +0000 Subject: [PATCH 023/102] Profiles: explain public selection forms in parameter errors (#7180) (#7491) * claim: #7180 public profile selection diagnostics * fix(engine): explain public profile selection forms --- crates/engine/src/cmd/features.rs | 6 ++++ crates/engine/src/schema/tests.rs | 57 +++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/crates/engine/src/cmd/features.rs b/crates/engine/src/cmd/features.rs index 89140d982..58668a8a3 100644 --- a/crates/engine/src/cmd/features.rs +++ b/crates/engine/src/cmd/features.rs @@ -517,6 +517,12 @@ pub(crate) fn profiles(p: &Value, cmd: &str) -> Result { if fields.get("type").and_then(Value::as_str) == Some("whole_boundaries") { return solidcraft_doc::whole_profile_selection_from_value(v).map_err(|error| bad(cmd, error.to_string())); } + if !fields.contains_key("offset_boundaries") && fields.get("type").and_then(Value::as_str) != Some("offset_boundaries") { + return Err(bad( + cmd, + r#"`profiles` must be `"all"`, an index such as `0`, indices such as `[0]`, point picks such as `[{"point": [0, 0]}]` or curve-id picks such as `[{"curves": ["c1"]}]`"#, + )); + } let associations = fields .get("offset_boundaries") .or_else(|| (fields.get("type").and_then(Value::as_str) == Some("offset_boundaries")).then(|| fields.get("associations")).flatten()) diff --git a/crates/engine/src/schema/tests.rs b/crates/engine/src/schema/tests.rs index 8f193b312..66bfd7ff0 100644 --- a/crates/engine/src/schema/tests.rs +++ b/crates/engine/src/schema/tests.rs @@ -128,6 +128,63 @@ fn profiles_match_features_profiles() { assert_eq!(issue(json!(vec![0; 10_001])), vec!["`profiles` must have at most 10000 items"]); } +#[test] +fn unsupported_profile_objects_offer_valid_public_examples() { + let contract = TypedContract::::new(); + for profiles in [ + json!({"type": "curves", "loops": [["c1"], ["c2"]]}), + json!({"type": "curves", "loops": [["c1"]]}), + json!({"type": "index", "index": 0}), + json!({"type": "indices", "indices": [0]}), + json!({"curves": ["c1"]}), + json!({}), + ] { + let issues = contract.check(&json!({"distance": 5, "profiles": profiles})); + assert_eq!(issues.len(), 1, "{profiles}: {issues:?}"); + let issue = issues.first().unwrap(); + assert_eq!(issue.path, "profiles"); + assert!(!issue.message.contains("offset_boundaries"), "{profiles}: {}", issue.message); + // The diagnostic is useful to scripts only if its public examples actually parse. + let examples: Vec = issue.message.split('`').skip(1).step_by(2).filter_map(|text| serde_json::from_str(text).ok()).collect(); + assert_eq!(examples.len(), 5, "{}", issue.message); + for example in examples { + let issues = contract.check(&json!({"distance": 5, "profiles": example})); + assert!(issues.is_empty(), "example {example}: {issues:?}"); + } + } + for profiles in [ + json!({"offset_boundaries": ["a"]}), + json!({"type": "offset_boundaries", "associations": ["a"]}), + json!({"type": "curves", "offset_boundaries": ["a"]}), + ] { + assert!(contract.check(&json!({"distance": 5, "profiles": profiles})).is_empty()); + } +} + +#[test] +fn unsupported_profile_objects_keep_the_design_in_every_check_mode() { + let mut session = Session::default(); + session.execute("sketch.create", &json!({"plane": "xy", "name": "Ring"})).unwrap(); + session.execute("sketch.circle.center", &json!({"center": [0, 0], "radius": 10})).unwrap(); + session.execute("sketch.circle.center", &json!({"center": [0, 0], "radius": 6})).unwrap(); + session.execute("sketch.finish", &json!({})).unwrap(); + let design = session.doc.to_json(); + let undo = session.undo.len(); + for mode in [ParamCheck::Off, ParamCheck::Warn, ParamCheck::Strict] { + session.param_check = mode; + for profiles in [json!({"type": "curves", "loops": [["c1"], ["c2"]]}), json!({"type": "index", "index": 0})] { + let error = session + .execute("solid.extrude", &json!({"sketch": "Ring", "distance": 3, "operation": "new", "profiles": profiles})) + .unwrap_err() + .to_string(); + assert!(error.contains("\"all\"") && error.contains("curves"), "{mode:?}: {error}"); + assert!(!error.contains("offset_boundaries"), "{mode:?}: {error}"); + assert_eq!(session.doc.to_json(), design); + assert_eq!(session.undo.len(), undo); + } + } +} + #[test] fn unknown_keys_get_suggestions() { let c = box_contract(); From 95515ed2bfdbbafe3055f9529e11defe6da50865 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:39:32 +0000 Subject: [PATCH 024/102] Report a bug: take the screenshot once the preview is done instead of giving up (#7171) (#7173) * claim: #7171 * Report a bug: take the screenshot once the preview is done instead of giving up (#7171) A report opened while a preview was being computed took no screenshot and asked to be reopened, which loses what was typed. It now waits for the preview with the report open and takes the screenshot as soon as it is done; after 10 s it shows the preview unfinished and says so in the report (a hanging preview is often what is being reported). The preview the report waited for belongs to its context unless the design, the dialog or the selection changed meanwhile, so the retake check compares those alone. What is typed while the capture hides the report waits for it, and its focused field gets the focus back. Co-Authored-By: Claude Opus 5.5 * Report a bug: keep the new helpers apart from the other report changes Co-Authored-By: Claude Opus 5.5 * Report a bug: keep what is typed as the waited-for screenshot is taken The screenshot a report waits for starts in the frame the preview finishes, before the form is drawn, so what was typed in that frame went nowhere. It is now held with what comes while the form is hidden. The report's context also leaves the dialog's own state out: a preview error the dialog shows meanwhile (a sketch fillet's) no longer counts as a change that refuses the screenshot, since it is often what is reported. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/issue_report.rs | 245 ++++++++++++++++++++++++++++- crates/ui-egui/src/lib.rs | 9 +- 2 files changed, 249 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/issue_report.rs b/crates/ui-egui/src/issue_report.rs index 887cdb37e..a8fbf276d 100644 --- a/crates/ui-egui/src/issue_report.rs +++ b/crates/ui-egui/src/issue_report.rs @@ -104,9 +104,27 @@ impl Drop for CadInput { pub struct ReportState { pub draft: Option, pending: Option, + /// A screenshot waiting for the preview being computed (#7171). + waiting: Option, + /// What was typed while a capture hid the report, for the form once it is back. + held: Vec, + /// The report's field that had focus when a capture hid it. + refocus: Option, cad_focus: Option, } +/// How long a screenshot waits for a preview being computed before it shows it unfinished. +const PREVIEW_WAIT_MS: f64 = 10_000.0; +/// Keystrokes kept while a capture hides the report. +const MAX_HELD: usize = 4096; + +struct Waiting { + deadline: f64, + /// [`context_signature`] when it began: the preview it waits for belongs to the report + /// unless the design, the dialog or the selection changed meanwhile. + context: u64, +} + pub struct Draft { pub title: String, title_prefix: String, @@ -273,16 +291,29 @@ impl std::fmt::Write for Fingerprint { } } -fn source_signature(app: &SolveApp, dialog: Option<&dialogs::Dialog>) -> u64 { +/// What a report's context is drawn from: the design, the dialog and the selection. +fn context_signature(app: &SolveApp, dialog: Option<&dialogs::Dialog>) -> u64 { let mut h = Fingerprint(std::collections::hash_map::DefaultHasher::new()); app.session.revision.hash(&mut h.0); app.docs.active.hash(&mut h.0); app.docs.count().hash(&mut h.0); app.session.doc.name.hash(&mut h.0); + // What the dialog makes, not its state: a preview error it shows (a sketch fillet's) is often + // what is being reported. + if let Some(d) = dialog { + let _ = write!(&mut h, "{:?}{:?}{:?}", d.kind, d.inputs, d.extra); + } + let _ = write!(&mut h, "{:?}", app.session.selection); + h.0.finish() +} + +/// [`context_signature`] and the preview shown with it. +fn source_signature(app: &SolveApp, dialog: Option<&dialogs::Dialog>) -> u64 { + let mut h = Fingerprint(std::collections::hash_map::DefaultHasher::new()); + context_signature(app, dialog).hash(&mut h.0); app.preview.key.hash(&mut h.0); app.preview.error.hash(&mut h.0); app.preview.busy.hash(&mut h.0); - let _ = write!(&mut h, "{:?}{:?}", dialog, app.session.selection); h.0.finish() } @@ -577,14 +608,24 @@ pub fn begin(app: &mut SolveApp, ctx: &egui::Context, dialog: Option<&dialogs::D } fn cancel_capture(app: &mut SolveApp) { + app.issue_report.waiting = None; if let Some(pending) = app.issue_report.pending.take() { app.queued_shots.retain(|(token, ..)| *token != pending.token); } } fn capture(app: &mut SolveApp, ctx: &egui::Context, dialog: Option<&dialogs::Dialog>) { + capture_unless_busy(app, ctx, dialog, true); +} + +/// Take a screenshot for the report; `wait`: while the preview is being computed, wait for it +/// with the report open ([`tick`] takes it once it is done, #7171). +fn capture_unless_busy(app: &mut SolveApp, ctx: &egui::Context, dialog: Option<&dialogs::Dialog>, wait: bool) { cancel_capture(app); let current_source = source_signature(app, dialog); + let context = context_signature(app, dialog); + let full = app.queued_shots.len() >= 16; + let busy = app.preview.busy; let Some(draft) = app.issue_report.draft.as_mut() else { return }; draft.image = None; draft.texture = None; @@ -594,16 +635,39 @@ fn capture(app: &mut SolveApp, ctx: &egui::Context, dialog: Option<&dialogs::Dia .into(); return; } - if app.preview.busy || app.queued_shots.len() >= 16 { + if wait && (busy || full) { + draft.note = "Waiting for the preview to finish to take the screenshot…".into(); + app.issue_report.waiting = Some(Waiting { deadline: crate::now_ms() + PREVIEW_WAIT_MS, context }); + ctx.request_repaint(); + return; + } + if full { draft.note = "Screenshot unavailable while the preview is updating. Reopen the report after it settles, or continue with text.".into(); return; } + if busy { + draft.note = "The preview is still being computed: the screenshot shows it unfinished.".into(); + let line = format!( + "\nThe preview was still being computed {:.0} s after the report opened; the screenshot shows it unfinished.\n", + PREVIEW_WAIT_MS / 1000.0 + ); + if !draft.body.contains(line.trim()) { + draft.body.push_str(&line); + truncate(&mut draft.body, MAX_BODY); + } + } + // The form hides for the capture: give its focused field back after it. + if draft.focus_requested { + app.issue_report.refocus = ctx.memory(|m| m.focused()); + } let Some(token) = app.shot_token.checked_add(1) else { draft.note = "Screenshot request limit reached; restart the app to capture another frame.".into(); return; }; app.shot_token = token; - draft.note = "Capturing the current app view locally…".into(); + if !busy { + draft.note = "Capturing the current app view locally…".into(); + } let now = crate::now_ms(); app.issue_report.pending = Some(Pending { token, @@ -621,7 +685,71 @@ pub(crate) fn pending(app: &SolveApp) -> bool { app.issue_report.pending.is_some() } +/// While a capture hides the report, what is typed waits for the form to come back, which gets +/// its focused field back: a screenshot taken once the preview is done can hide the form while +/// its user types (#7171). +pub(crate) fn hold_input(app: &mut SolveApp, raw: &mut egui::RawInput) { + let state = &mut app.issue_report; + if state.draft.is_none() { + state.held.clear(); + } else if state.pending.is_some() { + let mut kept = Vec::with_capacity(raw.events.len()); + for event in raw.events.drain(..) { + if typing(&event) { + if state.held.len() < MAX_HELD { + state.held.push(event); + } + } else { + kept.push(event); + } + } + raw.events = kept; + } else if !state.held.is_empty() { + let mut events = std::mem::take(&mut state.held); + events.append(&mut raw.events); + raw.events = events; + } +} + +/// What [`hold_input`] keeps for the form. +fn typing(event: &egui::Event) -> bool { + matches!( + event, + egui::Event::Text(_) | egui::Event::Key { .. } | egui::Event::Paste(_) | egui::Event::Copy | egui::Event::Cut | egui::Event::Ime(_) + ) +} + pub(crate) fn tick(app: &mut SolveApp, ctx: &egui::Context) { + if let Some(waiting) = &app.issue_report.waiting { + let settled = !app.preview.busy && app.queued_shots.len() < 16; + let (late, context) = (crate::now_ms() >= waiting.deadline, waiting.context); + if settled || late { + app.issue_report.waiting = None; + let dialog = app.dialog.clone(); + // The preview the report waited for is what it shows now. + let source = source_signature(app, dialog.as_ref()); + if context_signature(app, dialog.as_ref()) == context + && let Some(draft) = app.issue_report.draft.as_mut() + { + draft.source_signature = source; + } + capture_unless_busy(app, ctx, dialog.as_ref(), false); + // The capture hides the form before it is drawn this frame: what was typed in it + // waits with what comes while it is hidden. + if pending(app) { + let state = &mut app.issue_report; + ctx.input(|i| { + for event in i.events.iter().filter(|e| typing(e)) { + if state.held.len() < MAX_HELD { + state.held.push(event.clone()); + } + } + }); + } + } else { + ctx.request_repaint_after(std::time::Duration::from_millis(50)); + } + } let problem = app.issue_report.pending.as_ref().and_then(|p| { if signature(app, app.dialog.as_ref()) != p.signature || p.window != ctx.content_rect() || p.pixels_per_point != ctx.pixels_per_point() { Some("The model, inputs or view changed during capture. Retake the current view.") @@ -709,6 +837,9 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) { if pending(app) { return; } + if let Some(id) = app.issue_report.refocus.take() { + ctx.memory_mut(|m| m.request_focus(id)); + } let Some(mut draft) = app.issue_report.draft.take() else { return }; let (retake, close) = form::show(app, &mut draft, ctx); if !close { @@ -1477,6 +1608,112 @@ mod tests { assert_eq!(h.app.docs.count(), tabs_before); } + /// A report opened while the preview is being computed waits for it, open, and takes the + /// screenshot once it is done (#7171). It used to refuse and ask to reopen the report. + #[test] + fn issue_report_screenshot_waits_for_the_preview_then_is_taken() { + let mut app = app(); + let ctx = crate::fonts::test_context(); + app.preview.busy = true; + begin(&mut app, &ctx, None, None); + assert!(!pending(&app) && app.issue_report.waiting.is_some()); + assert!(app.issue_report.draft.as_ref().unwrap().note.contains("Waiting for the preview")); + tick(&mut app, &ctx); + assert!(!pending(&app), "the preview is still being computed"); + app.preview.busy = false; + app.preview.key += 1; + tick(&mut app, &ctx); + assert!(pending(&app), "taken once the preview is done"); + let token = app.issue_report.pending.as_ref().unwrap().token; + receive(&mut app, token, Arc::new(ColorImage::new([4, 3], vec![egui::Color32::GREEN; 12]))); + let draft = app.issue_report.draft.as_ref().unwrap(); + assert!(draft.image.is_some(), "{}", draft.note); + assert!(!draft.body.contains("still being computed")); + // A selection changed while it waits: the report's context no longer matches the view. + app.preview.busy = true; + begin(&mut app, &ctx, None, None); + app.session.selection = vec![Sel::Feature { id: 1 }]; + app.preview.busy = false; + tick(&mut app, &ctx); + let draft = app.issue_report.draft.as_ref().unwrap(); + assert!(!pending(&app) && draft.image.is_none() && draft.note.contains("Settings or model changed"), "{}", draft.note); + } + + /// A preview still being computed after a while is what the screenshot shows, and the report + /// says so: a hanging preview is often what is being reported. + #[test] + fn issue_report_screenshot_of_a_preview_that_takes_too_long_shows_it_unfinished() { + let mut app = app(); + let ctx = crate::fonts::test_context(); + app.preview.busy = true; + begin(&mut app, &ctx, None, None); + app.issue_report.waiting.as_mut().unwrap().deadline = -1.0; + tick(&mut app, &ctx); + assert!(pending(&app) && app.issue_report.waiting.is_none()); + let draft = app.issue_report.draft.as_ref().unwrap(); + assert!(draft.note.contains("unfinished") && draft.body.contains("still being computed 10 s after"), "{}", draft.note); + let token = app.issue_report.pending.as_ref().unwrap().token; + receive(&mut app, token, Arc::new(ColorImage::new([4, 3], vec![egui::Color32::GREEN; 12]))); + assert!(app.issue_report.draft.as_ref().unwrap().image.is_some()); + } + + /// What is typed in the frame the preview finishes, as the waiting screenshot is taken and + /// hides the form, is kept too (#7171). A preview error the dialog shows meanwhile is not a + /// change: it is often what is being reported. + #[test] + fn issue_report_typing_as_a_waiting_screenshot_is_taken_is_kept() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.issue_report.draft = Some(draft_for(&h.app, None, None)); + h.frames(8); + h.frame_with(vec![egui::Event::Text("The preview ".into())]); + // The wait ends in the next frame (here: its time is up), before the form is drawn. + let context = context_signature(&h.app, None); + h.app.issue_report.waiting = Some(Waiting { deadline: -1.0, context }); + h.frame_with(vec![egui::Event::Text("vanished".into())]); + assert!(pending(&h.app) && h.app.issue_report.waiting.is_none()); + h.frame_with(vec![egui::Event::Text(".".into())]); + let token = h.app.issue_report.pending.as_ref().unwrap().token; + receive(&mut h.app, token, Arc::new(ColorImage::new([4, 3], vec![egui::Color32::GREEN; 12]))); + h.frames(4); + let draft = h.app.issue_report.draft.as_ref().unwrap(); + assert_eq!(draft.description, "The preview vanished."); + assert!(draft.image.is_some(), "{}", draft.note); + // The dialog's preview error is not part of the context; its inputs are. + let mut app = app(); + app.start("solid.combine"); + let before = context_signature(&app, app.dialog.as_ref()); + if let Some(d) = app.dialog.as_mut() { + d.error = Some("the operation failed".into()); + } + assert_eq!(context_signature(&app, app.dialog.as_ref()), before); + if let Some(d) = app.dialog.as_mut() { + d.extra.insert("probe".into(), json!(1)); + } + assert_ne!(context_signature(&app, app.dialog.as_ref()), before); + } + + /// What is typed while a capture hides the report goes into the field it was typed in. + #[test] + fn issue_report_typing_while_a_capture_hides_the_report_is_kept() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.issue_report.draft = Some(draft_for(&h.app, None, None)); + h.frames(8); + h.frame_with(vec![egui::Event::Text("The preview ".into())]); + let (ctx, dialog) = (h.ctx.clone(), h.app.dialog.clone()); + capture(&mut h.app, &ctx, dialog.as_ref()); + assert!(pending(&h.app)); + h.frame_with(vec![egui::Event::Text("vanished".into())]); + h.frame_with(vec![egui::Event::Text(".".into())]); + let token = h.app.issue_report.pending.as_ref().unwrap().token; + receive(&mut h.app, token, Arc::new(ColorImage::new([4, 3], vec![egui::Color32::GREEN; 12]))); + h.frames(4); + let draft = h.app.issue_report.draft.as_ref().unwrap(); + assert_eq!(draft.description, "The preview vanished."); + assert!(draft.image.is_some()); + } + #[test] fn issue_report_capture_accepts_only_its_matching_unchanged_frame() { let mut app = app(); diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 53eaa0dac..f52388589 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -2037,8 +2037,15 @@ impl SolveApp { control::publish_design(self, &control::DESIGN_WATCH); } - /// Inject synthetic events (one pointer event per frame). + /// The frame's input before the app reads it: synthetic events, then what is typed while a + /// capture hides the report waits for it (the control channel's typing too). pub fn raw_input_hook(&mut self, raw: &mut egui::RawInput) { + self.synthetic_input(raw); + issue_report::hold_input(self, raw); + } + + /// Inject synthetic events (one pointer event per frame). + fn synthetic_input(&mut self, raw: &mut egui::RawInput) { if self.synthetic.is_empty() { return; } From d28874bec1dfbd8484e752fabcd6212765b96132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=27tite=20T=C3=AAte?= Date: Tue, 27 Oct 2026 12:39:53 +0000 Subject: [PATCH 025/102] French: complete the UI catalog (#7131) (#7133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * claim: #7131 * feat: Complete the French UI catalog (#7131) - Add the 1,153 messages missing from fr.json as a pending fr block - Keep the terminology already used in fr.json and French typography --------- Co-authored-by: P'tite Tête --- .../pending/fr-catalog-completion.json | 1157 +++++++++++++++++ 1 file changed, 1157 insertions(+) create mode 100644 assets/locales/pending/fr-catalog-completion.json diff --git a/assets/locales/pending/fr-catalog-completion.json b/assets/locales/pending/fr-catalog-completion.json new file mode 100644 index 000000000..6df68b047 --- /dev/null +++ b/assets/locales/pending/fr-catalog-completion.json @@ -0,0 +1,1157 @@ +{ + "fr": { + "A Single hole snaps to the middle of its face and to the centres of its round edges": "Un perçage simple s'accroche au milieu de sa face et aux centres de ses arêtes circulaires", + "A placed Single hole has a handle to drag it, and picking its face again moves the hole there instead of taking it out": "Un perçage simple placé a une poignée pour le faire glisser ; choisir à nouveau sa face y déplace le perçage au lieu de le retirer", + "A short title for the problem (optional)": "Un titre court pour le problème (facultatif)", + "Add Column": "Ajouter une colonne", + "Add a tool": "Ajouter un outil", + "Add bend": "Ajouter un pli", + "Add to New Folder": "Ajouter à un nouveau dossier", + "Advanced": "Avancé", + "All Lines": "Toutes les lignes", + "Anchor": "Ancrage", + "Angle Display": "Affichage de l'angle", + "Another bend on the far edge of the last flange": "Un autre pli sur l'arête opposée du dernier bord tombé", + "App/system information and command settings are included. Review private details before sharing.": "Les informations sur l'app et le système ainsi que les réglages de la commande sont inclus. Vérifiez les données privées avant de partager.", + "Apply library appearance": "Appliquer l'apparence de la bibliothèque", + "Bar": "Plat", + "Bend": "Angle de pli", + "Bend Edges": "Arêtes de pli", + "Bodies (optional)": "Corps (facultatif)", + "Body (last if none)": "Corps (le dernier si aucun)", + "Body to split": "Corps à scinder", + "Body, or faces to take out": "Corps, ou faces à retirer", + "Bottom Left": "Bas gauche", + "Bottom Middle": "Bas centre", + "Bottom Right": "Bas droite", + "Catch Depth": "Profondeur de l'ergot", + "Catch Length": "Longueur de l'ergot", + "Centroid": "Centroïde", + "Channel": "Profilé en U", + "Choose Variable radius or Spline in Type.": "Choisissez Rayon variable ou Spline dans Type.", + "Circle center": "Centre du cercle", + "Collapse": "Réduire", + "Command": "Commande", + "Component 1": "Composant 1", + "Component 2": "Composant 2", + "Components": "Composants", + "Continue on GitHub": "Continuer sur GitHub", + "Control Radius": "Rayon de contrôle", + "Copies the definition only. Assign it from Physical Material when ready.": "Copie uniquement la définition. Affectez-la depuis Matériau physique le moment venu.", + "Corner radius": "Rayon d'angle", + "Counterbore Ø": "Ø du lamage", + "Countersink Ø": "Ø de la fraisure", + "Create Hole": "Créer un perçage", + "Create Issue…": "Créer un ticket…", + "Current plane": "Plan actuel", + "Custom": "Personnalisé", + "Customize…": "Personnaliser…", + "Cylindrical face": "Face cylindrique", + "Delete Selected Features…": "Supprimer les fonctions sélectionnées…", + "Delete Selected Folders": "Supprimer les dossiers sélectionnés", + "Describe the problem you saw": "Décrivez le problème constaté", + "Describe what happened before continuing.": "Décrivez ce qui s'est passé avant de continuer.", + "Diameter": "Diamètre", + "Distance": "Distance", + "Distance 1": "Distance 1", + "Drag to move the hole; click to remove it": "Faire glisser pour déplacer le perçage ; cliquer pour le retirer", + "End Radius": "Rayon final", + "Expand": "Développer", + "Expected result (optional)": "Résultat attendu (facultatif)", + "Export Bend Table…": "Exporter la table des plis…", + "Export design library...": "Exporter la bibliothèque de la conception...", + "Exported by SolidWorks, which usually saves Y up": "Exporté par SolidWorks, qui enregistre généralement en Y vers le haut", + "Face Appearance": "Apparence de la face", + "Face center": "Centre de la face", + "Faces to split": "Faces à scinder", + "Filter…": "Filtrer…", + "First plane": "Premier plan", + "Fit and G2 corners require Constant radius.": "L'ajustement et les angles G2 nécessitent un rayon constant.", + "Fixed Face": "Face fixe", + "Flange thickness": "Épaisseur d'aile", + "Flanges": "Bords tombés", + "From": "De", + "Full thread depth": "Profondeur de filetage complète", + "Further Bends": "Plis supplémentaires", + "G2 corners require a constant radius and Exact fit. G2 corner construction is not supported yet.": "Les angles G2 nécessitent un rayon constant et un ajustement exact. La construction d'angles G2 n'est pas encore prise en charge.", + "Halo under sketch curves": "Halo sous les courbes d'esquisse", + "Height From": "Hauteur depuis", + "History names": "Noms dans l'historique", + "Hole (optional)": "Perçage (facultatif)", + "I-Beam": "Poutre en I", + "Import material into design": "Importer le matériau dans la conception", + "Included": "Angle inclus", + "Inner Sharp": "Arête vive intérieure", + "Instant": "Instantané", + "Interface font": "Police de l'interface", + "Invert": "Inverser", + "Items": "Éléments", + "Key a joint's value at this step": "Placer une image clé de la valeur d'une liaison à cette étape", + "Keys": "Images clés", + "L-Angle": "Cornière", + "Left Middle": "Milieu gauche", + "Limits": "Limites", + "Line Type": "Type de ligne", + "Lines": "Lignes", + "Listing the installed fonts…": "Liste des polices installées…", + "Load library": "Charger la bibliothèque", + "M5 or M5x0.5": "M5 ou M5x0.5", + "M5, M5x0.5, 1/4-20 UNC": "M5, M5x0.5, 1/4-20 UNC", + "Material Outside": "Matière à l'extérieur", + "Material copied. Existing body assignments are unchanged.": "Matériau copié. Les affectations existantes des corps sont inchangées.", + "Maximum": "Maximum", + "Mesh body": "Corps maillé", + "Minimum": "Minimum", + "Mirror Plane": "Plan de symétrie", + "Mouse gestures": "Gestes de la souris", + "Mouse gestures only work with the SolidWorks mouse mode (the wheel orbits, Ctrl + wheel pans).": "Les gestes de la souris ne fonctionnent qu'avec le mode souris SolidWorks (la molette fait orbiter, Ctrl + molette fait un panoramique).", + "Move holes by clicking or dragging": "Déplacer les perçages en cliquant ou en faisant glisser", + "Name on import": "Nom à l'importation", + "No matching physical materials.": "Aucun matériau physique correspondant.", + "Nominal diameter": "Diamètre nominal", + "Not saved yet": "Pas encore enregistré", + "Of": "Degré de liberté", + "On your computer": "Sur votre ordinateur", + "Open bodies (no volume)": "Corps ouverts (sans volume)", + "Open library...": "Ouvrir une bibliothèque...", + "Open surface — no volume": "Surface ouverte — sans volume", + "Opens your browser and copies the report text for you to paste into GitHub.": "Ouvre votre navigateur et copie le texte du rapport pour que vous le colliez dans GitHub.", + "Opens your browser. Review and submit your report on GitHub.": "Ouvre votre navigateur. Vérifiez et soumettez votre rapport sur GitHub.", + "Orbit (right drag)": "Orbite (glisser avec le bouton droit)", + "Other way": "Sens opposé", + "Outer Sharp": "Arête vive extérieure", + "Outer radius": "Rayon extérieur", + "Physical material definitions": "Définitions de matériaux physiques", + "Pitch": "Pas", + "Pivot": "Pivot", + "Play the joint's motion in the view": "Lire le mouvement de la liaison dans la vue", + "Preview": "Aperçu", + "Profile / Edges": "Profil / Arêtes", + "Profiles or curves": "Profils ou courbes", + "Radius": "Rayon", + "Rectangular Tube": "Tube rectangulaire", + "Remove condition": "Supprimer la condition", + "Remove from Folder": "Retirer du dossier", + "Remove this bend": "Supprimer ce pli", + "Rename Feature": "Renommer la fonction", + "Rename Folder": "Renommer le dossier", + "Replace existing library file": "Remplacer le fichier de bibliothèque existant", + "Report text copied. Paste it into GitHub and submit your report there.": "Texte du rapport copié. Collez-le dans GitHub et soumettez-y votre rapport.", + "Reports are public. A GitHub account is required.": "Les rapports sont publics. Un compte GitHub est nécessaire.", + "Restore this studio's tools": "Restaurer les outils de ce studio", + "Review your report on GitHub and click Submit new issue to publish it.": "Vérifiez votre rapport sur GitHub et cliquez sur Submit new issue pour le publier.", + "Rib Length": "Longueur de nervure", + "Rib Offset": "Décalage de nervure", + "Rib Thickness": "Épaisseur de nervure", + "Ribs": "Nervures", + "Right Middle": "Milieu droite", + "Ring of tools on the right button": "Anneau d'outils sur le bouton droit", + "Roll Back Here": "Revenir ici dans l'historique", + "Root radius": "Rayon de raccordement", + "Round Bar": "Rond plein", + "Round Tube": "Tube rond", + "Same way": "Même sens", + "Save screenshot…": "Enregistrer la capture d'écran…", + "Screenshot (optional)": "Capture d'écran (facultative)", + "Second plane": "Second plan", + "Section (optional)": "Section (facultative)", + "Sections (one sketch each)": "Sections (une esquisse chacune)", + "Select Other": "Sélectionner un autre", + "Select edges": "Sélectionner des arêtes", + "Shaded": "Ombré", + "Show ghost": "Afficher le fantôme", + "Snap to face and edge centres": "Accrocher aux centres des faces et des arêtes", + "Splitting tool": "Outil de scission", + "Steps to reproduce (optional)": "Étapes pour reproduire le problème (facultatives)", + "Studio": "Studio", + "Summary": "Résumé", + "Suppress": "Désactiver", + "Surface, or faces to turn over": "Surface, ou faces à retourner", + "Tangent": "Tangence", + "Tangent chain": "Chaîne tangente", + "Tangent to Edge": "Tangent à l'arête", + "Tap drill diameter": "Diamètre de l'avant-trou", + "Target": "Cible", + "Target Body": "Corps cible", + "Technical details": "Détails techniques", + "This image is not attached to GitHub yet. Copy or save it, then attach it on GitHub.": "Cette image n'est pas encore jointe sur GitHub. Copiez-la ou enregistrez-la, puis joignez-la sur GitHub.", + "Thread depth": "Profondeur de filetage", + "Thread diameter": "Diamètre de filetage", + "To": "À", + "Toe radius": "Rayon d'extrémité", + "Tool Bodies": "Corps outils", + "Tools": "Outils", + "Tools, clockwise from the top": "Outils, dans le sens horaire à partir du haut", + "Top Left": "Haut gauche", + "Top Middle": "Haut centre", + "Top Right": "Haut droite", + "Unsuppress": "Réactiver", + "Use the SolidWorks mouse mode": "Utiliser le mode souris SolidWorks", + "Variable Radius": "Rayon variable", + "Web thickness": "Épaisseur d'âme", + "What did you do just before the problem? A short list is enough": "Qu'avez-vous fait juste avant le problème ? Une courte liste suffit", + "What did you expect to see?": "Qu'attendiez-vous ?", + "What happened?": "Que s'est-il passé ?", + "With gestures on, the right button no longer orbits the view: hold it and move to open the ring, then touch a tool's zone. A plain right-click still opens the menu.": "Avec les gestes activés, le bouton droit ne fait plus orbiter la vue : maintenez-le et déplacez la souris pour ouvrir l'anneau, puis touchez la zone d'un outil. Un simple clic droit ouvre toujours le menu.", + "X": "X", + "X Angle": "Angle X", + "Y": "Y", + "Y Angle": "Angle Y", + "Z": "Z", + "Z Angle": "Angle Z", + "Z Distance": "Distance Z", + "ai.connected_toast": "SolidCraft est maintenant disponible dans {clients}. Redémarrez-les pour l'utiliser (Paramètres > Assistant).", + "ai.prefs.allow_control": "Autoriser la connexion des agents IA (canal de contrôle / MCP)", + "ai.prefs.allow_control_note": "Ouvre un canal de contrôle limité à cet ordinateur (127.0.0.1, port 27878 ou le suivant disponible). Un programme qui se connecte doit aussi présenter un jeton secret lisible uniquement par votre compte utilisateur, régénéré à chaque démarrage. Prend effet au prochain démarrage de SolidCraft. Désactivé : rien n'écoute, sauf si vous lancez SolidCraft avec --control.", + "ai.prefs.availability": "Contrôles de l'assistant", + "ai.prefs.background_commands": "Exécuter les commandes de l'agent en arrière-plan", + "ai.prefs.connect_apps": "Rendre SolidCraft disponible pour les apps d'IA de cet ordinateur", + "ai.prefs.connect_apps_note": "Au démarrage, SolidCraft s'ajoute comme serveur MCP aux apps d'IA trouvées sur cet ordinateur (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), pour qu'un agent puisse l'utiliser sans configuration. Seule l'entrée solidcraft est ajoutée ou son chemin mis à jour ; une entrée que vous avez modifiée n'est pas touchée, et le fichier est d'abord sauvegardé. Désactivé : les entrées ajoutées sont retirées. Aide > Connecter les assistants IA… le fait manuellement.", + "ai.prefs.follow_camera": "Orienter la caméra vers les esquisses", + "ai.prefs.follow_camera_off": "Le suivi automatique de la caméra est désactivé.", + "ai.prefs.follow_camera_on": "La caméra se tourne face aux esquisses créées par l'agent.", + "ai.prefs.intro": "Les agents, leurs autorisations et l'affichage de leur travail.", + "ai.prefs.make_default": "Utiliser par défaut", + "ai.prefs.no_agents": "Aucun agent pour l'instant. Ajoutez un agent ou actualisez pour trouver les agents installés.", + "ai.prefs.no_saved_approvals": "Aucune autorisation enregistrée.", + "ai.prefs.override_all_warning": "Cet agent peut enregistrer, écraser, exporter ou remplacer la conception sans demander.", + "ai.prefs.permission_all": "Tout autoriser", + "ai.prefs.permission_all_summary": "Les outils SolidCraft disponibles s'exécutent sans demander.", + "ai.prefs.permission_ask": "Demander avant les modifications", + "ai.prefs.permission_ask_summary": "Approuver chaque modification de la conception et chaque action sur les fichiers.", + "ai.prefs.permission_edits": "Autoriser les modifications du modèle", + "ai.prefs.permission_edits_summary": "Les modifications du modèle s'exécutent ; les actions sur les fichiers et destructives demandent toujours.", + "ai.prefs.permission_scope": "Pour les outils SolidCraft uniquement. Le shell et les modifications de fichiers de l'agent utilisent ses propres autorisations.", + "ai.prefs.pointer_preview_hidden": "Pointeur masqué", + "ai.prefs.pointer_preview_speed": "Pointeur de l'agent · {speed}", + "ai.prefs.pointer_speed": "Vitesse de déplacement", + "ai.prefs.privacy_note": "Seul l'agent ou le point d'accès que vous avez choisi reçoit la conversation. Les clés des points d'accès sont stockées dans le trousseau du système.", + "ai.prefs.show_pointer": "Afficher le pointeur de l'agent", + "ai.prefs.turn_limit_hint": "Nombre maximal d'appels d'outils modifiant la conception que l'assistant peut faire pour un message.", + "cmd.browser_collapse_all": "Tout réduire", + "cmd.browser_expand_all": "Tout développer", + "cmd.component_copies": "Trouver les copies identiques", + "cmd.component_cycle_color": "Changer la couleur du composant", + "cmd.component_extract": "Extraire dans un fichier", + "cmd.component_replace_with_link": "Remplacer par un lien", + "cmd.inspect_colored_components": "Activer les couleurs des composants", + "cmd.inspect_colored_components_disable": "Désactiver les couleurs des composants", + "cmd.inspect_parameter_sweep": "Balayage de paramètre", + "cmd.motion_trace_edit": "Modifier la trajectoire de mouvement", + "cmd.occurrence_drag": "Faire glisser l'occurrence", + "cmd.render_aging_describe": "Vieillissement de surface en couches", + "cmd.render_camera_fit": "Cadrer le sujet du rendu", + "cmd.render_camera_get": "Inspecter la caméra de rendu", + "cmd.render_effects_describe": "Objectif et effets créatifs", + "cmd.render_hdr_inspect": "Inspecter la source HDR", + "cmd.render_library_appearance_apply": "Appliquer une apparence opaque de la bibliothèque", + "cmd.render_library_describe": "Inspecter une ressource de la bibliothèque de rendu", + "cmd.render_library_environment_apply": "Appliquer un environnement HDR intégré", + "cmd.render_library_list": "Parcourir la bibliothèque de rendu", + "cmd.render_library_physical_prepare": "Préparer une référence physique", + "cmd.render_library_preview": "Inspecter la texture de surface d'origine", + "cmd.render_library_studio_apply": "Appliquer les lumières de studio conçues", + "cmd.render_library_studio_prepare": "Préparer les lumières de studio conçues", + "cmd.render_library_surface_bind": "Enregistrer l'association de surface", + "cmd.render_library_surface_prepare": "Préparer les textures de surface conçues", + "cmd.render_library_surface_unbind": "Supprimer l'association de surface", + "cmd.render_library_targets": "Trouver les cibles de la bibliothèque de rendu", + "cmd.render_optics_bind": "Enregistrer l'association optique", + "cmd.render_optics_unbind": "Supprimer l'association optique", + "cmd.render_preset_apply": "Appliquer le studio natif", + "cmd.render_preset_resolve": "Examiner le studio natif", + "cmd.render_quality_prepare": "Examiner le budget d'échantillonnage fixe", + "cmd.render_result_pin": "Conserver le rendu affiché", + "cmd.render_result_regrade": "Réétalonner le master linéaire", + "cmd.render_settings_capture_hdr": "Enregistrer les réglages de rendu avec HDR", + "cmd.render_shot_duplicate": "Dupliquer la prise de vue", + "cmd.render_shot_remove": "Supprimer la prise de vue", + "cmd.render_shot_rename": "Renommer la prise de vue", + "cmd.render_stage_backdrop": "Enregistrer l'arrière-plan physique du rendu", + "cmd.render_stage_clear": "Supprimer le décor de rendu", + "cmd.render_stage_ground": "Enregistrer le sol du rendu", + "cmd.sheet_path_flange": "Bord tombé sur trajectoire", + "cmd.sketch_cancel": "Annuler l'esquisse", + "cmd.view_back": "Vue arrière", + "cmd.view_bottom": "Vue de dessous", + "cmd.view_front": "Vue de face", + "cmd.view_isometric": "Vue isométrique", + "cmd.view_left": "Vue de gauche", + "cmd.view_normal_to": "Vue normale à la sélection", + "cmd.view_right": "Vue de droite", + "cmd.view_top": "Vue de dessus", + "diagnostic.empty_boolean_component": "il n'y a aucun corps à couper ou à intersecter dans le composant « {component} » ; l'outil chevauche peut-être « {body} » dans le composant « {other} » : activez ce composant ou choisissez ce corps comme cible", + "document.changed_on_disk": "{name} a été modifié sur le disque", + "document.changed_on_disk_detail": "{name} a été modifié par un autre programme ou un autre ordinateur depuis que vous l'avez ouvert ou enregistré. Écraser remplace ces modifications par les vôtres ; Enregistrer une copie conserve les deux.", + "document.copy_name": "{name} (copie)", + "document.open_anyway": "Ouvrir quand même", + "document.open_elsewhere": "{name} est déjà ouvert", + "document.open_elsewhere_detail": "{name} est ouvert dans SolidCraft {app} sur {who} (ouvert {when}). Si vous enregistrez tous les deux, l'un de vous perdra son travail. Ouvrez-le en lecture seule pour le consulter sans l'écraser.", + "document.open_read_only": "Ouvrir en lecture seule", + "document.opened_read_only": "Ouvert en lecture seule : Enregistrer demande un nouveau fichier", + "document.overwrite": "Écraser", + "document.read_only_save": "Cette conception a été ouverte en lecture seule : enregistrez-la dans un nouveau fichier", + "document.save_copy": "Enregistrer une copie…", + "file.open.drawing_filter": "Conceptions, fichiers CAO, maillages et dessins", + "file_load.link_item": "{name} ({done} sur {total})", + "file_load.updating_links": "Mise à jour des liens", + "from the profile": "depuis le profil", + "help.connect_note": "Redémarrez chaque assistant pour charger le serveur SolidCraft. Chaque fichier a été sauvegardé en .bak avant d'être modifié.", + "help.connect_title": "Connecter les assistants IA", + "joint.rigid_group_one_component": "Ces {count} corps sont tous dans un même composant (ou dans la conception elle-même) : utilisez d'abord {command}.", + "joint.rigid_group_select_components": "Sélectionnez au moins deux composants.", + "material.editor.add_property": "Ajouter une propriété", + "material.editor.add_source": "Ajouter une source", + "material.editor.assigned_density": "Masse volumique affectée", + "material.editor.axes": "Axes du matériau", + "material.editor.axes_numeric": "1 / 2 / 3", + "material.editor.axes_wood": "L / R / T", + "material.editor.copy_name": "{name} (copie)", + "material.editor.density_range": "La masse volumique affectée doit être supérieure à 0 et au plus égale à 1000 g/cm³.", + "material.editor.designation": "Désignation", + "material.editor.duplicate": "Dupliquer", + "material.editor.engineering_card": "Fiche de propriétés techniques", + "material.editor.family": "Famille de matériau", + "material.editor.glass": "Verre", + "material.editor.illustrative": "Indicatif", + "material.editor.invalid_property": "Type de propriété non pris en charge.", + "material.editor.isotropic": "Isotrope", + "material.editor.measurement": "Mesure", + "material.editor.metal": "Métal", + "material.editor.moisture": "Humidité, base sèche", + "material.editor.name_required": "Saisissez un nom de 1 à 128 caractères.", + "material.editor.no_draft": "Aucun brouillon de matériau n'est ouvert.", + "material.editor.number_required": "Saisissez une valeur numérique finie.", + "material.editor.orthotropic": "Orthotrope", + "material.editor.other": "Autre", + "material.editor.polymer": "Polymère", + "material.editor.preserved_appearance": "Apparence conservée", + "material.editor.public_reference": "Référence publique", + "material.editor.reference": "Référence", + "material.editor.save_or_discard": "Enregistrez ou abandonnez le brouillon de matériau avant d'affecter un matériau.", + "material.editor.saved": "Matériau enregistré. Les affectations des corps sont inchangées.", + "material.editor.scope": "Enregistrer stocke ce matériau sans l'affecter à des corps. Les propriétés et conditions vides restent inconnues. La masse volumique de la fiche ne modifie ni la masse volumique affectée ni la masse.", + "material.editor.source_id": "ID de la source", + "material.editor.source_kind": "Type de source", + "material.editor.source_title": "Titre de la source", + "material.editor.sources": "Sources", + "material.editor.stale": "Ce matériau a changé pendant que le brouillon était ouvert. Abandonnez-le et rouvrez-le avant d'enregistrer.", + "material.editor.state": "État du matériau", + "material.editor.strain_rate": "Vitesse de déformation", + "material.editor.symmetry": "Symétrie élastique", + "material.editor.temperature": "Température", + "material.editor.unknown_card": "Les propriétés techniques sont inconnues. L'enregistrement peut ne conserver que la masse volumique affectée et l'apparence existante.", + "material.editor.user_supplied": "Fourni par l'utilisateur", + "material.editor.wood": "Bois", + "nav.alias.help": "Maj+Alt+glisser gauche fait orbiter, Maj+Alt+milieu fait un panoramique, Maj+Alt+droit zoome ; glisser avec le milieu fait aussi un panoramique et glisser avec le droit fait orbiter", + "nav.blender.help": "Glisser avec le milieu fait orbiter, Maj+milieu fait un panoramique, Ctrl+milieu zoome ; glisser avec le droit ne touche pas la caméra", + "nav.free_orbit.help": "La souris et la souris 3D tournent en passant par les deux pôles et conservent le roulis. L'alignement des axes avec Maj est désactivé.", + "nav.free_orbit.label": "Orbite libre", + "nav.fusion.help": "Glisser avec le milieu fait un panoramique, Maj+milieu fait orbiter, glisser avec le droit fait orbiter", + "nav.inventor.help": "Glisser avec le milieu fait un panoramique, Maj+milieu fait orbiter, Ctrl+milieu zoome, glisser avec le droit fait orbiter", + "nav.openscad.help": "Glisser avec le gauche dans le vide fait orbiter, Maj+glisser gauche sélectionne par rectangle, glisser la géométrie d'esquisse la modifie ; glisser avec le droit ou le milieu fait un panoramique, Maj+droit ou Maj+milieu zoome", + "nav.solidworks.help": "Glisser avec le milieu fait orbiter, Ctrl+milieu fait un panoramique, Maj+milieu zoome, glisser avec le droit fait orbiter", + "nav.tinkercad.help": "Glisser avec le droit fait orbiter, glisser avec le milieu ou Maj+droit fait un panoramique", + "perf.click_for_details": "Cliquer pour les détails : graphe des temps d'image, histogramme et ce que le GPU a dessiné", + "perf.draw_calls": "Appels de dessin", + "perf.line_segments": "Segments de ligne", + "perf.low_1": "1 % bas", + "perf.renderer": "Moteur de rendu", + "perf.scene_build": "Construction de la scène", + "perf.triangles": "Triangles", + "perf.ui_time": "Temps de l'interface", + "perf.viewport": "Vue 3D", + "perf.worst": "pire", + "pick the path": "choisir la trajectoire", + "prefs.add_item": "Ajouter l'élément", + "prefs.alt_frees_manipulators": "Alt / Option libère aussi les flèches du manipulateur", + "prefs.anti_aliasing_amd_dx12": "L'anticrénelage est à 1× car la vérification au démarrage n'a rien dessiné avec le multiéchantillonnage et a réussi à 1×. Vous pouvez choisir un autre réglage ci-dessus ; redémarrez pour l'appliquer si la vérification réussit.", + "prefs.anti_aliasing_note": "Adoucit les bords crénelés.", + "prefs.applies_on_restart": "Appliqué au redémarrage", + "prefs.assistant": "Assistant", + "prefs.axes": "Axes", + "prefs.axis": "Axe", + "prefs.bottom": "Bas", + "prefs.browser": "Navigateur", + "prefs.built_in": "Intégrée", + "prefs.button_left": "Glisser gauche", + "prefs.button_middle": "Glisser milieu", + "prefs.button_right": "Glisser droit", + "prefs.choose_font": "Choisir un fichier de police…", + "prefs.click": "Clic", + "prefs.contact_shading": "Ombrage de contact doux", + "prefs.contact_shading_note": "Ombrage doux là où les pièces se rapprochent.", + "prefs.context_menu": "Menu contextuel", + "prefs.context_menu_ring": "Menu contextuel · maintenir pour le menu radial", + "prefs.crash_reports": "Ouvrir les rapports de plantage…", + "prefs.crash_reports_note": "Les rapports sont conservés sur cet ordinateur, avec la conception et les commandes qui reproduisent le problème.", + "prefs.ctrl_cmd": "Ctrl / Cmd", + "prefs.curved_surfaces": "Surfaces courbes", + "prefs.curves": "Surfaces courbes", + "prefs.dead_zone_note": "La bande hachurée est la zone morte : les mouvements à l'intérieur sont ignorés.", + "prefs.default": "par défaut", + "prefs.design": "Valeurs par défaut des conceptions", + "prefs.design_note": "Ce avec quoi démarrent les nouvelles conceptions. Les conceptions ouvertes gardent les leurs.", + "prefs.devices": "Souris 3D", + "prefs.display": "Affichage", + "prefs.edges": "Arêtes et ombrage", + "prefs.extend": "Étendre", + "prefs.extra_navigation": "Ctrl+glisser gauche dans le vide fait orbiter ; maintenir Espace pour un panoramique.", + "prefs.follows_os": "Suit le système", + "prefs.font": "Police", + "prefs.font_fallback": "Les caractères absents de la police choisie utilisent la police intégrée, pour qu'aucun libellé n'affiche de case vide.", + "prefs.font_sample": "Portez ce vieux whisky au juge blond qui fume · Ø12,50 mm · 45,0° · 0123456789", + "prefs.font_unreadable": "La police sélectionnée n'a pas pu être lue.", + "prefs.general": "Général", + "prefs.general_note": "Langue, enregistrement et mises à jour.", + "prefs.gesture_orbit": "Orbite", + "prefs.gesture_pan": "Panoramique", + "prefs.gesture_zoom": "Zoom", + "prefs.graphics": "Graphisme", + "prefs.graphics_card": "Carte graphique", + "prefs.graphics_card_auto": "Automatique", + "prefs.graphics_card_missing": "La carte graphique enregistrée n'est pas disponible ; Automatique est utilisé.", + "prefs.graphics_card_restart": "Prend effet après le redémarrage de SolidCraft. WGPU_ADAPTER_NAME prévaut sur ce choix.", + "prefs.graphics_note": "Compromis entre vitesse et fluidité. Chaque choix montre son effet sur un exemple.", + "prefs.graphics_presets_note": "Les préréglages définissent ensemble les choix ci-dessous.", + "prefs.history": "Historique", + "prefs.hold_stop_snapping": "Maintenir pour désactiver l'accrochage", + "prefs.icons_only": "Icônes seules", + "prefs.imported_file": "Fichier importé", + "prefs.input": "Saisie", + "prefs.interface": "Interface", + "prefs.interface_language": "Langue de l'interface", + "prefs.interface_note": "L'apparence de SolidCraft et la place de ses éléments.", + "prefs.interval_minutes": "{n} min", + "prefs.labels": "Libellés", + "prefs.layout": "Disposition", + "prefs.layout_note": "Compacte : ancre les panneaux aux bords de la fenêtre. La transparence du navigateur est disponible en mode Flottante. Changez le côté de l'assistant dans la page Assistant.", + "prefs.left": "Gauche", + "prefs.left_click": "Clic gauche", + "prefs.live_input": "Saisie en direct", + "prefs.live_preview": "Aperçu en direct", + "prefs.minutes": "minutes", + "prefs.mouse": "Souris et pavé tactile", + "prefs.mouse_heading": "Souris", + "prefs.mouse_mapping": "Affectation des boutons de la souris", + "prefs.navigation": "Navigation", + "prefs.navigation_note": "Comment la souris, le pavé tactile et la souris 3D déplacent la vue.", + "prefs.not_on_gpu": "indisponible sur ce GPU", + "prefs.on": "Activé", + "prefs.opaque": "Opaque", + "prefs.orbit_snap": "Maintenir Maj pendant l'orbite pour s'aligner sur un axe.", + "prefs.orientation": "Orientation", + "prefs.overall_speed": "Vitesse globale", + "prefs.prefer_free_sketch_points": "Privilégier les points d'esquisse déplaçables quand des points se superposent", + "prefs.preview_choices": "Aperçu de vos choix", + "prefs.quality_default": "par défaut", + "prefs.quality_fastest": "le plus rapide", + "prefs.quality_slowest": "le plus lent", + "prefs.quality_smoother": "plus fluide", + "prefs.reports_saved": "Enregistrés : {n}", + "prefs.right_click": "Clic droit", + "prefs.saving": "Enregistrement automatique et récupération", + "prefs.scale_note": "Également Ctrl + / Ctrl − dans la fenêtre. Les boutons font 28 px à 100 %.", + "prefs.scale_text": "Échelle et texte", + "prefs.select": "Sélectionner", + "prefs.select_one_item": "Sélectionner un élément", + "prefs.selecting": "Sélection", + "prefs.shift": "Shift", + "prefs.shift_add_ctrl_toggle": "Maj ajoute seulement ; Ctrl / Cmd bascule", + "prefs.shift_add_note": "Activé : Maj ajoute, Ctrl / Cmd bascule. Désactivé (par défaut) : les deux basculent.", + "prefs.shortcuts": "Raccourcis", + "prefs.sketch_selection": "Esquisse et sélection", + "prefs.sketch_selection_heading": "Esquisse et sélection", + "prefs.sketch_selection_note": "Comment les esquisses s'accrochent et comment les clics sélectionnent.", + "prefs.sketching": "Esquisse", + "prefs.snap_drawing_note": "Pendant le dessin ou le déplacement d'un point d'esquisse.", + "prefs.source": "Source", + "prefs.speed": "Vitesse", + "prefs.stand_up_note": "Après l'ouverture d'un fichier STEP ou IGES en Z vers le haut, proposer un quart de tour autour de X.", + "prefs.status_done": "Terminé", + "prefs.status_error": "Erreur", + "prefs.status_selected": "Sélectionné", + "prefs.status_warning": "Avertissement", + "prefs.supersampling_brief": "Dessine la vue en plus grand puis la réduit par filtrage : très net, mais plus lourd.", + "prefs.tab_accent_note": "La couleur d'accent suit l'onglet actif", + "prefs.theme_file": "fichier de thème", + "prefs.timeline_half_hour": "−30 min", + "prefs.timeline_now": "maintenant", + "prefs.timeline_quarter_hour": "−15", + "prefs.toggle_item": "Ajouter l'élément, ou le retirer à nouveau", + "prefs.toolbar": "Barre d'outils", + "prefs.translucent": "Translucide", + "prefs.under_browser": "Sous le navigateur", + "prefs.under_cursor": "Sous le curseur", + "prefs.units_precision": "Unités et précision", + "prefs.updates": "Mises à jour", + "prefs.view": "Comportement de la vue", + "prefs.view_confirm_corner": "OK et Annuler dans le coin de la vue", + "prefs.view_confirm_corner_note": "Lorsqu'une boîte de dialogue ou une esquisse est ouverte, une coche et une croix en haut à droite de la vue font la même chose que OK et Annuler, ou terminent et annulent l'esquisse. Le repère de navigation se place en dessous.", + "prefs.viewport": "Vue 3D", + "prefs.wheel": "Molette", + "prefs.wheel_trackpad": "Molette et pavé tactile", + "prefs.workspace": "Espace de travail", + "prefs.zoom_toward_cursor": "Zoom, vers le curseur", + "render.adaptive_absolute": "Plancher d'erreur RVB absolu", + "render.adaptive_coverage": "Erreur de couverture visée", + "render.adaptive_enable": "Répartir les échantillons avec des pilotes indépendants", + "render.adaptive_help": "GPU uniquement. Les échantillons pilotes indépendants sont écartés, puis 16 échantillons de production ou plus par pixel sont répartis, jusqu'à Échantillons par pixel. La variance RVB et de couverture guide la répartition ; des chemins rares peuvent être manqués et des pixels plafonnés peuvent rester bruités. Le rapport final compte le travail réellement effectué. Aucune garantie certifiée de bruit ou de durée.", + "render.adaptive_minimum": "Échantillons de production minimum", + "render.adaptive_pending": "La répartition adaptative à pilotes indépendants sur GPU et les strates de Fresnel conditionnelles sont disponibles. La convergence certifiée, les garanties sur les événements rares et le transport adaptatif sur CPU restent indisponibles.", + "render.adaptive_pilots": "Échantillons pilotes par pixel", + "render.adaptive_relative": "Erreur RVB relative visée", + "render.add_ground": "Ajouter un sol ajusté au préréglage", + "render.advanced_material_scope": "Un milieu GPU homogène et fini est disponible, dans des limites explicites. Les grilles de densité, les combinaisons verre/volume imbriquées, les surfaces à diffusion sous-surfacique, le déplacement, le transport spectral et les concepts de matériaux avancés non liés restent indisponibles.", + "render.aging_add": "Ajouter une couche de vieillissement", + "render.aging_airborne": "Poussière en suspension / milieu participant", + "render.aging_airborne_help": "La poussière en suspension est un volume diffusant homogène et fini, distinct. Elle modifie le transport et l'EXR brut, pas la pile de vieillissement de surface. Les restrictions existantes sur les volumes, le verre et le débruitage restent explicites ; aucune atmosphère n'est ajoutée automatiquement.", + "render.aging_all_bodies": "Tous les corps opaques éligibles", + "render.aging_chips": "Peinture écaillée", + "render.aging_class_any": "Toutes les classes de matériaux opaques", + "render.aging_class_dielectric": "Surfaces non métalliques uniquement", + "render.aging_class_metal": "Surfaces métalliques uniquement", + "render.aging_color": "Couleur de la couche · sRVB", + "render.aging_coverage": "Couverture", + "render.aging_dust": "Poussière déposée", + "render.aging_empty": "Aucune couche de vieillissement : les surfaces d'origine restent inchangées.", + "render.aging_fading": "Revêtement délavé", + "render.aging_grime": "Crasse et taches", + "render.aging_help": "Combinez jusqu'à huit couches optiques, dans l'ordre. La rouille et la patine sont des apparences conçues, pas des simulations de vieillissement ou de corrosion. L'échelle est en millimètres du monde. Aucune géométrie, masse ou propriété technique n'est modifiée ; le verre et les éléments de décor passifs sont exclus.", + "render.aging_metallic": "Fraction métallique de la couche", + "render.aging_origin": "Origine du champ · mm monde", + "render.aging_patina": "Patine vert-de-gris", + "render.aging_refresh_targets": "Inspecter les corps actuels", + "render.aging_roughness": "Rugosité de la couche", + "render.aging_rust": "Fer oxydé / rouille", + "render.aging_scale": "Échelle du motif", + "render.aging_scratches": "Rayures fines", + "render.aging_target": "Cible et coordonnées", + "render.aging_target_help": "Une cible nommée doit toujours correspondre à l'index et au nom capturés. Les masques globaux sont ancrés dans le monde ; ils ne suivent pas les pièces mobiles. Ce n'est ni une détection de cavités ni une véritable usure des arêtes. Filtrez la liste pour atteindre d'autres corps.", + "render.aging_target_search": "Filtrer les noms des corps", + "render.aging_upward": "Dépôt sur les faces orientées vers le haut", + "render.all_controls_help": "Inspection détaillée de toutes les commandes actuelles. Les pages de section permettent une modification ciblée sans changer la requête sous-jacente.", + "render.appearance_physics_separate": "L'apparence visuelle n'affecte ni masse volumique, ni données thermiques, ni autres propriétés techniques.", + "render.availability_native": "Composition native ; à examiner avant d'appliquer", + "render.availability_projection": "Projection prise en charge ; voir la portée et les omissions", + "render.availability_reference": "Données de référence ; pas une affectation automatique", + "render.backdrop_alpha_conflict": "Choisissez cet arrière-plan ou une sortie PNG transparente ; le moteur de rendu n'ignorera aucun des deux réglages en silence.", + "render.backdrop_enable": "Utiliser un arrière-plan en dégradé pour la caméra uniquement", + "render.backdrop_first": "Couleur de début / du centre", + "render.backdrop_help": "Cet arrière-plan en espace écran n'éclaire pas, ne projette pas d'ombre, ne se reflète pas et ne représente pas un terrain. Il est exclu de l'EXR brut. La géométrie, les lumières et l'environnement HDR restent indépendants.", + "render.backdrop_horizontal": "Dégradé horizontal", + "render.backdrop_radial": "Dégradé radial", + "render.backdrop_radius": "Rayon", + "render.backdrop_second": "Couleur de fin / du bord", + "render.backdrop_vertical": "Dégradé vertical", + "render.backdrop_x": "Centre X", + "render.backdrop_y": "Centre Y", + "render.background_camera_section": "Arrière-plan de la caméra · présentation PNG", + "render.background_completed_frozen": "Le résultat affiché est une image terminée figée. Modifier un arrière-plan ne repeint pas automatiquement ce résultat. Utilisez Réétalonner pour les changements de caméra uniquement, ou Rendu pour un nouveau décor physique.", + "render.background_hdr_separate": "Les ressources HDR actuelles éclairent les surfaces et s'y reflètent ; elles ne sont pas affichées automatiquement en panorama derrière le sujet. Modifier un dégradé ne fait pas tourner l'éclairage et ne change pas sa couleur.", + "render.background_lighting_section": "Éclairage HDR · distinct de l'arrière-plan de la caméra", + "render.background_no_alpha_override": "Un arrière-plan de caméra n'est pas ajouté en silence à une sortie transparente. Le réétalonnage du master brut utilise la couverture capturée et ne réapplique pas le débruitage ; l'EXR source reste inchangé.", + "render.background_not_light": "La couleur d'arrière-plan relève de la présentation, ce n'est pas une source d'éclairage supplémentaire.", + "render.background_regrade": "Appliquer au master brut conservé", + "render.background_stage_occlusion": "Cette prise de vue contient de la géométrie de décor physique. Un grand sol ou un grand mur peut remplir le cadre et masquer un arrière-plan propre à la caméra. Effacez ou redimensionnez délibérément le décor, ou changez sa réflectance physique. Le réétalonnage ne peut pas retirer la géométrie capturée.", + "render.background_workflow": "Choisissez l'arrière-plan voulu : une couleur ou un dégradé propre à la caméra, un décor physique qui reçoit la lumière, ou un éclairage HDR. Ils sont indépendants. L'aperçu en direct est une vue de modélisation ; lancez un nouveau rendu ou réétalonnez un master conservé pour voir la finition de la caméra.", + "render.base_appearance": "Apparence modifiable du corps", + "render.base_apply": "Appliquer l'apparence du corps", + "render.base_apply_help": "Une affectation visuelle unique, annulable, au corps exact examiné. Les apparences propres aux faces et les matériaux techniques existants restent distincts.", + "render.base_color": "Couleur de base · sRVB", + "render.base_metallic": "Fraction métallique", + "render.base_opaque_only": "Cet éditeur conserve la sémantique des corps opaques. Utilisez les commandes de verre dédiées pour la transmission optique.", + "render.bloom_enable": "Halo lumineux (bloom) à l'affichage", + "render.bloom_help": "Lueur créative appliquée à la sortie seulement, à partir des hautes lumières linéaires positives, étalée par trois passes de flou normalisées. Le rayon est en pixels de sortie. Ajoutée en lumière d'affichage linéaire avant sRVB ; ce n'est ni un effet d'objectif, ni un effet volumétrique, ni une amélioration de la convergence. L'EXR brut est inchangé.", + "render.bloom_opaque": "Le halo lumineux nécessite une sortie opaque. Un PNG transparent est refusé, pas aplati en silence.", + "render.bloom_radius": "Rayon du halo lumineux", + "render.bloom_strength": "Intensité du halo lumineux", + "render.bloom_threshold": "Seuil des hautes lumières linéaires du halo", + "render.browse_capabilities": "Inspecter le catalogue complet des capacités", + "render.browse_environments": "Parcourir les environnements HDR d'origine", + "render.browse_native_scenes": "Parcourir les studios natifs", + "render.browse_physical": "Inspecter les références physiques", + "render.browse_quality": "Inspecter les spécifications de qualité", + "render.browse_rigs": "Parcourir les dispositifs d'éclairage conçus", + "render.browse_scene_specs": "Parcourir les spécifications de scène avancées", + "render.browse_surfaces": "Parcourir les surfaces conçues", + "render.browser_library": "Bibliothèque", + "render.browser_model": "Modèle", + "render.camera_distance": "Distance de l'œil à la cible", + "render.camera_exact_help": "Millimètres du monde ; les angles sont affichés en degrés et enregistrés en radians. La navigation utilise la même caméra que la vue 3D.", + "render.camera_fov": "Champ de vision vertical", + "render.camera_pitch": "Tangage de la caméra", + "render.camera_roll": "Roulis", + "render.camera_set": "Définir la caméra de rendu", + "render.camera_target": "Position de la cible · mm", + "render.camera_yaw": "Lacet", + "render.chromatic_offset": "Décalage chromatique des bords", + "render.clear_stage": "Supprimer le décor enregistré", + "render.copy_request": "Copier le JSON", + "render.cpu_aa_help": "Échantillons spatiaux : plus d'échantillons améliorent les bords et allongent le rendu.", + "render.cpu_area_add": "Ajouter une lumière CPU rectangulaire", + "render.cpu_area_editor": "Lumières CPU rectangulaires", + "render.cpu_area_editor_help": "Vecteurs des côtés complets en millimètres ; U × V pointe vers la face émettrice. Cela diffère des vecteurs demi-côté du GPU.", + "render.cpu_area_full_u": "Côté U complet · mm", + "render.cpu_area_full_v": "Côté V complet · mm", + "render.cpu_area_samples": "Échantillons de lumière surfacique", + "render.cpu_binding_confirm": "Confirmer ce corps", + "render.cpu_binding_stale": "La scène a changé. Confirmez à nouveau cette cible de réflexion avant le rendu.", + "render.cpu_body_choose": "Choisir un corps", + "render.cpu_body_filter": "Filtrer les corps par nom", + "render.cpu_body_filter_more": "Affinez le filtre pour voir plus de corps.", + "render.cpu_body_missing": "Une cible de réflexion est introuvable, masquée, ambiguë ou porte un nom de plus de 128 octets. Choisissez-la à nouveau.", + "render.cpu_budget": "Profil de ressources CPU", + "render.cpu_budget_bodies": "Plafond de corps", + "render.cpu_budget_compact": "Compact (anciennes limites)", + "render.cpu_budget_details": "Limites de ressources", + "render.cpu_budget_help": "Choisissez explicitement des limites plus élevées. La résolution et les échantillons ne sont jamais réduits automatiquement.", + "render.cpu_budget_memory": "Plafond de mémoire de la tâche", + "render.cpu_budget_not_guarantee": "Ce sont des plafonds d'admission, pas une réservation de RAM ni une garantie de vitesse. La géométrie, le film et les aperçus conservés partagent le budget mémoire ; le rendu reste annulable.", + "render.cpu_budget_resize": "Le brouillon dépasse ce profil CPU ou son budget d'échantillons de caméra. Acceptez explicitement des dimensions plus petites ou choisissez un profil plus grand.", + "render.cpu_budget_studio": "Studio (grandes images)", + "render.cpu_budget_triangles": "Plafond de triangles", + "render.cpu_budget_workstation": "Station de travail (scènes lourdes)", + "render.cpu_captured_hdr": "HDR capturé pour cette image", + "render.cpu_check_capture_help": "Vérifier et Démarrer contrôlent la même empreinte de fichier ou utilisent le HDR intégré. Chaque image conserve sa source capturée.", + "render.cpu_check_changed": "Les réglages ou le modèle ont changé après cette vérification. Vérifiez à nouveau avant le rendu.", + "render.cpu_constant_help": "La radiance constante est visible par les rayons réfléchis ou transmis. Elle ne fournit pas d'éclairage diffus direct.", + "render.cpu_custom_directions": "Remplacer le préréglage par des lumières directionnelles personnalisées", + "render.cpu_direction": "Direction vers la lumière (X, Y, Z)", + "render.cpu_directional": "Lumière directionnelle", + "render.cpu_directional_add": "Ajouter une lumière directionnelle", + "render.cpu_environment": "Environnement CPU", + "render.cpu_environment_background": "L'arrière-plan de l'image reste distinct de l'éclairage d'environnement.", + "render.cpu_environment_bounds": "L'intensité CPU doit être entre 0 et 64, la rotation HDR finie dans ±1 000 000 radians, et les échantillons HDR égaux à 1, 4, 16 ou 64.", + "render.cpu_environment_constant": "Environnement constant pour les rayons secondaires", + "render.cpu_environment_none": "Aucun environnement CPU", + "render.cpu_environment_samples": "Échantillons d'éclairage HDR", + "render.cpu_exposure_help": "L'exposition CPU doit être comprise entre −16 et 16 IL. Une exposition GPU hors de cette plage est conservée jusqu'à ce que vous la changiez.", + "render.cpu_fixed": "Image unique", + "render.cpu_hdr_help": "Radiance .hdr, panorama 2:1, jusqu'à 2048 × 1024 et 16 Mio. Le CPU exige des primaires sRVB/D65 explicites dans le fichier ; les primaires non spécifiées et l'EXR sont refusés.", + "render.cpu_hdr_reflection_help": "Les réflexions HDR rugueuses exigent des surfaces de corps et de faces entièrement métalliques. Vérifier signale les combinaisons non prises en charge.", + "render.cpu_key_rim": "Principale et contour", + "render.cpu_last_check": "Dernière vérification CPU", + "render.cpu_light_help": "Jusqu'à huit lumières directionnelles. Une liste personnalisée vide les éteint ; choisir un préréglage restaure ses lumières. Les couleurs sont en RVB linéaire et l'intensité est relative, pas en watts.", + "render.cpu_light_intensity": "Intensité relative (0–64)", + "render.cpu_light_minimum": "Distance minimale d'atténuation", + "render.cpu_light_position": "Position dans le monde (X, Y, Z)", + "render.cpu_light_reference": "Distance de référence de l'intensité", + "render.cpu_light_remove": "Supprimer la lumière", + "render.cpu_lighting": "Préréglage d'éclairage", + "render.cpu_lights": "Lumières CPU", + "render.cpu_linear_color": "Couleur linéaire (R, V, B)", + "render.cpu_neutral": "Neutre", + "render.cpu_opaque_required": "Le lancer de rayons CPU nécessite un arrière-plan opaque. Décochez Arrière-plan transparent pour continuer.", + "render.cpu_options_pending": "Ce panneau CPU ne peut pas encore modifier l'émission, les effets de surface, le verre ni l'anisotropie. Effacez ces options d'API avant de l'utiliser.", + "render.cpu_point": "Lumière ponctuelle", + "render.cpu_point_add": "Ajouter une lumière ponctuelle", + "render.cpu_point_help": "Jusqu'à huit lumières ponctuelles, ajoutées à l'éclairage directionnel choisi. Les distances sont en mm ; la distance minimale ne doit pas dépasser la distance de référence.", + "render.cpu_primary_samples": "Échantillons de bord par pixel", + "render.cpu_progressive": "CPU progressif", + "render.cpu_progressive_help": "Accumuler l'intégrateur CPU existant par passes d'un échantillon primaire. Les réflexions sélectionnées exigent un échantillon ; les lumières surfaciques, les diélectriques et l'anisotropie exigent Image unique.", + "render.cpu_progressive_limits": "Au plus 1 048 576 pixels et 16 777 216 évaluations pixel × échantillon. Changer le nombre d'échantillons ne redimensionne jamais l'image automatiquement.", + "render.cpu_progressive_seed": "Graine d'échantillonnage CPU", + "render.cpu_progressive_spp": "échantillons par pixel", + "render.cpu_reflection_add": "Ajouter une réflexion rugueuse", + "render.cpu_reflection_depth": "Profondeur de réflexion (1–8)", + "render.cpu_reflection_empty": "Aucun corps sélectionné : les réflexions de la scène sont désactivées.", + "render.cpu_reflection_help": "Choisissez des corps et réglez Désactivé, Miroir ou Rugueux. Rugueux utilise la rugosité de surface affectée. Plus d'échantillons et de rebonds allongent le rendu ; il s'agit d'un transport spéculaire borné, pas d'un éclairage global.", + "render.cpu_reflection_limit": "Jusqu'à 64 corps réfléchis sont pris en charge.", + "render.cpu_reflection_mirror": "Miroir", + "render.cpu_reflection_off": "Désactivé", + "render.cpu_reflection_rough": "Rugueux", + "render.cpu_reflection_samples": "Échantillons de réflexion (1–64)", + "render.cpu_reflections": "Réflexions CPU", + "render.cpu_runtime_help": "Les réglages numériques de lumière et d'environnement sont enregistrés avec le préréglage. Les réflexions des corps et les fichiers HDR restent temporaires. Les valeurs existantes des lumières surfaciques et des cônes de spot sont conservées.", + "render.cpu_sampling_mode": "Mode d'échantillonnage CPU", + "render.cpu_shadows": "Projeter des ombres", + "render.cpu_summary": "Lancer de rayons CPU · réflexions · HDR · lumières directionnelles et ponctuelles", + "render.cpu_warm_cool": "Chaud et froid", + "render.diag_bodies": "Corps visibles", + "render.diag_job_details": "Détails de la tâche capturée", + "render.diag_last_check": "Dernière vérification préalable", + "render.diag_memory": "Estimation logique d'admission", + "render.diag_not_implemented": "Limites explicites des capacités", + "render.diag_preflight_details": "Détails de la vérification préalable", + "render.diag_request": "Requête actuelle exacte", + "render.diag_triangles": "Triangles", + "render.discard_continue": "Abandonner le brouillon et continuer", + "render.draft_confirm_help": "Le brouillon de rendu actuel contient des modifications non appliquées. Enregistrez-les avant de changer, abandonnez-les explicitement ou continuez la modification.", + "render.draft_confirm_title": "Conserver les réglages de rendu modifiés", + "render.effects_gpu_only": "Ces effets nécessitent le tracé de chemins GPU. Changer de page ne change jamais automatiquement de moteur de rendu.", + "render.effects_help": "Combinez des looks colorimétriques ordonnés et des effets d'objectif en espace image. Le rendu et le réétalonnage du master brut utilisent les mêmes réglages enregistrés. L'EXR brut reste inchangé. Ce sont des réglages artistiques originaux, pas des émulations calibrées d'objectifs ou de pellicules de marque.", + "render.effects_reset_lens": "Réinitialiser les effets d'objectif", + "render.effects_seed": "Graine du motif", + "render.export_display": "Export : PNG d'affichage", + "render.export_linear": "Export : EXR linéaire brut", + "render.exr_pending": "Le GPU peut conserver un EXR linéaire brut. La compression, les images multicouches et les passes de rendu auxiliaires restent indisponibles.", + "render.film_grain": "Grain photographique", + "render.flare_ghosts": "Anneaux fantômes par source", + "render.flare_halo": "Halo de flare", + "render.flare_streak": "Traînée de style anamorphique", + "render.flare_strength": "Intensité du flare des hautes lumières", + "render.flare_threshold": "Seuil du flare en linéaire scène", + "render.gpu_depth": "Profondeur maximale des chemins", + "render.gpu_options_help": "Les échantillons, la profondeur, la graine et l'exposition sont enregistrés avec ce préréglage. Seule la méthode d'image active est enregistrée.", + "render.gpu_path_failed": "Traceur de chemins GPU indisponible", + "render.gpu_path_first_setup": "La première initialisation sur ce GPU peut prendre plusieurs minutes ; SolidCraft reste utilisable pendant ce temps. Les démarrages suivants réutilisent les shaders compilés lorsque le pilote les conserve.", + "render.gpu_path_preparing": "Traceur de chemins GPU : compilation des shaders…", + "render.gpu_seed": "Graine aléatoire", + "render.gpu_unavailable": "Le tracé de chemins GPU n'est pas prêt sur cet appareil.", + "render.ground_apply": "Ajuster et enregistrer le sol", + "render.ground_gap": "Écart explicite au sol", + "render.ground_linear_rgb": "Réflectance diffuse · RVB linéaire", + "render.ground_margin": "Marge d'étendue du sol", + "render.hdr_details": "Détails de la source HDR", + "render.hdr_embedded": "HDR enregistré dans cette conception", + "render.hdr_embedded_help": "Le rendu utilise les octets inclus dans la conception ; le fichier d'origine n'est plus nécessaire.", + "render.hdr_file_captured": "Fichier HDR vérifié. L'enregistrement intégrera ces octets ; si le fichier change, vérifiez-le à nouveau explicitement.", + "render.hdr_inspect": "Vérifier le fichier HDR", + "render.hdr_inspect_required": "Sélectionnez et vérifiez un fichier HDR avant d'enregistrer ou de lancer le rendu.", + "render.hdr_primaries_declared": "La source déclare ses primaires colorimétriques.", + "render.hdr_primaries_srgb": "Primaires colorimétriques : sRVB/D65", + "render.hdr_primaries_undeclared": "La source ne déclare pas de primaires ; vérifiez les exigences colorimétriques du moteur de rendu.", + "render.hdr_resource_missing": "Il manque à cette conception la ressource HDR enregistrée.", + "render.image_advanced": "Réglages GPU avancés", + "render.image_exposure": "Exposition", + "render.image_host_missing": "Aucun hôte d'image n'est installé.", + "render.image_method": "Méthode d'image", + "render.image_progressive": "Rendu progressif", + "render.image_samples": "Échantillons par pixel", + "render.image_scene_stale": "Terminez le geste de modélisation ou actualisez la scène avant de vérifier ou de lancer une image.", + "render.include_rig_cards": "Inclure les réflecteurs et drapeaux passifs", + "render.inspect_scene": "Actualiser le résumé de la scène capturée", + "render.keep_editing": "Continuer la modification", + "render.layer_down": "Déplacer vers le bas", + "render.layer_enabled": "Couche activée", + "render.layer_remove": "Supprimer la couche", + "render.layer_strength": "Intensité de la couche", + "render.layer_up": "Déplacer vers le haut", + "render.lens_effects_help": "Le flare utilise jusqu'à quatre sources lumineuses distinctes de l'image linéaire réelle. Les fantômes, le halo, les traînées, les décalages chromatiques et la distorsion radiale sont des approximations artistiques en espace image. Les effets spatiaux nécessitent une sortie opaque ; les échantillons extérieurs prolongent le bord de l'image. Le grain est déterministe. Aucune physique, aucun EXR ni aucune géométrie n'est modifié.", + "render.lens_effects_title": "Inspiration objectif et photographie", + "render.library_all": "Catalogue", + "render.library_all_states": "Tous les états de disponibilité", + "render.library_applied": "Projection de ressource appliquée. Vérifiez la requête de rendu complète avant de lancer.", + "render.library_apply_hdr": "Enregistrer avec cet environnement HDR", + "render.library_apply_maps": "Utiliser les textures de surface GPU conçues", + "render.library_apply_studio": "Enregistrer la projection de studio conçue", + "render.library_apply_uniform": "Appliquer une apparence opaque uniforme", + "render.library_authored_help": "Les ressources conçues d'origine sont indicatives, pas des données techniques mesurées. Chaque action n'applique que la projection indiquée.", + "render.library_blocked": "Bloqué / étalonnage requis", + "render.library_capabilities": "Spécifications des capacités", + "render.library_center": "Centre du dispositif", + "render.library_clear_search": "Effacer", + "render.library_details": "Spécification et provenance", + "render.library_emitters_only_ack": "Utiliser seulement les émetteurs ; omettre les réflecteurs passifs documentés", + "render.library_empty": "Aucune ressource correspondante. Essayez une autre requête ou un autre filtre de disponibilité.", + "render.library_environment_concepts": "Concepts d'environnement", + "render.library_extent": "Étendue du sujet", + "render.library_favorite": "Ajouter aux favoris", + "render.library_favorites": "Favoris", + "render.library_hdr": "Environnements HDR intégrés", + "render.library_hdr_help": "Intègre le HDR d'origine dans le préréglage enregistré. L'origine de longitude conçue est convertie explicitement ; aucun fichier externe n'est nécessaire après l'enregistrement.", + "render.library_inspect_only": "Sélectionnez pour inspecter ; rien n'est appliqué automatiquement. Les favoris et l'historique récent appartiennent à cette session de document ouverte.", + "render.library_light_concepts": "Concepts d'éclairage", + "render.library_maps_help": "Les textures intégrées peuvent être enregistrées avec des sources épinglées et un mappage local aux occurrences. Les remplacements optiques temporaires restent un mode distinct.", + "render.library_material_concepts": "Concepts de matériaux", + "render.library_native_scenes": "Studios natifs", + "render.library_next": "Page suivante", + "render.library_omitted": "Non inclus", + "render.library_physical_profiles": "Profils de référence physiques", + "render.library_previous": "Page précédente", + "render.library_quality_concepts": "Spécifications de qualité", + "render.library_recent": "Récents", + "render.library_replace_environment": "Remplacer explicitement l'environnement existant", + "render.library_replace_studio": "Remplacer l'éclairage, l'environnement et le décor enregistrés", + "render.library_results": "Ressources correspondantes", + "render.library_rig_help": "Ajuster une fois sur un centre et une étendue physique explicites. Les dispositifs complets incluent des réflecteurs passifs ; les blocages d'étalonnage refusent toujours. Un écart prudent entre émetteurs et réflecteurs est vérifié avant l'enregistrement.", + "render.library_rigs": "Dispositifs d'éclairage conçus", + "render.library_save_maps": "Enregistrer les textures dans ce préréglage", + "render.library_scene_bounds": "Utiliser les limites de la scène capturée", + "render.library_scenes": "Spécifications de scène", + "render.library_search": "Rechercher dans la bibliothèque", + "render.library_select_hint": "Choisissez une ressource dans la bibliothèque pour inspecter ses actions prises en charge et ses limites.", + "render.library_selene": "Apparences opaques SELENE", + "render.library_selene_shots": "Spécifications de prises de vue SELENE", + "render.library_short_blocked": "Indisponible", + "render.library_short_native": "Composition native", + "render.library_short_projection": "Projection prise en charge", + "render.library_short_reference": "Référence uniquement", + "render.library_short_specification": "Spécification uniquement", + "render.library_source_preview": "Charger l'aperçu de la texture source", + "render.library_source_preview_help": "Texture source de couleur de base conçue. Ce n'est pas un aperçu de matériau rendu ou mesuré.", + "render.library_specification_only": "Spécification uniquement : pas un préréglage exécutable complet. Les effets, ressources et rôles de sujet requis nécessitent encore une implémentation et une association explicites.", + "render.library_specs": "Spécifications uniquement", + "render.library_status": "Disponibilité", + "render.library_surfaces": "Surfaces PBR conçues", + "render.library_target": "Corps cible", + "render.library_title": "Bibliothèque de ressources de rendu", + "render.library_unfavorite": "Retirer des favoris", + "render.library_uniform_ack": "Utiliser l'approximation uniforme sans effets spatiaux ni avancés", + "render.library_usable": "Projections exécutables", + "render.linear_help": "Conserve un master RVBA en flottant 32 bits avant le débruitage, l'exposition, le mappage des tons, les filtres et l'arrière-plan. sRVB/D65 linéaire ; prémultiplié par la couverture. La mémoire supplémentaire est admise explicitement. Pas de compression ni de passes supplémentaires.", + "render.linear_retain": "Conserver l'EXR linéaire brut", + "render.linear_unavailable": "L'image terminée sélectionnée n'a pas d'EXR conservé. Activez la conservation avant le rendu ; un ancien PNG ne permet pas de récupérer la radiance brute.", + "render.look_add": "Ajouter un look colorimétrique", + "render.look_bleach": "Inspiration traitement sans blanchiment (bleach bypass)", + "render.look_cool": "Froid", + "render.look_cyanotype": "Inspiration cyanotype", + "render.look_faded": "Tirage délavé", + "render.look_mono": "Monochrome", + "render.look_sepia": "Sépia", + "render.look_strength": "Intensité du look", + "render.look_teal_orange": "Bleu canard / orange", + "render.look_title": "Pile de looks créatifs", + "render.look_warm": "Chaud", + "render.mapping_scale": "Multiplicateur de répétition physique", + "render.material_absorption": "Absorption R · V · B (par mm)", + "render.material_add": "Ajouter ou modifier ce corps", + "render.material_assignments": "Affectations des corps", + "render.material_binding_enable": "Inclure ce remplacement de corps", + "render.material_box": "Boîte alignée sur les axes", + "render.material_browse": "Choisir une image…", + "render.material_certification": "Le verre fermé utilise la distance géométrique. La topologie, l'orientation, le chevauchement et les limites optiques sont vérifiés pendant la préparation GPU ; Vérifier ne fait qu'admettre la requête.", + "render.material_choose_body": "Choisir un corps de la scène", + "render.material_closed": "Maillage solide fermé", + "render.material_coat": "Vernis sur le matériau de base", + "render.material_coat_enable": "Activer le vernis", + "render.material_coat_help": "Revêtement diélectrique indicatif sur l'apparence opaque existante. Un poids nul laisse la base inchangée.", + "render.material_color_map": "Image de couleur de base (sRVB)", + "render.material_color_replace": "La texture de base remplace la couleur du corps", + "render.material_custom": "Optique indicative personnalisée", + "render.material_enable": "Utiliser ces remplacements de matériau GPU", + "render.material_filter": "Filtrer les corps de la scène…", + "render.material_filter_help": "Jusqu'à 128 corps correspondants sont affichés. Affinez le filtre pour les grandes scènes.", + "render.material_glass": "Verre et absorption optique", + "render.material_glass_enable": "Utiliser un verre physique sur ce corps", + "render.material_glass_exclusive": "Dans ce moteur de rendu, le verre ne peut pas partager un corps avec un vernis ou des textures d'exécution.", + "render.material_glass_help": "Recettes indicatives originales. Les nuanciers montrent la transmittance, pas un aperçu rendu. L'absorption vaut −ln(transmittance linéaire) / distance de référence ; l'alpha est inchangé.", + "render.material_gpu_required": "Ces remplacements de matériau actifs nécessitent le tracé de chemins GPU. Choisissez GPU ou désactivez les remplacements avant Vérifier ou Démarrer.", + "render.material_ior": "Indice de réfraction (IOR)", + "render.material_limits": "Au plus 128 remplacements de corps, 32 corps de verre disjoints, 64 vernis et 128 associations de textures. Les textures identiques partagent leur stockage ; les limites réelles de l'appareil et de la mémoire totale s'appliquent toujours.", + "render.material_map_invalid": "Les chemins des textures doivent être des chemins locaux bornés ; l'intensité de la normale doit être finie et comprise entre 0 et 1.", + "render.material_map_required": "Choisissez une image de couleur ou une image de normales avant d'utiliser des textures.", + "render.material_maps": "Textures planes de couleur et de normales", + "render.material_maps_enable": "Activer les textures pour ce corps opaque", + "render.material_maps_help": "PNG/JPEG jusqu'à 1024×1024 ; 16 Mio encodés au total. U et V sont des vecteurs de répétition orthogonaux en mm monde (128 répétitions au maximum). La couleur est en sRVB ; les normales utilisent la convention OpenGL +Y. Les fichiers sont capturés à Vérifier/Démarrer.", + "render.material_metallic_map": "Texture métallique (linéaire)", + "render.material_normal_map": "Image de normales (OpenGL, +Y)", + "render.material_normal_strength": "Intensité des normales (0–1)", + "render.material_origin": "Origine du mappage X · Y · Z (mm)", + "render.material_refresh": "Actualiser les corps de la scène", + "render.material_refresh_needed": "La scène a changé. Actualisez la liste des corps avant d'ajouter une cible.", + "render.material_remove": "Supprimer cette affectation", + "render.material_repeat_u": "Une répétition U X · Y · Z (mm)", + "render.material_repeat_v": "Une répétition V X · Y · Z (mm)", + "render.material_revalidate": "Revalider ce corps", + "render.material_revalidate_needed": "Cette affectation appartient à une révision antérieure de la scène. Revalidez l'identité exacte de son corps avant le rendu.", + "render.material_roughness": "Rugosité du vernis (0,045–1)", + "render.material_roughness_map": "Texture de rugosité (linéaire)", + "render.material_shadow": "Transmettre les rayons d'ombre directs", + "render.material_target_missing": "Le numéro d'ordre et le nom du corps ne correspondent plus. Supprimez cette affectation et choisissez à nouveau explicitement le corps voulu.", + "render.material_thickness": "Épaisseur de la feuille mince (mm)", + "render.material_thin": "Feuille mince", + "render.material_title": "Matériaux d'image GPU", + "render.material_transient": "Remplacements optiques temporaires pour cet onglet de document. Ils ne sont enregistrés ni dans la conception, ni dans le préréglage de rendu, ni dans la bibliothèque de matériaux.", + "render.material_v_up": "Le V de la texture pointe vers le haut de l'image", + "render.material_weight": "Poids du vernis (0–1)", + "render.method_cpu": "Lancer de rayons CPU", + "render.method_gpu": "Tracé de chemins GPU", + "render.method_limit_raster": "La rastérisation utilise l'aperçu de studio opaque fixe. Choisissez une méthode de lancer de rayons explicite pour les réglages optiques pris en charge.", + "render.method_raster": "Rastérisation CPU", + "render.nested_enable": "Diélectriques imbriqués certifiés", + "render.nested_help": "Jusqu'à 16 couches contenantes ; chaque parent doit être convexe et chaque enfant strictement à l'intérieur. Les intersections, les surfaces en contact, les feuilles minces et la transmission des ombres directes sont refusées. L'état « caméra à l'intérieur » suit la hiérarchie certifiée. Ne crée pas de surface de liquide et ne fusionne pas les limites CAO en contact.", + "render.optics_remove": "Supprimer l'optique enregistrée", + "render.optics_replace": "Remplacer explicitement l'optique enregistrée de cette cible", + "render.optics_save": "Enregistrer cette optique dans le préréglage", + "render.optics_saved": "Cibles optiques enregistrées", + "render.optics_saved_help": "L'identité exacte de la définition, de la fonction et de l'occurrence est conservée à la réouverture hors ligne. Les cibles manquantes, remplacées ou masquées sont refusées ; les matériaux techniques sont inchangés. Enregistrez ou abandonnez les modifications numériques avant de supprimer une cible enregistrée.", + "render.output_format_status": "Le PNG est l'image d'affichage terminée exacte. L'EXR GPU facultatif conserve la radiance brute FLOAT32 en linéaire scène, avant les filtres d'affichage. L'export ne substitue jamais le cache d'aperçu ni une autre tâche.", + "render.output_lock_ratio": "Verrouiller le rapport d'aspect", + "render.output_over_budget": "L'image demandée dépasse l'enveloppe de ressources choisie. Choisissez explicitement une taille ou un profil compatible ; aucune réduction automatique n'a lieu.", + "render.output_ratio_refused": "La dimension liée dépasse la taille limite de cette méthode. La taille précédente est conservée ; déverrouillez le rapport ou choisissez une valeur plus petite.", + "render.output_swap_orientation": "Permuter largeur et hauteur", + "render.page_aging": "Vieillissement et salissures", + "render.page_all": "Tous les réglages", + "render.page_appearance": "Apparence", + "render.page_background": "Arrière-plans", + "render.page_camera": "Caméra", + "render.page_diagnostics": "Diagnostics", + "render.page_effects": "Effets d'objectif et de finition", + "render.page_environment": "Environnement", + "render.page_lighting": "Éclairage", + "render.page_output": "Sortie", + "render.page_scene": "Scène", + "render.passive_stage": "Sol et décor passif", + "render.passive_stage_help": "Les panneaux passifs finis n'appartiennent qu'aux images rendues. Ils n'ajoutent ni corps CAO ni masse. Leur placement est figé après application ; un recoupement avec les limites du produit est refusé. Le CPU ne fournit pas d'éclairage diffus par rebond.", + "render.physical_acknowledge": "Je comprends que cette référence partielle nécessite un examen de la nuance, de l'état et de la source", + "render.physical_associations": "Candidats physiques et rôles", + "render.physical_background_help": "Vrai sol et vrai mur passifs, distincts de l'arrière-plan de la caméra. Le cyclorama utilise 24 bandes polygonales ; ce n'est pas une surface infinie ni analytiquement lisse. Ne remplace le décor enregistré qu'avec votre accord.", + "render.physical_copy_plan": "Copier le plan avec les sources et les omissions", + "render.physical_cyclorama": "Ajuster un cyclorama polygonal", + "render.physical_floor_wall": "Ajuster un sol et un mur physiques", + "render.physical_material_name": "Nom proposé pour le matériau de référence", + "render.physical_omissions": "Propriétés non représentables dans la fiche native", + "render.physical_plan_only": "Plan en lecture seule préparé. Aucun matériau n'a été créé ni affecté. Gardez son profil étendu et ses omissions en examinant la fiche native.", + "render.physical_prepare_plan": "Préparer le plan de création (n'applique rien)", + "render.physical_separate": "L'apparence n'identifie pas le matériau. Ce sont des références sourcées, pas des propriétés effectives certifiées. La masse, les matériaux techniques et l'optique existants sont inchangés.", + "render.physical_unknown": "Aucun candidat numérique n'est établi. La nuance, la formulation ou la construction doit être précisée ; inconnu ne signifie pas zéro.", + "render.post_contrast": "Contraste", + "render.post_gain_b": "Gain bleu", + "render.post_gain_g": "Gain vert", + "render.post_gain_r": "Gain rouge", + "render.post_help": "Présentation créative uniquement. Les gains RVB précèdent le mappage des tons ; le contraste, la saturation et le vignettage suivent, en lumière d'affichage linéaire. Lancer le rendu crée de nouveaux échantillons de transport. Réétalonner utilise le master brut conservé sélectionné, sans débruitage ni nouveaux rayons.", + "render.post_reset": "Réinitialiser les filtres de présentation", + "render.post_saturation": "Saturation", + "render.post_title": "Filtres de présentation", + "render.post_vignette": "Vignettage", + "render.preview_image_settings_help": "L'aperçu en direct garde un éclairage de studio fixe. L'exposition et l'éclairage de l'image s'appliquent à la tâche d'image quand vous cliquez sur Vérifier ou Démarrer.", + "render.preview_retry": "Réessayer l'aperçu en direct", + "render.preview_unavailable_help": "L'aperçu en direct est indisponible. Les préréglages enregistrés et les réglages de tâche d'image restent accessibles. Modifiez la scène ou réessayez explicitement ; une scène refusée n'est pas reconstruite à chaque image.", + "render.preview_upload": "Charge de sommets de l'aperçu en direct", + "render.preview_upload_help": "Octets exacts des sommets de l'aperçu, pas la mémoire totale du GPU ni du processus. La géométrie n'est pas simplifiée. Les tâches d'image utilisent leur propre admission et leur propre éclairage.", + "render.progressive_image_summary": "PNG d'aperçu · PBR et verre · échantillons progressifs", + "render.quality_ack": "Accepter la projection à budget fixe et ses omissions", + "render.quality_apply": "Utiliser ce budget d'échantillonnage fixe", + "render.quality_projection_help": "Les préréglages Q incluent des exigences futures. Cette action ne projette qu'un budget PNG pris en charge à échantillons fixes, et omet explicitement l'arrêt adaptatif, la sortie linéaire brute et les limites de transmission indépendantes.", + "render.quality_review": "Examiner le budget d'échantillonnage", + "render.queue_pending": "Cette interface ne propose ni file de production automatique ni moteur de rendu d'animation. Les images fixes terminées restent exportables séparément.", + "render.radial_distortion": "Distorsion radiale", + "render.regrade_action": "Réétalonner le master brut (sans débruitage)", + "render.regrade_help": "Crée un PNG distinct à partir du master brut terminé sélectionné, avec ces réglages de présentation. Ne trace aucun rayon, ne change ni la taille, ni la caméra, ni les lumières capturées, et n'écrase pas l'EXR. Le débruitage n'est pas réappliqué : les masters bruts ne conservent pas ses guides. Le résultat reste exportable par les mêmes réglages de tâche.", + "render.replace_ground": "Confirmer le remplacement du décor existant", + "render.replace_saved_surface": "Remplacer une association enregistrée existante pour cette cible", + "render.result_actual_help": "Un pixel d'image par pixel d'affichage.", + "render.result_capture": "Révision capturée", + "render.result_current": "La révision capturée du modèle est à jour.", + "render.result_empty": "Aucune image terminée pour l'instant. Vérifiez les réglages, puis lancez un rendu.", + "render.result_fit": "Ajuster l'image", + "render.result_job": "Tâche", + "render.result_navigation": "Le panoramique et le zoom suivent les préférences de navigation. Espace + glisser fait un panoramique.", + "render.result_open": "Ouvrir l'image terminée dans le canevas principal.", + "render.result_preview": "Aperçu en direct", + "render.result_provisional": "Image CPU provisoire", + "render.result_provisional_help": "Ce point de restauration n'est pas exportable. L'export conserve le dernier résultat terminé ; l'annulation revient à ce résultat.", + "render.result_reduced_display": "Aperçu d'affichage réduit à la limite de l'appareil ou du cache de la vue. Le PNG conservé et l'export gardent la pleine résolution ; l'inspection native à 100 % n'est pas disponible pour cette vue réduite.", + "render.result_retained": "Affichage de la dernière image terminée ; un rendu plus récent ne l'a pas remplacée.", + "render.result_sequence": "Point de restauration", + "render.result_title": "Résultat du rendu", + "render.review_stale": "Cet examen est périmé. Résolvez ou vérifiez à nouveau avant d'appliquer.", + "render.ribbon_aging": "Vieillissement", + "render.ribbon_backgrounds": "Arrière-plans", + "render.ribbon_check": "Vérifier", + "render.ribbon_check_help": "Valider le brouillon actuel exact que Rendu va soumettre. Pas de moteur de rendu de repli, de redimensionnement silencieux ni de remplacement de ressource.", + "render.ribbon_edit_lights": "Modifier les lumières", + "render.ribbon_effects": "Effets", + "render.ribbon_environment_help": "L'éclairage HDR, les arrière-plans propres à la caméra et les surfaces du décor physique sont des réglages distincts, avec un accord explicite pour tout remplacement.", + "render.ribbon_finish_dialog": "Terminez d'abord la boîte de dialogue de fichier ou de confirmation en cours.", + "render.ribbon_frame": "Cadrer", + "render.ribbon_hdr_library": "Bibliothèque HDR", + "render.ribbon_job_active": "Un rendu est déjà en cours ; annulez-le explicitement avant d'en lancer un autre.", + "render.ribbon_light_rigs": "Dispositifs d'éclairage", + "render.ribbon_lights_help": "Inspectez les dispositifs conçus ou modifiez les lumières prises en charge, sans remplacer le préréglage actuel tant que vous n'appliquez pas explicitement la modification.", + "render.ribbon_materials": "Matériaux", + "render.ribbon_materials_help": "Ouvrir l'inspecteur d'apparence partagé et la bibliothèque de surfaces d'origine. Les modifications optiques ne changent jamais en silence les propriétés techniques.", + "render.ribbon_no_active_job": "Aucun rendu en cours à annuler.", + "render.ribbon_no_result": "Terminez un rendu avant d'exporter son image exacte.", + "render.ribbon_no_saved_camera": "Enregistrez une prise de vue avant de restaurer sa caméra.", + "render.ribbon_saved_camera": "Caméra enregistrée", + "render.ribbon_shots": "Prises de vue", + "render.ribbon_studios": "Studios", + "render.ribbon_studios_help": "Parcourez les compositions de studio implémentées et examinez leurs remplacements avant d'appliquer. Les scènes à l'état de concept restent signalées.", + "render.ribbon_surface_maps": "Textures de surface", + "render.sampling_title": "Échantillonnage adaptatif et de transmission", + "render.save_continue": "Enregistrer et continuer", + "render.saved_maps_runtime_conflict": "Les associations de surface enregistrées ne peuvent pas être mélangées avec des remplacements optiques temporaires ni avec un HDR non enregistré. Enregistrez le HDR ou supprimez explicitement les entrées temporaires.", + "render.saved_surface_remove": "Supprimer l'association enregistrée", + "render.saved_surfaces": "Associations de surface enregistrées", + "render.saved_surfaces_help": "Les textures intégrées épinglées suivent l'occurrence sélectionnée en millimètres locaux. Une cible remplacée ou manquante est une erreur, jamais une réaffectation automatique.", + "render.scene_apply": "Appliquer le studio examiné", + "render.scene_consent": "Confirmer le remplacement de l'éclairage, de l'environnement, de l'exposition et du décor", + "render.scene_preserved_fields": "La caméra, l'échantillonnage, les dimensions, les associations optiques, la géométrie CAO et les matériaux techniques sont conservés.", + "render.scene_preserves_design": "Composer un éclairage et un décor passif pour le sujet visible. La géométrie, les matériaux techniques et la caméra restent distincts.", + "render.scene_replaces": "Remplace", + "render.scene_review": "Résoudre et examiner", + "render.scene_review_help": "Examinez la composition native complète avant d'appliquer. Les spécifications SCENE avancées non liées ne sont pas substituées.", + "render.scene_scope_details": "Portée de la composition", + "render.setup_legacy_environment": "Ce préréglage ancien utilise une rotation ou une intensité d'environnement héritée. Ces valeurs sont conservées ; convertissez-les explicitement avant d'enregistrer une tâche d'image complète.", + "render.setup_numeric_help": "Enregistrer consigne la méthode d'image active et tous ses réglages numériques. Recharger ou choisir un autre préréglage remplace ce brouillon ; restaurez la caméra séparément.", + "render.setup_offline_help": "Vous pouvez modifier et enregistrer cette méthode sans son moteur de rendu. Vérifier et Démarrer nécessitent un hôte disponible.", + "render.setup_runtime_unsupported": "Cette tâche complète ne peut pas encore être enregistrée : elle contient des textures ou des associations à des corps de la scène. Supprimez ces entrées temporaires avant d'enregistrer un préréglage portable.", + "render.setup_save_missing": "La configuration de rendu enregistrée est introuvable après l'exécution de la commande.", + "render.sharpening": "Accentuation des détails", + "render.shot_duplicate": "Dupliquer la prise de vue enregistrée", + "render.shot_manager": "Prises de vue enregistrées", + "render.shot_new_name": "Nom de la nouvelle prise de vue", + "render.shot_remove": "Supprimer la prise de vue enregistrée", + "render.shot_remove_help": "Supprime uniquement cette prise de vue enregistrée. La géométrie source et les images terminées sont conservées ; l'action peut être annulée.", + "render.shot_remove_title": "Supprimer la prise de vue enregistrée ?", + "render.shot_rename": "Renommer la prise de vue enregistrée", + "render.shot_saved_only": "Enregistrez d'abord le brouillon actuel. Dupliquer et renommer conservent exactement les options enregistrées et les références aux ressources.", + "render.sky_ground": "Sol · RVB linéaire", + "render.sky_horizon": "Horizon · RVB linéaire", + "render.sky_zenith": "Zénith · RVB linéaire", + "render.soft_focus": "Flou artistique", + "render.stage_panel_count": "Panneaux enregistrés", + "render.studio_add_area": "Ajouter une lumière surfacique", + "render.studio_ambient": "Radiance constante de l'environnement", + "render.studio_ambient_rgb": "Radiance constante de l'environnement (RVB linéaire)", + "render.studio_aperture": "Rayon d'ouverture", + "render.studio_area": "Lumière surfacique", + "render.studio_area_help": "Jusqu'à quatre rectangles à une face. Les demi-côtés orthogonaux U et V définissent la taille ; U × V fait face au côté éclairé. Les coordonnées sont en millimètres de l'espace monde.", + "render.studio_center": "Centre X, Y, Z (mm)", + "render.studio_denoise": "Réduire le bruit de l'image finale", + "render.studio_denoise_help": "Filtre final respectant les bords ; les détails fins peuvent s'adoucir. Le verre et les surfaces spéculaires nettes ne passent pas par le filtre.", + "render.studio_direction": "Direction vers le soleil (X, Y, Z)", + "render.studio_environment": "Environnement", + "render.studio_environment_bounds": "La rotation de l'environnement doit être finie dans ±1 000 000 radians et l'intensité comprise entre 0 et 100.", + "render.studio_environment_none": "Aucune carte d'environnement", + "render.studio_focus": "Distance de mise au point axiale", + "render.studio_half_u": "Demi-côté U (mm)", + "render.studio_half_v": "Demi-côté V (mm)", + "render.studio_hdr": "Fichier HDR Radiance", + "render.studio_hdr_browse": "Choisir un HDR…", + "render.studio_hdr_help": "Radiance .hdr, panorama 2:1, jusqu'à 2048 × 1024. L'EXR n'est pas disponible. L'hypothèse de couleur ne s'applique que si les primaires ne sont pas spécifiées.", + "render.studio_hdr_required": "Choisissez un fichier .hdr local.", + "render.studio_hdr_srgb": "Interpréter les primaires non spécifiées comme du sRVB linéaire", + "render.studio_intensity": "Intensité de l'environnement", + "render.studio_lens": "Profondeur de champ", + "render.studio_lens_perspective": "La profondeur de champ nécessite une caméra en perspective.", + "render.studio_lighting": "Éclairage de studio", + "render.studio_lighting_enable": "Utiliser un éclairage de studio personnalisé", + "render.studio_needs_review": "Examiner la méthode et les réglages", + "render.studio_radiance": "Radiance RVB linéaire", + "render.studio_ready": "Prêt à vérifier", + "render.studio_remove_area": "Supprimer la lumière surfacique", + "render.studio_rotation": "Rotation de l'environnement", + "render.studio_runtime_help": "Les réglages numériques du studio et les sources HDR vérifiées peuvent être enregistrés avec le préréglage. Les remplacements optiques et de matériau des corps restent temporaires et ne modifient pas les apparences enregistrées.", + "render.studio_saved": "Préréglage enregistré / caméra actuelle", + "render.studio_sky": "Ciel artistique", + "render.studio_sky_help": "Dégradé de ciel original pour l'éclairage ; ce n'est pas un modèle atmosphérique calibré.", + "render.studio_sun": "Soleil", + "render.studio_sun_radius": "Rayon angulaire", + "render.studio_title": "Studio de rendu", + "render.studio_tone_map": "Mappage des tons", + "render.subsurface_enable": "Marche aléatoire de diffusion intérieure", + "render.subsurface_help": "Diélectrique fermé uniquement. La diffusion et l'absorption RVB sont des coefficients distincts par mm. Les chemins diffusent à l'intérieur de la géométrie réelle, puis se réfractent ou se réfléchissent à la limite. Désactivez la transmission des ombres directes, le débruitage de surface et le volume extérieur ; utilisez une seule strate de Fresnel. Ce n'est ni un shader de diffusion, ni une grille de densité, ni un matériau mesuré. Les milieux denses peuvent nécessiter plus d'échantillons et une plus grande profondeur de chemin.", + "render.subsurface_rate": "Taux de collision de diffusion", + "render.transmission_scope": "Le verre GPU prend en charge des milieux disjoints certifiés. Les milieux imbriqués sans restriction et un estimateur de transmission sans bruit ne sont pas fournis.", + "render.transmission_strata": "Strates de Fresnel conditionnelles", + "render.transmission_strata_help": "1 conserve le flux d'origine. 2 ou 4 sous-chemins stratifient le premier choix de réflexion/transmission dans le verre, avec les lois de Snell et d'absorption inchangées. Plus de chemins coûtent plus de travail ; ce n'est ni du débruitage, ni une prise en charge des milieux imbriqués, ni la promesse d'un rendu plus rapide.", + "render.volume_albedo": "Albédo de diffusion · RVB linéaire", + "render.volume_anisotropy": "Cosinus moyen de phase", + "render.volume_enable": "Activer le milieu participant", + "render.volume_extinction": "Coefficient d'extinction", + "render.volume_help": "Transport GPU à l'intérieur d'une boîte finie, avec atténuation de Beer et diffusion HG sur les chemins de caméra et indirects. Utilise l'éclairage studio/HDR/ciel explicite, y compris l'atténuation des ombres. Un cosinus de phase positif diffuse vers l'avant. Les limites de verre et le débruitage de surface doivent être désactivés explicitement. Une extinction nulle laisse le transport inchangé. Ce n'est ni une atmosphère lunaire physique, ni une grille de densité, ni une émission volumique, ni un transport spectral, ni une propriété de matériau certifiée.", + "render.volume_max": "Limites maximales · mm monde", + "render.volume_min": "Limites minimales · mm monde", + "render.volume_title": "Volume homogène borné", + "section.off_hint": "Aucun plan choisi : OK désactive la coupe.", + "set by the sketch's lines": "défini par les lignes de l'esquisse", + "settings.frame_rate_details_note": "Ajoute un graphe des temps des dernières images avec les triangles dessinés superposés, un histogramme des temps d'image et ce que le GPU a dessiné. Cliquez sur la fréquence d'images dans la vue pour les afficher ou les masquer.", + "settings.window_system_details": "Détails", + "settings.window_system_note_now": "S'applique après un redémarrage. Actuellement : {now}.", + "settings.window_system_wayland_limited": "Certaines fonctionnalités sont limitées sous Wayland natif.", + "sheet.no_body": "il n'y a pas de corps de tôlerie : commencez-en un avec Bord tombé > Base, ou transformez une plaque en tôlerie avec Convertir en tôlerie (choisissez sa grande face plane)", + "sketch_panel.plane_angle": "{plane}, tourné de {angle}", + "sketch_panel.plane_fixed": "Un plan fixe", + "sketch_panel.plane_flipped": "{plane}, vu de l'autre côté", + "sketch_panel.plane_offset": "{plane}, décalé de {distance}", + "sketch_panel.plane_origin": "Le plan {plane}", + "timeline.delete_after_marker_one": "Supprimer 1 fonction après le marqueur d'historique", + "timeline.delete_after_marker_other": "Supprimer {count} fonctions après le marqueur d'historique", + "timeline.delete_many": "Supprimer {count} fonctions sélectionnées", + "timeline.feature_hint": "Double-clic pour modifier · glisser pour réordonner · clic droit pour plus", + "toolbar.render_appearance": "APPARENCE", + "toolbar.render_camera": "CAMÉRA", + "toolbar.render_environment": "ENVIRONNEMENT", + "toolbar.render_lighting": "ÉCLAIRAGE", + "ui.agent_chat_attach_selection": "Joindre la sélection", + "ui.agent_chat_attach_selection_tip": "Envoyer ce qui est sélectionné dans le modèle (faces, arêtes, fonctions, corps) avec le message, pour que l'agent sache de quoi vous parlez", + "ui.agent_chat_changes_n": "Modifications : {n}", + "ui.agent_chat_choose_model": "Choisir un modèle", + "ui.agent_chat_ctx_bodies": "Corps", + "ui.agent_chat_ctx_elements": "Éléments", + "ui.agent_chat_ctx_features": "Fonctions", + "ui.agent_chat_ctx_more": "+{n} de plus", + "ui.agent_chat_ctx_other": "Autre", + "ui.agent_chat_model_no_tools": "{model} ne peut pas utiliser les outils de SolidCraft : il peut seulement discuter. Choisissez un modèle qui prend en charge les outils.", + "ui.agent_chat_no_tool_call": "Le modèle n'a pas utilisé les outils de SolidCraft : la conception n'a donc pas été modifiée. Choisissez un modèle qui prend en charge l'appel d'outils ; voir Modèles locaux dans le guide du chat avec l'agent.", + "ui.agent_chat_pick_context": "Choisir le contexte", + "ui.agent_chat_pick_context_tip": "Choisissez des faces, arêtes, fonctions et corps du modèle à montrer à l'agent, puis appuyez sur OK", + "ui.agent_chat_provider_models": "{count} modèles", + "ui.agent_chat_provider_other": "Autre", + "ui.agent_chat_provider_tip": "Le fournisseur dont la liste suivante affiche les modèles.", + "ui.agent_chat_turn_unlimited": "Illimité", + "ui.agent_off_thread": "Garder la fenêtre réactive pendant que les agents exécutent des commandes", + "ui.agent_off_thread_note": "Les commandes lentes d'un agent (depuis le panneau IA ou un client MCP) sont calculées à côté de la fenêtre : vous pouvez continuer à tourner et inspecter la vue, et en arrêter une depuis la pastille dans la vue. Désactivé : chacune s'exécute sur le thread de la fenêtre, qui l'attend.", + "ui.ai_add_anthropic": "API compatible Anthropic", + "ui.ai_add_endpoint": "Point d'accès de l'API", + "ui.ai_kind": "Type", + "ui.ai_protocol": "Protocole", + "ui.ai_request_timed_out": "Le modèle a mis plus de {seconds} s. Vous pouvez augmenter le délai d'expiration des requêtes de ce point d'accès dans Préférences › Assistant.", + "ui.ai_request_timeout": "Délai d'expiration des requêtes", + "ui.ai_request_timeout_hint": "Durée maximale d'une requête au modèle de ce point d'accès, de 30 s à une heure. Augmentez-la pour un modèle local lent.", + "ui.ai_test_answered": "Joint : {model} a répondu", + "ui.ai_test_anthropic_tip": "Envoie un court message au point d'accès", + "ui.cosmetic_thread_markings": "Marquages de filetage cosmétiques", + "ui.cosmetic_thread_markings_help": "Afficher des marquages schématiques sur les parois cylindriques filetées. Ne modifie que l'affichage, jamais la conception ni les exports.", + "ui.extract_component": "Extraire dans un fichier…", + "ui.extract_design_changed": "La conception a changé pendant le choix du fichier. Relancez Extraire dans un fichier.", + "ui.extract_done": "Le composant est maintenant une conception à part entière, liée ici.", + "ui.extrude_auto_to_object": "Extruder jusqu'à une cible choisie", + "ui.extrude_auto_to_object_tip": "Dans Extrusion, avec un profil choisi, choisir une face, un sommet ou un plan parallèle hors de son plan fait passer la limite à Jusqu'à l'objet", + "ui.frame_rate_details": "Détails de la fréquence d'images", + "ui.hide_origin_by_default": "Masquer l'origine par défaut", + "ui.hide_origin_note": "Les nouvelles conceptions démarrent avec le dossier Origine masqué. Une conception garde son propre réglage d'Origine dès que vous l'affichez ou la masquez.", + "ui.history_edge_hint": "double-cliquer sur le bord", + "ui.history_hide_names": "Masquer les noms", + "ui.history_marker_tip": "Marqueur d'historique : faire glisser pour ramener le modèle en arrière ; les nouvelles fonctions s'insèrent ici", + "ui.history_names": "Noms", + "ui.history_play": "Lire jusqu'à la fin", + "ui.history_show_names": "Afficher les noms", + "ui.history_toggle_names": "Afficher ou masquer les noms des fonctions", + "ui.horizontal_constraint": "Contrainte horizontale", + "ui.link_copies": "Lier les copies identiques", + "ui.link_copies_keep": "Conserver", + "ui.link_copies_link": "Lier", + "ui.link_copies_text": "Ces composants construisent les mêmes corps que {name}. En faire des placements de son lien ?", + "ui.open_linked_design": "Ouvrir la conception liée", + "ui.perforate_margin_default": "depuis le diamètre", + "ui.perforate_pitch": "Pas", + "ui.perforate_square": "Carré", + "ui.perforate_staggered": "En quinconce (60°)", + "ui.perforate_title": "PERFORER", + "ui.plugins_none": "Aucun module externe ne correspond à cette recherche.", + "ui.plugins_search": "Rechercher des modules externes", + "ui.reference_1": "Référence 1", + "ui.reference_2": "Référence 2", + "ui.reference_distance": "Distance de référence", + "ui.replace_with_link_done": "Les copies sont maintenant des placements de la conception liée.", + "ui.shortcut_capture_add_key": "Ajoutez une touche ordinaire. Échap annule.", + "ui.shortcut_capture_hint": "Cliquez sur un raccourci, puis appuyez sur les modificateurs et une touche. Ajoutez les modificateurs en moins d'une seconde ; relâchez toutes les touches pour confirmer. Échap annule.", + "ui.shortcut_capture_press": "Appuyez sur les modificateurs et une touche. Échap annule.", + "ui.shortcut_capture_release": "Relâchez toutes les touches pour confirmer. Échap annule.", + "ui.shortcut_capture_settling": "Confirmation du raccourci… Échap annule.", + "ui.shortcut_cycles_modes": "Appuyer à nouveau sur le raccourci d'un outil change son mode", + "ui.shortcut_cycles_modes_tip": "Avant le premier point, appuyer à nouveau sur le raccourci d'un outil d'esquisse passe en revue ses modes de création. Désactivé : l'outil redémarre.", + "ui.shortcut_multiple_keys": "Utilisez des modificateurs et une seule autre touche. Cliquez sur le raccourci pour réessayer.", + "ui.step_values": "Incrémenter les valeurs avec les flèches et la molette", + "ui.step_values_tip": "Dans un champ de valeur en cours de saisie, Haut/Bas modifient un nombre simple de 1 (Maj : 10, Alt : 0,1), de même que la molette de la souris au-dessus du champ. Les expressions restent telles que saisies.", + "ui.turn_up_axis": "Changer l'axe vertical", + "ui.vertical_constraint": "Contrainte verticale", + "ui.viewport_theme_follow": "Suivre le thème", + "ui.window_system": "Système de fenêtrage", + "ui.window_system_auto": "Automatique", + "ui.window_system_wayland": "Wayland", + "ui.window_system_x11": "X11", + "update.prefs_web": "Rechargez la page pour obtenir la dernière version de l'application web. Si le réseau est indisponible ou si la mise à jour ne peut pas finir de se télécharger à temps, la version enregistrée s'ouvre à la place ; un téléchargement en cours se poursuit pour le prochain rechargement.", + "web.files.insert_drawings_hint": "Fichiers CAO, maillages, DXF ou SVG dans la conception ouverte", + "web.files.insert_stored_drawings_hint": "Dans la conception ouverte (fichiers CAO, maillages, DXF, SVG)", + "web.open_full": "Ouvrir dans SolidCraft", + "web.open_link": "Ouvrir la conception liée ?", + "web.open_link_confirm": "Il y a des modifications non enregistrées. Ouvrir la conception liée dans un nouvel onglet ?", + "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ choisir · Entrée applique la saisie · Échap fermer" + } +} From 7e8ccad341ad59e30f2a6749eb693b77ce8e97d3 Mon Sep 17 00:00:00 2001 From: sascha2101 Date: Tue, 27 Oct 2026 12:40:02 +0000 Subject: [PATCH 026/102] Browser: a body's name hides the body, not a sketch of the same name (#7206) (#7604) * claim: #7206 * Browser: a body's name hides the body, not a sketch of the same name (#7206) `browser.visibility` looked a key up as a feature first, so when a sketch had exactly the name of a body (a sketch named after the body it makes), the body's eye in the browser hid and showed the sketch instead, and the body could not be hidden at all. The browser names a sketch by its id and a body only by its name, so a name that is exactly both now names the body. The sketch still hides and shows by its id; matches that differ only in case are left as they are (#6967, #7004). Fixes #7569 too. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FN5eEMrqWWXqi65FcK8GXq --------- Co-authored-by: sascha2101 <221609842+sascha2101@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- crates/engine/src/cmd/browser.rs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/crates/engine/src/cmd/browser.rs b/crates/engine/src/cmd/browser.rs index 5bd8a8836..640b478c1 100644 --- a/crates/engine/src/cmd/browser.rs +++ b/crates/engine/src/cmd/browser.rs @@ -199,6 +199,12 @@ fn is_construction(k: &FeatureKind) -> bool { fn shown_item(s: &Session, key: &str) -> Option { if let Some(f) = s.doc.find_feature(key) { if matches!(f.kind, FeatureKind::Sketch { .. }) { + // A sketch and a body with exactly the same name, a sketch named after the body it + // makes (#7206): the name is the body's. The browser names a sketch by its id and a + // body only by its name, so the body could not be reached otherwise. + if f.name == key && s.world_state().bodies.iter().any(|b| b.name == key) { + return Some(Shown::Body(key.to_string())); + } return Some(Shown::Sketch(f.id)); } if is_construction(&f.kind) { @@ -1589,6 +1595,31 @@ mod tests { } } + /// #7206, #7569: a sketch named after the body it makes. The name hides and shows the body, + /// as the body's eye in the browser asks; the sketch, which the browser names by its id, + /// still hides and shows by its id, and the body is left alone. + #[test] + fn a_body_hides_by_its_name_when_a_sketch_has_the_same_name() { + let mut s = Session::default(); + let sketch = run(&mut s, "sketch.create", json!({"plane": "XY"}))["sketch"].as_u64().unwrap(); + run(&mut s, "sketch.rectangle.two_point", json!({"p0": [0, 0], "p1": [10, 10]})); + run(&mut s, "sketch.finish", json!({})); + run(&mut s, "timeline.rename", json!({"feature": sketch, "name": "Deckel"})); + run(&mut s, "solid.extrude", json!({"sketch": sketch, "distance": 5, "body_name": "Deckel"})); + let r = run(&mut s, "browser.visibility", json!({"items": ["Deckel"], "visible": false})); + assert_eq!(r["changed"], 1); + assert_eq!(s.visibility.hidden_bodies, vec!["Deckel".to_string()]); + assert!(s.visibility.hidden_sketches.is_empty(), "the sketch is not the item that changed"); + run(&mut s, "browser.visibility", json!({"items": ["Deckel"], "visible": true})); + assert!(s.visibility.hidden_bodies.is_empty()); + // The sketch by its id: shown and hidden again, the body stays shown. + run(&mut s, "browser.visibility", json!({"items": [sketch], "visible": true})); + assert_eq!(s.visibility.shown_sketches, vec![sketch]); + run(&mut s, "browser.visibility", json!({"items": [sketch], "visible": false})); + assert_eq!(s.visibility.hidden_sketches, vec![sketch]); + assert!(s.visibility.hidden_bodies.is_empty()); + } + #[test] fn helper_sketches_hide_and_show() { let mut s = Session::default(); From b2f69ab314b21ad9cfbcef0d98b3ebac7882ec58 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 15:00:36 +0000 Subject: [PATCH 027/102] Regenerate generated files and fold pending files [skip ci] --- assets/locales/de.json | 92 ++++++++++++++++++++++++ assets/locales/pending/de-batch-1.json | 96 -------------------------- 2 files changed, 92 insertions(+), 96 deletions(-) delete mode 100644 assets/locales/pending/de-batch-1.json diff --git a/assets/locales/de.json b/assets/locales/de.json index 2959d7c4e..ab1d67969 100644 --- a/assets/locales/de.json +++ b/assets/locales/de.json @@ -5,7 +5,10 @@ "2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Screenshot anhängen: kopieren und einfügen oder als PNG speichern und hochladen.", "2D": "2D", "3. Click Submit new issue on GitHub to send your report.": "3. Auf GitHub auf Submit new issue klicken, um den Bericht zu senden.", + "A Single hole snaps to the middle of its face and to the centres of its round edges": "Eine einzelne Bohrung rastet am Flächenmittelpunkt und an den Mittelpunkten ihrer kreisförmigen Kanten ein", "A new configuration, a copy of the active one": "Eine neue Konfiguration, eine Kopie der aktiven", + "A placed Single hole has a handle to drag it, and picking its face again moves the hole there instead of taking it out": "Eine platzierte einzelne Bohrung lässt sich über einen Ziehgriff verschieben. Durch erneutes Anklicken ihrer Fläche wird die Bohrung dorthin verschoben, statt entfernt zu werden", + "A short title for the problem (optional)": "Kurzer Problemtitel (optional)", "ARRANGE": "ANORDNEN", "About SolidCraft": "Über SolidCraft", "Acceleration": "Beschleunigung", @@ -19,19 +22,25 @@ "Add Mid Radius": "Mittleren Radius hinzufügen", "Add Row": "Zeile hinzufügen", "Add a tool": "Werkzeug hinzufügen", + "Add bend": "Biegung hinzufügen", "Add condition": "Bedingung hinzufügen", "Add or edit rule": "Regel hinzufügen oder bearbeiten", "Add to New Folder": "Zu neuem Ordner hinzufügen", "Advanced": "Erweitert", "Against": "Gegen", "Alignment": "Ausrichtung", + "All Lines": "Alle Linien", "All Sketch Points": "Alle Skizzenpunkte", "All components": "Alle Komponenten", "All open designs": "Alle geöffneten Designs", "Allowed expressions, separated by semicolons": "Zulässige Ausdrücke, durch Semikolons getrennt", "Also deletes": "Löscht auch", + "Anchor": "Anker", "Angle 2": "Winkel 2", + "Angle Display": "Winkelanzeige", "Animate": "Animieren", + "Another bend on the far edge of the last flange": "Eine weitere Biegung an der gegenüberliegenden Kante des letzten Flansches", + "App/system information and command settings are included. Review private details before sharing.": "App- und Systeminformationen sowie Befehlseinstellungen werden mit übermittelt. Prüfen Sie vor dem Teilen, ob private Angaben enthalten sind.", "Appearance name": "Name des Erscheinungsbilds", "Applied Radius": "Angewendeter Radius", "Apply To": "Anwenden auf", @@ -46,6 +55,8 @@ "BLEND SURFACE": "ÜBERGANGSFLÄCHE", "BOUNDARY SURFACE": "BERANDUNGSFLÄCHE", "BROWSER": "BROWSER", + "Bar": "Flachstab", + "Bend": "Biegung", "Bend Edges": "Biegekanten", "Bend Line Position": "Position der Biegelinie", "Bend Position": "Biegeposition", @@ -58,6 +69,9 @@ "Body (last if none)": "Körper (letzter, wenn keiner)", "Body to split": "Zu teilender Körper", "Body, or faces to take out": "Körper oder zu entfernende Flächen", + "Bottom Left": "Unten links", + "Bottom Middle": "Unten Mitte", + "Bottom Right": "Unten rechts", "Boundary": "Begrenzung", "Bounding box": "Hüllquader", "CHECK": "PRÜFEN", @@ -77,12 +91,15 @@ "Center Y": "Mittelpunkt Y", "Center of mass": "Massenschwerpunkt", "Centre to centre": "Mitte zu Mitte", + "Centroid": "Flächenschwerpunkt", "Chamfer Type": "Abschrägungstyp", + "Channel": "U-Profil", "Check collisions": "Kollisionen prüfen", "Checked": "Geprüft", "Choose Variable radius or Spline in Type.": "Unter „Typ“ „Variable radius“ oder „Spline“ wählen.", "Choose a new plane. Sketch geometry and dimensions stay unchanged in its two-dimensional coordinates.": "Wählen Sie eine neue Ebene. Skizzengeometrie und Bemaßungen bleiben in ihren zweidimensionalen Koordinaten unverändert.", "Choose…": "Auswählen…", + "Circle center": "Kreismittelpunkt", "Circular": "Kreisförmig", "Circumference": "Umfang", "Clockwise": "Im Uhrzeigersinn", @@ -102,8 +119,10 @@ "Contact": "Kontakt", "Contact Sets": "Kontaktsätze", "Contact sets": "Kontaktsätze", + "Continue on GitHub": "Auf GitHub fortfahren", "Continuity": "Stetigkeit", "Control Radius": "Kontrollradius", + "Copies the definition only. Assign it from Physical Material when ready.": "Kopiert nur die Materialdefinition. Weisen Sie das Material anschließend unter „Physikalisches Material“ zu.", "Copy Error Message": "Fehlermeldung kopieren", "Copy Warning Message": "Warnmeldung kopieren", "Copy all licences": "Alle Lizenzen kopieren", @@ -112,19 +131,23 @@ "Copy screenshot": "Screenshot kopieren", "Corner Relief": "Eckenentlastung", "Corner Relief Shape": "Form der Eckenentlastung", + "Corner radius": "Eckenradius", "Counterbore depth": "Tiefe der Senkung", "Counterbore Ø": "Tiefenbohrung Ø", "Countersink angle": "Winkel der Kegelsenkung", "Countersink Ø": "Senkung Ø", + "Create Hole": "Bohrung erstellen", "Create Issue — review draft": "Issue erstellen — Entwurf prüfen", "Create Issue…": "Issue erstellen…", "Cross curves": "Querkurven", "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", "Curv. Comb": "Krümmungskamm", "Curvature (G2)": "Krümmung (G2)", "Curvature change (G3)": "Krümmungsänderung (G3)", + "Custom": "Benutzerdefiniert", "Customize Toolbar": "Symbolleiste anpassen", "Customize…": "Anpassen…", "Cylindrical face": "Zylindrische Fläche", @@ -137,6 +160,8 @@ "Delete the set": "Satz löschen", "Density": "Dichte", "Dependents": "Abhängige Elemente", + "Describe the problem you saw": "Beschreiben Sie das aufgetretene Problem", + "Describe what happened before continuing.": "Beschreiben Sie, was passiert ist, bevor Sie fortfahren.", "Designs you open or save appear here.": "Designs, die Sie öffnen oder speichern, erscheinen hier.", "Determined by To Object. Choose Angle to edit the angular extent.": "Bestimmt durch Bis Objekt. Wählen Sie Winkel, um den Winkelbereich zu bearbeiten.", "Diameter": "Durchmesser", @@ -148,6 +173,7 @@ "Don't ask again": "Nicht mehr fragen", "Double-click to rename": "Double-click to rename", "Double-clicking the middle button in the view: Home (the home view, framing what is shown), Fit (frame what is shown, keeping the orientation) or nothing": "Doppelklick mit der mittleren Taste in der Ansicht: Home (Startansicht, zeigt alles Sichtbare), Einpassen (Sichtbares einpassen, Ausrichtung beibehalten) oder nichts", + "Drag to move the hole; click to remove it": "Ziehen, um die Bohrung zu verschieben; anklicken, um sie zu entfernen", "Drive Joint": "Gelenk antreiben", "Duration": "Dauer", "Edges": "Kanten", @@ -159,6 +185,7 @@ "End bulge": "Endausbauchung", "End continuity": "Endstetigkeit", "Expand": "Ausklappen", + "Expected result (optional)": "Erwartetes Ergebnis (optional)", "Explode": "Explodieren", "Explode Text": "Text auflösen", "Export Animation…": "Animation exportieren…", @@ -171,6 +198,7 @@ "Export JSON…": "JSON exportieren…", "Export design library...": "Designbibliothek exportieren...", "Export hidden edges as dashed lines": "Verdeckte Kanten gestrichelt exportieren", + "Exported by SolidWorks, which usually saves Y up": "Aus SolidWorks exportiert; dort zeigt die Y-Achse normalerweise nach oben", "Expression": "Ausdruck", "Extend to meet": "Verlängern, bis sie sich treffen", "Extents": "Ausdehnung", @@ -179,6 +207,7 @@ "Face": "Fläche", "Face Appearance": "Flächenerscheinungsbild", "Face attachment lost": "Flächenanbindung verloren", + "Face center": "Flächenmittelpunkt", "Faces": "Flächen", "Faces / edges / vertices": "Flächen / Kanten / Ecken", "Faces to split": "Zu teilende Flächen", @@ -194,6 +223,8 @@ "First plane": "Erste Ebene", "Fit and G2 corners require Constant radius.": "Passung und G2-Ecken erfordern Constant radius.", "Fixed Face": "Feste Fläche", + "Flange thickness": "Flanschdicke", + "Flanges": "Flansche", "Flat Pattern": "Flachmuster", "Flat size": "Abwicklungsgröße", "Follow camera (Look At sketches)": "Kamera folgen (Skizzen ansehen)", @@ -203,23 +234,32 @@ "From Bodies": "Aus Körpern", "From edges": "Ausgangskanten", "Full Length": "Volle Länge", + "Full thread depth": "Volle Gewindetiefe", + "Further Bends": "Weitere Biegungen", "G2 corners require a constant radius and Exact fit. G2 corner construction is not supported yet.": "G2-Ecken erfordern einen konstanten Radius und Exact fit. Die Konstruktion von G2-Ecken wird noch nicht unterstützt.", "Gap": "Spalt", "Grid": "Raster", "HISTORY": "VERLAUF", + "Halo under sketch curves": "Hervorhebung unter Skizzenkurven", "Height": "Höhe", + "Height From": "Höhe ab", "Hidden edges": "Verdeckte Kanten", "History layout": "Verlaufslayout", + "History names": "Namen im Konstruktionsverlauf", "Hole (optional)": "Bohrung (optional)", "Holes": "Löcher", "Holes (edges on them)": "Löcher (ihre Kanten)", "Home view": "Startansicht", "Horiz./Vert.": "Horiz./Vert.", + "I-Beam": "I-Träger", "IMAGES": "BILDER", + "Import material into design": "Material ins Design importieren", "Import…": "Importieren…", "In This Design": "In diesem Design", "In place (surfaces)": "An Ort und Stelle (Flächen)", "In plane": "In der Ebene", + "Included": "Enthalten", + "Inner Sharp": "Innenkante", "Inside": "Innen", "Instant": "Sofort", "Interface font": "Schriftart der Oberfläche", @@ -235,10 +275,12 @@ "Keep of the other surface": "Vom anderen Flächenkörper behalten", "Key a joint's value at this step": "Gelenkwert in diesem Schritt als Schlüsselbild setzen", "Keys": "Schlüsselbilder", + "L-Angle": "L-Profil", "LIBRARY": "BIBLIOTHEK", "LINKS": "VERKNÜPFUNGEN", "Later": "Später", "Leave it": "Belassen", + "Left Middle": "Links Mitte", "Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Alte Flächenanbindung. Das erneute Anbinden an eine zertifizierte Fläche erzeugt eine exakte Anbindung.", "Length": "Länge", "Length units": "Length units", @@ -248,11 +290,13 @@ "Limits": "Grenzen", "Line Spacing": "Zeilenabstand", "Line Type": "Linientyp", + "Lines": "Linien", "Listing the installed fonts…": "Installierte Schriftarten werden aufgelistet…", "Load library": "Bibliothek laden", "Local library": "Lokale Bibliothek", "Loop": "Schleife", "M5 or M5x0.5": "M5 oder M5x0.5", + "M5, M5x0.5, 1/4-20 UNC": "M5, M5x0.5, 1/4-20 UNC", "MANAGE": "VERWALTEN", "MATERIALS": "MATERIALIEN", "MODEL": "MODELL", @@ -262,6 +306,8 @@ "Mass Center": "Massenschwerpunkt", "Matched restrictions check the final values.": "Zutreffende Einschränkungen prüfen die endgültigen Werte.", "Material": "Material", + "Material Outside": "Material außen", + "Material copied. Existing body assignments are unchanged.": "Material kopiert. Bestehende Materialzuweisungen der Körper bleiben unverändert.", "Max": "Max", "Maximum": "Maximum", "Mesh body": "Netzkörper", @@ -281,9 +327,11 @@ "Move Type": "Verschiebungstyp", "Move down": "Nach unten", "Move earlier": "Nach vorn verschieben", + "Move holes by clicking or dragging": "Bohrungen durch Anklicken oder Ziehen verschieben", "Move later": "Nach hinten verschieben", "Move up": "Nach oben", "Name": "Name", + "Name on import": "Name beim Import", "Nearest": "Nächstgelegen", "New": "Neu", "New Comp.": "Neue Komp.", @@ -293,22 +341,32 @@ "No crash reports.": "Keine Absturzberichte.", "No matching appearance presets.": "Keine passenden Erscheinungsbildvorlagen.", "No matching appearances": "Keine passenden Erscheinungsbilder", + "No matching physical materials.": "Keine passenden physikalischen Materialien gefunden.", "No visible bodies or sketches to export.": "Keine sichtbaren Körper oder Skizzen zum Exportieren.", + "Nominal diameter": "Nenndurchmesser", "None": "Keine", "Not available yet": "Noch nicht verfügbar", + "Not saved yet": "Noch nicht gespeichert", "Notch": "Ausklinkung", "OUTPUT": "AUSGABE", "Of": "Freiheitsgrad", "On your computer": "Auf diesem Computer", "Opacity": "Deckkraft", "Open GitHub draft": "GitHub-Entwurf öffnen", + "Open bodies (no volume)": "Offene Körper (ohne Volumen)", "Open library...": "Bibliothek öffnen...", "Open local libraries in the desktop app. You can export this design's library here.": "Öffnen Sie lokale Bibliotheken in der Desktop-App. Die Bibliothek dieses Designs können Sie hier exportieren.", + "Open surface — no volume": "Offene Oberfläche – kein Volumen", "Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "Quelloffenes parametrisches 3D-CAD in Rust. Lizenziert unter MIT OR Apache-2.0.", + "Opens your browser and copies the report text for you to paste into GitHub.": "Öffnet den Browser und kopiert den Berichtstext, den Sie anschließend auf GitHub einfügen können.", + "Opens your browser. Review and submit your report on GitHub.": "Öffnet den Browser. Prüfen Sie den Bericht und reichen Sie ihn auf GitHub ein.", "Operator": "Operator", "Orbit (right drag)": "Drehen (mit rechts ziehen)", "Other side": "Andere Seite", "Other surface (mutual trim)": "Anderer Flächenkörper (gegenseitig trimmen)", + "Other way": "Entgegengesetzte Richtung", + "Outer Sharp": "Außenkante", + "Outer radius": "Außenradius", "Outside": "Außen", "Overall length": "Gesamtlänge", "Param. Graph": "Param.-Graph", @@ -318,9 +376,11 @@ "Path": "Pfad", "Pattern": "Muster", "Per Edge": "Pro Kante", + "Physical material definitions": "Definitionen physikalischer Materialien", "Pick the tool bodies": "Werkzeugkörper wählen", "Picked": "Ausgewählte", "Picked point": "Gewählter Punkt", + "Pitch": "Steigung", "Pivot": "Drehpunkt", "Place at the origin instead": "Stattdessen im Ursprung platzieren", "Plastic Rules": "Kunststoffregeln", @@ -350,6 +410,7 @@ "Recover": "Wiederherstellen", "Recover unsaved design?": "Nicht gespeichertes Design wiederherstellen?", "Rectangular": "Rechteckig", + "Rectangular Tube": "Rechteckrohr", "Reference face": "Referenzfläche", "Remove Tools": "Werkzeuge entfernen", "Remove condition": "Bedingung entfernen", @@ -360,11 +421,14 @@ "Remove screenshot": "Screenshot entfernen", "Remove the column": "Spalte entfernen", "Remove the track": "Spur entfernen", + "Remove this bend": "Diese Biegung entfernen", "Remove this point": "Diesen Punkt entfernen", "Rename Feature": "Merkmal umbenennen", "Rename Folder": "Ordner umbenennen", "Replace existing library file": "Vorhandene Bibliotheksdatei ersetzen", "Report a bug — review a screenshot and open a GitHub draft": "Fehler melden — Screenshot prüfen und einen GitHub-Entwurf öffnen", + "Report text copied. Paste it into GitHub and submit your report there.": "Berichtstext kopiert. Fügen Sie ihn auf GitHub ein und reichen Sie den Bericht dort ein.", + "Reports are public. A GitHub account is required.": "Berichte sind öffentlich. Ein GitHub-Konto ist erforderlich.", "Reset Toolbar": "Symbolleiste zurücksetzen", "Resize Part": "Teil skalieren", "Restore View": "Ansicht wiederherstellen", @@ -380,31 +444,40 @@ "Revert Pos.": "Pos. zurücksetzen", "Revert Position": "Position zurücksetzen", "Review the report and screenshot before opening GitHub.": "Prüfen Sie Bericht und Screenshot, bevor Sie GitHub öffnen.", + "Review your report on GitHub and click Submit new issue to publish it.": "Prüfen Sie Ihren Bericht auf GitHub und klicken Sie auf „Submit new issue“, um ihn zu veröffentlichen.", "Rib Length": "Rippenlänge", "Rib Offset": "Rippenversatz", "Rib Thickness": "Rippendicke", "Ribs": "Rippen", + "Right Middle": "Rechts Mitte", "Rim Edge": "Randkante", "Ring of tools on the right button": "Werkzeugring auf der rechten Maustaste", "Roll Back Here": "Hierher zurücksetzen", "Roll History Marker Here": "Verlaufsmarkierung hierher verschieben", + "Root radius": "Kehlradius", "Round": "Rund", + "Round Bar": "Rundstab", + "Round Tube": "Rundrohr", "Rule": "Rule", "Rule name": "Regelname", "Rules run from top to bottom. Matched drives change effective values.": "Regeln werden von oben nach unten ausgeführt. Zutreffende Steuerungen ändern die wirksamen Werte.", "SECTION": "SCHNITT", "SURFACE QUALITY": "OBERFLÄCHENQUALITÄT", + "Same way": "Gleiche Richtung", "Save Rule": "Regel speichern", "Save View": "Ansicht speichern", + "Save screenshot…": "Screenshot speichern…", "Save the study as an animated GIF, seen as the viewport shows it": "Die Studie als animiertes GIF speichern, so wie der Ansichtsbereich sie zeigt", "Saved preview. Geometry is being checked before editing.": "Gespeicherte Vorschau. Die Geometrie wird vor dem Bearbeiten geprüft.", "Scale factor": "Skalierungsfaktor", "Scene": "Szene", + "Screenshot (optional)": "Screenshot (optional)", "Search": "Suchen", "Search commands": "Befehle suchen", "Search this library": "Diese Bibliothek durchsuchen", "Second plane": "Zweite Ebene", "Section": "Schnitt", + "Section (optional)": "Abschnitt (optional)", "Section position": "Lage des Querschnitts", "Sections (one sketch each)": "Querschnitte (je eine Skizze)", "Select Other": "Andere auswählen", @@ -419,6 +492,7 @@ "Shape": "Form", "Sheet Rules": "Blechregeln", "Show Agent Cursor": "Agenten-Cursor anzeigen", + "Show ghost": "Geistermodell anzeigen", "Show in folder": "Im Ordner anzeigen", "Show the pointer an AI agent moves (#35)": "Den Zeiger anzeigen, den ein KI-Agent bewegt (#35)", "Show tool at cursor": "Werkzeug am Cursor anzeigen", @@ -431,6 +505,7 @@ "Sketch plane has no body-face attachment.": "Die Skizzenebene hat keine Anbindung an eine Körperfläche.", "Sketch points": "Skizzenpunkte", "Slot width": "Langlochbreite", + "Snap to face and edge centres": "An Flächen- und Kantenmittelpunkten einrasten", "SolidCraft closed before these designs were saved. Their last autosave can be opened.": "SolidCraft wurde beendet, bevor diese Designs gespeichert wurden. Ihr letzter Autosave kann geöffnet werden.", "Specialise": "Spezialisieren", "Speed": "Geschwindigkeit", @@ -444,23 +519,29 @@ "Start continuity": "Startstetigkeit", "Step": "Schritt", "Steps": "Schritte", + "Steps to reproduce (optional)": "Schritte zur Reproduktion (optional)", "Stitch the kept pieces": "Behaltene Teile vernähen", "Stitch to both bodies": "Mit beiden Körpern vernähen", "Studio": "Studio", "Study": "Untersuchung", "Style": "Stil", + "Summary": "Zusammenfassung", "Suppress": "Unterdrücken", "Suppressed": "Unterdrückt", "Surface": "Flächenkörper", "Surface, or faces to turn over": "Fläche oder umzudrehende Flächen", "Swap Ends": "Enden vertauschen", "TRIM": "TRIMMEN", + "Tangent": "Tangential", "Tangent (G1)": "Tangente (G1)", "Tangent Chain": "Tangentenkette", "Tangent chain": "Tangentialkette", + "Tangent to Edge": "Tangential an Kante", + "Tap drill diameter": "Kernlochdurchmesser", "Target": "Ziel", "Target Body": "Zielkörper", "Tear": "Reißen", + "Technical details": "Technische Details", "The dashed sketch is a saved plane guide. Select a new face to repair the attachment.": "Die gestrichelte Skizze ist eine gespeicherte Ebenenführung. Wählen Sie eine neue Fläche, um die Anbindung zu reparieren.", "The saved author occurrence is missing. Select a valid author placement before rebinding.": "Das gespeicherte Autorvorkommen fehlt. Wählen Sie vor dem erneuten Anbinden eine gültige Autorplatzierung.", "Then": "Then", @@ -472,14 +553,21 @@ "This child is shared. Deleting it removes it from every copy of its parent.": "Dieses untergeordnete Element ist geteilt. Löschen entfernt es aus jeder Kopie des übergeordneten Elements.", "This child is shared. Position changes apply to every copy of its parent.": "Dieses untergeordnete Element ist geteilt. Positionsänderungen gelten für jede Kopie des übergeordneten Elements.", "This face cannot provide a durable attachment. Choose another face or explicitly use a fixed plane.": "Diese Fläche kann keine dauerhafte Anbindung bieten. Wählen Sie eine andere Fläche oder verwenden Sie ausdrücklich eine feste Ebene.", + "This image is not attached to GitHub yet. Copy or save it, then attach it on GitHub.": "Dieses Bild wurde noch nicht an GitHub angehängt. Kopieren oder speichern Sie es und fügen Sie es anschließend Ihrem GitHub-Bericht hinzu.", + "Thread depth": "Gewindetiefe", + "Thread diameter": "Gewindedurchmesser", "To": "Bis", "To Offset": "Bis Versatz", "To edges": "Zielkanten", + "Toe radius": "Kantenradius", "Tolerance": "Toleranz", "Too close": "Zu nah", "Tool Bodies": "Werkzeugkörper", "Tools": "Werkzeuge", "Tools, clockwise from the top": "Werkzeuge, im Uhrzeigersinn von oben", + "Top Left": "Oben links", + "Top Middle": "Oben Mitte", + "Top Right": "Oben rechts", "Trimming tool (plane, face or curves)": "Trimmwerkzeug (Ebene, Fläche oder Kurven)", "Turn off section analysis before exporting the view.": "Deaktivieren Sie die Schnittanalyse, bevor Sie die Ansicht exportieren.", "Type": "Typ", @@ -504,6 +592,10 @@ "Wall": "Wand", "Wall Location": "Wandlage", "Wall Thickness": "Wandstärke", + "Web thickness": "Stegdicke", + "What did you do just before the problem? A short list is enough": "Was haben Sie unmittelbar vor dem Auftreten des Problems getan? Eine kurze Liste genügt.", + "What did you expect to see?": "Was hatten Sie erwartet?", + "What happened?": "Was ist passiert?", "When": "When", "Width": "Breite", "Will fail": "Schlägt fehl", diff --git a/assets/locales/pending/de-batch-1.json b/assets/locales/pending/de-batch-1.json deleted file mode 100644 index 4f55f3407..000000000 --- a/assets/locales/pending/de-batch-1.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "de": { - "A Single hole snaps to the middle of its face and to the centres of its round edges": "Eine einzelne Bohrung rastet am Flächenmittelpunkt und an den Mittelpunkten ihrer kreisförmigen Kanten ein", - "A placed Single hole has a handle to drag it, and picking its face again moves the hole there instead of taking it out": "Eine platzierte einzelne Bohrung lässt sich über einen Ziehgriff verschieben. Durch erneutes Anklicken ihrer Fläche wird die Bohrung dorthin verschoben, statt entfernt zu werden", - "A short title for the problem (optional)": "Kurzer Problemtitel (optional)", - "Add bend": "Biegung hinzufügen", - "All Lines": "Alle Linien", - "Anchor": "Anker", - "Angle Display": "Winkelanzeige", - "Another bend on the far edge of the last flange": "Eine weitere Biegung an der gegenüberliegenden Kante des letzten Flansches", - "App/system information and command settings are included. Review private details before sharing.": "App- und Systeminformationen sowie Befehlseinstellungen werden mit übermittelt. Prüfen Sie vor dem Teilen, ob private Angaben enthalten sind.", - "Bar": "Flachstab", - "Bend": "Biegung", - "Bottom Left": "Unten links", - "Bottom Middle": "Unten Mitte", - "Bottom Right": "Unten rechts", - "Centroid": "Flächenschwerpunkt", - "Channel": "U-Profil", - "Circle center": "Kreismittelpunkt", - "Continue on GitHub": "Auf GitHub fortfahren", - "Copies the definition only. Assign it from Physical Material when ready.": "Kopiert nur die Materialdefinition. Weisen Sie das Material anschließend unter „Physikalisches Material“ zu.", - "Corner radius": "Eckenradius", - "Create Hole": "Bohrung erstellen", - "Current plane": "Aktuelle Ebene", - "Custom": "Benutzerdefiniert", - "Describe the problem you saw": "Beschreiben Sie das aufgetretene Problem", - "Describe what happened before continuing.": "Beschreiben Sie, was passiert ist, bevor Sie fortfahren.", - "Drag to move the hole; click to remove it": "Ziehen, um die Bohrung zu verschieben; anklicken, um sie zu entfernen", - "Expected result (optional)": "Erwartetes Ergebnis (optional)", - "Exported by SolidWorks, which usually saves Y up": "Aus SolidWorks exportiert; dort zeigt die Y-Achse normalerweise nach oben", - "Face center": "Flächenmittelpunkt", - "Flange thickness": "Flanschdicke", - "Flanges": "Flansche", - "Full thread depth": "Volle Gewindetiefe", - "Further Bends": "Weitere Biegungen", - "Halo under sketch curves": "Hervorhebung unter Skizzenkurven", - "Height From": "Höhe ab", - "History names": "Namen im Konstruktionsverlauf", - "I-Beam": "I-Träger", - "Import material into design": "Material ins Design importieren", - "Included": "Enthalten", - "Inner Sharp": "Innenkante", - "L-Angle": "L-Profil", - "Left Middle": "Links Mitte", - "Lines": "Linien", - "M5, M5x0.5, 1/4-20 UNC": "M5, M5x0.5, 1/4-20 UNC", - "Material Outside": "Material außen", - "Material copied. Existing body assignments are unchanged.": "Material kopiert. Bestehende Materialzuweisungen der Körper bleiben unverändert.", - "Move holes by clicking or dragging": "Bohrungen durch Anklicken oder Ziehen verschieben", - "Name on import": "Name beim Import", - "No matching physical materials.": "Keine passenden physikalischen Materialien gefunden.", - "Nominal diameter": "Nenndurchmesser", - "Not saved yet": "Noch nicht gespeichert", - "Open bodies (no volume)": "Offene Körper (ohne Volumen)", - "Open surface — no volume": "Offene Oberfläche – kein Volumen", - "Opens your browser and copies the report text for you to paste into GitHub.": "Öffnet den Browser und kopiert den Berichtstext, den Sie anschließend auf GitHub einfügen können.", - "Opens your browser. Review and submit your report on GitHub.": "Öffnet den Browser. Prüfen Sie den Bericht und reichen Sie ihn auf GitHub ein.", - "Other way": "Entgegengesetzte Richtung", - "Outer Sharp": "Außenkante", - "Outer radius": "Außenradius", - "Physical material definitions": "Definitionen physikalischer Materialien", - "Pitch": "Steigung", - "Rectangular Tube": "Rechteckrohr", - "Remove this bend": "Diese Biegung entfernen", - "Report text copied. Paste it into GitHub and submit your report there.": "Berichtstext kopiert. Fügen Sie ihn auf GitHub ein und reichen Sie den Bericht dort ein.", - "Reports are public. A GitHub account is required.": "Berichte sind öffentlich. Ein GitHub-Konto ist erforderlich.", - "Review your report on GitHub and click Submit new issue to publish it.": "Prüfen Sie Ihren Bericht auf GitHub und klicken Sie auf „Submit new issue“, um ihn zu veröffentlichen.", - "Right Middle": "Rechts Mitte", - "Root radius": "Kehlradius", - "Round Bar": "Rundstab", - "Round Tube": "Rundrohr", - "Same way": "Gleiche Richtung", - "Save screenshot…": "Screenshot speichern…", - "Screenshot (optional)": "Screenshot (optional)", - "Section (optional)": "Abschnitt (optional)", - "Show ghost": "Geistermodell anzeigen", - "Snap to face and edge centres": "An Flächen- und Kantenmittelpunkten einrasten", - "Steps to reproduce (optional)": "Schritte zur Reproduktion (optional)", - "Summary": "Zusammenfassung", - "Tangent": "Tangential", - "Tangent to Edge": "Tangential an Kante", - "Tap drill diameter": "Kernlochdurchmesser", - "Technical details": "Technische Details", - "This image is not attached to GitHub yet. Copy or save it, then attach it on GitHub.": "Dieses Bild wurde noch nicht an GitHub angehängt. Kopieren oder speichern Sie es und fügen Sie es anschließend Ihrem GitHub-Bericht hinzu.", - "Thread depth": "Gewindetiefe", - "Thread diameter": "Gewindedurchmesser", - "Toe radius": "Kantenradius", - "Top Left": "Oben links", - "Top Middle": "Oben Mitte", - "Top Right": "Oben rechts", - "Web thickness": "Stegdicke", - "What did you do just before the problem? A short list is enough": "Was haben Sie unmittelbar vor dem Auftreten des Problems getan? Eine kurze Liste genügt.", - "What did you expect to see?": "Was hatten Sie erwartet?", - "What happened?": "Was ist passiert?" - } -} From 69a46fb6a3d988dbf3472455370c9e357cadc423 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 15:08:50 +0000 Subject: [PATCH 028/102] Regenerate generated files and fold pending files [skip ci] --- assets/locales/fr.json | 1155 +++++++++++++++- .../pending/fr-catalog-completion.json | 1157 ----------------- 2 files changed, 1154 insertions(+), 1158 deletions(-) delete mode 100644 assets/locales/pending/fr-catalog-completion.json diff --git a/assets/locales/fr.json b/assets/locales/fr.json index 2fd54c0c8..8070e0f0c 100644 --- a/assets/locales/fr.json +++ b/assets/locales/fr.json @@ -5,7 +5,10 @@ "2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Joindre votre capture d'écran : la copier-coller, ou enregistrer le PNG puis le téléverser.", "2D": "2D", "3. Click Submit new issue on GitHub to send your report.": "3. Cliquer sur Submit new issue sur GitHub pour envoyer votre rapport.", + "A Single hole snaps to the middle of its face and to the centres of its round edges": "Un perçage simple s'accroche au milieu de sa face et aux centres de ses arêtes circulaires", "A new configuration, a copy of the active one": "Nouvelle configuration, copie de la configuration active", + "A placed Single hole has a handle to drag it, and picking its face again moves the hole there instead of taking it out": "Un perçage simple placé a une poignée pour le faire glisser ; choisir à nouveau sa face y déplace le perçage au lieu de le retirer", + "A short title for the problem (optional)": "Un titre court pour le problème (facultatif)", "ARRANGE": "DISPOSER", "About SolidCraft": "À propos de SolidCraft", "Acceleration": "Accélération", @@ -14,23 +17,34 @@ "Active": "Actif", "Active rule": "Règle active", "Add": "Ajouter", + "Add Column": "Ajouter une colonne", "Add Key": "Ajouter une image clé", "Add Mid Radius": "Ajouter un rayon intermédiaire", "Add Row": "Ajouter une ligne", + "Add a tool": "Ajouter un outil", + "Add bend": "Ajouter un pli", "Add condition": "Ajouter une condition", "Add or edit rule": "Ajouter ou modifier une règle", + "Add to New Folder": "Ajouter à un nouveau dossier", + "Advanced": "Avancé", "Against": "Contre", "Alignment": "Alignement", + "All Lines": "Toutes les lignes", "All Sketch Points": "Tous les points d'esquisse", "All components": "Tous les composants", "All open designs": "Toutes les conceptions ouvertes", "Allowed expressions, separated by semicolons": "Expressions autorisées, séparées par des points-virgules", "Also deletes": "Supprime aussi", + "Anchor": "Ancrage", "Angle 2": "Angle 2", + "Angle Display": "Affichage de l'angle", "Animate": "Animer", + "Another bend on the far edge of the last flange": "Un autre pli sur l'arête opposée du dernier bord tombé", + "App/system information and command settings are included. Review private details before sharing.": "Les informations sur l'app et le système ainsi que les réglages de la commande sont inclus. Vérifiez les données privées avant de partager.", "Appearance name": "Nom de l'apparence", "Applied Radius": "Rayon appliqué", "Apply To": "Appliquer à", + "Apply library appearance": "Appliquer l'apparence de la bibliothèque", "Apply to selection": "Appliquer à la sélection", "Apply your appearance first. Exports assigned appearances and materials created in this design.": "Appliquez d’abord votre apparence. Exporte les apparences attribuées et les matériaux créés dans cette conception.", "Arc length": "Longueur d'arc", @@ -41,13 +55,23 @@ "BLEND SURFACE": "SURFACE DE RACCORD", "BOUNDARY SURFACE": "SURFACE FRONTIÈRE", "BROWSER": "NAVIGATEUR", + "Bar": "Plat", + "Bend": "Angle de pli", + "Bend Edges": "Arêtes de pli", "Bend Line Position": "Position de la ligne de pli", "Bend Position": "Position du pli", "Bend Radius": "Rayon de pliage", "Bend Table": "Table de pliage", "Bends": "Plis", "Bodies": "Corps", + "Bodies (optional)": "Corps (facultatif)", "Body": "Corps", + "Body (last if none)": "Corps (le dernier si aucun)", + "Body to split": "Corps à scinder", + "Body, or faces to take out": "Corps, ou faces à retirer", + "Bottom Left": "Bas gauche", + "Bottom Middle": "Bas centre", + "Bottom Right": "Bas droite", "Boundary": "Contour", "Bounding box": "Boîte englobante", "CHECK": "VÉRIFIER", @@ -59,32 +83,46 @@ "CSV or JSON: updates existing parameters, adds new ones": "CSV ou JSON : met à jour les paramètres existants, ajoute les nouveaux", "Capture All Positions": "Capturer toutes les positions", "Capture Pos.": "Capturer pos.", + "Catch Depth": "Profondeur de l'ergot", "Catch Direction": "Direction de l'ergot", + "Catch Length": "Longueur de l'ergot", "Cells": "Cellules", "Center X": "Centre X", "Center Y": "Centre Y", "Center of mass": "Centre de gravité", "Centre to centre": "Entraxe", + "Centroid": "Centroïde", "Chamfer Type": "Type de chanfrein", + "Channel": "Profilé en U", "Check collisions": "Vérifier les collisions", "Checked": "Vérifié", + "Choose Variable radius or Spline in Type.": "Choisissez Rayon variable ou Spline dans Type.", "Choose a new plane. Sketch geometry and dimensions stay unchanged in its two-dimensional coordinates.": "Choisir un nouveau plan. La géométrie et les cotes de l'esquisse restent inchangées dans ses coordonnées bidimensionnelles.", "Choose…": "Choisir…", + "Circle center": "Centre du cercle", "Circular": "Circulaire", "Circumference": "Circonférence", "Clockwise": "Horaire", "Close draft": "Fermer le brouillon", + "Collapse": "Réduire", "Collisions": "Collisions", "Colour": "Couleur", + "Command": "Commande", "Comment": "Commentaire", + "Component 1": "Composant 1", + "Component 2": "Composant 2", "Component1": "Composant1", + "Components": "Composants", "Config Table": "Table de config.", "Configuration": "Configuration", "Configuration rules": "Règles de configuration", "Contact": "Contact", "Contact Sets": "Jeux de contacts", "Contact sets": "Jeux de contact", + "Continue on GitHub": "Continuer sur GitHub", "Continuity": "Continuité", + "Control Radius": "Rayon de contrôle", + "Copies the definition only. Assign it from Physical Material when ready.": "Copie uniquement la définition. Affectez-la depuis Matériau physique le moment venu.", "Copy Error Message": "Copier le message d'erreur", "Copy Warning Message": "Copier le message d'avertissement", "Copy all licences": "Copier toutes les licences", @@ -93,32 +131,49 @@ "Copy screenshot": "Copier la capture d'écran", "Corner Relief": "Dégagement d'angle", "Corner Relief Shape": "Forme du dégagement d'angle", + "Corner radius": "Rayon d'angle", "Counterbore depth": "Profondeur du lamage", + "Counterbore Ø": "Ø du lamage", "Countersink angle": "Angle de la fraisure", + "Countersink Ø": "Ø de la fraisure", + "Create Hole": "Créer un perçage", "Create Issue — review draft": "Créer un ticket — relire le brouillon", + "Create Issue…": "Créer un ticket…", "Cross curves": "Courbes transversales", "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", "Curv. Comb": "Peigne de courbure", "Curvature (G2)": "Courbure (G2)", "Curvature change (G3)": "Variation de courbure (G3)", + "Custom": "Personnalisé", "Customize Toolbar": "Personnaliser la barre d'outils", + "Customize…": "Personnaliser…", + "Cylindrical face": "Face cylindrique", "Delete": "Supprimer", + "Delete Selected Features…": "Supprimer les fonctions sélectionnées…", + "Delete Selected Folders": "Supprimer les dossiers sélectionnés", "Delete all": "Tout supprimer", "Delete rule": "Supprimer la règle", "Delete the row": "Supprimer la ligne", "Delete the set": "Supprimer le jeu", "Density": "Masse volumique", "Dependents": "Dépendants", + "Describe the problem you saw": "Décrivez le problème constaté", + "Describe what happened before continuing.": "Décrivez ce qui s'est passé avant de continuer.", "Designs you open or save appear here.": "Les conceptions que vous ouvrez ou enregistrez apparaissent ici.", "Determined by To Object. Choose Angle to edit the angular extent.": "Déterminé par Jusqu'à l'objet. Choisir Angle pour modifier l'étendue angulaire.", + "Diameter": "Diamètre", "Direction": "Direction", "Discard": "Abandonner", + "Distance": "Distance", + "Distance 1": "Distance 1", "Do not export hidden edges": "Ne pas exporter les arêtes cachées", "Don't ask again": "Ne plus demander", "Double-click to rename": "Double-cliquer pour renommer", "Double-clicking the middle button in the view: Home (the home view, framing what is shown), Fit (frame what is shown, keeping the orientation) or nothing": "Double-clic sur le bouton du milieu dans la vue : Accueil (vue d'accueil, cadrant ce qui est affiché), Cadrer (cadrer ce qui est affiché en gardant l'orientation) ou rien", + "Drag to move the hole; click to remove it": "Faire glisser pour déplacer le perçage ; cliquer pour le retirer", "Drive Joint": "Piloter la liaison", "Duration": "Durée", "Edges": "Arêtes", @@ -126,80 +181,122 @@ "Edit Profile Sketch": "Modifier l'esquisse du profil", "Enable rule": "Activer la règle", "Enabled": "Activé", + "End Radius": "Rayon final", "End bulge": "Renflement de fin", "End continuity": "Continuité de fin", + "Expand": "Développer", + "Expected result (optional)": "Résultat attendu (facultatif)", "Explode": "Éclater", "Explode Text": "Décomposer le texte", "Export Animation…": "Exporter l'animation…", + "Export Bend Table…": "Exporter la table des plis…", "Export CSV…": "Exporter CSV…", "Export Current View as DXF": "Exporter la vue actuelle en DXF", "Export Current View as DXF…": "Exporter la vue actuelle en DXF…", "Export DXF": "Exporter en DXF", "Export DXF…": "Exporter en DXF…", "Export JSON…": "Exporter JSON…", + "Export design library...": "Exporter la bibliothèque de la conception...", "Export hidden edges as dashed lines": "Exporter les arêtes cachées en tirets", + "Exported by SolidWorks, which usually saves Y up": "Exporté par SolidWorks, qui enregistre généralement en Y vers le haut", "Expression": "Expression", "Extend to meet": "Prolonger jusqu'à la rencontre", "Extents": "Étendues", "FILES": "FICHIERS", "FLAT": "DÉPLIÉ", "Face": "Face", + "Face Appearance": "Apparence de la face", "Face attachment lost": "Rattachement à la face perdu", + "Face center": "Centre de la face", "Faces": "Faces", "Faces / edges / vertices": "Faces / arêtes / sommets", + "Faces to split": "Faces à scinder", "Fastener": "Fixation", "Favorites": "Favoris", "Favourite": "Favori", "Feature": "Fonction", "Files from many CAD programs have Y up, so they open lying on their back here (Z up).": "Les fichiers de nombreux logiciels de CAO ont Y vers le haut : ils s'ouvrent donc couchés ici (Z vers le haut).", "Filter": "Filtrer", + "Filter…": "Filtrer…", "Find in Browser": "Trouver dans le navigateur", "Finish": "Terminer", + "First plane": "Premier plan", + "Fit and G2 corners require Constant radius.": "L'ajustement et les angles G2 nécessitent un rayon constant.", + "Fixed Face": "Face fixe", + "Flange thickness": "Épaisseur d'aile", + "Flanges": "Bords tombés", "Flat Pattern": "Dépliage", "Flat size": "Dimensions à plat", "Follow camera (Look At sketches)": "Suivre la caméra (vue normale aux esquisses)", "Follow the camera (Look At sketches)": "Suivre la caméra (vue normale aux esquisses)", "Font": "Police", + "From": "De", "From Bodies": "À partir de corps", "From edges": "Arêtes de départ", "Full Length": "Longueur totale", + "Full thread depth": "Profondeur de filetage complète", + "Further Bends": "Plis supplémentaires", + "G2 corners require a constant radius and Exact fit. G2 corner construction is not supported yet.": "Les angles G2 nécessitent un rayon constant et un ajustement exact. La construction d'angles G2 n'est pas encore prise en charge.", "Gap": "Jeu", "Grid": "Grille", "HISTORY": "HISTORIQUE", + "Halo under sketch curves": "Halo sous les courbes d'esquisse", "Height": "Hauteur", + "Height From": "Hauteur depuis", "Hidden edges": "Arêtes cachées", "History layout": "Disposition de l’historique", + "History names": "Noms dans l'historique", + "Hole (optional)": "Perçage (facultatif)", "Holes": "Trous", "Holes (edges on them)": "Trous (par leurs arêtes)", "Home view": "Vue d'accueil", "Horiz./Vert.": "Horiz./Vert.", + "I-Beam": "Poutre en I", "IMAGES": "IMAGES", + "Import material into design": "Importer le matériau dans la conception", "Import…": "Importer…", "In This Design": "Dans cette conception", "In place (surfaces)": "En place (surfaces)", "In plane": "Dans le plan", + "Included": "Angle inclus", + "Inner Sharp": "Arête vive intérieure", "Inside": "Intérieur", + "Instant": "Instantané", + "Interface font": "Police de l'interface", "Interferes": "Interfère", + "Invert": "Inverser", "Isocurve": "Isoparamétrique", "Issue title": "Titre du ticket", + "Items": "Éléments", "JOINTS": "LIAISONS", "Joint Origin1": "Origine de liaison1", "Keep (points on it)": "À conserver (points dessus)", "Keep Tools": "Conserver les outils", "Keep of the other surface": "À conserver de l'autre surface", + "Key a joint's value at this step": "Placer une image clé de la valeur d'une liaison à cette étape", + "Keys": "Images clés", + "L-Angle": "Cornière", "LIBRARY": "BIBLIOTHÈQUE", "LINKS": "LIENS", "Later": "Plus tard", "Leave it": "Laisser tel quel", + "Left Middle": "Milieu gauche", "Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Rattachement à la face hérité. Le relier à une face certifiée crée un rattachement exact.", "Length": "Longueur", "Length units": "Unités de longueur", "Letter Spacing": "Espacement des lettres", "Library": "Bibliothèque", "Library file": "Fichier de bibliothèque", + "Limits": "Limites", "Line Spacing": "Interligne", + "Line Type": "Type de ligne", + "Lines": "Lignes", + "Listing the installed fonts…": "Liste des polices installées…", + "Load library": "Charger la bibliothèque", "Local library": "Bibliothèque locale", "Loop": "Boucle", + "M5 or M5x0.5": "M5 ou M5x0.5", + "M5, M5x0.5, 1/4-20 UNC": "M5, M5x0.5, 1/4-20 UNC", "MANAGE": "GÉRER", "MATERIALS": "MATÉRIAUX", "MODEL": "MODÈLE", @@ -209,22 +306,32 @@ "Mass Center": "Centre de masse", "Matched restrictions check the final values.": "Les restrictions dont les conditions sont remplies vérifient les valeurs finales.", "Material": "Matériau", + "Material Outside": "Matière à l'extérieur", + "Material copied. Existing body assignments are unchanged.": "Matériau copié. Les affectations existantes des corps sont inchangées.", "Max": "Max", + "Maximum": "Maximum", + "Mesh body": "Corps maillé", "Mid Radius": "Rayon intermédiaire", "Middle double-click": "Double-clic milieu", "Min": "Min", + "Minimum": "Minimum", + "Mirror Plane": "Plan de symétrie", "Mitre": "Onglet", "Model Parameters": "Paramètres du modèle", "Modeled": "Modélisé", "More toolbar panels": "Autres groupes de la barre d'outils", "Motion": "Mouvement", + "Mouse gestures": "Gestes de la souris", + "Mouse gestures only work with the SolidWorks mouse mode (the wheel orbits, Ctrl + wheel pans).": "Les gestes de la souris ne fonctionnent qu'avec le mode souris SolidWorks (la molette fait orbiter, Ctrl + molette fait un panoramique).", "Move / Copy": "Déplacer / Copier", "Move Type": "Type de déplacement", "Move down": "Déplacer vers le bas", "Move earlier": "Déplacer plus tôt", + "Move holes by clicking or dragging": "Déplacer les perçages en cliquant ou en faisant glisser", "Move later": "Déplacer plus tard", "Move up": "Déplacer vers le haut", "Name": "Nom", + "Name on import": "Nom à l'importation", "Nearest": "Corps le plus proche", "New": "Nouveau", "New Comp.": "Nouv. comp.", @@ -234,18 +341,32 @@ "No crash reports.": "Aucun rapport de plantage.", "No matching appearance presets.": "Aucun préréglage d’apparence correspondant.", "No matching appearances": "Aucune apparence correspondante", + "No matching physical materials.": "Aucun matériau physique correspondant.", "No visible bodies or sketches to export.": "Aucun corps ni esquisse visible à exporter.", + "Nominal diameter": "Diamètre nominal", "None": "Aucun", "Not available yet": "Pas encore disponible", + "Not saved yet": "Pas encore enregistré", "Notch": "Encoche", "OUTPUT": "SORTIE", + "Of": "Degré de liberté", + "On your computer": "Sur votre ordinateur", "Opacity": "Opacité", "Open GitHub draft": "Ouvrir le brouillon GitHub", + "Open bodies (no volume)": "Corps ouverts (sans volume)", + "Open library...": "Ouvrir une bibliothèque...", "Open local libraries in the desktop app. You can export this design's library here.": "Ouvrez les bibliothèques locales dans l’application de bureau. Vous pouvez exporter ici la bibliothèque de cette conception.", + "Open surface — no volume": "Surface ouverte — sans volume", "Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "CAO 3D paramétrique open source en Rust. Sous licence MIT OR Apache-2.0.", + "Opens your browser and copies the report text for you to paste into GitHub.": "Ouvre votre navigateur et copie le texte du rapport pour que vous le colliez dans GitHub.", + "Opens your browser. Review and submit your report on GitHub.": "Ouvre votre navigateur. Vérifiez et soumettez votre rapport sur GitHub.", "Operator": "Opérateur", + "Orbit (right drag)": "Orbite (glisser avec le bouton droit)", "Other side": "Autre côté", "Other surface (mutual trim)": "Autre surface (ajustement mutuel)", + "Other way": "Sens opposé", + "Outer Sharp": "Arête vive extérieure", + "Outer radius": "Rayon extérieur", "Outside": "Extérieur", "Overall length": "Longueur hors tout", "Param. Graph": "Graphe param.", @@ -255,11 +376,15 @@ "Path": "Trajectoire", "Pattern": "Répétition", "Per Edge": "Par arête", + "Physical material definitions": "Définitions de matériaux physiques", "Pick the tool bodies": "Choisir les corps outils", "Picked": "Sélectionnés", "Picked point": "Point choisi", + "Pitch": "Pas", + "Pivot": "Pivot", "Place at the origin instead": "Placer plutôt à l'origine", "Plastic Rules": "Règles plastique", + "Play the joint's motion in the view": "Lire le mouvement de la liaison dans la vue", "Playback": "Lecture", "Plot": "Graphique", "Position": "Position", @@ -267,35 +392,49 @@ "Position (G0)": "Position (G0)", "Position along the edge, 0 at the start end, 1 at the other": "Position le long de l'arête : 0 à l'extrémité de départ, 1 à l'autre", "Preferences › Design turns the offer back on": "Préférences › Conception réactive la proposition", + "Preview": "Aperçu", "Preview Row": "Aperçu de la ligne", "Preview leaves the current design unchanged.": "L'aperçu ne modifie pas la conception actuelle.", + "Profile / Edges": "Profil / Arêtes", + "Profiles or curves": "Profils ou courbes", "Profiles/Curves": "Profils/Courbes", "Quantity": "Quantité", "RECENT": "RÉCENTS", "REFERENCE": "RÉFÉRENCE", "RULED SURFACE": "SURFACE RÉGLÉE", "RULES": "RÈGLES", + "Radius": "Rayon", "Radius Fit": "Ajustement du rayon", "Ratio": "Rapport", "Reattach selected face": "Rattacher la face sélectionnée", "Recover": "Récupérer", "Recover unsaved design?": "Récupérer la conception non enregistrée ?", "Rectangular": "Rectangulaire", + "Rectangular Tube": "Tube rectangulaire", "Reference face": "Face de référence", "Remove Tools": "Retirer les outils", + "Remove condition": "Supprimer la condition", + "Remove from Folder": "Retirer du dossier", "Remove from list": "Retirer de la liste", "Remove override": "Retirer le remplacement", "Remove private design details or paths before sharing.": "Retirez les détails privés de la conception et les chemins avant de partager.", "Remove screenshot": "Retirer la capture d'écran", "Remove the column": "Retirer la colonne", "Remove the track": "Retirer la piste", + "Remove this bend": "Supprimer ce pli", "Remove this point": "Retirer ce point", + "Rename Feature": "Renommer la fonction", + "Rename Folder": "Renommer le dossier", + "Replace existing library file": "Remplacer le fichier de bibliothèque existant", "Report a bug — review a screenshot and open a GitHub draft": "Signaler un bug — relire une capture d'écran et ouvrir un brouillon GitHub", + "Report text copied. Paste it into GitHub and submit your report there.": "Texte du rapport copié. Collez-le dans GitHub et soumettez-y votre rapport.", + "Reports are public. A GitHub account is required.": "Les rapports sont publics. Un compte GitHub est nécessaire.", "Reset Toolbar": "Réinitialiser la barre d'outils", "Resize Part": "Redimensionner la pièce", "Restore View": "Restaurer la vue", "Restore outer boundary": "Restaurer le contour extérieur", "Restore the inherited component or physical material appearance": "Rétablir l'apparence héritée du composant ou du matériau physique", + "Restore this studio's tools": "Restaurer les outils de ce studio", "Result": "Résultat", "Retake screenshot": "Reprendre la capture d'écran", "Reverse": "Inverser", @@ -305,34 +444,55 @@ "Revert Pos.": "Rétablir pos.", "Revert Position": "Rétablir la position", "Review the report and screenshot before opening GitHub.": "Relisez le rapport et la capture d'écran avant d'ouvrir GitHub.", + "Review your report on GitHub and click Submit new issue to publish it.": "Vérifiez votre rapport sur GitHub et cliquez sur Submit new issue pour le publier.", + "Rib Length": "Longueur de nervure", + "Rib Offset": "Décalage de nervure", + "Rib Thickness": "Épaisseur de nervure", + "Ribs": "Nervures", + "Right Middle": "Milieu droite", "Rim Edge": "Arête du bord", + "Ring of tools on the right button": "Anneau d'outils sur le bouton droit", + "Roll Back Here": "Revenir ici dans l'historique", "Roll History Marker Here": "Placer le marqueur d'historique ici", + "Root radius": "Rayon de raccordement", "Round": "Arrondi", + "Round Bar": "Rond plein", + "Round Tube": "Tube rond", "Rule": "Règle", "Rule name": "Nom de la règle", "Rules run from top to bottom. Matched drives change effective values.": "Les règles s’exécutent de haut en bas. Les règles de pilotage dont les conditions sont remplies modifient les valeurs effectives.", "SECTION": "COUPE", "SURFACE QUALITY": "QUALITÉ DE SURFACE", + "Same way": "Même sens", "Save Rule": "Enregistrer la règle", "Save View": "Enregistrer la vue", + "Save screenshot…": "Enregistrer la capture d'écran…", "Save the study as an animated GIF, seen as the viewport shows it": "Enregistrer l'étude en GIF animé, telle que la fenêtre d'affichage la montre", "Saved preview. Geometry is being checked before editing.": "Aperçu enregistré. La géométrie est en cours de vérification avant modification.", "Scale factor": "Facteur d'échelle", "Scene": "Scène", + "Screenshot (optional)": "Capture d'écran (facultative)", "Search": "Rechercher", "Search commands": "Rechercher des commandes", "Search this library": "Rechercher dans cette bibliothèque", + "Second plane": "Second plan", "Section": "Coupe", + "Section (optional)": "Section (facultative)", "Section position": "Position de la section", + "Sections (one sketch each)": "Sections (une esquisse chacune)", + "Select Other": "Sélectionner un autre", "Select Other: hold the left button still on the model (or right-click › Select Other…) to list everything under the cursor; click again on the same spot to select the next thing there. Double-click the middle button to go Home (Preferences › Navigation).": "Sélectionner un autre élément : maintenir le bouton gauche immobile sur le modèle (ou clic droit › Sélectionner un autre…) pour lister tout ce qui se trouve sous le curseur ; cliquer de nouveau au même endroit pour sélectionner l'élément suivant. Double-cliquer avec le bouton du milieu pour revenir à l'accueil (Préférences › Navigation).", "Select bodies (a face picks its body)": "Sélectionner des corps (une face sélectionne son corps)", "Select bodies or faces instead": "Sélectionner plutôt des corps ou des faces", + "Select edges": "Sélectionner des arêtes", "Selection filter": "Filtre de sélection", "Semantic faces share their appearance across instances.": "Les faces sémantiques partagent leur apparence entre les instances.", "Send your report on GitHub": "Envoyer votre rapport sur GitHub", + "Shaded": "Ombré", "Shape": "Forme", "Sheet Rules": "Règles de tôlerie", "Show Agent Cursor": "Afficher le curseur de l'agent", + "Show ghost": "Afficher le fantôme", "Show in folder": "Afficher dans le dossier", "Show the pointer an AI agent moves (#35)": "Afficher le pointeur déplacé par un agent IA (#35)", "Show tool at cursor": "Afficher l'outil près du curseur", @@ -345,9 +505,11 @@ "Sketch plane has no body-face attachment.": "Le plan d'esquisse n'est rattaché à aucune face de corps.", "Sketch points": "Points d'esquisse", "Slot width": "Largeur de rainure", + "Snap to face and edge centres": "Accrocher aux centres des faces et des arêtes", "SolidCraft closed before these designs were saved. Their last autosave can be opened.": "SolidCraft s'est fermé avant l'enregistrement de ces conceptions. Leur dernier enregistrement automatique peut être ouvert.", "Specialise": "Spécialiser", "Speed": "Vitesse", + "Splitting tool": "Outil de scission", "Square": "Carré", "Stand it up": "Redresser", "Stand it up: a quarter turn about X, as one Move feature you can undo.": "Redresser : un quart de tour autour de X, sous forme d'une fonction Déplacer que vous pouvez annuler.", @@ -357,17 +519,29 @@ "Start continuity": "Continuité de début", "Step": "Étape", "Steps": "Étapes", + "Steps to reproduce (optional)": "Étapes pour reproduire le problème (facultatives)", "Stitch the kept pieces": "Coudre les parties conservées", "Stitch to both bodies": "Coudre aux deux corps", + "Studio": "Studio", "Study": "Étude", "Style": "Style", + "Summary": "Résumé", + "Suppress": "Désactiver", "Suppressed": "Désactivé", "Surface": "Surface", + "Surface, or faces to turn over": "Surface, ou faces à retourner", "Swap Ends": "Permuter les extrémités", "TRIM": "AJUSTER", + "Tangent": "Tangence", "Tangent (G1)": "Tangence (G1)", "Tangent Chain": "Chaîne tangente", + "Tangent chain": "Chaîne tangente", + "Tangent to Edge": "Tangent à l'arête", + "Tap drill diameter": "Diamètre de l'avant-trou", + "Target": "Cible", + "Target Body": "Corps cible", "Tear": "Déchirure", + "Technical details": "Détails techniques", "The dashed sketch is a saved plane guide. Select a new face to repair the attachment.": "L'esquisse en pointillés est un guide de plan enregistré. Sélectionnez une nouvelle face pour réparer le rattachement.", "The saved author occurrence is missing. Select a valid author placement before rebinding.": "L'occurrence d'auteur enregistrée est introuvable. Sélectionnez un placement d'auteur valide avant de relier.", "Then": "Alors", @@ -379,24 +553,38 @@ "This child is shared. Deleting it removes it from every copy of its parent.": "Cet enfant est partagé. Le supprimer le retire de toutes les copies de son parent.", "This child is shared. Position changes apply to every copy of its parent.": "Cet enfant est partagé. Les changements de position s'appliquent à toutes les copies de son parent.", "This face cannot provide a durable attachment. Choose another face or explicitly use a fixed plane.": "Cette face ne peut pas fournir de rattachement durable. Choisissez une autre face ou utilisez explicitement un plan fixe.", + "This image is not attached to GitHub yet. Copy or save it, then attach it on GitHub.": "Cette image n'est pas encore jointe sur GitHub. Copiez-la ou enregistrez-la, puis joignez-la sur GitHub.", + "Thread depth": "Profondeur de filetage", + "Thread diameter": "Diamètre de filetage", + "To": "À", "To Offset": "Jusqu'au décalage", "To edges": "Arêtes d'arrivée", + "Toe radius": "Rayon d'extrémité", "Tolerance": "Tolérance", "Too close": "Trop proches", + "Tool Bodies": "Corps outils", + "Tools": "Outils", + "Tools, clockwise from the top": "Outils, dans le sens horaire à partir du haut", + "Top Left": "Haut gauche", + "Top Middle": "Haut centre", + "Top Right": "Haut droite", "Trimming tool (plane, face or curves)": "Outil d'ajustement (plan, face ou courbes)", "Turn off section analysis before exporting the view.": "Désactivez l'analyse de coupe avant d'exporter la vue.", "Type": "Type", "UNTRIM": "ANNULER L'AJUSTEMENT", "Unit": "Unité", + "Unsuppress": "Réactiver", "Updating the preview": "Mise à jour de l'aperçu", "Use active author placement": "Utiliser le placement d'auteur actif", "Use fixed plane": "Utiliser un plan fixe", "Use saved fixed plane": "Utiliser le plan fixe enregistré", "Use selected face as fixed plane": "Utiliser la face sélectionnée comme plan fixe", + "Use the SolidWorks mouse mode": "Utiliser le mode souris SolidWorks", "User Parameters": "Paramètres utilisateur", "VIEW": "VUE", "VIEWS": "VUES", "Value": "Valeur", + "Variable Radius": "Rayon variable", "Velocity": "Vitesse", "Vertices": "Sommets", "View navigator": "Repère de navigation", @@ -404,16 +592,56 @@ "Wall": "Paroi", "Wall Location": "Position de la paroi", "Wall Thickness": "Épaisseur de paroi", + "Web thickness": "Épaisseur d'âme", + "What did you do just before the problem? A short list is enough": "Qu'avez-vous fait juste avant le problème ? Une courte liste suffit", + "What did you expect to see?": "Qu'attendiez-vous ?", + "What happened?": "Que s'est-il passé ?", "When": "Quand", "Width": "Largeur", "Will fail": "Échouera", + "With gestures on, the right button no longer orbits the view: hold it and move to open the ring, then touch a tool's zone. A plain right-click still opens the menu.": "Avec les gestes activés, le bouton droit ne fait plus orbiter la vue : maintenez-le et déplacez la souris pour ouvrir l'anneau, puis touchez la zone d'un outil. Un simple clic droit ouvre toujours le menu.", + "X": "X", + "X Angle": "Angle X", "X angle": "Angle X", "X distance": "Distance X", + "Y": "Y", + "Y Angle": "Angle Y", "Y angle": "Angle Y", "Y distance": "Distance Y", + "Z": "Z", + "Z Angle": "Angle Z", + "Z Distance": "Distance Z", "Z angle": "Angle Z", "Z distance": "Distance Z", "Zebra": "Zébrures", + "ai.connected_toast": "SolidCraft est maintenant disponible dans {clients}. Redémarrez-les pour l'utiliser (Paramètres > Assistant).", + "ai.prefs.allow_control": "Autoriser la connexion des agents IA (canal de contrôle / MCP)", + "ai.prefs.allow_control_note": "Ouvre un canal de contrôle limité à cet ordinateur (127.0.0.1, port 27878 ou le suivant disponible). Un programme qui se connecte doit aussi présenter un jeton secret lisible uniquement par votre compte utilisateur, régénéré à chaque démarrage. Prend effet au prochain démarrage de SolidCraft. Désactivé : rien n'écoute, sauf si vous lancez SolidCraft avec --control.", + "ai.prefs.availability": "Contrôles de l'assistant", + "ai.prefs.background_commands": "Exécuter les commandes de l'agent en arrière-plan", + "ai.prefs.connect_apps": "Rendre SolidCraft disponible pour les apps d'IA de cet ordinateur", + "ai.prefs.connect_apps_note": "Au démarrage, SolidCraft s'ajoute comme serveur MCP aux apps d'IA trouvées sur cet ordinateur (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), pour qu'un agent puisse l'utiliser sans configuration. Seule l'entrée solidcraft est ajoutée ou son chemin mis à jour ; une entrée que vous avez modifiée n'est pas touchée, et le fichier est d'abord sauvegardé. Désactivé : les entrées ajoutées sont retirées. Aide > Connecter les assistants IA… le fait manuellement.", + "ai.prefs.follow_camera": "Orienter la caméra vers les esquisses", + "ai.prefs.follow_camera_off": "Le suivi automatique de la caméra est désactivé.", + "ai.prefs.follow_camera_on": "La caméra se tourne face aux esquisses créées par l'agent.", + "ai.prefs.intro": "Les agents, leurs autorisations et l'affichage de leur travail.", + "ai.prefs.make_default": "Utiliser par défaut", + "ai.prefs.no_agents": "Aucun agent pour l'instant. Ajoutez un agent ou actualisez pour trouver les agents installés.", + "ai.prefs.no_saved_approvals": "Aucune autorisation enregistrée.", + "ai.prefs.override_all_warning": "Cet agent peut enregistrer, écraser, exporter ou remplacer la conception sans demander.", + "ai.prefs.permission_all": "Tout autoriser", + "ai.prefs.permission_all_summary": "Les outils SolidCraft disponibles s'exécutent sans demander.", + "ai.prefs.permission_ask": "Demander avant les modifications", + "ai.prefs.permission_ask_summary": "Approuver chaque modification de la conception et chaque action sur les fichiers.", + "ai.prefs.permission_edits": "Autoriser les modifications du modèle", + "ai.prefs.permission_edits_summary": "Les modifications du modèle s'exécutent ; les actions sur les fichiers et destructives demandent toujours.", + "ai.prefs.permission_scope": "Pour les outils SolidCraft uniquement. Le shell et les modifications de fichiers de l'agent utilisent ses propres autorisations.", + "ai.prefs.pointer_preview_hidden": "Pointeur masqué", + "ai.prefs.pointer_preview_speed": "Pointeur de l'agent · {speed}", + "ai.prefs.pointer_speed": "Vitesse de déplacement", + "ai.prefs.privacy_note": "Seul l'agent ou le point d'accès que vous avez choisi reçoit la conversation. Les clés des points d'accès sont stockées dans le trousseau du système.", + "ai.prefs.show_pointer": "Afficher le pointeur de l'agent", + "ai.prefs.turn_limit_hint": "Nombre maximal d'appels d'outils modifiant la conception que l'assistant peut faire pour un message.", "angle, height": "angle, hauteur", "appearance.dielectric_ior": "Indice de réfraction (diélectrique)", "appearance.metallic": "Métallique", @@ -446,6 +674,8 @@ "cmd.appearance_list": "Lister les apparences", "cmd.assembly_bom": "Nomenclature", "cmd.body_rename": "Renommer le corps", + "cmd.browser_collapse_all": "Tout réduire", + "cmd.browser_expand_all": "Tout développer", "cmd.browser_group": "Nouveau groupe", "cmd.browser_move": "Déplacer des éléments du navigateur", "cmd.browser_order": "Réordonner les éléments du navigateur", @@ -461,8 +691,11 @@ "cmd.component_activate": "Activer le composant", "cmd.component_break_link": "Rompre le lien", "cmd.component_capture_position": "Capturer la position", + "cmd.component_copies": "Trouver les copies identiques", "cmd.component_create": "Nouveau composant", + "cmd.component_cycle_color": "Changer la couleur du composant", "cmd.component_delete": "Supprimer le composant", + "cmd.component_extract": "Extraire dans un fichier", "cmd.component_from_bodies": "Créer des composants à partir des corps", "cmd.component_insert_design": "Insérer une conception", "cmd.component_links": "Lister les liens", @@ -475,6 +708,7 @@ "cmd.component_properties": "Propriétés physiques du composant", "cmd.component_relink": "Relier à nouveau la source", "cmd.component_rename": "Renommer le composant", + "cmd.component_replace_with_link": "Remplacer par un lien", "cmd.component_revert_position": "Rétablir la position", "cmd.component_unlock": "Déverrouiller le contenu", "cmd.component_update_links": "Mettre à jour les liens", @@ -545,6 +779,8 @@ "cmd.inspect_accessibility": "Analyse d'accessibilité", "cmd.inspect_center_of_mass": "Centre de gravité", "cmd.inspect_clearance": "Jeu", + "cmd.inspect_colored_components": "Activer les couleurs des composants", + "cmd.inspect_colored_components_disable": "Désactiver les couleurs des composants", "cmd.inspect_compare": "Comparer les corps", "cmd.inspect_continuity": "Analyse de continuité", "cmd.inspect_curvature_comb": "Analyse par peigne de courbure", @@ -554,6 +790,7 @@ "cmd.inspect_interference": "Interférence", "cmd.inspect_isocurve": "Analyse des isocourbes", "cmd.inspect_minimum_radius": "Analyse du rayon minimal", + "cmd.inspect_parameter_sweep": "Balayage de paramètre", "cmd.inspect_silhouette": "Silhouette", "cmd.inspect_zebra": "Analyse zébrée", "cmd.joint_as_built": "Liaison telle que construite", @@ -598,8 +835,10 @@ "cmd.motion_plot": "Graphique de l'étude de mouvement", "cmd.motion_study": "Étude de mouvement", "cmd.motion_trace": "Trajectoire de mouvement", + "cmd.motion_trace_edit": "Modifier la trajectoire de mouvement", "cmd.motion_trace_keep": "Conserver la trajectoire de mouvement", "cmd.occurrence_copy": "Coller (instance)", + "cmd.occurrence_drag": "Faire glisser l'occurrence", "cmd.occurrence_ground": "Fixer", "cmd.occurrence_move": "Déplacer l'occurrence", "cmd.occurrence_properties": "Propriétés physiques de l'occurrence", @@ -627,14 +866,45 @@ "cmd.plastic_rest": "Appui", "cmd.plastic_rules": "Lister les règles plastique", "cmd.plastic_snap_fit": "Clip", + "cmd.render_aging_describe": "Vieillissement de surface en couches", "cmd.render_backends": "Moteurs de rendu", + "cmd.render_camera_fit": "Cadrer le sujet du rendu", + "cmd.render_camera_get": "Inspecter la caméra de rendu", "cmd.render_cancel": "Annuler le rendu", + "cmd.render_effects_describe": "Objectif et effets créatifs", "cmd.render_export": "Exporter l'image de rendu", + "cmd.render_hdr_inspect": "Inspecter la source HDR", + "cmd.render_library_appearance_apply": "Appliquer une apparence opaque de la bibliothèque", + "cmd.render_library_describe": "Inspecter une ressource de la bibliothèque de rendu", + "cmd.render_library_environment_apply": "Appliquer un environnement HDR intégré", + "cmd.render_library_list": "Parcourir la bibliothèque de rendu", + "cmd.render_library_physical_prepare": "Préparer une référence physique", + "cmd.render_library_preview": "Inspecter la texture de surface d'origine", + "cmd.render_library_studio_apply": "Appliquer les lumières de studio conçues", + "cmd.render_library_studio_prepare": "Préparer les lumières de studio conçues", + "cmd.render_library_surface_bind": "Enregistrer l'association de surface", + "cmd.render_library_surface_prepare": "Préparer les textures de surface conçues", + "cmd.render_library_surface_unbind": "Supprimer l'association de surface", + "cmd.render_library_targets": "Trouver les cibles de la bibliothèque de rendu", + "cmd.render_optics_bind": "Enregistrer l'association optique", + "cmd.render_optics_unbind": "Supprimer l'association optique", "cmd.render_preflight": "Vérifier la demande de rendu", + "cmd.render_preset_apply": "Appliquer le studio natif", + "cmd.render_preset_resolve": "Examiner le studio natif", + "cmd.render_quality_prepare": "Examiner le budget d'échantillonnage fixe", + "cmd.render_result_pin": "Conserver le rendu affiché", + "cmd.render_result_regrade": "Réétalonner le master linéaire", "cmd.render_scene": "Inspecter la scène de rendu", "cmd.render_settings_apply": "Appliquer la caméra de rendu", + "cmd.render_settings_capture_hdr": "Enregistrer les réglages de rendu avec HDR", "cmd.render_settings_get": "Réglages de rendu", "cmd.render_settings_set": "Enregistrer les réglages de rendu", + "cmd.render_shot_duplicate": "Dupliquer la prise de vue", + "cmd.render_shot_remove": "Supprimer la prise de vue", + "cmd.render_shot_rename": "Renommer la prise de vue", + "cmd.render_stage_backdrop": "Enregistrer l'arrière-plan physique du rendu", + "cmd.render_stage_clear": "Supprimer le décor de rendu", + "cmd.render_stage_ground": "Enregistrer le sol du rendu", "cmd.render_start": "Rendu d'image", "cmd.render_status": "Progression du rendu", "cmd.select_clear": "Effacer la sélection", @@ -646,6 +916,7 @@ "cmd.sheet_fold": "Plier", "cmd.sheet_hem": "Ourlet", "cmd.sheet_manage_rules": "Règles de tôlerie", + "cmd.sheet_path_flange": "Bord tombé sur trajectoire", "cmd.sheet_perforate": "Perforer", "cmd.sheet_refold": "Replier", "cmd.sheet_rules": "Lister les règles de tôlerie", @@ -657,6 +928,7 @@ "cmd.sketch_auto_constrain_from_datum": "Contraintes automatiques depuis la référence", "cmd.sketch_auto_project": "Projeter automatiquement les arêtes de référence", "cmd.sketch_blend_curve": "Courbe de raccordement", + "cmd.sketch_cancel": "Annuler l'esquisse", "cmd.sketch_chain": "Chaîne", "cmd.sketch_chamfer_distance_angle": "Chanfrein distance et angle", "cmd.sketch_chamfer_equal_distance": "Chanfrein à distances égales", @@ -768,12 +1040,20 @@ "cmd.timeline_suppress": "Désactiver la fonction", "cmd.view_ambient_occlusion": "Occlusion ambiante", "cmd.view_apply": "Restaurer la vue nommée", + "cmd.view_back": "Vue arrière", + "cmd.view_bottom": "Vue de dessous", "cmd.view_delete": "Supprimer la vue nommée", + "cmd.view_front": "Vue de face", "cmd.view_graphics_preset": "Préréglage graphique", + "cmd.view_isometric": "Vue isométrique", + "cmd.view_left": "Vue de gauche", "cmd.view_list": "Lister les vues nommées", "cmd.view_navigate": "Naviguer dans la vue", + "cmd.view_normal_to": "Vue normale à la sélection", "cmd.view_rename": "Renommer la vue nommée", + "cmd.view_right": "Vue de droite", "cmd.view_save": "Nouvelle vue nommée", + "cmd.view_top": "Vue de dessus", "color.copy": "Cliquer pour copier les valeurs de couleur", "color.edit": "Cliquer pour modifier la couleur", "color.gamma": "Valeurs de couleur affichées en espace gamma 0-255", @@ -814,6 +1094,7 @@ "crash.report": "Signaler…", "crash.unclean_explanation": "Détecté lors d’un lancement ultérieur ; l’heure exacte de la sortie n’a pas été enregistrée. Un arrêt du système ou une interruption forcée peut aussi provoquer une sortie anormale.", "delete.and_more": "… et {count} de plus", + "diagnostic.empty_boolean_component": "il n'y a aucun corps à couper ou à intersecter dans le composant « {component} » ; l'outil chevauche peut-être « {body} » dans le composant « {other} » : activez ce composant ou choisissez ce corps comme cible", "dialog.bodies_count": "{count} corps", "dialog.clearance_invalid": "le jeu doit être une longueur positive ou nulle", "dialog.compute": "Calculer", @@ -829,7 +1110,18 @@ "dialog.selection_guidance": "Sélectionner une entrée pour la modifier. Cliquer sur un objet sélectionné pour le retirer ; Ctrl/Cmd-clic le bascule aussi. Vérifier l'aperçu, puis appuyer sur OK.", "dialog.selection_step": "{step} sur {total} : sélectionner {input}", "dialog.step": "Étape", + "document.changed_on_disk": "{name} a été modifié sur le disque", + "document.changed_on_disk_detail": "{name} a été modifié par un autre programme ou un autre ordinateur depuis que vous l'avez ouvert ou enregistré. Écraser remplace ces modifications par les vôtres ; Enregistrer une copie conserve les deux.", + "document.copy_name": "{name} (copie)", + "document.open_anyway": "Ouvrir quand même", + "document.open_elsewhere": "{name} est déjà ouvert", + "document.open_elsewhere_detail": "{name} est ouvert dans SolidCraft {app} sur {who} (ouvert {when}). Si vous enregistrez tous les deux, l'un de vous perdra son travail. Ouvrez-le en lecture seule pour le consulter sans l'écraser.", + "document.open_read_only": "Ouvrir en lecture seule", + "document.opened_read_only": "Ouvert en lecture seule : Enregistrer demande un nouveau fichier", + "document.overwrite": "Écraser", + "document.read_only_save": "Cette conception a été ouverte en lecture seule : enregistrez-la dans un nouveau fichier", "document.save_changes": "Enregistrer les modifications de {name} ?", + "document.save_copy": "Enregistrer une copie…", "document.unsaved_changes": "{name} contient des modifications non enregistrées. Si vous n'enregistrez pas, elles seront perdues.", "drive.stopped_by_contact": "Arrêté à {value} : {a} traverserait {b}", "drive.stopped_by_loop": "Arrêté à {value} : la boucle passant par {joint} ne peut plus se fermer", @@ -846,9 +1138,11 @@ "dxf.progress.write": "Écriture du DXF (5/5)", "dxf.tolerance": "Tolérance des courbes", "dxf.tolerance_help": "Corps visibles et esquisses affichées uniquement. Les courbes sont approchées par des segments de droite. Une tolérance plus faible donne des courbes plus fines, au prix de plus de temps et de mémoire.", + "file.open.drawing_filter": "Conceptions, fichiers CAO, maillages et dessins", "file_load.built": "Construit jusqu’ici : {built} entités sur {total}.", "file_load.converting": "Conversion du solide {done} sur {total}", "file_load.inserting": "Insertion de la géométrie", + "file_load.link_item": "{name} ({done} sur {total})", "file_load.opening": "Ouverture de la conception", "file_load.preparing_thumbnail": "Préparation de la miniature...", "file_load.preparing_view": "Préparation de la vue...", @@ -858,12 +1152,16 @@ "file_load.rebuilding": "Reconstruction de l’entité {done} sur {total}", "file_load.recovering": "Récupération de la conception", "file_load.stopping": "Attente de l’arrêt de l’opération précédente...", + "file_load.updating_links": "Mise à jour des liens", "file_load.waiting": "En attente d’une opération sur fichier", "fits the face, e.g. M8": "adapté à la face, par ex. M8", + "from the profile": "depuis le profil", "from the rule": "selon la règle", "help.apache": "Licence Apache 2.0", "help.attributions": "Attributions (ATTRIBUTION.md)", "help.build": "Version {version} · commit {commit} · compilée le {date}", + "help.connect_note": "Redémarrez chaque assistant pour charger le serveur SolidCraft. Chaque fichier a été sauvegardé en .bak avant d'être modifié.", + "help.connect_title": "Connecter les assistants IA", "help.font_details": "L’interface utilise les polices intégrées d’egui (Ubuntu Light et Hack, sous les licences Ubuntu Font Licence et MIT/Bitstream Vera ; Noto Emoji et la police d’icônes emoji, sous OFL et MIT). Le texte des esquisses utilise Liberation Sans (SIL OFL 1.1). Le pack de polices facultatif de The Crafting Apps, craft-fonts (BIZ UDPGothic, Shippori Mincho, BIZ UDMincho, Noto Sans CJK SC, Noto Sans Arabic ; SIL OFL 1.1), n’est pas inclus dans les versions de SolidCraft.", "help.fonts": "Polices", "help.licences": "Licences", @@ -957,6 +1255,8 @@ "joint.from_bodies_hint": "Chaque corps sélectionné passe dans un nouveau composant à lui et reste où il est.", "joint.one_body": "Les deux sélections sont sur {body}. Choisissez la seconde sur une autre pièce.", "joint.one_component": "Ces pièces sont des corps d'un même composant : {bodies}. Une liaison déplace un composant par rapport à un autre, chaque pièce a donc besoin de son propre composant.", + "joint.rigid_group_one_component": "Ces {count} corps sont tous dans un même composant (ou dans la conception elle-même) : utilisez d'abord {command}.", + "joint.rigid_group_select_components": "Sélectionnez au moins deux composants.", "keymap.command_id": "ID de commande", "keymap.empty": "Aucune commande correspondante", "keymap.use_anyway": "Utiliser quand même {key} ici", @@ -967,6 +1267,49 @@ "manage.material_hint": "Sélectionnez des corps et choisissez leur matériau physique.", "manage.parameters_hint": "Modifiez les expressions et les unités. Les modifications s’appliquent avec Entrée ou lorsque vous quittez un champ.", "manage.rules_hint": "Choisissez une règle à modifier ou créez-en une. Confirmez pour enregistrer la règle.", + "material.editor.add_property": "Ajouter une propriété", + "material.editor.add_source": "Ajouter une source", + "material.editor.assigned_density": "Masse volumique affectée", + "material.editor.axes": "Axes du matériau", + "material.editor.axes_numeric": "1 / 2 / 3", + "material.editor.axes_wood": "L / R / T", + "material.editor.copy_name": "{name} (copie)", + "material.editor.density_range": "La masse volumique affectée doit être supérieure à 0 et au plus égale à 1000 g/cm³.", + "material.editor.designation": "Désignation", + "material.editor.duplicate": "Dupliquer", + "material.editor.engineering_card": "Fiche de propriétés techniques", + "material.editor.family": "Famille de matériau", + "material.editor.glass": "Verre", + "material.editor.illustrative": "Indicatif", + "material.editor.invalid_property": "Type de propriété non pris en charge.", + "material.editor.isotropic": "Isotrope", + "material.editor.measurement": "Mesure", + "material.editor.metal": "Métal", + "material.editor.moisture": "Humidité, base sèche", + "material.editor.name_required": "Saisissez un nom de 1 à 128 caractères.", + "material.editor.no_draft": "Aucun brouillon de matériau n'est ouvert.", + "material.editor.number_required": "Saisissez une valeur numérique finie.", + "material.editor.orthotropic": "Orthotrope", + "material.editor.other": "Autre", + "material.editor.polymer": "Polymère", + "material.editor.preserved_appearance": "Apparence conservée", + "material.editor.public_reference": "Référence publique", + "material.editor.reference": "Référence", + "material.editor.save_or_discard": "Enregistrez ou abandonnez le brouillon de matériau avant d'affecter un matériau.", + "material.editor.saved": "Matériau enregistré. Les affectations des corps sont inchangées.", + "material.editor.scope": "Enregistrer stocke ce matériau sans l'affecter à des corps. Les propriétés et conditions vides restent inconnues. La masse volumique de la fiche ne modifie ni la masse volumique affectée ni la masse.", + "material.editor.source_id": "ID de la source", + "material.editor.source_kind": "Type de source", + "material.editor.source_title": "Titre de la source", + "material.editor.sources": "Sources", + "material.editor.stale": "Ce matériau a changé pendant que le brouillon était ouvert. Abandonnez-le et rouvrez-le avant d'enregistrer.", + "material.editor.state": "État du matériau", + "material.editor.strain_rate": "Vitesse de déformation", + "material.editor.symmetry": "Symétrie élastique", + "material.editor.temperature": "Température", + "material.editor.unknown_card": "Les propriétés techniques sont inconnues. L'enregistrement peut ne conserver que la masse volumique affectée et l'apparence existante.", + "material.editor.user_supplied": "Fourni par l'utilisateur", + "material.editor.wood": "Bois", "measure.at": "À", "measure.item": "Élément {number}", "messages.ago_h": "il y a {n} h", @@ -991,6 +1334,15 @@ "motion.to_end": "À la fin", "motion.to_start": "Au début", "motion.track_name": "Piste {number}", + "nav.alias.help": "Maj+Alt+glisser gauche fait orbiter, Maj+Alt+milieu fait un panoramique, Maj+Alt+droit zoome ; glisser avec le milieu fait aussi un panoramique et glisser avec le droit fait orbiter", + "nav.blender.help": "Glisser avec le milieu fait orbiter, Maj+milieu fait un panoramique, Ctrl+milieu zoome ; glisser avec le droit ne touche pas la caméra", + "nav.free_orbit.help": "La souris et la souris 3D tournent en passant par les deux pôles et conservent le roulis. L'alignement des axes avec Maj est désactivé.", + "nav.free_orbit.label": "Orbite libre", + "nav.fusion.help": "Glisser avec le milieu fait un panoramique, Maj+milieu fait orbiter, glisser avec le droit fait orbiter", + "nav.inventor.help": "Glisser avec le milieu fait un panoramique, Maj+milieu fait orbiter, Ctrl+milieu zoome, glisser avec le droit fait orbiter", + "nav.openscad.help": "Glisser avec le gauche dans le vide fait orbiter, Maj+glisser gauche sélectionne par rectangle, glisser la géométrie d'esquisse la modifie ; glisser avec le droit ou le milieu fait un panoramique, Maj+droit ou Maj+milieu zoome", + "nav.solidworks.help": "Glisser avec le milieu fait orbiter, Ctrl+milieu fait un panoramique, Maj+milieu zoome, glisser avec le droit fait orbiter", + "nav.tinkercad.help": "Glisser avec le droit fait orbiter, glisser avec le milieu ou Maj+droit fait un panoramique", "nav.touchpad.help": "Maintenir Maj et déplacer le pointeur pour faire un panoramique ; maintenir Alt/Option et le déplacer pour orbiter. Aucun bouton de souris n'est nécessaire. Le défilement vertical zoome.", "nav.touchpad.label": "Pavé tactile", "nav.touchpad.orbit": "Orbite (maintenir Alt/Option et déplacer ; sans bouton de souris)", @@ -1011,10 +1363,151 @@ "pattern.direction_1": "Direction 1", "pattern.direction_2": "Direction 2", "pattern.flip_direction": "Inverser la direction", + "perf.click_for_details": "Cliquer pour les détails : graphe des temps d'image, histogramme et ce que le GPU a dessiné", + "perf.draw_calls": "Appels de dessin", + "perf.line_segments": "Segments de ligne", + "perf.low_1": "1 % bas", + "perf.renderer": "Moteur de rendu", + "perf.scene_build": "Construction de la scène", + "perf.triangles": "Triangles", + "perf.ui_time": "Temps de l'interface", + "perf.viewport": "Vue 3D", + "perf.worst": "pire", "pick a hole to seat it, or OK places it at the origin": "choisir un trou pour la loger, ou OK la place à l'origine", "pick one or two vertices, edges or faces": "choisir un ou deux sommets, arêtes ou faces", + "pick the path": "choisir la trajectoire", + "prefs.add_item": "Ajouter l'élément", + "prefs.alt_frees_manipulators": "Alt / Option libère aussi les flèches du manipulateur", + "prefs.anti_aliasing_amd_dx12": "L'anticrénelage est à 1× car la vérification au démarrage n'a rien dessiné avec le multiéchantillonnage et a réussi à 1×. Vous pouvez choisir un autre réglage ci-dessus ; redémarrez pour l'appliquer si la vérification réussit.", + "prefs.anti_aliasing_note": "Adoucit les bords crénelés.", + "prefs.applies_on_restart": "Appliqué au redémarrage", + "prefs.assistant": "Assistant", + "prefs.axes": "Axes", + "prefs.axis": "Axe", + "prefs.bottom": "Bas", + "prefs.browser": "Navigateur", + "prefs.built_in": "Intégrée", + "prefs.button_left": "Glisser gauche", + "prefs.button_middle": "Glisser milieu", + "prefs.button_right": "Glisser droit", + "prefs.choose_font": "Choisir un fichier de police…", + "prefs.click": "Clic", + "prefs.contact_shading": "Ombrage de contact doux", + "prefs.contact_shading_note": "Ombrage doux là où les pièces se rapprochent.", + "prefs.context_menu": "Menu contextuel", + "prefs.context_menu_ring": "Menu contextuel · maintenir pour le menu radial", "prefs.cpu": "CPU (logiciel)", + "prefs.crash_reports": "Ouvrir les rapports de plantage…", + "prefs.crash_reports_note": "Les rapports sont conservés sur cet ordinateur, avec la conception et les commandes qui reproduisent le problème.", + "prefs.ctrl_cmd": "Ctrl / Cmd", + "prefs.curved_surfaces": "Surfaces courbes", + "prefs.curves": "Surfaces courbes", + "prefs.dead_zone_note": "La bande hachurée est la zone morte : les mouvements à l'intérieur sont ignorés.", + "prefs.default": "par défaut", + "prefs.design": "Valeurs par défaut des conceptions", + "prefs.design_note": "Ce avec quoi démarrent les nouvelles conceptions. Les conceptions ouvertes gardent les leurs.", + "prefs.devices": "Souris 3D", + "prefs.display": "Affichage", + "prefs.edges": "Arêtes et ombrage", + "prefs.extend": "Étendre", + "prefs.extra_navigation": "Ctrl+glisser gauche dans le vide fait orbiter ; maintenir Espace pour un panoramique.", + "prefs.follows_os": "Suit le système", + "prefs.font": "Police", + "prefs.font_fallback": "Les caractères absents de la police choisie utilisent la police intégrée, pour qu'aucun libellé n'affiche de case vide.", + "prefs.font_sample": "Portez ce vieux whisky au juge blond qui fume · Ø12,50 mm · 45,0° · 0123456789", + "prefs.font_unreadable": "La police sélectionnée n'a pas pu être lue.", + "prefs.general": "Général", + "prefs.general_note": "Langue, enregistrement et mises à jour.", + "prefs.gesture_orbit": "Orbite", + "prefs.gesture_pan": "Panoramique", + "prefs.gesture_zoom": "Zoom", + "prefs.graphics": "Graphisme", + "prefs.graphics_card": "Carte graphique", + "prefs.graphics_card_auto": "Automatique", + "prefs.graphics_card_missing": "La carte graphique enregistrée n'est pas disponible ; Automatique est utilisé.", + "prefs.graphics_card_restart": "Prend effet après le redémarrage de SolidCraft. WGPU_ADAPTER_NAME prévaut sur ce choix.", + "prefs.graphics_note": "Compromis entre vitesse et fluidité. Chaque choix montre son effet sur un exemple.", + "prefs.graphics_presets_note": "Les préréglages définissent ensemble les choix ci-dessous.", + "prefs.history": "Historique", + "prefs.hold_stop_snapping": "Maintenir pour désactiver l'accrochage", + "prefs.icons_only": "Icônes seules", + "prefs.imported_file": "Fichier importé", + "prefs.input": "Saisie", + "prefs.interface": "Interface", + "prefs.interface_language": "Langue de l'interface", + "prefs.interface_note": "L'apparence de SolidCraft et la place de ses éléments.", + "prefs.interval_minutes": "{n} min", + "prefs.labels": "Libellés", + "prefs.layout": "Disposition", + "prefs.layout_note": "Compacte : ancre les panneaux aux bords de la fenêtre. La transparence du navigateur est disponible en mode Flottante. Changez le côté de l'assistant dans la page Assistant.", + "prefs.left": "Gauche", + "prefs.left_click": "Clic gauche", + "prefs.live_input": "Saisie en direct", + "prefs.live_preview": "Aperçu en direct", + "prefs.minutes": "minutes", "prefs.minutes_suffix": " min", + "prefs.mouse": "Souris et pavé tactile", + "prefs.mouse_heading": "Souris", + "prefs.mouse_mapping": "Affectation des boutons de la souris", + "prefs.navigation": "Navigation", + "prefs.navigation_note": "Comment la souris, le pavé tactile et la souris 3D déplacent la vue.", + "prefs.not_on_gpu": "indisponible sur ce GPU", + "prefs.on": "Activé", + "prefs.opaque": "Opaque", + "prefs.orbit_snap": "Maintenir Maj pendant l'orbite pour s'aligner sur un axe.", + "prefs.orientation": "Orientation", + "prefs.overall_speed": "Vitesse globale", + "prefs.prefer_free_sketch_points": "Privilégier les points d'esquisse déplaçables quand des points se superposent", + "prefs.preview_choices": "Aperçu de vos choix", + "prefs.quality_default": "par défaut", + "prefs.quality_fastest": "le plus rapide", + "prefs.quality_slowest": "le plus lent", + "prefs.quality_smoother": "plus fluide", + "prefs.reports_saved": "Enregistrés : {n}", + "prefs.right_click": "Clic droit", + "prefs.saving": "Enregistrement automatique et récupération", + "prefs.scale_note": "Également Ctrl + / Ctrl − dans la fenêtre. Les boutons font 28 px à 100 %.", + "prefs.scale_text": "Échelle et texte", + "prefs.select": "Sélectionner", + "prefs.select_one_item": "Sélectionner un élément", + "prefs.selecting": "Sélection", + "prefs.shift": "Shift", + "prefs.shift_add_ctrl_toggle": "Maj ajoute seulement ; Ctrl / Cmd bascule", + "prefs.shift_add_note": "Activé : Maj ajoute, Ctrl / Cmd bascule. Désactivé (par défaut) : les deux basculent.", + "prefs.shortcuts": "Raccourcis", + "prefs.sketch_selection": "Esquisse et sélection", + "prefs.sketch_selection_heading": "Esquisse et sélection", + "prefs.sketch_selection_note": "Comment les esquisses s'accrochent et comment les clics sélectionnent.", + "prefs.sketching": "Esquisse", + "prefs.snap_drawing_note": "Pendant le dessin ou le déplacement d'un point d'esquisse.", + "prefs.source": "Source", + "prefs.speed": "Vitesse", + "prefs.stand_up_note": "Après l'ouverture d'un fichier STEP ou IGES en Z vers le haut, proposer un quart de tour autour de X.", + "prefs.status_done": "Terminé", + "prefs.status_error": "Erreur", + "prefs.status_selected": "Sélectionné", + "prefs.status_warning": "Avertissement", + "prefs.supersampling_brief": "Dessine la vue en plus grand puis la réduit par filtrage : très net, mais plus lourd.", + "prefs.tab_accent_note": "La couleur d'accent suit l'onglet actif", + "prefs.theme_file": "fichier de thème", + "prefs.timeline_half_hour": "−30 min", + "prefs.timeline_now": "maintenant", + "prefs.timeline_quarter_hour": "−15", + "prefs.toggle_item": "Ajouter l'élément, ou le retirer à nouveau", + "prefs.toolbar": "Barre d'outils", + "prefs.translucent": "Translucide", + "prefs.under_browser": "Sous le navigateur", + "prefs.under_cursor": "Sous le curseur", + "prefs.units_precision": "Unités et précision", + "prefs.updates": "Mises à jour", + "prefs.view": "Comportement de la vue", + "prefs.view_confirm_corner": "OK et Annuler dans le coin de la vue", + "prefs.view_confirm_corner_note": "Lorsqu'une boîte de dialogue ou une esquisse est ouverte, une coche et une croix en haut à droite de la vue font la même chose que OK et Annuler, ou terminent et annulent l'esquisse. Le repère de navigation se place en dessous.", + "prefs.viewport": "Vue 3D", + "prefs.wheel": "Molette", + "prefs.wheel_trackpad": "Molette et pavé tactile", + "prefs.workspace": "Espace de travail", + "prefs.zoom_toward_cursor": "Zoom, vers le curseur", "properties.title": "Propriétés : {name}", "recovery.days_ago": "il y a {count} j", "recovery.detail": "{file} · {features} entités · enregistrement auto {when}", @@ -1022,21 +1515,248 @@ "recovery.just_now": "à l’instant", "recovery.min_ago": "il y a {count} min", "recovery.never_saved": "jamais enregistré", + "render.adaptive_absolute": "Plancher d'erreur RVB absolu", + "render.adaptive_coverage": "Erreur de couverture visée", + "render.adaptive_enable": "Répartir les échantillons avec des pilotes indépendants", + "render.adaptive_help": "GPU uniquement. Les échantillons pilotes indépendants sont écartés, puis 16 échantillons de production ou plus par pixel sont répartis, jusqu'à Échantillons par pixel. La variance RVB et de couverture guide la répartition ; des chemins rares peuvent être manqués et des pixels plafonnés peuvent rester bruités. Le rapport final compte le travail réellement effectué. Aucune garantie certifiée de bruit ou de durée.", + "render.adaptive_minimum": "Échantillons de production minimum", + "render.adaptive_pending": "La répartition adaptative à pilotes indépendants sur GPU et les strates de Fresnel conditionnelles sont disponibles. La convergence certifiée, les garanties sur les événements rares et le transport adaptatif sur CPU restent indisponibles.", + "render.adaptive_pilots": "Échantillons pilotes par pixel", + "render.adaptive_relative": "Erreur RVB relative visée", + "render.add_ground": "Ajouter un sol ajusté au préréglage", + "render.advanced_material_scope": "Un milieu GPU homogène et fini est disponible, dans des limites explicites. Les grilles de densité, les combinaisons verre/volume imbriquées, les surfaces à diffusion sous-surfacique, le déplacement, le transport spectral et les concepts de matériaux avancés non liés restent indisponibles.", + "render.aging_add": "Ajouter une couche de vieillissement", + "render.aging_airborne": "Poussière en suspension / milieu participant", + "render.aging_airborne_help": "La poussière en suspension est un volume diffusant homogène et fini, distinct. Elle modifie le transport et l'EXR brut, pas la pile de vieillissement de surface. Les restrictions existantes sur les volumes, le verre et le débruitage restent explicites ; aucune atmosphère n'est ajoutée automatiquement.", + "render.aging_all_bodies": "Tous les corps opaques éligibles", + "render.aging_chips": "Peinture écaillée", + "render.aging_class_any": "Toutes les classes de matériaux opaques", + "render.aging_class_dielectric": "Surfaces non métalliques uniquement", + "render.aging_class_metal": "Surfaces métalliques uniquement", + "render.aging_color": "Couleur de la couche · sRVB", + "render.aging_coverage": "Couverture", + "render.aging_dust": "Poussière déposée", + "render.aging_empty": "Aucune couche de vieillissement : les surfaces d'origine restent inchangées.", + "render.aging_fading": "Revêtement délavé", + "render.aging_grime": "Crasse et taches", + "render.aging_help": "Combinez jusqu'à huit couches optiques, dans l'ordre. La rouille et la patine sont des apparences conçues, pas des simulations de vieillissement ou de corrosion. L'échelle est en millimètres du monde. Aucune géométrie, masse ou propriété technique n'est modifiée ; le verre et les éléments de décor passifs sont exclus.", + "render.aging_metallic": "Fraction métallique de la couche", + "render.aging_origin": "Origine du champ · mm monde", + "render.aging_patina": "Patine vert-de-gris", + "render.aging_refresh_targets": "Inspecter les corps actuels", + "render.aging_roughness": "Rugosité de la couche", + "render.aging_rust": "Fer oxydé / rouille", + "render.aging_scale": "Échelle du motif", + "render.aging_scratches": "Rayures fines", + "render.aging_target": "Cible et coordonnées", + "render.aging_target_help": "Une cible nommée doit toujours correspondre à l'index et au nom capturés. Les masques globaux sont ancrés dans le monde ; ils ne suivent pas les pièces mobiles. Ce n'est ni une détection de cavités ni une véritable usure des arêtes. Filtrez la liste pour atteindre d'autres corps.", + "render.aging_target_search": "Filtrer les noms des corps", + "render.aging_upward": "Dépôt sur les faces orientées vers le haut", + "render.all_controls_help": "Inspection détaillée de toutes les commandes actuelles. Les pages de section permettent une modification ciblée sans changer la requête sous-jacente.", + "render.appearance_physics_separate": "L'apparence visuelle n'affecte ni masse volumique, ni données thermiques, ni autres propriétés techniques.", + "render.availability_native": "Composition native ; à examiner avant d'appliquer", + "render.availability_projection": "Projection prise en charge ; voir la portée et les omissions", + "render.availability_reference": "Données de référence ; pas une affectation automatique", + "render.backdrop_alpha_conflict": "Choisissez cet arrière-plan ou une sortie PNG transparente ; le moteur de rendu n'ignorera aucun des deux réglages en silence.", + "render.backdrop_enable": "Utiliser un arrière-plan en dégradé pour la caméra uniquement", + "render.backdrop_first": "Couleur de début / du centre", + "render.backdrop_help": "Cet arrière-plan en espace écran n'éclaire pas, ne projette pas d'ombre, ne se reflète pas et ne représente pas un terrain. Il est exclu de l'EXR brut. La géométrie, les lumières et l'environnement HDR restent indépendants.", + "render.backdrop_horizontal": "Dégradé horizontal", + "render.backdrop_radial": "Dégradé radial", + "render.backdrop_radius": "Rayon", + "render.backdrop_second": "Couleur de fin / du bord", + "render.backdrop_vertical": "Dégradé vertical", + "render.backdrop_x": "Centre X", + "render.backdrop_y": "Centre Y", "render.background": "Arrière-plan de la scène", + "render.background_camera_section": "Arrière-plan de la caméra · présentation PNG", + "render.background_completed_frozen": "Le résultat affiché est une image terminée figée. Modifier un arrière-plan ne repeint pas automatiquement ce résultat. Utilisez Réétalonner pour les changements de caméra uniquement, ou Rendu pour un nouveau décor physique.", + "render.background_hdr_separate": "Les ressources HDR actuelles éclairent les surfaces et s'y reflètent ; elles ne sont pas affichées automatiquement en panorama derrière le sujet. Modifier un dégradé ne fait pas tourner l'éclairage et ne change pas sa couleur.", + "render.background_lighting_section": "Éclairage HDR · distinct de l'arrière-plan de la caméra", + "render.background_no_alpha_override": "Un arrière-plan de caméra n'est pas ajouté en silence à une sortie transparente. Le réétalonnage du master brut utilise la couverture capturée et ne réapplique pas le débruitage ; l'EXR source reste inchangé.", + "render.background_not_light": "La couleur d'arrière-plan relève de la présentation, ce n'est pas une source d'éclairage supplémentaire.", + "render.background_regrade": "Appliquer au master brut conservé", + "render.background_stage_occlusion": "Cette prise de vue contient de la géométrie de décor physique. Un grand sol ou un grand mur peut remplir le cadre et masquer un arrière-plan propre à la caméra. Effacez ou redimensionnez délibérément le décor, ou changez sa réflectance physique. Le réétalonnage ne peut pas retirer la géométrie capturée.", + "render.background_workflow": "Choisissez l'arrière-plan voulu : une couleur ou un dégradé propre à la caméra, un décor physique qui reçoit la lumière, ou un éclairage HDR. Ils sont indépendants. L'aperçu en direct est une vue de modélisation ; lancez un nouveau rendu ou réétalonnez un master conservé pour voir la finition de la caméra.", + "render.base_appearance": "Apparence modifiable du corps", + "render.base_apply": "Appliquer l'apparence du corps", + "render.base_apply_help": "Une affectation visuelle unique, annulable, au corps exact examiné. Les apparences propres aux faces et les matériaux techniques existants restent distincts.", + "render.base_color": "Couleur de base · sRVB", + "render.base_metallic": "Fraction métallique", + "render.base_opaque_only": "Cet éditeur conserve la sémantique des corps opaques. Utilisez les commandes de verre dédiées pour la transmission optique.", + "render.bloom_enable": "Halo lumineux (bloom) à l'affichage", + "render.bloom_help": "Lueur créative appliquée à la sortie seulement, à partir des hautes lumières linéaires positives, étalée par trois passes de flou normalisées. Le rayon est en pixels de sortie. Ajoutée en lumière d'affichage linéaire avant sRVB ; ce n'est ni un effet d'objectif, ni un effet volumétrique, ni une amélioration de la convergence. L'EXR brut est inchangé.", + "render.bloom_opaque": "Le halo lumineux nécessite une sortie opaque. Un PNG transparent est refusé, pas aplati en silence.", + "render.bloom_radius": "Rayon du halo lumineux", + "render.bloom_strength": "Intensité du halo lumineux", + "render.bloom_threshold": "Seuil des hautes lumières linéaires du halo", + "render.browse_capabilities": "Inspecter le catalogue complet des capacités", + "render.browse_environments": "Parcourir les environnements HDR d'origine", + "render.browse_native_scenes": "Parcourir les studios natifs", + "render.browse_physical": "Inspecter les références physiques", + "render.browse_quality": "Inspecter les spécifications de qualité", + "render.browse_rigs": "Parcourir les dispositifs d'éclairage conçus", + "render.browse_scene_specs": "Parcourir les spécifications de scène avancées", + "render.browse_surfaces": "Parcourir les surfaces conçues", + "render.browser_library": "Bibliothèque", + "render.browser_model": "Modèle", + "render.camera_distance": "Distance de l'œil à la cible", + "render.camera_exact_help": "Millimètres du monde ; les angles sont affichés en degrés et enregistrés en radians. La navigation utilise la même caméra que la vue 3D.", + "render.camera_fov": "Champ de vision vertical", + "render.camera_pitch": "Tangage de la caméra", + "render.camera_roll": "Roulis", + "render.camera_set": "Définir la caméra de rendu", + "render.camera_target": "Position de la cible · mm", + "render.camera_yaw": "Lacet", + "render.chromatic_offset": "Décalage chromatique des bords", + "render.clear_stage": "Supprimer le décor enregistré", + "render.copy_request": "Copier le JSON", + "render.cpu_aa_help": "Échantillons spatiaux : plus d'échantillons améliorent les bords et allongent le rendu.", + "render.cpu_area_add": "Ajouter une lumière CPU rectangulaire", + "render.cpu_area_editor": "Lumières CPU rectangulaires", + "render.cpu_area_editor_help": "Vecteurs des côtés complets en millimètres ; U × V pointe vers la face émettrice. Cela diffère des vecteurs demi-côté du GPU.", + "render.cpu_area_full_u": "Côté U complet · mm", + "render.cpu_area_full_v": "Côté V complet · mm", + "render.cpu_area_samples": "Échantillons de lumière surfacique", + "render.cpu_binding_confirm": "Confirmer ce corps", + "render.cpu_binding_stale": "La scène a changé. Confirmez à nouveau cette cible de réflexion avant le rendu.", + "render.cpu_body_choose": "Choisir un corps", + "render.cpu_body_filter": "Filtrer les corps par nom", + "render.cpu_body_filter_more": "Affinez le filtre pour voir plus de corps.", + "render.cpu_body_missing": "Une cible de réflexion est introuvable, masquée, ambiguë ou porte un nom de plus de 128 octets. Choisissez-la à nouveau.", + "render.cpu_budget": "Profil de ressources CPU", + "render.cpu_budget_bodies": "Plafond de corps", + "render.cpu_budget_compact": "Compact (anciennes limites)", + "render.cpu_budget_details": "Limites de ressources", + "render.cpu_budget_help": "Choisissez explicitement des limites plus élevées. La résolution et les échantillons ne sont jamais réduits automatiquement.", + "render.cpu_budget_memory": "Plafond de mémoire de la tâche", + "render.cpu_budget_not_guarantee": "Ce sont des plafonds d'admission, pas une réservation de RAM ni une garantie de vitesse. La géométrie, le film et les aperçus conservés partagent le budget mémoire ; le rendu reste annulable.", + "render.cpu_budget_resize": "Le brouillon dépasse ce profil CPU ou son budget d'échantillons de caméra. Acceptez explicitement des dimensions plus petites ou choisissez un profil plus grand.", + "render.cpu_budget_studio": "Studio (grandes images)", + "render.cpu_budget_triangles": "Plafond de triangles", + "render.cpu_budget_workstation": "Station de travail (scènes lourdes)", + "render.cpu_captured_hdr": "HDR capturé pour cette image", + "render.cpu_check_capture_help": "Vérifier et Démarrer contrôlent la même empreinte de fichier ou utilisent le HDR intégré. Chaque image conserve sa source capturée.", + "render.cpu_check_changed": "Les réglages ou le modèle ont changé après cette vérification. Vérifiez à nouveau avant le rendu.", + "render.cpu_constant_help": "La radiance constante est visible par les rayons réfléchis ou transmis. Elle ne fournit pas d'éclairage diffus direct.", + "render.cpu_custom_directions": "Remplacer le préréglage par des lumières directionnelles personnalisées", + "render.cpu_direction": "Direction vers la lumière (X, Y, Z)", + "render.cpu_directional": "Lumière directionnelle", + "render.cpu_directional_add": "Ajouter une lumière directionnelle", + "render.cpu_environment": "Environnement CPU", + "render.cpu_environment_background": "L'arrière-plan de l'image reste distinct de l'éclairage d'environnement.", + "render.cpu_environment_bounds": "L'intensité CPU doit être entre 0 et 64, la rotation HDR finie dans ±1 000 000 radians, et les échantillons HDR égaux à 1, 4, 16 ou 64.", + "render.cpu_environment_constant": "Environnement constant pour les rayons secondaires", + "render.cpu_environment_none": "Aucun environnement CPU", + "render.cpu_environment_samples": "Échantillons d'éclairage HDR", + "render.cpu_exposure_help": "L'exposition CPU doit être comprise entre −16 et 16 IL. Une exposition GPU hors de cette plage est conservée jusqu'à ce que vous la changiez.", + "render.cpu_fixed": "Image unique", + "render.cpu_hdr_help": "Radiance .hdr, panorama 2:1, jusqu'à 2048 × 1024 et 16 Mio. Le CPU exige des primaires sRVB/D65 explicites dans le fichier ; les primaires non spécifiées et l'EXR sont refusés.", + "render.cpu_hdr_reflection_help": "Les réflexions HDR rugueuses exigent des surfaces de corps et de faces entièrement métalliques. Vérifier signale les combinaisons non prises en charge.", + "render.cpu_key_rim": "Principale et contour", + "render.cpu_last_check": "Dernière vérification CPU", + "render.cpu_light_help": "Jusqu'à huit lumières directionnelles. Une liste personnalisée vide les éteint ; choisir un préréglage restaure ses lumières. Les couleurs sont en RVB linéaire et l'intensité est relative, pas en watts.", + "render.cpu_light_intensity": "Intensité relative (0–64)", + "render.cpu_light_minimum": "Distance minimale d'atténuation", + "render.cpu_light_position": "Position dans le monde (X, Y, Z)", + "render.cpu_light_reference": "Distance de référence de l'intensité", + "render.cpu_light_remove": "Supprimer la lumière", + "render.cpu_lighting": "Préréglage d'éclairage", + "render.cpu_lights": "Lumières CPU", + "render.cpu_linear_color": "Couleur linéaire (R, V, B)", + "render.cpu_neutral": "Neutre", + "render.cpu_opaque_required": "Le lancer de rayons CPU nécessite un arrière-plan opaque. Décochez Arrière-plan transparent pour continuer.", + "render.cpu_options_pending": "Ce panneau CPU ne peut pas encore modifier l'émission, les effets de surface, le verre ni l'anisotropie. Effacez ces options d'API avant de l'utiliser.", + "render.cpu_point": "Lumière ponctuelle", + "render.cpu_point_add": "Ajouter une lumière ponctuelle", + "render.cpu_point_help": "Jusqu'à huit lumières ponctuelles, ajoutées à l'éclairage directionnel choisi. Les distances sont en mm ; la distance minimale ne doit pas dépasser la distance de référence.", + "render.cpu_primary_samples": "Échantillons de bord par pixel", + "render.cpu_progressive": "CPU progressif", + "render.cpu_progressive_help": "Accumuler l'intégrateur CPU existant par passes d'un échantillon primaire. Les réflexions sélectionnées exigent un échantillon ; les lumières surfaciques, les diélectriques et l'anisotropie exigent Image unique.", + "render.cpu_progressive_limits": "Au plus 1 048 576 pixels et 16 777 216 évaluations pixel × échantillon. Changer le nombre d'échantillons ne redimensionne jamais l'image automatiquement.", + "render.cpu_progressive_seed": "Graine d'échantillonnage CPU", + "render.cpu_progressive_spp": "échantillons par pixel", + "render.cpu_reflection_add": "Ajouter une réflexion rugueuse", + "render.cpu_reflection_depth": "Profondeur de réflexion (1–8)", + "render.cpu_reflection_empty": "Aucun corps sélectionné : les réflexions de la scène sont désactivées.", + "render.cpu_reflection_help": "Choisissez des corps et réglez Désactivé, Miroir ou Rugueux. Rugueux utilise la rugosité de surface affectée. Plus d'échantillons et de rebonds allongent le rendu ; il s'agit d'un transport spéculaire borné, pas d'un éclairage global.", + "render.cpu_reflection_limit": "Jusqu'à 64 corps réfléchis sont pris en charge.", + "render.cpu_reflection_mirror": "Miroir", + "render.cpu_reflection_off": "Désactivé", + "render.cpu_reflection_rough": "Rugueux", + "render.cpu_reflection_samples": "Échantillons de réflexion (1–64)", + "render.cpu_reflections": "Réflexions CPU", + "render.cpu_runtime_help": "Les réglages numériques de lumière et d'environnement sont enregistrés avec le préréglage. Les réflexions des corps et les fichiers HDR restent temporaires. Les valeurs existantes des lumières surfaciques et des cônes de spot sont conservées.", + "render.cpu_sampling_mode": "Mode d'échantillonnage CPU", + "render.cpu_shadows": "Projeter des ombres", + "render.cpu_summary": "Lancer de rayons CPU · réflexions · HDR · lumières directionnelles et ponctuelles", + "render.cpu_warm_cool": "Chaud et froid", + "render.diag_bodies": "Corps visibles", + "render.diag_job_details": "Détails de la tâche capturée", + "render.diag_last_check": "Dernière vérification préalable", + "render.diag_memory": "Estimation logique d'admission", + "render.diag_not_implemented": "Limites explicites des capacités", + "render.diag_preflight_details": "Détails de la vérification préalable", + "render.diag_request": "Requête actuelle exacte", + "render.diag_triangles": "Triangles", + "render.discard_continue": "Abandonner le brouillon et continuer", + "render.draft_confirm_help": "Le brouillon de rendu actuel contient des modifications non appliquées. Enregistrez-les avant de changer, abandonnez-les explicitement ou continuez la modification.", + "render.draft_confirm_title": "Conserver les réglages de rendu modifiés", + "render.effects_gpu_only": "Ces effets nécessitent le tracé de chemins GPU. Changer de page ne change jamais automatiquement de moteur de rendu.", + "render.effects_help": "Combinez des looks colorimétriques ordonnés et des effets d'objectif en espace image. Le rendu et le réétalonnage du master brut utilisent les mêmes réglages enregistrés. L'EXR brut reste inchangé. Ce sont des réglages artistiques originaux, pas des émulations calibrées d'objectifs ou de pellicules de marque.", + "render.effects_reset_lens": "Réinitialiser les effets d'objectif", + "render.effects_seed": "Graine du motif", + "render.export_display": "Export : PNG d'affichage", + "render.export_linear": "Export : EXR linéaire brut", + "render.exr_pending": "Le GPU peut conserver un EXR linéaire brut. La compression, les images multicouches et les passes de rendu auxiliaires restent indisponibles.", + "render.film_grain": "Grain photographique", "render.fit": "Cadrer le produit", + "render.flare_ghosts": "Anneaux fantômes par source", + "render.flare_halo": "Halo de flare", + "render.flare_streak": "Traînée de style anamorphique", + "render.flare_strength": "Intensité du flare des hautes lumières", + "render.flare_threshold": "Seuil du flare en linéaire scène", + "render.gpu_depth": "Profondeur maximale des chemins", + "render.gpu_options_help": "Les échantillons, la profondeur, la graine et l'exposition sont enregistrés avec ce préréglage. Seule la méthode d'image active est enregistrée.", + "render.gpu_path_failed": "Traceur de chemins GPU indisponible", + "render.gpu_path_first_setup": "La première initialisation sur ce GPU peut prendre plusieurs minutes ; SolidCraft reste utilisable pendant ce temps. Les démarrages suivants réutilisent les shaders compilés lorsque le pilote les conserve.", + "render.gpu_path_preparing": "Traceur de chemins GPU : compilation des shaders…", + "render.gpu_seed": "Graine aléatoire", + "render.gpu_unavailable": "Le tracé de chemins GPU n'est pas prêt sur cet appareil.", + "render.ground_apply": "Ajuster et enregistrer le sol", + "render.ground_gap": "Écart explicite au sol", + "render.ground_linear_rgb": "Réflectance diffuse · RVB linéaire", + "render.ground_margin": "Marge d'étendue du sol", + "render.hdr_details": "Détails de la source HDR", + "render.hdr_embedded": "HDR enregistré dans cette conception", + "render.hdr_embedded_help": "Le rendu utilise les octets inclus dans la conception ; le fichier d'origine n'est plus nécessaire.", + "render.hdr_file_captured": "Fichier HDR vérifié. L'enregistrement intégrera ces octets ; si le fichier change, vérifiez-le à nouveau explicitement.", + "render.hdr_inspect": "Vérifier le fichier HDR", + "render.hdr_inspect_required": "Sélectionnez et vérifiez un fichier HDR avant d'enregistrer ou de lancer le rendu.", + "render.hdr_primaries_declared": "La source déclare ses primaires colorimétriques.", + "render.hdr_primaries_srgb": "Primaires colorimétriques : sRVB/D65", + "render.hdr_primaries_undeclared": "La source ne déclare pas de primaires ; vérifiez les exigences colorimétriques du moteur de rendu.", + "render.hdr_resource_missing": "Il manque à cette conception la ressource HDR enregistrée.", + "render.image_advanced": "Réglages GPU avancés", "render.image_cancelled": "Rendu annulé", "render.image_cancelling": "Annulation", "render.image_completed": "Image prête à exporter", "render.image_encoding": "Encodage du PNG", "render.image_export": "Exporter en PNG", + "render.image_exposure": "Exposition", "render.image_failed": "Échec du rendu", "render.image_height": "Hauteur", "render.image_help": "Image d'aperçu CPU · PNG · transparence approximative", + "render.image_host_missing": "Aucun hôte d'image n'est installé.", + "render.image_method": "Méthode d'image", "render.image_overwrite": "Remplacer le fichier existant", "render.image_preparing": "Préparation de l'image", + "render.image_progressive": "Rendu progressif", "render.image_queued": "En attente de rendu", "render.image_reduce": "Essayez une image plus petite ou une scène plus simple.", "render.image_running": "Rendu de l'image", + "render.image_samples": "Échantillons par pixel", + "render.image_scene_stale": "Terminez le geste de modélisation ou actualisez la scène avant de vérifier ou de lancer une image.", "render.image_stale": "Cette image utilise la scène capturée avant les dernières modifications.", "render.image_start": "Lancer le rendu", "render.image_supported": "La demande de rendu est prise en charge ; la file d'attente et la réserve de mémoire seront revérifiées au lancement.", @@ -1046,20 +1766,347 @@ "render.image_unknown": "État du rendu indisponible", "render.image_use_largest": "Utiliser la plus grande taille à ce format :", "render.image_width": "Largeur", + "render.include_rig_cards": "Inclure les réflecteurs et drapeaux passifs", + "render.inspect_scene": "Actualiser le résumé de la scène capturée", + "render.keep_editing": "Continuer la modification", + "render.layer_down": "Déplacer vers le bas", + "render.layer_enabled": "Couche activée", + "render.layer_remove": "Supprimer la couche", + "render.layer_strength": "Intensité de la couche", + "render.layer_up": "Déplacer vers le haut", + "render.lens_effects_help": "Le flare utilise jusqu'à quatre sources lumineuses distinctes de l'image linéaire réelle. Les fantômes, le halo, les traînées, les décalages chromatiques et la distorsion radiale sont des approximations artistiques en espace image. Les effets spatiaux nécessitent une sortie opaque ; les échantillons extérieurs prolongent le bord de l'image. Le grain est déterministe. Aucune physique, aucun EXR ni aucune géométrie n'est modifié.", + "render.lens_effects_title": "Inspiration objectif et photographie", + "render.library_all": "Catalogue", + "render.library_all_states": "Tous les états de disponibilité", + "render.library_applied": "Projection de ressource appliquée. Vérifiez la requête de rendu complète avant de lancer.", + "render.library_apply_hdr": "Enregistrer avec cet environnement HDR", + "render.library_apply_maps": "Utiliser les textures de surface GPU conçues", + "render.library_apply_studio": "Enregistrer la projection de studio conçue", + "render.library_apply_uniform": "Appliquer une apparence opaque uniforme", + "render.library_authored_help": "Les ressources conçues d'origine sont indicatives, pas des données techniques mesurées. Chaque action n'applique que la projection indiquée.", + "render.library_blocked": "Bloqué / étalonnage requis", + "render.library_capabilities": "Spécifications des capacités", + "render.library_center": "Centre du dispositif", + "render.library_clear_search": "Effacer", + "render.library_details": "Spécification et provenance", + "render.library_emitters_only_ack": "Utiliser seulement les émetteurs ; omettre les réflecteurs passifs documentés", + "render.library_empty": "Aucune ressource correspondante. Essayez une autre requête ou un autre filtre de disponibilité.", + "render.library_environment_concepts": "Concepts d'environnement", + "render.library_extent": "Étendue du sujet", + "render.library_favorite": "Ajouter aux favoris", + "render.library_favorites": "Favoris", + "render.library_hdr": "Environnements HDR intégrés", + "render.library_hdr_help": "Intègre le HDR d'origine dans le préréglage enregistré. L'origine de longitude conçue est convertie explicitement ; aucun fichier externe n'est nécessaire après l'enregistrement.", + "render.library_inspect_only": "Sélectionnez pour inspecter ; rien n'est appliqué automatiquement. Les favoris et l'historique récent appartiennent à cette session de document ouverte.", + "render.library_light_concepts": "Concepts d'éclairage", + "render.library_maps_help": "Les textures intégrées peuvent être enregistrées avec des sources épinglées et un mappage local aux occurrences. Les remplacements optiques temporaires restent un mode distinct.", + "render.library_material_concepts": "Concepts de matériaux", + "render.library_native_scenes": "Studios natifs", + "render.library_next": "Page suivante", + "render.library_omitted": "Non inclus", + "render.library_physical_profiles": "Profils de référence physiques", + "render.library_previous": "Page précédente", + "render.library_quality_concepts": "Spécifications de qualité", + "render.library_recent": "Récents", + "render.library_replace_environment": "Remplacer explicitement l'environnement existant", + "render.library_replace_studio": "Remplacer l'éclairage, l'environnement et le décor enregistrés", + "render.library_results": "Ressources correspondantes", + "render.library_rig_help": "Ajuster une fois sur un centre et une étendue physique explicites. Les dispositifs complets incluent des réflecteurs passifs ; les blocages d'étalonnage refusent toujours. Un écart prudent entre émetteurs et réflecteurs est vérifié avant l'enregistrement.", + "render.library_rigs": "Dispositifs d'éclairage conçus", + "render.library_save_maps": "Enregistrer les textures dans ce préréglage", + "render.library_scene_bounds": "Utiliser les limites de la scène capturée", + "render.library_scenes": "Spécifications de scène", + "render.library_search": "Rechercher dans la bibliothèque", + "render.library_select_hint": "Choisissez une ressource dans la bibliothèque pour inspecter ses actions prises en charge et ses limites.", + "render.library_selene": "Apparences opaques SELENE", + "render.library_selene_shots": "Spécifications de prises de vue SELENE", + "render.library_short_blocked": "Indisponible", + "render.library_short_native": "Composition native", + "render.library_short_projection": "Projection prise en charge", + "render.library_short_reference": "Référence uniquement", + "render.library_short_specification": "Spécification uniquement", + "render.library_source_preview": "Charger l'aperçu de la texture source", + "render.library_source_preview_help": "Texture source de couleur de base conçue. Ce n'est pas un aperçu de matériau rendu ou mesuré.", + "render.library_specification_only": "Spécification uniquement : pas un préréglage exécutable complet. Les effets, ressources et rôles de sujet requis nécessitent encore une implémentation et une association explicites.", + "render.library_specs": "Spécifications uniquement", + "render.library_status": "Disponibilité", + "render.library_surfaces": "Surfaces PBR conçues", + "render.library_target": "Corps cible", + "render.library_title": "Bibliothèque de ressources de rendu", + "render.library_unfavorite": "Retirer des favoris", + "render.library_uniform_ack": "Utiliser l'approximation uniforme sans effets spatiaux ni avancés", + "render.library_usable": "Projections exécutables", + "render.linear_help": "Conserve un master RVBA en flottant 32 bits avant le débruitage, l'exposition, le mappage des tons, les filtres et l'arrière-plan. sRVB/D65 linéaire ; prémultiplié par la couverture. La mémoire supplémentaire est admise explicitement. Pas de compression ni de passes supplémentaires.", + "render.linear_retain": "Conserver l'EXR linéaire brut", + "render.linear_unavailable": "L'image terminée sélectionnée n'a pas d'EXR conservé. Activez la conservation avant le rendu ; un ancien PNG ne permet pas de récupérer la radiance brute.", + "render.look_add": "Ajouter un look colorimétrique", + "render.look_bleach": "Inspiration traitement sans blanchiment (bleach bypass)", + "render.look_cool": "Froid", + "render.look_cyanotype": "Inspiration cyanotype", + "render.look_faded": "Tirage délavé", + "render.look_mono": "Monochrome", + "render.look_sepia": "Sépia", + "render.look_strength": "Intensité du look", + "render.look_teal_orange": "Bleu canard / orange", + "render.look_title": "Pile de looks créatifs", + "render.look_warm": "Chaud", + "render.mapping_scale": "Multiplicateur de répétition physique", + "render.material_absorption": "Absorption R · V · B (par mm)", + "render.material_add": "Ajouter ou modifier ce corps", + "render.material_assignments": "Affectations des corps", + "render.material_binding_enable": "Inclure ce remplacement de corps", + "render.material_box": "Boîte alignée sur les axes", + "render.material_browse": "Choisir une image…", + "render.material_certification": "Le verre fermé utilise la distance géométrique. La topologie, l'orientation, le chevauchement et les limites optiques sont vérifiés pendant la préparation GPU ; Vérifier ne fait qu'admettre la requête.", + "render.material_choose_body": "Choisir un corps de la scène", + "render.material_closed": "Maillage solide fermé", + "render.material_coat": "Vernis sur le matériau de base", + "render.material_coat_enable": "Activer le vernis", + "render.material_coat_help": "Revêtement diélectrique indicatif sur l'apparence opaque existante. Un poids nul laisse la base inchangée.", + "render.material_color_map": "Image de couleur de base (sRVB)", + "render.material_color_replace": "La texture de base remplace la couleur du corps", + "render.material_custom": "Optique indicative personnalisée", + "render.material_enable": "Utiliser ces remplacements de matériau GPU", + "render.material_filter": "Filtrer les corps de la scène…", + "render.material_filter_help": "Jusqu'à 128 corps correspondants sont affichés. Affinez le filtre pour les grandes scènes.", + "render.material_glass": "Verre et absorption optique", + "render.material_glass_enable": "Utiliser un verre physique sur ce corps", + "render.material_glass_exclusive": "Dans ce moteur de rendu, le verre ne peut pas partager un corps avec un vernis ou des textures d'exécution.", + "render.material_glass_help": "Recettes indicatives originales. Les nuanciers montrent la transmittance, pas un aperçu rendu. L'absorption vaut −ln(transmittance linéaire) / distance de référence ; l'alpha est inchangé.", + "render.material_gpu_required": "Ces remplacements de matériau actifs nécessitent le tracé de chemins GPU. Choisissez GPU ou désactivez les remplacements avant Vérifier ou Démarrer.", + "render.material_ior": "Indice de réfraction (IOR)", + "render.material_limits": "Au plus 128 remplacements de corps, 32 corps de verre disjoints, 64 vernis et 128 associations de textures. Les textures identiques partagent leur stockage ; les limites réelles de l'appareil et de la mémoire totale s'appliquent toujours.", + "render.material_map_invalid": "Les chemins des textures doivent être des chemins locaux bornés ; l'intensité de la normale doit être finie et comprise entre 0 et 1.", + "render.material_map_required": "Choisissez une image de couleur ou une image de normales avant d'utiliser des textures.", + "render.material_maps": "Textures planes de couleur et de normales", + "render.material_maps_enable": "Activer les textures pour ce corps opaque", + "render.material_maps_help": "PNG/JPEG jusqu'à 1024×1024 ; 16 Mio encodés au total. U et V sont des vecteurs de répétition orthogonaux en mm monde (128 répétitions au maximum). La couleur est en sRVB ; les normales utilisent la convention OpenGL +Y. Les fichiers sont capturés à Vérifier/Démarrer.", + "render.material_metallic_map": "Texture métallique (linéaire)", + "render.material_normal_map": "Image de normales (OpenGL, +Y)", + "render.material_normal_strength": "Intensité des normales (0–1)", + "render.material_origin": "Origine du mappage X · Y · Z (mm)", + "render.material_refresh": "Actualiser les corps de la scène", + "render.material_refresh_needed": "La scène a changé. Actualisez la liste des corps avant d'ajouter une cible.", + "render.material_remove": "Supprimer cette affectation", + "render.material_repeat_u": "Une répétition U X · Y · Z (mm)", + "render.material_repeat_v": "Une répétition V X · Y · Z (mm)", + "render.material_revalidate": "Revalider ce corps", + "render.material_revalidate_needed": "Cette affectation appartient à une révision antérieure de la scène. Revalidez l'identité exacte de son corps avant le rendu.", + "render.material_roughness": "Rugosité du vernis (0,045–1)", + "render.material_roughness_map": "Texture de rugosité (linéaire)", + "render.material_shadow": "Transmettre les rayons d'ombre directs", + "render.material_target_missing": "Le numéro d'ordre et le nom du corps ne correspondent plus. Supprimez cette affectation et choisissez à nouveau explicitement le corps voulu.", + "render.material_thickness": "Épaisseur de la feuille mince (mm)", + "render.material_thin": "Feuille mince", + "render.material_title": "Matériaux d'image GPU", + "render.material_transient": "Remplacements optiques temporaires pour cet onglet de document. Ils ne sont enregistrés ni dans la conception, ni dans le préréglage de rendu, ni dans la bibliothèque de matériaux.", + "render.material_v_up": "Le V de la texture pointe vers le haut de l'image", + "render.material_weight": "Poids du vernis (0–1)", + "render.method_cpu": "Lancer de rayons CPU", + "render.method_gpu": "Tracé de chemins GPU", + "render.method_limit_raster": "La rastérisation utilise l'aperçu de studio opaque fixe. Choisissez une méthode de lancer de rayons explicite pour les réglages optiques pris en charge.", + "render.method_raster": "Rastérisation CPU", "render.navigation_help": "La caméra se déplace comme dans Conception (Préférences › Navigation). Enregistrer le préréglage mémorise la caméra actuelle.", + "render.nested_enable": "Diélectriques imbriqués certifiés", + "render.nested_help": "Jusqu'à 16 couches contenantes ; chaque parent doit être convexe et chaque enfant strictement à l'intérieur. Les intersections, les surfaces en contact, les feuilles minces et la transmission des ombres directes sont refusées. L'état « caméra à l'intérieur » suit la hiérarchie certifiée. Ne crée pas de surface de liquide et ne fusionne pas les limites CAO en contact.", "render.opaque_image_summary": "PNG d'aperçu · PBR opaque · transparence mélangée", "render.opaque_preview_help": "PBR opaque et couleurs simples ; transparence mélangée. La réfraction, l'HDRI et le rendu final ne sont pas encore disponibles.", + "render.optics_remove": "Supprimer l'optique enregistrée", + "render.optics_replace": "Remplacer explicitement l'optique enregistrée de cette cible", + "render.optics_save": "Enregistrer cette optique dans le préréglage", + "render.optics_saved": "Cibles optiques enregistrées", + "render.optics_saved_help": "L'identité exacte de la définition, de la fonction et de l'occurrence est conservée à la réouverture hors ligne. Les cibles manquantes, remplacées ou masquées sont refusées ; les matériaux techniques sont inchangés. Enregistrez ou abandonnez les modifications numériques avant de supprimer une cible enregistrée.", + "render.output_format_status": "Le PNG est l'image d'affichage terminée exacte. L'EXR GPU facultatif conserve la radiance brute FLOAT32 en linéaire scène, avant les filtres d'affichage. L'export ne substitue jamais le cache d'aperçu ni une autre tâche.", + "render.output_lock_ratio": "Verrouiller le rapport d'aspect", + "render.output_over_budget": "L'image demandée dépasse l'enveloppe de ressources choisie. Choisissez explicitement une taille ou un profil compatible ; aucune réduction automatique n'a lieu.", + "render.output_ratio_refused": "La dimension liée dépasse la taille limite de cette méthode. La taille précédente est conservée ; déverrouillez le rapport ou choisissez une valeur plus petite.", + "render.output_swap_orientation": "Permuter largeur et hauteur", + "render.page_aging": "Vieillissement et salissures", + "render.page_all": "Tous les réglages", + "render.page_appearance": "Apparence", + "render.page_background": "Arrière-plans", + "render.page_camera": "Caméra", + "render.page_diagnostics": "Diagnostics", + "render.page_effects": "Effets d'objectif et de finition", + "render.page_environment": "Environnement", + "render.page_lighting": "Éclairage", + "render.page_output": "Sortie", + "render.page_scene": "Scène", + "render.passive_stage": "Sol et décor passif", + "render.passive_stage_help": "Les panneaux passifs finis n'appartiennent qu'aux images rendues. Ils n'ajoutent ni corps CAO ni masse. Leur placement est figé après application ; un recoupement avec les limites du produit est refusé. Le CPU ne fournit pas d'éclairage diffus par rebond.", "render.perspective": "Caméra en perspective", + "render.physical_acknowledge": "Je comprends que cette référence partielle nécessite un examen de la nuance, de l'état et de la source", + "render.physical_associations": "Candidats physiques et rôles", + "render.physical_background_help": "Vrai sol et vrai mur passifs, distincts de l'arrière-plan de la caméra. Le cyclorama utilise 24 bandes polygonales ; ce n'est pas une surface infinie ni analytiquement lisse. Ne remplace le décor enregistré qu'avec votre accord.", + "render.physical_copy_plan": "Copier le plan avec les sources et les omissions", + "render.physical_cyclorama": "Ajuster un cyclorama polygonal", + "render.physical_floor_wall": "Ajuster un sol et un mur physiques", + "render.physical_material_name": "Nom proposé pour le matériau de référence", + "render.physical_omissions": "Propriétés non représentables dans la fiche native", + "render.physical_plan_only": "Plan en lecture seule préparé. Aucun matériau n'a été créé ni affecté. Gardez son profil étendu et ses omissions en examinant la fiche native.", + "render.physical_prepare_plan": "Préparer le plan de création (n'applique rien)", + "render.physical_separate": "L'apparence n'identifie pas le matériau. Ce sont des références sourcées, pas des propriétés effectives certifiées. La masse, les matériaux techniques et l'optique existants sont inchangés.", + "render.physical_unknown": "Aucun candidat numérique n'est établi. La nuance, la formulation ou la construction doit être précisée ; inconnu ne signifie pas zéro.", + "render.post_contrast": "Contraste", + "render.post_gain_b": "Gain bleu", + "render.post_gain_g": "Gain vert", + "render.post_gain_r": "Gain rouge", + "render.post_help": "Présentation créative uniquement. Les gains RVB précèdent le mappage des tons ; le contraste, la saturation et le vignettage suivent, en lumière d'affichage linéaire. Lancer le rendu crée de nouveaux échantillons de transport. Réétalonner utilise le master brut conservé sélectionné, sans débruitage ni nouveaux rayons.", + "render.post_reset": "Réinitialiser les filtres de présentation", + "render.post_saturation": "Saturation", + "render.post_title": "Filtres de présentation", + "render.post_vignette": "Vignettage", "render.preview": "Aperçu intégré", "render.preview_help": "Ombrage par rastérisation et transparence mélangée. La réfraction, l'HDRI et le rendu final ne sont pas encore disponibles.", + "render.preview_image_settings_help": "L'aperçu en direct garde un éclairage de studio fixe. L'exposition et l'éclairage de l'image s'appliquent à la tâche d'image quand vous cliquez sur Vérifier ou Démarrer.", + "render.preview_retry": "Réessayer l'aperçu en direct", + "render.preview_unavailable_help": "L'aperçu en direct est indisponible. Les préréglages enregistrés et les réglages de tâche d'image restent accessibles. Modifiez la scène ou réessayez explicitement ; une scène refusée n'est pas reconstruite à chaque image.", + "render.preview_upload": "Charge de sommets de l'aperçu en direct", + "render.preview_upload_help": "Octets exacts des sommets de l'aperçu, pas la mémoire totale du GPU ni du processus. La géométrie n'est pas simplifiée. Les tâches d'image utilisent leur propre admission et leur propre éclairage.", + "render.progressive_image_summary": "PNG d'aperçu · PBR et verre · échantillons progressifs", + "render.quality_ack": "Accepter la projection à budget fixe et ses omissions", + "render.quality_apply": "Utiliser ce budget d'échantillonnage fixe", + "render.quality_projection_help": "Les préréglages Q incluent des exigences futures. Cette action ne projette qu'un budget PNG pris en charge à échantillons fixes, et omet explicitement l'arrêt adaptatif, la sortie linéaire brute et les limites de transmission indépendantes.", + "render.quality_review": "Examiner le budget d'échantillonnage", + "render.queue_pending": "Cette interface ne propose ni file de production automatique ni moteur de rendu d'animation. Les images fixes terminées restent exportables séparément.", + "render.radial_distortion": "Distorsion radiale", + "render.regrade_action": "Réétalonner le master brut (sans débruitage)", + "render.regrade_help": "Crée un PNG distinct à partir du master brut terminé sélectionné, avec ces réglages de présentation. Ne trace aucun rayon, ne change ni la taille, ni la caméra, ni les lumières capturées, et n'écrase pas l'EXR. Le débruitage n'est pas réappliqué : les masters bruts ne conservent pas ses guides. Le résultat reste exportable par les mêmes réglages de tâche.", "render.reload_settings": "Recharger les réglages enregistrés", + "render.replace_ground": "Confirmer le remplacement du décor existant", + "render.replace_saved_surface": "Remplacer une association enregistrée existante pour cette cible", "render.restore_camera": "Restaurer la caméra enregistrée", + "render.result_actual_help": "Un pixel d'image par pixel d'affichage.", + "render.result_capture": "Révision capturée", + "render.result_current": "La révision capturée du modèle est à jour.", + "render.result_empty": "Aucune image terminée pour l'instant. Vérifiez les réglages, puis lancez un rendu.", + "render.result_fit": "Ajuster l'image", + "render.result_job": "Tâche", + "render.result_navigation": "Le panoramique et le zoom suivent les préférences de navigation. Espace + glisser fait un panoramique.", + "render.result_open": "Ouvrir l'image terminée dans le canevas principal.", + "render.result_preview": "Aperçu en direct", + "render.result_provisional": "Image CPU provisoire", + "render.result_provisional_help": "Ce point de restauration n'est pas exportable. L'export conserve le dernier résultat terminé ; l'annulation revient à ce résultat.", + "render.result_reduced_display": "Aperçu d'affichage réduit à la limite de l'appareil ou du cache de la vue. Le PNG conservé et l'export gardent la pleine résolution ; l'inspection native à 100 % n'est pas disponible pour cette vue réduite.", + "render.result_retained": "Affichage de la dernière image terminée ; un rendu plus récent ne l'a pas remplacée.", + "render.result_sequence": "Point de restauration", + "render.result_title": "Résultat du rendu", "render.return_design": "Revenir à la conception", + "render.review_stale": "Cet examen est périmé. Résolvez ou vérifiez à nouveau avant d'appliquer.", + "render.ribbon_aging": "Vieillissement", + "render.ribbon_backgrounds": "Arrière-plans", + "render.ribbon_check": "Vérifier", + "render.ribbon_check_help": "Valider le brouillon actuel exact que Rendu va soumettre. Pas de moteur de rendu de repli, de redimensionnement silencieux ni de remplacement de ressource.", + "render.ribbon_edit_lights": "Modifier les lumières", + "render.ribbon_effects": "Effets", + "render.ribbon_environment_help": "L'éclairage HDR, les arrière-plans propres à la caméra et les surfaces du décor physique sont des réglages distincts, avec un accord explicite pour tout remplacement.", + "render.ribbon_finish_dialog": "Terminez d'abord la boîte de dialogue de fichier ou de confirmation en cours.", + "render.ribbon_frame": "Cadrer", + "render.ribbon_hdr_library": "Bibliothèque HDR", + "render.ribbon_job_active": "Un rendu est déjà en cours ; annulez-le explicitement avant d'en lancer un autre.", + "render.ribbon_light_rigs": "Dispositifs d'éclairage", + "render.ribbon_lights_help": "Inspectez les dispositifs conçus ou modifiez les lumières prises en charge, sans remplacer le préréglage actuel tant que vous n'appliquez pas explicitement la modification.", + "render.ribbon_materials": "Matériaux", + "render.ribbon_materials_help": "Ouvrir l'inspecteur d'apparence partagé et la bibliothèque de surfaces d'origine. Les modifications optiques ne changent jamais en silence les propriétés techniques.", + "render.ribbon_no_active_job": "Aucun rendu en cours à annuler.", + "render.ribbon_no_result": "Terminez un rendu avant d'exporter son image exacte.", + "render.ribbon_no_saved_camera": "Enregistrez une prise de vue avant de restaurer sa caméra.", + "render.ribbon_saved_camera": "Caméra enregistrée", + "render.ribbon_shots": "Prises de vue", + "render.ribbon_studios": "Studios", + "render.ribbon_studios_help": "Parcourez les compositions de studio implémentées et examinez leurs remplacements avant d'appliquer. Les scènes à l'état de concept restent signalées.", + "render.ribbon_surface_maps": "Textures de surface", + "render.sampling_title": "Échantillonnage adaptatif et de transmission", + "render.save_continue": "Enregistrer et continuer", "render.save_setup": "Enregistrer le préréglage", + "render.saved_maps_runtime_conflict": "Les associations de surface enregistrées ne peuvent pas être mélangées avec des remplacements optiques temporaires ni avec un HDR non enregistré. Enregistrez le HDR ou supprimez explicitement les entrées temporaires.", + "render.saved_surface_remove": "Supprimer l'association enregistrée", + "render.saved_surfaces": "Associations de surface enregistrées", + "render.saved_surfaces_help": "Les textures intégrées épinglées suivent l'occurrence sélectionnée en millimètres locaux. Une cible remplacée ou manquante est une erreur, jamais une réaffectation automatique.", + "render.scene_apply": "Appliquer le studio examiné", + "render.scene_consent": "Confirmer le remplacement de l'éclairage, de l'environnement, de l'exposition et du décor", + "render.scene_preserved_fields": "La caméra, l'échantillonnage, les dimensions, les associations optiques, la géométrie CAO et les matériaux techniques sont conservés.", + "render.scene_preserves_design": "Composer un éclairage et un décor passif pour le sujet visible. La géométrie, les matériaux techniques et la caméra restent distincts.", + "render.scene_replaces": "Remplace", + "render.scene_review": "Résoudre et examiner", + "render.scene_review_help": "Examinez la composition native complète avant d'appliquer. Les spécifications SCENE avancées non liées ne sont pas substituées.", + "render.scene_scope_details": "Portée de la composition", + "render.setup_legacy_environment": "Ce préréglage ancien utilise une rotation ou une intensité d'environnement héritée. Ces valeurs sont conservées ; convertissez-les explicitement avant d'enregistrer une tâche d'image complète.", "render.setup_name": "Nom du préréglage", + "render.setup_numeric_help": "Enregistrer consigne la méthode d'image active et tous ses réglages numériques. Recharger ou choisir un autre préréglage remplace ce brouillon ; restaurez la caméra séparément.", + "render.setup_offline_help": "Vous pouvez modifier et enregistrer cette méthode sans son moteur de rendu. Vérifier et Démarrer nécessitent un hôte disponible.", + "render.setup_runtime_unsupported": "Cette tâche complète ne peut pas encore être enregistrée : elle contient des textures ou des associations à des corps de la scène. Supprimez ces entrées temporaires avant d'enregistrer un préréglage portable.", + "render.setup_save_missing": "La configuration de rendu enregistrée est introuvable après l'exécution de la commande.", + "render.sharpening": "Accentuation des détails", + "render.shot_duplicate": "Dupliquer la prise de vue enregistrée", + "render.shot_manager": "Prises de vue enregistrées", + "render.shot_new_name": "Nom de la nouvelle prise de vue", + "render.shot_remove": "Supprimer la prise de vue enregistrée", + "render.shot_remove_help": "Supprime uniquement cette prise de vue enregistrée. La géométrie source et les images terminées sont conservées ; l'action peut être annulée.", + "render.shot_remove_title": "Supprimer la prise de vue enregistrée ?", + "render.shot_rename": "Renommer la prise de vue enregistrée", + "render.shot_saved_only": "Enregistrez d'abord le brouillon actuel. Dupliquer et renommer conservent exactement les options enregistrées et les références aux ressources.", + "render.sky_ground": "Sol · RVB linéaire", + "render.sky_horizon": "Horizon · RVB linéaire", + "render.sky_zenith": "Zénith · RVB linéaire", + "render.soft_focus": "Flou artistique", + "render.stage_panel_count": "Panneaux enregistrés", + "render.studio_add_area": "Ajouter une lumière surfacique", + "render.studio_ambient": "Radiance constante de l'environnement", + "render.studio_ambient_rgb": "Radiance constante de l'environnement (RVB linéaire)", + "render.studio_aperture": "Rayon d'ouverture", + "render.studio_area": "Lumière surfacique", + "render.studio_area_help": "Jusqu'à quatre rectangles à une face. Les demi-côtés orthogonaux U et V définissent la taille ; U × V fait face au côté éclairé. Les coordonnées sont en millimètres de l'espace monde.", + "render.studio_center": "Centre X, Y, Z (mm)", + "render.studio_denoise": "Réduire le bruit de l'image finale", + "render.studio_denoise_help": "Filtre final respectant les bords ; les détails fins peuvent s'adoucir. Le verre et les surfaces spéculaires nettes ne passent pas par le filtre.", + "render.studio_direction": "Direction vers le soleil (X, Y, Z)", + "render.studio_environment": "Environnement", + "render.studio_environment_bounds": "La rotation de l'environnement doit être finie dans ±1 000 000 radians et l'intensité comprise entre 0 et 100.", + "render.studio_environment_none": "Aucune carte d'environnement", + "render.studio_focus": "Distance de mise au point axiale", + "render.studio_half_u": "Demi-côté U (mm)", + "render.studio_half_v": "Demi-côté V (mm)", + "render.studio_hdr": "Fichier HDR Radiance", + "render.studio_hdr_browse": "Choisir un HDR…", + "render.studio_hdr_help": "Radiance .hdr, panorama 2:1, jusqu'à 2048 × 1024. L'EXR n'est pas disponible. L'hypothèse de couleur ne s'applique que si les primaires ne sont pas spécifiées.", + "render.studio_hdr_required": "Choisissez un fichier .hdr local.", + "render.studio_hdr_srgb": "Interpréter les primaires non spécifiées comme du sRVB linéaire", + "render.studio_intensity": "Intensité de l'environnement", + "render.studio_lens": "Profondeur de champ", + "render.studio_lens_perspective": "La profondeur de champ nécessite une caméra en perspective.", + "render.studio_lighting": "Éclairage de studio", + "render.studio_lighting_enable": "Utiliser un éclairage de studio personnalisé", + "render.studio_needs_review": "Examiner la méthode et les réglages", + "render.studio_radiance": "Radiance RVB linéaire", + "render.studio_ready": "Prêt à vérifier", + "render.studio_remove_area": "Supprimer la lumière surfacique", + "render.studio_rotation": "Rotation de l'environnement", + "render.studio_runtime_help": "Les réglages numériques du studio et les sources HDR vérifiées peuvent être enregistrés avec le préréglage. Les remplacements optiques et de matériau des corps restent temporaires et ne modifient pas les apparences enregistrées.", + "render.studio_saved": "Préréglage enregistré / caméra actuelle", + "render.studio_sky": "Ciel artistique", + "render.studio_sky_help": "Dégradé de ciel original pour l'éclairage ; ce n'est pas un modèle atmosphérique calibré.", + "render.studio_sun": "Soleil", + "render.studio_sun_radius": "Rayon angulaire", + "render.studio_title": "Studio de rendu", + "render.studio_tone_map": "Mappage des tons", + "render.subsurface_enable": "Marche aléatoire de diffusion intérieure", + "render.subsurface_help": "Diélectrique fermé uniquement. La diffusion et l'absorption RVB sont des coefficients distincts par mm. Les chemins diffusent à l'intérieur de la géométrie réelle, puis se réfractent ou se réfléchissent à la limite. Désactivez la transmission des ombres directes, le débruitage de surface et le volume extérieur ; utilisez une seule strate de Fresnel. Ce n'est ni un shader de diffusion, ni une grille de densité, ni un matériau mesuré. Les milieux denses peuvent nécessiter plus d'échantillons et une plus grande profondeur de chemin.", + "render.subsurface_rate": "Taux de collision de diffusion", + "render.transmission_scope": "Le verre GPU prend en charge des milieux disjoints certifiés. Les milieux imbriqués sans restriction et un estimateur de transmission sans bruit ne sont pas fournis.", + "render.transmission_strata": "Strates de Fresnel conditionnelles", + "render.transmission_strata_help": "1 conserve le flux d'origine. 2 ou 4 sous-chemins stratifient le premier choix de réflexion/transmission dans le verre, avec les lois de Snell et d'absorption inchangées. Plus de chemins coûtent plus de travail ; ce n'est ni du débruitage, ni une prise en charge des milieux imbriqués, ni la promesse d'un rendu plus rapide.", "render.unavailable_preview": "Ce préréglage demande un profil d'aperçu indisponible.", "render.unsaved": "Modifications de l'aperçu non enregistrées", "render.use_preview": "Utiliser l'aperçu intégré", + "render.volume_albedo": "Albédo de diffusion · RVB linéaire", + "render.volume_anisotropy": "Cosinus moyen de phase", + "render.volume_enable": "Activer le milieu participant", + "render.volume_extinction": "Coefficient d'extinction", + "render.volume_help": "Transport GPU à l'intérieur d'une boîte finie, avec atténuation de Beer et diffusion HG sur les chemins de caméra et indirects. Utilise l'éclairage studio/HDR/ciel explicite, y compris l'atténuation des ombres. Un cosinus de phase positif diffuse vers l'avant. Les limites de verre et le débruitage de surface doivent être désactivés explicitement. Une extinction nulle laisse le transport inchangé. Ce n'est ni une atmosphère lunaire physique, ni une grille de densité, ni une émission volumique, ni un transport spectral, ni une propriété de matériau certifiée.", + "render.volume_max": "Limites maximales · mm monde", + "render.volume_min": "Limites minimales · mm monde", + "render.volume_title": "Volume homogène borné", "sample.bracket.about": "Tôle de base avec bords tombés et un ourlet, selon une règle de 2 mm", "sample.bracket.name": "Équerre en tôle", "sample.enclosure.about": "Boîte en coque avec lèvre, bossages de vis, appui et clip", @@ -1085,7 +2132,10 @@ "search.suggest": "Vouliez-vous dire {label} ?", "search.try": "Saisissez un nom de commande, une entité de cette conception ou un paramètre. Pour exécuter une commande avec des valeurs, saisissez son id et un objet JSON : {example}", "search.valid": "Valide", + "section.off_hint": "Aucun plan choisi : OK désactive la coupe.", + "set by the sketch's lines": "défini par les lignes de l'esquisse", "settings.display_quality_note": "Les niveaux plus fins affichent plus lisses les faces et arêtes courbes, mais leur maillage prend plus de temps. Seule la vue change, jamais la conception ni les exports.", + "settings.frame_rate_details_note": "Ajoute un graphe des temps des dernières images avec les triangles dessinés superposés, un histogramme des temps d'image et ce que le GPU a dessiné. Cliquez sur la fréquence d'images dans la vue pour les afficher ou les masquer.", "settings.frame_rate_note": "Affiche les images par seconde dans le coin inférieur droit de la vue.", "settings.measure_axis_distances": "Afficher les cotes X/Y/Z", "settings.measure_axis_distances_help": "Afficher les cotes suivant les axes du repère global en plus de la distance totale pendant la mesure.", @@ -1097,6 +2147,10 @@ "settings.reset_intro": "Ces réglages ne fonctionnent pas sur cet ordinateur et empêcheraient SolidCraft de démarrer ; ils ont donc été modifiés :", "settings.reset_title": "Des réglages ont été modifiés", "settings.supersampling_note": "Dessine la vue à une résolution plus élevée puis la réduit : arêtes, lignes et grille plus lisses sur les écrans de définition inférieure à la 4K. Cela coûte du temps GPU : environ 2,25× plus de pixels à 1,5× et 4× plus à 2×.", + "settings.window_system_details": "Détails", + "settings.window_system_note_now": "S'applique après un redémarrage. Actuellement : {now}.", + "settings.window_system_wayland_limited": "Certaines fonctionnalités sont limitées sous Wayland natif.", + "sheet.no_body": "il n'y a pas de corps de tôlerie : commencez-en un avec Bord tombé > Base, ou transformez une plaque en tôlerie avec Convertir en tôlerie (choisissez sa grande face plane)", "shortcut.json_error": "les paramètres doivent être au format JSON : {error}", "shortcut.no_command": "la commande `{id}` n’existe pas ; le texte avant le JSON doit être un ID de commande", "shortcut.pin": "Épingler en haut de la boîte S", @@ -1112,6 +2166,11 @@ "sketch_panel.author": "Placement d’origine : {path}", "sketch_panel.dimension_hint": "Saisissez une valeur ou une expression, puis appuyez sur OK.", "sketch_panel.move_hint": "Saisissez les distances et un angle, puis appuyez sur OK.", + "sketch_panel.plane_angle": "{plane}, tourné de {angle}", + "sketch_panel.plane_fixed": "Un plan fixe", + "sketch_panel.plane_flipped": "{plane}, vu de l'autre côté", + "sketch_panel.plane_offset": "{plane}, décalé de {distance}", + "sketch_panel.plane_origin": "Le plan {plane}", "sketch_panel.redefine_title": "{command} : {name}", "sketch_panel.sheet_attachment": "Attaché à une face plane d’un corps de tôlerie ; suit ce panneau lorsque la tôle change.", "sketch_panel.text_hint": "Modifiez le texte et son placement, puis appuyez sur OK.", @@ -1133,6 +2192,10 @@ "thread.designation": "Désignation", "thread.iso_metric": "Métrique ISO", "thread.select_size": "Sélectionner la taille", + "timeline.delete_after_marker_one": "Supprimer 1 fonction après le marqueur d'historique", + "timeline.delete_after_marker_other": "Supprimer {count} fonctions après le marqueur d'historique", + "timeline.delete_many": "Supprimer {count} fonctions sélectionnées", + "timeline.feature_hint": "Double-clic pour modifier · glisser pour réordonner · clic droit pour plus", "timeline.group": "Nouveau dossier de fonctions", "timeline.move_many": "Déplacer des éléments de la chronologie", "timeline.move_to_group": "Déplacer les fonctions vers le dossier", @@ -1144,6 +2207,10 @@ "toolbar.customize_note": "Onglet {tab}. Cochez une commande pour lui attribuer un bouton dans la barre d’outils. Vous pouvez aussi faire glisser une ligne du menu déroulant d’un panneau vers la barre d’outils, retirer un bouton en le faisant glisser hors de la barre ou utiliser l’épingle d’une ligne du menu déroulant.", "toolbar.image": "IMAGE", "toolbar.render": "RENDU", + "toolbar.render_appearance": "APPARENCE", + "toolbar.render_camera": "CAMÉRA", + "toolbar.render_environment": "ENVIRONNEMENT", + "toolbar.render_lighting": "ÉCLAIRAGE", "toolbar.render_scene": "SCÈNE", "trace.points": "{count} points le long de la trajectoire", "trace.stopped_by_contact": "Se termine à l'échantillon {sample} : {a} traverserait {b}", @@ -1262,6 +2329,8 @@ "ui.agent_chat_allowed": "Autorisé", "ui.agent_chat_answered": "Réponse : {option}", "ui.agent_chat_approval": "Autoriser l'agent à effectuer cette action ?", + "ui.agent_chat_attach_selection": "Joindre la sélection", + "ui.agent_chat_attach_selection_tip": "Envoyer ce qui est sélectionné dans le modèle (faces, arêtes, fonctions, corps) avec le message, pour que l'agent sache de quoi vous parlez", "ui.agent_chat_attach_view": "Joindre la vue", "ui.agent_chat_attach_view_tip": "Envoyer une image de la vue actuelle avec le message", "ui.agent_chat_attachable": "Images, PDF, textes et fichiers de CAO", @@ -1274,11 +2343,18 @@ "ui.agent_chat_auth_title": "Authentification auprès de l'agent", "ui.agent_chat_cancel": "Annuler", "ui.agent_chat_changes": "Modifications : {n}, en une seule étape d'annulation", + "ui.agent_chat_changes_n": "Modifications : {n}", "ui.agent_chat_changes_of": "{n}/{limit} modifications", + "ui.agent_chat_choose_model": "Choisir un modèle", "ui.agent_chat_close": "Fermer", "ui.agent_chat_command": "Commande de l'agent", "ui.agent_chat_connect": "Connecter", "ui.agent_chat_copy": "Copier", + "ui.agent_chat_ctx_bodies": "Corps", + "ui.agent_chat_ctx_elements": "Éléments", + "ui.agent_chat_ctx_features": "Fonctions", + "ui.agent_chat_ctx_more": "+{n} de plus", + "ui.agent_chat_ctx_other": "Autre", "ui.agent_chat_custom_hint": "Tout programme qui parle l'Agent Client Protocol sur stdin et stdout. Aucun shell ne le lance.", "ui.agent_chat_denied": "Refusé", "ui.agent_chat_deny": "Refuser", @@ -1320,6 +2396,7 @@ "ui.agent_chat_mode_all": "Tout", "ui.agent_chat_mode_ask": "Demander", "ui.agent_chat_mode_edits": "Édition", + "ui.agent_chat_model_no_tools": "{model} ne peut pas utiliser les outils de SolidCraft : il peut seulement discuter. Choisissez un modèle qui prend en charge les outils.", "ui.agent_chat_model_tip": "Le modèle utilisé par l'agent. Votre choix est mémorisé pour cet agent.", "ui.agent_chat_new": "Nouveau chat", "ui.agent_chat_new_confirm": "Démarrer un nouveau chat ? Le chat actuel sera effacé.", @@ -1328,6 +2405,7 @@ "ui.agent_chat_no_control": "Le point d'accès du chat de l'agent n'a pas démarré : l'agent ne peut donc pas accéder à la conception.", "ui.agent_chat_no_images": "Cet agent n'accepte pas les images", "ui.agent_chat_no_picture": "Il n'y a pas d'image dans le presse-papiers", + "ui.agent_chat_no_tool_call": "Le modèle n'a pas utilisé les outils de SolidCraft : la conception n'a donc pas été modifiée. Choisissez un modèle qui prend en charge l'appel d'outils ; voir Modèles locaux dans le guide du chat avec l'agent.", "ui.agent_chat_none_found": "Aucun agent de programmation trouvé. En installer un parmi ceux-ci, puis appuyer sur Actualiser :", "ui.agent_chat_none_found_short": "Aucun agent trouvé", "ui.agent_chat_not_installed": "Non installé", @@ -1337,12 +2415,17 @@ "ui.agent_chat_paste_picture": "Coller une image", "ui.agent_chat_permission": "L'agent demande à exécuter : {title}", "ui.agent_chat_pick": "Agent", + "ui.agent_chat_pick_context": "Choisir le contexte", + "ui.agent_chat_pick_context_tip": "Choisissez des faces, arêtes, fonctions et corps du modèle à montrer à l'agent, puis appuyez sur OK", "ui.agent_chat_placeholder": "Demander à l'agent de modifier la conception…", "ui.agent_chat_placeholder_busy": "Mettre un message en file d'attente pour quand l'agent aura terminé (Ctrl+Enter : envoyer maintenant)", "ui.agent_chat_pop_out": "Ouvrir dans une fenêtre séparée, déplaçable vers un autre écran", "ui.agent_chat_previous_picture": "Image précédente", "ui.agent_chat_privacy": "Rien n'est envoyé ailleurs qu'à l'agent que vous lancez, sous votre propre compte.", "ui.agent_chat_privacy_note": "Le chat n'envoie rien nulle part de lui-même : l'agent que vous lancez dialogue avec son propre service, sous votre propre compte. SolidCraft ne voit ni ne stocke jamais de clé ni de mot de passe.", + "ui.agent_chat_provider_models": "{count} modèles", + "ui.agent_chat_provider_other": "Autre", + "ui.agent_chat_provider_tip": "Le fournisseur dont la liste suivante affiche les modèles.", "ui.agent_chat_queue": "Mettre en file", "ui.agent_chat_queue_full": "Trop de messages sont en attente : retirez-en un ou attendez l'agent.", "ui.agent_chat_queued": "En file d'attente", @@ -1371,6 +2454,7 @@ "ui.agent_chat_stop_tip": "Arrêter l'agent et tout ce qu'il a lancé", "ui.agent_chat_stop_turn_tip": "Arrêter l'agent (Esc). Les messages en file d'attente y restent.", "ui.agent_chat_turn_limit": "Modifications par message", + "ui.agent_chat_turn_unlimited": "Illimité", "ui.agent_chat_undo_changes": "Annuler ces modifications", "ui.agent_chat_undo_label": "Chat de l'agent : {message}", "ui.agent_chat_undone": "(annulé)", @@ -1378,11 +2462,15 @@ "ui.agent_chat_waiting": "En attente de votre réponse", "ui.agent_cursor": "Curseur de l'agent", "ui.agent_cursor_speed": "Vitesse du curseur de l'agent", + "ui.agent_off_thread": "Garder la fenêtre réactive pendant que les agents exécutent des commandes", + "ui.agent_off_thread_note": "Les commandes lentes d'un agent (depuis le panneau IA ou un client MCP) sont calculées à côté de la fenêtre : vous pouvez continuer à tourner et inspecter la vue, et en arrêter une depuis la pastille dans la vue. Désactivé : chacune s'exécute sur le thread de la fenêtre, qui l'attend.", "ui.ai_add": "Ajouter", "ui.ai_add_agent": "Ajouter un agent…", "ui.ai_add_agent_title": "Ajouter un agent", + "ui.ai_add_anthropic": "API compatible Anthropic", "ui.ai_add_api": "API compatible OpenAI", "ui.ai_add_custom": "Commande personnalisée", + "ui.ai_add_endpoint": "Point d'accès de l'API", "ui.ai_add_installed": "Agent installé", "ui.ai_add_installed_note": "Une entrée à vous pour un agent installé, par exemple avec d'autres arguments. Les agents installés sont listés automatiquement.", "ui.ai_added": "ajouté", @@ -1412,6 +2500,7 @@ "ui.ai_key_needs_https": "Une clé n'est envoyée qu'en HTTPS, ou vers cet ordinateur.", "ui.ai_key_note": "Stockée dans le trousseau de clés du système, jamais dans les réglages de SolidCraft. Laisser vide pour un serveur local.", "ui.ai_keychain_error": "Le trousseau de clés du système a refusé : {error}", + "ui.ai_kind": "Type", "ui.ai_mode_all": "Tout autoriser", "ui.ai_mode_all_note": "Rien ne demande d'abord. Les rapports de plantage restent inaccessibles et les limites de dossiers s'appliquent toujours.", "ui.ai_mode_all_warning": "L'agent peut enregistrer, écraser, exporter et remplacer votre conception sans demander. N'utilisez ceci qu'avec un agent de confiance, sur des conceptions que vous avez enregistrées.", @@ -1433,7 +2522,11 @@ "ui.ai_panel": "Panneau", "ui.ai_permissions": "Autorisations", "ui.ai_preset": "Préréglage", + "ui.ai_protocol": "Protocole", "ui.ai_remove": "Retirer", + "ui.ai_request_timed_out": "Le modèle a mis plus de {seconds} s. Vous pouvez augmenter le délai d'expiration des requêtes de ce point d'accès dans Préférences › Assistant.", + "ui.ai_request_timeout": "Délai d'expiration des requêtes", + "ui.ai_request_timeout_hint": "Durée maximale d'une requête au modèle de ce point d'accès, de 30 s à une heure. Augmentez-la pour un modèle local lent.", "ui.ai_reset": "Réinitialiser", "ui.ai_settings": "Réglages IA…", "ui.ai_show_features": "Afficher les fonctionnalités IA", @@ -1442,6 +2535,8 @@ "ui.ai_test": "Tester", "ui.ai_test_acp_ok": "Répond : {agent}", "ui.ai_test_acp_tip": "Lance brièvement l'agent, lui demande une session, puis l'arrête", + "ui.ai_test_answered": "Joint : {model} a répondu", + "ui.ai_test_anthropic_tip": "Envoie un court message au point d'accès", "ui.ai_test_api_tip": "Demande ses modèles au point d'accès", "ui.ai_test_no_model": "Atteint : {count} modèle(s), mais pas {model}", "ui.ai_test_ok": "Atteint : {count} modèle(s)", @@ -1540,6 +2635,8 @@ "ui.copy": "Copier", "ui.corner": "Angle", "ui.corners": "Angles", + "ui.cosmetic_thread_markings": "Marquages de filetage cosmétiques", + "ui.cosmetic_thread_markings_help": "Afficher des marquages schématiques sur les parois cylindriques filetées. Ne modifie que l'affichage, jamais la conception ni les exports.", "ui.counterbore": "Lamage", "ui.countersink": "Fraisure", "ui.create": "Créer", @@ -1606,7 +2703,12 @@ "ui.export_keymap_tip": "Raccourcis, favoris de la boîte S et barre d'outils, dans un fichier", "ui.extend": "Prolonger", "ui.extent_type": "Type de limite", + "ui.extract_component": "Extraire dans un fichier…", + "ui.extract_design_changed": "La conception a changé pendant le choix du fichier. Relancez Extraire dans un fichier.", + "ui.extract_done": "Le composant est maintenant une conception à part entière, liée ici.", "ui.extrude": "Extrusion", + "ui.extrude_auto_to_object": "Extruder jusqu'à une cible choisie", + "ui.extrude_auto_to_object_tip": "Dans Extrusion, avec un profil choisi, choisir une face, un sommet ou un plan parallèle hors de son plan fait passer la limite à Jusqu'à l'objet", "ui.factor": "Facteur", "ui.feature_history": "Historique des fonctions", "ui.feature_options": "Options de la fonction", @@ -1625,6 +2727,7 @@ "ui.flip": "Inverser", "ui.format": "Format", "ui.frame_rate": "Fréquence d'images", + "ui.frame_rate_details": "Détails de la fréquence d'images", "ui.front": "Avant", "ui.fully_constrained": "Entièrement contrainte", "ui.function": "Fonction", @@ -1715,17 +2818,27 @@ "ui.hideOrigin": "Masquer l'origine", "ui.hidePlanes": "Masquer les plans", "ui.hideProfile": "Masquer le profil", + "ui.hide_origin_by_default": "Masquer l'origine par défaut", + "ui.hide_origin_note": "Les nouvelles conceptions démarrent avec le dossier Origine masqué. Une conception garde son propre réglage d'Origine dès que vous l'affichez ou la masquez.", "ui.history_back": "Reculer d’une étape", "ui.history_below_browser": "Sous le navigateur", + "ui.history_edge_hint": "double-cliquer sur le bord", "ui.history_first": "Aller au début", "ui.history_forward": "Avancer d’une étape", + "ui.history_hide_names": "Masquer les noms", "ui.history_last": "Aller à la fin", + "ui.history_marker_tip": "Marqueur d'historique : faire glisser pour ramener le modèle en arrière ; les nouvelles fonctions s'insèrent ici", + "ui.history_names": "Noms", + "ui.history_play": "Lire jusqu'à la fin", + "ui.history_show_names": "Afficher les noms", "ui.history_title": "Historique", + "ui.history_toggle_names": "Afficher ou masquer les noms des fonctions", "ui.hole": "Perçage", "ui.hole_tap_type": "Type de taraudage", "ui.hole_type": "Type de perçage", "ui.home": "Accueil", "ui.homeView": "Vue d'accueil", + "ui.horizontal_constraint": "Contrainte horizontale", "ui.horizontal_vertical": "Horizontale/Verticale", "ui.import_ellipsis": "Importer…", "ui.infinite": "Infinie", @@ -1742,6 +2855,10 @@ "ui.length_decimals": "Décimales des longueurs", "ui.light": "Clair", "ui.line": "Ligne", + "ui.link_copies": "Lier les copies identiques", + "ui.link_copies_keep": "Conserver", + "ui.link_copies_link": "Lier", + "ui.link_copies_text": "Ces composants construisent les mêmes corps que {name}. En faire des placements de son lien ?", "ui.lock": "Verrouiller", "ui.loft": "Lissage", "ui.look_at": "Vue normale", @@ -1798,6 +2915,7 @@ "ui.one_side": "Un côté", "ui.open": "Ouvrir", "ui.open_ends_tip": "Ne touche rien", + "ui.open_linked_design": "Ouvrir la conception liée", "ui.open_preferences": "Ouvrir les préférences", "ui.open_recent": "Ouvrir un fichier récent", "ui.operation": "Opération", @@ -1817,6 +2935,11 @@ "ui.paste": "Coller", "ui.path": "Trajectoire", "ui.pattern_on_path": "Répétition sur trajectoire", + "ui.perforate_margin_default": "depuis le diamètre", + "ui.perforate_pitch": "Pas", + "ui.perforate_square": "Carré", + "ui.perforate_staggered": "En quinconce (60°)", + "ui.perforate_title": "PERFORER", "ui.perpendicular": "Perpendicularité", "ui.perspective_view": "Vue en perspective", "ui.pinToShortcuts": "Épingler aux raccourcis", @@ -1828,7 +2951,9 @@ "ui.plugins": "Modules externes", "ui.plugins_desktop": "Les modules externes sont disponibles dans l’application de bureau.", "ui.plugins_empty": "Aucun module externe installé.", + "ui.plugins_none": "Aucun module externe ne correspond à cette recherche.", "ui.plugins_note": "Chaque module est un dossier dans {path} contenant un fichier plugin.json. SolidCraft lit ce fichier et n’exécute aucun code du dossier. Désactiver un module le laisse installé.", + "ui.plugins_search": "Rechercher des modules externes", "ui.plugins_skipped": "{count} dossier(s) illisible(s).", "ui.plugins_version": "{version}", "ui.point": "Point", @@ -1856,6 +2981,9 @@ "ui.rectangle": "Rectangle", "ui.rectangular_pattern": "Répétition rectangulaire", "ui.redo": "Rétablir", + "ui.reference_1": "Référence 1", + "ui.reference_2": "Référence 2", + "ui.reference_distance": "Distance de référence", "ui.relink_design_changed": "L’assemblage a changé pendant le choix d’une source. Relancez Relier à nouveau la source.", "ui.relink_done": "Source reliée à nouveau pour toutes les instances.", "ui.relink_not_linked": "Ce composant n’est lié à aucune conception source.", @@ -1866,6 +2994,7 @@ "ui.render": "Rendu", "ui.renderer": "Moteur de rendu", "ui.repeat": "Répéter", + "ui.replace_with_link_done": "Les copies sont maintenant des placements de la conception liée.", "ui.report_a_bug": "Signaler un bug", "ui.reset": "Réinitialiser", "ui.reset_all": "Tout réinitialiser", @@ -1901,6 +3030,14 @@ "ui.sent_to_slicer": "Envoyé à {slicer}", "ui.sheet_gap": "Jeu", "ui.shell": "Coque", + "ui.shortcut_capture_add_key": "Ajoutez une touche ordinaire. Échap annule.", + "ui.shortcut_capture_hint": "Cliquez sur un raccourci, puis appuyez sur les modificateurs et une touche. Ajoutez les modificateurs en moins d'une seconde ; relâchez toutes les touches pour confirmer. Échap annule.", + "ui.shortcut_capture_press": "Appuyez sur les modificateurs et une touche. Échap annule.", + "ui.shortcut_capture_release": "Relâchez toutes les touches pour confirmer. Échap annule.", + "ui.shortcut_capture_settling": "Confirmation du raccourci… Échap annule.", + "ui.shortcut_cycles_modes": "Appuyer à nouveau sur le raccourci d'un outil change son mode", + "ui.shortcut_cycles_modes_tip": "Avant le premier point, appuyer à nouveau sur le raccourci d'un outil d'esquisse passe en revue ses modes de création. Désactivé : l'outil redémarre.", + "ui.shortcut_multiple_keys": "Utilisez des modificateurs et une seule autre touche. Cliquez sur le raccourci pour réessayer.", "ui.show": "Afficher", "ui.showAll": "Tout afficher", "ui.showAllBodies": "Afficher tous les corps", @@ -1940,6 +3077,8 @@ "ui.start": "Début", "ui.start_over": "Recommencer", "ui.start_page": "Page d’accueil", + "ui.step_values": "Incrémenter les valeurs avec les flèches et la molette", + "ui.step_values_tip": "Dans un champ de valeur en cours de saisie, Haut/Bas modifient un nombre simple de 1 (Maj : 10, Alt : 0,1), de même que la molette de la souris au-dessus du champ. Les expressions restent telles que saisies.", "ui.stretch": "Étirer", "ui.supersampling": "Suréchantillonnage (SSAA)", "ui.supersampling_adaptive": "Seulement quand la vue est immobile", @@ -1974,6 +3113,7 @@ "ui.total_angle": "Angle total", "ui.trackpad_pan_tip": "Les gestes du pavé tactile font un panoramique (désactivé : ils zooment comme la molette) ; la molette zoome, la molette latérale fait un panoramique horizontal, le pincement zoome toujours", "ui.trim": "Ajuster", + "ui.turn_up_axis": "Changer l'axe vertical", "ui.twist": "Torsion", "ui.two_finger_scroll_pans": "Défilement à deux doigts pour le panoramique", "ui.two_sides": "Deux côtés", @@ -1990,11 +3130,17 @@ "ui.up_axis_note": "Axe orienté vers le haut dans les vues (vue d'axe, Accueil, Vue normale). Les conceptions ne sont pas modifiées.", "ui.updateToCurrentView": "Mettre à jour avec la vue actuelle", "ui.upload": "Envoyer", + "ui.vertical_constraint": "Contrainte verticale", "ui.view_centre": "Centre de la vue", + "ui.viewport_theme_follow": "Suivre le thème", "ui.visual_shaded_hidden_edges": "Ombré avec arêtes cachées", "ui.visual_shaded_with_edges": "Ombré avec arêtes", "ui.visual_style": "Style visuel", "ui.visual_wireframe": "Filaire", + "ui.window_system": "Système de fenêtrage", + "ui.window_system_auto": "Automatique", + "ui.window_system_wayland": "Wayland", + "ui.window_system_x11": "X11", "ui.workspace": "espace de travail", "ui.workspace_animation_description": "Vues éclatées, études de mouvement et storyboards", "ui.workspace_available": "Disponible", @@ -2040,6 +3186,7 @@ "update.prefs_flatpak": "Flatpak met à jour cette copie ({version}) : exécutez {command} ou utilisez votre logithèque. SolidCraft ne vérifie pas.", "update.prefs_label": "Mises à jour", "update.prefs_note": "Ceci est SolidCraft {version} ({kind}). Une vérification interroge GitHub sur la dernière version et n'envoie rien d'autre.", + "update.prefs_web": "Rechargez la page pour obtenir la dernière version de l'application web. Si le réseau est indisponible ou si la mise à jour ne peut pas finir de se télécharger à temps, la version enregistrée s'ouvre à la place ; un téléchargement en cours se poursuit pour le prochain rechargement.", "update.release_page": "Ouvrir la page de la version", "update.restart": "Redémarrer maintenant", "update.restart_later": "Plus tard", @@ -2050,5 +3197,11 @@ "update.up_to_date": "SolidCraft est à jour.", "update.update_now": "Mettre à jour maintenant", "update.you_have": "Vous avez la version {version}.", - "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ choisir · Entrée / Tab compléter · Échap fermer" + "web.files.insert_drawings_hint": "Fichiers CAO, maillages, DXF ou SVG dans la conception ouverte", + "web.files.insert_stored_drawings_hint": "Dans la conception ouverte (fichiers CAO, maillages, DXF, SVG)", + "web.open_full": "Ouvrir dans SolidCraft", + "web.open_link": "Ouvrir la conception liée ?", + "web.open_link_confirm": "Il y a des modifications non enregistrées. Ouvrir la conception liée dans un nouvel onglet ?", + "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ choisir · Entrée / Tab compléter · Échap fermer", + "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ choisir · Entrée applique la saisie · Échap fermer" } diff --git a/assets/locales/pending/fr-catalog-completion.json b/assets/locales/pending/fr-catalog-completion.json deleted file mode 100644 index 6df68b047..000000000 --- a/assets/locales/pending/fr-catalog-completion.json +++ /dev/null @@ -1,1157 +0,0 @@ -{ - "fr": { - "A Single hole snaps to the middle of its face and to the centres of its round edges": "Un perçage simple s'accroche au milieu de sa face et aux centres de ses arêtes circulaires", - "A placed Single hole has a handle to drag it, and picking its face again moves the hole there instead of taking it out": "Un perçage simple placé a une poignée pour le faire glisser ; choisir à nouveau sa face y déplace le perçage au lieu de le retirer", - "A short title for the problem (optional)": "Un titre court pour le problème (facultatif)", - "Add Column": "Ajouter une colonne", - "Add a tool": "Ajouter un outil", - "Add bend": "Ajouter un pli", - "Add to New Folder": "Ajouter à un nouveau dossier", - "Advanced": "Avancé", - "All Lines": "Toutes les lignes", - "Anchor": "Ancrage", - "Angle Display": "Affichage de l'angle", - "Another bend on the far edge of the last flange": "Un autre pli sur l'arête opposée du dernier bord tombé", - "App/system information and command settings are included. Review private details before sharing.": "Les informations sur l'app et le système ainsi que les réglages de la commande sont inclus. Vérifiez les données privées avant de partager.", - "Apply library appearance": "Appliquer l'apparence de la bibliothèque", - "Bar": "Plat", - "Bend": "Angle de pli", - "Bend Edges": "Arêtes de pli", - "Bodies (optional)": "Corps (facultatif)", - "Body (last if none)": "Corps (le dernier si aucun)", - "Body to split": "Corps à scinder", - "Body, or faces to take out": "Corps, ou faces à retirer", - "Bottom Left": "Bas gauche", - "Bottom Middle": "Bas centre", - "Bottom Right": "Bas droite", - "Catch Depth": "Profondeur de l'ergot", - "Catch Length": "Longueur de l'ergot", - "Centroid": "Centroïde", - "Channel": "Profilé en U", - "Choose Variable radius or Spline in Type.": "Choisissez Rayon variable ou Spline dans Type.", - "Circle center": "Centre du cercle", - "Collapse": "Réduire", - "Command": "Commande", - "Component 1": "Composant 1", - "Component 2": "Composant 2", - "Components": "Composants", - "Continue on GitHub": "Continuer sur GitHub", - "Control Radius": "Rayon de contrôle", - "Copies the definition only. Assign it from Physical Material when ready.": "Copie uniquement la définition. Affectez-la depuis Matériau physique le moment venu.", - "Corner radius": "Rayon d'angle", - "Counterbore Ø": "Ø du lamage", - "Countersink Ø": "Ø de la fraisure", - "Create Hole": "Créer un perçage", - "Create Issue…": "Créer un ticket…", - "Current plane": "Plan actuel", - "Custom": "Personnalisé", - "Customize…": "Personnaliser…", - "Cylindrical face": "Face cylindrique", - "Delete Selected Features…": "Supprimer les fonctions sélectionnées…", - "Delete Selected Folders": "Supprimer les dossiers sélectionnés", - "Describe the problem you saw": "Décrivez le problème constaté", - "Describe what happened before continuing.": "Décrivez ce qui s'est passé avant de continuer.", - "Diameter": "Diamètre", - "Distance": "Distance", - "Distance 1": "Distance 1", - "Drag to move the hole; click to remove it": "Faire glisser pour déplacer le perçage ; cliquer pour le retirer", - "End Radius": "Rayon final", - "Expand": "Développer", - "Expected result (optional)": "Résultat attendu (facultatif)", - "Export Bend Table…": "Exporter la table des plis…", - "Export design library...": "Exporter la bibliothèque de la conception...", - "Exported by SolidWorks, which usually saves Y up": "Exporté par SolidWorks, qui enregistre généralement en Y vers le haut", - "Face Appearance": "Apparence de la face", - "Face center": "Centre de la face", - "Faces to split": "Faces à scinder", - "Filter…": "Filtrer…", - "First plane": "Premier plan", - "Fit and G2 corners require Constant radius.": "L'ajustement et les angles G2 nécessitent un rayon constant.", - "Fixed Face": "Face fixe", - "Flange thickness": "Épaisseur d'aile", - "Flanges": "Bords tombés", - "From": "De", - "Full thread depth": "Profondeur de filetage complète", - "Further Bends": "Plis supplémentaires", - "G2 corners require a constant radius and Exact fit. G2 corner construction is not supported yet.": "Les angles G2 nécessitent un rayon constant et un ajustement exact. La construction d'angles G2 n'est pas encore prise en charge.", - "Halo under sketch curves": "Halo sous les courbes d'esquisse", - "Height From": "Hauteur depuis", - "History names": "Noms dans l'historique", - "Hole (optional)": "Perçage (facultatif)", - "I-Beam": "Poutre en I", - "Import material into design": "Importer le matériau dans la conception", - "Included": "Angle inclus", - "Inner Sharp": "Arête vive intérieure", - "Instant": "Instantané", - "Interface font": "Police de l'interface", - "Invert": "Inverser", - "Items": "Éléments", - "Key a joint's value at this step": "Placer une image clé de la valeur d'une liaison à cette étape", - "Keys": "Images clés", - "L-Angle": "Cornière", - "Left Middle": "Milieu gauche", - "Limits": "Limites", - "Line Type": "Type de ligne", - "Lines": "Lignes", - "Listing the installed fonts…": "Liste des polices installées…", - "Load library": "Charger la bibliothèque", - "M5 or M5x0.5": "M5 ou M5x0.5", - "M5, M5x0.5, 1/4-20 UNC": "M5, M5x0.5, 1/4-20 UNC", - "Material Outside": "Matière à l'extérieur", - "Material copied. Existing body assignments are unchanged.": "Matériau copié. Les affectations existantes des corps sont inchangées.", - "Maximum": "Maximum", - "Mesh body": "Corps maillé", - "Minimum": "Minimum", - "Mirror Plane": "Plan de symétrie", - "Mouse gestures": "Gestes de la souris", - "Mouse gestures only work with the SolidWorks mouse mode (the wheel orbits, Ctrl + wheel pans).": "Les gestes de la souris ne fonctionnent qu'avec le mode souris SolidWorks (la molette fait orbiter, Ctrl + molette fait un panoramique).", - "Move holes by clicking or dragging": "Déplacer les perçages en cliquant ou en faisant glisser", - "Name on import": "Nom à l'importation", - "No matching physical materials.": "Aucun matériau physique correspondant.", - "Nominal diameter": "Diamètre nominal", - "Not saved yet": "Pas encore enregistré", - "Of": "Degré de liberté", - "On your computer": "Sur votre ordinateur", - "Open bodies (no volume)": "Corps ouverts (sans volume)", - "Open library...": "Ouvrir une bibliothèque...", - "Open surface — no volume": "Surface ouverte — sans volume", - "Opens your browser and copies the report text for you to paste into GitHub.": "Ouvre votre navigateur et copie le texte du rapport pour que vous le colliez dans GitHub.", - "Opens your browser. Review and submit your report on GitHub.": "Ouvre votre navigateur. Vérifiez et soumettez votre rapport sur GitHub.", - "Orbit (right drag)": "Orbite (glisser avec le bouton droit)", - "Other way": "Sens opposé", - "Outer Sharp": "Arête vive extérieure", - "Outer radius": "Rayon extérieur", - "Physical material definitions": "Définitions de matériaux physiques", - "Pitch": "Pas", - "Pivot": "Pivot", - "Play the joint's motion in the view": "Lire le mouvement de la liaison dans la vue", - "Preview": "Aperçu", - "Profile / Edges": "Profil / Arêtes", - "Profiles or curves": "Profils ou courbes", - "Radius": "Rayon", - "Rectangular Tube": "Tube rectangulaire", - "Remove condition": "Supprimer la condition", - "Remove from Folder": "Retirer du dossier", - "Remove this bend": "Supprimer ce pli", - "Rename Feature": "Renommer la fonction", - "Rename Folder": "Renommer le dossier", - "Replace existing library file": "Remplacer le fichier de bibliothèque existant", - "Report text copied. Paste it into GitHub and submit your report there.": "Texte du rapport copié. Collez-le dans GitHub et soumettez-y votre rapport.", - "Reports are public. A GitHub account is required.": "Les rapports sont publics. Un compte GitHub est nécessaire.", - "Restore this studio's tools": "Restaurer les outils de ce studio", - "Review your report on GitHub and click Submit new issue to publish it.": "Vérifiez votre rapport sur GitHub et cliquez sur Submit new issue pour le publier.", - "Rib Length": "Longueur de nervure", - "Rib Offset": "Décalage de nervure", - "Rib Thickness": "Épaisseur de nervure", - "Ribs": "Nervures", - "Right Middle": "Milieu droite", - "Ring of tools on the right button": "Anneau d'outils sur le bouton droit", - "Roll Back Here": "Revenir ici dans l'historique", - "Root radius": "Rayon de raccordement", - "Round Bar": "Rond plein", - "Round Tube": "Tube rond", - "Same way": "Même sens", - "Save screenshot…": "Enregistrer la capture d'écran…", - "Screenshot (optional)": "Capture d'écran (facultative)", - "Second plane": "Second plan", - "Section (optional)": "Section (facultative)", - "Sections (one sketch each)": "Sections (une esquisse chacune)", - "Select Other": "Sélectionner un autre", - "Select edges": "Sélectionner des arêtes", - "Shaded": "Ombré", - "Show ghost": "Afficher le fantôme", - "Snap to face and edge centres": "Accrocher aux centres des faces et des arêtes", - "Splitting tool": "Outil de scission", - "Steps to reproduce (optional)": "Étapes pour reproduire le problème (facultatives)", - "Studio": "Studio", - "Summary": "Résumé", - "Suppress": "Désactiver", - "Surface, or faces to turn over": "Surface, ou faces à retourner", - "Tangent": "Tangence", - "Tangent chain": "Chaîne tangente", - "Tangent to Edge": "Tangent à l'arête", - "Tap drill diameter": "Diamètre de l'avant-trou", - "Target": "Cible", - "Target Body": "Corps cible", - "Technical details": "Détails techniques", - "This image is not attached to GitHub yet. Copy or save it, then attach it on GitHub.": "Cette image n'est pas encore jointe sur GitHub. Copiez-la ou enregistrez-la, puis joignez-la sur GitHub.", - "Thread depth": "Profondeur de filetage", - "Thread diameter": "Diamètre de filetage", - "To": "À", - "Toe radius": "Rayon d'extrémité", - "Tool Bodies": "Corps outils", - "Tools": "Outils", - "Tools, clockwise from the top": "Outils, dans le sens horaire à partir du haut", - "Top Left": "Haut gauche", - "Top Middle": "Haut centre", - "Top Right": "Haut droite", - "Unsuppress": "Réactiver", - "Use the SolidWorks mouse mode": "Utiliser le mode souris SolidWorks", - "Variable Radius": "Rayon variable", - "Web thickness": "Épaisseur d'âme", - "What did you do just before the problem? A short list is enough": "Qu'avez-vous fait juste avant le problème ? Une courte liste suffit", - "What did you expect to see?": "Qu'attendiez-vous ?", - "What happened?": "Que s'est-il passé ?", - "With gestures on, the right button no longer orbits the view: hold it and move to open the ring, then touch a tool's zone. A plain right-click still opens the menu.": "Avec les gestes activés, le bouton droit ne fait plus orbiter la vue : maintenez-le et déplacez la souris pour ouvrir l'anneau, puis touchez la zone d'un outil. Un simple clic droit ouvre toujours le menu.", - "X": "X", - "X Angle": "Angle X", - "Y": "Y", - "Y Angle": "Angle Y", - "Z": "Z", - "Z Angle": "Angle Z", - "Z Distance": "Distance Z", - "ai.connected_toast": "SolidCraft est maintenant disponible dans {clients}. Redémarrez-les pour l'utiliser (Paramètres > Assistant).", - "ai.prefs.allow_control": "Autoriser la connexion des agents IA (canal de contrôle / MCP)", - "ai.prefs.allow_control_note": "Ouvre un canal de contrôle limité à cet ordinateur (127.0.0.1, port 27878 ou le suivant disponible). Un programme qui se connecte doit aussi présenter un jeton secret lisible uniquement par votre compte utilisateur, régénéré à chaque démarrage. Prend effet au prochain démarrage de SolidCraft. Désactivé : rien n'écoute, sauf si vous lancez SolidCraft avec --control.", - "ai.prefs.availability": "Contrôles de l'assistant", - "ai.prefs.background_commands": "Exécuter les commandes de l'agent en arrière-plan", - "ai.prefs.connect_apps": "Rendre SolidCraft disponible pour les apps d'IA de cet ordinateur", - "ai.prefs.connect_apps_note": "Au démarrage, SolidCraft s'ajoute comme serveur MCP aux apps d'IA trouvées sur cet ordinateur (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), pour qu'un agent puisse l'utiliser sans configuration. Seule l'entrée solidcraft est ajoutée ou son chemin mis à jour ; une entrée que vous avez modifiée n'est pas touchée, et le fichier est d'abord sauvegardé. Désactivé : les entrées ajoutées sont retirées. Aide > Connecter les assistants IA… le fait manuellement.", - "ai.prefs.follow_camera": "Orienter la caméra vers les esquisses", - "ai.prefs.follow_camera_off": "Le suivi automatique de la caméra est désactivé.", - "ai.prefs.follow_camera_on": "La caméra se tourne face aux esquisses créées par l'agent.", - "ai.prefs.intro": "Les agents, leurs autorisations et l'affichage de leur travail.", - "ai.prefs.make_default": "Utiliser par défaut", - "ai.prefs.no_agents": "Aucun agent pour l'instant. Ajoutez un agent ou actualisez pour trouver les agents installés.", - "ai.prefs.no_saved_approvals": "Aucune autorisation enregistrée.", - "ai.prefs.override_all_warning": "Cet agent peut enregistrer, écraser, exporter ou remplacer la conception sans demander.", - "ai.prefs.permission_all": "Tout autoriser", - "ai.prefs.permission_all_summary": "Les outils SolidCraft disponibles s'exécutent sans demander.", - "ai.prefs.permission_ask": "Demander avant les modifications", - "ai.prefs.permission_ask_summary": "Approuver chaque modification de la conception et chaque action sur les fichiers.", - "ai.prefs.permission_edits": "Autoriser les modifications du modèle", - "ai.prefs.permission_edits_summary": "Les modifications du modèle s'exécutent ; les actions sur les fichiers et destructives demandent toujours.", - "ai.prefs.permission_scope": "Pour les outils SolidCraft uniquement. Le shell et les modifications de fichiers de l'agent utilisent ses propres autorisations.", - "ai.prefs.pointer_preview_hidden": "Pointeur masqué", - "ai.prefs.pointer_preview_speed": "Pointeur de l'agent · {speed}", - "ai.prefs.pointer_speed": "Vitesse de déplacement", - "ai.prefs.privacy_note": "Seul l'agent ou le point d'accès que vous avez choisi reçoit la conversation. Les clés des points d'accès sont stockées dans le trousseau du système.", - "ai.prefs.show_pointer": "Afficher le pointeur de l'agent", - "ai.prefs.turn_limit_hint": "Nombre maximal d'appels d'outils modifiant la conception que l'assistant peut faire pour un message.", - "cmd.browser_collapse_all": "Tout réduire", - "cmd.browser_expand_all": "Tout développer", - "cmd.component_copies": "Trouver les copies identiques", - "cmd.component_cycle_color": "Changer la couleur du composant", - "cmd.component_extract": "Extraire dans un fichier", - "cmd.component_replace_with_link": "Remplacer par un lien", - "cmd.inspect_colored_components": "Activer les couleurs des composants", - "cmd.inspect_colored_components_disable": "Désactiver les couleurs des composants", - "cmd.inspect_parameter_sweep": "Balayage de paramètre", - "cmd.motion_trace_edit": "Modifier la trajectoire de mouvement", - "cmd.occurrence_drag": "Faire glisser l'occurrence", - "cmd.render_aging_describe": "Vieillissement de surface en couches", - "cmd.render_camera_fit": "Cadrer le sujet du rendu", - "cmd.render_camera_get": "Inspecter la caméra de rendu", - "cmd.render_effects_describe": "Objectif et effets créatifs", - "cmd.render_hdr_inspect": "Inspecter la source HDR", - "cmd.render_library_appearance_apply": "Appliquer une apparence opaque de la bibliothèque", - "cmd.render_library_describe": "Inspecter une ressource de la bibliothèque de rendu", - "cmd.render_library_environment_apply": "Appliquer un environnement HDR intégré", - "cmd.render_library_list": "Parcourir la bibliothèque de rendu", - "cmd.render_library_physical_prepare": "Préparer une référence physique", - "cmd.render_library_preview": "Inspecter la texture de surface d'origine", - "cmd.render_library_studio_apply": "Appliquer les lumières de studio conçues", - "cmd.render_library_studio_prepare": "Préparer les lumières de studio conçues", - "cmd.render_library_surface_bind": "Enregistrer l'association de surface", - "cmd.render_library_surface_prepare": "Préparer les textures de surface conçues", - "cmd.render_library_surface_unbind": "Supprimer l'association de surface", - "cmd.render_library_targets": "Trouver les cibles de la bibliothèque de rendu", - "cmd.render_optics_bind": "Enregistrer l'association optique", - "cmd.render_optics_unbind": "Supprimer l'association optique", - "cmd.render_preset_apply": "Appliquer le studio natif", - "cmd.render_preset_resolve": "Examiner le studio natif", - "cmd.render_quality_prepare": "Examiner le budget d'échantillonnage fixe", - "cmd.render_result_pin": "Conserver le rendu affiché", - "cmd.render_result_regrade": "Réétalonner le master linéaire", - "cmd.render_settings_capture_hdr": "Enregistrer les réglages de rendu avec HDR", - "cmd.render_shot_duplicate": "Dupliquer la prise de vue", - "cmd.render_shot_remove": "Supprimer la prise de vue", - "cmd.render_shot_rename": "Renommer la prise de vue", - "cmd.render_stage_backdrop": "Enregistrer l'arrière-plan physique du rendu", - "cmd.render_stage_clear": "Supprimer le décor de rendu", - "cmd.render_stage_ground": "Enregistrer le sol du rendu", - "cmd.sheet_path_flange": "Bord tombé sur trajectoire", - "cmd.sketch_cancel": "Annuler l'esquisse", - "cmd.view_back": "Vue arrière", - "cmd.view_bottom": "Vue de dessous", - "cmd.view_front": "Vue de face", - "cmd.view_isometric": "Vue isométrique", - "cmd.view_left": "Vue de gauche", - "cmd.view_normal_to": "Vue normale à la sélection", - "cmd.view_right": "Vue de droite", - "cmd.view_top": "Vue de dessus", - "diagnostic.empty_boolean_component": "il n'y a aucun corps à couper ou à intersecter dans le composant « {component} » ; l'outil chevauche peut-être « {body} » dans le composant « {other} » : activez ce composant ou choisissez ce corps comme cible", - "document.changed_on_disk": "{name} a été modifié sur le disque", - "document.changed_on_disk_detail": "{name} a été modifié par un autre programme ou un autre ordinateur depuis que vous l'avez ouvert ou enregistré. Écraser remplace ces modifications par les vôtres ; Enregistrer une copie conserve les deux.", - "document.copy_name": "{name} (copie)", - "document.open_anyway": "Ouvrir quand même", - "document.open_elsewhere": "{name} est déjà ouvert", - "document.open_elsewhere_detail": "{name} est ouvert dans SolidCraft {app} sur {who} (ouvert {when}). Si vous enregistrez tous les deux, l'un de vous perdra son travail. Ouvrez-le en lecture seule pour le consulter sans l'écraser.", - "document.open_read_only": "Ouvrir en lecture seule", - "document.opened_read_only": "Ouvert en lecture seule : Enregistrer demande un nouveau fichier", - "document.overwrite": "Écraser", - "document.read_only_save": "Cette conception a été ouverte en lecture seule : enregistrez-la dans un nouveau fichier", - "document.save_copy": "Enregistrer une copie…", - "file.open.drawing_filter": "Conceptions, fichiers CAO, maillages et dessins", - "file_load.link_item": "{name} ({done} sur {total})", - "file_load.updating_links": "Mise à jour des liens", - "from the profile": "depuis le profil", - "help.connect_note": "Redémarrez chaque assistant pour charger le serveur SolidCraft. Chaque fichier a été sauvegardé en .bak avant d'être modifié.", - "help.connect_title": "Connecter les assistants IA", - "joint.rigid_group_one_component": "Ces {count} corps sont tous dans un même composant (ou dans la conception elle-même) : utilisez d'abord {command}.", - "joint.rigid_group_select_components": "Sélectionnez au moins deux composants.", - "material.editor.add_property": "Ajouter une propriété", - "material.editor.add_source": "Ajouter une source", - "material.editor.assigned_density": "Masse volumique affectée", - "material.editor.axes": "Axes du matériau", - "material.editor.axes_numeric": "1 / 2 / 3", - "material.editor.axes_wood": "L / R / T", - "material.editor.copy_name": "{name} (copie)", - "material.editor.density_range": "La masse volumique affectée doit être supérieure à 0 et au plus égale à 1000 g/cm³.", - "material.editor.designation": "Désignation", - "material.editor.duplicate": "Dupliquer", - "material.editor.engineering_card": "Fiche de propriétés techniques", - "material.editor.family": "Famille de matériau", - "material.editor.glass": "Verre", - "material.editor.illustrative": "Indicatif", - "material.editor.invalid_property": "Type de propriété non pris en charge.", - "material.editor.isotropic": "Isotrope", - "material.editor.measurement": "Mesure", - "material.editor.metal": "Métal", - "material.editor.moisture": "Humidité, base sèche", - "material.editor.name_required": "Saisissez un nom de 1 à 128 caractères.", - "material.editor.no_draft": "Aucun brouillon de matériau n'est ouvert.", - "material.editor.number_required": "Saisissez une valeur numérique finie.", - "material.editor.orthotropic": "Orthotrope", - "material.editor.other": "Autre", - "material.editor.polymer": "Polymère", - "material.editor.preserved_appearance": "Apparence conservée", - "material.editor.public_reference": "Référence publique", - "material.editor.reference": "Référence", - "material.editor.save_or_discard": "Enregistrez ou abandonnez le brouillon de matériau avant d'affecter un matériau.", - "material.editor.saved": "Matériau enregistré. Les affectations des corps sont inchangées.", - "material.editor.scope": "Enregistrer stocke ce matériau sans l'affecter à des corps. Les propriétés et conditions vides restent inconnues. La masse volumique de la fiche ne modifie ni la masse volumique affectée ni la masse.", - "material.editor.source_id": "ID de la source", - "material.editor.source_kind": "Type de source", - "material.editor.source_title": "Titre de la source", - "material.editor.sources": "Sources", - "material.editor.stale": "Ce matériau a changé pendant que le brouillon était ouvert. Abandonnez-le et rouvrez-le avant d'enregistrer.", - "material.editor.state": "État du matériau", - "material.editor.strain_rate": "Vitesse de déformation", - "material.editor.symmetry": "Symétrie élastique", - "material.editor.temperature": "Température", - "material.editor.unknown_card": "Les propriétés techniques sont inconnues. L'enregistrement peut ne conserver que la masse volumique affectée et l'apparence existante.", - "material.editor.user_supplied": "Fourni par l'utilisateur", - "material.editor.wood": "Bois", - "nav.alias.help": "Maj+Alt+glisser gauche fait orbiter, Maj+Alt+milieu fait un panoramique, Maj+Alt+droit zoome ; glisser avec le milieu fait aussi un panoramique et glisser avec le droit fait orbiter", - "nav.blender.help": "Glisser avec le milieu fait orbiter, Maj+milieu fait un panoramique, Ctrl+milieu zoome ; glisser avec le droit ne touche pas la caméra", - "nav.free_orbit.help": "La souris et la souris 3D tournent en passant par les deux pôles et conservent le roulis. L'alignement des axes avec Maj est désactivé.", - "nav.free_orbit.label": "Orbite libre", - "nav.fusion.help": "Glisser avec le milieu fait un panoramique, Maj+milieu fait orbiter, glisser avec le droit fait orbiter", - "nav.inventor.help": "Glisser avec le milieu fait un panoramique, Maj+milieu fait orbiter, Ctrl+milieu zoome, glisser avec le droit fait orbiter", - "nav.openscad.help": "Glisser avec le gauche dans le vide fait orbiter, Maj+glisser gauche sélectionne par rectangle, glisser la géométrie d'esquisse la modifie ; glisser avec le droit ou le milieu fait un panoramique, Maj+droit ou Maj+milieu zoome", - "nav.solidworks.help": "Glisser avec le milieu fait orbiter, Ctrl+milieu fait un panoramique, Maj+milieu zoome, glisser avec le droit fait orbiter", - "nav.tinkercad.help": "Glisser avec le droit fait orbiter, glisser avec le milieu ou Maj+droit fait un panoramique", - "perf.click_for_details": "Cliquer pour les détails : graphe des temps d'image, histogramme et ce que le GPU a dessiné", - "perf.draw_calls": "Appels de dessin", - "perf.line_segments": "Segments de ligne", - "perf.low_1": "1 % bas", - "perf.renderer": "Moteur de rendu", - "perf.scene_build": "Construction de la scène", - "perf.triangles": "Triangles", - "perf.ui_time": "Temps de l'interface", - "perf.viewport": "Vue 3D", - "perf.worst": "pire", - "pick the path": "choisir la trajectoire", - "prefs.add_item": "Ajouter l'élément", - "prefs.alt_frees_manipulators": "Alt / Option libère aussi les flèches du manipulateur", - "prefs.anti_aliasing_amd_dx12": "L'anticrénelage est à 1× car la vérification au démarrage n'a rien dessiné avec le multiéchantillonnage et a réussi à 1×. Vous pouvez choisir un autre réglage ci-dessus ; redémarrez pour l'appliquer si la vérification réussit.", - "prefs.anti_aliasing_note": "Adoucit les bords crénelés.", - "prefs.applies_on_restart": "Appliqué au redémarrage", - "prefs.assistant": "Assistant", - "prefs.axes": "Axes", - "prefs.axis": "Axe", - "prefs.bottom": "Bas", - "prefs.browser": "Navigateur", - "prefs.built_in": "Intégrée", - "prefs.button_left": "Glisser gauche", - "prefs.button_middle": "Glisser milieu", - "prefs.button_right": "Glisser droit", - "prefs.choose_font": "Choisir un fichier de police…", - "prefs.click": "Clic", - "prefs.contact_shading": "Ombrage de contact doux", - "prefs.contact_shading_note": "Ombrage doux là où les pièces se rapprochent.", - "prefs.context_menu": "Menu contextuel", - "prefs.context_menu_ring": "Menu contextuel · maintenir pour le menu radial", - "prefs.crash_reports": "Ouvrir les rapports de plantage…", - "prefs.crash_reports_note": "Les rapports sont conservés sur cet ordinateur, avec la conception et les commandes qui reproduisent le problème.", - "prefs.ctrl_cmd": "Ctrl / Cmd", - "prefs.curved_surfaces": "Surfaces courbes", - "prefs.curves": "Surfaces courbes", - "prefs.dead_zone_note": "La bande hachurée est la zone morte : les mouvements à l'intérieur sont ignorés.", - "prefs.default": "par défaut", - "prefs.design": "Valeurs par défaut des conceptions", - "prefs.design_note": "Ce avec quoi démarrent les nouvelles conceptions. Les conceptions ouvertes gardent les leurs.", - "prefs.devices": "Souris 3D", - "prefs.display": "Affichage", - "prefs.edges": "Arêtes et ombrage", - "prefs.extend": "Étendre", - "prefs.extra_navigation": "Ctrl+glisser gauche dans le vide fait orbiter ; maintenir Espace pour un panoramique.", - "prefs.follows_os": "Suit le système", - "prefs.font": "Police", - "prefs.font_fallback": "Les caractères absents de la police choisie utilisent la police intégrée, pour qu'aucun libellé n'affiche de case vide.", - "prefs.font_sample": "Portez ce vieux whisky au juge blond qui fume · Ø12,50 mm · 45,0° · 0123456789", - "prefs.font_unreadable": "La police sélectionnée n'a pas pu être lue.", - "prefs.general": "Général", - "prefs.general_note": "Langue, enregistrement et mises à jour.", - "prefs.gesture_orbit": "Orbite", - "prefs.gesture_pan": "Panoramique", - "prefs.gesture_zoom": "Zoom", - "prefs.graphics": "Graphisme", - "prefs.graphics_card": "Carte graphique", - "prefs.graphics_card_auto": "Automatique", - "prefs.graphics_card_missing": "La carte graphique enregistrée n'est pas disponible ; Automatique est utilisé.", - "prefs.graphics_card_restart": "Prend effet après le redémarrage de SolidCraft. WGPU_ADAPTER_NAME prévaut sur ce choix.", - "prefs.graphics_note": "Compromis entre vitesse et fluidité. Chaque choix montre son effet sur un exemple.", - "prefs.graphics_presets_note": "Les préréglages définissent ensemble les choix ci-dessous.", - "prefs.history": "Historique", - "prefs.hold_stop_snapping": "Maintenir pour désactiver l'accrochage", - "prefs.icons_only": "Icônes seules", - "prefs.imported_file": "Fichier importé", - "prefs.input": "Saisie", - "prefs.interface": "Interface", - "prefs.interface_language": "Langue de l'interface", - "prefs.interface_note": "L'apparence de SolidCraft et la place de ses éléments.", - "prefs.interval_minutes": "{n} min", - "prefs.labels": "Libellés", - "prefs.layout": "Disposition", - "prefs.layout_note": "Compacte : ancre les panneaux aux bords de la fenêtre. La transparence du navigateur est disponible en mode Flottante. Changez le côté de l'assistant dans la page Assistant.", - "prefs.left": "Gauche", - "prefs.left_click": "Clic gauche", - "prefs.live_input": "Saisie en direct", - "prefs.live_preview": "Aperçu en direct", - "prefs.minutes": "minutes", - "prefs.mouse": "Souris et pavé tactile", - "prefs.mouse_heading": "Souris", - "prefs.mouse_mapping": "Affectation des boutons de la souris", - "prefs.navigation": "Navigation", - "prefs.navigation_note": "Comment la souris, le pavé tactile et la souris 3D déplacent la vue.", - "prefs.not_on_gpu": "indisponible sur ce GPU", - "prefs.on": "Activé", - "prefs.opaque": "Opaque", - "prefs.orbit_snap": "Maintenir Maj pendant l'orbite pour s'aligner sur un axe.", - "prefs.orientation": "Orientation", - "prefs.overall_speed": "Vitesse globale", - "prefs.prefer_free_sketch_points": "Privilégier les points d'esquisse déplaçables quand des points se superposent", - "prefs.preview_choices": "Aperçu de vos choix", - "prefs.quality_default": "par défaut", - "prefs.quality_fastest": "le plus rapide", - "prefs.quality_slowest": "le plus lent", - "prefs.quality_smoother": "plus fluide", - "prefs.reports_saved": "Enregistrés : {n}", - "prefs.right_click": "Clic droit", - "prefs.saving": "Enregistrement automatique et récupération", - "prefs.scale_note": "Également Ctrl + / Ctrl − dans la fenêtre. Les boutons font 28 px à 100 %.", - "prefs.scale_text": "Échelle et texte", - "prefs.select": "Sélectionner", - "prefs.select_one_item": "Sélectionner un élément", - "prefs.selecting": "Sélection", - "prefs.shift": "Shift", - "prefs.shift_add_ctrl_toggle": "Maj ajoute seulement ; Ctrl / Cmd bascule", - "prefs.shift_add_note": "Activé : Maj ajoute, Ctrl / Cmd bascule. Désactivé (par défaut) : les deux basculent.", - "prefs.shortcuts": "Raccourcis", - "prefs.sketch_selection": "Esquisse et sélection", - "prefs.sketch_selection_heading": "Esquisse et sélection", - "prefs.sketch_selection_note": "Comment les esquisses s'accrochent et comment les clics sélectionnent.", - "prefs.sketching": "Esquisse", - "prefs.snap_drawing_note": "Pendant le dessin ou le déplacement d'un point d'esquisse.", - "prefs.source": "Source", - "prefs.speed": "Vitesse", - "prefs.stand_up_note": "Après l'ouverture d'un fichier STEP ou IGES en Z vers le haut, proposer un quart de tour autour de X.", - "prefs.status_done": "Terminé", - "prefs.status_error": "Erreur", - "prefs.status_selected": "Sélectionné", - "prefs.status_warning": "Avertissement", - "prefs.supersampling_brief": "Dessine la vue en plus grand puis la réduit par filtrage : très net, mais plus lourd.", - "prefs.tab_accent_note": "La couleur d'accent suit l'onglet actif", - "prefs.theme_file": "fichier de thème", - "prefs.timeline_half_hour": "−30 min", - "prefs.timeline_now": "maintenant", - "prefs.timeline_quarter_hour": "−15", - "prefs.toggle_item": "Ajouter l'élément, ou le retirer à nouveau", - "prefs.toolbar": "Barre d'outils", - "prefs.translucent": "Translucide", - "prefs.under_browser": "Sous le navigateur", - "prefs.under_cursor": "Sous le curseur", - "prefs.units_precision": "Unités et précision", - "prefs.updates": "Mises à jour", - "prefs.view": "Comportement de la vue", - "prefs.view_confirm_corner": "OK et Annuler dans le coin de la vue", - "prefs.view_confirm_corner_note": "Lorsqu'une boîte de dialogue ou une esquisse est ouverte, une coche et une croix en haut à droite de la vue font la même chose que OK et Annuler, ou terminent et annulent l'esquisse. Le repère de navigation se place en dessous.", - "prefs.viewport": "Vue 3D", - "prefs.wheel": "Molette", - "prefs.wheel_trackpad": "Molette et pavé tactile", - "prefs.workspace": "Espace de travail", - "prefs.zoom_toward_cursor": "Zoom, vers le curseur", - "render.adaptive_absolute": "Plancher d'erreur RVB absolu", - "render.adaptive_coverage": "Erreur de couverture visée", - "render.adaptive_enable": "Répartir les échantillons avec des pilotes indépendants", - "render.adaptive_help": "GPU uniquement. Les échantillons pilotes indépendants sont écartés, puis 16 échantillons de production ou plus par pixel sont répartis, jusqu'à Échantillons par pixel. La variance RVB et de couverture guide la répartition ; des chemins rares peuvent être manqués et des pixels plafonnés peuvent rester bruités. Le rapport final compte le travail réellement effectué. Aucune garantie certifiée de bruit ou de durée.", - "render.adaptive_minimum": "Échantillons de production minimum", - "render.adaptive_pending": "La répartition adaptative à pilotes indépendants sur GPU et les strates de Fresnel conditionnelles sont disponibles. La convergence certifiée, les garanties sur les événements rares et le transport adaptatif sur CPU restent indisponibles.", - "render.adaptive_pilots": "Échantillons pilotes par pixel", - "render.adaptive_relative": "Erreur RVB relative visée", - "render.add_ground": "Ajouter un sol ajusté au préréglage", - "render.advanced_material_scope": "Un milieu GPU homogène et fini est disponible, dans des limites explicites. Les grilles de densité, les combinaisons verre/volume imbriquées, les surfaces à diffusion sous-surfacique, le déplacement, le transport spectral et les concepts de matériaux avancés non liés restent indisponibles.", - "render.aging_add": "Ajouter une couche de vieillissement", - "render.aging_airborne": "Poussière en suspension / milieu participant", - "render.aging_airborne_help": "La poussière en suspension est un volume diffusant homogène et fini, distinct. Elle modifie le transport et l'EXR brut, pas la pile de vieillissement de surface. Les restrictions existantes sur les volumes, le verre et le débruitage restent explicites ; aucune atmosphère n'est ajoutée automatiquement.", - "render.aging_all_bodies": "Tous les corps opaques éligibles", - "render.aging_chips": "Peinture écaillée", - "render.aging_class_any": "Toutes les classes de matériaux opaques", - "render.aging_class_dielectric": "Surfaces non métalliques uniquement", - "render.aging_class_metal": "Surfaces métalliques uniquement", - "render.aging_color": "Couleur de la couche · sRVB", - "render.aging_coverage": "Couverture", - "render.aging_dust": "Poussière déposée", - "render.aging_empty": "Aucune couche de vieillissement : les surfaces d'origine restent inchangées.", - "render.aging_fading": "Revêtement délavé", - "render.aging_grime": "Crasse et taches", - "render.aging_help": "Combinez jusqu'à huit couches optiques, dans l'ordre. La rouille et la patine sont des apparences conçues, pas des simulations de vieillissement ou de corrosion. L'échelle est en millimètres du monde. Aucune géométrie, masse ou propriété technique n'est modifiée ; le verre et les éléments de décor passifs sont exclus.", - "render.aging_metallic": "Fraction métallique de la couche", - "render.aging_origin": "Origine du champ · mm monde", - "render.aging_patina": "Patine vert-de-gris", - "render.aging_refresh_targets": "Inspecter les corps actuels", - "render.aging_roughness": "Rugosité de la couche", - "render.aging_rust": "Fer oxydé / rouille", - "render.aging_scale": "Échelle du motif", - "render.aging_scratches": "Rayures fines", - "render.aging_target": "Cible et coordonnées", - "render.aging_target_help": "Une cible nommée doit toujours correspondre à l'index et au nom capturés. Les masques globaux sont ancrés dans le monde ; ils ne suivent pas les pièces mobiles. Ce n'est ni une détection de cavités ni une véritable usure des arêtes. Filtrez la liste pour atteindre d'autres corps.", - "render.aging_target_search": "Filtrer les noms des corps", - "render.aging_upward": "Dépôt sur les faces orientées vers le haut", - "render.all_controls_help": "Inspection détaillée de toutes les commandes actuelles. Les pages de section permettent une modification ciblée sans changer la requête sous-jacente.", - "render.appearance_physics_separate": "L'apparence visuelle n'affecte ni masse volumique, ni données thermiques, ni autres propriétés techniques.", - "render.availability_native": "Composition native ; à examiner avant d'appliquer", - "render.availability_projection": "Projection prise en charge ; voir la portée et les omissions", - "render.availability_reference": "Données de référence ; pas une affectation automatique", - "render.backdrop_alpha_conflict": "Choisissez cet arrière-plan ou une sortie PNG transparente ; le moteur de rendu n'ignorera aucun des deux réglages en silence.", - "render.backdrop_enable": "Utiliser un arrière-plan en dégradé pour la caméra uniquement", - "render.backdrop_first": "Couleur de début / du centre", - "render.backdrop_help": "Cet arrière-plan en espace écran n'éclaire pas, ne projette pas d'ombre, ne se reflète pas et ne représente pas un terrain. Il est exclu de l'EXR brut. La géométrie, les lumières et l'environnement HDR restent indépendants.", - "render.backdrop_horizontal": "Dégradé horizontal", - "render.backdrop_radial": "Dégradé radial", - "render.backdrop_radius": "Rayon", - "render.backdrop_second": "Couleur de fin / du bord", - "render.backdrop_vertical": "Dégradé vertical", - "render.backdrop_x": "Centre X", - "render.backdrop_y": "Centre Y", - "render.background_camera_section": "Arrière-plan de la caméra · présentation PNG", - "render.background_completed_frozen": "Le résultat affiché est une image terminée figée. Modifier un arrière-plan ne repeint pas automatiquement ce résultat. Utilisez Réétalonner pour les changements de caméra uniquement, ou Rendu pour un nouveau décor physique.", - "render.background_hdr_separate": "Les ressources HDR actuelles éclairent les surfaces et s'y reflètent ; elles ne sont pas affichées automatiquement en panorama derrière le sujet. Modifier un dégradé ne fait pas tourner l'éclairage et ne change pas sa couleur.", - "render.background_lighting_section": "Éclairage HDR · distinct de l'arrière-plan de la caméra", - "render.background_no_alpha_override": "Un arrière-plan de caméra n'est pas ajouté en silence à une sortie transparente. Le réétalonnage du master brut utilise la couverture capturée et ne réapplique pas le débruitage ; l'EXR source reste inchangé.", - "render.background_not_light": "La couleur d'arrière-plan relève de la présentation, ce n'est pas une source d'éclairage supplémentaire.", - "render.background_regrade": "Appliquer au master brut conservé", - "render.background_stage_occlusion": "Cette prise de vue contient de la géométrie de décor physique. Un grand sol ou un grand mur peut remplir le cadre et masquer un arrière-plan propre à la caméra. Effacez ou redimensionnez délibérément le décor, ou changez sa réflectance physique. Le réétalonnage ne peut pas retirer la géométrie capturée.", - "render.background_workflow": "Choisissez l'arrière-plan voulu : une couleur ou un dégradé propre à la caméra, un décor physique qui reçoit la lumière, ou un éclairage HDR. Ils sont indépendants. L'aperçu en direct est une vue de modélisation ; lancez un nouveau rendu ou réétalonnez un master conservé pour voir la finition de la caméra.", - "render.base_appearance": "Apparence modifiable du corps", - "render.base_apply": "Appliquer l'apparence du corps", - "render.base_apply_help": "Une affectation visuelle unique, annulable, au corps exact examiné. Les apparences propres aux faces et les matériaux techniques existants restent distincts.", - "render.base_color": "Couleur de base · sRVB", - "render.base_metallic": "Fraction métallique", - "render.base_opaque_only": "Cet éditeur conserve la sémantique des corps opaques. Utilisez les commandes de verre dédiées pour la transmission optique.", - "render.bloom_enable": "Halo lumineux (bloom) à l'affichage", - "render.bloom_help": "Lueur créative appliquée à la sortie seulement, à partir des hautes lumières linéaires positives, étalée par trois passes de flou normalisées. Le rayon est en pixels de sortie. Ajoutée en lumière d'affichage linéaire avant sRVB ; ce n'est ni un effet d'objectif, ni un effet volumétrique, ni une amélioration de la convergence. L'EXR brut est inchangé.", - "render.bloom_opaque": "Le halo lumineux nécessite une sortie opaque. Un PNG transparent est refusé, pas aplati en silence.", - "render.bloom_radius": "Rayon du halo lumineux", - "render.bloom_strength": "Intensité du halo lumineux", - "render.bloom_threshold": "Seuil des hautes lumières linéaires du halo", - "render.browse_capabilities": "Inspecter le catalogue complet des capacités", - "render.browse_environments": "Parcourir les environnements HDR d'origine", - "render.browse_native_scenes": "Parcourir les studios natifs", - "render.browse_physical": "Inspecter les références physiques", - "render.browse_quality": "Inspecter les spécifications de qualité", - "render.browse_rigs": "Parcourir les dispositifs d'éclairage conçus", - "render.browse_scene_specs": "Parcourir les spécifications de scène avancées", - "render.browse_surfaces": "Parcourir les surfaces conçues", - "render.browser_library": "Bibliothèque", - "render.browser_model": "Modèle", - "render.camera_distance": "Distance de l'œil à la cible", - "render.camera_exact_help": "Millimètres du monde ; les angles sont affichés en degrés et enregistrés en radians. La navigation utilise la même caméra que la vue 3D.", - "render.camera_fov": "Champ de vision vertical", - "render.camera_pitch": "Tangage de la caméra", - "render.camera_roll": "Roulis", - "render.camera_set": "Définir la caméra de rendu", - "render.camera_target": "Position de la cible · mm", - "render.camera_yaw": "Lacet", - "render.chromatic_offset": "Décalage chromatique des bords", - "render.clear_stage": "Supprimer le décor enregistré", - "render.copy_request": "Copier le JSON", - "render.cpu_aa_help": "Échantillons spatiaux : plus d'échantillons améliorent les bords et allongent le rendu.", - "render.cpu_area_add": "Ajouter une lumière CPU rectangulaire", - "render.cpu_area_editor": "Lumières CPU rectangulaires", - "render.cpu_area_editor_help": "Vecteurs des côtés complets en millimètres ; U × V pointe vers la face émettrice. Cela diffère des vecteurs demi-côté du GPU.", - "render.cpu_area_full_u": "Côté U complet · mm", - "render.cpu_area_full_v": "Côté V complet · mm", - "render.cpu_area_samples": "Échantillons de lumière surfacique", - "render.cpu_binding_confirm": "Confirmer ce corps", - "render.cpu_binding_stale": "La scène a changé. Confirmez à nouveau cette cible de réflexion avant le rendu.", - "render.cpu_body_choose": "Choisir un corps", - "render.cpu_body_filter": "Filtrer les corps par nom", - "render.cpu_body_filter_more": "Affinez le filtre pour voir plus de corps.", - "render.cpu_body_missing": "Une cible de réflexion est introuvable, masquée, ambiguë ou porte un nom de plus de 128 octets. Choisissez-la à nouveau.", - "render.cpu_budget": "Profil de ressources CPU", - "render.cpu_budget_bodies": "Plafond de corps", - "render.cpu_budget_compact": "Compact (anciennes limites)", - "render.cpu_budget_details": "Limites de ressources", - "render.cpu_budget_help": "Choisissez explicitement des limites plus élevées. La résolution et les échantillons ne sont jamais réduits automatiquement.", - "render.cpu_budget_memory": "Plafond de mémoire de la tâche", - "render.cpu_budget_not_guarantee": "Ce sont des plafonds d'admission, pas une réservation de RAM ni une garantie de vitesse. La géométrie, le film et les aperçus conservés partagent le budget mémoire ; le rendu reste annulable.", - "render.cpu_budget_resize": "Le brouillon dépasse ce profil CPU ou son budget d'échantillons de caméra. Acceptez explicitement des dimensions plus petites ou choisissez un profil plus grand.", - "render.cpu_budget_studio": "Studio (grandes images)", - "render.cpu_budget_triangles": "Plafond de triangles", - "render.cpu_budget_workstation": "Station de travail (scènes lourdes)", - "render.cpu_captured_hdr": "HDR capturé pour cette image", - "render.cpu_check_capture_help": "Vérifier et Démarrer contrôlent la même empreinte de fichier ou utilisent le HDR intégré. Chaque image conserve sa source capturée.", - "render.cpu_check_changed": "Les réglages ou le modèle ont changé après cette vérification. Vérifiez à nouveau avant le rendu.", - "render.cpu_constant_help": "La radiance constante est visible par les rayons réfléchis ou transmis. Elle ne fournit pas d'éclairage diffus direct.", - "render.cpu_custom_directions": "Remplacer le préréglage par des lumières directionnelles personnalisées", - "render.cpu_direction": "Direction vers la lumière (X, Y, Z)", - "render.cpu_directional": "Lumière directionnelle", - "render.cpu_directional_add": "Ajouter une lumière directionnelle", - "render.cpu_environment": "Environnement CPU", - "render.cpu_environment_background": "L'arrière-plan de l'image reste distinct de l'éclairage d'environnement.", - "render.cpu_environment_bounds": "L'intensité CPU doit être entre 0 et 64, la rotation HDR finie dans ±1 000 000 radians, et les échantillons HDR égaux à 1, 4, 16 ou 64.", - "render.cpu_environment_constant": "Environnement constant pour les rayons secondaires", - "render.cpu_environment_none": "Aucun environnement CPU", - "render.cpu_environment_samples": "Échantillons d'éclairage HDR", - "render.cpu_exposure_help": "L'exposition CPU doit être comprise entre −16 et 16 IL. Une exposition GPU hors de cette plage est conservée jusqu'à ce que vous la changiez.", - "render.cpu_fixed": "Image unique", - "render.cpu_hdr_help": "Radiance .hdr, panorama 2:1, jusqu'à 2048 × 1024 et 16 Mio. Le CPU exige des primaires sRVB/D65 explicites dans le fichier ; les primaires non spécifiées et l'EXR sont refusés.", - "render.cpu_hdr_reflection_help": "Les réflexions HDR rugueuses exigent des surfaces de corps et de faces entièrement métalliques. Vérifier signale les combinaisons non prises en charge.", - "render.cpu_key_rim": "Principale et contour", - "render.cpu_last_check": "Dernière vérification CPU", - "render.cpu_light_help": "Jusqu'à huit lumières directionnelles. Une liste personnalisée vide les éteint ; choisir un préréglage restaure ses lumières. Les couleurs sont en RVB linéaire et l'intensité est relative, pas en watts.", - "render.cpu_light_intensity": "Intensité relative (0–64)", - "render.cpu_light_minimum": "Distance minimale d'atténuation", - "render.cpu_light_position": "Position dans le monde (X, Y, Z)", - "render.cpu_light_reference": "Distance de référence de l'intensité", - "render.cpu_light_remove": "Supprimer la lumière", - "render.cpu_lighting": "Préréglage d'éclairage", - "render.cpu_lights": "Lumières CPU", - "render.cpu_linear_color": "Couleur linéaire (R, V, B)", - "render.cpu_neutral": "Neutre", - "render.cpu_opaque_required": "Le lancer de rayons CPU nécessite un arrière-plan opaque. Décochez Arrière-plan transparent pour continuer.", - "render.cpu_options_pending": "Ce panneau CPU ne peut pas encore modifier l'émission, les effets de surface, le verre ni l'anisotropie. Effacez ces options d'API avant de l'utiliser.", - "render.cpu_point": "Lumière ponctuelle", - "render.cpu_point_add": "Ajouter une lumière ponctuelle", - "render.cpu_point_help": "Jusqu'à huit lumières ponctuelles, ajoutées à l'éclairage directionnel choisi. Les distances sont en mm ; la distance minimale ne doit pas dépasser la distance de référence.", - "render.cpu_primary_samples": "Échantillons de bord par pixel", - "render.cpu_progressive": "CPU progressif", - "render.cpu_progressive_help": "Accumuler l'intégrateur CPU existant par passes d'un échantillon primaire. Les réflexions sélectionnées exigent un échantillon ; les lumières surfaciques, les diélectriques et l'anisotropie exigent Image unique.", - "render.cpu_progressive_limits": "Au plus 1 048 576 pixels et 16 777 216 évaluations pixel × échantillon. Changer le nombre d'échantillons ne redimensionne jamais l'image automatiquement.", - "render.cpu_progressive_seed": "Graine d'échantillonnage CPU", - "render.cpu_progressive_spp": "échantillons par pixel", - "render.cpu_reflection_add": "Ajouter une réflexion rugueuse", - "render.cpu_reflection_depth": "Profondeur de réflexion (1–8)", - "render.cpu_reflection_empty": "Aucun corps sélectionné : les réflexions de la scène sont désactivées.", - "render.cpu_reflection_help": "Choisissez des corps et réglez Désactivé, Miroir ou Rugueux. Rugueux utilise la rugosité de surface affectée. Plus d'échantillons et de rebonds allongent le rendu ; il s'agit d'un transport spéculaire borné, pas d'un éclairage global.", - "render.cpu_reflection_limit": "Jusqu'à 64 corps réfléchis sont pris en charge.", - "render.cpu_reflection_mirror": "Miroir", - "render.cpu_reflection_off": "Désactivé", - "render.cpu_reflection_rough": "Rugueux", - "render.cpu_reflection_samples": "Échantillons de réflexion (1–64)", - "render.cpu_reflections": "Réflexions CPU", - "render.cpu_runtime_help": "Les réglages numériques de lumière et d'environnement sont enregistrés avec le préréglage. Les réflexions des corps et les fichiers HDR restent temporaires. Les valeurs existantes des lumières surfaciques et des cônes de spot sont conservées.", - "render.cpu_sampling_mode": "Mode d'échantillonnage CPU", - "render.cpu_shadows": "Projeter des ombres", - "render.cpu_summary": "Lancer de rayons CPU · réflexions · HDR · lumières directionnelles et ponctuelles", - "render.cpu_warm_cool": "Chaud et froid", - "render.diag_bodies": "Corps visibles", - "render.diag_job_details": "Détails de la tâche capturée", - "render.diag_last_check": "Dernière vérification préalable", - "render.diag_memory": "Estimation logique d'admission", - "render.diag_not_implemented": "Limites explicites des capacités", - "render.diag_preflight_details": "Détails de la vérification préalable", - "render.diag_request": "Requête actuelle exacte", - "render.diag_triangles": "Triangles", - "render.discard_continue": "Abandonner le brouillon et continuer", - "render.draft_confirm_help": "Le brouillon de rendu actuel contient des modifications non appliquées. Enregistrez-les avant de changer, abandonnez-les explicitement ou continuez la modification.", - "render.draft_confirm_title": "Conserver les réglages de rendu modifiés", - "render.effects_gpu_only": "Ces effets nécessitent le tracé de chemins GPU. Changer de page ne change jamais automatiquement de moteur de rendu.", - "render.effects_help": "Combinez des looks colorimétriques ordonnés et des effets d'objectif en espace image. Le rendu et le réétalonnage du master brut utilisent les mêmes réglages enregistrés. L'EXR brut reste inchangé. Ce sont des réglages artistiques originaux, pas des émulations calibrées d'objectifs ou de pellicules de marque.", - "render.effects_reset_lens": "Réinitialiser les effets d'objectif", - "render.effects_seed": "Graine du motif", - "render.export_display": "Export : PNG d'affichage", - "render.export_linear": "Export : EXR linéaire brut", - "render.exr_pending": "Le GPU peut conserver un EXR linéaire brut. La compression, les images multicouches et les passes de rendu auxiliaires restent indisponibles.", - "render.film_grain": "Grain photographique", - "render.flare_ghosts": "Anneaux fantômes par source", - "render.flare_halo": "Halo de flare", - "render.flare_streak": "Traînée de style anamorphique", - "render.flare_strength": "Intensité du flare des hautes lumières", - "render.flare_threshold": "Seuil du flare en linéaire scène", - "render.gpu_depth": "Profondeur maximale des chemins", - "render.gpu_options_help": "Les échantillons, la profondeur, la graine et l'exposition sont enregistrés avec ce préréglage. Seule la méthode d'image active est enregistrée.", - "render.gpu_path_failed": "Traceur de chemins GPU indisponible", - "render.gpu_path_first_setup": "La première initialisation sur ce GPU peut prendre plusieurs minutes ; SolidCraft reste utilisable pendant ce temps. Les démarrages suivants réutilisent les shaders compilés lorsque le pilote les conserve.", - "render.gpu_path_preparing": "Traceur de chemins GPU : compilation des shaders…", - "render.gpu_seed": "Graine aléatoire", - "render.gpu_unavailable": "Le tracé de chemins GPU n'est pas prêt sur cet appareil.", - "render.ground_apply": "Ajuster et enregistrer le sol", - "render.ground_gap": "Écart explicite au sol", - "render.ground_linear_rgb": "Réflectance diffuse · RVB linéaire", - "render.ground_margin": "Marge d'étendue du sol", - "render.hdr_details": "Détails de la source HDR", - "render.hdr_embedded": "HDR enregistré dans cette conception", - "render.hdr_embedded_help": "Le rendu utilise les octets inclus dans la conception ; le fichier d'origine n'est plus nécessaire.", - "render.hdr_file_captured": "Fichier HDR vérifié. L'enregistrement intégrera ces octets ; si le fichier change, vérifiez-le à nouveau explicitement.", - "render.hdr_inspect": "Vérifier le fichier HDR", - "render.hdr_inspect_required": "Sélectionnez et vérifiez un fichier HDR avant d'enregistrer ou de lancer le rendu.", - "render.hdr_primaries_declared": "La source déclare ses primaires colorimétriques.", - "render.hdr_primaries_srgb": "Primaires colorimétriques : sRVB/D65", - "render.hdr_primaries_undeclared": "La source ne déclare pas de primaires ; vérifiez les exigences colorimétriques du moteur de rendu.", - "render.hdr_resource_missing": "Il manque à cette conception la ressource HDR enregistrée.", - "render.image_advanced": "Réglages GPU avancés", - "render.image_exposure": "Exposition", - "render.image_host_missing": "Aucun hôte d'image n'est installé.", - "render.image_method": "Méthode d'image", - "render.image_progressive": "Rendu progressif", - "render.image_samples": "Échantillons par pixel", - "render.image_scene_stale": "Terminez le geste de modélisation ou actualisez la scène avant de vérifier ou de lancer une image.", - "render.include_rig_cards": "Inclure les réflecteurs et drapeaux passifs", - "render.inspect_scene": "Actualiser le résumé de la scène capturée", - "render.keep_editing": "Continuer la modification", - "render.layer_down": "Déplacer vers le bas", - "render.layer_enabled": "Couche activée", - "render.layer_remove": "Supprimer la couche", - "render.layer_strength": "Intensité de la couche", - "render.layer_up": "Déplacer vers le haut", - "render.lens_effects_help": "Le flare utilise jusqu'à quatre sources lumineuses distinctes de l'image linéaire réelle. Les fantômes, le halo, les traînées, les décalages chromatiques et la distorsion radiale sont des approximations artistiques en espace image. Les effets spatiaux nécessitent une sortie opaque ; les échantillons extérieurs prolongent le bord de l'image. Le grain est déterministe. Aucune physique, aucun EXR ni aucune géométrie n'est modifié.", - "render.lens_effects_title": "Inspiration objectif et photographie", - "render.library_all": "Catalogue", - "render.library_all_states": "Tous les états de disponibilité", - "render.library_applied": "Projection de ressource appliquée. Vérifiez la requête de rendu complète avant de lancer.", - "render.library_apply_hdr": "Enregistrer avec cet environnement HDR", - "render.library_apply_maps": "Utiliser les textures de surface GPU conçues", - "render.library_apply_studio": "Enregistrer la projection de studio conçue", - "render.library_apply_uniform": "Appliquer une apparence opaque uniforme", - "render.library_authored_help": "Les ressources conçues d'origine sont indicatives, pas des données techniques mesurées. Chaque action n'applique que la projection indiquée.", - "render.library_blocked": "Bloqué / étalonnage requis", - "render.library_capabilities": "Spécifications des capacités", - "render.library_center": "Centre du dispositif", - "render.library_clear_search": "Effacer", - "render.library_details": "Spécification et provenance", - "render.library_emitters_only_ack": "Utiliser seulement les émetteurs ; omettre les réflecteurs passifs documentés", - "render.library_empty": "Aucune ressource correspondante. Essayez une autre requête ou un autre filtre de disponibilité.", - "render.library_environment_concepts": "Concepts d'environnement", - "render.library_extent": "Étendue du sujet", - "render.library_favorite": "Ajouter aux favoris", - "render.library_favorites": "Favoris", - "render.library_hdr": "Environnements HDR intégrés", - "render.library_hdr_help": "Intègre le HDR d'origine dans le préréglage enregistré. L'origine de longitude conçue est convertie explicitement ; aucun fichier externe n'est nécessaire après l'enregistrement.", - "render.library_inspect_only": "Sélectionnez pour inspecter ; rien n'est appliqué automatiquement. Les favoris et l'historique récent appartiennent à cette session de document ouverte.", - "render.library_light_concepts": "Concepts d'éclairage", - "render.library_maps_help": "Les textures intégrées peuvent être enregistrées avec des sources épinglées et un mappage local aux occurrences. Les remplacements optiques temporaires restent un mode distinct.", - "render.library_material_concepts": "Concepts de matériaux", - "render.library_native_scenes": "Studios natifs", - "render.library_next": "Page suivante", - "render.library_omitted": "Non inclus", - "render.library_physical_profiles": "Profils de référence physiques", - "render.library_previous": "Page précédente", - "render.library_quality_concepts": "Spécifications de qualité", - "render.library_recent": "Récents", - "render.library_replace_environment": "Remplacer explicitement l'environnement existant", - "render.library_replace_studio": "Remplacer l'éclairage, l'environnement et le décor enregistrés", - "render.library_results": "Ressources correspondantes", - "render.library_rig_help": "Ajuster une fois sur un centre et une étendue physique explicites. Les dispositifs complets incluent des réflecteurs passifs ; les blocages d'étalonnage refusent toujours. Un écart prudent entre émetteurs et réflecteurs est vérifié avant l'enregistrement.", - "render.library_rigs": "Dispositifs d'éclairage conçus", - "render.library_save_maps": "Enregistrer les textures dans ce préréglage", - "render.library_scene_bounds": "Utiliser les limites de la scène capturée", - "render.library_scenes": "Spécifications de scène", - "render.library_search": "Rechercher dans la bibliothèque", - "render.library_select_hint": "Choisissez une ressource dans la bibliothèque pour inspecter ses actions prises en charge et ses limites.", - "render.library_selene": "Apparences opaques SELENE", - "render.library_selene_shots": "Spécifications de prises de vue SELENE", - "render.library_short_blocked": "Indisponible", - "render.library_short_native": "Composition native", - "render.library_short_projection": "Projection prise en charge", - "render.library_short_reference": "Référence uniquement", - "render.library_short_specification": "Spécification uniquement", - "render.library_source_preview": "Charger l'aperçu de la texture source", - "render.library_source_preview_help": "Texture source de couleur de base conçue. Ce n'est pas un aperçu de matériau rendu ou mesuré.", - "render.library_specification_only": "Spécification uniquement : pas un préréglage exécutable complet. Les effets, ressources et rôles de sujet requis nécessitent encore une implémentation et une association explicites.", - "render.library_specs": "Spécifications uniquement", - "render.library_status": "Disponibilité", - "render.library_surfaces": "Surfaces PBR conçues", - "render.library_target": "Corps cible", - "render.library_title": "Bibliothèque de ressources de rendu", - "render.library_unfavorite": "Retirer des favoris", - "render.library_uniform_ack": "Utiliser l'approximation uniforme sans effets spatiaux ni avancés", - "render.library_usable": "Projections exécutables", - "render.linear_help": "Conserve un master RVBA en flottant 32 bits avant le débruitage, l'exposition, le mappage des tons, les filtres et l'arrière-plan. sRVB/D65 linéaire ; prémultiplié par la couverture. La mémoire supplémentaire est admise explicitement. Pas de compression ni de passes supplémentaires.", - "render.linear_retain": "Conserver l'EXR linéaire brut", - "render.linear_unavailable": "L'image terminée sélectionnée n'a pas d'EXR conservé. Activez la conservation avant le rendu ; un ancien PNG ne permet pas de récupérer la radiance brute.", - "render.look_add": "Ajouter un look colorimétrique", - "render.look_bleach": "Inspiration traitement sans blanchiment (bleach bypass)", - "render.look_cool": "Froid", - "render.look_cyanotype": "Inspiration cyanotype", - "render.look_faded": "Tirage délavé", - "render.look_mono": "Monochrome", - "render.look_sepia": "Sépia", - "render.look_strength": "Intensité du look", - "render.look_teal_orange": "Bleu canard / orange", - "render.look_title": "Pile de looks créatifs", - "render.look_warm": "Chaud", - "render.mapping_scale": "Multiplicateur de répétition physique", - "render.material_absorption": "Absorption R · V · B (par mm)", - "render.material_add": "Ajouter ou modifier ce corps", - "render.material_assignments": "Affectations des corps", - "render.material_binding_enable": "Inclure ce remplacement de corps", - "render.material_box": "Boîte alignée sur les axes", - "render.material_browse": "Choisir une image…", - "render.material_certification": "Le verre fermé utilise la distance géométrique. La topologie, l'orientation, le chevauchement et les limites optiques sont vérifiés pendant la préparation GPU ; Vérifier ne fait qu'admettre la requête.", - "render.material_choose_body": "Choisir un corps de la scène", - "render.material_closed": "Maillage solide fermé", - "render.material_coat": "Vernis sur le matériau de base", - "render.material_coat_enable": "Activer le vernis", - "render.material_coat_help": "Revêtement diélectrique indicatif sur l'apparence opaque existante. Un poids nul laisse la base inchangée.", - "render.material_color_map": "Image de couleur de base (sRVB)", - "render.material_color_replace": "La texture de base remplace la couleur du corps", - "render.material_custom": "Optique indicative personnalisée", - "render.material_enable": "Utiliser ces remplacements de matériau GPU", - "render.material_filter": "Filtrer les corps de la scène…", - "render.material_filter_help": "Jusqu'à 128 corps correspondants sont affichés. Affinez le filtre pour les grandes scènes.", - "render.material_glass": "Verre et absorption optique", - "render.material_glass_enable": "Utiliser un verre physique sur ce corps", - "render.material_glass_exclusive": "Dans ce moteur de rendu, le verre ne peut pas partager un corps avec un vernis ou des textures d'exécution.", - "render.material_glass_help": "Recettes indicatives originales. Les nuanciers montrent la transmittance, pas un aperçu rendu. L'absorption vaut −ln(transmittance linéaire) / distance de référence ; l'alpha est inchangé.", - "render.material_gpu_required": "Ces remplacements de matériau actifs nécessitent le tracé de chemins GPU. Choisissez GPU ou désactivez les remplacements avant Vérifier ou Démarrer.", - "render.material_ior": "Indice de réfraction (IOR)", - "render.material_limits": "Au plus 128 remplacements de corps, 32 corps de verre disjoints, 64 vernis et 128 associations de textures. Les textures identiques partagent leur stockage ; les limites réelles de l'appareil et de la mémoire totale s'appliquent toujours.", - "render.material_map_invalid": "Les chemins des textures doivent être des chemins locaux bornés ; l'intensité de la normale doit être finie et comprise entre 0 et 1.", - "render.material_map_required": "Choisissez une image de couleur ou une image de normales avant d'utiliser des textures.", - "render.material_maps": "Textures planes de couleur et de normales", - "render.material_maps_enable": "Activer les textures pour ce corps opaque", - "render.material_maps_help": "PNG/JPEG jusqu'à 1024×1024 ; 16 Mio encodés au total. U et V sont des vecteurs de répétition orthogonaux en mm monde (128 répétitions au maximum). La couleur est en sRVB ; les normales utilisent la convention OpenGL +Y. Les fichiers sont capturés à Vérifier/Démarrer.", - "render.material_metallic_map": "Texture métallique (linéaire)", - "render.material_normal_map": "Image de normales (OpenGL, +Y)", - "render.material_normal_strength": "Intensité des normales (0–1)", - "render.material_origin": "Origine du mappage X · Y · Z (mm)", - "render.material_refresh": "Actualiser les corps de la scène", - "render.material_refresh_needed": "La scène a changé. Actualisez la liste des corps avant d'ajouter une cible.", - "render.material_remove": "Supprimer cette affectation", - "render.material_repeat_u": "Une répétition U X · Y · Z (mm)", - "render.material_repeat_v": "Une répétition V X · Y · Z (mm)", - "render.material_revalidate": "Revalider ce corps", - "render.material_revalidate_needed": "Cette affectation appartient à une révision antérieure de la scène. Revalidez l'identité exacte de son corps avant le rendu.", - "render.material_roughness": "Rugosité du vernis (0,045–1)", - "render.material_roughness_map": "Texture de rugosité (linéaire)", - "render.material_shadow": "Transmettre les rayons d'ombre directs", - "render.material_target_missing": "Le numéro d'ordre et le nom du corps ne correspondent plus. Supprimez cette affectation et choisissez à nouveau explicitement le corps voulu.", - "render.material_thickness": "Épaisseur de la feuille mince (mm)", - "render.material_thin": "Feuille mince", - "render.material_title": "Matériaux d'image GPU", - "render.material_transient": "Remplacements optiques temporaires pour cet onglet de document. Ils ne sont enregistrés ni dans la conception, ni dans le préréglage de rendu, ni dans la bibliothèque de matériaux.", - "render.material_v_up": "Le V de la texture pointe vers le haut de l'image", - "render.material_weight": "Poids du vernis (0–1)", - "render.method_cpu": "Lancer de rayons CPU", - "render.method_gpu": "Tracé de chemins GPU", - "render.method_limit_raster": "La rastérisation utilise l'aperçu de studio opaque fixe. Choisissez une méthode de lancer de rayons explicite pour les réglages optiques pris en charge.", - "render.method_raster": "Rastérisation CPU", - "render.nested_enable": "Diélectriques imbriqués certifiés", - "render.nested_help": "Jusqu'à 16 couches contenantes ; chaque parent doit être convexe et chaque enfant strictement à l'intérieur. Les intersections, les surfaces en contact, les feuilles minces et la transmission des ombres directes sont refusées. L'état « caméra à l'intérieur » suit la hiérarchie certifiée. Ne crée pas de surface de liquide et ne fusionne pas les limites CAO en contact.", - "render.optics_remove": "Supprimer l'optique enregistrée", - "render.optics_replace": "Remplacer explicitement l'optique enregistrée de cette cible", - "render.optics_save": "Enregistrer cette optique dans le préréglage", - "render.optics_saved": "Cibles optiques enregistrées", - "render.optics_saved_help": "L'identité exacte de la définition, de la fonction et de l'occurrence est conservée à la réouverture hors ligne. Les cibles manquantes, remplacées ou masquées sont refusées ; les matériaux techniques sont inchangés. Enregistrez ou abandonnez les modifications numériques avant de supprimer une cible enregistrée.", - "render.output_format_status": "Le PNG est l'image d'affichage terminée exacte. L'EXR GPU facultatif conserve la radiance brute FLOAT32 en linéaire scène, avant les filtres d'affichage. L'export ne substitue jamais le cache d'aperçu ni une autre tâche.", - "render.output_lock_ratio": "Verrouiller le rapport d'aspect", - "render.output_over_budget": "L'image demandée dépasse l'enveloppe de ressources choisie. Choisissez explicitement une taille ou un profil compatible ; aucune réduction automatique n'a lieu.", - "render.output_ratio_refused": "La dimension liée dépasse la taille limite de cette méthode. La taille précédente est conservée ; déverrouillez le rapport ou choisissez une valeur plus petite.", - "render.output_swap_orientation": "Permuter largeur et hauteur", - "render.page_aging": "Vieillissement et salissures", - "render.page_all": "Tous les réglages", - "render.page_appearance": "Apparence", - "render.page_background": "Arrière-plans", - "render.page_camera": "Caméra", - "render.page_diagnostics": "Diagnostics", - "render.page_effects": "Effets d'objectif et de finition", - "render.page_environment": "Environnement", - "render.page_lighting": "Éclairage", - "render.page_output": "Sortie", - "render.page_scene": "Scène", - "render.passive_stage": "Sol et décor passif", - "render.passive_stage_help": "Les panneaux passifs finis n'appartiennent qu'aux images rendues. Ils n'ajoutent ni corps CAO ni masse. Leur placement est figé après application ; un recoupement avec les limites du produit est refusé. Le CPU ne fournit pas d'éclairage diffus par rebond.", - "render.physical_acknowledge": "Je comprends que cette référence partielle nécessite un examen de la nuance, de l'état et de la source", - "render.physical_associations": "Candidats physiques et rôles", - "render.physical_background_help": "Vrai sol et vrai mur passifs, distincts de l'arrière-plan de la caméra. Le cyclorama utilise 24 bandes polygonales ; ce n'est pas une surface infinie ni analytiquement lisse. Ne remplace le décor enregistré qu'avec votre accord.", - "render.physical_copy_plan": "Copier le plan avec les sources et les omissions", - "render.physical_cyclorama": "Ajuster un cyclorama polygonal", - "render.physical_floor_wall": "Ajuster un sol et un mur physiques", - "render.physical_material_name": "Nom proposé pour le matériau de référence", - "render.physical_omissions": "Propriétés non représentables dans la fiche native", - "render.physical_plan_only": "Plan en lecture seule préparé. Aucun matériau n'a été créé ni affecté. Gardez son profil étendu et ses omissions en examinant la fiche native.", - "render.physical_prepare_plan": "Préparer le plan de création (n'applique rien)", - "render.physical_separate": "L'apparence n'identifie pas le matériau. Ce sont des références sourcées, pas des propriétés effectives certifiées. La masse, les matériaux techniques et l'optique existants sont inchangés.", - "render.physical_unknown": "Aucun candidat numérique n'est établi. La nuance, la formulation ou la construction doit être précisée ; inconnu ne signifie pas zéro.", - "render.post_contrast": "Contraste", - "render.post_gain_b": "Gain bleu", - "render.post_gain_g": "Gain vert", - "render.post_gain_r": "Gain rouge", - "render.post_help": "Présentation créative uniquement. Les gains RVB précèdent le mappage des tons ; le contraste, la saturation et le vignettage suivent, en lumière d'affichage linéaire. Lancer le rendu crée de nouveaux échantillons de transport. Réétalonner utilise le master brut conservé sélectionné, sans débruitage ni nouveaux rayons.", - "render.post_reset": "Réinitialiser les filtres de présentation", - "render.post_saturation": "Saturation", - "render.post_title": "Filtres de présentation", - "render.post_vignette": "Vignettage", - "render.preview_image_settings_help": "L'aperçu en direct garde un éclairage de studio fixe. L'exposition et l'éclairage de l'image s'appliquent à la tâche d'image quand vous cliquez sur Vérifier ou Démarrer.", - "render.preview_retry": "Réessayer l'aperçu en direct", - "render.preview_unavailable_help": "L'aperçu en direct est indisponible. Les préréglages enregistrés et les réglages de tâche d'image restent accessibles. Modifiez la scène ou réessayez explicitement ; une scène refusée n'est pas reconstruite à chaque image.", - "render.preview_upload": "Charge de sommets de l'aperçu en direct", - "render.preview_upload_help": "Octets exacts des sommets de l'aperçu, pas la mémoire totale du GPU ni du processus. La géométrie n'est pas simplifiée. Les tâches d'image utilisent leur propre admission et leur propre éclairage.", - "render.progressive_image_summary": "PNG d'aperçu · PBR et verre · échantillons progressifs", - "render.quality_ack": "Accepter la projection à budget fixe et ses omissions", - "render.quality_apply": "Utiliser ce budget d'échantillonnage fixe", - "render.quality_projection_help": "Les préréglages Q incluent des exigences futures. Cette action ne projette qu'un budget PNG pris en charge à échantillons fixes, et omet explicitement l'arrêt adaptatif, la sortie linéaire brute et les limites de transmission indépendantes.", - "render.quality_review": "Examiner le budget d'échantillonnage", - "render.queue_pending": "Cette interface ne propose ni file de production automatique ni moteur de rendu d'animation. Les images fixes terminées restent exportables séparément.", - "render.radial_distortion": "Distorsion radiale", - "render.regrade_action": "Réétalonner le master brut (sans débruitage)", - "render.regrade_help": "Crée un PNG distinct à partir du master brut terminé sélectionné, avec ces réglages de présentation. Ne trace aucun rayon, ne change ni la taille, ni la caméra, ni les lumières capturées, et n'écrase pas l'EXR. Le débruitage n'est pas réappliqué : les masters bruts ne conservent pas ses guides. Le résultat reste exportable par les mêmes réglages de tâche.", - "render.replace_ground": "Confirmer le remplacement du décor existant", - "render.replace_saved_surface": "Remplacer une association enregistrée existante pour cette cible", - "render.result_actual_help": "Un pixel d'image par pixel d'affichage.", - "render.result_capture": "Révision capturée", - "render.result_current": "La révision capturée du modèle est à jour.", - "render.result_empty": "Aucune image terminée pour l'instant. Vérifiez les réglages, puis lancez un rendu.", - "render.result_fit": "Ajuster l'image", - "render.result_job": "Tâche", - "render.result_navigation": "Le panoramique et le zoom suivent les préférences de navigation. Espace + glisser fait un panoramique.", - "render.result_open": "Ouvrir l'image terminée dans le canevas principal.", - "render.result_preview": "Aperçu en direct", - "render.result_provisional": "Image CPU provisoire", - "render.result_provisional_help": "Ce point de restauration n'est pas exportable. L'export conserve le dernier résultat terminé ; l'annulation revient à ce résultat.", - "render.result_reduced_display": "Aperçu d'affichage réduit à la limite de l'appareil ou du cache de la vue. Le PNG conservé et l'export gardent la pleine résolution ; l'inspection native à 100 % n'est pas disponible pour cette vue réduite.", - "render.result_retained": "Affichage de la dernière image terminée ; un rendu plus récent ne l'a pas remplacée.", - "render.result_sequence": "Point de restauration", - "render.result_title": "Résultat du rendu", - "render.review_stale": "Cet examen est périmé. Résolvez ou vérifiez à nouveau avant d'appliquer.", - "render.ribbon_aging": "Vieillissement", - "render.ribbon_backgrounds": "Arrière-plans", - "render.ribbon_check": "Vérifier", - "render.ribbon_check_help": "Valider le brouillon actuel exact que Rendu va soumettre. Pas de moteur de rendu de repli, de redimensionnement silencieux ni de remplacement de ressource.", - "render.ribbon_edit_lights": "Modifier les lumières", - "render.ribbon_effects": "Effets", - "render.ribbon_environment_help": "L'éclairage HDR, les arrière-plans propres à la caméra et les surfaces du décor physique sont des réglages distincts, avec un accord explicite pour tout remplacement.", - "render.ribbon_finish_dialog": "Terminez d'abord la boîte de dialogue de fichier ou de confirmation en cours.", - "render.ribbon_frame": "Cadrer", - "render.ribbon_hdr_library": "Bibliothèque HDR", - "render.ribbon_job_active": "Un rendu est déjà en cours ; annulez-le explicitement avant d'en lancer un autre.", - "render.ribbon_light_rigs": "Dispositifs d'éclairage", - "render.ribbon_lights_help": "Inspectez les dispositifs conçus ou modifiez les lumières prises en charge, sans remplacer le préréglage actuel tant que vous n'appliquez pas explicitement la modification.", - "render.ribbon_materials": "Matériaux", - "render.ribbon_materials_help": "Ouvrir l'inspecteur d'apparence partagé et la bibliothèque de surfaces d'origine. Les modifications optiques ne changent jamais en silence les propriétés techniques.", - "render.ribbon_no_active_job": "Aucun rendu en cours à annuler.", - "render.ribbon_no_result": "Terminez un rendu avant d'exporter son image exacte.", - "render.ribbon_no_saved_camera": "Enregistrez une prise de vue avant de restaurer sa caméra.", - "render.ribbon_saved_camera": "Caméra enregistrée", - "render.ribbon_shots": "Prises de vue", - "render.ribbon_studios": "Studios", - "render.ribbon_studios_help": "Parcourez les compositions de studio implémentées et examinez leurs remplacements avant d'appliquer. Les scènes à l'état de concept restent signalées.", - "render.ribbon_surface_maps": "Textures de surface", - "render.sampling_title": "Échantillonnage adaptatif et de transmission", - "render.save_continue": "Enregistrer et continuer", - "render.saved_maps_runtime_conflict": "Les associations de surface enregistrées ne peuvent pas être mélangées avec des remplacements optiques temporaires ni avec un HDR non enregistré. Enregistrez le HDR ou supprimez explicitement les entrées temporaires.", - "render.saved_surface_remove": "Supprimer l'association enregistrée", - "render.saved_surfaces": "Associations de surface enregistrées", - "render.saved_surfaces_help": "Les textures intégrées épinglées suivent l'occurrence sélectionnée en millimètres locaux. Une cible remplacée ou manquante est une erreur, jamais une réaffectation automatique.", - "render.scene_apply": "Appliquer le studio examiné", - "render.scene_consent": "Confirmer le remplacement de l'éclairage, de l'environnement, de l'exposition et du décor", - "render.scene_preserved_fields": "La caméra, l'échantillonnage, les dimensions, les associations optiques, la géométrie CAO et les matériaux techniques sont conservés.", - "render.scene_preserves_design": "Composer un éclairage et un décor passif pour le sujet visible. La géométrie, les matériaux techniques et la caméra restent distincts.", - "render.scene_replaces": "Remplace", - "render.scene_review": "Résoudre et examiner", - "render.scene_review_help": "Examinez la composition native complète avant d'appliquer. Les spécifications SCENE avancées non liées ne sont pas substituées.", - "render.scene_scope_details": "Portée de la composition", - "render.setup_legacy_environment": "Ce préréglage ancien utilise une rotation ou une intensité d'environnement héritée. Ces valeurs sont conservées ; convertissez-les explicitement avant d'enregistrer une tâche d'image complète.", - "render.setup_numeric_help": "Enregistrer consigne la méthode d'image active et tous ses réglages numériques. Recharger ou choisir un autre préréglage remplace ce brouillon ; restaurez la caméra séparément.", - "render.setup_offline_help": "Vous pouvez modifier et enregistrer cette méthode sans son moteur de rendu. Vérifier et Démarrer nécessitent un hôte disponible.", - "render.setup_runtime_unsupported": "Cette tâche complète ne peut pas encore être enregistrée : elle contient des textures ou des associations à des corps de la scène. Supprimez ces entrées temporaires avant d'enregistrer un préréglage portable.", - "render.setup_save_missing": "La configuration de rendu enregistrée est introuvable après l'exécution de la commande.", - "render.sharpening": "Accentuation des détails", - "render.shot_duplicate": "Dupliquer la prise de vue enregistrée", - "render.shot_manager": "Prises de vue enregistrées", - "render.shot_new_name": "Nom de la nouvelle prise de vue", - "render.shot_remove": "Supprimer la prise de vue enregistrée", - "render.shot_remove_help": "Supprime uniquement cette prise de vue enregistrée. La géométrie source et les images terminées sont conservées ; l'action peut être annulée.", - "render.shot_remove_title": "Supprimer la prise de vue enregistrée ?", - "render.shot_rename": "Renommer la prise de vue enregistrée", - "render.shot_saved_only": "Enregistrez d'abord le brouillon actuel. Dupliquer et renommer conservent exactement les options enregistrées et les références aux ressources.", - "render.sky_ground": "Sol · RVB linéaire", - "render.sky_horizon": "Horizon · RVB linéaire", - "render.sky_zenith": "Zénith · RVB linéaire", - "render.soft_focus": "Flou artistique", - "render.stage_panel_count": "Panneaux enregistrés", - "render.studio_add_area": "Ajouter une lumière surfacique", - "render.studio_ambient": "Radiance constante de l'environnement", - "render.studio_ambient_rgb": "Radiance constante de l'environnement (RVB linéaire)", - "render.studio_aperture": "Rayon d'ouverture", - "render.studio_area": "Lumière surfacique", - "render.studio_area_help": "Jusqu'à quatre rectangles à une face. Les demi-côtés orthogonaux U et V définissent la taille ; U × V fait face au côté éclairé. Les coordonnées sont en millimètres de l'espace monde.", - "render.studio_center": "Centre X, Y, Z (mm)", - "render.studio_denoise": "Réduire le bruit de l'image finale", - "render.studio_denoise_help": "Filtre final respectant les bords ; les détails fins peuvent s'adoucir. Le verre et les surfaces spéculaires nettes ne passent pas par le filtre.", - "render.studio_direction": "Direction vers le soleil (X, Y, Z)", - "render.studio_environment": "Environnement", - "render.studio_environment_bounds": "La rotation de l'environnement doit être finie dans ±1 000 000 radians et l'intensité comprise entre 0 et 100.", - "render.studio_environment_none": "Aucune carte d'environnement", - "render.studio_focus": "Distance de mise au point axiale", - "render.studio_half_u": "Demi-côté U (mm)", - "render.studio_half_v": "Demi-côté V (mm)", - "render.studio_hdr": "Fichier HDR Radiance", - "render.studio_hdr_browse": "Choisir un HDR…", - "render.studio_hdr_help": "Radiance .hdr, panorama 2:1, jusqu'à 2048 × 1024. L'EXR n'est pas disponible. L'hypothèse de couleur ne s'applique que si les primaires ne sont pas spécifiées.", - "render.studio_hdr_required": "Choisissez un fichier .hdr local.", - "render.studio_hdr_srgb": "Interpréter les primaires non spécifiées comme du sRVB linéaire", - "render.studio_intensity": "Intensité de l'environnement", - "render.studio_lens": "Profondeur de champ", - "render.studio_lens_perspective": "La profondeur de champ nécessite une caméra en perspective.", - "render.studio_lighting": "Éclairage de studio", - "render.studio_lighting_enable": "Utiliser un éclairage de studio personnalisé", - "render.studio_needs_review": "Examiner la méthode et les réglages", - "render.studio_radiance": "Radiance RVB linéaire", - "render.studio_ready": "Prêt à vérifier", - "render.studio_remove_area": "Supprimer la lumière surfacique", - "render.studio_rotation": "Rotation de l'environnement", - "render.studio_runtime_help": "Les réglages numériques du studio et les sources HDR vérifiées peuvent être enregistrés avec le préréglage. Les remplacements optiques et de matériau des corps restent temporaires et ne modifient pas les apparences enregistrées.", - "render.studio_saved": "Préréglage enregistré / caméra actuelle", - "render.studio_sky": "Ciel artistique", - "render.studio_sky_help": "Dégradé de ciel original pour l'éclairage ; ce n'est pas un modèle atmosphérique calibré.", - "render.studio_sun": "Soleil", - "render.studio_sun_radius": "Rayon angulaire", - "render.studio_title": "Studio de rendu", - "render.studio_tone_map": "Mappage des tons", - "render.subsurface_enable": "Marche aléatoire de diffusion intérieure", - "render.subsurface_help": "Diélectrique fermé uniquement. La diffusion et l'absorption RVB sont des coefficients distincts par mm. Les chemins diffusent à l'intérieur de la géométrie réelle, puis se réfractent ou se réfléchissent à la limite. Désactivez la transmission des ombres directes, le débruitage de surface et le volume extérieur ; utilisez une seule strate de Fresnel. Ce n'est ni un shader de diffusion, ni une grille de densité, ni un matériau mesuré. Les milieux denses peuvent nécessiter plus d'échantillons et une plus grande profondeur de chemin.", - "render.subsurface_rate": "Taux de collision de diffusion", - "render.transmission_scope": "Le verre GPU prend en charge des milieux disjoints certifiés. Les milieux imbriqués sans restriction et un estimateur de transmission sans bruit ne sont pas fournis.", - "render.transmission_strata": "Strates de Fresnel conditionnelles", - "render.transmission_strata_help": "1 conserve le flux d'origine. 2 ou 4 sous-chemins stratifient le premier choix de réflexion/transmission dans le verre, avec les lois de Snell et d'absorption inchangées. Plus de chemins coûtent plus de travail ; ce n'est ni du débruitage, ni une prise en charge des milieux imbriqués, ni la promesse d'un rendu plus rapide.", - "render.volume_albedo": "Albédo de diffusion · RVB linéaire", - "render.volume_anisotropy": "Cosinus moyen de phase", - "render.volume_enable": "Activer le milieu participant", - "render.volume_extinction": "Coefficient d'extinction", - "render.volume_help": "Transport GPU à l'intérieur d'une boîte finie, avec atténuation de Beer et diffusion HG sur les chemins de caméra et indirects. Utilise l'éclairage studio/HDR/ciel explicite, y compris l'atténuation des ombres. Un cosinus de phase positif diffuse vers l'avant. Les limites de verre et le débruitage de surface doivent être désactivés explicitement. Une extinction nulle laisse le transport inchangé. Ce n'est ni une atmosphère lunaire physique, ni une grille de densité, ni une émission volumique, ni un transport spectral, ni une propriété de matériau certifiée.", - "render.volume_max": "Limites maximales · mm monde", - "render.volume_min": "Limites minimales · mm monde", - "render.volume_title": "Volume homogène borné", - "section.off_hint": "Aucun plan choisi : OK désactive la coupe.", - "set by the sketch's lines": "défini par les lignes de l'esquisse", - "settings.frame_rate_details_note": "Ajoute un graphe des temps des dernières images avec les triangles dessinés superposés, un histogramme des temps d'image et ce que le GPU a dessiné. Cliquez sur la fréquence d'images dans la vue pour les afficher ou les masquer.", - "settings.window_system_details": "Détails", - "settings.window_system_note_now": "S'applique après un redémarrage. Actuellement : {now}.", - "settings.window_system_wayland_limited": "Certaines fonctionnalités sont limitées sous Wayland natif.", - "sheet.no_body": "il n'y a pas de corps de tôlerie : commencez-en un avec Bord tombé > Base, ou transformez une plaque en tôlerie avec Convertir en tôlerie (choisissez sa grande face plane)", - "sketch_panel.plane_angle": "{plane}, tourné de {angle}", - "sketch_panel.plane_fixed": "Un plan fixe", - "sketch_panel.plane_flipped": "{plane}, vu de l'autre côté", - "sketch_panel.plane_offset": "{plane}, décalé de {distance}", - "sketch_panel.plane_origin": "Le plan {plane}", - "timeline.delete_after_marker_one": "Supprimer 1 fonction après le marqueur d'historique", - "timeline.delete_after_marker_other": "Supprimer {count} fonctions après le marqueur d'historique", - "timeline.delete_many": "Supprimer {count} fonctions sélectionnées", - "timeline.feature_hint": "Double-clic pour modifier · glisser pour réordonner · clic droit pour plus", - "toolbar.render_appearance": "APPARENCE", - "toolbar.render_camera": "CAMÉRA", - "toolbar.render_environment": "ENVIRONNEMENT", - "toolbar.render_lighting": "ÉCLAIRAGE", - "ui.agent_chat_attach_selection": "Joindre la sélection", - "ui.agent_chat_attach_selection_tip": "Envoyer ce qui est sélectionné dans le modèle (faces, arêtes, fonctions, corps) avec le message, pour que l'agent sache de quoi vous parlez", - "ui.agent_chat_changes_n": "Modifications : {n}", - "ui.agent_chat_choose_model": "Choisir un modèle", - "ui.agent_chat_ctx_bodies": "Corps", - "ui.agent_chat_ctx_elements": "Éléments", - "ui.agent_chat_ctx_features": "Fonctions", - "ui.agent_chat_ctx_more": "+{n} de plus", - "ui.agent_chat_ctx_other": "Autre", - "ui.agent_chat_model_no_tools": "{model} ne peut pas utiliser les outils de SolidCraft : il peut seulement discuter. Choisissez un modèle qui prend en charge les outils.", - "ui.agent_chat_no_tool_call": "Le modèle n'a pas utilisé les outils de SolidCraft : la conception n'a donc pas été modifiée. Choisissez un modèle qui prend en charge l'appel d'outils ; voir Modèles locaux dans le guide du chat avec l'agent.", - "ui.agent_chat_pick_context": "Choisir le contexte", - "ui.agent_chat_pick_context_tip": "Choisissez des faces, arêtes, fonctions et corps du modèle à montrer à l'agent, puis appuyez sur OK", - "ui.agent_chat_provider_models": "{count} modèles", - "ui.agent_chat_provider_other": "Autre", - "ui.agent_chat_provider_tip": "Le fournisseur dont la liste suivante affiche les modèles.", - "ui.agent_chat_turn_unlimited": "Illimité", - "ui.agent_off_thread": "Garder la fenêtre réactive pendant que les agents exécutent des commandes", - "ui.agent_off_thread_note": "Les commandes lentes d'un agent (depuis le panneau IA ou un client MCP) sont calculées à côté de la fenêtre : vous pouvez continuer à tourner et inspecter la vue, et en arrêter une depuis la pastille dans la vue. Désactivé : chacune s'exécute sur le thread de la fenêtre, qui l'attend.", - "ui.ai_add_anthropic": "API compatible Anthropic", - "ui.ai_add_endpoint": "Point d'accès de l'API", - "ui.ai_kind": "Type", - "ui.ai_protocol": "Protocole", - "ui.ai_request_timed_out": "Le modèle a mis plus de {seconds} s. Vous pouvez augmenter le délai d'expiration des requêtes de ce point d'accès dans Préférences › Assistant.", - "ui.ai_request_timeout": "Délai d'expiration des requêtes", - "ui.ai_request_timeout_hint": "Durée maximale d'une requête au modèle de ce point d'accès, de 30 s à une heure. Augmentez-la pour un modèle local lent.", - "ui.ai_test_answered": "Joint : {model} a répondu", - "ui.ai_test_anthropic_tip": "Envoie un court message au point d'accès", - "ui.cosmetic_thread_markings": "Marquages de filetage cosmétiques", - "ui.cosmetic_thread_markings_help": "Afficher des marquages schématiques sur les parois cylindriques filetées. Ne modifie que l'affichage, jamais la conception ni les exports.", - "ui.extract_component": "Extraire dans un fichier…", - "ui.extract_design_changed": "La conception a changé pendant le choix du fichier. Relancez Extraire dans un fichier.", - "ui.extract_done": "Le composant est maintenant une conception à part entière, liée ici.", - "ui.extrude_auto_to_object": "Extruder jusqu'à une cible choisie", - "ui.extrude_auto_to_object_tip": "Dans Extrusion, avec un profil choisi, choisir une face, un sommet ou un plan parallèle hors de son plan fait passer la limite à Jusqu'à l'objet", - "ui.frame_rate_details": "Détails de la fréquence d'images", - "ui.hide_origin_by_default": "Masquer l'origine par défaut", - "ui.hide_origin_note": "Les nouvelles conceptions démarrent avec le dossier Origine masqué. Une conception garde son propre réglage d'Origine dès que vous l'affichez ou la masquez.", - "ui.history_edge_hint": "double-cliquer sur le bord", - "ui.history_hide_names": "Masquer les noms", - "ui.history_marker_tip": "Marqueur d'historique : faire glisser pour ramener le modèle en arrière ; les nouvelles fonctions s'insèrent ici", - "ui.history_names": "Noms", - "ui.history_play": "Lire jusqu'à la fin", - "ui.history_show_names": "Afficher les noms", - "ui.history_toggle_names": "Afficher ou masquer les noms des fonctions", - "ui.horizontal_constraint": "Contrainte horizontale", - "ui.link_copies": "Lier les copies identiques", - "ui.link_copies_keep": "Conserver", - "ui.link_copies_link": "Lier", - "ui.link_copies_text": "Ces composants construisent les mêmes corps que {name}. En faire des placements de son lien ?", - "ui.open_linked_design": "Ouvrir la conception liée", - "ui.perforate_margin_default": "depuis le diamètre", - "ui.perforate_pitch": "Pas", - "ui.perforate_square": "Carré", - "ui.perforate_staggered": "En quinconce (60°)", - "ui.perforate_title": "PERFORER", - "ui.plugins_none": "Aucun module externe ne correspond à cette recherche.", - "ui.plugins_search": "Rechercher des modules externes", - "ui.reference_1": "Référence 1", - "ui.reference_2": "Référence 2", - "ui.reference_distance": "Distance de référence", - "ui.replace_with_link_done": "Les copies sont maintenant des placements de la conception liée.", - "ui.shortcut_capture_add_key": "Ajoutez une touche ordinaire. Échap annule.", - "ui.shortcut_capture_hint": "Cliquez sur un raccourci, puis appuyez sur les modificateurs et une touche. Ajoutez les modificateurs en moins d'une seconde ; relâchez toutes les touches pour confirmer. Échap annule.", - "ui.shortcut_capture_press": "Appuyez sur les modificateurs et une touche. Échap annule.", - "ui.shortcut_capture_release": "Relâchez toutes les touches pour confirmer. Échap annule.", - "ui.shortcut_capture_settling": "Confirmation du raccourci… Échap annule.", - "ui.shortcut_cycles_modes": "Appuyer à nouveau sur le raccourci d'un outil change son mode", - "ui.shortcut_cycles_modes_tip": "Avant le premier point, appuyer à nouveau sur le raccourci d'un outil d'esquisse passe en revue ses modes de création. Désactivé : l'outil redémarre.", - "ui.shortcut_multiple_keys": "Utilisez des modificateurs et une seule autre touche. Cliquez sur le raccourci pour réessayer.", - "ui.step_values": "Incrémenter les valeurs avec les flèches et la molette", - "ui.step_values_tip": "Dans un champ de valeur en cours de saisie, Haut/Bas modifient un nombre simple de 1 (Maj : 10, Alt : 0,1), de même que la molette de la souris au-dessus du champ. Les expressions restent telles que saisies.", - "ui.turn_up_axis": "Changer l'axe vertical", - "ui.vertical_constraint": "Contrainte verticale", - "ui.viewport_theme_follow": "Suivre le thème", - "ui.window_system": "Système de fenêtrage", - "ui.window_system_auto": "Automatique", - "ui.window_system_wayland": "Wayland", - "ui.window_system_x11": "X11", - "update.prefs_web": "Rechargez la page pour obtenir la dernière version de l'application web. Si le réseau est indisponible ou si la mise à jour ne peut pas finir de se télécharger à temps, la version enregistrée s'ouvre à la place ; un téléchargement en cours se poursuit pour le prochain rechargement.", - "web.files.insert_drawings_hint": "Fichiers CAO, maillages, DXF ou SVG dans la conception ouverte", - "web.files.insert_stored_drawings_hint": "Dans la conception ouverte (fichiers CAO, maillages, DXF, SVG)", - "web.open_full": "Ouvrir dans SolidCraft", - "web.open_link": "Ouvrir la conception liée ?", - "web.open_link_confirm": "Il y a des modifications non enregistrées. Ouvrir la conception liée dans un nouvel onglet ?", - "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ choisir · Entrée applique la saisie · Échap fermer" - } -} From f8d2d90a16bf4d9eaf9e4a29ff475ffd571b92b4 Mon Sep 17 00:00:00 2001 From: Dahak Builds Date: Tue, 27 Oct 2026 12:40:19 +0000 Subject: [PATCH 029/102] Sketch: dimension placement and editing (#44) (#7056) * claim: #44 * Sketch: step dimension texts clear of each other and keep placed offsets (#44) * chore: re-trigger checks (Duplicate PR check was canceled by runner) --------- Co-authored-by: Dahak Builds --- crates/sketch/src/dims.rs | 21 ++++++--- crates/sketch/src/lib.rs | 4 +- crates/ui-egui/src/dim_view.rs | 82 +++++++++++++++++++++++++++++++++- 3 files changed, 98 insertions(+), 9 deletions(-) diff --git a/crates/sketch/src/dims.rs b/crates/sketch/src/dims.rs index 165717411..3a45d6170 100644 --- a/crates/sketch/src/dims.rs +++ b/crates/sketch/src/dims.rs @@ -208,6 +208,17 @@ pub fn default_text(f: &DimFrame, away: Vec2, px: f64) -> Option { } } +/// The text offset [`dim_layout_reaching`] uses when a dimension's text was never placed: +/// frame-relative, as in [`encode_text`]. +pub fn default_text_offset(f: &DimFrame, px: f64) -> Vec2 { + match *f { + DimFrame::Linear { .. } => Vec2::new(0.0, 22.0 * px), + DimFrame::Radial { radius, .. } => Vec2::new(1.0, 1.0) * ((radius + 18.0 * px) * std::f64::consts::FRAC_1_SQRT_2), + DimFrame::Angular { d0, sweep, .. } => Vec2::from_angle(d0.angle() + sweep * 0.5) * (48.0 * px), + DimFrame::ArcLength { radius, start, sweep, .. } => Vec2::from_angle(start + sweep * 0.5) * (radius + 20.0 * px), + } +} + /// Points along an arc around `c` (counter-clockwise from `a0` by `sweep`). fn arc_pts(c: Vec2, r: f64, a0: f64, sweep: f64) -> Vec { let n = ((sweep.abs() / 0.08).ceil() as usize).clamp(2, 200); @@ -284,7 +295,7 @@ pub fn dim_layout_reaching(f: &DimFrame, text: Option, px: f64, half: Vec2 DimFrame::Linear { p0, p1, dir } => { let n = dir.perp(); let m = (p0 + p1) * 0.5; - let t = text.unwrap_or(Vec2::new(0.0, 22.0 * px)); + let t = text.unwrap_or_else(|| default_text_offset(&DimFrame::Linear { p0, p1, dir }, px)); let (s, h) = (t.x, t.y); // The dimension line sits `h` across from the middle of the measured points. let q0 = p0 + n * (h - (p0 - m).dot(n)); @@ -326,7 +337,7 @@ pub fn dim_layout_reaching(f: &DimFrame, text: Option, px: f64, half: Vec2 } } DimFrame::Radial { center, radius, diameter, arc } => { - let t = text.unwrap_or_else(|| Vec2::new(1.0, 1.0) * ((radius + 18.0 * px) * std::f64::consts::FRAC_1_SQRT_2)); + let t = text.unwrap_or_else(|| default_text_offset(&DimFrame::Radial { center, radius, diameter, arc }, px)); let u = t.normalized().unwrap_or(Vec2::new(1.0, 1.0) * std::f64::consts::FRAC_1_SQRT_2); let d = t.len(); let at = center + u * radius; @@ -368,8 +379,7 @@ pub fn dim_layout_reaching(f: &DimFrame, text: Option, px: f64, half: Vec2 } DimFrame::Angular { vertex, d0, sweep } => { let a0 = d0.angle(); - let mid = a0 + sweep * 0.5; - let t = text.unwrap_or_else(|| Vec2::from_angle(mid) * (48.0 * px)); + let t = text.unwrap_or_else(|| default_text_offset(&DimFrame::Angular { vertex, d0, sweep }, px)); let r = t.len().max(arrow); out.text = vertex + t; // Extension rays from the vertex out past the arc. @@ -398,8 +408,7 @@ pub fn dim_layout_reaching(f: &DimFrame, text: Option, px: f64, half: Vec2 } } DimFrame::ArcLength { center, radius, start, sweep } => { - let mid = start + sweep * 0.5; - let t = text.unwrap_or_else(|| Vec2::from_angle(mid) * (radius + 20.0 * px)); + let t = text.unwrap_or_else(|| default_text_offset(&DimFrame::ArcLength { center, radius, start, sweep }, px)); let r = t.len().max(arrow); out.text = center + t; for a in [start, start + sweep] { diff --git a/crates/sketch/src/lib.rs b/crates/sketch/src/lib.rs index f30136b10..5b977eeeb 100644 --- a/crates/sketch/src/lib.rs +++ b/crates/sketch/src/lib.rs @@ -46,7 +46,9 @@ pub use curves::{ spline_end_tangent, spline_end_tangent_mode, spline_point, spline_point_mode, spline_polyline, spline_polyline_mode, }; pub use decompose::Budget; -pub use dims::{DimFrame, DimLayout, chain_centres, default_text, dim_frame, dim_layout, dim_layout_reaching, dim_reach, encode_text}; +pub use dims::{ + DimFrame, DimLayout, chain_centres, default_text, default_text_offset, dim_frame, dim_layout, dim_layout_reaching, dim_reach, encode_text, +}; pub use ends::{END_TOL, EndReport, EndTouch, UntiedEnd, loose_ends}; pub use fonts::{DEFAULT_FONT_FAMILY, FontData, families_in, find_style_in, font_data, font_data_styled, installed_families, set_font_file_check}; pub use freeform_offset::{FreeformOffset, FreeformOffsetOutput, OFFSET_TOLERANCE}; diff --git a/crates/ui-egui/src/dim_view.rs b/crates/ui-egui/src/dim_view.rs index 3c5aeae49..a0e02751b 100644 --- a/crates/ui-egui/src/dim_view.rs +++ b/crates/ui-egui/src/dim_view.rs @@ -20,7 +20,9 @@ use egui::{FontId, Pos2, Rect, Shape, Stroke, vec2}; use serde_json::json; use solidcraft_engine::Sel; use solidcraft_engine::geom::Vec2; -use solidcraft_engine::sketch::{ConstraintKind, DimFrame, chain_centres, default_text, dim_frame, dim_layout_reaching, dim_reach}; +use solidcraft_engine::sketch::{ + ConstraintKind, DimFrame, chain_centres, default_text, default_text_offset, dim_frame, dim_layout_reaching, dim_reach, +}; use crate::SolveApp; use crate::theme::Tokens; @@ -627,6 +629,9 @@ pub fn show(app: &mut SolveApp, ui: &egui::Ui, painter: &egui::Painter, proj: &P let ours = |c: &&solidcraft_engine::sketch::Constraint| c.param.as_deref() == Some(param.as_str()) || (c.driven && c.id == *param); constraints.extend(source.sketch.constraints.iter().filter(ours).map(|c| (source, c, true))); } + // Text boxes already drawn this frame, in draw order: a later dimension that would land + // on one of them steps clear of it (#44). + let mut placed: Vec = Vec::new(); for (source, c, is_draft) in constraints { if ss.sketch.view.hide_dimensions && !is_draft { continue; @@ -665,7 +670,25 @@ pub fn show(app: &mut SolveApp, ui: &egui::Ui, painter: &egui::Painter, proj: &P let half = Vec2::new(f64::from(size.x) * 0.5 * px, f64::from(size.y) * 0.5 * px); // Unplaced linear dimensions sit outside the shape they measure. let away = first_point(sk, &c.kind).and_then(|p| centres.get(p).copied()).unwrap_or(anchor); - let lay = dim_layout_reaching(&frame, c.text.or_else(|| default_text(&frame, away, px)), px, half, dim_reach(sk, &c.kind)); + let reach = dim_reach(sk, &c.kind); + let mut text = c.text.or_else(|| default_text(&frame, away, px)); + let mut lay = dim_layout_reaching(&frame, text, px, half, reach); + // #44: a text that would land on an already-drawn dimension's text steps to the next + // row — across the dimension line for a linear one, out from the centre for the rest — + // so stacked dimensions read as rows instead of one overwriting the next. + for _ in 0..6 { + let Some(t) = to(lay.text) else { break }; + if !placed.iter().any(|q| q.expand(-0.5).intersects(Rect::from_center_size(t, size).expand(-0.5))) { + break; + } + let row = (f64::from(size.y) + 2.0) * px; + let base = text.unwrap_or_else(|| default_text_offset(&frame, px)); + text = Some(match frame { + DimFrame::Linear { .. } => base + Vec2::new(0.0, row * if base.y < 0.0 { -1.0 } else { 1.0 }), + _ => base + base.normalized().unwrap_or(Vec2::X) * row, + }); + lay = dim_layout_reaching(&frame, text, px, half, reach); + } let stroke = Stroke::new(1.0, col); let mut segs = Vec::new(); for line in &lay.lines { @@ -682,6 +705,7 @@ pub fn show(app: &mut SolveApp, ui: &egui::Ui, painter: &egui::Painter, proj: &P } let Some(tc) = to(lay.text) else { continue }; let r = Rect::from_center_size(tc, size); + placed.push(r); painter.rect_filled(r, tk.radius_sm / 2, tk.viewport_top.gamma_multiply(0.85)); painter.galley(r.min + vec2(3.0, 1.0), galley, col); if matches!(frame, DimFrame::ArcLength { .. }) { @@ -1192,6 +1216,60 @@ mod tests { cancel(); } + /// Two dimensions whose texts were placed on the same spot: the later one steps to the + /// next row instead of sitting on the first (#44). + #[test] + fn dimension_texts_placed_on_each_other_step_clear() { + cancel(); + let mut h = crate::scenario::Harness::new(); + h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); + h.app.run("sketch.line", json!({"points":[[0,10],[20,10]],"infer":false})).unwrap(); + h.app.run("sketch.line", json!({"points":[[0,0],[20,0]],"infer":false})).unwrap(); + // Both texts are placed at the same sketch point: unnudged, they would coincide. + h.app.run("sketch.dimension", json!({"entities":["l1"],"text_at":[10,20]})).unwrap(); + h.app.run("sketch.dimension", json!({"entities":["l2"],"text_at":[10,20]})).unwrap(); + h.call("ui.view", json!({"view":"top"})); + h.app.cam.distance = 90.; + h.app.cam.target = solidcraft_engine::geom::Vec3::new(10., 10., 0.); + h.settle(); + let rects = crate::dim_view::text_rects(); + assert_eq!(rects.len(), 2, "{rects:?}"); + let want = h.at(&json!({"world":[10., 20., 0.]})).unwrap(); + let first = rects[0].1.center(); + assert!((first.x as f64 - want[0]).abs() < 1.5 && (first.y as f64 - want[1]).abs() < 1.5, "the first text stays where it was clicked"); + assert!(!rects[0].1.expand(-0.5).intersects(rects[1].1.expand(-0.5)), "the second text stepped clear: {:?} {:?}", rects[0].1, rects[1].1); + } + + /// Editing a dimension's value moves the geometry it measures; its placed text keeps its + /// offset from that geometry rather than jumping to the default place (#44). + #[test] + fn a_dimension_text_keeps_its_offset_from_the_geometry_when_edited() { + cancel(); + let mut h = crate::scenario::Harness::new(); + h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); + h.app.run("sketch.line", json!({"points":[[0,10],[20,10]],"infer":false})).unwrap(); + let param = h.app.run("sketch.dimension", json!({"entities":["l1"],"text_at":[10,25]})).unwrap()["param"].as_str().unwrap().to_string(); + h.call("ui.view", json!({"view":"top"})); + h.app.cam.distance = 120.; + h.app.cam.target = solidcraft_engine::geom::Vec3::new(10., 12., 0.); + h.settle(); + h.app.run("parameters.change", json!({"name":param,"expression":"30"})).unwrap(); + h.settle(); + let state = h.app.session.world_state(); + let solved = state.sketch(h.app.session.active_sketch.unwrap()).unwrap(); + let c = solved.sketch.constraints.iter().find(|c| c.param.as_deref() == Some(param.as_str())).unwrap(); + // The placed offset (15 above the measured line) is kept with the dimension. + assert_eq!(c.text, Some(Vec2::new(0.0, 15.0)), "{c:?}"); + // And the text draws at that offset from the edited geometry, not at the default place. + let DimFrame::Linear { p0, p1, dir } = dim_frame(&solved.sketch, &c.kind).unwrap() else { panic!("a length dimension is linear") }; + let t = c.text.unwrap(); + let want = h + .at(&json!({"world":[(p0 + p1).x * 0.5 + dir.x * t.x + dir.perp().x * t.y, (p0 + p1).y * 0.5 + dir.y * t.y + dir.perp().y * t.y, 0.]})) + .unwrap(); + let shown = crate::dim_view::text_at(¶m).unwrap(); + assert!((shown.x as f64 - want[0]).abs() < 1.5 && (shown.y as f64 - want[1]).abs() < 1.5, "the text stayed put relative to the geometry"); + } + #[test] fn inch_labels_convert_all_lengths_preserve_four_digits_and_leave_angles_alone() { let length = ConstraintKind::Length { l: 0, value: 25.4 }; From 0f8593b1802ecb6f5ee37d5285a0ea7bf877c77d Mon Sep 17 00:00:00 2001 From: NOWN-DEV <257771410+NOWN-DEV@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:40:26 +0000 Subject: [PATCH 030/102] Sketch: a tangent at an end the line and the round share keeps its side (#7428) (#7447) A tangency at a point the two curves share (or a line's end held on the round) is solved as a block of its own, and the orientations a solve keeps left it out. When a point placed by parameters moved far, the line could land on the other tangent from its far end (its mirror image) with every constraint met and no warning. It now keeps the round's side of the line, as a tangency away from the ends already does: kept where the move can be walked there, reported as a flip where it can't. Fixes #7428. Co-authored-by: Claude Opus 5.5 --- .../engine/src/cmd/sketch_point_expr_tests.rs | 58 +++++++++++++++++++ crates/sketch/src/solver.rs | 9 ++- 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/crates/engine/src/cmd/sketch_point_expr_tests.rs b/crates/engine/src/cmd/sketch_point_expr_tests.rs index 2c5422014..4a3d3c819 100644 --- a/crates/engine/src/cmd/sketch_point_expr_tests.rs +++ b/crates/engine/src/cmd/sketch_point_expr_tests.rs @@ -129,3 +129,61 @@ fn a_point_its_parameters_put_out_of_range_is_an_error_not_a_crash() { let r = Session::new(solidcraft_doc::Document::from_json(&hostile).unwrap()); assert!(r.model.results.iter().any(|r| r.error.is_some()), "the sketch reports the bad point"); } + +/// A line from a point placed by parameters, tangent to an arc at the arc's start (the end they +/// share): the two tangents from the point are mirror images, and the sketch was drawn on one. +/// Moved by its parameters, the line stays on the side it was drawn on (the arc's centre keeps +/// its side of the line; the other tangent solves every constraint too), and where the move can +/// only end on the other side (a straight walk there runs through the arc) it says so. +#[test] +fn a_tangent_from_a_placed_point_keeps_the_side_it_was_drawn_on() { + let mut s = Session::default(); + run(&mut s, "parameters.add", json!({"name": "ex", "expression": "30 mm"})); + run(&mut s, "parameters.add", json!({"name": "ey", "expression": "-12 mm"})); + run(&mut s, "sketch.create", json!({"plane": "XY", "name": "S"})); + let r = 7.5_f64; + let e0 = Vec2::new(30.0, -12.0); + // The tangent point left of origin -> E, and the arc on from it. + let a = e0.y.atan2(e0.x) + (r / e0.len()).acos(); + let at = |t: f64| [r * t.cos(), r * t.sin()]; + run(&mut s, "sketch.point", json!({"point": ["ex", "ey"], "id": "e"})); + run(&mut s, "sketch.point", json!({"point": [0, 0], "id": "o"})); + run(&mut s, "sketch.constraint.fix", json!({"entities": ["o"], "fixed": true})); + run(&mut s, "sketch.point", json!({"point": at(a + 1.2), "id": "q"})); + run(&mut s, "sketch.constraint.fix", json!({"entities": ["q"], "fixed": true})); + run(&mut s, "sketch.arc.three_point", json!({"start": at(a), "end": at(a + 1.2), "through": at(a + 0.6), "connect": false, "id": "round"})); + run(&mut s, "sketch.constraint.coincident", json!({"a": "round.center", "b": "o"})); + run(&mut s, "sketch.constraint.coincident", json!({"a": "round.end", "b": "q"})); + run(&mut s, "sketch.line", json!({"points": ["e", "round.start"], "ids": ["flank"]})); + run(&mut s, "sketch.constraint.tangent", json!({"a": "flank", "b": "round"})); + run(&mut s, "sketch.finish", json!({})); + no_trouble(&s); + let f = s.doc.find_feature("S").unwrap().id; + // +1: the tangent point left of origin -> E, as drawn. + let side = |s: &Session| { + let st = s.model.state(); + let sk = &st.sketch(f).unwrap().sketch; + let Some(solidcraft_sketch::CurveKind::Line { a, b }) = sk.curves.iter().find(|c| c.id == "flank").map(|c| &c.kind) else { + panic!("no flank") + }; + let (e, t) = (sk.points[*a].pos, sk.points[*b].pos); + (e.cross(t).signum(), (t.len() - r).abs() < 1e-6) + }; + assert_eq!(side(&s), (1.0, true)); + let mut flipped = Vec::new(); + for (x, y) in [(12, -25), (-20, -18), (-28, 5), (-10, 26), (18, 22), (30, -12), (-30, -2), (25, 15), (5, -30), (-25, 20), (30, -12)] { + run(&mut s, "parameters.change", json!({"name": "ex", "expression": format!("{x} mm")})); + run(&mut s, "parameters.change", json!({"name": "ey", "expression": format!("{y} mm")})); + let (sd, on) = side(&s); + let warned = s.model.results.iter().any(|r| r.warning.is_some() || r.error.is_some()); + assert!(on || warned, "({x}, {y}): the tangent point is off the arc without a word"); + if sd != 1.0 && !warned { + flipped.push((x, y)); + } + // Reached in a straight walk that stays clear of the arc: kept, and nothing to say. + if [(12, -25), (-20, -18), (5, -30), (25, 15)].contains(&(x, y)) { + assert!(sd == 1.0 && !warned, "({x}, {y}): side {sd}, warned {warned}"); + } + } + assert!(flipped.is_empty(), "the tangent went over to the other side, without a word, at {flipped:?}"); +} diff --git a/crates/sketch/src/solver.rs b/crates/sketch/src/solver.rs index 40ea39a1e..c16ecaf85 100644 --- a/crates/sketch/src/solver.rs +++ b/crates/sketch/src/solver.rs @@ -2155,7 +2155,9 @@ fn orients(s: &State, sub: &[(Block, Vec)]) -> Vec<(Orient, Vec)> let mut joins = Vec::new(); let mut edges = Vec::new(); for (b, _) in sub { - let Block::User(ci, kind) = b else { continue }; + // A tangency at a point the two curves share (or a line's end held on the round) is a + // block of its own; its round keeps its side of the line all the same. + let (Block::User(ci, kind) | Block::TangentAt(ci, kind, _)) = b else { continue }; match **kind { ConstraintKind::Coincident { p, q } => joins.push((p, q)), ConstraintKind::Distance { p, q, .. } => edges.push((p, q, *ci)), @@ -2175,8 +2177,9 @@ fn orients(s: &State, sub: &[(Block, Vec)]) -> Vec<(Orient, Vec)> out.push((Orient::OfLine(*centre, l, value + s.round(c).1), vec![*ci])); } } - // A line tangent to a circle away from both their ends: the circle stays on its side - // (the other tangent of that direction is a diameter away). + // A line tangent to a circle: the circle stays on its side (away from their ends, the + // other tangent of that direction is a diameter away; at an end they share, the other + // tangent from the line's far end is its mirror image). ConstraintKind::Tangent { a, b } => { let (l, c) = if s.is_line(a) { (a, b) } else { (b, a) }; if s.is_line(l) From ad749d3399e059e64d7747829020a7793a87d2f4 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:40:29 +0000 Subject: [PATCH 031/102] Joints: the model is evaluated for the placements a solve leaves (#7084) (#7085) Session::refresh evaluated the model and then solved the joints, which writes the solved placements into the design. A feature that reads where a part is placed kept the result made for the placement before the solve: a mirror of a jointed part's body, made from the root, ended up 4 mm below the part after a move the slider took back. When the solve moves parts, the model is now evaluated again for the placements the design holds, and the joints solved for that model, at most three rounds. Features that don't read placements come from the cache. Co-authored-by: Claude Opus 5.5 --- crates/engine/src/cmd/joints_tests.rs | 32 +++++++++++++++++++++++++++ crates/engine/src/lib.rs | 16 +++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/joints_tests.rs b/crates/engine/src/cmd/joints_tests.rs index c9d22a931..eecc23d48 100644 --- a/crates/engine/src/cmd/joints_tests.rs +++ b/crates/engine/src/cmd/joints_tests.rs @@ -301,6 +301,38 @@ fn faces_mate_by_default() { assert!(near(place(&s, "B", Vec3::new(25.0, 5.0, 10.0)), Vec3::new(5.0, 5.0, 0.0)), "{:?}", place(&s, "B", Vec3::new(25.0, 5.0, 10.0))); } +/// A move of a jointed part that the joint takes back: the model is evaluated for the +/// placements the solve leaves, so a mirror of the part's body, made from the root, is where a +/// fresh evaluation of the design puts it. The model was the one evaluated for the move before +/// the solve took it back, and its mirror didn't match the part. +#[test] +fn a_feature_reading_a_jointed_parts_placement_follows_the_solve() { + let mut s = Session::default(); + for (cmd, p) in [ + ("component.create", json!({"grounded": true, "name": "Base"})), + ("solid.box", json!({"corner": [-11, -25, 0], "height": 9, "length": 11, "width": 14})), + ("component.create", json!({"grounded": false, "name": "Slide"})), + ("solid.cylinder", json!({"base": [-2, -10, 7], "height": 7, "radius": 2})), + ("component.activate", json!({"component": "root"})), + ("joint.as_built", json!({"a": "Base:1", "b": "Slide:1", "name": "Rail", "type": "slider"})), + ("solid.mirror", json!({"bodies": ["Body2"], "plane": "XY"})), + ("occurrence.move", json!({"occurrence": "Slide:1", "translate": [-10, -18, 2]})), + ] { + s.execute(cmd, &p).unwrap_or_else(|e| panic!("{cmd}: {e}")); + } + let boxes = |st: &solidcraft_doc::ModelState| { + st.bodies + .iter() + .map(|b| (b.name.clone(), b.body.outline_bounds())) + .map(|(n, bb)| format!("{n} {:.6?} {:.6?}", bb.min, bb.max)) + .collect::>() + }; + let mut fresh = solidcraft_doc::Model::new(); + fresh.no_cache = true; + fresh.evaluate(&s.doc); + assert_eq!(boxes(&s.model.state()), boxes(&fresh.state())); +} + /// #1239: two parts as bodies of one component (a multi-body STEP import). The refusal names the /// way out, and after Create Components from Bodies the same origins make the joint. #[test] diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index a80d69d2a..e9e28f0e8 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -831,7 +831,21 @@ impl Session { self.prune_occurrence_state(); // Joints follow the geometry their origins snap to. if !self.doc.assembly.joints.is_empty() { - self.solve_joints(); + // A solve that moves parts changes what features reading where a part is placed + // (a mirror of a placed body) make: the model is evaluated again for the placements + // the design now holds, and the joints solved for that model, a few times at most. + for _ in 0..3 { + let before = self.doc.clone(); + self.solve_joints(); + if Arc::ptr_eq(&before, &self.doc) || before.occurrences == self.doc.occurrences { + break; + } + self.model.evaluate(&self.doc); + #[cfg(test)] + { + self.evaluations += 1; + } + } } cmd::motion::associative::refresh(self); if let Some(id) = self.active_sketch From 4766aea8d74081591d2a442d8881e9b7a714546a Mon Sep 17 00:00:00 2001 From: Kai Evans Date: Tue, 27 Oct 2026 12:40:40 +0000 Subject: [PATCH 032/102] Themes: Okibi's and Akari's start page rail is the void, not the ember (#7061) Neither theme set the File view's rail colours, so SolidCraft derived the rail from the accent and the start page's whole sidebar was the primary orange, against the design system's one-or-two ember budget (#4868 derives an unset rail from the accent). The rail is now n0 (void, beside the app bar), its hovered and open row n3 (raised), and its text n11. --- assets/styles/ui/themes/akari.json | 3 +++ assets/styles/ui/themes/okibi.json | 3 +++ crates/ui-egui/src/theme_files.rs | 13 +++++++++++++ 3 files changed, 19 insertions(+) diff --git a/assets/styles/ui/themes/akari.json b/assets/styles/ui/themes/akari.json index 8ad8d3747..87880d728 100644 --- a/assets/styles/ui/themes/akari.json +++ b/assets/styles/ui/themes/akari.json @@ -54,6 +54,9 @@ "dimension_driven": "#6c6863", "error": "#c71529", "field": "#fffdfa", + "file_rail": "#e1ddd8", + "file_rail_hover": "#ebe7e2", + "file_rail_ink": "#13110e", "form_accent": "#5844bc", "form_dim": "#6c6863", "form_error": "#c71529", diff --git a/assets/styles/ui/themes/okibi.json b/assets/styles/ui/themes/okibi.json index 2b8d33481..fe225ade3 100644 --- a/assets/styles/ui/themes/okibi.json +++ b/assets/styles/ui/themes/okibi.json @@ -54,6 +54,9 @@ "dimension_driven": "#8f9296", "error": "#f85052", "field": "#2c2e31", + "file_rail": "#0f1113", + "file_rail_hover": "#222527", + "file_rail_ink": "#e1e3e5", "form_accent": "#a6a2fc", "form_dim": "#8f9296", "form_error": "#ff6060", diff --git a/crates/ui-egui/src/theme_files.rs b/crates/ui-egui/src/theme_files.rs index 1b064af94..caa8217f7 100644 --- a/crates/ui-egui/src/theme_files.rs +++ b/crates/ui-egui/src/theme_files.rs @@ -861,6 +861,19 @@ mod tests { assert_eq!(resolve(&own).file_rail, Color32::from_rgb(0x10, 0x20, 0x30)); } + /// Okibi and Akari spend their ember on one or two marks a screen: the start page's rail is + /// one of their neutrals, not their accent. + #[test] + fn okibi_and_akari_rails_are_neutral() { + for id in ["okibi", "akari"] { + let t = resolve(builtin().iter().find(|t| t.id == id).unwrap()); + for c in [t.file_rail, t.file_rail_hover] { + let [r, g, b, _] = c.to_array(); + assert!(r.max(g).max(b) - r.min(g).min(b) <= 12, "{id}: {c:?} is tinted"); + } + } + } + #[test] fn a_short_file_sets_only_its_colours() { let t = parse(r##"{"format":"solidcraft-theme/1","name":"My Theme!","base":"light","colors":{"panel":"#102030","axis_z":"#0000ff80"}}"##) From 4ad285570c315665939189463689e65868c03362 Mon Sep 17 00:00:00 2001 From: Liu XingJian <2550975@tongji.edu.cn> Date: Tue, 27 Oct 2026 12:40:41 +0000 Subject: [PATCH 033/102] Control channel: retire a subscription when the events thread ends (#7226) (#7336) The seat of a subscribed connection on the DesignWatch lived in the connection's serve thread. It left only when that thread saw the end of the stream, so one unbounded blocking read stood between a closed client and the count. Under load (GPU backend probing and crash-dump children on Windows) that read can sit for seconds; the test's 10 s deadline then expired and `!WATCH.subscribed()` failed (#7226). Move the seat onto the events thread. The thread ends on `stop`, or on the first write a closed client refuses, so the next publish retires the seat. The test now publishes while it waits, and its wait no longer depends on the serve thread. --- apps/solidcraft/src/control_server.rs | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/apps/solidcraft/src/control_server.rs b/apps/solidcraft/src/control_server.rs index 9602aa9d1..ed78ef5f5 100644 --- a/apps/solidcraft/src/control_server.rs +++ b/apps/solidcraft/src/control_server.rs @@ -417,7 +417,6 @@ impl Lines { struct Subscription { lines: Arc, stop: Arc, - _counted: Subscriber, } impl Subscription { @@ -435,10 +434,13 @@ impl Subscription { let stop = Arc::new(AtomicBool::new(false)); let first = lines.turn.lock().unwrap_or_else(PoisonError::into_inner); let (l, s) = (lines.clone(), stop.clone()); - std::thread::Builder::new().stack_size(64 * 1024).spawn(move || send_events(design, &l, &s, seen)).ok()?; + // The connection's seat on the watch rides the events thread: it leaves when the thread + // does, so the next failed write to a closed client retires it even while the connection's + // own thread is slow to see the end of the stream (#7226). + std::thread::Builder::new().stack_size(64 * 1024).spawn(move || send_events(design, &l, &s, seen, counted)).ok()?; let sent = send(&mut &lines.socket, reply); drop(first); - Some((Subscription { lines, stop, _counted: counted }, sent)) + Some((Subscription { lines, stop }, sent)) } } @@ -458,8 +460,10 @@ impl Drop for Subscription { } /// The `design.changed` lines of a subscribed connection, each time the design differs from the -/// last one it was told of (`seen`), until `stop`. -fn send_events(design: &DesignWatch, lines: &Lines, stop: &AtomicBool, mut seen: (String, u64)) { +/// last one it was told of (`seen`), until `stop`. Owns the connection's seat on the watch +/// (`counted`), so the seat leaves exactly when this thread does: on `stop`, or on the first +/// write a closed client refuses (#7226). +fn send_events(design: &DesignWatch, lines: &Lines, stop: &AtomicBool, mut seen: (String, u64), _counted: Subscriber) { while !stop.load(Ordering::Relaxed) { let Some(now) = design.wait(&seen, stop, Duration::from_secs(1)).filter(|now| *now != seen) else { continue }; if lines.send(&json!({"event": "design.changed", "params": {"document_id": now.0, "revision": now.1}})).is_err() { @@ -866,11 +870,17 @@ mod tests { assert_eq!(next(&mut lines), json!({"id": 3, "ok": true, "result": "ui.view"})); writeln!(quiet_out, "{}", json!({"id": 2, "method": "ui.view"})).unwrap(); assert_eq!(next(&mut quiet), json!({"id": 2, "ok": true, "result": "ui.view"}), "no events without subscribing"); - // Closed, it is no longer counted. + // Closed, it is no longer counted. Each publish asks the events thread for one more line, + // and its write to the closed connection is what retires the seat; that keeps the wait off + // the connection's own thread, which anything else this process is doing may hold up past + // the deadline (#7226). drop((out, lines)); + let mut revision = 11; let deadline = Instant::now() + Duration::from_secs(10); while WATCH.subscribed() && Instant::now() < deadline { - std::thread::sleep(Duration::from_millis(10)); + WATCH.publish("d-1", revision); + revision += 1; + std::thread::sleep(Duration::from_millis(20)); } assert!(!WATCH.subscribed()); } From 8372c476abb43a3fd51f24569da53008f25b4d66 Mon Sep 17 00:00:00 2001 From: raykholo Date: Tue, 27 Oct 2026 12:41:08 +0000 Subject: [PATCH 034/102] Add the built-in CGA theme (#7593) (#7594) --- assets/styles/ui/themes/cga.json | 215 ++++++++++++++++++++++++++++++ attribution/pending/cga-theme.md | 1 + crates/ui-egui/src/theme_files.rs | 34 ++++- 3 files changed, 248 insertions(+), 2 deletions(-) create mode 100644 assets/styles/ui/themes/cga.json create mode 100644 attribution/pending/cga-theme.md diff --git a/assets/styles/ui/themes/cga.json b/assets/styles/ui/themes/cga.json new file mode 100644 index 000000000..56bc8b3e9 --- /dev/null +++ b/assets/styles/ui/themes/cga.json @@ -0,0 +1,215 @@ +{ + "base": "dark", + "colors": { + "accent": "#55ffff", + "accent_soft": "#ff55ff", + "agent_busy": "#55ffff", + "agent_ok": "#55ff55", + "app_bar": "#000000", + "app_bar_hover": "#ffffff18", + "app_bar_hover_button": "#ffffff22", + "app_bar_hover_strong": "#ffffff30", + "app_bar_hover_subtle": "#ffffff10", + "app_bar_separator": "#00aaaa", + "app_bar_tab_active": "#aa00aa", + "app_bar_text": "#ffffff", + "axis_x": "#ff5555", + "axis_y": "#55ff55", + "axis_z": "#5555ff", + "bend_down": "#ffff55", + "bend_up": "#55ff55", + "body": "#aa00aa", + "body_edge": "#55ffff", + "body_selected": "#ffff55", + "border": "#55ffff", + "box_crossing": "#ff55ff", + "box_window": "#55ffff", + "chip": "#aa00aa", + "construction_geom": "#aaaaaa", + "construction_plane": "#ffff5522", + "continuity": [ + "#55ff55", + "#5555ff", + "#ffff55", + "#ff55ff" + ], + "control_border": "#55ffff", + "control_fill": "#000000", + "cube_border": "#55ffff", + "cube_face": "#000000", + "cube_hover": "#aa00aa", + "cube_text": "#ffffff", + "dialog_bg": "#000000", + "dialog_body": "#000000", + "dialog_border": "#55ffff", + "dialog_footer": "#000000", + "dialog_label": "#55ffff", + "dialog_rule": "#00aaaa", + "dimension": "#ffffff", + "dimension_driven": "#aaaaaa", + "error": "#ff5555", + "field": "#000000", + "file_background": "#000000", + "file_border": "#55ffff", + "file_dim": "#55ffff", + "file_image_tint": "#ffffff", + "file_primary": "#000000", + "file_primary_border": "#55ffff", + "file_primary_ink": "#55ffff", + "file_rail": "#000000", + "file_rail_hover": "#aa00aa", + "file_rail_ink": "#ffffff", + "file_recovery": "#000000", + "file_recovery_border": "#ff55ff", + "file_recovery_ink": "#ff55ff", + "file_recovery_well": "#000000", + "file_surface": "#000000", + "form_accent": "#aa0000", + "form_dim": "#55ffff", + "form_error": "#ff5555", + "form_error_fill": "#000000", + "form_fill": "#ff5555", + "form_ink": "#ffffff", + "form_primary": "#ff55ff", + "form_soft": "#000000", + "form_success": "#55ff55", + "form_success_fill": "#000000", + "form_tab_ink": "#ff5555", + "glyph_bg": "#000000", + "glyph_edge": "#ff55ff", + "glyph_text": "#ff55ff", + "grid": "#555555", + "grid_major": "#00aaaa", + "hover": "#aa00aa", + "hover_edge": "#ffffff", + "hover_edge_halo": "#000000", + "hover_profile": "#ffffff40", + "hover_profile_edge": "#ffffff", + "icon": "#ffffff", + "icons.agent": "#ff55ff", + "icons.highlight": "#ffffff", + "icons.marker_halo": "#000000cc", + "interference": "#ff5555", + "logo": [ + "#ffffff", + "#55ffff", + "#ff55ff" + ], + "manipulator": "#55ffff", + "mesh_accent": "#00aa00", + "mesh_fill": "#55ff55", + "mesh_ink": "#55ff55", + "mesh_soft": "#000000", + "on_accent": "#000000", + "origin_plane": "#55ffff20", + "origin_plane_edge": "#55ffff80", + "origin_plane_hover": "#ff55ff40", + "origin_point": "#ffffff", + "overlay": "#000000", + "panel": "#000000", + "panel_header": "#000000", + "preview_add": "#55ffff", + "preview_cut": "#ff555566", + "preview_new": "#ffff55", + "preview_sketch": "#55ff55", + "profile_fill": "#55ffff22", + "render_accent": "#aaaaaa", + "render_fill": "#ffffff", + "render_ink": "#ffffff", + "render_soft": "#000000", + "rubber_band": "#55ffff", + "section_cap": "#ffff55", + "sel_edge": "#ffff55", + "sel_edge_rim": "#000000", + "sel_face": "#ffff55", + "sel_profile": "#ffff55", + "sel_profile_edge": "#ffff55", + "sel_vertex": "#ffff55", + "selected_bg": "#ff55ff", + "selected_ink": "#000000", + "sheet_fill": "#aaaaaa", + "sheet_ink": "#aaaaaa", + "sheet_soft": "#000000", + "sketch": "#55ffff", + "sketch_accent": "#ff55ff", + "sketch_centerline": "#ffff55", + "sketch_construction": "#aaaaaa", + "sketch_fixed": "#ffffff", + "sketch_halo": "#000000", + "sketch_ink": "#ff55ff", + "sketch_locked": "#55ff55", + "sketch_lost": "#ff5555", + "sketch_point": "#ffffff", + "sketch_point_free": "#55ffff", + "sketch_projected": "#ff55ff", + "sketch_soft": "#000000", + "surface_accent": "#aa5500", + "surface_fill": "#ffff55", + "surface_ink": "#ffff55", + "surface_soft": "#000000", + "tab_on_fill_dark": "#000000", + "text": "#ffffff", + "text_dim": "#55ffff", + "timeline": "#000000", + "timeline_item": "#000000", + "timeline_item_error": "#aa0000", + "timeline_marker": "#55ffff", + "toolbar": "#000000", + "viewport_bottom": "#000000", + "viewport_top": "#000000", + "warning": "#ffff55" + }, + "format": "solidcraft-theme/1", + "name": "CGA", + "radii": { + "radius_sm": 0, + "radius_md": 0, + "radius_lg": 0, + "radius_xl": 0, + "control_radius": 0, + "sketch_mode_radius": 0 + }, + "icon_palette": { + "ink": "#000000", + "line": "#ffffff", + "passive-1": "#ffffff", + "passive-2": "#aaaaaa", + "passive-3": "#555555", + "guide": "#55ffff", + "solid": [ + "#ffffff", + "#55ffff", + "#00aaaa" + ], + "surface": [ + "#ffffff", + "#ffff55", + "#aa5500" + ], + "mesh": [ + "#ffffff", + "#55ff55", + "#00aa00" + ], + "form": [ + "#ffffff", + "#ff5555", + "#aa0000" + ], + "sketch": [ + "#ffffff", + "#ff55ff", + "#aa00aa" + ], + "constraint": [ + "#ffffff", + "#ff55ff", + "#aa00aa" + ], + "construction": [ + "#ffffff", + "#ffff55", + "#aa5500" + ] + } +} diff --git a/attribution/pending/cga-theme.md b/attribution/pending/cga-theme.md new file mode 100644 index 000000000..c358789e7 --- /dev/null +++ b/attribution/pending/cga-theme.md @@ -0,0 +1 @@ +| assets/styles/ui/themes/cga.json | SolidCraft contributors | original SolidCraft theme file using the 16 colours of the IBM Color Graphics Adapter (black, cyan, magenta, and white of its high-intensity palette 1 for the interface) | MIT OR Apache-2.0 | diff --git a/crates/ui-egui/src/theme_files.rs b/crates/ui-egui/src/theme_files.rs index caa8217f7..dbe6bde90 100644 --- a/crates/ui-egui/src/theme_files.rs +++ b/crates/ui-egui/src/theme_files.rs @@ -610,8 +610,8 @@ pub fn export(name: &str, base: Base, t: &Tokens) -> Value { json!({"format": FORMAT, "name": name, "base": base, "colors": colors, "radii": radii, "borders": borders, "icon_palette": icon_palette}) } -/// The theme files that come with SolidCraft (original files; Gruvbox, Tokyo Night, Solarized, Nord, Nosferatu and Catppuccin map open-source palettes, MIT; Okibi and Akari map the Okibi design system; Clay and Clay Dark are original warm paper and charcoal palettes). -const BUILTIN: [(&str, &str); 24] = [ +/// The theme files that come with SolidCraft (original files; Gruvbox, Tokyo Night, Solarized, Nord, Nosferatu and Catppuccin map open-source palettes, MIT; Okibi and Akari map the Okibi design system; Clay and Clay Dark are original warm paper and charcoal palettes; CGA keeps to the 16 colours of the IBM Color Graphics Adapter). +const BUILTIN: [(&str, &str); 25] = [ ("gruvbox-dark", include_str!("../../../assets/styles/ui/themes/gruvbox-dark.json")), ("gruvbox-dark-hard", include_str!("../../../assets/styles/ui/themes/gruvbox-dark-hard.json")), ("gruvbox-dark-soft", include_str!("../../../assets/styles/ui/themes/gruvbox-dark-soft.json")), @@ -636,6 +636,7 @@ const BUILTIN: [(&str, &str); 24] = [ ("akari", include_str!("../../../assets/styles/ui/themes/akari.json")), ("clay", include_str!("../../../assets/styles/ui/themes/clay.json")), ("clay-dark", include_str!("../../../assets/styles/ui/themes/clay-dark.json")), + ("cga", include_str!("../../../assets/styles/ui/themes/cga.json")), ]; /// The built-in themes, read once (one that fails to read is left out; a test reads them all). @@ -825,6 +826,35 @@ mod tests { } } + /// CGA uses only the 16 colours of the IBM Color Graphics Adapter (alpha only on translucent + /// tokens) and sets every colour, so nothing falls back to Dark's palette. + #[test] + fn cga_uses_only_the_sixteen_cga_colours() { + const CGA: [&str; 16] = [ + "000000", "0000aa", "00aa00", "00aaaa", "aa0000", "aa00aa", "aa5500", "aaaaaa", "555555", "5555ff", "55ff55", "55ffff", "ff5555", + "ff55ff", "ffff55", "ffffff", + ]; + fn colours<'a>(v: &'a Value, out: &mut Vec<&'a str>) { + match v { + Value::String(s) if s.starts_with('#') => out.push(s), + Value::Array(a) => a.iter().for_each(|v| colours(v, out)), + Value::Object(o) => o.values().for_each(|v| colours(v, out)), + _ => {} + } + } + let text = BUILTIN.iter().find(|(id, _)| *id == "cga").map(|(_, text)| *text).unwrap(); + let file: Value = serde_json::from_str(text).unwrap(); + let mut found = Vec::new(); + colours(&file, &mut found); + assert!(found.len() > keys().len(), "CGA sets every colour and its icon palette"); + for c in found { + let rgb = c.get(1..7).unwrap_or_default().to_ascii_lowercase(); + assert!(CGA.contains(&rgb.as_str()) && parse_color(c).is_some(), "{c} is not a CGA colour"); + } + let theme = find("cga", &[]).unwrap(); + assert_eq!((theme.name.as_str(), theme.colors.len()), ("CGA", keys().len()), "CGA sets every colour"); + } + /// #4868: a theme that sets none of the File view's colours (all the built-in ones) gets them /// from its own palette, readable: the rail and primary action from its accent, the page from /// its panel, not Dark's or Light's blue and grey. One it does set stays as set. From 2346c1ae81c7501ddec77029cb7b32d8448738ef Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:41:21 +0000 Subject: [PATCH 035/102] Web app: Report a bug saves its screenshot as a download (#7192) (#7197) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * claim: #7192 * Web app: Report a bug saves its screenshot as a download (#7192) Save screenshot… wrote the PNG with image's save, that is std::fs, which the browser doesn't have. The screenshot is now encoded in memory and written through vfs, as every other save is, so the web app hands it out as a download. Natively the same file is written and ui.screenshot replies as before. A failed save says why in plain text instead of a Rust debug value. Co-Authored-By: Claude Opus 5.5 * Web app: a screenshot without a path no longer panics (#7192) `ui.screenshot` without a `path` saved to `std::env::temp_dir()`, which panics on wasm32-unknown-unknown (std has no file system there), and the web app's control requests come through `window.solidcraft.request`. `vfs::temp_dir()` now returns `vfs::BROWSER_TEMP`, a folder of the in-memory files, in the browser, and `save_screenshot` and `vfs::design_folder_refusal` (reached when a request names `allow_paths` while a design is open) use it. Natively nothing changes. Co-Authored-By: Claude Opus 5.5 * Web app: keymap and theme exports download (#7192) Both exports wrote with `std::fs::write`, which always fails in the browser. They now write through `vfs::write` like the other saves, so the web app hands the file out as a download. Natively the file is the same; an agent's folder scope now applies to them as to every other write. Co-Authored-By: Claude Opus 5.5 * Tests: say what the folder-scope checks of the saves show (#7192) The screenshot test wraps the write in a folder scope by hand: that proves the write goes through vfs, not that ui.screenshot's write runs inside the request's scope. ui.screenshot checks the agent's folders when the request arrives; the PNG is written in a later frame, outside that scope, as on main. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- apps/solidcraft-web/src/disk.rs | 2 + crates/io/src/vfs.rs | 12 ++++- crates/ui-egui/src/control.rs | 60 ++++++++++++++++++++++--- crates/ui-egui/src/issue_report.rs | 26 +++++++++++ crates/ui-egui/src/issue_report/form.rs | 9 ++-- crates/ui-egui/src/keymap.rs | 35 ++++++++++++++- crates/ui-egui/src/prefs.rs | 40 ++++++++++++++++- 7 files changed, 168 insertions(+), 16 deletions(-) diff --git a/apps/solidcraft-web/src/disk.rs b/apps/solidcraft-web/src/disk.rs index a8abac6f7..ef058f811 100644 --- a/apps/solidcraft-web/src/disk.rs +++ b/apps/solidcraft-web/src/disk.rs @@ -627,6 +627,8 @@ mod tests { assert_eq!(route("/disk/18f-2a/Bracket.solidcraft"), WriteTo::Disk); assert_eq!(route("/downloads/part.step"), WriteTo::Download); assert_eq!(route("/upload/part.step"), WriteTo::Memory); + // The temporary folder (a screenshot without a path, #7192) stays in memory. + assert_eq!(route(&format!("{}/solidcraft-shot.png", solidcraft_engine::io::vfs::BROWSER_TEMP)), WriteTo::Memory); } #[test] diff --git a/crates/io/src/vfs.rs b/crates/io/src/vfs.rs index 526c1e5f2..900169cfa 100644 --- a/crates/io/src/vfs.rs +++ b/crates/io/src/vfs.rs @@ -177,7 +177,7 @@ fn hidden(name: &std::ffi::OsStr) -> bool { /// in a hidden folder. So a design saved in home itself, in `/`, on a drive root or in a system /// folder never puts `~/.ssh`, `~/.bashrc` or anything else of the user's in reach. pub fn design_folder_refusal(dir: &std::path::Path) -> Option { - design_folder_refusal_in(dir, home_dir().as_deref(), Some(&std::env::temp_dir())) + design_folder_refusal_in(dir, home_dir().as_deref(), Some(&temp_dir())) } /// [`design_folder_refusal`] with the home and temporary folders given (tests). @@ -585,9 +585,17 @@ pub fn long_names(path: &std::path::Path) -> std::path::PathBuf { } } +/// The temporary folder in the browser. std has none there (`std::env::temp_dir` panics on +/// wasm32-unknown-unknown), so it is a folder of the in-memory files: what is written in it stays +/// in memory, neither stored nor downloaded (#7192). +pub const BROWSER_TEMP: &str = "/tmp"; + /// The temporary folder spelled with long names ([`long_names`]), for the folders SolidCraft -/// makes in it. +/// makes in it; [`BROWSER_TEMP`] in the browser. pub fn temp_dir() -> std::path::PathBuf { + if cfg!(target_arch = "wasm32") { + return std::path::PathBuf::from(BROWSER_TEMP); + } long_names(&std::env::temp_dir()) } diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rs index d2314521c..cd8a802ba 100644 --- a/crates/ui-egui/src/control.rs +++ b/crates/ui-egui/src/control.rs @@ -1152,19 +1152,31 @@ fn occurrence(s: &solidcraft_engine::Session, v: &Value) -> Result .ok_or_else(|| format!("no occurrence `{key}`")) } -/// Save a screenshot PNG. +/// Save a screenshot PNG; without a `path`, in the temporary folder ([`vfs::temp_dir`], which in +/// the browser keeps it in memory: std's would panic there). pub fn save_screenshot(image: &egui::ColorImage, path: Option<&str>) -> Value { + let [w, h] = image.size; + let path = path.map(str::to_string).unwrap_or_else(|| vfs::temp_dir().join("solidcraft-shot.png").to_string_lossy().to_string()); + match write_screenshot(image, &path) { + Ok(()) => json!({"ok": true, "result": {"path": path, "width": w, "height": h}}), + Err(e) => json!({"ok": false, "error": e}), + } +} + +/// Write `image` to `path` in the format its extension names (a PNG for `.png`), through +/// [`vfs`] like every other save: the disk natively, a download or browser storage in the web +/// app (#7192). +pub(crate) fn write_screenshot(image: &egui::ColorImage, path: &str) -> Result<(), String> { let [w, h] = image.size; let mut buf = Vec::with_capacity(w * h * 4); for c in &image.pixels { buf.extend_from_slice(&c.to_array()); } - let Some(img) = image::RgbaImage::from_raw(w as u32, h as u32, buf) else { return json!({"ok": false, "error": "bad image"}) }; - let path = path.map(str::to_string).unwrap_or_else(|| std::env::temp_dir().join("solidcraft-shot.png").to_string_lossy().to_string()); - match img.save(&path) { - Ok(()) => json!({"ok": true, "result": {"path": path, "width": w, "height": h}}), - Err(e) => json!({"ok": false, "error": e.to_string()}), - } + let img = image::RgbaImage::from_raw(w as u32, h as u32, buf).ok_or("bad image")?; + let format = image::ImageFormat::from_path(path).map_err(|e| e.to_string())?; + let mut bytes = std::io::Cursor::new(Vec::new()); + img.write_to(&mut bytes, format).map_err(|e| e.to_string())?; + vfs::write(path, bytes.get_ref()).map_err(|e| e.to_string()) } #[cfg(test)] @@ -1870,6 +1882,40 @@ mod tests { let _ = std::fs::remove_dir_all(&base); } + /// A screenshot is written through `vfs`, as other saves are, so the web app can hand it out + /// as a download (#7192). On the disk it is the same PNG with the same reply. A folder scope + /// active while it is written refuses a path outside it, which shows the write goes through + /// `vfs`. (`ui.screenshot` checks an agent's folders when the request arrives; the write comes + /// in a later frame, outside the request's scope, as before.) + #[test] + fn screenshots_are_written_through_vfs_with_the_same_reply() { + let base = vfs::temp_dir().join(format!("solidcraft-shot-scope-{}", std::process::id())); + let (root, out) = (base.join("root"), base.join("out")); + std::fs::create_dir_all(&root).unwrap(); + std::fs::create_dir_all(&out).unwrap(); + let image = egui::ColorImage::new([4, 3], vec![egui::Color32::GREEN; 12]); + let path = root.join("shot.png").to_string_lossy().to_string(); + assert_eq!(save_screenshot(&image, Some(&path)), json!({"ok": true, "result": {"path": path, "width": 4, "height": 3}})); + let png = image::load_from_memory_with_format(&std::fs::read(&path).unwrap(), image::ImageFormat::Png).unwrap().into_rgba8(); + assert_eq!((png.dimensions(), png.get_pixel(0, 0).0), ((4, 3), [0, 255, 0, 255])); + let outside = out.join("shot.png").to_string_lossy().to_string(); + let v = vfs::scoped(Some(vfs::PathScope::new([root.clone()])), || save_screenshot(&image, Some(&outside))); + assert!(v["ok"] == false && v["error"].as_str().is_some_and(|e| e.contains("outside the folders this agent may use")), "{v}"); + assert_eq!(std::fs::read_dir(&out).unwrap().count(), 0, "nothing written outside"); + let _ = std::fs::remove_dir_all(&base); + } + + /// Without a `path`, a screenshot goes to `vfs::temp_dir`: in the web app a folder kept in + /// memory, where std's temporary folder panics (#7192). + #[test] + fn a_screenshot_without_a_path_goes_to_the_vfs_temporary_folder() { + let image = egui::ColorImage::new([4, 3], vec![egui::Color32::GREEN; 12]); + let path = vfs::temp_dir().join("solidcraft-shot.png"); + let reply = save_screenshot(&image, None); + assert_eq!(reply, json!({"ok": true, "result": {"path": path.to_string_lossy(), "width": 4, "height": 3}})); + assert!(path.is_file()); + } + /// `ui.camera` reads the camera and sets it; its reply, passed back, sets the same view /// again. Fields left out keep their values, `fit` frames occurrences, and a refused field /// changes nothing. diff --git a/crates/ui-egui/src/issue_report.rs b/crates/ui-egui/src/issue_report.rs index a8fbf276d..20fd19058 100644 --- a/crates/ui-egui/src/issue_report.rs +++ b/crates/ui-egui/src/issue_report.rs @@ -1338,6 +1338,32 @@ mod tests { } } + /// Save screenshot… writes the PNG where the picker says, the way the web app's other saves + /// write (#7192), and a failure reads as plain words, not a Rust value. + #[test] + fn issue_report_save_screenshot_writes_the_png_and_explains_a_failure() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + let mut draft = draft_for(&h.app, None, None); + draft.image = Some(Arc::new(ColorImage::new([4, 3], vec![egui::Color32::GREEN; 12]))); + h.app.issue_report.draft = Some(draft); + h.frames(4); + for (path, saved) in [(h.dir.join("report.png"), true), (h.dir.join("missing").join("report.png"), false)] { + let answer = path.to_string_lossy().to_string(); + h.app.services.pick_save = Some(Box::new(move |_, _| Box::pin(std::future::ready(Some(answer.clone()))))); + click_commands(&mut h, "Save screenshot…"); + let note = h.app.issue_report.draft.as_ref().unwrap().note.clone(); + if saved { + let png = image::load_from_memory_with_format(&std::fs::read(&path).unwrap(), image::ImageFormat::Png).unwrap(); + assert_eq!(png.into_rgba8().dimensions(), (4, 3)); + assert_eq!(note, "Screenshot saved. Attach the PNG in the GitHub draft."); + } else { + let why = std::fs::write(&path, b"").unwrap_err(); + assert_eq!(note, format!("Could not save screenshot: {why}")); + } + } + } + #[test] fn issue_report_editing_enter_and_cad_shortcuts_leave_the_live_boolean_unchanged() { let mut h = crate::scenario::Harness::new(); diff --git a/crates/ui-egui/src/issue_report/form.rs b/crates/ui-egui/src/issue_report/form.rs index 742d82a3f..2aa736676 100644 --- a/crates/ui-egui/src/issue_report/form.rs +++ b/crates/ui-egui/src/issue_report/form.rs @@ -45,12 +45,11 @@ fn screenshot_actions(app: &mut SolveApp, draft: &mut Draft, ui: &mut Ui) -> boo { app.pick_save(&format!("solidcraft-issue-{}.png", app.shot_token), &["png"], move |app, path| { let Some(path) = path else { return }; - let result = crate::control::save_screenshot(&image, Some(&path)); + let result = crate::control::write_screenshot(&image, &path); if let Some(draft) = app.issue_report.draft.as_mut() { - draft.note = if result.get("ok").and_then(serde_json::Value::as_bool) == Some(true) { - "Screenshot saved. Attach the PNG in the GitHub draft.".into() - } else { - format!("Could not save screenshot: {}", super::debug(&result.get("error"), 1000)) + draft.note = match result { + Ok(()) => "Screenshot saved. Attach the PNG in the GitHub draft.".into(), + Err(e) => format!("Could not save screenshot: {}", super::limited(&e, 1000)), }; } }); diff --git a/crates/ui-egui/src/keymap.rs b/crates/ui-egui/src/keymap.rs index e35336a25..36f1bcad4 100644 --- a/crates/ui-egui/src/keymap.rs +++ b/crates/ui-egui/src/keymap.rs @@ -644,7 +644,8 @@ pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) { let text = crate::toolbar_custom::export(app).to_string(); app.pick_save("SolidCraft shortcuts.json", &["json"], move |app, path| { if let Some(path) = path { - app.keymap.message = std::fs::write(&path, text).err().map(|e| format!("export: {e}")); + // Through `vfs`, like every other save: the web app hands it out as a download. + app.keymap.message = solidcraft_engine::io::vfs::write(&path, text.as_bytes()).err().map(|e| format!("export: {e}")); } }); } @@ -1149,6 +1150,38 @@ mod card_tests { assert!(!h.app.prefs_window.open); } + /// Export… writes the shortcuts file through `vfs`, like the other saves, so the web app hands + /// it out as a download (#7192). On the disk it is the same file; a folder scope active while + /// it is written refuses a path outside it, which shows the write goes through `vfs`. + #[test] + fn shortcut_export_writes_through_vfs() { + use solidcraft_engine::io::vfs; + let mut h = Harness::new(); + h.app.home.open = false; + h.call("ui.prefs", json!({"open":"Keyboard Shortcuts"})); + h.frames(2); + let (root, out) = (h.dir.join("root"), h.dir.join("out")); + std::fs::create_dir_all(&root).unwrap(); + std::fs::create_dir_all(&out).unwrap(); + for (path, inside) in [(root.join("keys.json"), true), (out.join("keys.json"), false)] { + let answer = path.to_string_lossy().to_string(); + h.app.services.pick_save = Some(Box::new(move |_, _| Box::pin(std::future::ready(Some(answer.clone()))))); + vfs::scoped(Some(vfs::PathScope::new([root.clone()])), || { + h.step(&json!({"widget":"Export…"})).unwrap(); + h.frames(4); + }); + let message = h.app.keymap.message.clone(); + if inside { + assert_eq!(message, None); + let file: Value = serde_json::from_str(&std::fs::read_to_string(&path).unwrap()).unwrap(); + assert_eq!(file, crate::toolbar_custom::export(&h.app)); + } else { + assert!(message.as_deref().is_some_and(|m| m.contains("outside the folders this agent may use")), "{message:?}"); + assert!(!path.exists(), "nothing written outside"); + } + } + } + #[test] fn help_shortcuts_card_keeps_rebinding_read_only() { let mut h = Harness::new(); diff --git a/crates/ui-egui/src/prefs.rs b/crates/ui-egui/src/prefs.rs index 003f00a52..6633e0ee4 100644 --- a/crates/ui-egui/src/prefs.rs +++ b/crates/ui-egui/src/prefs.rs @@ -1010,8 +1010,9 @@ fn theme_row(app: &mut SolveApp, ui: &mut egui::Ui) { let name = file.get("name").and_then(serde_json::Value::as_str).unwrap_or("Theme").to_string(); let text = serde_json::to_string_pretty(&file).unwrap_or_default(); app.pick_save(&format!("{name}.json"), &["json"], move |app, path| { + // Through `vfs`, like every other save: the web app hands it out as a download. if let Some(path) = path - && let Err(e) = std::fs::write(&path, text) + && let Err(e) = solidcraft_engine::io::vfs::write(&path, text.as_bytes()) { app.set_status(format!("Theme export: {e}"), true); } @@ -3696,6 +3697,43 @@ mod tests { assert_eq!((Tokens::get().control_radius, Tokens::get().radius_xl), (6, 10)); } + /// A theme tile's Export… writes the theme file through `vfs`, like the other saves, so the + /// web app hands it out as a download (#7192). On the disk it is the same file; a folder scope + /// active while it is written refuses a path outside it, which shows the write goes through + /// `vfs`. + #[test] + fn theme_export_writes_through_vfs() { + use serde_json::json; + use solidcraft_engine::io::vfs; + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.call("ui.prefs", json!({"theme": "dark", "open": "Interface"})); + h.frames(2); + super::reveal_preference(&mut h, "prefs:theme_tile:dark"); + let (root, out) = (h.dir.join("root"), h.dir.join("out")); + std::fs::create_dir_all(&root).unwrap(); + std::fs::create_dir_all(&out).unwrap(); + for (path, inside) in [(root.join("Dark.json"), true), (out.join("Dark.json"), false)] { + let answer = path.to_string_lossy().to_string(); + h.app.services.pick_save = Some(Box::new(move |_, _| Box::pin(std::future::ready(Some(answer.clone()))))); + h.app.status = None; + vfs::scoped(Some(vfs::PathScope::new([root.clone()])), || { + h.step(&json!({"click":{"handle":"prefs:theme_tile:dark"},"button":"right"})).unwrap(); + h.step(&json!({"click":{"handle":"menu:theme_export"}})).unwrap(); + h.frames(4); + }); + let status = h.app.status.clone().map(|(text, ..)| text); + if inside { + assert_eq!(status, None); + let file: serde_json::Value = serde_json::from_str(&std::fs::read_to_string(&path).unwrap()).unwrap(); + assert_eq!(file, super::theme_file(&h.app, "dark", true)); + } else { + assert!(status.as_deref().is_some_and(|s| s.contains("outside the folders this agent may use")), "{status:?}"); + assert!(!path.exists(), "nothing written outside"); + } + } + } + /// Picking a font closes the font list, not the Preferences window's body: that folded the /// window to its title bar, and egui kept it folded between runs (#1800). A window folded by /// an earlier release unfolds when Preferences opens. From 388266ca371b03a8a8a89f9f6725648565968542 Mon Sep 17 00:00:00 2001 From: JK3D <166923105+JoKa3D@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:41:39 +0000 Subject: [PATCH 036/102] Rename: an imported body with numbered siblings is renamed without evaluating (#7274) (#7277) * claim: #7274 * Renaming an imported body with numbered siblings evaluates nothing again Since #2467, Model::rename_body evaluates the design whenever another body's name is worked out from the renamed one's (`X (2)`). Every STEP import whose solids share a label has such names (`Part`, `Part (2)`, ...), so renaming one of its bodies re-read the import and meshed every body again. body.rename keeps the names of a body's siblings and of later bodies named after it, so for a body no later feature changes (the same mesh from the feature that made it to the end), renaming it in the model gives the names evaluating the renamed design gives. That case is followed again, as before #2467; bodies later features change still take #2467's checks. --- crates/doc/src/eval.rs | 35 ++++++++++++++++++++++------------- crates/engine/src/tests.rs | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 13 deletions(-) diff --git a/crates/doc/src/eval.rs b/crates/doc/src/eval.rs index 5b410c68f..38e7c50ef 100644 --- a/crates/doc/src/eval.rs +++ b/crates/doc/src/eval.rs @@ -2356,35 +2356,44 @@ impl Model { /// design after the rename, which changed nothing but names, so every result keeps its /// geometry and meshes and only the body's name (and the names worked out from it) changes. /// Later features that change the body (a pattern, a chamfer, a join) keep their results - /// too (#2467): a feature's geometry doesn't depend on its bodies' names. + /// too (#2467): a feature's geometry doesn't depend on its bodies' names. A body no later + /// feature changes is followed even when other bodies are numbered after it (`X (2)`, the + /// solids of a STEP file that share a label): `body.rename` keeps their names. /// False, leaving the model as it was, when the rename can't be followed that way and the /// design must be evaluated: the model isn't the design's, a body of that name comes and goes - /// or isn't the same body throughout, a later body's name is worked out from it (`X (2)`), a - /// message quotes it, or it is sheet metal, threaded, or named in a later feature's face - /// references. + /// or isn't the same body throughout, a later body's name is worked out from a body later + /// features change, a message quotes it, or it is sheet metal, threaded, or named in a later + /// feature's face references. pub fn rename_body(&mut self, doc: &Document, old: &str, new: &str) -> bool { if self.results.len() != doc.features.len() || self.results.iter().zip(&doc.features).any(|(r, f)| r.id != f.id || r.stale) { return false; } let Some(at) = self.results.iter().position(|r| r.state.body(old).is_some()) else { return false }; - let Some(feature) = self.results.get(at).and_then(|r| r.state.body(old)).map(|b| b.feature) else { return false }; - // One body from the feature that made it until it is gone (joined into another), and no - // other body's name comes from its name. + let Some((feature, made)) = self.results.get(at).and_then(|r| r.state.body(old)).map(|b| (b.feature, Arc::as_ptr(&b.mesh))) else { + return false; + }; + // Untouched from the feature that made it to the end: `body.rename` keeps the names of + // its siblings and of later bodies named after it (`X (2)`, the solids of a STEP file + // with one label), so evaluating the renamed design gives the same names. + let untouched = self.results.iter().skip(at).all(|r| r.state.body(old).is_some_and(|b| Arc::as_ptr(&b.mesh) == made)); + // Or one body from the feature that made it until it is gone (joined into another), and + // no other body's name comes from its name. let held: Vec = self.results.iter().skip(at).map(|r| r.state.body(old).is_some()).collect(); let one_run = held.iter().skip_while(|h| **h).all(|h| !*h); let derived = format!("{old} ("); - let same_body = self - .results - .iter() - .skip(at) - .all(|r| r.state.bodies.iter().all(|b| if b.name == old { b.feature == feature } else { !b.name.starts_with(&derived) })); + let same_body = || { + self.results + .iter() + .skip(at) + .all(|r| r.state.bodies.iter().all(|b| if b.name == old { b.feature == feature } else { !b.name.starts_with(&derived) })) + }; let quoted = self.results.iter().skip(at).any(|r| [&r.error, &r.warning].into_iter().flatten().any(|m| m.contains(old))); let named_elsewhere = self .results .iter() .any(|r| r.state.body(new).is_some() || r.state.sheets.iter().any(|x| x.body == old) || r.state.threads.iter().any(|t| t.body == old)); let faces_named = doc.features.iter().skip(at + 1).any(|f| f.face_names.iter().any(|n| n.contains(old))); - if !one_run || !same_body || quoted || named_elsewhere || faces_named { + if !(untouched || (one_run && same_body())) || quoted || named_elsewhere || faces_named { return false; } // States shared between results stay shared. diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index dea0aaeba..2d1b892de 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -4293,6 +4293,40 @@ fn renaming_an_imported_assembly_body_reads_nothing_again() { let _ = std::fs::remove_dir_all(&dir); } +/// Renaming one of an imported file's solids whose siblings are numbered after it (`Bolt` beside +/// `Bolt (2)`, as the solids of a STEP file with one label are built) evaluates nothing either: the +/// rename keeps the siblings' names, so the model is the one evaluating the renamed design gives. +#[test] +fn renaming_an_imported_body_with_numbered_siblings_evaluates_nothing() { + let dir = std::env::temp_dir().join(format!("solidcraft-step-rename-siblings-{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + let mut a = Session::default(); + run(&mut a, "solid.box", json!({"length": 10, "width": 10, "height": 10, "body_name": "Bolt"})); + run(&mut a, "solid.box", json!({"length": 4, "width": 4, "height": 4, "center": [30, 0, 2], "operation": "new", "body_name": "Bolt (2)"})); + let p = dir.join("Bolts.step"); + run(&mut a, "file.export", json!({"path": p.to_string_lossy()})); + let mut s = Session::default(); + run(&mut s, "doc.open", json!({"path": p.to_string_lossy()})); + let names = |s: &Session| s.model.state().bodies.iter().map(|b| b.name.clone()).collect::>(); + let before = names(&s); + let first = before.iter().find(|n| !n.ends_with(" (2)")).cloned().unwrap(); + assert!(before.contains(&format!("{first} (2)")), "a sibling numbered after it: {before:?}"); + s.evaluations = 0; + run(&mut s, "body.rename", json!({"body": first, "name": "Renamed"})); + assert_eq!(s.evaluations, 0, "a rename evaluates nothing"); + let after = names(&s); + assert!(after.contains(&"Renamed".to_string()) && after.contains(&format!("{first} (2)")), "{after:?}"); + let mut fresh = Session::new((*s.doc).clone()); + fresh.refresh(); + assert_eq!(names(&fresh), after, "the same names as evaluating the renamed design"); + run(&mut s, "edit.undo", json!({})); + assert_eq!(names(&s), before); + run(&mut s, "edit.redo", json!({})); + assert_eq!(names(&s), after); + assert_eq!(s.evaluations, 0, "nor do its undo and redo"); + let _ = std::fs::remove_dir_all(&dir); +} + /// #2467: renaming a body that later features change (a hole patterned over it, then a chamfer) /// evaluates nothing, and leaves the bodies, volumes and face names evaluating the renamed /// design gives; undo and redo do the same. From 1c109be8362e9db4edcc89fcdf6b4bfc98e15e47 Mon Sep 17 00:00:00 2001 From: JK3D <166923105+JoKa3D@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:41:48 +0000 Subject: [PATCH 037/102] Headless pictures: no highlight left over from the picture before (#7225) (#7326) * claim: #7225 * fix: headless pictures no longer keep the previous picture's highlight Capturer::rgba_highlighted left the highlight slot empty when a picture had no highlight. The renderer keeps its last highlight scene while the slot is empty, so a selected edge's band drawn for one picture showed in the next one on the same capturer. The depth tests share their capturers across test threads, so they failed at random: an edge "192 of 612 px drawn", a washer showing through its plate, a cut showing what lies behind it. A picture now always gets a highlight scene of its own, empty without one. Clearing the leak showed that a_selected_edge_on_a_grazing_face_draws_whole passed at 88 degrees in a design of radius 30 only by counting the leaked band: its reference line lies 143 mm behind the sheet's middle, past that design's far plane, and drew nothing. The small design now holds the edge. New test: a_picture_without_a_highlight_shows_none_of_the_one_before. Full `--test depth` runs on Apple silicon: 10 of 10 failed before, 0 of 20 after. --- crates/gpu/src/capture.rs | 9 +++++---- crates/gpu/tests/depth.rs | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/crates/gpu/src/capture.rs b/crates/gpu/src/capture.rs index 225c9923e..0b55034d9 100644 --- a/crates/gpu/src/capture.rs +++ b/crates/gpu/src/capture.rs @@ -194,10 +194,11 @@ impl Capturer { _ => None, }; let mut frame = frame(scene, cam, [width, height], state.key, access); - if let Some(h) = highlight { - frame.hl_key = state.key; - frame.hl_slot = Arc::new(Mutex::new(Some(h))); - } + // Always a highlight scene of the picture's own, empty without one: the renderer keeps + // its last highlight scene while the slot is empty (as the viewport does until the next + // is built), so the previous picture's highlight would show in this one. + frame.hl_key = state.key; + frame.hl_slot = Arc::new(Mutex::new(Some(highlight.unwrap_or_default()))); let (device, queue) = (&self.device, &self.queue); let scopes = error_scopes(device); let size = wgpu::Extent3d { width, height, depth_or_array_layers: 1 }; diff --git a/crates/gpu/tests/depth.rs b/crates/gpu/tests/depth.rs index 024aeca91..255536fb4 100644 --- a/crates/gpu/tests/depth.rs +++ b/crates/gpu/tests/depth.rs @@ -189,18 +189,21 @@ fn an_edge_on_a_face_draws_whole_at_any_angle() { } } +/// A selected edge's highlight from `a` to `b` on a face of normal `n`, in a highlight scene of +/// its own: a 3 px core in a 6 px halo (`GpuScene::lifted_line`). +fn highlight(a: Vec3, b: Vec3, n: Vec3) -> solidcraft_gpu::view::GpuScene { + let mut sc = solidcraft_gpu::view::GpuScene::default(); + let red = sc.color([255, 0, 0, 255]); + sc.lifted_line(a.to_f32(), b.to_f32(), red, 6.0, [n.to_f32(), n.to_f32()]); + sc +} + /// A selected edge's highlight (a 3 px core in a 6 px halo, drawn by `GpuScene::lifted_line` /// in the highlight scene) lying on a face seen almost edge on draws its whole width: the face /// no longer buries part of the band, which showed as a thin wedge instead of a line. The same /// band 5 mm behind a face seen square, beside faces seen square, stays hidden. #[test] fn a_selected_edge_on_a_grazing_face_draws_whole() { - let highlight = |a: Vec3, b: Vec3, n: Vec3| { - let mut sc = solidcraft_gpu::view::GpuScene::default(); - let red = sc.color([255, 0, 0, 255]); - sc.lifted_line(a.to_f32(), b.to_f32(), red, 6.0, [n.to_f32(), n.to_f32()]); - sc - }; let reference = |a: Vec3, b: Vec3| vec![SceneLine { points: vec![a, b], color: Rgb(255, 0, 0), alpha: 1.0, width: 6.0, on_top: true }]; for (mode, c) in capturers() { for tilt in [60.0_f64, 80.0, 85.0, 88.0] { @@ -208,7 +211,10 @@ fn a_selected_edge_on_a_grazing_face_draws_whole() { let t = tr.tan(); let n = Vec3::new(0.0, -tr.cos(), tr.sin()); let (a, b) = (Vec3::new(-12.0, 5.0 * t, 5.0), Vec3::new(12.0, 5.0 * t, 5.0)); - for radius in [30.0, 17_000.0] { + // The small design holds the edge, 5·tan(tilt) behind the sheet's middle: at 88° that + // is 143 mm, past the far plane of a design of radius 30, where the reference band drew + // nothing (the check only passed by counting a band left from another picture). + for radius in [(5.0 * t).max(30.0), 17_000.0] { for fov in [0.0, 0.6] { let (plain, cam) = front(sheet(tr), Vec::new(), radius, fov, false); let (top, _) = front(sheet(tr), reference(a, b), radius, fov, false); @@ -231,6 +237,23 @@ fn a_selected_edge_on_a_grazing_face_draws_whole() { } } +/// A picture drawn without a highlight shows none of the highlight of the picture before it. The +/// capturer kept its last highlight scene, so a band drawn for one check showed in the next +/// picture on the same capturer, and the checks here, which share their capturers across test +/// threads, failed at random: an edge "192 of 612 px drawn", a washer through its plate. +#[test] +fn a_picture_without_a_highlight_shows_none_of_the_one_before() { + for (mode, c) in capturers() { + let (plain, cam) = front(sheet(0.0), Vec::new(), 30.0, 0.0, false); + let (a, b) = (Vec3::new(-12.0, 0.0, 5.0), Vec3::new(12.0, 0.0, 5.0)); + let highlighted = c.rgba_highlighted(&plain, Some(highlight(a, b, Vec3::new(0.0, -1.0, 0.0))), &cam, 200, 200).unwrap(); + let band = pixels(&highlighted).filter(|p| red(*p)).count(); + assert!(band > 100, "{mode}: the band itself ({band} px)"); + let after = red_pixels(c, &plain, &cam); + assert_eq!(after, 0, "{mode}: the picture after the highlighted one shows its band in {after} px"); + } +} + /// An edge 0.5 mm behind a face seen square is hidden, however large the design, with a section /// shown or not: lines were pulled toward the eye by a share of the depth range, about 27 mm in a /// design 34 m across. From 27728b10e2f1aa276eb2019625e20124f818590d Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:41:54 +0000 Subject: [PATCH 038/102] Trackpad: inertia stops when Shift changes mid-orbit (#7327) (#7361) * claim: #7327 * Trackpad: inertia stops when Shift changes mid-orbit (#7327) macOS sends the inertia after the fingers lift as its own scroll bracket, with the modifiers held at the time. Each move was routed by its own modifiers, so releasing Shift while an orbit coasted turned the rest of the inertia into a pan (and pressing Shift turned a coasting pan into an orbit). A bracket that starts as the fingers' one ends now keeps the fingers' mode and ends when the modifiers change. Switching between pan and orbit while the fingers are down works as before. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/navigation.rs | 68 ++++++++++++++++++++++++++++++-- crates/ui-egui/src/viewport.rs | 64 ++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/navigation.rs b/crates/ui-egui/src/navigation.rs index c2064b64b..b271acba7 100644 --- a/crates/ui-egui/src/navigation.rs +++ b/crates/ui-egui/src/navigation.rs @@ -119,12 +119,61 @@ pub(crate) fn route_wheel_vertical(points: egui::Vec2, modifiers: egui::Modifier } } +/// The inertia macOS sends once the fingers lift (#7327): its own scroll bracket, starting as the +/// fingers' bracket ends, with the modifiers held at the time. It coasts in the mode the fingers +/// had; when the modifiers change it ends, so the rest never orbits a pan or pans an orbit. +/// Fingers that touch during a coast end it and start a new swipe, so a bracket that follows a +/// coast is never one. Browsers keep the inertia inside the swipe's bracket ([`WebWheelGestures`]), +/// so there are no coasts on the web. +#[derive(Clone, Copy, Debug, Default, PartialEq)] +pub(crate) struct TrackpadCoast { + /// Whether the current bracket's last move orbited (Shift) rather than panned. + last_orbit: Option, + /// The current bracket is a coast, keeping this mode (orbit or not). + keeps: Option, + /// The coast's mode changed: the rest of its moves are dropped. + stopped: bool, + /// When the last swipe of the fingers ended, and whether its last move orbited. + lifted: Option<(f64, bool)>, +} + +impl TrackpadCoast { + /// A coast starts at most this long (seconds) after the fingers lift; macOS sends it at once. + const GAP: f64 = 0.1; + + fn start(&mut self, now: f64) { + let lifted = self.lifted.take().filter(|(at, _)| !cfg!(target_arch = "wasm32") && now >= *at && now - *at <= Self::GAP); + *self = TrackpadCoast { keeps: lifted.map(|(_, orbit)| orbit), ..Default::default() }; + } + + fn end(&mut self, now: f64) { + let lifted = if self.keeps.is_none() { self.last_orbit.map(|orbit| (now, orbit)) } else { None }; + *self = TrackpadCoast { lifted, ..Default::default() }; + } + + /// Whether a move in this mode still counts. + fn moves(&mut self, orbit: bool) -> bool { + self.last_orbit = Some(orbit); + self.stopped |= self.keeps.is_some_and(|keeps| keeps != orbit); + !self.stopped + } +} + /// Match egui's wheel units and modifier routing, without its temporal smoothing. /// /// `gesture` tracks an ongoing bracketed trackpad scroll (`Start` … `End`): /// moves inside one pan, bare `Move` input is a mouse (vertical zooms, /// horizontal pans). Only point input brackets; line/page input always zooms. -pub(crate) fn immediate_wheel(input: &egui::InputState, options: egui::InputOptions, page_height: f32, gesture: &mut bool) -> RawWheel { +/// With `shift_orbits` (Shift + two fingers orbits), `coast` ends the inertia +/// when the modifiers change. +pub(crate) fn immediate_wheel( + input: &egui::InputState, + options: egui::InputOptions, + page_height: f32, + gesture: &mut bool, + coast: &mut TrackpadCoast, + shift_orbits: bool, +) -> RawWheel { let mut out = RawWheel { zoom: 0.0, point_zoom: 0.0, pan: egui::Vec2::ZERO, shift_pan: egui::Vec2::ZERO, mouse_pan: egui::Vec2::ZERO }; for event in &input.events { let egui::Event::MouseWheel { unit, delta, modifiers, phase } = event else { continue }; @@ -135,12 +184,18 @@ pub(crate) fn immediate_wheel(input: &egui::InputState, options: egui::InputOpti match phase { egui::TouchPhase::Start => { if point { + if !*gesture { + coast.start(input.time); + } *gesture = true; } continue; } egui::TouchPhase::End | egui::TouchPhase::Cancel => { if point { + if *gesture { + coast.end(input.time); + } *gesture = false; } continue; @@ -152,8 +207,12 @@ pub(crate) fn immediate_wheel(input: &egui::InputState, options: egui::InputOpti egui::MouseWheelUnit::Line => *delta * options.line_scroll_speed, egui::MouseWheelUnit::Page => *delta * page_height, }; + let shift = modifiers.shift && !modifiers.ctrl && !modifiers.command && !modifiers.alt; + if point && *gesture && !coast.moves(shift) && shift_orbits { + continue; + } if point && *gesture { - if modifiers.shift && !modifiers.ctrl && !modifiers.command && !modifiers.alt { + if shift { if points.is_finite() { out.shift_pan += points.clamp(vec2(-1e4, -1e4), vec2(1e4, 1e4)); } @@ -430,8 +489,9 @@ pub(crate) fn handle(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect, resp: &e } let options = ui.ctx().options(|o| o.input_options); let page_height = ui.ctx().viewport_rect().height(); - let raw = ui.input(|i| immediate_wheel(i, options, page_height, &mut app.viewport.trackpad_gesture)); let trackpad_orbit = trackpad_pan && app.preferences.nav == "fusion"; + let viewport = &mut app.viewport; + let raw = ui.input(|i| immediate_wheel(i, options, page_height, &mut viewport.trackpad_gesture, &mut viewport.trackpad_coast, trackpad_orbit)); if trackpad_pan && (raw.pan != egui::Vec2::ZERO || raw.shift_pan != egui::Vec2::ZERO) { // Swallow egui's smoothing tail while the trackpad runs (a wheel-only // tail ends the moment trackpad input starts; mixed input is rare). @@ -940,7 +1000,7 @@ mod tests { let events = raw.events.clone(); let mut input = egui::InputState::default(); input.events = raw.events; - (super::immediate_wheel(&input, egui::InputOptions::default(), 600.0, gesture), events) + (super::immediate_wheel(&input, egui::InputOptions::default(), 600.0, gesture, &mut Default::default(), false), events) } #[test] diff --git a/crates/ui-egui/src/viewport.rs b/crates/ui-egui/src/viewport.rs index 08c3b4033..ad90e91c1 100644 --- a/crates/ui-egui/src/viewport.rs +++ b/crates/ui-egui/src/viewport.rs @@ -175,6 +175,8 @@ pub struct ViewportState { /// Inside a bracketed trackpad scroll (`Start` without its `End` yet): /// point moves pan, bare moves are a mouse. pub(crate) trackpad_gesture: bool, + /// The inertia after the fingers lift, which ends when the modifiers change (#7327). + pub(crate) trackpad_coast: crate::navigation::TrackpadCoast, /// A primary press on the axis gizmo: the pointer position used by its last orbit step. pub axis_drag: Option, /// Unsnapped camera while Shift-orbit previews a standard or diagonal view. @@ -8977,6 +8979,68 @@ mod tests { assert_eq!(h.app.cam, after); } + /// #7327: macOS sends the inertia after the fingers lift as its own scroll bracket, right after + /// the fingers' one, with the modifiers held at the time. Releasing Shift while an orbit coasts + /// (or pressing it while a pan coasts) ends the coast instead of carrying it into the other mode. + #[test] + fn fusion_trackpad_inertia_stops_when_shift_changes() { + use egui::{Modifiers, TouchPhase::*}; + let mut h = crate::scenario::Harness::new(); + h.app.preferences.nav = "fusion".into(); + h.app.preferences.orbit_around = crate::prefs::OrbitAround::ViewCentre; + h.call("ui.move", json!({"x":800,"y":500})); + let gesture = |phase, modifiers| egui::Event::MouseWheel { unit: egui::MouseWheelUnit::Point, delta: vec2(20.0, -10.0), modifiers, phase }; + let play = |h: &mut crate::scenario::Harness, phase, modifiers| { + h.app.synthetic.push(gesture(phase, modifiers)); + h.frame(); + }; + for (held, other) in [(Modifiers::SHIFT, Modifiers::NONE), (Modifiers::NONE, Modifiers::SHIFT)] { + // The fingers swipe and lift; the coast starts in the next frame and keeps their mode. + for phase in [Start, Move, Move, End, Start, Move] { + play(&mut h, phase, held); + } + let coasting = h.app.cam; + play(&mut h, Move, held); + assert_ne!(h.app.cam, coasting, "{held:?}: the coast keeps moving while the modifiers stay"); + // The modifiers change: the rest of the coast is dropped, even when they change back. + let stopped = h.app.cam; + for modifiers in [other, other, held, other] { + play(&mut h, Move, modifiers); + assert_eq!(h.app.cam, stopped, "{held:?}: the coast must end, not pan or orbit"); + } + play(&mut h, End, other); + h.frames(30); + assert_eq!(h.app.cam, stopped); + } + // Fingers touching during a coast are a new swipe: it moves at once and still switches + // between pan and orbit with Shift while the fingers stay down. + for phase in [Start, Move, Move, End, Start, Move] { + play(&mut h, phase, Modifiers::SHIFT); + } + play(&mut h, End, Modifiers::SHIFT); + play(&mut h, Start, Modifiers::SHIFT); + for modifiers in [Modifiers::SHIFT, Modifiers::NONE, Modifiers::SHIFT] { + let before = h.app.cam; + play(&mut h, Move, modifiers); + if modifiers.shift { + let mut expected = before; + expected.orbit(20.0, -10.0); + assert_eq!(h.app.cam, expected, "a new swipe orbits with Shift"); + } else { + assert_eq!(h.app.cam.back(), before.back()); + assert_ne!(h.app.cam.target, before.target, "a new swipe pans without Shift"); + } + } + play(&mut h, End, Modifiers::NONE); + // A swipe after a pause is a new swipe too, whatever the last one did. + h.frames(30); + play(&mut h, Start, Modifiers::NONE); + let before = h.app.cam; + play(&mut h, Move, Modifiers::NONE); + assert_ne!(h.app.cam.target, before.target, "a later swipe pans"); + play(&mut h, End, Modifiers::NONE); + } + #[test] fn shift_trackpad_orbit_preserves_other_presets_and_legacy_scroll() { for preset in crate::prefs::NAV_PRESETS.iter().map(|preset| preset.id) { From 3574956d294315c69df17a6e4842f050957ddc68 Mon Sep 17 00:00:00 2001 From: yhamil04 <147720712+yhamil04@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:41:55 +0000 Subject: [PATCH 039/102] Graphics: the window no longer waits for Direct3D 12 shader compiles (#4860) (#7288) * claim: #4860 Co-Authored-By: Claude Opus 5.5 * Graphics: the window no longer waits for Direct3D 12 shader compiles (#4860) On Direct3D 12, wgpu compiles every pipeline's shaders with FXC when the pipeline is made, and nothing is kept between launches, so the window waited seconds for the viewport. - The GPU tessellation shader, most of that time, compiles on a thread of its own. Bodies are built on the CPU until it is ready, then drawn from their plans; where it never compiles they stay on the CPU, as before. - The viewport's pipelines build in parallel, one job per fragment shader (solidcraft_gpu::concurrent). A job that errs, panics or cannot start runs again on the calling thread, so errors reach the caller's scopes. Threads only on Vulkan, Metal and D3D12 with FXC. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/gpu/src/capture.rs | 18 +- crates/gpu/src/concurrent.rs | 295 ++++++++++++++++++ crates/gpu/src/lib.rs | 18 ++ crates/gpu/src/view.rs | 502 +++++++++++++++++++++--------- crates/gpu/src/view/ao.rs | 18 +- crates/gpu/src/view/msaa_check.rs | 4 + crates/ui-egui/src/gpu.rs | 71 ++++- crates/ui-egui/src/lib.rs | 4 +- crates/ui-egui/src/viewport.rs | 5 + 9 files changed, 764 insertions(+), 171 deletions(-) create mode 100644 crates/gpu/src/concurrent.rs diff --git a/crates/gpu/src/capture.rs b/crates/gpu/src/capture.rs index 0b55034d9..f7df85b55 100644 --- a/crates/gpu/src/capture.rs +++ b/crates/gpu/src/capture.rs @@ -16,7 +16,7 @@ use solidcraft_render::{AnalysisMode, Camera, Rgb, SECTION_CAP, Scene}; use wgpu::util::DeviceExt; use crate::view::{AccessMap, Frame, GpuScene, GpuTarget, Renderer, analysis_colors, analysis_uniform}; -use crate::{GpuError, Result, popped}; +use crate::{GpuError, Result, caught, error_scopes}; /// The colour format pictures are drawn in: sRGB bytes as they are, like the viewport's usual /// (non-sRGB) target. @@ -460,22 +460,6 @@ fn watch_lost(device: &wgpu::Device) -> Arc { lost } -/// Error scopes catching what a picture's GPU work may raise (popped by [`caught`]). -fn error_scopes(device: &wgpu::Device) -> [wgpu::ErrorScopeGuard; 3] { - [wgpu::ErrorFilter::OutOfMemory, wgpu::ErrorFilter::Internal, wgpu::ErrorFilter::Validation].map(|f| device.push_error_scope(f)) -} - -/// The first error the scopes caught. -fn caught(scopes: [wgpu::ErrorScopeGuard; 3]) -> Option { - let mut failed = None; - for scope in scopes.into_iter().rev() { - if let Some(e) = popped(scope.pop()) { - failed.get_or_insert(e.to_string()); - } - } - failed -} - /// The background gradient: the viewport's top colour at the top, its bottom one at the bottom, /// mixed in sRGB as the window paints it. const BACKGROUND_SHADER: &str = r#" diff --git a/crates/gpu/src/concurrent.rs b/crates/gpu/src/concurrent.rs new file mode 100644 index 000000000..94facc85c --- /dev/null +++ b/crates/gpu/src/concurrent.rs @@ -0,0 +1,295 @@ +//! Pipelines built on several threads at once (#4860). +//! +//! Direct3D 12 compiles a pipeline's shaders when the pipeline is made (wgpu writes the WGSL out +//! as HLSL and compiles that with FXC), and nothing compiled is kept between launches, so the +//! viewport's pipelines, built one after another, held the window back for seconds. Work +//! handed to [`Jobs::spawn`] runs on a thread of its own, and [`Job::join`] collects it. +//! +//! - wgpu's error scopes belong to the thread that pushed them, so a job runs under scopes of its +//! own. A job that raised an error, or whose thread panicked or could not start, runs again on +//! the calling thread when joined: its errors reach the caller's scopes and the device's handler +//! as they did when every pipeline was built there. +//! - Threads only on Vulkan, Metal and Direct3D 12 with FXC, whose devices make pipelines from any +//! thread. wgpu hands every thread one DXC compiler, which is not documented as safe to share, +//! and OpenGL works through one context. There, and in the browser, which has no threads, each +//! job runs when it is joined, one after another, as before. + +#[cfg(target_arch = "wasm32")] +use std::marker::PhantomData; + +/// The name of the threads jobs run on (in crash reports and debuggers). +#[cfg(not(target_arch = "wasm32"))] +const WORKER: &str = "solidcraft pipelines"; + +/// Jobs on `device`, collected before [`scope`] returns. +pub struct Jobs<'scope, 'env> { + device: &'env wgpu::Device, + /// The threads' scope; `None` where jobs run on the calling thread. + #[cfg(not(target_arch = "wasm32"))] + threads: Option<&'scope std::thread::Scope<'scope, 'env>>, + #[cfg(target_arch = "wasm32")] + threads: PhantomData<&'scope ()>, +} + +/// Work handed to [`Jobs::spawn`]. +pub struct Job<'scope, T, F> { + work: F, + #[cfg(not(target_arch = "wasm32"))] + worker: Option>>, + #[cfg(target_arch = "wasm32")] + worker: PhantomData<(&'scope (), T)>, +} + +/// Runs `f` with a [`Jobs`] on `device`; every job is joined before this returns. +pub fn scope<'env, R>(device: &'env wgpu::Device, f: impl for<'scope> FnOnce(&Jobs<'scope, 'env>) -> R) -> R { + #[cfg(not(target_arch = "wasm32"))] + { + let threaded = threads_allowed(device); + std::thread::scope(|s| f(&Jobs { device, threads: threaded.then_some(s) })) + } + #[cfg(target_arch = "wasm32")] + { + f(&Jobs { device, threads: PhantomData }) + } +} + +/// `device` makes pipelines on several threads at once (see the module); the shader of the GPU +/// plan evaluation compiles on a thread of its own by the same rule (`view::TessLater`). +#[cfg(not(target_arch = "wasm32"))] +pub(crate) fn threads_allowed(device: &wgpu::Device) -> bool { + threaded(device.adapter_info().backend, dx12_compiles_with_fxc) +} + +/// Backends whose devices make pipelines on several threads at once; D3D12 when `fxc` says it +/// compiles with FXC. +#[cfg(not(target_arch = "wasm32"))] +fn threaded(backend: wgpu::Backend, fxc: impl FnOnce() -> bool) -> bool { + match backend { + wgpu::Backend::Vulkan | wgpu::Backend::Metal => true, + wgpu::Backend::Dx12 => fxc(), + _ => false, + } +} + +/// D3D12 compiles with FXC: `WGPU_DX12_COMPILER` says `fxc`, or leaves wgpu's choice (`auto`), +/// which takes DXC when it can load a `dxcompiler.dll` (#6756) and FXC otherwise. Looked up +/// once: neither changes while the app runs. +#[cfg(not(target_arch = "wasm32"))] +fn dx12_compiles_with_fxc() -> bool { + static FXC: std::sync::OnceLock = std::sync::OnceLock::new(); + *FXC.get_or_init(|| fxc_chosen(std::env::var("WGPU_DX12_COMPILER").ok().as_deref(), dxcompiler_found)) +} + +/// [`dx12_compiles_with_fxc`] for the variable's value `setting`, read as wgpu reads it; +/// `dxc_found` looks for the DLL. +#[cfg(not(target_arch = "wasm32"))] +fn fxc_chosen(setting: Option<&str>, dxc_found: impl FnOnce() -> bool) -> bool { + match setting.map(str::to_lowercase).as_deref() { + Some("fxc") => true, + Some("dxc" | "dynamicdxc" | "staticdxc") => false, + // `auto`, unset, or a value wgpu does not know (it keeps `auto` then). + _ => !dxc_found(), + } +} + +/// A `dxcompiler.dll` where Windows looks for one: beside the program, in the system folders, the +/// working folder or `PATH`. Conservative: one found there may be one Windows would not load. +#[cfg(not(target_arch = "wasm32"))] +fn dxcompiler_found() -> bool { + let program = std::env::current_exe().ok().and_then(|p| p.parent().map(std::path::Path::to_path_buf)); + let windows = std::env::var_os("SystemRoot").map(std::path::PathBuf::from); + let system = windows.as_ref().map(|w| w.join("System32")); + let path = std::env::var_os("PATH"); + program + .into_iter() + .chain(system) + .chain(windows) + .chain(std::env::current_dir().ok()) + .chain(path.iter().flat_map(std::env::split_paths)) + .any(|folder| folder.join("dxcompiler.dll").is_file()) +} + +impl<'scope, 'env> Jobs<'scope, 'env> { + /// Start `work` on a thread of its own (or later, on the calling thread: see the module). + /// `work` may run twice, so it only builds what it returns. + #[cfg(not(target_arch = "wasm32"))] + pub fn spawn(&self, work: F) -> Job<'scope, T, F> + where + T: Send + 'scope, + F: Fn() -> T + Copy + Send + 'scope, + { + let device = self.device; + let worker = self.threads.and_then(|s| std::thread::Builder::new().name(WORKER.into()).spawn_scoped(s, move || checked(device, work)).ok()); + Job { work, worker } + } + + /// Run `work` when it is joined: the browser has no threads. + #[cfg(target_arch = "wasm32")] + pub fn spawn T>(&self, work: F) -> Job<'scope, T, F> { + let _ = self.device; + Job { work, worker: PhantomData } + } +} + +impl T> Job<'_, T, F> { + /// What the job built: on its thread, or now on this one (see the module). + #[cfg_attr(target_arch = "wasm32", allow(unused_mut))] // Only native jobs have a thread to take. + pub fn join(mut self) -> T { + #[cfg(not(target_arch = "wasm32"))] + if let Some(built) = self.worker.take().and_then(|w| w.join().ok().flatten()) { + return built; + } + (self.work)() + } +} + +/// A job dropped unjoined still waits for its thread: the scope would otherwise panic at its end +/// if that thread had panicked. +#[cfg(not(target_arch = "wasm32"))] +impl Drop for Job<'_, T, F> { + fn drop(&mut self) { + if let Some(worker) = self.worker.take() { + let _ = worker.join(); + } + } +} + +/// `work`'s result, or `None` when it raised a GPU error on this thread (logged: the job runs +/// again on the calling thread, where the error may not recur). +#[cfg(not(target_arch = "wasm32"))] +fn checked(device: &wgpu::Device, work: impl Fn() -> T) -> Option { + let scopes = crate::error_scopes(device); + let built = work(); + match crate::caught(scopes) { + Some(e) => { + log::warn!("GPU pipelines built again on the calling thread: {e}"); + None + } + None => Some(built), + } +} + +#[cfg(all(test, not(target_arch = "wasm32")))] +mod tests { + use std::sync::atomic::{AtomicUsize, Ordering}; + + use super::*; + + #[test] + fn only_backends_that_make_pipelines_on_any_thread_get_threads() { + for fxc in [true, false] { + assert!(threaded(wgpu::Backend::Vulkan, || fxc)); + assert!(threaded(wgpu::Backend::Metal, || fxc)); + assert!(!threaded(wgpu::Backend::Gl, || fxc)); + assert!(!threaded(wgpu::Backend::BrowserWebGpu, || fxc)); + assert!(!threaded(wgpu::Backend::Noop, || fxc)); + } + assert!(threaded(wgpu::Backend::Dx12, || true), "D3D12 with FXC"); + assert!(!threaded(wgpu::Backend::Dx12, || false), "D3D12 with DXC"); + } + + #[test] + fn d3d12_compiles_with_fxc_unless_dxc_is_chosen_or_found() { + for setting in [Some("fxc"), Some("FXC")] { + assert!(fxc_chosen(setting, || true), "{setting:?} keeps FXC even with a DLL around"); + } + for setting in [Some("dxc"), Some("DynamicDxc"), Some("staticdxc")] { + assert!(!fxc_chosen(setting, || false), "{setting:?} chooses DXC"); + } + // wgpu does not trim the value: " fxc " is a value it does not know, so `auto`. + for setting in [None, Some("auto"), Some(""), Some("unknown"), Some(" fxc ")] { + assert!(fxc_chosen(setting, || false), "{setting:?} without a DLL: FXC"); + assert!(!fxc_chosen(setting, || true), "{setting:?} with a DLL: DXC"); + } + } + + /// A buffer wgpu refuses: mapped for reading and for writing at once. + fn refused_buffer(device: &wgpu::Device) -> wgpu::Buffer { + device.create_buffer(&wgpu::BufferDescriptor { + label: Some("refused"), + size: 16, + usage: wgpu::BufferUsages::MAP_READ | wgpu::BufferUsages::MAP_WRITE, + mapped_at_creation: false, + }) + } + + #[test] + fn jobs_hand_back_what_they_built() { + let Ok((_, device, _)) = crate::open_headless() else { + eprintln!("skipped: no GPU adapter"); + return; + }; + let runs = AtomicUsize::new(0); + let built = scope(&device, |jobs| { + let a = jobs.spawn(|| { + runs.fetch_add(1, Ordering::Relaxed); + 1 + }); + let b = jobs.spawn(|| { + runs.fetch_add(1, Ordering::Relaxed); + 2 + }); + (a.join(), b.join()) + }); + assert_eq!(built, (1, 2)); + assert_eq!(runs.load(Ordering::Relaxed), 2, "a job that went well runs once"); + } + + #[test] + fn an_error_on_a_job_reaches_the_callers_error_scope() { + let Ok((_, device, _)) = crate::open_headless() else { + eprintln!("skipped: no GPU adapter"); + return; + }; + let runs = AtomicUsize::new(0); + let caller = device.push_error_scope(wgpu::ErrorFilter::Validation); + let device_ref = &device; + let runs_ref = &runs; + scope(&device, |jobs| { + let job = jobs.spawn(move || { + runs_ref.fetch_add(1, Ordering::Relaxed); + refused_buffer(device_ref) + }); + drop(job.join()); + }); + let error = crate::popped(caller.pop()); + assert!(error.is_some(), "the caller's scope catches the job's error"); + let expected = if threaded(device.adapter_info().backend, dx12_compiles_with_fxc) { 2 } else { 1 }; + assert_eq!(runs.load(Ordering::Relaxed), expected, "the job ran again on the calling thread"); + } + + #[test] + fn a_job_dropped_unjoined_whose_thread_panicked_does_not_panic_the_scope() { + let Ok((_, device, _)) = crate::open_headless() else { + eprintln!("skipped: no GPU adapter"); + return; + }; + let finished = scope(&device, |jobs| { + drop(jobs.spawn(|| { + if std::thread::current().name() == Some(WORKER) { + panic!("a job's thread panicked"); + } + })); + true + }); + assert!(finished); + } + + #[test] + fn a_job_whose_thread_panicked_runs_again_on_the_calling_thread() { + let Ok((_, device, _)) = crate::open_headless() else { + eprintln!("skipped: no GPU adapter"); + return; + }; + let built = scope(&device, |jobs| { + let job = jobs.spawn(|| { + if std::thread::current().name() == Some(WORKER) { + panic!("a job's thread panicked"); + } + 7 + }); + job.join() + }); + assert_eq!(built, 7); + } +} diff --git a/crates/gpu/src/lib.rs b/crates/gpu/src/lib.rs index 25f0fc06a..58517e835 100644 --- a/crates/gpu/src/lib.rs +++ b/crates/gpu/src/lib.rs @@ -20,6 +20,7 @@ use solidcraft_geom::tess::{EvalCurve, EvalSurface, TessPlan}; use wgpu::util::DeviceExt; pub mod capture; +pub mod concurrent; #[cfg(not(target_arch = "wasm32"))] pub mod path; mod pbr; @@ -60,6 +61,22 @@ fn popped(f: impl std::future::Future>) -> Option [wgpu::ErrorScopeGuard; 3] { + [wgpu::ErrorFilter::OutOfMemory, wgpu::ErrorFilter::Internal, wgpu::ErrorFilter::Validation].map(|f| device.push_error_scope(f)) +} + +/// The first error the scopes caught. +fn caught(scopes: [wgpu::ErrorScopeGuard; 3]) -> Option { + let mut failed = None; + for scope in scopes.into_iter().rev() { + if let Some(e) = popped(scope.pop()) { + failed.get_or_insert(e.to_string()); + } + } + failed +} + /// An adapter and device without a window (native only): the adapter [`select::pick`] chooses /// under the `SOLIDCRAFT_GPU` policy. The environment may narrow the backends and pick the D3D12 /// shader compiler (`WGPU_BACKEND`, `WGPU_DX12_COMPILER`). @@ -141,6 +158,7 @@ pub struct Part { } /// The compute pipeline, ready to evaluate plans on one device. +#[derive(Clone)] pub struct TessGpu { adapter: String, device: wgpu::Device, diff --git a/crates/gpu/src/view.rs b/crates/gpu/src/view.rs index f7a8249cf..467e1a0c2 100644 --- a/crates/gpu/src/view.rs +++ b/crates/gpu/src/view.rs @@ -1942,6 +1942,10 @@ pub struct Renderer { tri_cut_instanced_flat: Option, /// The tessellation compute pipeline, where the device runs compute shaders. tess: Option, + /// The tessellation compute pipeline while it compiles beside the window ([`TessLater`]): + /// `tess` once it is ready. + #[cfg(not(target_arch = "wasm32"))] + tess_later: Option, /// While a section is shown (when the depth buffer has a stencil), in place of `tri`: the /// faces marking where the cap shows, their depth pushed back, then the cap again at the /// section plane's depth, so it hides the inside ([`Cut`]). @@ -2448,12 +2452,6 @@ impl Renderer { cache: None, }) }; - let both = |label: &str, cull: Option| { - (see_through(label, TriSource::Instanced, cull), see_through(&format!("{label}_flat"), TriSource::InstancedFlat, cull)) - }; - let glass_far_instanced = both("sc_glass_far_instanced", Some(wgpu::Face::Front)); - let glass_near_instanced = both("sc_glass_near_instanced", Some(wgpu::Face::Back)); - let trans_instanced = both("sc_trans_instanced", None); let image_bgl = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { label: Some("sc_image"), entries: &[ @@ -2481,31 +2479,33 @@ impl Renderer { immediate_size: 0, }); const IA: [wgpu::VertexAttribute; 3] = wgpu::vertex_attr_array![0 => Float32x3, 1 => Float32x2, 2 => Float32]; - let image = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { - label: Some("sc_image"), - layout: Some(&image_layout), - vertex: wgpu::VertexState { - module: &module, - entry_point: Some("vs_img"), - buffers: &[Some(wgpu::VertexBufferLayout { - array_stride: IMG_SIZE as u64, - step_mode: wgpu::VertexStepMode::Vertex, - attributes: &IA, - })], - compilation_options: Default::default(), - }, - primitive: wgpu::PrimitiveState { topology: wgpu::PrimitiveTopology::TriangleList, ..Default::default() }, - depth_stencil: depth(wgpu::CompareFunction::LessEqual, false), - multisample: wgpu::MultisampleState { count: t.samples.max(1), mask: !0, alpha_to_coverage_enabled: false }, - fragment: Some(wgpu::FragmentState { - module: &module, - entry_point: Some("fs_img"), - targets: &[Some(wgpu::ColorTargetState { format: t.format, blend: alpha, write_mask: wgpu::ColorWrites::ALL })], - compilation_options: Default::default(), - }), - multiview_mask: None, - cache: None, - }); + let image = || { + device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + label: Some("sc_image"), + layout: Some(&image_layout), + vertex: wgpu::VertexState { + module: &module, + entry_point: Some("vs_img"), + buffers: &[Some(wgpu::VertexBufferLayout { + array_stride: IMG_SIZE as u64, + step_mode: wgpu::VertexStepMode::Vertex, + attributes: &IA, + })], + compilation_options: Default::default(), + }, + primitive: wgpu::PrimitiveState { topology: wgpu::PrimitiveTopology::TriangleList, ..Default::default() }, + depth_stencil: depth(wgpu::CompareFunction::LessEqual, false), + multisample: wgpu::MultisampleState { count: t.samples.max(1), mask: !0, alpha_to_coverage_enabled: false }, + fragment: Some(wgpu::FragmentState { + module: &module, + entry_point: Some("fs_img"), + targets: &[Some(wgpu::ColorTargetState { format: t.format, blend: alpha, write_mask: wgpu::ColorWrites::ALL })], + compilation_options: Default::default(), + }), + multiview_mask: None, + cache: None, + }) + }; let access_bgl = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { label: Some("sc_access"), entries: &[wgpu::BindGroupLayoutEntry { @@ -2519,10 +2519,11 @@ impl Renderer { count: None, }], }); - let ao = ao::Resources::new(device, &bgl, &module, reversed); + let ao_layout = ao::Resources::layout(device); + let ao = || ao::Resources::new(device, &ao_layout, &bgl, &module, reversed); let solid_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Some("sc_solid"), - bind_group_layouts: &[Some(&bgl), Some(&access_bgl), Some(&ao.layout)], + bind_group_layouts: &[Some(&bgl), Some(&access_bgl), Some(&ao_layout)], immediate_size: 0, }); let built = [Some(tri_layout())]; @@ -2564,39 +2565,49 @@ impl Renderer { let solid = |label: &str, fs: &str, cull: Option, ds: Option, source: TriSource| { solid_writes(label, fs, cull, ds, source, true) }; - // While a section is shown: the stencil marking and the cap (see `Renderer::tri_cut`). - let cut = |source: TriSource| { - t.depth.filter(|f| f.has_stencil_aspect()).map(|format| { - // The visible surface, by its true depth, marks the stencil: 1 where it is a back face (the cap). - use wgpu::StencilOperation::{Keep, Replace, Zero}; - let face = |pass_op| wgpu::StencilFaceState { compare: wgpu::CompareFunction::Always, fail_op: Keep, depth_fail_op: Keep, pass_op }; - let mark = wgpu::DepthStencilState { - format, - depth_write_enabled: Some(true), - depth_compare: Some(depth_compare(reversed, wgpu::CompareFunction::Less)), - stencil: wgpu::StencilState { front: face(Zero), back: face(Replace), read_mask: 0xff, write_mask: 0xff }, - bias: Default::default(), - }; - // Then the cap's back faces again, only there, at the section plane's depth. - let only = wgpu::StencilFaceState { compare: wgpu::CompareFunction::Equal, ..face(Keep) }; - let cap = wgpu::DepthStencilState { - format, - depth_write_enabled: Some(true), - depth_compare: Some(wgpu::CompareFunction::Always), - stencil: wgpu::StencilState { front: only, back: only, read_mask: 0xff, write_mask: 0 }, - bias: Default::default(), - }; - Cut { - mark: solid("sc_tris_mark", "fs_solid", None, Some(mark), source), - push: solid_writes("sc_tris_push", "fs_solid", None, pushed(wgpu::CompareFunction::Less, true, FACE_BIAS), source, false), - // Depth only: every back face behind a marked pixel draws here, so writing - // colour let the last one drawn paint the cut, other bodies behind it - // included (their colours and outlines showed through it, #6328). The - // marking pass already drew the nearest back face's colour. - cap: solid_writes("sc_tris_cap", "fs_solid_cut", Some(wgpu::Face::Front), Some(cap), source, false), - } + // While a section is shown, the depth states of the stencil marking and of the cap (see + // `Renderer::tri_cut`), where the depth buffer has a stencil. + let cut_states = t.depth.filter(|f| f.has_stencil_aspect()).map(|format| { + // The visible surface, by its true depth, marks the stencil: 1 where it is a back face (the cap). + use wgpu::StencilOperation::{Keep, Replace, Zero}; + let face = |pass_op| wgpu::StencilFaceState { compare: wgpu::CompareFunction::Always, fail_op: Keep, depth_fail_op: Keep, pass_op }; + let mark = wgpu::DepthStencilState { + format, + depth_write_enabled: Some(true), + depth_compare: Some(depth_compare(reversed, wgpu::CompareFunction::Less)), + stencil: wgpu::StencilState { front: face(Zero), back: face(Replace), read_mask: 0xff, write_mask: 0xff }, + bias: Default::default(), + }; + // Then the cap's back faces again, only there, at the section plane's depth. + let only = wgpu::StencilFaceState { compare: wgpu::CompareFunction::Equal, ..face(Keep) }; + let cap = wgpu::DepthStencilState { + format, + depth_write_enabled: Some(true), + depth_compare: Some(wgpu::CompareFunction::Always), + stencil: wgpu::StencilState { front: only, back: only, read_mask: 0xff, write_mask: 0 }, + bias: Default::default(), + }; + (mark, cap) + }); + // `Cut::mark` and `Cut::push` use `tri`'s fragment shader; `Cut::cap` has its own. + let marks = |source: TriSource| { + cut_states.as_ref().map(|(mark, _)| { + ( + solid("sc_tris_mark", "fs_solid", None, Some(mark.clone()), source), + solid_writes("sc_tris_push", "fs_solid", None, pushed(wgpu::CompareFunction::Less, true, FACE_BIAS), source, false), + ) }) }; + // Depth only: every back face behind a marked pixel draws here, so writing colour let the + // last one drawn paint the cut, other bodies behind it included (their colours and + // outlines showed through it, #6328). The marking pass already drew the nearest back + // face's colour. + let cap = |source: TriSource| { + cut_states.as_ref().map(|(_, cap)| solid_writes("sc_tris_cap", "fs_solid_cut", Some(wgpu::Face::Front), Some(cap.clone()), source, false)) + }; + let cut = |marks: Option<(wgpu::RenderPipeline, wgpu::RenderPipeline)>, cap: Option| { + marks.zip(cap).map(|((mark, push), cap)| Cut { mark, push, cap }) + }; let access_bind = access_texture(device, None, &access_bgl, 1, &[]); let sampler = device.create_sampler(&wgpu::SamplerDescriptor { label: Some("sc_image"), @@ -2657,86 +2668,195 @@ impl Renderer { }) }; let pass_depth = window_depth(wgpu::CompareFunction::Always); - let (ss_blit, copy_blit) = (blit("fs", window.samples.max(1), pass_depth.clone()), blit("fs_copy", window.samples.max(1), pass_depth)); - // Into the cached picture's own texture: no depth, one sample. - let ss_filter = blit("fs", 1, None); - let oit = oit::Pipelines::new(device, &module, &layout, t.format, t.depth, t.samples); - let depth_reset = window.reversed_depth().then(|| depth_reset_pipeline(device, window)).flatten(); - Renderer { - ao, - depth_reset, - section_reset: t.depth.filter(|f| f.has_stencil_aspect()).and_then(|_| depth_reset_pipeline(device, t)), - target: GpuTarget { oit: oit.is_some(), ..t }, - window, - max_texture: device.limits().max_texture_dimension_2d, - ss_blit, - ss_filter, - copy_blit, - ss_scaled: false, - oit, - oit_targets: None, - ss_bgl, - ss: None, - ss_ready: false, - stats: DrawStatsHandle::default(), - ss_stats: DrawStats::default(), - ss_key: None, - cached: None, - image, - image_bgl, - sampler, - textures: Default::default(), - quads: Vec::new(), - tri: solid("sc_tris", "fs_solid", None, pushed(wgpu::CompareFunction::Less, true, FACE_BIAS), TriSource::Built), - tri_cut: cut(TriSource::Built), - tri_planned: solid("sc_tris_planned", "fs_solid", None, pushed(wgpu::CompareFunction::Less, true, FACE_BIAS), TriSource::Planned), - tri_cut_planned: cut(TriSource::Planned), - tri_instanced: solid("sc_tris_instanced", "fs_solid", None, pushed(wgpu::CompareFunction::Less, true, FACE_BIAS), TriSource::Instanced), - tri_cut_instanced: cut(TriSource::Instanced), - tri_instanced_flat: solid( - "sc_tris_instanced_flat", - "fs_solid", - None, - pushed(wgpu::CompareFunction::Less, true, FACE_BIAS), - TriSource::InstancedFlat, - ), - tri_cut_instanced_flat: cut(TriSource::InstancedFlat), - glass_far_instanced, - glass_near_instanced, - trans_instanced, - tess, - access_bgl, - access_bind, - access_version: 0, - tri_hl: pipeline("sc_tris_hl", "vs_tri", "fs_tri", tri_layout(), highlight_depth(t.depth), alpha), - tri_hl_hover: solid("sc_tris_hl_hover", "fs_hl_hover", None, highlight_depth(t.depth), TriSource::Planned), - tri_hl_selected: solid("sc_tris_hl_selected", "fs_hl_selected", None, highlight_depth(t.depth), TriSource::Planned), - tri_hl_hover_built: solid("sc_tris_hl_hover_built", "fs_hl_hover", None, highlight_depth(t.depth), TriSource::Built), - tri_hl_selected_built: solid("sc_tris_hl_selected_built", "fs_hl_selected", None, highlight_depth(t.depth), TriSource::Built), - tri_hl_instanced: solid("sc_tris_hl_instanced", "fs_tri", None, highlight_depth(t.depth), TriSource::Instanced), - tri_hl_instanced_flat: solid("sc_tris_hl_instanced_flat", "fs_tri", None, highlight_depth(t.depth), TriSource::InstancedFlat), - pbr: pipeline("sc_pbr", "vs_pbr", "fs_pbr", pbr_layout(), pushed(wgpu::CompareFunction::Less, true, FACE_BIAS), None), - trans: pipeline("sc_trans", "vs_tri", "fs_tri", tri_layout(), depth(wgpu::CompareFunction::LessEqual, false), alpha), - glass_far: glass("sc_glass_far", wgpu::Face::Front), - glass_near: glass("sc_glass_near", wgpu::Face::Back), - ghost: pipeline("sc_ghost", "vs_tri", "fs_tri", tri_layout(), pushed(wgpu::CompareFunction::LessEqual, false, GHOST_BIAS), alpha), - xray: pipeline("sc_xray", "vs_tri", "fs_tri", tri_layout(), depth(wgpu::CompareFunction::Always, false), alpha), - line: pipeline("sc_lines", "vs_line", "fs_line", line_layout(), depth(wgpu::CompareFunction::LessEqual, false), alpha), - line_hidden: pipeline("sc_lines_hidden", "vs_line", "fs_line", line_layout(), depth(wgpu::CompareFunction::Greater, false), alpha), - overlay: pipeline("sc_overlay", "vs_line", "fs_line_all", line_layout(), depth(wgpu::CompareFunction::Always, false), alpha), - guide_trans: pipeline("sc_guide_trans", "vs_tri", "fs_tri_all", tri_layout(), depth(wgpu::CompareFunction::LessEqual, false), alpha), - guide_line: pipeline("sc_guide_lines", "vs_line", "fs_line_all", line_layout(), depth(wgpu::CompareFunction::LessEqual, false), alpha), - uniform, - uniform_bgl: bgl, - bind, - linear_out: t.format.is_srgb(), - model: Batches::default(), - product: Batches::default(), - empty: Batches::default(), - sketch: Batches::default(), - highlight: Batches::default(), - preview: Batches::default(), - } + let blits = || { + ( + blit("fs", window.samples.max(1), pass_depth.clone()), + blit("fs_copy", window.samples.max(1), pass_depth.clone()), + // Into the cached picture's own texture: no depth, one sample. + blit("fs", 1, None), + ) + }; + let oit = || oit::Pipelines::new(device, &module, &layout, t.format, t.depth, t.samples); + let resets = || { + ( + window.reversed_depth().then(|| depth_reset_pipeline(device, window)).flatten(), + t.depth.filter(|f| f.has_stencil_aspect()).and_then(|_| depth_reset_pipeline(device, t)), + ) + }; + let opaque = || pushed(wgpu::CompareFunction::Less, true, FACE_BIAS); + // One job per fragment shader, the costly part: wgpu compiles a shader for the first + // pipeline that uses it and reuses it for the next, so each is still compiled once. A + // vertex shader two jobs share may be compiled by both; those are small. + let tris = || { + ( + solid("sc_tris", "fs_solid", None, opaque(), TriSource::Built), + marks(TriSource::Built), + solid("sc_tris_planned", "fs_solid", None, opaque(), TriSource::Planned), + marks(TriSource::Planned), + solid("sc_tris_instanced", "fs_solid", None, opaque(), TriSource::Instanced), + marks(TriSource::Instanced), + ) + }; + let caps = || (cap(TriSource::Built), cap(TriSource::Planned), cap(TriSource::Instanced)); + let flat = || (solid("sc_tris_instanced_flat", "fs_solid", None, opaque(), TriSource::InstancedFlat), marks(TriSource::InstancedFlat)); + let flat_cap = || cap(TriSource::InstancedFlat); + let hover = || { + ( + solid("sc_tris_hl_hover", "fs_hl_hover", None, highlight_depth(t.depth), TriSource::Planned), + solid("sc_tris_hl_hover_built", "fs_hl_hover", None, highlight_depth(t.depth), TriSource::Built), + ) + }; + let selected = || { + ( + solid("sc_tris_hl_selected", "fs_hl_selected", None, highlight_depth(t.depth), TriSource::Planned), + solid("sc_tris_hl_selected_built", "fs_hl_selected", None, highlight_depth(t.depth), TriSource::Built), + ) + }; + // `glass_far_instanced`, `glass_near_instanced` and `trans_instanced`, smooth or flat. + let see_through_instanced = |source: TriSource, suffix: &str| { + ( + see_through(&format!("sc_glass_far_instanced{suffix}"), source, Some(wgpu::Face::Front)), + see_through(&format!("sc_glass_near_instanced{suffix}"), source, Some(wgpu::Face::Back)), + see_through(&format!("sc_trans_instanced{suffix}"), source, None), + ) + }; + let see_through_tris = || { + ( + pipeline("sc_tris_hl", "vs_tri", "fs_tri", tri_layout(), highlight_depth(t.depth), alpha), + pipeline("sc_trans", "vs_tri", "fs_tri", tri_layout(), depth(wgpu::CompareFunction::LessEqual, false), alpha), + glass("sc_glass_far", wgpu::Face::Front), + glass("sc_glass_near", wgpu::Face::Back), + pipeline("sc_ghost", "vs_tri", "fs_tri", tri_layout(), pushed(wgpu::CompareFunction::LessEqual, false, GHOST_BIAS), alpha), + pipeline("sc_xray", "vs_tri", "fs_tri", tri_layout(), depth(wgpu::CompareFunction::Always, false), alpha), + see_through_instanced(TriSource::Instanced, ""), + solid("sc_tris_hl_instanced", "fs_tri", None, highlight_depth(t.depth), TriSource::Instanced), + ) + }; + let see_through_flat = || { + ( + see_through_instanced(TriSource::InstancedFlat, "_flat"), + solid("sc_tris_hl_instanced_flat", "fs_tri", None, highlight_depth(t.depth), TriSource::InstancedFlat), + ) + }; + let pbr = || pipeline("sc_pbr", "vs_pbr", "fs_pbr", pbr_layout(), opaque(), None); + let lines = || { + ( + pipeline("sc_lines", "vs_line", "fs_line", line_layout(), depth(wgpu::CompareFunction::LessEqual, false), alpha), + pipeline("sc_lines_hidden", "vs_line", "fs_line", line_layout(), depth(wgpu::CompareFunction::Greater, false), alpha), + ) + }; + let lines_all = || { + ( + pipeline("sc_overlay", "vs_line", "fs_line_all", line_layout(), depth(wgpu::CompareFunction::Always, false), alpha), + pipeline("sc_guide_lines", "vs_line", "fs_line_all", line_layout(), depth(wgpu::CompareFunction::LessEqual, false), alpha), + ) + }; + let guide_trans = || pipeline("sc_guide_trans", "vs_tri", "fs_tri_all", tri_layout(), depth(wgpu::CompareFunction::LessEqual, false), alpha); + // Each job on a thread of its own where the device allows it: D3D12 compiles every shader + // as its pipeline is made, which took seconds one after another (#4860). + crate::concurrent::scope(device, |jobs| { + let tris = jobs.spawn(tris); + let caps = jobs.spawn(caps); + let flat = jobs.spawn(flat); + let flat_cap = jobs.spawn(flat_cap); + let hover = jobs.spawn(hover); + let selected = jobs.spawn(selected); + let see_through_tris = jobs.spawn(see_through_tris); + let see_through_flat = jobs.spawn(see_through_flat); + let pbr = jobs.spawn(pbr); + let lines = jobs.spawn(lines); + let lines_all = jobs.spawn(lines_all); + let guide_trans = jobs.spawn(guide_trans); + let image = jobs.spawn(image); + let ao = jobs.spawn(ao); + let oit = jobs.spawn(oit); + let blits = jobs.spawn(blits); + let resets = jobs.spawn(resets); + let (tri, tri_marks, tri_planned, planned_marks, tri_instanced, instanced_marks) = tris.join(); + let (tri_cap, planned_cap, instanced_cap) = caps.join(); + let (tri_instanced_flat, flat_marks) = flat.join(); + let (tri_hl_hover, tri_hl_hover_built) = hover.join(); + let (tri_hl_selected, tri_hl_selected_built) = selected.join(); + let (tri_hl, trans, glass_far, glass_near, ghost, xray, (glass_far_smooth, glass_near_smooth, trans_smooth), tri_hl_instanced) = + see_through_tris.join(); + let ((glass_far_flat, glass_near_flat, trans_flat), tri_hl_instanced_flat) = see_through_flat.join(); + let (line, line_hidden) = lines.join(); + let (overlay, guide_line) = lines_all.join(); + let (ss_blit, copy_blit, ss_filter) = blits.join(); + let (depth_reset, section_reset) = resets.join(); + let oit = oit.join(); + Renderer { + ao: ao.join(), + depth_reset, + section_reset, + target: GpuTarget { oit: oit.is_some(), ..t }, + window, + max_texture: device.limits().max_texture_dimension_2d, + ss_blit, + ss_filter, + copy_blit, + ss_scaled: false, + oit, + oit_targets: None, + ss_bgl, + ss: None, + ss_ready: false, + stats: DrawStatsHandle::default(), + ss_stats: DrawStats::default(), + ss_key: None, + cached: None, + image: image.join(), + image_bgl, + sampler, + textures: Default::default(), + quads: Vec::new(), + tri, + tri_cut: cut(tri_marks, tri_cap), + tri_planned, + tri_cut_planned: cut(planned_marks, planned_cap), + tri_instanced, + tri_cut_instanced: cut(instanced_marks, instanced_cap), + tri_instanced_flat, + tri_cut_instanced_flat: cut(flat_marks, flat_cap.join()), + glass_far_instanced: (glass_far_smooth, glass_far_flat), + glass_near_instanced: (glass_near_smooth, glass_near_flat), + trans_instanced: (trans_smooth, trans_flat), + tess, + #[cfg(not(target_arch = "wasm32"))] + tess_later: None, + access_bgl, + access_bind, + access_version: 0, + tri_hl, + tri_hl_hover, + tri_hl_selected, + tri_hl_hover_built, + tri_hl_selected_built, + tri_hl_instanced, + tri_hl_instanced_flat, + pbr: pbr.join(), + trans, + glass_far, + glass_near, + ghost, + xray, + line, + line_hidden, + overlay, + guide_trans: guide_trans.join(), + guide_line, + uniform, + uniform_bgl: bgl.clone(), + bind, + linear_out: t.format.is_srgb(), + model: Batches::default(), + product: Batches::default(), + empty: Batches::default(), + sketch: Batches::default(), + highlight: Batches::default(), + preview: Batches::default(), + } + }) } } @@ -2904,6 +3024,61 @@ pub fn tessellation(adapter: &wgpu::Adapter, device: &wgpu::Device, queue: &wgpu } } +/// The plan evaluation ([`tessellation`]) compiled on a thread of its own, so the window does not +/// wait for it: D3D12 compiles the evaluation shader in seconds, most of the viewport's start +/// (#4860). Bodies are built on the CPU until [`TessLater::ready`] holds it, and stay so where it +/// never does (a device that cannot build it), as they are where [`tessellation`] gives `None`. +#[cfg(not(target_arch = "wasm32"))] +pub struct TessLater { + ready: Arc>, + /// Joined when dropped, so the app does not exit in the middle of the driver's compile. + worker: Option>, +} + +#[cfg(not(target_arch = "wasm32"))] +impl TessLater { + /// Start compiling [`tessellation`]'s pipeline (`shader`) for `device`. + pub fn start(adapter: &wgpu::Adapter, device: &wgpu::Device, queue: &wgpu::Queue, shader: &'static str) -> TessLater { + let ready = Arc::new(std::sync::OnceLock::new()); + let threaded = crate::concurrent::threads_allowed(device); + let (adapter, device, queue, slot) = (adapter.clone(), device.clone(), queue.clone(), ready.clone()); + let compile = move || { + if let Some(tess) = tessellation(&adapter, &device, &queue, shader) { + let _ = slot.set(tess); + } + }; + // Where the device may not make pipelines on two threads at once (DXC, OpenGL), or no + // thread starts, it compiles now, as before. + let worker = threaded.then(|| std::thread::Builder::new().name("solidcraft tessellation".into()).spawn(compile.clone()).ok()).flatten(); + if worker.is_none() { + compile(); + } + TessLater { ready, worker } + } + + /// The evaluation, there once it has compiled. + pub fn ready(&self) -> Arc> { + self.ready.clone() + } + + /// Wait for the compile to end. + #[cfg(test)] + fn wait(&mut self) { + if let Some(worker) = self.worker.take() { + let _ = worker.join(); + } + } +} + +#[cfg(not(target_arch = "wasm32"))] +impl Drop for TessLater { + fn drop(&mut self) { + if let Some(worker) = self.worker.take() { + let _ = worker.join(); + } + } +} + /// A device whose driver hangs on the evaluation shader, so bodies are built on the CPU there: /// the AMD FirePro D300/D500/D700 (Mac Pro 2013, Tahiti) under Metal, where macOS resets the GPU /// and the whole desktop freezes. `SOLIDCRAFT_CPU_TESS=1` forces CPU evaluation on any device. @@ -3004,6 +3179,7 @@ impl Renderer { res.ss_key = res.ss_ready.then_some(key); return; } + res.take_ready_tessellation(); res.model.take( device, queue, @@ -3139,6 +3315,21 @@ impl Renderer { pub fn target(&self) -> GpuTarget { self.target } + + /// Evaluate planned bodies with `later`'s pipeline once it has compiled (#4860). + #[cfg(not(target_arch = "wasm32"))] + pub fn tessellate_later(&mut self, later: TessLater) { + self.tess_later = Some(later); + } + + /// [`Renderer::tess`] from [`Renderer::tess_later`] once that has compiled. + fn take_ready_tessellation(&mut self) { + #[cfg(not(target_arch = "wasm32"))] + if let Some(tess) = self.tess_later.as_ref().and_then(|later| later.ready.get()) { + self.tess = Some(tess.clone()); + self.tess_later = None; + } + } } impl Renderer { @@ -3772,6 +3963,29 @@ mod tests { assert!(!super::hangs_on_gpu_tessellation(wgpu::Backend::Vulkan, "AMD FirePro W5100")); } + /// The plan evaluation compiled beside the window reaches the renderer once it is ready; one + /// that does not compile never does, and bodies stay built on the CPU (#4860). + #[test] + fn a_renderer_takes_the_plan_evaluation_once_it_has_compiled() { + let Ok((adapter, device, queue)) = crate::open_headless() else { + eprintln!("skipped: no GPU adapter"); + return; + }; + let depth = crate::depth_format(&device, true); + let target = super::GpuTarget { format: wgpu::TextureFormat::Rgba8Unorm, depth: Some(depth), samples: 1, tess: false, oit: false }; + let compiles = super::tessellation(&adapter, &device, &queue, crate::SHADER).is_some(); + for (shader, expected) in [(crate::SHADER, compiles), ("not a shader", false)] { + let mut later = super::TessLater::start(&adapter, &device, &queue, shader); + later.wait(); + let mut renderer = super::Renderer::new(&device, target, None); + renderer.take_ready_tessellation(); + assert!(renderer.tess.is_none(), "no evaluation before one is handed over"); + renderer.tessellate_later(later); + renderer.take_ready_tessellation(); + assert_eq!(renderer.tess.is_some(), expected, "shader {shader:.12}"); + } + } + /// The viewport shader parses and validates (a bad shader would only fail at run time). #[test] fn shader_is_valid() { diff --git a/crates/gpu/src/view/ao.rs b/crates/gpu/src/view/ao.rs index e6e51525c..850b0fac5 100644 --- a/crates/gpu/src/view/ao.rs +++ b/crates/gpu/src/view/ao.rs @@ -45,8 +45,9 @@ fn texture(device: &wgpu::Device, layout: &wgpu::BindGroupLayout, size: [u32; 2] } impl Resources { - pub fn new(device: &wgpu::Device, uniform: &wgpu::BindGroupLayout, module: &wgpu::ShaderModule, reversed: bool) -> Self { - let layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { + /// The layout of the depth map's bind group, which the lit pipelines' layout includes. + pub fn layout(device: &wgpu::Device) -> wgpu::BindGroupLayout { + device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { label: Some("sc_ao_depth"), entries: &[wgpu::BindGroupLayoutEntry { binding: 0, @@ -58,7 +59,18 @@ impl Resources { }, count: None, }], - }); + }) + } + + /// The prepass's pipelines and a 1 x 1 stand-in map, bound with `layout` ([`Resources::layout`]). + pub fn new( + device: &wgpu::Device, + layout: &wgpu::BindGroupLayout, + uniform: &wgpu::BindGroupLayout, + module: &wgpu::ShaderModule, + reversed: bool, + ) -> Self { + let layout = layout.clone(); let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Some("sc_ao_prepass"), bind_group_layouts: &[Some(uniform)], diff --git a/crates/gpu/src/view/msaa_check.rs b/crates/gpu/src/view/msaa_check.rs index 591c3581d..0f392f4ba 100644 --- a/crates/gpu/src/view/msaa_check.rs +++ b/crates/gpu/src/view/msaa_check.rs @@ -40,6 +40,10 @@ impl Renderer { return Ok(MsaaCheck::FailedAtOne); } replacement.tess = self.tess.take(); + #[cfg(not(target_arch = "wasm32"))] + { + replacement.tess_later = self.tess_later.take(); + } *self = replacement; Ok(MsaaCheck::Fallback) } diff --git a/crates/ui-egui/src/gpu.rs b/crates/ui-egui/src/gpu.rs index f5aba312f..3195b5079 100644 --- a/crates/ui-egui/src/gpu.rs +++ b/crates/ui-egui/src/gpu.rs @@ -16,22 +16,59 @@ pub use solidcraft_gpu::view::{ /// A frame of the viewport as an egui paint callback. pub struct ViewportCallback(pub Frame); +/// The GPU plan evaluation compiling beside the window: there once it is ready ([`tick_tessellation`]). +pub type TessReady = std::sync::Arc>; + /// Create the pipelines. Call once with the app's render state, the scene target's depth/stencil/ /// MSAA settings, and the target of the pass the picture is shown in. Without a stencil the /// section cap does not hide the inside of cut bodies. Without `gpu_meshing` (safe mode) bodies /// are meshed on the CPU. When the two targets differ, the scene is drawn offscreen and blitted. -/// Also returns the handle to what each frame drew. -pub fn install(rs: &egui_wgpu::RenderState, scene: GpuTarget, window: GpuTarget, gpu_meshing: bool) -> (GpuTarget, DrawStatsHandle) { +/// Also returns the handle to what each frame drew, and the GPU plan evaluation still compiling +/// (native: the target says `tess: false` until it is ready). +pub fn install( + rs: &egui_wgpu::RenderState, + scene: GpuTarget, + window: GpuTarget, + gpu_meshing: bool, +) -> (GpuTarget, DrawStatsHandle, Option) { log_uncaptured_errors(&rs.device); + // The evaluation shader compiles beside the window, which does not wait for it: on D3D12 it + // takes seconds, most of the start (#4860). Bodies are built on the CPU until it is ready. + #[cfg(not(target_arch = "wasm32"))] + let later = gpu_meshing.then(|| solidcraft_gpu::view::TessLater::start(&rs.adapter, &rs.device, &rs.queue, solidcraft_gpu::SHADER)); + #[cfg(target_arch = "wasm32")] let tess = if gpu_meshing { solidcraft_gpu::view::tessellation(&rs.adapter, &rs.device, &rs.queue, solidcraft_gpu::SHADER) } else { None }; - let scene = GpuTarget { tess: tess.is_some(), ..scene }; - let window = GpuTarget { tess: tess.is_some(), ..window }; - let res = Renderer::with_window_target(&rs.device, scene, window, tess); + #[cfg(not(target_arch = "wasm32"))] + let tess = None; + let (scene, window) = (GpuTarget { tess: tess.is_some(), ..scene }, GpuTarget { tess: tess.is_some(), ..window }); + #[allow(unused_mut)] // Only native hosts hand the renderer a later evaluation. + let mut res = Renderer::with_window_target(&rs.device, scene, window, tess); + #[cfg(not(target_arch = "wasm32"))] + let ready = later.map(|later| { + let ready = later.ready(); + res.tessellate_later(later); + ready + }); + #[cfg(target_arch = "wasm32")] + let ready = None; // What the renderer can do (order-independent transparency), not only what was asked for. let scene = res.target(); let stats = res.stats(); rs.renderer.write().callback_resources.insert(res); - (scene, stats) + (scene, stats, ready) +} + +/// Draw bodies from their plans on the GPU from the frame the evaluation shader has compiled +/// ([`install`]); until then, and where it never does, they are built on the CPU. +pub(crate) fn tick_tessellation(app: &mut crate::SolveApp) { + if app.viewport.tess_ready.as_ref().is_some_and(|ready| ready.get().is_some()) { + app.viewport.tess_ready = None; + if let Some(gpu) = app.viewport.gpu.as_mut() { + gpu.tess = true; + #[cfg(not(target_arch = "wasm32"))] + eprintln!("SolidCraft graphics: GPU tessellation ready; bodies are evaluated on the GPU from now on"); + } + } } /// A GPU error no error scope caught is reported, never a panic: a device's default handler @@ -532,6 +569,28 @@ impl OffscreenFrames { #[cfg(test)] mod tests { + /// Bodies are drawn from their plans on the GPU from the frame the evaluation shader has + /// compiled, and built on the CPU until then (#4860). + #[cfg(not(target_arch = "wasm32"))] + #[test] + fn plans_are_drawn_on_the_gpu_once_the_evaluation_has_compiled() { + let Ok(tess) = solidcraft_gpu::TessGpu::headless() else { + eprintln!("skipped: no GPU adapter that builds the evaluation"); + return; + }; + let mut app = crate::SolveApp::new(Default::default(), Default::default()); + app.viewport.gpu = + Some(super::GpuTarget { format: egui_wgpu::wgpu::TextureFormat::Rgba8Unorm, depth: None, samples: 1, tess: false, oit: false }); + let ready = super::TessReady::default(); + app.viewport.tess_ready = Some(ready.clone()); + super::tick_tessellation(&mut app); + assert!(app.viewport.gpu.is_some_and(|g| !g.tess), "still compiling: built on the CPU"); + assert!(ready.set(tess).is_ok()); + super::tick_tessellation(&mut app); + assert!(app.viewport.gpu.is_some_and(|g| g.tess), "compiled: drawn from plans"); + assert!(app.viewport.tess_ready.is_none()); + } + /// The offscreen tests start the backends the app would: on Windows without `WGPU_BACKEND` /// exactly one, from the app's order (D3D12, Vulkan, OpenGL); otherwise wgpu's default. #[cfg(not(target_arch = "wasm32"))] diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index f52388589..b6b0514d6 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -805,7 +805,7 @@ impl SolveApp { fn set_wgpu_targets(&mut self, rs: &egui_wgpu::RenderState, scene: crate::gpu::GpuTarget, window: crate::gpu::GpuTarget) { #[allow(unused_mut)] // Only native hosts can wait for the startup readback. - let (mut installed, stats) = gpu::install(rs, scene, window, !self.cpu_meshing); + let (mut installed, stats, tess_ready) = gpu::install(rs, scene, window, !self.cpu_meshing); #[cfg(not(target_arch = "wasm32"))] if scene.depth.is_some() && window.depth.is_none() && window.samples == 1 { let mut renderer = rs.renderer.write(); @@ -828,6 +828,7 @@ impl SolveApp { } } self.viewport.gpu = Some(installed); + self.viewport.tess_ready = tess_ready; self.viewport.draw_stats = Some(stats); render_workspace::invalidate_scene(self); let (samples, has_depth) = self.viewport.gpu.map_or((1, false), |g| (g.samples.max(1), g.depth.is_some())); @@ -1971,6 +1972,7 @@ impl SolveApp { /// Per-frame logic before layout. pub fn logic(&mut self, ctx: &egui::Context) { frame_watch::begin(self); + gpu::tick_tessellation(self); file_picker::tick(self, ctx); dialogs_save_mesh::tick_wait(self, ctx); easyprint_ui::tick(self, ctx); diff --git a/crates/ui-egui/src/viewport.rs b/crates/ui-egui/src/viewport.rs index ad90e91c1..49ab68431 100644 --- a/crates/ui-egui/src/viewport.rs +++ b/crates/ui-egui/src/viewport.rs @@ -114,6 +114,8 @@ pub struct ViewportState { /// greys out with it. pub(crate) corner_ok: bool, pub gpu: Option, + /// The GPU plan evaluation still compiling: `gpu.tess` once it is ready (#4860). + pub(crate) tess_ready: Option, /// What the GPU drew last frame, shared with the renderer (the frame-rate details, #2548). pub(crate) draw_stats: Option, /// The graphics backend and adapter, as the frame-rate details show them. @@ -431,6 +433,9 @@ fn scene_key(app: &SolveApp) -> u64 { solidcraft_engine::doc::display_quality::current().hash(&mut h); lod_generation(app).hash(&mut h); app.viewport.mesh_lods.generation().hash(&mut h); + // How bodies are drawn: from their plans on the GPU, or built here (until the evaluation + // shader has compiled, #4860). + app.viewport.gpu.is_some_and(|g| g.tess).hash(&mut h); // The section plane (its cut outlines are part of the model scene). section_plane(app).map(|(o, n)| [o.x, o.y, o.z, n.x, n.y, n.z].map(f64::to_bits)).hash(&mut h); app.cam.up.hash(&mut h); From ae530bff441363146a6e62c1d26a241ce188f14a Mon Sep 17 00:00:00 2001 From: Matthew Knutson Date: Tue, 27 Oct 2026 12:42:16 +0000 Subject: [PATCH 040/102] Typed contracts for the cylinder, sphere, torus, cone, pipe, bounding solid and scale (#2829) (#7145) * Typed contracts for the cylinder, sphere, torus, pipe, bounding solid and scale Contracts for solid.cylinder, solid.sphere, solid.torus, solid.pipe, solid.bounding_solid and solid.scale, with `FeatureResult` output, and the shared types `AxisDir` (calling `cmd::axis_dir_form`, split from `axis_dir_param`), `NumberExpr` and `ScaleFactors`. The descriptions say what the evaluation does: the limits it enforces, the real default scope of `targets`, and where `participants` overrides a key or has no effect. Scale makes no body, so it declares `name` and `participants` itself. Box's descriptions get the same corrections. The reply test runs every form in Warn and checks for no `param_warnings`; the guide lists the new types and adds lessons from the conversion. Co-Authored-By: Claude Opus 5.5 * Typed contract for the cone `solid.cone`, added on main beside the primitives this PR converts, gets its contract and `FeatureResult` output: the cylinder's keys plus `top_radius` / `top_diameter`, with the evaluation's limits in the descriptions (a radius above 0, a top radius of 0 or more, a height that is not 0 and may be negative, sizes within 1e7 mm). A `null` top radius stays the handler's to refuse, since the handler takes it beside a `top_diameter`. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/engine/src/cmd/features.rs | 65 +++++-- crates/engine/src/cmd/mod.rs | 2 +- crates/engine/src/schema/features.rs | 203 ++++++++++++++++++++- crates/engine/src/schema/features_tests.rs | 154 +++++++++++++++- crates/engine/src/schema/tests.rs | 55 +++++- crates/engine/src/schema/types.rs | 83 ++++++++- crates/engine/src/schema/unconverted.txt | 6 - docs/book/src/dev/schemas.md | 31 +++- 8 files changed, 560 insertions(+), 39 deletions(-) diff --git a/crates/engine/src/cmd/features.rs b/crates/engine/src/cmd/features.rs index 58668a8a3..e260ef51d 100644 --- a/crates/engine/src/cmd/features.rs +++ b/crates/engine/src/cmd/features.rs @@ -11,12 +11,21 @@ use solidcraft_geom::Vec3; use super::{CommandSpec, not_in_sketch}; use crate::params::{bad, bool_, expr, expr_problem, req_expr, str_, string_list, vec2, vec3}; -use crate::schema::features::{BoxParams, ExtrudeParams, FeatureResult}; +use crate::schema::features::{ + BoundingSolidParams, BoxParams, ConeParams, CylinderParams, ExtrudeParams, FeatureResult, PipeParams, ScaleParams, SphereParams, TorusParams, +}; use crate::schema::{TypedContract, output_schema_for}; use crate::{EngineError, Result, Session}; const BOX_CONTRACT: TypedContract = TypedContract::new(); const EXTRUDE_CONTRACT: TypedContract = TypedContract::new(); +const CYLINDER_CONTRACT: TypedContract = TypedContract::new(); +const SPHERE_CONTRACT: TypedContract = TypedContract::new(); +const TORUS_CONTRACT: TypedContract = TypedContract::new(); +const CONE_CONTRACT: TypedContract = TypedContract::new(); +const PIPE_CONTRACT: TypedContract = TypedContract::new(); +const BOUNDING_SOLID_CONTRACT: TypedContract = TypedContract::new(); +const SCALE_CONTRACT: TypedContract = TypedContract::new(); pub static COMMANDS: &[CommandSpec] = &[ CommandSpec::new("solid.extrude", "Extrude", crate::checked!("solid.extrude", extrude)) @@ -41,10 +50,30 @@ pub static COMMANDS: &[CommandSpec] = &[ .contract(&BOX_CONTRACT) .output(output_schema_for::) .params("length, width, height: expr; corner?: [x,y,z] | center?: [x,y,z] (numbers in mm or length expressions; default: the origin); operation?, targets?: [body], name?, body_name?"), - CommandSpec::new("solid.cylinder", "Cylinder", prim_cylinder).at("SOLID", "CREATE").icon("cylinder").params("radius | diameter, height: expr; base?: [x,y,z] (centre of the bottom: numbers in mm or length expressions; default: the origin); axis?: X|Y|Z|[x,y,z] (default Z); operation?, targets?: [body], name?, body_name?"), - CommandSpec::new("solid.sphere", "Sphere", prim_sphere).at("SOLID", "CREATE").icon("sphere").params("radius | diameter: expr; center?: [x,y,z] (numbers in mm or length expressions; default: the origin); operation?, targets?: [body], name?, body_name?"), - CommandSpec::new("solid.torus", "Torus", prim_torus).at("SOLID", "CREATE").icon("torus").params("major, minor: expr (radii); center?: [x,y,z] (numbers in mm or length expressions; default: the origin); operation?, targets?: [body], name?, body_name?"), - CommandSpec::new("solid.cone", "Cone", prim_cone).at("SOLID", "CREATE").icon("cone").params("radius | diameter, height: expr (the base circle, and the top's distance along the axis; a negative height goes the other way); top_radius? | top_diameter?: expr (the top circle; default 0: a full cone ending in an apex); base?: [x,y,z] (centre of the base circle: numbers in mm or length expressions; default: the origin); axis?: X|Y|Z|[x,y,z] (default Z); operation?, targets?: [body], name?, body_name?"), + CommandSpec::new("solid.cylinder", "Cylinder", crate::checked!("solid.cylinder", prim_cylinder)) + .at("SOLID", "CREATE") + .icon("cylinder") + .contract(&CYLINDER_CONTRACT) + .output(output_schema_for::) + .params("radius | diameter, height: expr; base?: [x,y,z] (centre of the bottom: numbers in mm or length expressions; default: the origin); axis?: X|Y|Z|[x,y,z] (default Z); operation?, targets?: [body], name?, body_name?"), + CommandSpec::new("solid.sphere", "Sphere", crate::checked!("solid.sphere", prim_sphere)) + .at("SOLID", "CREATE") + .icon("sphere") + .contract(&SPHERE_CONTRACT) + .output(output_schema_for::) + .params("radius | diameter: expr; center?: [x,y,z] (numbers in mm or length expressions; default: the origin); operation?, targets?: [body], name?, body_name?"), + CommandSpec::new("solid.torus", "Torus", crate::checked!("solid.torus", prim_torus)) + .at("SOLID", "CREATE") + .icon("torus") + .contract(&TORUS_CONTRACT) + .output(output_schema_for::) + .params("major, minor: expr (radii); center?: [x,y,z] (numbers in mm or length expressions; default: the origin); operation?, targets?: [body], name?, body_name?"), + CommandSpec::new("solid.cone", "Cone", crate::checked!("solid.cone", prim_cone)) + .at("SOLID", "CREATE") + .icon("cone") + .contract(&CONE_CONTRACT) + .output(output_schema_for::) + .params("radius | diameter, height: expr (the base circle, and the top's distance along the axis; a negative height goes the other way); top_radius? | top_diameter?: expr (the top circle; default 0: a full cone ending in an apex); base?: [x,y,z] (centre of the base circle: numbers in mm or length expressions; default: the origin); axis?: X|Y|Z|[x,y,z] (default Z); operation?, targets?: [body], name?, body_name?"), CommandSpec::new("solid.fillet", "Fillet", fillet) .at("SOLID", "MODIFY") .icon("fillet") @@ -70,17 +99,23 @@ pub static COMMANDS: &[CommandSpec] = &[ .icon("hole") .key("H") .params("position: [x,y,z] on a face (numbers, or length expressions the hole follows) | sketch + points: [sketch point ids] (one hole each, perpendicular to the sketch, into the material on whichever side of the sketch plane it is) | sketch alone (every sketch point: standalone points and circle centres); flip?: bool (sketch points: drill to the other side); single?: bool (with one sketch point: a Single hole that follows the point, drilled into the face there); direction?: [x,y,z] (default: into the face, against its outward normal; one that leaves the face is mirrored into it; ignored with sketch points unless single); diameter | thread (a tapped hole: metric major minus pitch or tabulated UNC/UNF, G or Rp cut-tap drill) | clearance: \"M6\" with fit?: close|normal|loose (ISO 273); depth? (default through all) | to?: [x,y,z] (To Object: drill to that face or point); references?: [{edge: [x,y,z] on a straight edge of the face, distance: expr}] (at most two; the centre goes that far from each edge's line, in the face's plane, and follows the edges; with a numeric position only); type?: simple|drilled|counterbore|countersink; tip_angle?; cb_diameter?, cb_depth?; cs_diameter?, cs_angle?; thread?: \"M6\" or \"1/4-20 UNC\" (cosmetic); handedness?: right|left (default right, needs thread for left); thread_depth?: positive length independent of drill depth (default: full useful cylindrical wall; must fit that wall); targets?: [body] (the bodies to drill; holes at the points of a sketch on a body's face default to that body, found along the holes' direction on it alone; explicit targets or participants override, [\"*\"] every body)"), - CommandSpec::new("solid.pipe", "Pipe", pipe) + CommandSpec::new("solid.pipe", "Pipe", crate::checked!("solid.pipe", pipe)) .at("SOLID", "CREATE") .icon("pipe") + .contract(&PIPE_CONTRACT) + .output(output_schema_for::) .params("path_sketch: sketch; path: [curve ids in order]; diameter: expr; wall?: expr (hollow); operation?, targets?, name?, body_name?"), - CommandSpec::new("solid.bounding_solid", "Bounding Solid", bounding_solid) + CommandSpec::new("solid.bounding_solid", "Bounding Solid", crate::checked!("solid.bounding_solid", bounding_solid)) .at("SOLID", "CREATE") .icon("bounding_solid") + .contract(&BOUNDING_SOLID_CONTRACT) + .output(output_schema_for::) .params("bodies?: [names] (default: all); margin?: expr; name?, body_name?"), - CommandSpec::new("solid.scale", "Scale", scale) + CommandSpec::new("solid.scale", "Scale", crate::checked!("solid.scale", scale)) .at("SOLID", "MODIFY") .icon("scale") + .contract(&SCALE_CONTRACT) + .output(output_schema_for::) .params("bodies: [names]; factor: expr | factors: [x, y, z] exprs; origin?: [x,y,z]"), CommandSpec::new("face.delete", "Delete Face", delete_face) .at("SOLID", "MODIFY") @@ -1296,13 +1331,21 @@ pub(super) fn point_param(s: &Session, p: &Value, key: &str, cmd: &str) -> Resul pub(super) fn axis_dir_param(p: &Value, cmd: &str) -> Result { match p.get("axis") { None => Ok(Vec3::Z), - Some(Value::String(a)) => match a.trim().to_ascii_uppercase().as_str() { + Some(v) => axis_dir_form(v).map_err(|why| bad(cmd, why)), + } +} + +/// What [`axis_dir_param`] reads a given `axis` as, without the design: X, Y or Z (trimmed, any +/// case), else a non-zero `[x, y, z]`, normalized. +pub(crate) fn axis_dir_form(v: &Value) -> std::result::Result { + match v { + Value::String(a) => match a.trim().to_ascii_uppercase().as_str() { "X" => Ok(Vec3::X), "Y" => Ok(Vec3::Y), "Z" => Ok(Vec3::Z), - _ => Err(bad(cmd, "`axis` must be X, Y, Z or [x, y, z]")), + _ => Err("`axis` must be X, Y, Z or [x, y, z]"), }, - Some(v) => vec3(v).and_then(|a| a.normalized()).ok_or_else(|| bad(cmd, "`axis` must be X, Y, Z or a non-zero [x, y, z]")), + v => vec3(v).and_then(|a| a.normalized()).ok_or("`axis` must be X, Y, Z or a non-zero [x, y, z]"), } } diff --git a/crates/engine/src/cmd/mod.rs b/crates/engine/src/cmd/mod.rs index cf4e47207..29ed3a392 100644 --- a/crates/engine/src/cmd/mod.rs +++ b/crates/engine/src/cmd/mod.rs @@ -37,7 +37,7 @@ mod features; mod features_more; pub(crate) use face::{FaceRefForm, face_ref_form}; pub(crate) use features::profiles as feature_profiles; -pub(crate) use features::{EdgeRefForm, edge_ref_form, sketch_key}; +pub(crate) use features::{EdgeRefForm, axis_dir_form, edge_ref_form, sketch_key}; pub use features::{auto_operation, extrude_reach}; pub use sketch_import::drawing_import_command; pub use sketch_modify::{extend_arc_preview, extend_preview, trim_piece}; diff --git a/crates/engine/src/schema/features.rs b/crates/engine/src/schema/features.rs index 81286aa33..78a04f321 100644 --- a/crates/engine/src/schema/features.rs +++ b/crates/engine/src/schema/features.rs @@ -9,8 +9,9 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use super::types::{ - AngleExpr, ConventionParam, DirectionParam, ExtentKeyword, ExtrudeOperation, FacesParam, FromPoint, IdOrName, LengthExpr, OperationParam, Point3, - PointExpr3, ProfilesParam, StringList, ThinSideParam, ToPoint, present, + AngleExpr, AxisDir, ConventionParam, DirectionParam, ExtentKeyword, ExtrudeOperation, FacesParam, FeatureCommon, FromPoint, IdOrName, LengthExpr, + NumberExpr, OperationParam, Point3, PointExpr3, ProfilesParam, ScaleFactors, SketchRef, StringList, ThinSideParam, ToPoint, feature_common, + present, }; /// Add a box primitive. @@ -35,10 +36,12 @@ pub struct BoxParams { /// How the box combines with existing bodies. Default: new. #[serde(default)] pub operation: Option, - /// The bodies a join, cut or intersect works on. Default: the bodies the box meets. + /// The bodies a join, cut or intersect works on. Default: every body in the active + /// component (an intersect removes those the box doesn't meet). Ignored when + /// `participants` lists bodies. #[serde(default)] pub targets: Option, - /// The bodies taking part (the same as `targets` for a primitive). + /// The bodies a join, cut or intersect works on, in place of `targets`. #[serde(default)] pub participants: Option, /// The feature's name in the timeline. @@ -166,6 +169,198 @@ pub struct ExtrudeParams { pub thickness2: Option, } +/// Add a cylinder primitive. +#[derive(Debug, Deserialize, JsonSchema)] +#[schemars(deny_unknown_fields)] +pub struct CylinderParams { + /// The radius. Give it or `diameter`; when both are given, `radius` is used. + #[serde(default)] + pub radius: Option, + /// The diameter, instead of `radius`. + #[serde(default)] + pub diameter: Option, + /// The height, along `axis`. + pub height: LengthExpr, + /// The centre of the bottom face. Default: the origin. + #[serde(default, deserialize_with = "present", skip_serializing_if = "Option::is_none")] + #[schemars(with = "PointExpr3")] + pub base: Option, + /// The direction from the bottom to the top. Default: Z. + #[serde(default, deserialize_with = "present", skip_serializing_if = "Option::is_none")] + #[schemars(with = "AxisDir")] + pub axis: Option, + /// How the cylinder combines with existing bodies. Default: new. + #[serde(default)] + pub operation: Option, + /// The bodies a join, cut or intersect works on. Default: every body in the active + /// component (an intersect removes those the cylinder doesn't meet). + /// Ignored when `participants` lists bodies. + #[serde(default)] + pub targets: Option, + #[serde(flatten, deserialize_with = "feature_common")] + pub common: FeatureCommon, +} + +/// Add a sphere primitive. +#[derive(Debug, Deserialize, JsonSchema)] +#[schemars(deny_unknown_fields)] +pub struct SphereParams { + /// The radius. Give it or `diameter`; when both are given, `radius` is used. + #[serde(default)] + pub radius: Option, + /// The diameter, instead of `radius`. + #[serde(default)] + pub diameter: Option, + /// The centre. Default: the origin. + #[serde(default, deserialize_with = "present", skip_serializing_if = "Option::is_none")] + #[schemars(with = "PointExpr3")] + pub center: Option, + /// How the sphere combines with existing bodies. Default: new. + #[serde(default)] + pub operation: Option, + /// The bodies a join, cut or intersect works on. Default: every body in the active + /// component (an intersect removes those the sphere doesn't meet). + /// Ignored when `participants` lists bodies. + #[serde(default)] + pub targets: Option, + #[serde(flatten, deserialize_with = "feature_common")] + pub common: FeatureCommon, +} + +/// Add a torus primitive, around the Z axis. +#[derive(Debug, Deserialize, JsonSchema)] +#[schemars(deny_unknown_fields)] +pub struct TorusParams { + /// The major radius: from the centre to the middle of the ring. + pub major: LengthExpr, + /// The minor radius: of the ring's cross-section, above 0 and less than `major`. + pub minor: LengthExpr, + /// The centre. Default: the origin. + #[serde(default, deserialize_with = "present", skip_serializing_if = "Option::is_none")] + #[schemars(with = "PointExpr3")] + pub center: Option, + /// How the torus combines with existing bodies. Default: new. + #[serde(default)] + pub operation: Option, + /// The bodies a join, cut or intersect works on. Default: every body in the active + /// component (an intersect removes those the torus doesn't meet). + /// Ignored when `participants` lists bodies. + #[serde(default)] + pub targets: Option, + #[serde(flatten, deserialize_with = "feature_common")] + pub common: FeatureCommon, +} + +/// Add a cone or truncated cone: the base circle and, `height` along `axis`, the top circle (a +/// point when its radius is 1e-6 mm or less). Its radii, height and base are within 1e7 mm. +#[derive(Debug, Deserialize, JsonSchema)] +#[schemars(deny_unknown_fields)] +pub struct ConeParams { + /// The base circle's radius, above 1e-6 mm. Give it or `diameter`; when both are given, + /// `radius` is used. + #[serde(default)] + pub radius: Option, + /// The base circle's diameter, instead of `radius`. + #[serde(default)] + pub diameter: Option, + /// The top circle's radius, 0 or more; up to 1e-6 mm makes a full cone ending in a point. + /// When both are given, `top_radius` is used. Default: 0. + #[serde(default)] + pub top_radius: Option, + /// The top circle's diameter, instead of `top_radius`. + #[serde(default)] + pub top_diameter: Option, + /// The top's distance from the base along `axis`, more than 1e-6 mm either way; a negative + /// height goes the other way. + pub height: LengthExpr, + /// The centre of the base circle. Default: the origin. + #[serde(default, deserialize_with = "present", skip_serializing_if = "Option::is_none")] + #[schemars(with = "PointExpr3")] + pub base: Option, + /// The direction `height` is measured along: from the base towards the top when `height` is + /// positive. Default: Z. + #[serde(default, deserialize_with = "present", skip_serializing_if = "Option::is_none")] + #[schemars(with = "AxisDir")] + pub axis: Option, + /// How the cone combines with existing bodies. Default: new. + #[serde(default)] + pub operation: Option, + /// The bodies a join, cut or intersect works on. Default: every body in the active + /// component (an intersect removes those the cone doesn't meet). + /// Ignored when `participants` lists bodies. + #[serde(default)] + pub targets: Option, + #[serde(flatten, deserialize_with = "feature_common")] + pub common: FeatureCommon, +} + +/// Add a solid tube along a path of sketch curves. +#[derive(Debug, Deserialize, JsonSchema)] +#[schemars(deny_unknown_fields)] +pub struct PipeParams { + /// The sketch holding the path, by id or name. + pub path_sketch: SketchRef, + /// The path's curve ids, in order along the path. + pub path: StringList, + /// The tube's outside diameter. + pub diameter: LengthExpr, + /// The wall thickness, for a hollow tube: above 0 and less than half `diameter`. Default: + /// solid. + #[serde(default)] + pub wall: Option, + /// How the pipe combines with existing bodies. Default: new. + #[serde(default)] + pub operation: Option, + /// The bodies a join, cut or intersect works on; given, they win over `participants`. + /// Default: `participants`, else every body in the active component (an intersect removes + /// those the pipe doesn't meet), or for a cut or intersect where it has none, every body. + #[serde(default)] + pub targets: Option, + #[serde(flatten, deserialize_with = "feature_common")] + pub common: FeatureCommon, +} + +/// Add a box around bodies, larger by a margin on every side. +#[derive(Debug, Deserialize, JsonSchema)] +#[schemars(deny_unknown_fields)] +pub struct BoundingSolidParams { + /// The bodies to enclose (`participants` doesn't change which). Default: all of them. + #[serde(default)] + pub bodies: Option, + /// How much larger than the bodies on every side. Default: 0. + #[serde(default)] + pub margin: Option, + #[serde(flatten, deserialize_with = "feature_common")] + pub common: FeatureCommon, +} + +/// Scale bodies about a point. +#[derive(Debug, Deserialize, JsonSchema)] +#[schemars(deny_unknown_fields)] +pub struct ScaleParams { + /// The bodies to scale. + pub bodies: StringList, + /// The same factor in every direction, above 1e-9 and below 1e6. Give it or `factors`. + #[serde(default)] + pub factor: Option, + /// Different factors along X, Y and Z, each above 1e-9 and below 1e6. When given, these set + /// the scale; a `factor` given too has no effect but must still evaluate. + #[serde(default)] + pub factors: Option, + /// The point that stays where it is, in mm. Default: the origin. + #[serde(default)] + pub origin: Option, + // Not `FeatureCommon`: a scale makes no body, so `body_name` and `body_names` would do nothing. + // `participants` stays because `timeline.redefine` passes a feature's own back. + /// The feature's name in the timeline. + #[serde(default)] + pub name: Option, + /// The bodies taking part, which every feature records; each an existing body or `*`. A + /// scale changes only `bodies`, whatever this lists. + #[serde(default)] + pub participants: Option, +} + /// What a feature command returns. #[derive(Debug, Serialize, JsonSchema)] pub struct FeatureResult { diff --git a/crates/engine/src/schema/features_tests.rs b/crates/engine/src/schema/features_tests.rs index 4ed208cde..e3e1679bb 100644 --- a/crates/engine/src/schema/features_tests.rs +++ b/crates/engine/src/schema/features_tests.rs @@ -1,6 +1,8 @@ use serde_json::{Value, json}; -use super::{BoxParams, ExtrudeParams, FeatureResult}; +use super::{ + BoundingSolidParams, BoxParams, ConeParams, CylinderParams, ExtrudeParams, FeatureResult, PipeParams, ScaleParams, SphereParams, TorusParams, +}; use crate::Session; use crate::schema::tests::{assert_keys, assert_strict_keeps_todays_errors, conforms, sketch_rectangle}; use crate::schema::{ParamCheck, input_schema_for, output_schema_for}; @@ -45,6 +47,42 @@ fn schemas_and_the_key_check_agree() { "to_offset", ], ); + assert_keys( + input_schema_for::(), + &["axis", "base", "body_name", "body_names", "diameter", "height", "name", "operation", "participants", "radius", "targets"], + ); + assert_keys( + input_schema_for::(), + &["body_name", "body_names", "center", "diameter", "name", "operation", "participants", "radius", "targets"], + ); + assert_keys( + input_schema_for::(), + &["body_name", "body_names", "center", "major", "minor", "name", "operation", "participants", "targets"], + ); + assert_keys( + input_schema_for::(), + &[ + "axis", + "base", + "body_name", + "body_names", + "diameter", + "height", + "name", + "operation", + "participants", + "radius", + "targets", + "top_diameter", + "top_radius", + ], + ); + assert_keys( + input_schema_for::(), + &["body_name", "body_names", "diameter", "name", "operation", "participants", "path", "path_sketch", "targets", "wall"], + ); + assert_keys(input_schema_for::(), &["bodies", "body_name", "body_names", "margin", "name", "participants"]); + assert_keys(input_schema_for::(), &["bodies", "factor", "factors", "name", "origin", "participants"]); } #[test] @@ -72,6 +110,31 @@ fn strict_keeps_todays_errors() { ("solid.extrude", json!({"distance": 5, "convention": "per_side"})), ("solid.extrude", json!({"distance": " "})), ("solid.extrude", json!({"distance": 5, "operation": "x".repeat(1000)})), + ("solid.cylinder", json!({"radius": 5, "height": 5, "axis": "W"})), + ("solid.cylinder", json!({"radius": 5, "height": 5, "axis": " w "})), + ("solid.cylinder", json!({"radius": 5, "height": 5, "axis": [0, 0, 0]})), + ("solid.cylinder", json!({"radius": 5, "height": 5, "axis": null})), + ("solid.cylinder", json!({"radius": 5, "height": 5, "base": [1, 2]})), + ("solid.cylinder", json!({"radius": 5, "height": 5, "operation": "bogus"})), + ("solid.cylinder", json!({"radius": 5, "height": true})), + ("solid.sphere", json!({"radius": 5, "center": "x"})), + ("solid.sphere", json!({"radius": 5, "center": null})), + ("solid.sphere", json!({"radius": 5, "operation": "bogus"})), + ("solid.torus", json!({"major": 5, "minor": 1, "center": {"x": 1, "y": 2}})), + ("solid.torus", json!({"major": true, "minor": 1})), + ("solid.torus", json!({"major": 5, "minor": 1, "operation": "bogus"})), + ("solid.cone", json!({"radius": 5, "height": 5, "axis": "W"})), + ("solid.cone", json!({"radius": 5, "height": 5, "axis": null})), + ("solid.cone", json!({"radius": 5, "height": 5, "base": [1, 2]})), + ("solid.cone", json!({"radius": 5, "height": true})), + ("solid.cone", json!({"radius": 5, "height": 5, "operation": "bogus"})), + // A `null` top radius alone is the handler's to refuse, with its message. + ("solid.cone", json!({"radius": 5, "height": 5, "top_radius": null})), + ("solid.pipe", json!({"path_sketch": true, "path": ["l1"], "diameter": 2})), + ("solid.pipe", json!({"path_sketch": null, "path": ["l1"], "diameter": 2})), + ("solid.scale", json!({"bodies": ["Body1"], "factors": [1, 2]})), + ("solid.scale", json!({"bodies": ["Body1"], "factors": [1, 2, 3, 4]})), + ("solid.scale", json!({"bodies": ["Body1"]})), ]); } @@ -126,3 +189,92 @@ fn replies_match_the_output_schema() { bad.as_object_mut().map(|o| o.remove("name")); assert!(!conforms(schema, schema, &bad), "{bad}"); } + +/// The feature commands converted after box and extrude answer with `FeatureResult` too, and +/// their contracts take every form these calls use: in Warn, a contract that refused one would +/// still run the command, so the replies are checked for warnings too. +#[test] +fn converted_primitives_and_body_commands_reply_with_feature_result() { + let schema = output_schema_for::(); + let schema = schema.as_value(); + let mut s = Session { param_check: ParamCheck::Warn, ..Session::default() }; + let mut run = |id: &str, p: Value| s.execute(id, &p).unwrap_or_else(|e| panic!("{id}: {e}")); + let mut replies = vec![ + run( + "solid.cylinder", + json!({"radius": 2, "diameter": 9, "height": 5, "base": [20, "0 mm", 0], "axis": " x ", "name": "Cyl", "body_name": "Cyl"}), + ), + run("solid.cylinder", json!({"diameter": 2, "height": 3, "base": [0, -20, 0], "axis": [0, 1, 0], "operation": "new body"})), + run( + "solid.cylinder", + json!({"radius": 1, "height": 3, "base": {"x": 0, "y": -30, "z": 0}, "axis": {"x": 0, "y": 0, "z": 1}, "body_names": ["Peg"]}), + ), + run("solid.sphere", json!({"diameter": 4, "center": {"x": 0, "y": 20, "z": 0}})), + run("solid.sphere", json!({"radius": 1, "center": [22, 0, 2], "operation": "union", "targets": ["Peg"], "participants": []})), + run("solid.sphere", json!({"radius": 1, "center": [23, 0, -2], "operation": "join", "targets": ["Peg"], "participants": ["Cyl"]})), + run("solid.torus", json!({"major": 5, "minor": 1, "center": [0, 0, "20 mm"], "participants": ["Peg"]})), + run("solid.bounding_solid", json!({"bodies": ["Cyl"], "margin": 1})), + run("solid.bounding_solid", json!({})), + run("solid.bounding_solid", json!({"bodies": "Peg", "body_name": "PegBox"})), + run("solid.scale", json!({"bodies": ["Cyl"], "factors": [1, 2, "1.5"], "origin": [20, 0, 0]})), + run("solid.scale", json!({"bodies": "Cyl", "factors": [1, 1, 2], "factor": 3})), + run( + "solid.scale", + json!({"bodies": "Peg", "factor": "3 / 2", "origin": {"x": 0, "y": -30, "z": 0}, "name": "Grow", "participants": ["Cyl"]}), + ), + ]; + let sketch = run("sketch.create", json!({"plane": "XZ", "name": "Path"})); + let line = run("sketch.line", json!({"points": [[40, 0], [40, 30]]})); + let across = run("sketch.line", json!({"points": [[22, -8], [22, 8]]})); + run("sketch.finish", json!({})); + let id = sketch["sketch"].clone(); + assert!(id.is_u64(), "{sketch}"); + replies.push(run("solid.pipe", json!({"path_sketch": "Path", "path": line["curves"].clone(), "diameter": 4, "wall": 1, "body_name": "Tube"}))); + replies.push(run( + "solid.pipe", + json!({"path_sketch": id, "path": across["curves"][0].clone(), "diameter": 1, "operation": "join", "targets": ["Cyl"]}), + )); + replies.push(run("solid.cone", json!({"radius": 3, "height": 6, "base": [60, 0, 0]}))); + replies.push(run( + "solid.cone", + json!({"diameter": 6, "top_diameter": 2, "height": "-4 mm", "base": {"x": 70, "y": 0, "z": 0}, "axis": " x ", "name": "Frustum", "body_name": "Frustum"}), + )); + replies.push(run( + "solid.cone", + json!({"radius": 2, "diameter": 9, "top_radius": 1, "top_diameter": 7, "height": 5, "base": [80, "0 mm", 0], "axis": [0, 1, 0]}), + )); + replies.push(run( + "solid.cone", + json!({"radius": 2, "top_radius": null, "top_diameter": 2, "height": 3, "base": [90, 0, 0], "axis": {"x": 0, "y": 0, "z": 1}, "operation": "new body", "body_names": ["Can"]}), + )); + // The cone meets only `Frustum` but joins its target, `Can`, as the sphere above does. + let cone_union = + run("solid.cone", json!({"radius": 1, "height": 2, "base": [69, 0, 0], "operation": "union", "targets": ["Can"], "participants": []})); + assert_eq!(cone_union["changed_bodies"], json!(["Can"]), "{cone_union}"); + replies.push(cone_union); + // Warn reports what the contract refuses and runs the command anyway. + let typo = run("solid.scale", json!({"bodies": "Cyl", "factor": 2, "colour": "red"})); + assert_eq!(typo["param_warnings"], json!(["unknown key `colour`"])); + // A scale makes no body, so its contract doesn't take the new body's name. + let no_body = run("solid.scale", json!({"bodies": "Cyl", "factor": 1, "body_name": "Big"})); + let warning = no_body["param_warnings"][0].as_str().unwrap_or_default(); + assert!(warning.starts_with("unknown key `body_name`"), "{no_body}"); + for r in replies.iter().chain([&typo, &no_body]) { + assert!(conforms(schema, schema, r), "{r} doesn't match {schema}"); + } + for r in &replies { + assert!(r.get("param_warnings").is_none(), "{r}"); + } + // A primitive's `targets` count when `participants` lists no bodies (the sphere meets only + // `Cyl` but joins `Peg`) and not when it does; a scale's `participants` don't change which + // bodies it scales. + let changed = [4, 5, 12].map(|i| replies[i]["changed_bodies"].clone()); + assert_eq!(changed, [json!(["Peg"]), json!(["Cyl"]), json!(["Peg"])]); + // With `factors` given, `factor` has no effect but must still evaluate. + assert!(s.execute("solid.scale", &json!({"bodies": "Cyl", "factors": [1, 1, 2], "factor": "no_such_parameter"})).is_err()); + // Without `targets`, a primitive works on every body in the component: an intersect removes + // the bodies it doesn't meet. + let r = s.execute("solid.sphere", &json!({"radius": 1, "center": [22, 0, 0], "operation": "intersect"})).unwrap_or_else(|e| panic!("{e}")); + let (changed, removed) = (r["changed_bodies"].as_array().cloned(), r["removed_bodies"].as_array().cloned()); + assert!(changed.is_some_and(|c| c.contains(&json!("Bounding"))) && removed.is_some_and(|r| r.contains(&json!("Peg"))), "{r}"); +} diff --git a/crates/engine/src/schema/tests.rs b/crates/engine/src/schema/tests.rs index 66bfd7ff0..3d5a3f00f 100644 --- a/crates/engine/src/schema/tests.rs +++ b/crates/engine/src/schema/tests.rs @@ -27,6 +27,7 @@ fn expressions_accept_what_params_expr_accepts() { for v in [json!(5), json!(-2.5), json!("w / 2"), json!(" 30 mm "), json!(999_999_999.0)] { let want = crate::params::expr(&json!({ "v": v.clone() }), "v"); assert_eq!(parse::(v.clone()).map(|e| e.0), want, "{v}"); + assert_eq!(parse::(v.clone()).map(|e| e.0), want, "{v}"); assert!(want.is_some(), "{v}"); } let long = "x".repeat(4097); @@ -37,6 +38,43 @@ fn expressions_accept_what_params_expr_accepts() { assert!(crate::params::expr(&json!({ "v": v.clone() }), "v").is_none(), "{v}"); assert!(parse::(v.clone()).is_none(), "{v}"); assert!(parse::(v.clone()).is_none(), "{v}"); + assert!(parse::(v.clone()).is_none(), "{v}"); + } +} + +/// `AxisDir` accepts what `features::axis_dir_param` reads (X, Y or Z trimmed of what Rust's +/// `trim` removes, in any case, or a non-zero vector), and its schema agrees: its string pattern +/// allows exactly that whitespace (`conforms` doesn't read patterns), and a schema can't refuse +/// the zero vector. `ScaleFactors` takes exactly three numbers or expressions. +#[test] +fn axes_and_scale_factors_match_their_readers() { + let root = schemars::schema_for!(AxisDir); + let root = root.as_value(); + for v in [json!("X"), json!(" y "), json!("z"), json!("\u{85}Z\u{3000}"), json!([0, 0, 1]), json!([1, 2, 3]), json!({"x": 0, "y": 1, "z": 0})] { + assert!(crate::cmd::axis_dir_form(&v).is_ok(), "{v}"); + assert!(parse::(v.clone()).is_some(), "{v}"); + assert!(conforms(root, root, &v), "{v}"); + } + for v in [json!("W"), json!("XY"), json!(""), json!("x\u{feff}"), json!([1, 2]), json!(null), json!(true), json!([0, 0, 0])] { + assert!(crate::cmd::axis_dir_form(&v).is_err(), "{v}"); + assert!(parse::(v.clone()).is_none(), "{v}"); + if !v.is_string() { + assert_eq!(conforms(root, root, &v), v == json!([0, 0, 0]), "{v}"); + } + } + // The same class as the expression schema's, whose text `the_blank_pattern_matches_trim` pins. + let ws = super::types::not_blank_pattern().trim_start_matches("[^").trim_end_matches(']').to_string(); + let pattern = root.pointer("/anyOf/0/pattern").and_then(Value::as_str); + assert_eq!(pattern, Some(format!("^[{ws}]*[XYZxyz][{ws}]*$").as_str())); + let root = schemars::schema_for!(ScaleFactors); + let root = root.as_value(); + for v in [json!([1, 2, 3]), json!([1, "k / 2", 2.5])] { + assert!(parse::(v.clone()).is_some(), "{v}"); + assert!(conforms(root, root, &v), "{v}"); + } + for v in [json!([1, 2]), json!([1, 2, 3, 4]), json!([1, true, 2]), json!([1, "", 2]), json!("2"), json!({})] { + assert!(parse::(v.clone()).is_none(), "{v}"); + assert!(!conforms(root, root, &v), "{v}"); } } @@ -518,10 +556,19 @@ pub(super) fn assert_keys(schema: Schema, fields: &[&str]) { assert_eq!(v.get("$schema").and_then(Value::as_str), Some("https://json-schema.org/draft/2020-12/schema")); } -/// A call that already fails gets the same error in strict as with the check off, apart from -/// the missing-key, missing-instead-of-wrong-type, non-object, profile-index, 10,000-item and -/// over-4-KB messages the report lists, and a list of picks where one finds nothing in the -/// design and a later one is malformed (the handler fails on the first, strict on the second). +/// A call with one problem that already fails gets the same error in strict as with the check +/// off, apart from messages that differ on purpose. Chiefly: a missing key; a value the handler +/// reads as missing where its message for a missing key says something else (a wrong type, a +/// list none of whose items is text, blank text, a number 1e9 or more in size or text over 4 KB +/// for an optional expression, an `extent` other than through_all); a non-object, a profile +/// index, a list over 10,000 items, a message quoting nearly 4 KB of the caller's text or more +/// (strict caps it); and a scale `factors` item that is blank, 1e9 or more in size, over 4 KB, +/// or not a number or an expression (see `ScaleFactors`). A call with more than one problem can +/// get another one named: strict and the handler look at the keys in different orders +/// (strict's comes from `TypedContract::check` and serde), and the handler may stop first at +/// one the contract can't see (against the design: a pick that finds nothing, a missing sketch, +/// an expression that doesn't evaluate; one of two keys, such as `radius` or `diameter`; an +/// empty list). /// Each module's `strict_keeps_todays_errors` calls this with its commands' cases; each runs /// after `sketch_rectangle`. pub(super) fn assert_strict_keeps_todays_errors(cases: &[(&str, Value)]) { diff --git a/crates/engine/src/schema/types.rs b/crates/engine/src/schema/types.rs index 1aa122ac0..ed6e6b986 100644 --- a/crates/engine/src/schema/types.rs +++ b/crates/engine/src/schema/types.rs @@ -41,11 +41,15 @@ pub(crate) const WHITESPACE: [(char, char); 10] = [ ('\u{3000}', '\u{3000}'), ]; +/// [`WHITESPACE`] as the inside of a regex character class. +fn whitespace_class() -> String { + let u = |c: char| format!("\\u{:04x}", c as u32); + WHITESPACE.iter().map(|&(a, b)| if a == b { u(a) } else { format!("{}-{}", u(a), u(b)) }).collect() +} + /// A pattern for text that isn't blank once trimmed: a character outside [`WHITESPACE`]. pub(crate) fn not_blank_pattern() -> String { - let u = |c: char| format!("\\u{:04x}", c as u32); - let class: String = WHITESPACE.iter().map(|&(a, b)| if a == b { u(a) } else { format!("{}-{}", u(a), u(b)) }).collect(); - format!("[^{class}]") + format!("[^{}]", whitespace_class()) } /// `v` as the only key of an object, for the helpers that read `p.get(key)`. @@ -96,6 +100,52 @@ expr_type!( "AngleExpr", "An angle: a number of degrees, or an expression such as \"30 deg\" or \"a / 2\"." ); +expr_type!( + /// A plain number, or an expression such as `"k / 2"`: a ratio or a factor, with no unit. + NumberExpr, + "NumberExpr", + "A number with no unit, or an expression such as \"k / 2\"." +); + +/// Scale's `factors`: three factors, along X, Y and Z, each a [`NumberExpr`]. The handler takes +/// any three values, reading an item that isn't text as its JSON text (`true`, `null`), and +/// reports one that doesn't evaluate as a bad expression. Strict refuses, with this type's +/// message, a blank item, a number of 1e9 or more in size, text over 4 KB, or one that isn't a +/// number or an expression. +#[derive(Clone, Debug, PartialEq)] +pub struct ScaleFactors(pub [NumberExpr; 3]); + +impl<'de> Deserialize<'de> for ScaleFactors { + fn deserialize>(d: D) -> Result { + match Value::deserialize(d)? { + Value::Array(a) if a.len() == 3 => { + let factors = a.into_iter().map(|v| params::expr(&wrap(v), "v").map(NumberExpr)).collect::>>(); + factors + .and_then(|f| <[NumberExpr; 3]>::try_from(f).ok()) + .map(ScaleFactors) + .ok_or_else(|| D::Error::custom("must be three numbers or expressions")) + } + Value::Array(_) => Err(D::Error::custom(whole("`factors` must have three values"))), + _ => Err(D::Error::custom("must be three numbers or expressions")), + } + } +} + +impl JsonSchema for ScaleFactors { + fn schema_name() -> Cow<'static, str> { + "ScaleFactors".into() + } + fn json_schema(generator: &mut SchemaGenerator) -> Schema { + let f = generator.subschema_for::(); + json_schema!({ + "description": "Factors along X, Y and Z: three numbers or expressions.", + "type": "array", + "items": f, + "minItems": 3, + "maxItems": 3 + }) + } +} /// A point in mm: `[x, y, z]` or `{x, y, z}` of finite numbers (read by `params::vec3`). #[derive(Clone, Copy, Debug, PartialEq)] @@ -194,6 +244,30 @@ impl JsonSchema for FacesParam { } } +/// A direction given as an axis, as `features::axis_dir_param` reads it: X, Y or Z (trimmed, any +/// case) or a non-zero `[x, y, z]` (or `{x, y, z}`), with its messages. +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct AxisDir(pub Vec3); + +impl<'de> Deserialize<'de> for AxisDir { + fn deserialize>(d: D) -> Result { + crate::cmd::axis_dir_form(&Value::deserialize(d)?).map(AxisDir).map_err(|why| D::Error::custom(whole(why))) + } +} + +impl JsonSchema for AxisDir { + fn schema_name() -> Cow<'static, str> { + "AxisDir".into() + } + fn json_schema(generator: &mut SchemaGenerator) -> Schema { + let point = generator.subschema_for::(); + json_schema!({ + "description": "An axis: X, Y or Z (any case), or a direction [x, y, z] that isn't zero.", + "anyOf": [{"type": "string", "pattern": format!("^[{ws}]*[XYZxyz][{ws}]*$", ws = whitespace_class())}, point] + }) + } +} + /// A sketch point in mm: `[x, y]` or `{x, y}` of finite numbers (read by `params::vec2`). #[derive(Clone, Copy, Debug, PartialEq)] pub struct Point2(pub Vec2); @@ -769,7 +843,8 @@ pub struct FeatureCommon { /// Names for the new bodies, in order. #[serde(default)] pub body_names: Option, - /// The bodies taking part; overrides the default scope. + /// The bodies taking part, each an existing body or `*`; what that changes depends on the + /// feature. #[serde(default)] pub participants: Option, } diff --git a/crates/engine/src/schema/unconverted.txt b/crates/engine/src/schema/unconverted.txt index a909e6d48..9f504448f 100644 --- a/crates/engine/src/schema/unconverted.txt +++ b/crates/engine/src/schema/unconverted.txt @@ -371,11 +371,9 @@ sketch.trim sketch.trim.path solid.align solid.boundary_fill -solid.bounding_solid solid.chamfer solid.coil solid.combine -solid.cylinder solid.draft solid.emboss solid.fillet @@ -387,20 +385,16 @@ solid.offset_face solid.pattern.circular solid.pattern.path solid.pattern.rectangular -solid.pipe solid.press_pull solid.remove solid.replace_face solid.revolve solid.rib -solid.scale solid.shell -solid.sphere solid.split_body solid.split_face solid.sweep solid.thread -solid.torus solid.web surface.blend surface.boundary diff --git a/docs/book/src/dev/schemas.md b/docs/book/src/dev/schemas.md index f22c6d149..3d3106f27 100644 --- a/docs/book/src/dev/schemas.md +++ b/docs/book/src/dev/schemas.md @@ -47,9 +47,13 @@ handler and everything it passes `p` to: feature is evaluated (`crates/doc/src/eval.rs`). `participants` takes its description from `FeatureCommon`, shared by every feature, so say what it does for this one elsewhere: where it and another key override each other (a primitive's `targets` gives way to it; an extrude's - `targets` overrides it), in that key's description; where it has no effect, in the summary. - For the primitives (box, cylinder, sphere, torus) `add_feature` also reads `targets`; a new - primitive must join the `primitive` match in `add_feature_in`, and its contract declares + `targets` overrides it), in that key's description; where it has no effect, in the summary or + in the description of the key it might seem to change (bounding solid's `bodies`). A feature + that makes no body (scale) declares `name` and `participants` itself instead, as `body_name` + and `body_names` would do nothing. It keeps `participants` because `timeline.redefine` passes + a feature's own back, though for a scale it changes nothing either; its own description says + so. For the primitives (box, cylinder, sphere, torus, cone) `add_feature` also reads `targets`; + a new primitive must join the `primitive` match in `add_feature_in`, and its contract declares `targets`. The commands that combine bodies read `operation` (and usually `targets`) in their own handlers; - keys read around the command: `frames::to_local` reads `body` (and `face_body`) for commands @@ -123,7 +127,8 @@ pub struct WedgeParams { someone who has only the schema. Check what each value does where the feature is evaluated (`crates/doc/src/eval.rs` and the kernel), not only how the handler reads it: a limit the evaluation enforces (a torus's `minor` must be less than its `major`) or a key it ignores - belongs in the description. + belongs in the description. A scale's `factor`, for one, has no effect when `factors` is + given, though it must still evaluate. - **Required or optional** follows the handler: a key it can't do without is a plain field; any other is `#[serde(default)] Option`. - **`null`:** the common readers (`str_`, `num`, `bool_`, `expr`, `string_list`) read `null` as @@ -208,7 +213,9 @@ In the module's tests file: and a list of names) in Warn, and check those replies have no `param_warnings`: Warn runs a call the contract refuses anyway, so a matching reply doesn't show the contract accepts the call. A reply that isn't an object never carries `param_warnings`; run those calls in Strict, - where a refused call is an error. + where a refused call is an error. In the same file, + `converted_primitives_and_body_commands_reply_with_feature_result` shows the Warn and + no-`param_warnings` checks across several commands. `schema_defaults_are_valid` checks the `default` of each top-level parameter on its own; a nested type's defaults are yours to check. @@ -238,6 +245,7 @@ calling that reader. | Type | For | Matches | | --- | --- | --- | | `LengthExpr`, `AngleExpr` | a number or an expression (`"w / 2"`, `"30 deg"`) | `params::expr` | +| `NumberExpr` | a number or an expression with no unit (a ratio, a factor) | `params::expr` | | `Point3`, `Point2` | `[x, y, z]` / `[x, y]` or `{x, y, z}` of numbers, in mm | `params::vec3`, `params::vec2` | | `PointExpr3` | a placement point whose coordinates may be expressions | `features::point_param` | | `IdOrName` | a feature by id or name (extrude's `sketch`) | `features::feature_sketch` | @@ -248,6 +256,8 @@ calling that reader. | `FaceRefs` | the `faces` list of shell, draft, offset face, split face and `face.delete` (not `solid.replace_face`, whose messages differ) | `features::face_points` | | `EdgeRef`, `EdgeRefs` | an edge by a point on it or `{body, index}`; fillet's and chamfer's `edges` | `features::edge_points` | | `ProfilesParam` | which sketch profiles | `features::profiles` | +| `ScaleFactors` | scale's `factors`: three `NumberExpr`s (strict words a bad item differently; see its doc) | `features::scale` | +| `AxisDir` | X, Y or Z, or a non-zero `[x, y, z]` / `{x, y, z}` (cylinder's, cone's and coil's `axis`) | `features::axis_dir_form` | | `FeatureCommon` | `name`, `body_name`, `body_names`, `participants`, flattened | `features::add_feature` | ### When no shared type fits @@ -266,7 +276,11 @@ Add one to `types.rs`, next to the reader it mirrors: point [x, y, z] of numbers" becomes ``"`corner` must be a point [x, y, z] of numbers"``. (Any other message comes out as ``"`corner`: …"``.) - Its `JsonSchema` describes the same values, with a description. Where JSON Schema can't say - something the reader checks (ignoring case, a byte length), say it in the description. + something the reader checks (ignoring case, a byte length), say it in the description. A + pattern that allows surrounding whitespace must allow exactly what Rust's `trim` removes: + build it from `WHITESPACE`, as `not_blank_pattern` and `AxisDir` do, rather than writing a + regex's whitespace class by hand (it differs, and the escapes are easy to get wrong). + `conforms` doesn't read patterns, so pin the pattern's text in a test. - Test both: values the reader accepts and refuses are accepted and refused by the type, and they match the schema (the `conforms` helper in `schema/tests.rs`; see `face_and_edge_refs_match_the_pick_readers`). @@ -275,8 +289,9 @@ Add one to `types.rs`, next to the reader it mirrors: ## Checklist -1. The contract's keys are exactly the handler's reads, including `add_feature`'s, the frame - mapping's and `live`. +1. The contract's keys are exactly the handler's reads, including `add_feature`'s (less + `body_name` and `body_names` for a feature that makes no body), the frame mapping's and + `live`. 2. The struct and every field have descriptions, with defaults and when a key is ignored. 3. Shared types wherever they fit; a new type calls the handler's reader and gives its message. 4. `FeatureResult` for a command that returns `add_feature`'s reply unchanged, else a reply type From e7e8a1ef26c30645e79d99d2499406cad7379f41 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 15:37:20 +0000 Subject: [PATCH 041/102] Regenerate generated files and fold pending files [skip ci] --- ATTRIBUTION.md | 1 + attribution/pending/cga-theme.md | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 attribution/pending/cga-theme.md diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 8cc423e87..af28fda57 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -578,6 +578,7 @@ Original SolidCraft drawings, Open for owner review; no runtime assignments. | assets/icons/ui/design/svg/model/cone.svg | SolidCraft contributors | original icon master (64 grid) | MIT OR Apache-2.0 | | assets/locales/ar.json | Abdullah (A-AL-ANAZI) | Original Arabic translation of SolidCraft's English catalog; no commercial CAD text used | MIT OR Apache-2.0 | | assets/locales/he.json | SolidCraft contributors | Original Hebrew translation of SolidCraft's English catalog; no commercial CAD text used | MIT OR Apache-2.0 | +| assets/styles/ui/themes/cga.json | SolidCraft contributors | original SolidCraft theme file using the 16 colours of the IBM Color Graphics Adapter (black, cyan, magenta, and white of its high-intensity palette 1 for the interface) | MIT OR Apache-2.0 | ## Code adapted from sibling projects diff --git a/attribution/pending/cga-theme.md b/attribution/pending/cga-theme.md deleted file mode 100644 index c358789e7..000000000 --- a/attribution/pending/cga-theme.md +++ /dev/null @@ -1 +0,0 @@ -| assets/styles/ui/themes/cga.json | SolidCraft contributors | original SolidCraft theme file using the 16 colours of the IBM Color Graphics Adapter (black, cyan, magenta, and white of its high-intensity palette 1 for the interface) | MIT OR Apache-2.0 | From 48c8965853f3dd0937a1dec6d01df93119d1980f Mon Sep 17 00:00:00 2001 From: bherbruck Date: Tue, 27 Oct 2026 11:58:30 -0400 Subject: [PATCH 042/102] CI: run the GPU path tests only for render changes, plus nightly (#7742) The merge queue ran the four-shard GPU path tracer tests (about 56 runner-minutes) on every group. Now they run when the diff touches render code (crates/render, crates/gpu/src/path, the render workspace UI, assets/render), or a pull request carries the new render-tests label (a pull request or a group holding one). The nightly and manual runs still always run them; a push to main does not. Co-authored-by: Claude Opus 5.5 --- .github/workflows/ci.yml | 60 ++++++++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f3c830ad..8b37f313c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,15 +98,16 @@ jobs: runs-on: blacksmith-2vcpu-ubuntu-2404 permissions: contents: read - # To ask whether the merge queue already tested a commit pushed to main. + # To ask whether the merge queue already tested a commit pushed to main, and which labels the + # pull requests of a merge group carry (the render-tests opt-in). + pull-requests: read actions: read outputs: native: ${{ steps.paths.outputs.native }} kernel: ${{ steps.paths.outputs.kernel }} goldens: ${{ steps.paths.outputs.goldens }} windows: ${{ steps.paths.outputs.windows }} - # The GPU path tests run: native, and the whole workspace or solidcraft-gpu selected. The - # job's `if` and the `ci` job's check both read this, so they cannot disagree. + # The GPU path tests run (see the rule where it is computed). The job's `if` and the `ci` job's check both read this, so they cannot disagree. gpu: ${{ steps.paths.outputs.gpu }} full: ${{ steps.paths.outputs.full }} # Code changed on a pull request that has no approved-for-ci label yet: only Quick compile. @@ -131,6 +132,7 @@ jobs: GROUP_HEAD_SHA: ${{ github.event.merge_group.head_sha }} PR_NUMBER: ${{ github.event.pull_request.number }} HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} + RENDER_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'render-tests') }} HEAD_REF: ${{ github.event.pull_request.head.ref }} REPO: ${{ github.repository }} APPROVED: ${{ contains(github.event.pull_request.labels.*.name, 'approved-for-ci') }} @@ -140,6 +142,7 @@ jobs: kernel=false goldens=false windows=false + gpu_paths=false full=true packages= # Whether the NUL-separated paths in $1 reach any code: scripts/ci/affected.py selects @@ -168,6 +171,29 @@ jobs: windows=true fi } + # Whether the NUL-separated paths in $1 are render code: the render crate, the path + # tracer and its shaders in the GPU crate, the render workspace UI, the render assets. + # Core, kernel and CI changes do not trigger the path tests (about 56 runner-minutes): + # the tracer reads the scene through interfaces the other tests cover, and the nightly + # runs them for everything. + gpu_paths() { + while IFS= read -r -d '' path; do + case "$path" in + crates/render/*|crates/gpu/src/path/*|crates/ui-egui/src/render_workspace*|assets/render/*) gpu_paths=true ;; + esac + done < "$1" + } + # Opt-in for a big render change: a pull request labelled render-tests, or a merge group + # holding one (its pull requests are the (#N) of its squash commits), runs them whatever + # the paths say. + group_has_render_label() { + for pr in $(git log --format=%s "$1" | grep -o '(#[0-9]*)$' | tr -d '(#)'); do + if gh api "repos/$REPO/issues/$pr" --jq '.labels[].name' | grep -qx render-tests; then + return 0 + fi + done + return 1 + } if [ "$EVENT_NAME" = push ]; then # The queue lands the very commit its merge_group run tested. If that run passed, # testing the push again proves nothing new; otherwise (a merge that skipped the @@ -201,14 +227,20 @@ jobs: # the nightly runs it whatever changed. A group that can't be compared runs it. if git diff --no-renames --name-only -z "$GROUP_BASE_SHA...$GROUP_HEAD_SHA" > "$RUNNER_TEMP/ci-paths"; then windows_paths "$RUNNER_TEMP/ci-paths" "$GROUP_BASE_SHA...$GROUP_HEAD_SHA" + gpu_paths "$RUNNER_TEMP/ci-paths" + if [ "$gpu_paths" = false ] && group_has_render_label "$GROUP_BASE_SHA..$GROUP_HEAD_SHA"; then + gpu_paths=true + fi else windows=true + gpu_paths=true fi - echo "windows=$windows for $GROUP_BASE_SHA...$GROUP_HEAD_SHA" + echo "windows=$windows gpu_paths=$gpu_paths for $GROUP_BASE_SHA...$GROUP_HEAD_SHA" elif [ "$EVENT_NAME" != pull_request ]; then # The nightly run and Run workflow: everything, Windows included. native=true windows=true + gpu_paths=true else # Compare both old and new paths of renames; unknown paths run native checks. git diff --no-renames --name-only -z "$BASE_SHA...$HEAD_SHA" > "$RUNNER_TEMP/ci-paths" @@ -268,12 +300,24 @@ jobs: goldens=false fi fi - # The GPU path tests (their own job) run with the other tests, when solidcraft-gpu is - # among the packages they test. + # The GPU path tests (their own job, about 56 runner-minutes) are for render changes only: + # - on a pull request, when it carries the render-tests label (opt-in for a big render + # change) or touches render code (gpu_paths); no other pull request runs them; + # - in the merge queue, when the group's diff touches render code or one of its pull + # requests carries render-tests; + # - in the nightly and by hand, always, so anything the above skipped is caught within a day; + # - not on a push to main: the queue tested that commit, or the nightly will. gpu=false if [ "$native" = true ]; then - case " $packages " in *" solidcraft-gpu "*) gpu=true ;; esac - if [ "$full" = true ]; then gpu=true; fi + case "$EVENT_NAME" in + pull_request) + gpu_paths "$RUNNER_TEMP/ci-paths" + gpu=$gpu_paths + if [ "$RENDER_LABEL" = true ]; then gpu=true; fi ;; + merge_group) gpu=$gpu_paths ;; + push) gpu=false ;; + *) gpu=true ;; + esac fi { echo "native=$native" From f5bfd6d1f2989254629a991ac74ae7f791987380 Mon Sep 17 00:00:00 2001 From: sascha2101 Date: Tue, 27 Oct 2026 12:43:00 +0000 Subject: [PATCH 043/102] Sheet metal: a base or contour flange hides its sketch (#6804) (#7151) * claim: #6804 * Sheet metal: a base or contour flange hides its sketch (#6804) Only an Extrude or a Revolve counted as using its sketch, so the sketch of a base flange stayed shown. Its line on the plate's bottom edge lies exactly on that edge and took the Flange dialog's click: a sketch line makes a contour flange, a separate flat wall with no bend whose Flip moves it into the plate. A base or contour flange now uses its sketch as an Extrude does: hidden unless shown on its own, and shown while its feature is edited. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FN5eEMrqWWXqi65FcK8GXq * Sheet metal: test that a click on the bottom edge makes an edge flange (#6804) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FN5eEMrqWWXqi65FcK8GXq --------- Co-authored-by: sascha2101 <221609842+sascha2101@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- crates/engine/src/cmd/browser.rs | 27 +++++++++++++++++++++++ crates/engine/src/view.rs | 9 ++++++-- crates/ui-egui/src/dialogs.rs | 11 +++++---- crates/ui-egui/src/dialogs_sheet_tests.rs | 23 +++++++++++++++++++ 4 files changed, 64 insertions(+), 6 deletions(-) diff --git a/crates/engine/src/cmd/browser.rs b/crates/engine/src/cmd/browser.rs index 640b478c1..faaab35f0 100644 --- a/crates/engine/src/cmd/browser.rs +++ b/crates/engine/src/cmd/browser.rs @@ -1620,6 +1620,33 @@ mod tests { assert!(s.visibility.hidden_bodies.is_empty()); } + #[test] + fn a_sheet_metal_flange_hides_its_sketch_as_an_extrude_does() { + // #6804: the base flange's sketch stayed shown; its line on the plate's bottom edge then + // took the Flange dialog's click and made a flat contour wall with no bend. + let mut s = Session::default(); + let base = run(&mut s, "sketch.create", json!({"plane": "XY", "name": "Base"}))["sketch"].as_u64().unwrap(); + run(&mut s, "sketch.rectangle.two_point", json!({"p0": [-33.5, -37], "p1": [27.5, -7]})); + run(&mut s, "sketch.finish", json!({})); + let wall = run(&mut s, "sketch.create", json!({"plane": "XZ", "name": "Wall"}))["sketch"].as_u64().unwrap(); + run(&mut s, "sketch.line", json!({"points": [[0, 0], [40, 0], [40, 30]], "ids": ["l1", "l2"]})); + run(&mut s, "sketch.finish", json!({})); + assert!(crate::view::sketch_shown(&s, base) && crate::view::sketch_shown(&s, wall)); + run(&mut s, "sheet.flange", json!({"sketch": "Base"})); + assert!(!crate::view::sketch_shown(&s, base), "the base flange used its sketch"); + run(&mut s, "sheet.flange", json!({"sketch": "Wall", "curves": ["l1", "l2"], "distance": 20})); + assert!(!crate::view::sketch_shown(&s, wall), "the contour flange used its sketch"); + let d = run(&mut s, "document.inspect", json!({})); + assert!(d["sketches"].as_array().unwrap().iter().all(|x| x["visible"] == false), "{d}"); + assert_eq!(s.doc.features.iter().filter(|f| matches!(f.kind, solidcraft_doc::FeatureKind::SheetContour { .. })).count(), 1); + // Shown on their own, or while their flange is edited, they are drawn again. + s.feature_edit_sketch = Some(base); + assert!(crate::view::sketch_shown(&s, base)); + s.feature_edit_sketch = None; + run(&mut s, "browser.visibility", json!({"items": [wall], "visible": true})); + assert!(crate::view::sketch_shown(&s, wall) && !crate::view::sketch_shown(&s, base)); + } + #[test] fn helper_sketches_hide_and_show() { let mut s = Session::default(); diff --git a/crates/engine/src/view.rs b/crates/engine/src/view.rs index 58eba1f15..48b42e69a 100644 --- a/crates/engine/src/view.rs +++ b/crates/engine/src/view.rs @@ -848,10 +848,15 @@ fn sketch_component_visible(s: &Session, id: u64) -> bool { s.occurrence_visible(&path) } -/// Is a sketch used by a later feature? +/// Is a sketch used by a later feature? A sheet metal base or contour flange uses its sketch as +/// an Extrude does: shown, its lines lie on the sheet's edges and take the clicks meant for +/// them (#6804). pub fn sketch_consumed(s: &Session, id: u64) -> bool { use solidcraft_doc::FeatureKind; - s.doc.features.iter().any(|f| matches!(f.kind, FeatureKind::Extrude { sketch, .. } | FeatureKind::Revolve { sketch, .. } if sketch == id)) + s.doc.features.iter().any(|f| { + matches!(f.kind, FeatureKind::Extrude { sketch, .. } | FeatureKind::Revolve { sketch, .. } + | FeatureKind::SheetBase { sketch, .. } | FeatureKind::SheetContour { sketch, .. } if sketch == id) + }) } /// Camera framing the model (iso view). diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 0d288fa60..398c7902c 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -2716,12 +2716,15 @@ fn picked_side(app: &SolveApp, d: &Dialog, first: &Sel) -> Option { Some(crate::smart_extrude::picked_direction(crate::smart_extrude::view_ray(&app.cam, at), normal, false)) } -/// Show the sketch of the Extrude or Revolve the open dialog edits, and only while it is open: -/// whichever way the dialog closed (OK, Cancel, another tool, another design), the sketch -/// returns to its own visibility. +/// Show the sketch of the Extrude, Revolve or sheet metal base or contour flange the open dialog +/// edits, and only while it is open: whichever way the dialog closed (OK, Cancel, another tool, +/// another design), the sketch returns to its own visibility. pub(crate) fn sync_feature_edit_sketch(app: &mut SolveApp) { app.session.feature_edit_sketch = app.dialog.as_ref().and_then(|d| d.editing).and_then(|(id, _)| match &app.session.doc.feature(id)?.kind { - FeatureKind::Extrude { sketch, .. } | FeatureKind::Revolve { sketch, .. } => Some(**sketch), + FeatureKind::Extrude { sketch, .. } + | FeatureKind::Revolve { sketch, .. } + | FeatureKind::SheetBase { sketch, .. } + | FeatureKind::SheetContour { sketch, .. } => Some(**sketch), _ => None, }); } diff --git a/crates/ui-egui/src/dialogs_sheet_tests.rs b/crates/ui-egui/src/dialogs_sheet_tests.rs index a3c1c4260..26b863002 100644 --- a/crates/ui-egui/src/dialogs_sheet_tests.rs +++ b/crates/ui-egui/src/dialogs_sheet_tests.rs @@ -69,6 +69,29 @@ fn flange_follows_the_picks() { } } +/// A click on the plate's bottom edge picks the edge, not the base flange's sketch line lying on +/// it: the flange is an edge flange with a bend, not a flat contour wall (#6804). +#[test] +fn a_click_on_the_bottom_edge_makes_an_edge_flange() { + let mut h = crate::scenario::Harness::new(); + h.app.set_origin_shown(false); + h.app.run("sketch.create", json!({"plane": "XY", "name": "Base"})).unwrap(); + h.app.run("sketch.rectangle.two_point", json!({"p0": [0, 0], "p1": [100, 60]})).unwrap(); + h.app.run("sketch.finish", json!({})).unwrap(); + h.app.run("sheet.flange", json!({"sketch": "Base"})).unwrap(); + h.step(&json!({"call": "ui.view", "params": {"view": "front"}})).unwrap(); + h.settle(); + h.app.start("sheet.flange"); + h.frames(3); + // The bottom edge lies on the sketch plane, under the sketch's line from (0, 0) to (100, 0). + let at = h.at(&json!({"world": [50, 0, 0]})).unwrap(); + h.step(&json!({"click": at})).unwrap(); + let items = h.app.dialog.as_ref().unwrap().inputs[0].items.clone(); + assert!(matches!(items.as_slice(), [Sel::Edge { point, .. }] if point.z.abs() < 1e-9 && point.y.abs() < 1e-9), "{items:?}"); + let c = apply_commands(&h.app, h.app.dialog.as_ref().unwrap()).unwrap(); + assert_eq!(c[0].1["type"], "edge", "{:?}", c[0].1); +} + /// Hem takes edges and an optional gap; rules make and pick a rule with its expressions. #[test] fn hem_and_rules() { From 285fa9433b8bc7cafdbf80061a8396e5f700f9b6 Mon Sep 17 00:00:00 2001 From: NOWN-DEV <257771410+NOWN-DEV@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:43:05 +0000 Subject: [PATCH 044/102] Sketch: a distance along a line keeps its side (#7506) (#7510) A point a distance from another point on the same line has two places on it, the same distance either way. A solve after a value edit or a link move could land on the other one and report the sketch solved, with no warning: the point jumped to the other side of its anchor, twice the distance away. Such a distance is now an orientation the solves keep, like an unsigned offset's side: which way along the line the one point lies from the other. One point must be on the line by a constraint (an end, a point held on it, or coincident with either); the other may lie on it by what else holds it (the mirror image of a point on it across a line square to it), read where it is in the reference state. Test: a point 3 mm along a linked rail from a point held on it, or mirrored onto it: the image back past that point counts as a flip, and the rail walked far keeps the side. Fixes #7506. Co-authored-by: Claude Opus 5.5 --- crates/sketch/src/link_side_tests.rs | 55 +++++++++++++++++++++++ crates/sketch/src/solver.rs | 66 +++++++++++++++++++++++++++- 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/crates/sketch/src/link_side_tests.rs b/crates/sketch/src/link_side_tests.rs index bbb15a108..428e381eb 100644 --- a/crates/sketch/src/link_side_tests.rs +++ b/crates/sketch/src/link_side_tests.rs @@ -172,3 +172,58 @@ fn a_line_tangent_to_a_linked_circle_keeps_its_side_when_the_circle_moves_far() let mut sk = stored.clone(); assert!(solve_after_link_move(&mut sk, &stored, &stored.driving_values(), Analysis::Full).is_none()); } + +/// A point held on a linked rail 3 mm from another point on it (a distance between the two): +/// the same distance back past the other point solves every constraint too, and only the side +/// it was drawn on tells them apart. The other point is held on the rail itself, or lies on it +/// as the mirror image of a point on it across a line square to it. The mirror image counts as +/// a flip, and the rail walked far (steeper, higher, the other way up) keeps the point on its side. +#[test] +fn a_point_a_distance_along_a_linked_line_keeps_its_side() { + let slant = |y0: f64, y1: f64| vec![LinkGeom::Line(Vec2::new(0.0, y0), Vec2::new(80.0, y1))]; + for mirrored_on in [false, true] { + let mut sk = Sketch::new(); + let link = sk.add_link(LinkKind::Project, source(), &slant(10.0, 50.0)).unwrap(); + let rail = sk.link_curves(&link)[0]; + let a = sk.add_point(Vec2::new(20.0, 20.0), None).unwrap(); + let h = sk.add_point(Vec2::new(23.0, 21.5), None).unwrap(); + if mirrored_on { + // `a` mirrors `b` (on the rail, x 0..) across a line square to the rail at x 10. + let b = sk.add_point(Vec2::new(0.5, 10.0), None).unwrap(); + let mh = sk.add_line(Vec2::new(10.0, 15.0), Vec2::new(5.5, 24.0), None, None, None).unwrap(); + let (m, _) = sk.curves[mh].kind.ends().unwrap(); + sk.add_constraint(ConstraintKind::PointOnCurve { p: b, c: rail }, None).unwrap(); + sk.add_constraint(ConstraintKind::PointOnCurve { p: m, c: rail }, None).unwrap(); + sk.add_constraint(ConstraintKind::Perpendicular { a: mh, b: rail }, None).unwrap(); + sk.add_constraint(ConstraintKind::Length { l: mh, value: 10.0 }, None).unwrap(); + sk.add_constraint(ConstraintKind::DistanceX { p: 0, q: m, value: 10.0 }, None).unwrap(); + sk.add_constraint(ConstraintKind::DistanceX { p: 0, q: b, value: 0.5 }, None).unwrap(); + sk.add_constraint(ConstraintKind::Symmetric { p: b, q: a, l: mh }, None).unwrap(); + } else { + sk.add_constraint(ConstraintKind::PointOnCurve { p: a, c: rail }, None).unwrap(); + sk.add_constraint(ConstraintKind::DistanceX { p: 0, q: a, value: 20.0 }, None).unwrap(); + } + sk.add_constraint(ConstraintKind::PointOnCurve { p: h, c: rail }, None).unwrap(); + let span = sk.add_constraint(ConstraintKind::Distance { p: a, q: h, value: 3.0 }, None).unwrap(); + assert!(solve(&mut sk).ok(), "{mirrored_on}"); + let ahead = |sk: &Sketch| match sk.curves[rail].kind { + CurveKind::Line { a: s, b: e } => (sk.points[e].pos - sk.points[s].pos).dot(sk.points[h].pos - sk.points[a].pos), + _ => f64::NAN, + }; + assert!(ahead(&sk) > 0.0 && (sk.points[h].pos.dist(sk.points[a].pos) - 3.0).abs() < 1e-9, "{mirrored_on}"); + let stored = sk.clone(); + // The same 3 mm back past `a`: solved as it is, and told apart only by the side. + let mut back = stored.clone(); + back.points[h].pos = back.points[a].pos * 2.0 - back.points[h].pos; + assert!(solve(&mut back).ok() && ahead(&back) < 0.0, "{mirrored_on}"); + assert!(flips_from_stored(&back, &stored).contains(&span), "{mirrored_on}: {:?}", flips_from_stored(&back, &stored)); + // Walked there, `h` stays ahead of `a` along the rail. + for (y0, y1) in [(300.0, 260.0), (-40.0, 400.0), (2000.0, 1990.0)] { + let mut sk = stored.clone(); + sk.update_link(&link, &slant(y0, y1)).unwrap(); + let report = solve_after_link_move(&mut sk, &stored, &stored.driving_values(), Analysis::Full); + assert!(report.is_some_and(|r| r.keeps_orientation()), "{mirrored_on} {y0} {y1}"); + assert!(ahead(&sk) > 0.0 && flips_from_stored(&sk, &stored).is_empty(), "{mirrored_on} {y0} {y1}: {}", ahead(&sk)); + } + } +} diff --git a/crates/sketch/src/solver.rs b/crates/sketch/src/solver.rs index c16ecaf85..df858ea42 100644 --- a/crates/sketch/src/solver.rs +++ b/crates/sketch/src/solver.rs @@ -1990,6 +1990,10 @@ enum Orient { OfLine(usize, usize, f64), /// Which of two nested circles or arcs encloses the other. RadiusOrder(usize, usize), + /// Which way along line `l` the point `q` is from `p`: a `Distance` between two points that + /// both lie on `l` (its ends, points on it, or points coincident with either; one of them may + /// lie on it by what else holds it). + Along(usize, usize, usize, f64), } /// An orientation's signed offset in a state (a corner's distance from the opposite side, an @@ -2023,6 +2027,11 @@ fn offset(s: &State, o: Orient) -> Option<(f64, f64, f64)> { // its size; rounding still accounts for the radii and the arc coordinates. (ra - rb, (ra - rb).abs(), ra.max(rb).max(coords(&[ca, cb]))) } + Orient::Along(p, q, l, size) => { + let (a, b) = s.line(l); + let (pp, pq) = (s.p(p), s.p(q)); + ((b - a).normalized()?.dot(pq - pp), size, coords(&[pp, pq, a, b])) + } }) } @@ -2154,13 +2163,17 @@ fn orients(s: &State, sub: &[(Block, Vec)]) -> Vec<(Orient, Vec)> let mut out = Vec::new(); let mut joins = Vec::new(); let mut edges = Vec::new(); + let mut spans: Vec<(usize, usize, f64, usize)> = Vec::new(); for (b, _) in sub { // A tangency at a point the two curves share (or a line's end held on the round) is a // block of its own; its round keeps its side of the line all the same. let (Block::User(ci, kind) | Block::TangentAt(ci, kind, _)) = b else { continue }; match **kind { ConstraintKind::Coincident { p, q } => joins.push((p, q)), - ConstraintKind::Distance { p, q, .. } => edges.push((p, q, *ci)), + ConstraintKind::Distance { p, q, value } => { + edges.push((p, q, *ci)); + spans.push((p, q, value, *ci)); + } ConstraintKind::Length { l, .. } => edges.extend(line(l).map(|(p, q)| (p, q, *ci))), ConstraintKind::DistanceX { p, q, value } if free(p) || free(q) => out.push((Orient::SideX(p, q, value), vec![*ci])), ConstraintKind::DistanceY { p, q, value } if free(p) || free(q) => out.push((Orient::SideY(p, q, value), vec![*ci])), @@ -2191,6 +2204,57 @@ fn orients(s: &State, sub: &[(Block, Vec)]) -> Vec<(Orient, Vec)> _ => {} } } + // A distance between two points on one line leaves which way along it open: the other + // solution is the same distance back past `p`. A point is on a line as one of its ends, as a + // point held on it, or coincident with either, read from the whole sketch (the line may be + // fixed, solved apart from these points). + let ends = |l: usize| line(l).map(|(a, b)| [a, b]).unwrap_or([usize::MAX; 2]); + let mut lines_at: BTreeMap> = BTreeMap::new(); + let mut together: Vec<(usize, usize)> = Vec::new(); + if !spans.is_empty() { + for (l, c) in s.sk.curves.iter().enumerate() { + if let CurveKind::Line { a, b } = c.kind { + lines_at.entry(a).or_default().push(l); + lines_at.entry(b).or_default().push(l); + } + } + for c in &s.sk.constraints { + match c.kind { + ConstraintKind::PointOnCurve { p, c } if line(c).is_some() => lines_at.entry(p).or_default().push(c), + ConstraintKind::Coincident { p, q } => together.push((p, q)), + _ => {} + } + } + } + let lines_of = |p: usize| -> Vec { + let joined = together.iter().filter_map(|&(x, y)| { + if x == p { + Some(y) + } else if y == p { + Some(x) + } else { + None + } + }); + std::iter::once(p).chain(joined).flat_map(|x| lines_at.get(&x).into_iter().flatten().copied()).collect() + }; + // One of the two may lie on the line by what else holds it (the mirror image of a point on + // it, across a line square to it): where it is now, as exactly as a solve puts it. + let lies_on = |x: usize, l: usize| { + let ((a, b), px) = (s.line(l), s.p(x)); + let reach = 1e-7 * crate::loci::mag(a).max(crate::loci::mag(b)).max(crate::loci::mag(px)).max(1.0); + (b - a).normalized().is_some_and(|d| d.cross(px - a).abs() <= reach) + }; + for &(p, q, value, ci) in &spans { + if !(free(p) || free(q)) { + continue; + } + let (lp, lq) = (lines_of(p), lines_of(q)); + let both = |l: &usize| (lp.contains(l) || lies_on(p, *l)) && (lq.contains(l) || lies_on(q, *l)); + if let Some(l) = lp.iter().chain(&lq).copied().find(|l| both(l) && !(ends(*l).contains(&p) && ends(*l).contains(&q))) { + out.push((Orient::Along(p, q, l, value), vec![ci])); + } + } // Union-find over the points these constraints name (not the whole sketch). let mut local: BTreeMap = BTreeMap::new(); for (p, q) in joins.iter().copied().chain(edges.iter().map(|&(p, q, _)| (p, q))) { From b1cf66b6280033b1704926882f15641a56c9d51e Mon Sep 17 00:00:00 2001 From: Colin Faulkingham Date: Tue, 27 Oct 2026 12:45:40 +0000 Subject: [PATCH 045/102] Fix stored world-axis inputs for revolve (#7179) (#7406) --- crates/engine/src/cmd/features.rs | 10 +++- .../src/cmd/revolve_convention_tests.rs | 54 +++++++++++++++++++ crates/engine/src/cmd/surface.rs | 2 +- 3 files changed, 63 insertions(+), 3 deletions(-) diff --git a/crates/engine/src/cmd/features.rs b/crates/engine/src/cmd/features.rs index e260ef51d..7ff7c1e15 100644 --- a/crates/engine/src/cmd/features.rs +++ b/crates/engine/src/cmd/features.rs @@ -38,7 +38,7 @@ pub static COMMANDS: &[CommandSpec] = &[ CommandSpec::new("solid.revolve", "Revolve", revolve) .at("SOLID", "CREATE") .icon("revolve") - .params("axis: sketch line id | x | y (sketch axes) | X|Y|Z (world) | construction axis name (followed when edited) | {origin, dir} | {edge|face: [x,y,z]} (a straight or circular edge, or a cylinder, cone or torus face: about its axis, followed as the model changes); angle?: expr (default 360 deg); angle2?: expr (Two Sides: the other side's angle); direction?: symmetric (angle split either side, independent of axis direction); convention?: sketch_normal|legacy_axis_start (default sketch_normal; legacy retains older angular starts); to?: [x,y,z] (To Object: turn until that face, vertex or point); sketch?, profiles? | face: [x,y,z] (a planar body face as the profile) and face_body?: name (whose face, where faces of several bodies meet), operation?, targets?, name?, body_name?"), + .params("axis: sketch line id | x | y (sketch axes) | X|Y|Z (world) | {type: world, axis: X|Y|Z} (as returned by timeline.inspect) | construction axis name (followed when edited) | {origin, dir} | {edge|face: [x,y,z]} (a straight or circular edge, or a cylinder, cone or torus face: about its axis, followed as the model changes); angle?: expr (default 360 deg); angle2?: expr (Two Sides: the other side's angle); direction?: symmetric (angle split either side, independent of axis direction); convention?: sketch_normal|legacy_axis_start (default sketch_normal; legacy retains older angular starts); to?: [x,y,z] (To Object: turn until that face, vertex or point); sketch?, profiles? | face: [x,y,z] (a planar body face as the profile) and face_body?: name (whose face, where faces of several bodies meet), operation?, targets?, name?, body_name?"), CommandSpec::new("solid.sweep", "Sweep", sweep) .at("SOLID", "CREATE") .icon("sweep") @@ -1242,7 +1242,8 @@ fn revolve(s: &mut Session, p: &Value) -> Result { } /// A revolve axis of `sketch` from its parameter: a sketch line id, the sketch's x or y axis, a -/// world axis, a construction axis by name (followed when it is edited), {origin, dir}, or an edge +/// world axis (also as saved: {type: world, axis: X|Y|Z}), a construction axis by name +/// (followed when it is edited), {origin, dir}, or an edge /// or round face of the model ({edge|face: [x,y,z]}), which the revolve follows as the model /// changes. A line of the sketch wins over a construction axis of the same name. pub(super) fn axis_param(s: &Session, sketch: u64, p: &Value, cmd: &str) -> Result { @@ -1250,6 +1251,11 @@ pub(super) fn axis_param(s: &Session, sketch: u64, p: &Value, cmd: &str) -> Resu return Ok(AxisRef::Model { geo }); } if let Some(o) = p.get("axis").filter(|v| v.is_object()) { + if str_(o, "type") == Some("world") { + let axis = + str_(o, "axis").filter(|a| matches!(*a, "X" | "Y" | "Z")).ok_or_else(|| bad(cmd, "world axis requires `axis` to be X, Y or Z"))?; + return Ok(AxisRef::World { axis: axis.into() }); + } let origin = o.get("origin").and_then(vec3).unwrap_or(Vec3::ZERO); let dir = o.get("dir").and_then(vec3).ok_or_else(|| bad(cmd, "axis needs `dir`"))?; return Ok(AxisRef::Line { origin: Position(origin), dir: Dir(dir) }); diff --git a/crates/engine/src/cmd/revolve_convention_tests.rs b/crates/engine/src/cmd/revolve_convention_tests.rs index 4e1d55de4..a41ff7718 100644 --- a/crates/engine/src/cmd/revolve_convention_tests.rs +++ b/crates/engine/src/cmd/revolve_convention_tests.rs @@ -360,3 +360,57 @@ fn construction_axis_revolve_rejects_invalid_axes_atomically() { assert!(s.model.state().bodies.is_empty()); } } + +#[test] +fn world_axis_from_timeline_inspect_round_trips() { + for (axis, radial, axial) in [("X", Vec3::Y, Vec3::X), ("Y", Vec3::X, Vec3::Y), ("Z", Vec3::X, Vec3::Z)] { + let mut s = Session::default(); + run(&mut s, "sketch.create", json!({"name":"Profile","plane":{"origin":[0,0,0],"x_dir":radial,"y_dir":axial}})); + run(&mut s, "sketch.rectangle.two_point", json!({"p0":[2,0],"p1":[4,10]})); + run(&mut s, "sketch.finish", json!({})); + run(&mut s, "solid.revolve", json!({"sketch":"Profile","axis":axis,"angle":"90 deg","operation":"new","name":"Turn"})); + let inspected = run(&mut s, "timeline.inspect", json!({"feature":"Turn"})); + let stored_axis = inspected["definition"]["axis"].clone(); + assert_eq!(stored_axis, json!({"type":"world","axis":axis})); + let original = s.doc.find_feature("Turn").unwrap().kind.clone(); + let original_measure = solidcraft_kernel::measure(&s.model.state().bodies[0].body).unwrap(); + run(&mut s, "edit.undo", json!({})); + assert!(s.model.state().bodies.is_empty()); + + run(&mut s, "solid.revolve", json!({"sketch":"Profile","axis":stored_axis,"angle":"90 deg","operation":"new","name":"Turn"})); + assert_eq!(s.doc.find_feature("Turn").unwrap().kind, original); + let state = s.model.state(); + assert_eq!(state.bodies.len(), 1); + let measure = solidcraft_kernel::measure(&state.bodies[0].body).unwrap(); + // A quarter of an annular cylinder: pi * (4^2 - 2^2) * 10 / 4. + assert!((measure.volume - 30.0 * PI).abs() < 0.03, "{axis}: {}", measure.volume); + assert!((measure.volume - original_measure.volume).abs() < 1e-6); + assert!(measure.centroid.dist(original_measure.centroid) < 1e-6); + } +} + +#[test] +fn invalid_world_axis_objects_are_rejected_atomically() { + let mut s = Session::default(); + profile(&mut s, false); + let before = s.doc.to_json(); + for axis in [ + json!({"type":"world"}), + json!({"type":"world","axis":null}), + json!({"type":"world","axis":1}), + json!({"type":"world","axis":[0,1,0]}), + json!({"type":"world","axis":{}}), + json!({"type":"world","axis":""}), + json!({"type":"world","axis":"x"}), + json!({"type":"world","axis":"y"}), + json!({"type":"world","axis":"z"}), + json!({"type":"world","axis":"W","dir":[0,1,0]}), + ] { + let error = s.execute("solid.revolve", &json!({"sketch":"Profile","axis":axis,"angle":"90 deg","operation":"new"})).unwrap_err(); + let message = error.to_string(); + assert!(matches!(error, crate::EngineError::BadParams { .. }), "{axis}: {message}"); + assert!(message.contains("world axis") && message.contains("X, Y or Z"), "{axis}: {message}"); + assert_eq!(s.doc.to_json(), before); + assert!(s.model.state().bodies.is_empty()); + } +} diff --git a/crates/engine/src/cmd/surface.rs b/crates/engine/src/cmd/surface.rs index 24457190b..4c1e4423f 100644 --- a/crates/engine/src/cmd/surface.rs +++ b/crates/engine/src/cmd/surface.rs @@ -43,7 +43,7 @@ pub static COMMANDS: &[CommandSpec] = &[ CommandSpec::new("surface.revolve", "Surface Revolve", surface_revolve) .at("SURFACE", "CREATE") .icon("surface_revolve") - .params("sketch?: id|name; curves?: [curve ids] and/or profiles? (as surface.extrude); axis: sketch line id|x|y|X|Y|Z|construction axis name|{origin, dir} | {edge|face: [x,y,z]} (a straight or circular edge, or a cylinder, cone or torus face: about its axis, followed as the model changes); angle?: expr (default 360 deg); angle2?: expr (the other side); symmetric?: bool; name?, body_name? (a surface body, no caps; a solid where a full turn closes it)"), + .params("sketch?: id|name; curves?: [curve ids] and/or profiles? (as surface.extrude); axis: sketch line id|x|y|X|Y|Z|{type: world, axis: X|Y|Z}|construction axis name|{origin, dir} | {edge|face: [x,y,z]} (a straight or circular edge, or a cylinder, cone or torus face: about its axis, followed as the model changes); angle?: expr (default 360 deg); angle2?: expr (the other side); symmetric?: bool; name?, body_name? (a surface body, no caps; a solid where a full turn closes it)"), CommandSpec::new("surface.sweep", "Surface Sweep", surface_sweep) .at("SURFACE", "CREATE") .icon("surface_sweep") From 1a9c4cd99d180cd23f2aaa8ec8fc9d65f6580e5a Mon Sep 17 00:00:00 2001 From: DuBearte <130190089+DuBearte@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:47:35 +0000 Subject: [PATCH 046/102] Sketch: a circumscribed polygon stays regular when dragged (#7395) (#7438) * claim: #7395 * Sketch: a circumscribed polygon stays regular when dragged (#7395) Circumscribed Polygon held its sides equal and tangent to the support circle only. Equal sides round one circle leave every other corner free (a rhombus round a circle), so a hexagon had 9 degrees of freedom instead of 4, and dragging its centre or a corner pulled it out of shape (radius 10 became 8.02, angles 174/66 degrees). Its corners now also lie on a construction circle concentric with the support circle, which makes it regular as an inscribed polygon is, and one side is tangent to the support circle, which sets its size: dof 4 (centre, size, turn). One tangent rather than all of them, so no constraint is redundant. Test in sketch_ux_tests: 4, 5 and 6 sides, dragged by the centre and by a corner, stay regular with their sides on the support circle. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/engine/src/cmd/sketch.rs | 16 +++++- crates/engine/src/cmd/sketch_ux_tests.rs | 64 ++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/sketch.rs b/crates/engine/src/cmd/sketch.rs index afc532e6d..3e6bfbb1e 100644 --- a/crates/engine/src/cmd/sketch.rs +++ b/crates/engine/src/cmd/sketch.rs @@ -1419,8 +1419,20 @@ fn polygon(s: &mut Session, p: &Value, cmd: &str, center: Vec2, r_vertex: f64, s cons.push(add_c(sk, ConstraintKind::PointOnCurve { p: *pt, c: circ })?); } } else { - for li in &l { - cons.push(add_c(sk, ConstraintKind::Tangent { a: *li, b: circ })?); + // Equal sides tangent to one circle don't make a polygon regular: every other corner + // stays free (a rhombus round a circle), and a drag pulled it out of shape (#7395). + // The corners on a second circle, concentric, make it regular as the inscribed one + // is; one side tangent to the support circle then sets its size (the others follow). + let corner = sk.add_circle(center, r_vertex, None, None)?; + if let Some(cu) = sk.curves.get_mut(corner) { + cu.construction = true; + } + cons.push(add_c(sk, ConstraintKind::Concentric { a: circ, b: corner })?); + for pt in &pts { + cons.push(add_c(sk, ConstraintKind::PointOnCurve { p: *pt, c: corner })?); + } + if let Some(first) = l.first() { + cons.push(add_c(sk, ConstraintKind::Tangent { a: *first, b: circ })?); } } Ok((ids_of(sk, &l), cons)) diff --git a/crates/engine/src/cmd/sketch_ux_tests.rs b/crates/engine/src/cmd/sketch_ux_tests.rs index d1a34fef5..4ec73ac09 100644 --- a/crates/engine/src/cmd/sketch_ux_tests.rs +++ b/crates/engine/src/cmd/sketch_ux_tests.rs @@ -574,6 +574,70 @@ fn v(x: f64, y: f64) -> solidcraft_geom::Vec2 { solidcraft_geom::Vec2::new(x, y) } +/// The corners of the polygon drawn by `out`, in order, and its support circle's centre and radius. +fn polygon_shape(s: &Session, out: &Value) -> (Vec, solidcraft_geom::Vec2, f64) { + use solidcraft_sketch::CurveKind; + let sk = sketch(s); + let corners = out["curves"] + .as_array() + .unwrap() + .iter() + .map(|id| match &sk.curves[sk.curve_index(id.as_str().unwrap()).unwrap()].kind { + CurveKind::Line { a, .. } => sk.point(*a).unwrap(), + other => panic!("a side is a line: {other:?}"), + }) + .collect(); + let support = &sk.curves[sk.curve_index(out["support_circle"].as_str().unwrap()).unwrap()].kind; + let CurveKind::Circle { c, r } = support else { panic!("support circle: {support:?}") }; + (corners, sk.point(*c).unwrap(), *r) +} + +/// A regular polygon: corners equally far from `c`, sides equally long. +fn assert_regular(corners: &[solidcraft_geom::Vec2], c: solidcraft_geom::Vec2, what: &str) { + let n = corners.len(); + let reach: Vec = corners.iter().map(|q| q.dist(c)).collect(); + let sides: Vec = (0..n).map(|i| corners[i].dist(corners[(i + 1) % n])).collect(); + let even = |xs: &[f64]| xs.iter().all(|x| (x - xs[0]).abs() < 1e-6); + assert!(even(&reach) && even(&sides), "{what}: corners {reach:?}, sides {sides:?}"); +} + +/// #7395: a circumscribed polygon had equal sides tangent to its circle only, which leaves every +/// other corner free (dof 9 for a hexagon); dragging its centre or a corner pulled it out of +/// shape. It is held regular now, as an inscribed one: dof 4 (centre, size, turn), and a drag +/// moves or turns it without deforming it. +#[test] +fn dragging_a_circumscribed_polygon_keeps_it_regular() { + for sides in [4, 5, 6] { + for drag_corner in [false, true] { + let mut s = new_sketch(); + let out = run(&mut s, "sketch.polygon.circumscribed", json!({"center": [50, 50], "radius": 10, "sides": sides})); + assert_eq!(out["sketch"]["dof"], 4, "{sides} sides: centre, size and turn only: {}", out["sketch"]); + let (corners, c, r) = polygon_shape(&s, &out); + assert_regular(&corners, c, "as drawn"); + assert!((r - 10.0).abs() < 1e-9); + let support = out["support_circle"].as_str().unwrap(); + if drag_corner { + let from = corners[0]; + let to = from + v(3.0, -4.0); + drag(&mut s, &format!("{}.start", out["curves"][0].as_str().unwrap()), [from.x, from.y], [to.x, to.y]); + } else { + drag(&mut s, &format!("{support}.center"), [50.0, 50.0], [70.0, 60.0]); + } + run(&mut s, "sketch.drag_end", json!({})); + let (corners, c, r) = polygon_shape(&s, &out); + let what = format!("{sides} sides, dragged by its {}", if drag_corner { "corner" } else { "centre" }); + assert_regular(&corners, c, &what); + let apothem = corners[0].dist(corners[1]) / (2.0 * (std::f64::consts::PI / sides as f64).tan()); + assert!((apothem - r).abs() < 1e-6, "{what}: the sides touch the support circle (apothem {apothem}, radius {r})"); + // A drag may change a free size by a hair (an inscribed polygon's too); the polygon + // went from radius 10 to 8.02. + if !drag_corner { + assert!((r - 10.0).abs() < 1e-2 && c.dist(v(70.0, 60.0)) < 1e-6, "{what}: moved whole, radius {r}, centre {c:?}"); + } + } + } +} + #[test] fn dragging_a_line_slides_it_and_an_end_keeps_the_other_end() { let mut s = new_sketch(); From 2151bc0497d545f6189f9c4dc7488f323fa892fd Mon Sep 17 00:00:00 2001 From: Mateusz Sych <151755914+SychPL@users.noreply.github.com> Date: Tue, 27 Oct 2026 13:20:35 +0000 Subject: [PATCH 047/102] Drive Joints: say why a rigid joint can't be driven and offer Edit Joint (#6981) (#7051) * claim: #6981 * Drive Joints: say why a rigid joint can't be driven and offer Edit Joint (#6981) Drive Joints opened on joint 0 when no joint moved, and its preview ran joint.drive on that rigid joint, so the dialog showed a red "a rigid joint does not move" with a Create Issue button. The dialog now says a rigid joint holds its parts still and how to let them move (Revolute to rotate, Slider to slide, Cylindrical for both), with an Edit Joint button that turns it into Edit Joint on that joint. Its commands refuse a rigid joint, so nothing is previewed and OK stays off. A rigid joint picked in the browser opens Drive Joints on it to say the same; the joint box lists only joints that move. joint.drive's own refusal names the types that move and joint.edit. * Drive Joints: the rigid joint message in Arabic, Hebrew and Vietnamese (#6981) Main now delivers ar, he and vi complete, so every new message needs them. --------- Co-authored-by: MateuszSychXpl <151755914+MateuszSychXpl@users.noreply.github.com> --- assets/locales/pending/drive-rigid-joint.json | 20 +++++++ crates/engine/src/cmd/joints.rs | 2 +- crates/engine/src/cmd/joints_tests.rs | 3 ++ crates/ui-egui/src/dialogs_assembly.rs | 53 ++++++++++++++----- crates/ui-egui/src/dialogs_assembly_tests.rs | 37 +++++++++++++ docs/book/src/guide/assemblies.md | 4 +- docs/control-protocol.md | 2 +- 7 files changed, 105 insertions(+), 16 deletions(-) create mode 100644 assets/locales/pending/drive-rigid-joint.json diff --git a/assets/locales/pending/drive-rigid-joint.json b/assets/locales/pending/drive-rigid-joint.json new file mode 100644 index 000000000..3b79d1597 --- /dev/null +++ b/assets/locales/pending/drive-rigid-joint.json @@ -0,0 +1,20 @@ +{ + "en": { + "drive.rigid": "{joint} is a rigid joint: it holds its parts still, so it has nothing to drive. To let them move, change its type in Edit Joint: Revolute to rotate, Slider to slide, Cylindrical for both." + }, + "ar": { + "drive.rigid": "{joint} مفصل صلب: يثبّت أجزاءه في مكانها، لذا لا يوجد ما يمكن تحريكه. لتتحرك الأجزاء، غيّر نوعه في «تعديل المفصل»: Revolute للدوران، Slider للانزلاق، Cylindrical لكليهما." + }, + "he": { + "drive.rigid": "{joint} הוא מפרק קשיח: הוא מחזיק את החלקים שלו במקומם, ולכן אין מה להניע. כדי שהחלקים יזוזו, שנו את הסוג שלו ב״עריכת מפרק״: Revolute לסיבוב, Slider להחלקה, Cylindrical לשניהם." + }, + "ja": { + "drive.rigid": "{joint} は剛体ジョイントです。部品をその場に固定するため、駆動するものがありません。動かすには「ジョイントを編集」で種類を変更してください: 回転させるなら Revolute、スライドさせるなら Slider、両方なら Cylindrical。" + }, + "vi": { + "drive.rigid": "{joint} là khớp nối cứng: nó giữ cố định các chi tiết, nên không có gì để dẫn động. Để các chi tiết chuyển động, hãy đổi loại khớp nối trong “Chỉnh sửa khớp nối”: Revolute để xoay, Slider để trượt, Cylindrical cho cả hai." + }, + "zh": { + "drive.rigid": "{joint} 是刚性接头:它把零件固定在原位,因此没有可驱动的运动。要让零件运动,请在“编辑接头”中更改其类型:旋转用 Revolute,滑动用 Slider,两者兼有用 Cylindrical。" + } +} diff --git a/crates/engine/src/cmd/joints.rs b/crates/engine/src/cmd/joints.rs index c74f5767d..7717cac90 100644 --- a/crates/engine/src/cmd/joints.rs +++ b/crates/engine/src/cmd/joints.rs @@ -856,7 +856,7 @@ fn drive(s: &mut Session, p: &Value) -> Result { let id = joint_id(s, p.get("joint"), cmd)?; let kind = s.doc.assembly.joints.iter().find(|j| j.id == id).map(|j| j.kind).ok_or_else(|| bad(cmd, "joint"))?; if kind == JointKind::Rigid { - return Err(bad(cmd, "a rigid joint does not move")); + return Err(bad(cmd, "a rigid joint does not move: joint.edit can make it revolute (turns), slider (slides) or cylindrical (both)")); } let mut q = values_param(s, p, kind, cmd)?; if p.get("values").is_none() && p.get("value").is_none() { diff --git a/crates/engine/src/cmd/joints_tests.rs b/crates/engine/src/cmd/joints_tests.rs index eecc23d48..bcdaecda0 100644 --- a/crates/engine/src/cmd/joints_tests.rs +++ b/crates/engine/src/cmd/joints_tests.rs @@ -192,6 +192,9 @@ fn rigid_cycles_solve_and_conflicts_report() { let c = r["conflicts"].as_array().cloned().unwrap_or_default(); assert_eq!(c.len(), 1, "{r}"); assert!(c[0]["why"].as_str().unwrap_or("").contains("off by"), "{r}"); + // A rigid joint has nothing to drive: the refusal names the types that move (#6981). + let e = s.execute("joint.drive", &json!({"joint": "Wrong", "value": 1})).map(|_| ()).unwrap_err().to_string(); + assert!(e.contains("does not move") && e.contains("joint.edit") && e.contains("revolute") && e.contains("cylindrical"), "{e}"); // Suppressing it clears the conflict. let r = run(&mut s, "joint.edit", json!({"joint": "Wrong", "suppressed": true})); assert_eq!(r["conflicts"].as_array().map(Vec::len), Some(0)); diff --git a/crates/ui-egui/src/dialogs_assembly.rs b/crates/ui-egui/src/dialogs_assembly.rs index 59ee719a4..cbbf7c802 100644 --- a/crates/ui-egui/src/dialogs_assembly.rs +++ b/crates/ui-egui/src/dialogs_assembly.rs @@ -217,10 +217,10 @@ pub fn start(app: &SolveApp, id: &str) -> Option<(Kind, Vec)> { "joint.origin" => (Asm::JointOrigin { name: String::new(), hover: None }, vec![SelInput::new("Snap", SNAPS, false)]), "joint.rigid_group" => (Asm::RigidGroup, vec![SelInput::new("Components", BODIES, true)]), "joint.drive" => { - let joint = picked_joint(app); + let joint = picked_joint(app, true); (Asm::Drive { joint, values: current_values(s, joint), focus: true }, vec![]) } - "motion.trace" => (Asm::Trace(Box::new(trace::form(s, picked_joint(app)))), vec![SelInput::new("Point", SNAPS, false)]), + "motion.trace" => (Asm::Trace(Box::new(trace::form(s, picked_joint(app, false)))), vec![SelInput::new("Point", SNAPS, false)]), "joint.motion_link" => { let b = usize::from(movable(s).len() > 1); (Asm::MotionLink { a: 0, b, ia: 0, ib: 0, ratio: "1".into(), offset: "0".into() }, vec![]) @@ -278,13 +278,15 @@ pub fn preset(s: &Session, k: &mut Asm, p: &Value) -> Result<(), String> { Ok(()) } -/// The joint picked in the browser, else the first that moves (an index into the design's joints). -fn picked_joint(app: &SolveApp) -> usize { +/// The joint picked in the browser, else the first that moves (an index into the design's +/// joints). With `rigid`, a picked rigid joint comes before the first that moves: Drive Joints +/// opened on one says why it can't drive it (#6981). +fn picked_joint(app: &SolveApp, rigid: bool) -> usize { let s = &app.session; let list = movable(s); - let picked = - app.tree.picked_joints.iter().find_map(|id| list.iter().copied().find(|i| s.doc.assembly.joints.get(*i).is_some_and(|j| j.id == *id))); - picked.or(list.first().copied()).unwrap_or(0) + let picked: Vec = app.tree.picked_joints.iter().filter_map(|id| s.doc.assembly.joints.iter().position(|j| j.id == *id)).collect(); + let moving = picked.iter().copied().find(|i| list.contains(i)); + moving.or(picked.first().copied().filter(|_| rigid)).or(list.first().copied()).unwrap_or(0) } /// Indices (into the design's joints) of joints that move (not rigid). @@ -613,23 +615,44 @@ pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, k: &mut Asm, inputs: &mut [Se Asm::Drive { joint, values, focus } => { let s = &app.session; let list = movable(s); - if list.is_empty() { + // A rigid joint holds its parts still: say so, and offer Edit Joint to change its + // type (#6981). Nothing is driven (no preview, OK stays off) until one that moves is chosen. + let rigid = s.doc.assembly.joints.get(*joint).filter(|j| j.kind == JointKind::Rigid).map(|j| (j.id, j.name.clone())); + if let Some((id, name)) = &rigid { + let mut edit = false; ui.vertical(|ui| { - ui.label(RichText::new(crate::i18n::tr_label("no joint that moves yet")).color(t.text_dim)); + let why = crate::i18n::format("drive.rigid", &[("joint", name.as_str())]); + ui.add(egui::Label::new(RichText::new(why).color(t.warning)).wrap()); + let r = crate::ui_kit::button(ui, crate::i18n::tr_label("Edit Joint"), crate::ui_kit::Button::Normal); + crate::scenario::publish_handle("drive:edit_joint", r.rect.center()); + edit = r.clicked(); }); + if edit && let Some(Kind::Assembly(e)) = edit_joint(app, *id).map(|d| d.kind) { + *k = e; + return false; + } + } + if list.is_empty() { + if rigid.is_none() { + ui.vertical(|ui| { + ui.label(RichText::new(crate::i18n::tr_label("no joint that moves yet")).color(t.text_dim)); + }); + } return false; } let labels: Vec = list.iter().filter_map(|i| s.doc.assembly.joints.get(*i)).map(|j| format!("{} ({:?})", j.name, j.kind)).collect(); let refs: Vec<&str> = labels.iter().map(String::as_str).collect(); - let mut pos = list.iter().position(|i| i == joint).unwrap_or(0); + // On a rigid joint the box shows none of the joints that move until one is chosen. + let mut pos = list.iter().position(|i| i == joint).unwrap_or(list.len()); choice_row(ui, "Joint", "drv_joint", &mut pos, &refs); - let pick = list.get(pos).copied().unwrap_or(0); - if pick != *joint || values.is_empty() { + if let Some(&pick) = list.get(pos) + && (pick != *joint || values.is_empty()) + { *joint = pick; *values = current_values(s, pick); } - let Some(j) = s.doc.assembly.joints.get(*joint).cloned() else { return false }; + let Some(j) = s.doc.assembly.joints.get(*joint).filter(|j| j.kind != JointKind::Rigid).cloned() else { return false }; for (i, v) in values.iter_mut().enumerate() { let angle = j.kind.is_angle(i); let unit_kind = if angle { ValueKind::Angle } else { ValueKind::Length }; @@ -997,6 +1020,10 @@ pub fn commands(app: &SolveApp, k: &Asm, inputs: &[SelInput]) -> Result { let j = s.doc.assembly.joints.get(*joint).ok_or("no joint that moves yet")?; + // A rigid joint has nothing to drive: the dialog says why and offers Edit Joint (#6981). + if j.kind == JointKind::Rigid { + return Err(crate::i18n::format("drive.rigid", &[("joint", &j.name)])); + } cmd("joint.drive", json!({"joint": j.id, "values": values})) } Asm::MotionLink { a, b, ia, ib, ratio, offset } => { diff --git a/crates/ui-egui/src/dialogs_assembly_tests.rs b/crates/ui-egui/src/dialogs_assembly_tests.rs index 07b060104..12883f17d 100644 --- a/crates/ui-egui/src/dialogs_assembly_tests.rs +++ b/crates/ui-egui/src/dialogs_assembly_tests.rs @@ -887,6 +887,43 @@ fn drive_opens_on_the_picked_joint() { let rocker = app.session.doc.assembly.joints.iter().find(|j| j.name == "Rocker").unwrap().id; pick_joint(&mut app, rocker, false); assert_eq!(drive_on(&mut app), "Rocker"); + // A rigid joint picked: it opens on that one, to say why it can't drive it (#6981). + app.run("joint.as_built", json!({"type": "rigid", "a": "Ground", "b": "Crank", "name": "Lock"})).unwrap(); + let lock = app.session.doc.assembly.joints.iter().find(|j| j.name == "Lock").unwrap().id; + pick_joint(&mut app, lock, false); + assert_eq!(drive_on(&mut app), "Lock"); + // Motion Trace still starts on a joint that moves. + app.dialog = None; + app.start("motion.trace"); + match &app.dialog.as_ref().unwrap().kind { + Kind::Assembly(Asm::Trace(f)) => assert_eq!(app.session.doc.assembly.joints[f.joint].name, "Crank"), + k => panic!("{k:?}"), + } +} + +/// Drive Joints in a design whose only joint is rigid (#6981): it opens on that joint and says it +/// holds its parts still and how to let them move, runs no drive (no preview error, no Create +/// Issue, OK off), and its Edit Joint button turns the dialog into Edit Joint on that joint. +#[test] +fn drive_on_a_rigid_joint_says_why_and_offers_edit_joint() { + let mut h = crate::scenario::Harness::new(); + h.app = two_boxes(); + let at = |o: &str| json!({"occurrence": o, "point": [25, 10, 5], "z": [1, 0, 0]}); + h.app.run("joint.create", json!({"type": "rigid", "a": at("A"), "b": at("B"), "name": "Glue"})).unwrap(); + let glue = h.app.session.doc.assembly.joints[0].id; + h.app.start("joint.drive"); + h.frames(4); + let d = h.app.dialog.clone().unwrap(); + let e = apply_commands(&h.app, &d).unwrap_err(); + assert!(e.contains("Glue") && e.contains("holds its parts still") && e.contains("Revolute") && e.contains("Edit Joint"), "{e}"); + assert!(h.app.preview.error.is_none(), "no drive is previewed"); + assert!(crate::scenario::handle_at("dialog:create_issue").is_none(), "no Create Issue for a rigid joint"); + h.step(&json!({"click": {"handle": "drive:edit_joint"}})).unwrap(); + h.frames(2); + match &h.app.dialog.as_ref().unwrap().kind { + Kind::Assembly(Asm::Joint(f)) => assert_eq!(f.editing, Some(glue)), + k => panic!("{k:?}"), + } } /// A rigid joint has nothing to drive: Drive Joints won't start on it. diff --git a/docs/book/src/guide/assemblies.md b/docs/book/src/guide/assemblies.md index 505ddf853..1b2e219bc 100644 --- a/docs/book/src/guide/assemblies.md +++ b/docs/book/src/guide/assemblies.md @@ -56,7 +56,9 @@ joined to the rest of the design. circles and vertices: rigid, revolute, slider, cylindrical, pin-slot, planar and ball, with offsets, flip and limits. **As-built Joint** keeps the current position, **Rigid Group** locks components together, **Drive Joints** moves a joint through its values, and **Motion Link** -couples two joints. Links can be chained (one joint drives a second, which drives a +couples two joints. A rigid joint holds its parts still, so Drive Joints has nothing to drive on +it: it says so and offers **Edit Joint**, where the joint's type changes to Revolute (rotate), +Slider (slide) or Cylindrical (both). Links can be chained (one joint drives a second, which drives a third), and a value is carried through a chain of up to 64 links in whatever order they were made. Contact sets stop motion where bodies would pass through each other, **Motion Study** keys joint values along a timeline, and **Interference** shows overlapping diff --git a/docs/control-protocol.md b/docs/control-protocol.md index 456e42013..10e4a6ef5 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -273,7 +273,7 @@ labels; `prefs:measure_axis_distances` identifies the checkbox. | `ui.set` | any `UiState` field (`tab`, `perspective`, `showGrid`, `dark`, `layout`, …), and the browser's view of the design, saved with it: `showOrigin` (the Origin folder's eye), `showSketches` (the design's Sketches folder, `c0/sketches` in `hiddenFolders`), `hiddenBodies`, `hiddenOrigin`, `hiddenSketches`, `shownSketches`, `hiddenJoints`, `hiddenFolders`, `hiddenProfiles`, `shownDims`, `lockedBodies` (whole lists; `browser.visibility` changes single items) | `dark: false` switches to the light theme; `layout: "floating"` (default) or `"compact"` (`"docked"` is also accepted) selects the transient shell layout without saving a preference. Scenarios use `{"call":"ui.set","params":{"layout":"docked"}}` | | `ui.view` | `view`: `front`, `back`, `top`, `bottom`, `left`, `right`, `iso`, `home`, `fit`; `animate` (bool, default false: snap) | | | `ui.camera` | `target?`: `[x, y, z]` (mm), `yaw?`, `pitch?`, `roll?` (radians), `distance?` (mm), `fov?`, `up?`; `fit?`: `true`, `false` or `[occurrence id or name…]` (`root`: the bodies outside every component) | the viewport's orbit camera: it looks at `target` from `distance` away; `yaw` 0 looks along +Y (from the front), `pitch` is the elevation (±π/2: straight down or up), `roll` turns the image. Fields given are set first (the others keep their values), then `fit` frames the listed occurrences (or everything), keeping the direction. The reply, passed back, sets the same view again, so a framing can be stored and replayed. `fov` and `up` follow the perspective setting (`ui.set`) and the up axis preference (`ui.prefs`) and can't change here; a refused field changes nothing | -| `ui.start` | `command`, `params?` | like a toolbar click: starts the sketch tool or dialog for the command. `params` sets what the dialog opens on, and nothing runs until OK: `joint.drive` takes `joint` (id or name; without it, the joint picked in the browser, else the first joint that moves) and `values` (numbers in degrees or millimetres, or expressions); `motion.study` takes `study` (id or name), which opens that study to edit and chart. A command that takes no params is refused before it starts; a param the dialog doesn't take is refused and the dialog closes | +| `ui.start` | `command`, `params?` | like a toolbar click: starts the sketch tool or dialog for the command. `params` sets what the dialog opens on, and nothing runs until OK: `joint.drive` takes `joint` (id or name; without it, the joint picked in the browser, else the first joint that moves; a rigid joint opens to say why it has nothing to drive, with an Edit Joint button, handle `drive:edit_joint`) and `values` (numbers in degrees or millimetres, or expressions); `motion.study` takes `study` (id or name), which opens that study to edit and chart. A command that takes no params is refused before it starts; a param the dialog doesn't take is refused and the dialog closes | | `ui.click` | `x`, `y` (screen points), `button?`: left/right/middle, `shift?`, `ctrl?`, `double?` | real pointer input | | `ui.move` | `x`, `y`, `shift?`, `alt?`, `ctrl?`, `cmd?` | pointer movement without a button; modifiers apply until the next synthetic move/click; a move with omitted modifiers releases them. With `nav: "touchpad"`, Shift pans and Alt/Option orbits. | | `ui.drag` | `x0`, `y0`, `x1`, `y1`, `button?`, `shift?`, `ctrl?`, `steps?`, `hold?`, `hold_end?` | press, move, release; a left drag on the model is a box selection (left to right: window, right to left: crossing); with OpenSCAD navigation, plain left-drag on empty space orbits, Shift+left-drag box-selects, and drags starting on sketch geometry edit it; `hold` keeps the button down that many frames first (a right press-and-hold opens the marking menu, releasing over a direction picks it), `hold_end` that many frames at the end (a sketch drag shows its snap) | From 04e4e72ea13787fb6abc8c6c6c274e14e1780a7d Mon Sep 17 00:00:00 2001 From: tr1pp4 <38721264+tr1pp4@users.noreply.github.com> Date: Tue, 27 Oct 2026 13:28:16 +0000 Subject: [PATCH 048/102] History: delete a folder with its features, and suppress a whole folder (#7219) (#7220) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * claim: #7219 Co-Authored-By: Claude Opus 5.5 * History: delete a folder with its features, and suppress a whole folder (#7219) `timeline.delete` and `timeline.suppress` take `groups: [timeline folder ids]`: every feature in those folders and their nested folders, in one undo step. A delete takes the folders themselves too; `timeline.ungroup` still keeps the features. The History on the left offers Suppress/Unsuppress Selected Folders and Delete Folders and Features… (asking first, like Delete Selected Features…, when something outside needs them); a folder whose features are all suppressed is drawn faint. Co-Authored-By: Claude Opus 5.5 * History folder actions: Arabic, Hebrew and Vietnamese strings (complete catalogs) Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- .../pending/history-folder-actions.json | 51 +++++++++ crates/engine/src/cmd/edit.rs | 50 ++++++-- crates/engine/src/cmd/edit_tests.rs | 102 +++++++++++++++++ crates/ui-egui/src/deferred.rs | 18 +-- crates/ui-egui/src/dialogs.rs | 10 +- crates/ui-egui/src/timeline.rs | 23 +++- crates/ui-egui/src/timeline_left.rs | 107 +++++++++++++++++- docs/book/src/reference/glossary.md | 1 + 8 files changed, 331 insertions(+), 31 deletions(-) create mode 100644 assets/locales/pending/history-folder-actions.json diff --git a/assets/locales/pending/history-folder-actions.json b/assets/locales/pending/history-folder-actions.json new file mode 100644 index 000000000..cd01ce32e --- /dev/null +++ b/assets/locales/pending/history-folder-actions.json @@ -0,0 +1,51 @@ +{ + "en": { + "Delete Folders and Features…": "Delete Folders and Features…", + "Suppress Selected Folders": "Suppress Selected Folders", + "Unsuppress Selected Folders": "Unsuppress Selected Folders", + "timeline.delete_folders_with_features_tip": "Delete the folders with every feature in them and their nested folders", + "timeline.suppress_folders_tip": "Suppress or unsuppress every feature in the folders and their nested folders" + }, + "de": { + "Delete Folders and Features…": "Ordner mit Features löschen…", + "Suppress Selected Folders": "Ausgewählte Ordner unterdrücken", + "Unsuppress Selected Folders": "Unterdrückung der ausgewählten Ordner aufheben", + "timeline.delete_folders_with_features_tip": "Löscht die Ordner mit allen Features darin und ihren Unterordnern", + "timeline.suppress_folders_tip": "Unterdrückt alle Features in den Ordnern und ihren Unterordnern oder hebt die Unterdrückung auf" + }, + "ar": { + "Delete Folders and Features…": "حذف المجلدات مع ميزاتها…", + "Suppress Selected Folders": "تعطيل المجلدات المحددة", + "Unsuppress Selected Folders": "إلغاء تعطيل المجلدات المحددة", + "timeline.delete_folders_with_features_tip": "حذف المجلدات مع كل الميزات التي فيها والمجلدات المتداخلة فيها", + "timeline.suppress_folders_tip": "تعطيل كل الميزات في المجلدات والمجلدات المتداخلة فيها أو إلغاء تعطيلها" + }, + "he": { + "Delete Folders and Features…": "מחיקת תיקיות עם הפיצ'רים שבהן…", + "Suppress Selected Folders": "השבתת התיקיות שנבחרו", + "Unsuppress Selected Folders": "ביטול השבתת התיקיות שנבחרו", + "timeline.delete_folders_with_features_tip": "מחיקת התיקיות עם כל הפיצ'רים שבהן והתיקיות המקוננות בהן", + "timeline.suppress_folders_tip": "השבתה או ביטול השבתה של כל הפיצ'רים בתיקיות ובתיקיות המקוננות בהן" + }, + "ja": { + "Delete Folders and Features…": "フォルダーとフィーチャーを削除…", + "Suppress Selected Folders": "選択したフォルダーを抑制", + "Unsuppress Selected Folders": "選択したフォルダーの抑制を解除", + "timeline.delete_folders_with_features_tip": "フォルダーを、中のすべてのフィーチャーと入れ子のフォルダーごと削除します", + "timeline.suppress_folders_tip": "フォルダーと入れ子のフォルダー内のすべてのフィーチャーを抑制、または抑制を解除します" + }, + "vi": { + "Delete Folders and Features…": "Xóa thư mục cùng các tính năng…", + "Suppress Selected Folders": "Bỏ kích hoạt các thư mục đã chọn", + "Unsuppress Selected Folders": "Kích hoạt lại các thư mục đã chọn", + "timeline.delete_folders_with_features_tip": "Xóa các thư mục cùng mọi tính năng trong đó và các thư mục lồng bên trong", + "timeline.suppress_folders_tip": "Bỏ kích hoạt hoặc kích hoạt lại mọi tính năng trong các thư mục và các thư mục lồng bên trong" + }, + "zh": { + "Delete Folders and Features…": "删除文件夹及其特征…", + "Suppress Selected Folders": "抑制所选文件夹", + "Unsuppress Selected Folders": "取消抑制所选文件夹", + "timeline.delete_folders_with_features_tip": "删除文件夹及其中的所有特征和嵌套文件夹", + "timeline.suppress_folders_tip": "抑制或取消抑制文件夹及其嵌套文件夹中的所有特征" + } +} diff --git a/crates/engine/src/cmd/edit.rs b/crates/engine/src/cmd/edit.rs index 9c677d192..00d4871d6 100644 --- a/crates/engine/src/cmd/edit.rs +++ b/crates/engine/src/cmd/edit.rs @@ -25,7 +25,7 @@ pub static COMMANDS: &[CommandSpec] = &[ .at("SOLID", "MODIFY") .icon("delete") .key("Delete") - .params("feature: id|name | features: [id|name] (one undo step; a sketch takes its dependent features with it) → deleted: [ids]; failing?: [{feature, error}] (later features that worked and now fail)"), + .params("feature: id|name | features: [id|name] | groups: [timeline folder ids] (a folder goes with all its features and nested folders; one undo step; a sketch takes its dependent features with it) → deleted: [ids]; groups?: [folder ids deleted]; failing?: [{feature, error}] (later features that worked and now fail)"), CommandSpec::new("timeline.rename", "Rename", rename).icon("rename").params("feature: id|name, name (references to it follow)"), CommandSpec::new("timeline.group", "New Feature Folder", group) .icon("folder") @@ -55,8 +55,9 @@ pub static COMMANDS: &[CommandSpec] = &[ .noundo() .params("feature: id|name → features deleted with it, and features that would fail without it"), CommandSpec::new("timeline.suppress", "Suppress Feature", suppress).icon("suppress").params( - "feature: id|name | features: [id|name] (one undo step), suppressed?: bool (default toggles: several features are all \ - suppressed unless all of them already are, then all are unsuppressed) → feature: id (or features: [ids]), suppressed", + "feature: id|name | features: [id|name] | groups: [timeline folder ids] (every feature in those folders and their nested \ + folders; one undo step), suppressed?: bool (default toggles: several features are all \ + suppressed unless all of them already are, then all are unsuppressed) → feature: id (or features: [ids]; groups: [ids] when given), suppressed", ), CommandSpec::new("timeline.edit", "Edit Feature", edit_feature).icon("edit").params( "feature: id|name, set: {fields to change, merged into the feature's definition as timeline.inspect returns it, \ @@ -162,9 +163,13 @@ fn delete(s: &mut Session, p: &Value) -> Result { _ => String::new(), }); } - if keys.is_empty() { - return Err(bad(cmd, "`features` must list features")); + let groups = group_ids(s, p, false, cmd)?; + if keys.is_empty() && groups.is_empty() { + return Err(bad(cmd, "`features` must list features, or `groups` timeline folders")); } + // A folder goes with its features and nested folders, its features in timeline order. + let (folders, contents) = group_tree(&s.doc, &groups); + keys.extend(s.doc.features.iter().filter(|f| contents.contains(&f.id)).map(|f| f.id.to_string())); // Features that work now; any of them failing after the delete is reported (a later // feature that names a deleted body, #267). let worked: std::collections::BTreeSet = s.model.results.iter().filter(|r| r.error.is_none() && !r.skipped).map(|r| r.id).collect(); @@ -178,6 +183,9 @@ fn delete(s: &mut Session, p: &Value) -> Result { }; gone.extend(s.doc_mut().delete_feature(id)?); } + if !folders.is_empty() { + s.doc_mut().timeline_groups.retain(|group| !folders.contains(&group.id)); + } if s.active_sketch.is_some_and(|a| gone.contains(&a)) { s.active_sketch = None; } @@ -194,10 +202,14 @@ fn delete(s: &mut Session, p: &Value) -> Result { .filter(|r| worked.contains(&r.id)) .filter_map(|r| r.error.as_ref().map(|e| json!({"feature": r.name, "error": e}))) .collect(); - if failing.is_empty() { - return Ok(json!({"deleted": gone})); + let mut out = json!({"deleted": gone}); + if !folders.is_empty() { + out["groups"] = json!(folders); } - Ok(json!({"deleted": gone, "failing": failing})) + if !failing.is_empty() { + out["failing"] = json!(failing); + } + Ok(out) } fn rename(s: &mut Session, p: &Value) -> Result { @@ -312,6 +324,11 @@ fn group_move_would_cycle(s: &Session, target: u64, sources: &[u64]) -> bool { } fn group_feature_ids(doc: &solidcraft_doc::Document, roots: &[u64]) -> std::collections::BTreeSet { + group_tree(doc, roots).1 +} + +/// The timeline folders `roots` and every folder nested in them, and the features they hold. +fn group_tree(doc: &solidcraft_doc::Document, roots: &[u64]) -> (std::collections::BTreeSet, std::collections::BTreeSet) { let by_id: std::collections::BTreeMap = doc.timeline_groups.iter().map(|group| (group.id, group)).collect(); let mut children = std::collections::BTreeMap::>::new(); for group in &doc.timeline_groups { @@ -331,7 +348,7 @@ fn group_feature_ids(doc: &solidcraft_doc::Document, roots: &[u64]) -> std::coll pending.extend(children.get(&id).into_iter().flatten().copied()); } } - features + (visited, features) } fn sort_group_features(doc: &mut solidcraft_doc::Document) { @@ -620,7 +637,15 @@ fn counted_names_from(s: &Session, ids: &[u64]) -> Vec<(u64, Vec)> { fn suppress(s: &mut Session, p: &Value) -> Result { let cmd = "timeline.suppress"; - let ids = feature_ids(s, p, cmd)?; + let groups = group_ids(s, p, false, cmd)?; + let named = |key: &str| p.get(key).is_some_and(|v| !v.is_null()); + let mut ids = if groups.is_empty() || named("feature") || named("features") { feature_ids(s, p, cmd)? } else { Vec::new() }; + let contents = group_feature_ids(&s.doc, &groups); + let more: Vec = s.doc.features.iter().map(|f| f.id).filter(|id| contents.contains(id) && !ids.contains(id)).collect(); + ids.extend(more); + if ids.is_empty() { + return Err(bad(cmd, "the timeline folders hold no features")); + } let want = match bool_(p, "suppressed") { Some(b) => b, None if p.get("suppressed").is_some_and(|v| !v.is_null()) => return Err(bad(cmd, "`suppressed` must be true or false")), @@ -640,8 +665,9 @@ fn suppress(s: &mut Session, p: &Value) -> Result { f.suppressed = want; } match ids.as_slice() { - [id] if p.get("features").is_none_or(Value::is_null) => Ok(json!({"feature": id, "suppressed": want})), - _ => Ok(json!({"features": ids, "suppressed": want})), + [id] if groups.is_empty() && p.get("features").is_none_or(Value::is_null) => Ok(json!({"feature": id, "suppressed": want})), + _ if groups.is_empty() => Ok(json!({"features": ids, "suppressed": want})), + _ => Ok(json!({"features": ids, "groups": groups, "suppressed": want})), } } diff --git a/crates/engine/src/cmd/edit_tests.rs b/crates/engine/src/cmd/edit_tests.rs index ad75da637..7c63ea787 100644 --- a/crates/engine/src/cmd/edit_tests.rs +++ b/crates/engine/src/cmd/edit_tests.rs @@ -680,6 +680,108 @@ fn timeline_folders_can_nest_and_reject_cycles() { assert_eq!(s.doc.timeline_groups.iter().find(|group| group.id == child).unwrap().parent, None, "deleting a folder promotes its children"); } +/// Four separate boxes, `First`…`Fourth`, for the timeline folder tests. +fn four_boxes() -> Session { + let mut s = Session::default(); + for (i, name) in ["First", "Second", "Third", "Fourth"].into_iter().enumerate() { + let corner = [20 * i, 0, 0]; + run(&mut s, "solid.box", json!({"length": 10, "width": 10, "height": 10, "corner": corner, "operation": "new_body", "name": name})); + } + s +} + +fn feature_names(s: &Session) -> Vec { + s.doc.features.iter().map(|feature| feature.name.clone()).collect() +} + +/// `timeline.delete {groups}` deletes a folder with its features and nested folders in one undo +/// step; other folders and features stay, and `timeline.ungroup` still keeps the features (#7219). +#[test] +fn timeline_delete_takes_a_folder_with_its_features_and_nested_folders() { + let mut s = four_boxes(); + let outer = run(&mut s, "timeline.group", json!({"name": "Outer", "features": ["Second"]}))["group"].as_u64().unwrap(); + let inner = run(&mut s, "timeline.group", json!({"name": "Inner", "features": ["Third"], "parent": outer}))["group"].as_u64().unwrap(); + let keep = run(&mut s, "timeline.group", json!({"name": "Keep", "features": ["Fourth"]}))["group"].as_u64().unwrap(); + let before = s.doc.clone(); + + let out = run(&mut s, "timeline.delete", json!({"groups": [outer]})); + assert_eq!(feature_names(&s), ["First", "Fourth"]); + assert_eq!(out["groups"], json!([outer, inner]), "{out}"); + assert_eq!(s.doc.timeline_groups.iter().map(|group| group.id).collect::>(), [keep], "the nested folder goes too"); + assert_eq!(s.model.state().bodies.len(), 2); + let reopened = solidcraft_doc::Document::from_json(&s.doc.to_json()).unwrap(); + assert_eq!(reopened.timeline_groups, s.doc.timeline_groups); + + run(&mut s, "edit.undo", json!({})); + assert_eq!(s.doc.features, before.features, "one undo step brings the features back"); + assert_eq!(s.doc.timeline_groups, before.timeline_groups, "and the folders, nested as they were"); + run(&mut s, "edit.redo", json!({})); + assert_eq!(feature_names(&s), ["First", "Fourth"]); + run(&mut s, "edit.undo", json!({})); + + // A folder and a feature outside it in one delete; an empty folder goes on its own. + run(&mut s, "timeline.delete", json!({"groups": [inner], "features": ["First"]})); + assert_eq!(feature_names(&s), ["Second", "Fourth"]); + assert_eq!(s.doc.timeline_groups.iter().map(|group| group.name.as_str()).collect::>(), ["Outer", "Keep"]); + let empty = run(&mut s, "timeline.group", json!({"name": "Empty"}))["group"].as_u64().unwrap(); + assert_eq!(run(&mut s, "timeline.delete", json!({"groups": [empty]}))["deleted"], json!([])); + assert!(!s.doc.timeline_groups.iter().any(|group| group.id == empty)); + + let before = s.doc.clone(); + for bad in [json!({"groups": [999_999]}), json!({"groups": ["Outer"]}), json!({"groups": 3}), json!({"groups": []})] { + assert!(s.execute("timeline.delete", &bad).is_err(), "{bad}"); + assert_eq!(s.doc, before, "{bad}: a refused delete changes nothing"); + } +} + +/// `timeline.suppress {groups}` suppresses every feature of a folder and its nested folders in +/// one undo step, toggles like several features do, and works with the marker inside the +/// folder (#7219). +#[test] +fn timeline_suppress_takes_a_folder_with_its_nested_folders() { + let mut s = four_boxes(); + let outer = run(&mut s, "timeline.group", json!({"name": "Outer", "features": ["Second"]}))["group"].as_u64().unwrap(); + run(&mut s, "timeline.group", json!({"name": "Inner", "features": ["Third"], "parent": outer})); + let suppressed = |s: &Session| s.doc.features.iter().filter(|feature| feature.suppressed).map(|feature| feature.name.clone()).collect::>(); + + let out = run(&mut s, "timeline.suppress", json!({"groups": [outer]})); + assert_eq!(out["suppressed"], true); + assert_eq!(out["groups"], json!([outer])); + assert_eq!(suppressed(&s), ["Second", "Third"]); + assert_eq!(s.model.state().bodies.len(), 2); + let reopened = solidcraft_doc::Document::from_json(&s.doc.to_json()).unwrap(); + assert_eq!(reopened.features, s.doc.features); + run(&mut s, "edit.undo", json!({})); + assert!(suppressed(&s).is_empty(), "one undo step"); + run(&mut s, "edit.redo", json!({})); + assert_eq!(suppressed(&s), ["Second", "Third"]); + + // Toggle: all suppressed, so all come back; with one of them active, all are suppressed. + run(&mut s, "timeline.suppress", json!({"groups": [outer]})); + assert!(suppressed(&s).is_empty()); + run(&mut s, "timeline.suppress", json!({"feature": "Third"})); + run(&mut s, "timeline.suppress", json!({"groups": [outer]})); + assert_eq!(suppressed(&s), ["Second", "Third"]); + run(&mut s, "timeline.suppress", json!({"groups": [outer], "suppressed": false, "features": ["Fourth"]})); + assert!(suppressed(&s).is_empty(), "an explicit state, with a feature outside the folder as well"); + + // The marker between the folder's features: the folder is suppressed all the same, and the + // marker stays where it was. + run(&mut s, "timeline.roll_to", json!({"feature": "Second"})); + assert_eq!(s.doc.marker, Some(2)); + run(&mut s, "timeline.suppress", json!({"groups": [outer], "suppressed": true})); + assert_eq!(suppressed(&s), ["Second", "Third"]); + assert_eq!(s.doc.marker, Some(2)); + assert_eq!(s.model.state().bodies.len(), 1, "only First is before the marker and not suppressed"); + + let empty = run(&mut s, "timeline.group", json!({"name": "Empty"}))["group"].as_u64().unwrap(); + let before = s.doc.clone(); + for bad in [json!({"groups": [empty]}), json!({"groups": [999_999]}), json!({"groups": [outer], "suppressed": "yes"})] { + assert!(s.execute("timeline.suppress", &bad).is_err(), "{bad}"); + assert_eq!(s.doc, before, "{bad}: a refused suppress changes nothing"); + } +} + /// A field the feature's definition doesn't have is refused with the fields it does have, /// instead of reporting success and changing nothing (#1491). #[test] diff --git a/crates/ui-egui/src/deferred.rs b/crates/ui-egui/src/deferred.rs index 9de30f139..d35f84781 100644 --- a/crates/ui-egui/src/deferred.rs +++ b/crates/ui-egui/src/deferred.rs @@ -73,8 +73,9 @@ pub struct DeleteCheck { /// What a delete does once its check is in. #[derive(Clone, Debug)] pub(crate) enum AfterCheck { - /// The timeline's Delete of these features (a `timeline.dependents` report for each). - Timeline(Vec), + /// The timeline's Delete of these features (a `timeline.dependents` report for each), and + /// of the timeline folders that go with them. + Timeline { features: Vec, groups: Vec }, /// Delete with these `selection.delete` parameters (the report of its dry run). Selection(Value), } @@ -83,9 +84,12 @@ impl AfterCheck { /// Check again, for the design as it is now. fn restart(self, app: &mut SolveApp) { match self { - AfterCheck::Timeline(ids) => { - let ids: Vec = ids.into_iter().filter(|id| app.session.doc.feature(*id).is_some()).collect(); - if !ids.is_empty() { + AfterCheck::Timeline { features, groups } => { + let ids: Vec = features.into_iter().filter(|id| app.session.doc.feature(*id).is_some()).collect(); + let groups: Vec = groups.into_iter().filter(|id| app.session.doc.timeline_groups.iter().any(|g| g.id == *id)).collect(); + if !groups.is_empty() { + crate::timeline::delete_folders(app, groups, ids); + } else if !ids.is_empty() { crate::timeline::delete_features(app, ids); } } @@ -96,9 +100,9 @@ impl AfterCheck { /// Carry on with the check's replies. fn finish(self, app: &mut SolveApp, replies: Vec>) { match self { - AfterCheck::Timeline(ids) => { + AfterCheck::Timeline { features, groups } => { let reports: Vec = replies.into_iter().map(Result::unwrap_or_default).collect(); - crate::timeline::delete_checked_features(app, ids, &reports); + crate::timeline::delete_checked_features(app, features, groups, &reports); } AfterCheck::Selection(params) => { let report = replies.into_iter().next().unwrap_or_else(|| Err("the delete was not checked".into())); diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 398c7902c..52bbf5b00 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -345,6 +345,8 @@ crate::dialog_descriptor::dialog_descriptors! { /// Delete a feature that others depend on. ConfirmDelete { features: Vec, + /// Timeline folders deleted with the features. + groups: Vec, with: Vec, fail: Vec, }, @@ -1132,11 +1134,11 @@ impl Dialog { #[cfg(test)] pub fn confirm_delete(feature: u64, with: Vec, fail: Vec) -> Dialog { - Dialog::confirm_delete_many(vec![feature], with, fail) + Dialog::confirm_delete_many(vec![feature], Vec::new(), with, fail) } - pub fn confirm_delete_many(features: Vec, with: Vec, fail: Vec) -> Dialog { - Dialog::new(Kind::ConfirmDelete { features, with, fail }, vec![]) + pub fn confirm_delete_many(features: Vec, groups: Vec, with: Vec, fail: Vec) -> Dialog { + Dialog::new(Kind::ConfirmDelete { features, groups, with, fail }, vec![]) } pub fn edit_param(s: &Session, name: &str) -> Dialog { @@ -4489,7 +4491,7 @@ fn dialog_commands(app: &SolveApp, d: &Dialog) -> Result, S } Kind::EditParam { name, expr } => ("parameters.change", json!({"name": name, "expression": expr})), Kind::Rename { feature, name } => ("timeline.rename", json!({"feature": feature, "name": name})), - Kind::ConfirmDelete { features, .. } => ("timeline.delete", json!({ "features": features })), + Kind::ConfirmDelete { features, groups, .. } => ("timeline.delete", crate::timeline::delete_params(features, groups)), Kind::Sketch | Kind::Measure { .. } => return Ok(Vec::new()), Kind::Assembly(k) => return crate::dialogs_assembly::commands(app, k, &d.inputs), Kind::Sheet(k) => return crate::dialogs_sheet::commands(app, k, &d.inputs, &d.extra), diff --git a/crates/ui-egui/src/timeline.rs b/crates/ui-egui/src/timeline.rs index 4fa7dda6b..909be62e1 100644 --- a/crates/ui-egui/src/timeline.rs +++ b/crates/ui-egui/src/timeline.rs @@ -202,11 +202,19 @@ pub(crate) fn delete_feature(app: &mut SolveApp, id: u64) { /// while, #2678), then delete them or ask first. pub(crate) fn delete_features(app: &mut SolveApp, ids: Vec) { let checks = ids.iter().map(|id| ("timeline.dependents".to_string(), json!({ "feature": id }))).collect(); - app.check_delete(checks, crate::deferred::AfterCheck::Timeline(ids)); + app.check_delete(checks, crate::deferred::AfterCheck::Timeline { features: ids, groups: Vec::new() }); } -/// [`delete_features`] once each feature's `timeline.dependents` report is in. -pub(crate) fn delete_checked_features(app: &mut SolveApp, ids: Vec, reports: &[Value]) { +/// Delete timeline folders with their features (`contents`, nested folders' included) after the +/// same check as [`delete_features`] (#7219). +pub(crate) fn delete_folders(app: &mut SolveApp, groups: Vec, contents: Vec) { + let checks = contents.iter().map(|id| ("timeline.dependents".to_string(), json!({ "feature": id }))).collect(); + app.check_delete(checks, crate::deferred::AfterCheck::Timeline { features: contents, groups }); +} + +/// [`delete_features`] once each feature's `timeline.dependents` report is in; `groups` are +/// timeline folders deleted with them. +pub(crate) fn delete_checked_features(app: &mut SolveApp, ids: Vec, groups: Vec, reports: &[Value]) { // Each report is about one feature alone, so it names the others being deleted too: those // go anyway and are left out of the confirmation. let deleting: Vec<&str> = ids.iter().filter_map(|id| app.session.doc.feature(*id)).map(|f| f.name.as_str()).collect(); @@ -226,12 +234,17 @@ pub(crate) fn delete_checked_features(app: &mut SolveApp, ids: Vec, reports } } if with.is_empty() && fail.is_empty() { - let _ = app.run_heavy("timeline.delete", json!({ "features": ids })); + let _ = app.run_heavy("timeline.delete", delete_params(&ids, &groups)); } else { - app.dialog = Some(crate::dialogs::Dialog::confirm_delete_many(ids, with.into_iter().collect(), fail.into_iter().collect())); + app.dialog = Some(crate::dialogs::Dialog::confirm_delete_many(ids, groups, with.into_iter().collect(), fail.into_iter().collect())); } } +/// `timeline.delete`'s parameters for these features and timeline folders. +pub(crate) fn delete_params(features: &[u64], groups: &[u64]) -> Value { + if groups.is_empty() { json!({ "features": features }) } else { json!({ "features": features, "groups": groups }) } +} + /// The selected timeline features, in timeline order. pub(crate) fn selected_feature_ids(app: &SolveApp) -> Vec { app.session diff --git a/crates/ui-egui/src/timeline_left.rs b/crates/ui-egui/src/timeline_left.rs index fef8b0eb7..e07a3e6e3 100644 --- a/crates/ui-egui/src/timeline_left.rs +++ b/crates/ui-egui/src/timeline_left.rs @@ -652,6 +652,26 @@ fn selection_actions(app: &mut SolveApp, ui: &mut egui::Ui, groups: &[solidcraft app.tree.picked_timeline_groups.clear(); ui.close(); } + // The folders' own features and those of nested folders, as `timeline.suppress` and + // `timeline.delete` take them with `groups` (#7219). + let contents = folder_features(app, &selected_groups); + let all_suppressed = !contents.is_empty() && contents.iter().all(|id| app.session.doc.feature(*id).is_some_and(|f| f.suppressed)); + let label = if all_suppressed { "Unsuppress Selected Folders" } else { "Suppress Selected Folders" }; + if crate::context_menu::button_enabled(ui, label, "suppress", !contents.is_empty()) + .on_hover_text(crate::i18n::tr("timeline.suppress_folders_tip")) + .clicked() + { + let _ = app.run_heavy("timeline.suppress", json!({"groups": selected_groups, "suppressed": !all_suppressed})); + ui.close(); + } + if crate::context_menu::button(ui, "Delete Folders and Features…", "delete") + .on_hover_text(crate::i18n::tr("timeline.delete_folders_with_features_tip")) + .clicked() + { + crate::timeline::delete_folders(app, selected_groups.clone(), contents); + app.tree.picked_timeline_groups.clear(); + ui.close(); + } } if !features.is_empty() { ui.separator(); @@ -693,6 +713,15 @@ pub fn reveal_feature(app: &mut SolveApp, feature: u64) { } } +/// The features of these folders and of the folders nested in them, in timeline order. +fn folder_features(app: &SolveApp, roots: &[u64]) -> Vec { + let groups = &app.session.doc.timeline_groups; + let inside = |feature: u64| { + group_for(groups, feature).is_some_and(|group| roots.contains(&group) || roots.iter().any(|root| group_is_descendant(groups, group, *root))) + }; + app.session.doc.features.iter().map(|feature| feature.id).filter(|feature| inside(*feature)).collect() +} + fn group_is_descendant(groups: &[solidcraft_engine::doc::TimelineGroup], group: u64, ancestor: u64) -> bool { let mut current = groups.iter().find(|candidate| candidate.id == group).and_then(|candidate| candidate.parent); let mut steps = 0usize; @@ -843,6 +872,7 @@ fn timeline_group_name( rect: Rect, offset: f32, names: bool, + faint: bool, t: &Tokens, ) -> bool { let editing = @@ -856,7 +886,7 @@ fn timeline_group_name( egui::Align2::LEFT_CENTER, &group.name, egui::FontId::proportional(crate::theme::Tokens::get().font_body), - t.text, + if faint { t.text.gamma_multiply(0.42) } else { t.text }, ); return false; } @@ -926,9 +956,19 @@ fn vertical_group_row( let offset = if names { depth as f32 * 14.0 } else { 0.0 }; let centre = pos2(rect.left() + 9.0 + offset, rect.center().y); crate::ui_kit::disclosure(ui.painter(), centre, open, t.text_dim); + // A folder whose features are all suppressed looks like a suppressed feature. + let contents = folder_features(app, &[group.id]); + let suppressed = !contents.is_empty() && contents.iter().all(|id| app.session.doc.feature(*id).is_some_and(|f| f.suppressed)); + let mut painter = ui.painter().clone(); + if suppressed { + painter.multiply_opacity(0.42); + } let icon = Rect::from_center_size(pos2(rect.left() + 27.5 + offset, rect.center().y), vec2(17.0, 17.0)); - icons::paint_icon(ui.painter(), icon, "folder", f32::from(t.icon.a()) / 255.0); - let renaming = timeline_group_name(app, ui, group, rect, offset, names, &t); + icons::paint_icon(&painter, icon, "folder", f32::from(t.icon.a()) / 255.0); + if suppressed { + painter.line_segment([icon.left_bottom(), icon.right_top()], Stroke::new(1.5, t.text_dim)); + } + let renaming = timeline_group_name(app, ui, group, rect, offset, names, suppressed, &t); crate::scenario::publish_handle(&format!("timeline-folder:{}", group.name), rect.center()); let fold_rect = Rect::from_min_max(pos2(rect.left() + offset, rect.top()), pos2(rect.left() + offset + 18.0, rect.bottom())); crate::scenario::publish_handle(&format!("timeline-folder-fold:{}", group.name), fold_rect.center()); @@ -2213,6 +2253,67 @@ mod tests { assert!(harness.app.session.doc.find_feature("Feature").is_some()); } + /// Right-click a folder and pick a menu entry. + fn folder_menu(harness: &mut Harness, folder: &str, entry: &str) { + harness.step(&json!({"click": {"handle": format!("timeline-folder:{folder}")}, "button": "right"})).unwrap(); + let [x, y] = harness.widget(entry).unwrap_or_else(|| panic!("`{entry}` is in the folder's menu")); + harness.step(&json!({"click": [x, y]})).unwrap(); + harness.frames(4); + } + + /// A folder's menu suppresses and unsuppresses every feature in it and in its nested folders, + /// and deletes the folders with their features in one undo step (#7219). + #[test] + fn folder_menu_suppresses_and_deletes_the_folder_with_its_features() { + let mut harness = Harness::new(); + harness.app.preferences.timeline_left = true; + for (name, x) in [("Outside", 0), ("Inside", 20), ("Nested", 40)] { + let params = json!({"length": 10, "width": 10, "height": 10, "corner": [x, 0, 0], "operation": "new_body", "name": name}); + harness.app.run("solid.box", params).unwrap(); + } + let outer = harness.app.run("timeline.group", json!({"name": "Outer", "features": ["Inside"]})).unwrap()["group"].as_u64().unwrap(); + harness.app.run("timeline.group", json!({"name": "Inner", "features": ["Nested"], "parent": outer})).unwrap(); + harness.frames(4); + let suppressed = |harness: &Harness| { + harness.app.session.doc.features.iter().filter(|feature| feature.suppressed).map(|feature| feature.name.clone()).collect::>() + }; + + folder_menu(&mut harness, "Outer", "Suppress Selected Folders"); + assert_eq!(suppressed(&harness), ["Inside", "Nested"]); + folder_menu(&mut harness, "Outer", "Unsuppress Selected Folders"); + assert!(suppressed(&harness).is_empty(), "the menu offers to unsuppress a folder whose features all are"); + + folder_menu(&mut harness, "Outer", "Delete Folders and Features…"); + let names: Vec<_> = harness.app.session.doc.features.iter().map(|feature| feature.name.as_str()).collect(); + assert_eq!(names, ["Outside"]); + assert!(harness.app.session.doc.timeline_groups.is_empty(), "the nested folder goes too"); + assert!(harness.app.dialog.is_none(), "nothing outside the folder needed them: no question"); + harness.app.run("edit.undo", json!({})).unwrap(); + assert_eq!(harness.app.session.doc.features.len(), 3); + assert_eq!(harness.app.session.doc.timeline_groups.len(), 2, "one undo step"); + } + + /// When a feature outside the folder needs one inside, the delete asks first, and its Delete + /// takes the folder as well (#7219). + #[test] + fn deleting_a_folder_others_depend_on_asks_and_then_takes_the_folder() { + let mut harness = Harness::new(); + harness.app.preferences.timeline_left = true; + harness.app.run("solid.box", json!({"length": 10, "width": 10, "height": 10, "name": "Base"})).unwrap(); + harness.app.run("solid.fillet", json!({"edges": [[10, 5, 10]], "radius": 1, "name": "Round"})).unwrap(); + harness.app.run("timeline.group", json!({"name": "Stock", "features": ["Base"]})).unwrap(); + harness.frames(4); + + folder_menu(&mut harness, "Stock", "Delete Folders and Features…"); + assert!(harness.app.dialog.is_some(), "Round needs Base: the delete asks first"); + assert!(harness.app.session.doc.find_feature("Base").is_some()); + let [x, y] = harness.widget("Delete").expect("the confirmation's Delete button"); + harness.step(&json!({"click": [x, y]})).unwrap(); + harness.frames(4); + assert!(harness.app.session.doc.find_feature("Base").is_none()); + assert!(harness.app.session.doc.timeline_groups.is_empty(), "the confirmed delete takes the folder too"); + } + #[test] fn collapsed_folder_stays_visible_while_its_contents_hide() { let mut harness = Harness::new(); diff --git a/docs/book/src/reference/glossary.md b/docs/book/src/reference/glossary.md index 340a4b2e7..300cc2d09 100644 --- a/docs/book/src/reference/glossary.md +++ b/docs/book/src/reference/glossary.md @@ -204,6 +204,7 @@ features are computed. - **In SolidCraft:** `browser.group`, `browser.ungroup`, `browser.rename_group`; `timeline.group`, `timeline.ungroup`, `timeline.rename_group`, `timeline.move_to_group`; the `group` parameter key; + the `groups` parameter of `timeline.delete` and `timeline.suppress` (a group with all its features); the `browser_groups` and `timeline_groups` design-file keys. - **Don't use:** feature folder, folder (for a group). - **Elsewhere:** folder, group. From 98d021c523e65671848c546a9fdb0d3afbe905da Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 16:34:22 +0000 Subject: [PATCH 049/102] Regenerate generated files and fold pending files [skip ci] --- assets/locales/ar.json | 6 +++ assets/locales/de.json | 5 ++ assets/locales/en.json | 6 +++ assets/locales/he.json | 6 +++ assets/locales/ja.json | 6 +++ assets/locales/pending/drive-rigid-joint.json | 20 -------- .../pending/history-folder-actions.json | 51 ------------------- assets/locales/vi.json | 6 +++ assets/locales/zh.json | 6 +++ 9 files changed, 41 insertions(+), 71 deletions(-) delete mode 100644 assets/locales/pending/drive-rigid-joint.json delete mode 100644 assets/locales/pending/history-folder-actions.json diff --git a/assets/locales/ar.json b/assets/locales/ar.json index 9d2a49c08..cff581615 100644 --- a/assets/locales/ar.json +++ b/assets/locales/ar.json @@ -152,6 +152,7 @@ "Customize…": "تخصيص…", "Cylindrical face": "وجه أسطواني", "Delete": "حذف", + "Delete Folders and Features…": "حذف المجلدات مع ميزاتها…", "Delete Selected Features…": "حذف الميزات المحددة…", "Delete Selected Folders": "حذف المجلدات المحددة", "Delete all": "حذف الكل", @@ -534,6 +535,7 @@ "Style": "النمط", "Summary": "الملخص", "Suppress": "تعطيل", + "Suppress Selected Folders": "تعطيل المجلدات المحددة", "Suppressed": "مُعطّل", "Surface": "السطح", "Surface, or faces to turn over": "السطح، أو الأوجه المراد قلبها", @@ -581,6 +583,7 @@ "UNTRIM": "إلغاء القص", "Unit": "الوحدة", "Unsuppress": "إلغاء التعطيل", + "Unsuppress Selected Folders": "إلغاء تعطيل المجلدات المحددة", "Updating the preview": "جارٍ تحديث المعاينة", "Use active author placement": "استخدام موضع المؤلف النشط", "Use fixed plane": "استخدام مستوى ثابت", @@ -1145,6 +1148,7 @@ "document.save_changes": "حفظ التغييرات على {name}؟", "document.save_copy": "حفظ نسخة…", "document.unsaved_changes": "في {name} تغييرات غير محفوظة. إن لم تحفظها فستضيع.", + "drive.rigid": "{joint} مفصل صلب: يثبّت أجزاءه في مكانها، لذا لا يوجد ما يمكن تحريكه. لتتحرك الأجزاء، غيّر نوعه في «تعديل المفصل»: Revolute للدوران، Slider للانزلاق، Cylindrical لكليهما.", "drive.stopped_by_contact": "توقف عند {value}: سيخترق {a} الجسم {b}", "drive.stopped_by_loop": "توقف عند {value}: لا يمكن للحلقة عبر {joint} أن تنغلق أكثر", "drive.unconnected": "لا يحرّك شيئًا: {part} غير متصل بأي شيء مثبت بالأرض", @@ -2264,6 +2268,7 @@ "timeline.delete_after_marker_one": "حذف ميزة واحدة بعد مؤشر السجل", "timeline.delete_after_marker_other": "حذف {count} ميزات بعد مؤشر السجل", "timeline.delete_folders_tip": "الإبقاء على ميزاتها ومجلداتها الفرعية في السجل", + "timeline.delete_folders_with_features_tip": "حذف المجلدات مع كل الميزات التي فيها والمجلدات المتداخلة فيها", "timeline.delete_many": "حذف {count} ميزات محددة", "timeline.feature_error": "خطأ: {message}", "timeline.feature_hint": "انقر نقرًا مزدوجًا للتحرير · اسحب لإعادة الترتيب · انقر بالزر الأيمن للمزيد", @@ -2273,6 +2278,7 @@ "timeline.move_to_group": "نقل الميزات إلى مجلد", "timeline.rename_group": "إعادة تسمية مجلد الميزات", "timeline.reorder_many": "إعادة ترتيب الميزات", + "timeline.suppress_folders_tip": "تعطيل كل الميزات في المجلدات والمجلدات المتداخلة فيها أو إلغاء تعطيلها", "timeline.ungroup": "إزالة مجلدات الميزات", "to the face": "إلى الوجه", "to the next face": "إلى الوجه التالي", diff --git a/assets/locales/de.json b/assets/locales/de.json index ab1d67969..dbe5921bf 100644 --- a/assets/locales/de.json +++ b/assets/locales/de.json @@ -152,6 +152,7 @@ "Customize…": "Anpassen…", "Cylindrical face": "Zylindrische Fläche", "Delete": "Löschen", + "Delete Folders and Features…": "Ordner mit Features löschen…", "Delete Selected Features…": "Ausgewählte Merkmale löschen…", "Delete Selected Folders": "Ausgewählte Ordner löschen", "Delete all": "Alle löschen", @@ -527,6 +528,7 @@ "Style": "Stil", "Summary": "Zusammenfassung", "Suppress": "Unterdrücken", + "Suppress Selected Folders": "Ausgewählte Ordner unterdrücken", "Suppressed": "Unterdrückt", "Surface": "Flächenkörper", "Surface, or faces to turn over": "Fläche oder umzudrehende Flächen", @@ -574,6 +576,7 @@ "UNTRIM": "TRIMMEN AUFHEBEN", "Unit": "Einheit", "Unsuppress": "Unterdrückung aufheben", + "Unsuppress Selected Folders": "Unterdrückung der ausgewählten Ordner aufheben", "Updating the preview": "Vorschau wird aktualisiert", "Use active author placement": "Aktive Autorplatzierung verwenden", "Use fixed plane": "Feste Ebene verwenden", @@ -1464,12 +1467,14 @@ "thread.designation": "Bezeichnung", "thread.iso_metric": "ISO metrisch", "thread.select_size": "Größe wählen", + "timeline.delete_folders_with_features_tip": "Löscht die Ordner mit allen Features darin und ihren Unterordnern", "timeline.feature_hint": "Doppelklicken zum Bearbeiten · Ziehen zum Neuordnen · Rechtsklicken für weitere Optionen", "timeline.group": "Neuen Merkmalsordner anlegen", "timeline.move_many": "Zeitleistenelemente verschieben", "timeline.move_to_group": "Merkmale in Ordner verschieben", "timeline.rename_group": "Merkmalsordner umbenennen", "timeline.reorder_many": "Merkmale neu ordnen", + "timeline.suppress_folders_tip": "Unterdrückt alle Features in den Ordnern und ihren Unterordnern oder hebt die Unterdrückung auf", "timeline.ungroup": "Merkmalsordner entfernen", "to the face": "bis zur Fläche", "to the next face": "bis zur nächsten Fläche", diff --git a/assets/locales/en.json b/assets/locales/en.json index 93c8f3efa..8345b70d7 100644 --- a/assets/locales/en.json +++ b/assets/locales/en.json @@ -152,6 +152,7 @@ "Customize…": "Customize…", "Cylindrical face": "Cylindrical face", "Delete": "Delete", + "Delete Folders and Features…": "Delete Folders and Features…", "Delete Selected Features…": "Delete Selected Features…", "Delete Selected Folders": "Delete Selected Folders", "Delete all": "Delete all", @@ -534,6 +535,7 @@ "Style": "Style", "Summary": "Summary", "Suppress": "Suppress", + "Suppress Selected Folders": "Suppress Selected Folders", "Suppressed": "Suppressed", "Surface": "Surface", "Surface, or faces to turn over": "Surface, or faces to turn over", @@ -581,6 +583,7 @@ "UNTRIM": "UNTRIM", "Unit": "Unit", "Unsuppress": "Unsuppress", + "Unsuppress Selected Folders": "Unsuppress Selected Folders", "Updating the preview": "Updating the preview", "Use active author placement": "Use active author placement", "Use fixed plane": "Use fixed plane", @@ -1145,6 +1148,7 @@ "document.save_changes": "Save changes to {name}?", "document.save_copy": "Save a Copy…", "document.unsaved_changes": "{name} has unsaved changes. If you don't save, they are lost.", + "drive.rigid": "{joint} is a rigid joint: it holds its parts still, so it has nothing to drive. To let them move, change its type in Edit Joint: Revolute to rotate, Slider to slide, Cylindrical for both.", "drive.stopped_by_contact": "Stopped at {value}: {a} would pass through {b}", "drive.stopped_by_loop": "Stopped at {value}: the loop through {joint} can't close any further", "drive.unconnected": "Moves nothing: {part} is not connected to anything grounded", @@ -2264,6 +2268,7 @@ "timeline.delete_after_marker_one": "Delete 1 Feature After History Marker", "timeline.delete_after_marker_other": "Delete {count} Features After History Marker", "timeline.delete_folders_tip": "Keep their features and nested folders in the history", + "timeline.delete_folders_with_features_tip": "Delete the folders with every feature in them and their nested folders", "timeline.delete_many": "Delete {count} Selected Features", "timeline.feature_error": "Error: {message}", "timeline.feature_hint": "Double-click to edit · drag to reorder · right-click for more", @@ -2273,6 +2278,7 @@ "timeline.move_to_group": "Move Features to Folder", "timeline.rename_group": "Rename Feature Folder", "timeline.reorder_many": "Reorder Features", + "timeline.suppress_folders_tip": "Suppress or unsuppress every feature in the folders and their nested folders", "timeline.ungroup": "Remove Feature Folders", "to the face": "to the face", "to the next face": "to the next face", diff --git a/assets/locales/he.json b/assets/locales/he.json index 8f4669dde..0cb294b8b 100644 --- a/assets/locales/he.json +++ b/assets/locales/he.json @@ -152,6 +152,7 @@ "Customize…": "התאמה אישית…", "Cylindrical face": "פאה גלילית", "Delete": "מחיקה", + "Delete Folders and Features…": "מחיקת תיקיות עם הפיצ'רים שבהן…", "Delete Selected Features…": "מחיקת הפיצ'רים שנבחרו…", "Delete Selected Folders": "מחיקת התיקיות שנבחרו", "Delete all": "מחיקת הכול", @@ -534,6 +535,7 @@ "Style": "סגנון", "Summary": "סיכום", "Suppress": "השבתה", + "Suppress Selected Folders": "השבתת התיקיות שנבחרו", "Suppressed": "מושבת", "Surface": "משטח", "Surface, or faces to turn over": "משטח, או פאות להיפוך", @@ -581,6 +583,7 @@ "UNTRIM": "ביטול גיזום", "Unit": "יחידה", "Unsuppress": "ביטול השבתה", + "Unsuppress Selected Folders": "ביטול השבתת התיקיות שנבחרו", "Updating the preview": "התצוגה המקדימה מתעדכנת", "Use active author placement": "שימוש במיקום היצירה הפעיל", "Use fixed plane": "שימוש במישור קבוע", @@ -1145,6 +1148,7 @@ "document.save_changes": "לשמור את השינויים ב־{name}?", "document.save_copy": "שמירת עותק…", "document.unsaved_changes": "ב־{name} יש שינויים שלא נשמרו. ללא שמירה, הם יאבדו.", + "drive.rigid": "{joint} הוא מפרק קשיח: הוא מחזיק את החלקים שלו במקומם, ולכן אין מה להניע. כדי שהחלקים יזוזו, שנו את הסוג שלו ב״עריכת מפרק״: Revolute לסיבוב, Slider להחלקה, Cylindrical לשניהם.", "drive.stopped_by_contact": "נעצר ב־{value}: {a} היה עובר דרך {b}", "drive.stopped_by_loop": "נעצר ב־{value}: הלולאה דרך {joint} לא יכולה להיסגר יותר", "drive.unconnected": "שום דבר לא זז: {part} אינו מחובר לשום דבר מעוגן", @@ -2264,6 +2268,7 @@ "timeline.delete_after_marker_one": "מחיקת פיצ'ר אחד אחרי סמן ציר הזמן", "timeline.delete_after_marker_other": "מחיקת {count} פיצ'רים אחרי סמן ציר הזמן", "timeline.delete_folders_tip": "שמירת הפיצ'רים והתיקיות המקוננות שלהן בציר הזמן", + "timeline.delete_folders_with_features_tip": "מחיקת התיקיות עם כל הפיצ'רים שבהן והתיקיות המקוננות בהן", "timeline.delete_many": "מחיקת {count} הפיצ'רים שנבחרו", "timeline.feature_error": "שגיאה: {message}", "timeline.feature_hint": "לחיצה כפולה לעריכה · גרירה לשינוי הסדר · לחיצה ימנית לעוד", @@ -2273,6 +2278,7 @@ "timeline.move_to_group": "העברת פיצ'רים לתיקייה", "timeline.rename_group": "שינוי שם תיקיית פיצ'רים", "timeline.reorder_many": "שינוי סדר פיצ'רים", + "timeline.suppress_folders_tip": "השבתה או ביטול השבתה של כל הפיצ'רים בתיקיות ובתיקיות המקוננות בהן", "timeline.ungroup": "הסרת תיקיות פיצ'רים", "to the face": "עד הפאה", "to the next face": "עד הפאה הבאה", diff --git a/assets/locales/ja.json b/assets/locales/ja.json index bf7dfa2f6..1d02c1cc0 100644 --- a/assets/locales/ja.json +++ b/assets/locales/ja.json @@ -152,6 +152,7 @@ "Customize…": "カスタマイズ…", "Cylindrical face": "円筒面", "Delete": "削除", + "Delete Folders and Features…": "フォルダーとフィーチャーを削除…", "Delete Selected Features…": "選択したフィーチャーを削除…", "Delete Selected Folders": "選択したフォルダーを削除", "Delete all": "すべて削除", @@ -534,6 +535,7 @@ "Style": "スタイル", "Summary": "概要", "Suppress": "抑制", + "Suppress Selected Folders": "選択したフォルダーを抑制", "Suppressed": "抑制", "Surface": "サーフェス", "Surface, or faces to turn over": "サーフェス、または裏返す面", @@ -581,6 +583,7 @@ "UNTRIM": "トリム解除", "Unit": "単位", "Unsuppress": "抑制を解除", + "Unsuppress Selected Folders": "選択したフォルダーの抑制を解除", "Updating the preview": "プレビューを更新中", "Use active author placement": "アクティブな作成元配置を使用", "Use fixed plane": "固定平面を使用", @@ -1145,6 +1148,7 @@ "document.save_changes": "{name} への変更を保存しますか?", "document.save_copy": "コピーを保存…", "document.unsaved_changes": "{name} には保存されていない変更があります。保存しない場合、変更内容は失われます。", + "drive.rigid": "{joint} は剛体ジョイントです。部品をその場に固定するため、駆動するものがありません。動かすには「ジョイントを編集」で種類を変更してください: 回転させるなら Revolute、スライドさせるなら Slider、両方なら Cylindrical。", "drive.stopped_by_contact": "{value} で停止: {a} が {b} を通り抜けてしまいます", "drive.stopped_by_loop": "{value} で停止: {joint} を通るループはこれ以上閉じられません", "drive.unconnected": "何も動きません: {part} は空間固定されたものに接続されていません", @@ -2264,6 +2268,7 @@ "timeline.delete_after_marker_one": "履歴マーカー以降の 1 個のフィーチャーを削除", "timeline.delete_after_marker_other": "履歴マーカー以降の {count} 個のフィーチャーを削除", "timeline.delete_folders_tip": "フィーチャーと入れ子のフォルダーを履歴に残します", + "timeline.delete_folders_with_features_tip": "フォルダーを、中のすべてのフィーチャーと入れ子のフォルダーごと削除します", "timeline.delete_many": "選択した {count} 個のフィーチャーを削除", "timeline.feature_error": "エラー: {message}", "timeline.feature_hint": "ダブルクリックで編集 · ドラッグで並べ替え · 右クリックでその他の操作", @@ -2273,6 +2278,7 @@ "timeline.move_to_group": "フィーチャーをフォルダへ移動", "timeline.rename_group": "フィーチャーフォルダの名前を変更", "timeline.reorder_many": "フィーチャーの順序を変更", + "timeline.suppress_folders_tip": "フォルダーと入れ子のフォルダー内のすべてのフィーチャーを抑制、または抑制を解除します", "timeline.ungroup": "フィーチャーフォルダを削除", "to the face": "面まで", "to the next face": "次の面まで", diff --git a/assets/locales/pending/drive-rigid-joint.json b/assets/locales/pending/drive-rigid-joint.json deleted file mode 100644 index 3b79d1597..000000000 --- a/assets/locales/pending/drive-rigid-joint.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "en": { - "drive.rigid": "{joint} is a rigid joint: it holds its parts still, so it has nothing to drive. To let them move, change its type in Edit Joint: Revolute to rotate, Slider to slide, Cylindrical for both." - }, - "ar": { - "drive.rigid": "{joint} مفصل صلب: يثبّت أجزاءه في مكانها، لذا لا يوجد ما يمكن تحريكه. لتتحرك الأجزاء، غيّر نوعه في «تعديل المفصل»: Revolute للدوران، Slider للانزلاق، Cylindrical لكليهما." - }, - "he": { - "drive.rigid": "{joint} הוא מפרק קשיח: הוא מחזיק את החלקים שלו במקומם, ולכן אין מה להניע. כדי שהחלקים יזוזו, שנו את הסוג שלו ב״עריכת מפרק״: Revolute לסיבוב, Slider להחלקה, Cylindrical לשניהם." - }, - "ja": { - "drive.rigid": "{joint} は剛体ジョイントです。部品をその場に固定するため、駆動するものがありません。動かすには「ジョイントを編集」で種類を変更してください: 回転させるなら Revolute、スライドさせるなら Slider、両方なら Cylindrical。" - }, - "vi": { - "drive.rigid": "{joint} là khớp nối cứng: nó giữ cố định các chi tiết, nên không có gì để dẫn động. Để các chi tiết chuyển động, hãy đổi loại khớp nối trong “Chỉnh sửa khớp nối”: Revolute để xoay, Slider để trượt, Cylindrical cho cả hai." - }, - "zh": { - "drive.rigid": "{joint} 是刚性接头:它把零件固定在原位,因此没有可驱动的运动。要让零件运动,请在“编辑接头”中更改其类型:旋转用 Revolute,滑动用 Slider,两者兼有用 Cylindrical。" - } -} diff --git a/assets/locales/pending/history-folder-actions.json b/assets/locales/pending/history-folder-actions.json deleted file mode 100644 index cd01ce32e..000000000 --- a/assets/locales/pending/history-folder-actions.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "en": { - "Delete Folders and Features…": "Delete Folders and Features…", - "Suppress Selected Folders": "Suppress Selected Folders", - "Unsuppress Selected Folders": "Unsuppress Selected Folders", - "timeline.delete_folders_with_features_tip": "Delete the folders with every feature in them and their nested folders", - "timeline.suppress_folders_tip": "Suppress or unsuppress every feature in the folders and their nested folders" - }, - "de": { - "Delete Folders and Features…": "Ordner mit Features löschen…", - "Suppress Selected Folders": "Ausgewählte Ordner unterdrücken", - "Unsuppress Selected Folders": "Unterdrückung der ausgewählten Ordner aufheben", - "timeline.delete_folders_with_features_tip": "Löscht die Ordner mit allen Features darin und ihren Unterordnern", - "timeline.suppress_folders_tip": "Unterdrückt alle Features in den Ordnern und ihren Unterordnern oder hebt die Unterdrückung auf" - }, - "ar": { - "Delete Folders and Features…": "حذف المجلدات مع ميزاتها…", - "Suppress Selected Folders": "تعطيل المجلدات المحددة", - "Unsuppress Selected Folders": "إلغاء تعطيل المجلدات المحددة", - "timeline.delete_folders_with_features_tip": "حذف المجلدات مع كل الميزات التي فيها والمجلدات المتداخلة فيها", - "timeline.suppress_folders_tip": "تعطيل كل الميزات في المجلدات والمجلدات المتداخلة فيها أو إلغاء تعطيلها" - }, - "he": { - "Delete Folders and Features…": "מחיקת תיקיות עם הפיצ'רים שבהן…", - "Suppress Selected Folders": "השבתת התיקיות שנבחרו", - "Unsuppress Selected Folders": "ביטול השבתת התיקיות שנבחרו", - "timeline.delete_folders_with_features_tip": "מחיקת התיקיות עם כל הפיצ'רים שבהן והתיקיות המקוננות בהן", - "timeline.suppress_folders_tip": "השבתה או ביטול השבתה של כל הפיצ'רים בתיקיות ובתיקיות המקוננות בהן" - }, - "ja": { - "Delete Folders and Features…": "フォルダーとフィーチャーを削除…", - "Suppress Selected Folders": "選択したフォルダーを抑制", - "Unsuppress Selected Folders": "選択したフォルダーの抑制を解除", - "timeline.delete_folders_with_features_tip": "フォルダーを、中のすべてのフィーチャーと入れ子のフォルダーごと削除します", - "timeline.suppress_folders_tip": "フォルダーと入れ子のフォルダー内のすべてのフィーチャーを抑制、または抑制を解除します" - }, - "vi": { - "Delete Folders and Features…": "Xóa thư mục cùng các tính năng…", - "Suppress Selected Folders": "Bỏ kích hoạt các thư mục đã chọn", - "Unsuppress Selected Folders": "Kích hoạt lại các thư mục đã chọn", - "timeline.delete_folders_with_features_tip": "Xóa các thư mục cùng mọi tính năng trong đó và các thư mục lồng bên trong", - "timeline.suppress_folders_tip": "Bỏ kích hoạt hoặc kích hoạt lại mọi tính năng trong các thư mục và các thư mục lồng bên trong" - }, - "zh": { - "Delete Folders and Features…": "删除文件夹及其特征…", - "Suppress Selected Folders": "抑制所选文件夹", - "Unsuppress Selected Folders": "取消抑制所选文件夹", - "timeline.delete_folders_with_features_tip": "删除文件夹及其中的所有特征和嵌套文件夹", - "timeline.suppress_folders_tip": "抑制或取消抑制文件夹及其嵌套文件夹中的所有特征" - } -} diff --git a/assets/locales/vi.json b/assets/locales/vi.json index 957ff503f..60a891e92 100644 --- a/assets/locales/vi.json +++ b/assets/locales/vi.json @@ -152,6 +152,7 @@ "Customize…": "Tùy chỉnh…", "Cylindrical face": "Mặt trụ", "Delete": "Xóa", + "Delete Folders and Features…": "Xóa thư mục cùng các tính năng…", "Delete Selected Features…": "Xóa các tính năng đã chọn…", "Delete Selected Folders": "Xóa các thư mục đã chọn", "Delete all": "Xóa tất cả", @@ -534,6 +535,7 @@ "Style": "Kiểu hiển thị", "Summary": "Tóm tắt", "Suppress": "Bỏ kích hoạt (Suppress)", + "Suppress Selected Folders": "Bỏ kích hoạt các thư mục đã chọn", "Suppressed": "Bị tạm nén", "Surface": "Bề mặt", "Surface, or faces to turn over": "Mặt cong, hoặc các mặt cần lật hướng", @@ -581,6 +583,7 @@ "UNTRIM": "HỦY CẮT TỈA (UNTRIM)", "Unit": "Đơn vị", "Unsuppress": "Kích hoạt lại (Unsuppress)", + "Unsuppress Selected Folders": "Kích hoạt lại các thư mục đã chọn", "Updating the preview": "Đang cập nhật hình xem trước", "Use active author placement": "Sử dụng vị trí tác giả đang kích hoạt", "Use fixed plane": "Sử dụng mặt phẳng cố định", @@ -1145,6 +1148,7 @@ "document.save_changes": "Lưu các thay đổi đối với {name}?", "document.save_copy": "Lưu bản sao…", "document.unsaved_changes": "{name} có các thay đổi chưa lưu. Nếu không lưu, các thay đổi sẽ bị mất.", + "drive.rigid": "{joint} là khớp nối cứng: nó giữ cố định các chi tiết, nên không có gì để dẫn động. Để các chi tiết chuyển động, hãy đổi loại khớp nối trong “Chỉnh sửa khớp nối”: Revolute để xoay, Slider để trượt, Cylindrical cho cả hai.", "drive.stopped_by_contact": "Đã dừng tại {value}: {a} sẽ xuyên qua {b}", "drive.stopped_by_loop": "Đã dừng tại {value}: vòng lặp qua {joint} không thể khép kín thêm được nữa", "drive.unconnected": "Không di chuyển gì: {part} không được nối với bất kỳ chi tiết cố định nào", @@ -2264,6 +2268,7 @@ "timeline.delete_after_marker_one": "Xóa 1 tính năng sau điểm đánh dấu lịch sử", "timeline.delete_after_marker_other": "Xóa {count} tính năng sau điểm đánh dấu lịch sử", "timeline.delete_folders_tip": "Giữ lại các tính năng và thư mục lồng nhau trong lịch sử", + "timeline.delete_folders_with_features_tip": "Xóa các thư mục cùng mọi tính năng trong đó và các thư mục lồng bên trong", "timeline.delete_many": "Xóa {count} tính năng đã chọn", "timeline.feature_error": "Lỗi: {message}", "timeline.feature_hint": "Bấm đúp để sửa · kéo rê để đổi thứ tự · bấm chuột phải để xem thêm", @@ -2273,6 +2278,7 @@ "timeline.move_to_group": "Chuyển tính năng vào thư mục", "timeline.rename_group": "Đổi tên thư mục tính năng", "timeline.reorder_many": "Sắp xếp lại các tính năng", + "timeline.suppress_folders_tip": "Bỏ kích hoạt hoặc kích hoạt lại mọi tính năng trong các thư mục và các thư mục lồng bên trong", "timeline.ungroup": "Xóa thư mục tính năng", "to the face": "tới bề mặt", "to the next face": "tới bề mặt tiếp theo", diff --git a/assets/locales/zh.json b/assets/locales/zh.json index a13234a42..c3c8f1938 100644 --- a/assets/locales/zh.json +++ b/assets/locales/zh.json @@ -152,6 +152,7 @@ "Customize…": "自定义…", "Cylindrical face": "圆柱面", "Delete": "删除", + "Delete Folders and Features…": "删除文件夹及其特征…", "Delete Selected Features…": "删除所选特征…", "Delete Selected Folders": "删除所选文件夹", "Delete all": "全部删除", @@ -534,6 +535,7 @@ "Style": "样式", "Summary": "摘要", "Suppress": "抑制", + "Suppress Selected Folders": "抑制所选文件夹", "Suppressed": "已抑制", "Surface": "曲面", "Surface, or faces to turn over": "曲面,或要翻转的面", @@ -581,6 +583,7 @@ "UNTRIM": "取消修剪", "Unit": "单位", "Unsuppress": "取消抑制", + "Unsuppress Selected Folders": "取消抑制所选文件夹", "Updating the preview": "正在更新预览", "Use active author placement": "使用活动作者放置", "Use fixed plane": "使用固定平面", @@ -1145,6 +1148,7 @@ "document.save_changes": "保存对 {name} 的更改?", "document.save_copy": "保存副本…", "document.unsaved_changes": "{name} 有未保存的更改。如果不保存,将丢失这些更改。", + "drive.rigid": "{joint} 是刚性接头:它把零件固定在原位,因此没有可驱动的运动。要让零件运动,请在“编辑接头”中更改其类型:旋转用 Revolute,滑动用 Slider,两者兼有用 Cylindrical。", "drive.stopped_by_contact": "停在 {value}:{a} 会穿过 {b}", "drive.stopped_by_loop": "停在 {value}:经过 {joint} 的环路无法再闭合", "drive.unconnected": "没有任何移动:{part} 未连接到任何固定的零部件", @@ -2264,6 +2268,7 @@ "timeline.delete_after_marker_one": "删除历史标记之后的 1 个特征", "timeline.delete_after_marker_other": "删除历史标记之后的 {count} 个特征", "timeline.delete_folders_tip": "在历史记录中保留其中的特征和嵌套文件夹", + "timeline.delete_folders_with_features_tip": "删除文件夹及其中的所有特征和嵌套文件夹", "timeline.delete_many": "删除所选的 {count} 个特征", "timeline.feature_error": "错误:{message}", "timeline.feature_hint": "双击编辑 · 拖动以重新排序 · 右键查看更多操作", @@ -2273,6 +2278,7 @@ "timeline.move_to_group": "将特征移至文件夹", "timeline.rename_group": "重命名特征文件夹", "timeline.reorder_many": "特征重新排序", + "timeline.suppress_folders_tip": "抑制或取消抑制文件夹及其嵌套文件夹中的所有特征", "timeline.ungroup": "移除特征文件夹", "to the face": "到面", "to the next face": "到下一个面", From ec877315c3128891e358d5d1de7175aa03c8368f Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 14:24:13 +0000 Subject: [PATCH 050/102] Sketch: add points to an existing spline (#6533) (#7384) * claim: #6533 * Sketch: add points to an existing spline (#6533) A spline could not take more points after it was drawn. The new command sketch.spline.insert_point inserts a fit point on the curve where it passes nearest a spot, between its neighbours, or adds a new first or last point. Existing points keep their indices, so constraints stay. A right-click on a fit point spline offers Add Spline Point at the clicked spot. Control point splines are refused for now: with uniform knots one more control point would reshape the whole curve. Co-Authored-By: Claude Opus 5.5 * Locales: Arabic and Hebrew for Add Spline Point ar and he are complete catalogs on main now (#3458). The pending-messages test compares right-to-left messages in display order once #7532 lands (#7527). Co-Authored-By: Claude Opus 5.5 * Locales: Vietnamese for the new strings Vietnamese became a complete catalog on main (#5823), so every new English message needs it too. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- .../locales/pending/spline-insert-point.json | 23 ++++ crates/engine/src/cmd/sketch_create.rs | 26 ++++ crates/engine/src/cmd/sketch_modify_tests.rs | 57 ++++++++ crates/sketch/src/lib.rs | 1 + crates/sketch/src/spline_points.rs | 129 ++++++++++++++++++ crates/sketch/src/tests.rs | 95 +++++++++++++ crates/ui-egui/src/context_menu.rs | 74 ++++++++++ 7 files changed, 405 insertions(+) create mode 100644 assets/locales/pending/spline-insert-point.json create mode 100644 crates/sketch/src/spline_points.rs diff --git a/assets/locales/pending/spline-insert-point.json b/assets/locales/pending/spline-insert-point.json new file mode 100644 index 000000000..26f4180b8 --- /dev/null +++ b/assets/locales/pending/spline-insert-point.json @@ -0,0 +1,23 @@ +{ + "en": { + "cmd.sketch_spline_insert_point": "Add Spline Point" + }, + "ar": { + "cmd.sketch_spline_insert_point": "إضافة نقطة إلى المنحنى الشريحي" + }, + "de": { + "cmd.sketch_spline_insert_point": "Splinepunkt hinzufügen" + }, + "he": { + "cmd.sketch_spline_insert_point": "הוספת נקודה לספליין" + }, + "ja": { + "cmd.sketch_spline_insert_point": "スプライン点を追加" + }, + "vi": { + "cmd.sketch_spline_insert_point": "Thêm điểm vào đường cong Spline" + }, + "zh": { + "cmd.sketch_spline_insert_point": "添加样条曲线点" + } +} diff --git a/crates/engine/src/cmd/sketch_create.rs b/crates/engine/src/cmd/sketch_create.rs index dfa0d9328..8c1cebce2 100644 --- a/crates/engine/src/cmd/sketch_create.rs +++ b/crates/engine/src/cmd/sketch_create.rs @@ -79,6 +79,10 @@ pub static COMMANDS: &[CommandSpec] = &[ .icon("spline_cv") .enabled(in_sketch) .params(concat!("points: control points (2…500), degree 5", created_doc!())), + CommandSpec::new("sketch.spline.insert_point", "Add Spline Point", spline_insert_point) + .icon("spline") + .enabled(in_sketch) + .params("curve: fit point spline id, at: [x,y]: a fit point is inserted where the curve passes nearest to it, between its neighbours (the curve still runs through it and all its old points; constraints on them stay); end?: start|end: `at` becomes the spline's new first or last point instead, and the curve runs on to it (refused when that end is joined to other geometry). Control point splines take no new points yet. Returns point: the new point's id"), CommandSpec::new("sketch.conic", "Conic Curve", conic) .at("SKETCH", "CREATE") .icon("conic") @@ -678,6 +682,28 @@ fn spline_cv5(s: &mut Session, p: &Value) -> Result { spline(s, p, "sketch.spline.control_point_5", true, 5) } +fn spline_insert_point(s: &mut Session, p: &Value) -> Result { + let cmd = "sketch.spline.insert_point"; + let at = req_vec2(cmd, p, "at")?; + let end = match p.get("end") { + None | Some(Value::Null) => None, + Some(Value::String(e)) if e == "start" => Some(true), + Some(Value::String(e)) if e == "end" => Some(false), + Some(_) => return Err(bad(cmd, "`end` must be start or end")), + }; + let (point, info) = edit(s, p, cmd, false, |sk, _| { + let id = str_(p, "curve").ok_or_else(|| bad(cmd, "`curve` must be a spline id"))?; + let c = sk.curve_index(id).ok_or_else(|| bad(cmd, format!("unknown curve `{id}`")))?; + let new = match end { + None => sk.insert_spline_point(c, at), + Some(at_start) => sk.extend_spline(c, at, at_start), + } + .map_err(|e| bad(cmd, e.to_string()))?; + sk.points.get(new).map(|q| q.id.clone()).ok_or_else(|| bad(cmd, "the new point is missing")) + })?; + Ok(json!({"point": point, "curve": p.get("curve"), "sketch": info})) +} + fn conic(s: &mut Session, p: &Value) -> Result { let cmd = "sketch.conic"; let rho = num(p, "rho").unwrap_or(0.5); diff --git a/crates/engine/src/cmd/sketch_modify_tests.rs b/crates/engine/src/cmd/sketch_modify_tests.rs index a3e27e654..534ccfba0 100644 --- a/crates/engine/src/cmd/sketch_modify_tests.rs +++ b/crates/engine/src/cmd/sketch_modify_tests.rs @@ -1085,6 +1085,63 @@ fn ellipse_splines_conic() { assert_eq!(ids(&r["curves"]).len(), 2); } +/// #6533: Add Spline Point puts a fit point on the curve at the spot, between its neighbours, as +/// one undo step. A dimension between two old fit points and a line joined to the spline's end +/// stay, and the curve still runs through every old point. +#[test] +fn a_point_added_to_a_spline_keeps_its_constraints_and_undoes() { + let mut s = new_sketch(); + let sid = + ids(&run(&mut s, "sketch.spline.fit_point", json!({"points": [[0, 0], [10, 8], [20, 0], [30, 6]], "connect": false}))["curves"])[0].clone(); + run(&mut s, "sketch.line", json!({"points": [format!("{sid}.end"), [40, 6]], "connect": false})); + let sk = sketch(&s); + let si = sk.curve_index(&sid).unwrap(); + let old = sk.curves[si].kind.point_ids(); + let names: Vec = old.iter().map(|i| sk.points[*i].id.clone()).collect(); + run(&mut s, "sketch.dimension", json!({"entities": [names[0], names[1]], "value": 12.8})); + let before = sketch(&s); + let fit: Vec = old.iter().map(|i| before.point(*i).unwrap()).collect(); + let curve = before.exact_segs(si).unwrap(); + let off = + |segs: &[solidcraft_geom::Seg2], q: Vec2| segs.iter().map(|seg| seg.point_at(seg.closest_param(q)).dist(q)).fold(f64::INFINITY, f64::min); + + let out = run(&mut s, "sketch.spline.insert_point", json!({"curve": sid, "at": [15, 6]})); + let after = sketch(&s); + let new = after.point_index(out["point"].as_str().unwrap()).unwrap(); + let now = after.curves[si].kind.point_ids(); + assert_eq!(now.len(), old.len() + 1); + assert_eq!(now[2], new, "between the second and third fit points: {now:?}"); + let q = after.point(new).unwrap(); + assert!(off(&curve, q) < 1e-9, "the new point is on the curve as it was: {q:?}"); + let segs = after.exact_segs(si).unwrap(); + for (i, p) in old.iter().zip(&fit) { + assert!(after.point(*i).unwrap().dist(*p) < 1e-9, "fit point {i} stays"); + assert!(off(&segs, *p) < 1e-9, "the curve still runs through {p:?}"); + } + assert_eq!(after.constraints.len(), before.constraints.len(), "the dimension and the end join stay"); + let d = after.constraints.iter().find(|c| c.kind.value().is_some()).unwrap(); + let (mut on, _) = d.kind.indices(); + on.sort_unstable(); + assert_eq!(on, vec![old[0], old[1]], "the dimension still measures the first two fit points: {:?}", d.kind); + assert!(after.curves.iter().any(|c| matches!(c.kind, CurveKind::Line { a, .. } if a == old[3])), "the line still starts at the spline's end"); + + run(&mut s, "edit.undo", json!({})); + assert_eq!(sketch(&s), before, "undo restores the spline"); + // A control point spline, a line, and ends joined to a line or a dimension are refused. + let cv = + ids(&run(&mut s, "sketch.spline.control_point", json!({"points": [[0, 20], [10, 30], [20, 20]], "connect": false}))["curves"])[0].clone(); + assert!(s.execute("sketch.spline.insert_point", &json!({"curve": cv, "at": [10, 24]})).is_err()); + let line = before.curves.iter().find(|c| matches!(c.kind, CurveKind::Line { .. })).unwrap().id.clone(); + let unchanged = sketch(&s); + assert!(s.execute("sketch.spline.insert_point", &json!({"curve": line, "at": [35, 6]})).is_err()); + assert!(s.execute("sketch.spline.insert_point", &json!({"curve": sid, "at": [35, 10], "end": "end"})).is_err()); + assert!( + s.execute("sketch.spline.insert_point", &json!({"curve": sid, "at": [-10, 4], "end": "start"})).is_err(), + "the start carries the dimension" + ); + assert_eq!(sketch(&s), unchanged, "refusals change nothing"); +} + #[test] fn text_makes_profiles_that_extrude_and_edit() { let mut s = new_sketch(); diff --git a/crates/sketch/src/lib.rs b/crates/sketch/src/lib.rs index 5b977eeeb..18cea9a80 100644 --- a/crates/sketch/src/lib.rs +++ b/crates/sketch/src/lib.rs @@ -36,6 +36,7 @@ mod profiles; pub mod profiling; mod shape; mod solver; +mod spline_points; mod text; mod thin; mod union_find; diff --git a/crates/sketch/src/spline_points.rs b/crates/sketch/src/spline_points.rs new file mode 100644 index 000000000..6e3206d91 --- /dev/null +++ b/crates/sketch/src/spline_points.rs @@ -0,0 +1,129 @@ +//! New points on an existing fit spline (#6533): a fit point inserted where the curve already +//! runs, or a new first or last point the spline runs on to. +//! +//! The spline keeps its curve index and every point it had (the new point is appended to +//! `Sketch::points`), so constraints on its points and on the curve stay as they were. +//! +//! Control point splines take no new points yet: their knots are uniform, so one more control +//! point re-spreads every span and the whole curve moves, wherever the point goes. + +use solidcraft_geom::Vec2; + +use crate::model::{ConstraintKind, CurveKind, Result, Sketch, SketchError}; + +/// Closer than this (relative to the spline's size) to one of its points, a new point would +/// double it. +const SAME_POINT: f64 = 1e-6; + +impl Sketch { + /// Insert a fit point into spline `ci` where the curve passes nearest to `at`, and return its + /// index. The point lies on the curve, which still runs through it and through all its old + /// points; between them the curve shifts slightly, as interpolation through one more point + /// does. + pub fn insert_spline_point(&mut self, ci: usize, at: Vec2) -> Result { + let pts = self.editable_spline(ci)?; + if !at.is_finite() { + return Err(SketchError::Invalid("the position must be finite".into())); + } + let pos: Vec = pts.iter().map(|i| self.point(*i).ok_or_else(|| SketchError::Unknown(format!("point {i}")))).collect::>()?; + // A fit spline has one exact piece between each pair of neighbouring fit points. + let pieces = self.exact_segs(ci).filter(|p| !p.is_empty() && p.len() + 1 == pos.len()); + let pieces = pieces.ok_or_else(|| SketchError::Invalid("the spline has no exact pieces to place a point on".into()))?; + let (piece, new) = pieces + .iter() + .enumerate() + .map(|(i, seg)| { + let q = seg.point_at(seg.closest_param(at)); + (i, q, q.dist(at)) + }) + .min_by(|a, b| a.2.total_cmp(&b.2)) + .map(|(i, q, _)| (i, q)) + .ok_or_else(|| SketchError::Invalid("the spline has no exact pieces to place a point on".into()))?; + let size = spread(&pos); + if [pos.get(piece), pos.get(piece + 1)].into_iter().flatten().any(|p| p.dist(new) <= SAME_POINT * size) { + return Err(SketchError::Invalid("there is already a spline point there".into())); + } + let p = self.add_point(new, None)?; + if let Some(CurveKind::Spline { pts, .. }) = self.curves.get_mut(ci).map(|c| &mut c.kind) { + pts.insert(piece + 1, p); + } + Ok(p) + } + + /// Add `to` to fit spline `ci` as its new first (`at_start`) or last point, and return its + /// index: the curve runs on from its old end through it. The old end becomes an inner point, + /// so it must not be joined to anything (another curve, or a constraint on that point or a + /// tangency of the spline). + pub fn extend_spline(&mut self, ci: usize, to: Vec2, at_start: bool) -> Result { + let pts = self.editable_spline(ci)?; + if matches!(self.curves.get(ci).map(|c| &c.kind), Some(CurveKind::Spline { periodic: true, .. })) { + return Err(SketchError::Invalid("a closed spline has no end to extend".into())); + } + if !to.is_finite() { + return Err(SketchError::Invalid("the position must be finite".into())); + } + let end = if at_start { pts.first() } else { pts.last() }.copied().ok_or_else(|| SketchError::Invalid("empty spline".into()))?; + let joined = self.curves.iter().enumerate().any(|(i, c)| i != ci && c.kind.uses(end)) + || self.constraints.iter().any(|k| { + let (points, curves) = k.kind.indices(); + points.contains(&end) || (curves.contains(&ci) && matches!(k.kind, ConstraintKind::Tangent { .. } | ConstraintKind::Smooth { .. })) + }); + if joined { + return Err(SketchError::Invalid("that end of the spline is joined to other geometry; add the point inside the spline instead".into())); + } + let pos: Vec = pts.iter().filter_map(|i| self.point(*i)).collect(); + if pos.iter().any(|p| p.dist(to) <= SAME_POINT * spread(&pos)) { + return Err(SketchError::Invalid("there is already a spline point there".into())); + } + let p = self.add_point(to, None)?; + if let Some(CurveKind::Spline { pts, .. }) = self.curves.get_mut(ci).map(|c| &mut c.kind) { + if at_start { + pts.insert(0, p); + } else { + pts.push(p); + } + } + Ok(p) + } + + /// The points of spline `ci`, when it may take another one. + fn editable_spline(&self, ci: usize) -> Result> { + let curve = self.curves.get(ci).ok_or_else(|| SketchError::Unknown(format!("curve {ci}")))?; + let CurveKind::Spline { pts, control, .. } = &curve.kind else { + return Err(SketchError::WrongKind(curve.id.clone(), "only a spline takes another point".into())); + }; + if *control { + return Err(SketchError::Invalid( + "not supported yet: adding a point to a control point spline (it would reshape the whole curve)".into(), + )); + } + if curve.link.is_some() { + return Err(SketchError::Invalid("a projected spline follows its source; it takes no points of its own".into())); + } + if self.freeform_offsets.iter().any(|o| o.output == curve.id) { + return Err(SketchError::Invalid("an offset spline follows its source; break the offset association first".into())); + } + if self.freeform_offsets.iter().any(|o| o.source == curve.id) { + return Err(SketchError::Invalid( + "not supported yet: adding a point to a spline that has an offset; break the offset association first".into(), + )); + } + if self.patterns.iter().any(|p| p.contains(&curve.id)) { + return Err(SketchError::Invalid("not supported yet: adding a point to a patterned spline".into())); + } + if pts.len() >= crate::curves::MAX_SPLINE_POINTS { + return Err(SketchError::Invalid(format!("a spline has at most {} points", crate::curves::MAX_SPLINE_POINTS))); + } + Ok(pts.clone()) + } +} + +/// The size of a set of points (its bounding box diagonal, at least 1 mm). +fn spread(pos: &[Vec2]) -> f64 { + let (mut lo, mut hi) = (Vec2::new(f64::INFINITY, f64::INFINITY), Vec2::new(f64::NEG_INFINITY, f64::NEG_INFINITY)); + for p in pos { + lo = Vec2::new(lo.x.min(p.x), lo.y.min(p.y)); + hi = Vec2::new(hi.x.max(p.x), hi.y.max(p.y)); + } + if lo.is_finite() && hi.is_finite() { lo.dist(hi).max(1.0) } else { 1.0 } +} diff --git a/crates/sketch/src/tests.rs b/crates/sketch/src/tests.rs index 29a58496e..55f1d5555 100644 --- a/crates/sketch/src/tests.rs +++ b/crates/sketch/src/tests.rs @@ -1071,6 +1071,101 @@ fn a_degree_nine_control_spline_stays_exact_and_closes_a_profile_exactly() { assert!(sk.add_curve(CurveKind::Spline { pts: high, control: true, degree: 10, periodic: false }, None).is_err()); } +/// How far apart two curves run: the largest distance from a sample of either to the other. +fn curves_apart(a: &[Vec2], b: &[Vec2]) -> f64 { + let one_way = |from: &[Vec2], to: &[Vec2]| from.iter().map(|q| crate::curves::polyline_signed_dist(to, *q).abs()).fold(0.0, f64::max); + one_way(a, b).max(one_way(b, a)) +} + +/// A fit spline through five points, its points and curve index. +fn wave_spline(sk: &mut Sketch, periodic: bool) -> (Vec, usize) { + let mut shape = vec![v(0.0, 0.0), v(10.0, 12.0), v(25.0, 4.0), v(38.0, 15.0), v(50.0, 0.0)]; + if periodic { + shape.push(v(0.0, 0.0)); + } + let mut pts: Vec = shape.iter().map(|q| sk.add_point(*q, None).unwrap()).collect(); + if periodic { + pts.pop(); + pts.push(pts[0]); + } + let s = sk.add_curve(CurveKind::Spline { pts: pts.clone(), control: false, degree: 3, periodic }, None).unwrap(); + (pts, s) +} + +/// The distance from `q` to the exact curve `ci`. +fn off_curve(sk: &Sketch, ci: usize, q: Vec2) -> f64 { + sk.exact_pieces(ci).iter().map(|seg| seg.point_at(seg.closest_param(q)).dist(q)).fold(f64::INFINITY, f64::min) +} + +/// #6533: a fit point added to a spline lands on the curve where it was asked for, in order +/// between its neighbours. The curve still runs through every old point and the new one, and +/// elsewhere barely moves: most where interpolation through one more point bends the end span. +#[test] +fn a_fit_point_inserted_into_a_spline_keeps_the_curve_through_its_points() { + let mut sk = Sketch::new(); + let (pts, s) = wave_spline(&mut sk, false); + let before = sk.polyline(s); + let old: Vec = pts.iter().map(|i| sk.point(*i).unwrap()).collect(); + for (at, slot, apart) in [(v(18.0, 9.0), 2, 0.05), (v(31.0, 9.0), 3, 0.05), (v(44.0, 9.0), 4, 1.0)] { + let mut k = sk.clone(); + let p = k.insert_spline_point(s, at).unwrap(); + let new = k.point(p).unwrap(); + assert!(off_curve(&sk, s, new) < 1e-9, "the new point is on the old curve: {new:?}"); + assert!(new.dist(at) < 2.0, "near the spot asked for: {new:?}"); + let CurveKind::Spline { pts: now, control, periodic, .. } = &k.curves[s].kind else { panic!() }; + assert!(!control && !periodic); + assert_eq!(now.len(), pts.len() + 1); + assert_eq!(now[slot], p, "between its neighbours: {now:?}"); + assert_eq!(now.iter().filter(|i| **i != p).copied().collect::>(), pts, "the old points keep their order"); + for q in old.iter().chain([&new]) { + assert!(off_curve(&k, s, *q) < 1e-9, "the new curve runs through {q:?}"); + } + let moved = curves_apart(&before, &k.polyline(s)); + assert!(moved < apart, "at {at:?} the curve moved {moved}"); + } + // A spot on an existing point, a control point spline and something not a spline are refused. + let mut k = sk.clone(); + assert!(k.insert_spline_point(s, old[2]).is_err()); + assert_eq!(k, sk, "a refused insertion changes nothing"); + let cv: Vec = old.iter().map(|q| k.add_point(*q + v(0.0, 30.0), None).unwrap()).collect(); + let c = k.add_curve(CurveKind::Spline { pts: cv, control: true, degree: 3, periodic: false }, None).unwrap(); + assert!(k.insert_spline_point(c, v(20.0, 38.0)).is_err()); + let l = k.add_line(v(0.0, -10.0), v(50.0, -10.0), None, None, None).unwrap(); + assert!(k.insert_spline_point(l, v(20.0, -10.0)).is_err()); + assert!(k.insert_spline_point(s, v(f64::NAN, 0.0)).is_err()); +} + +/// #6533: a closed spline takes a point in its closing span too, before the repeated first point, +/// and stays closed. +#[test] +fn a_fit_point_inserted_into_a_closed_spline_keeps_it_closed() { + let mut sk = Sketch::new(); + let (pts, s) = wave_spline(&mut sk, true); + let p = sk.insert_spline_point(s, v(25.0, -8.0)).unwrap(); + let CurveKind::Spline { pts: now, periodic, .. } = &sk.curves[s].kind else { panic!() }; + assert!(periodic); + assert_eq!(now.len(), pts.len() + 1); + assert_eq!((now[now.len() - 2], now.first(), now.last()), (p, Some(&pts[0]), Some(&pts[0]))); + assert!(off_curve(&sk, s, sk.point(p).unwrap()) < 1e-9); + assert!(sk.extend_spline(s, v(60.0, 0.0), false).is_err(), "a closed spline has no end"); +} + +/// #6533: a spline runs on to a new first or last point, unless that end is joined to something. +#[test] +fn a_spline_extends_to_a_new_end_unless_the_end_is_joined() { + let mut sk = Sketch::new(); + let (pts, s) = wave_spline(&mut sk, false); + let end = sk.extend_spline(s, v(60.0, 10.0), false).unwrap(); + let start = sk.extend_spline(s, v(-10.0, 5.0), true).unwrap(); + let CurveKind::Spline { pts: now, .. } = &sk.curves[s].kind else { panic!() }; + assert_eq!((now.first(), now.last(), now.len()), (Some(&start), Some(&end), pts.len() + 2)); + assert_eq!(sk.curves[s].kind.ends(), Some((start, end))); + // A line from the end: the end is shared, so the spline does not run past it. + sk.add_line(v(60.0, 10.0), v(70.0, 10.0), Some(end), None, None).unwrap(); + assert!(sk.extend_spline(s, v(65.0, 20.0), false).is_err()); + assert!(sk.extend_spline(s, v(-10.0, 5.0), true).is_err(), "already a point there"); +} + /// #755: a line drawn through a junction of a loop, but 2e-5 off it, still splits the loop. The /// junction lies on the loop's two curves only, so it cuts neither of them where the line /// crosses, and that crossing, next to the junction, was taken for one already cut there: the diff --git a/crates/ui-egui/src/context_menu.rs b/crates/ui-egui/src/context_menu.rs index 96118ef69..692b1a788 100644 --- a/crates/ui-egui/src/context_menu.rs +++ b/crates/ui-egui/src/context_menu.rs @@ -1046,6 +1046,17 @@ fn sketch_entity_items(app: &SolveApp) -> Vec { if curves.len() == 1 && ss.sketch.offset_distance(&curves[0]).is_some() { v.push(cmd(app, "sketch.offset.break", "Break Offset Association").with(json!({"curve":curves[0]}))); } + // #6533: a fit point on a fit point spline, where the menu was opened over it. + if let [curve] = curves.as_slice() + && ss + .sketch + .curve_index(curve) + .and_then(|i| ss.sketch.curves.get(i)) + .is_some_and(|c| matches!(c.kind, CurveKind::Spline { control: false, .. })) + && let Some(at) = menu_sketch_point(app, &ss.plane) + { + v.push(cmd(app, "sketch.spline.insert_point", "Add Spline Point").with(json!({"curve": curve, "at": [at.x, at.y]}))); + } v.push(act("ui.fix", "Fix/Unfix", "c_fix").with(json!({ "entities": ents }))); // The clipboard beside Delete, as in every menu. v.push(act("ui.cut", "Cut", "cut").key("Ctrl+X")); @@ -1107,6 +1118,14 @@ fn sketch_entity_items(app: &SolveApp) -> Vec { v } +/// Where on the active sketch's plane the viewport menu was opened (sketch coordinates). +fn menu_sketch_point(app: &SolveApp, plane: &solidcraft_engine::geom::Plane) -> Option { + let (at, _) = app.menu.opened?; + let proj = crate::viewport::projection(app, app.viewport.rect?); + let (o, d) = proj.ray(at); + Some(plane.to_local(plane.intersect_ray(o, d)?)) +} + // --------------------------------------------------------------------------------------------- // Running an item // --------------------------------------------------------------------------------------------- @@ -2353,6 +2372,61 @@ mod tests { assert!(remaining.dist(cut) > 1.0); } + /// #6533: a right-click on a fit point spline offers Add Spline Point at the clicked spot, and + /// the item puts a fit point there. A control point spline is not offered it. + #[test] + fn spline_context_menu_adds_a_fit_point_where_it_was_clicked() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); + let fit = h.app.run("sketch.spline.fit_point", json!({"points":[[0,0],[10,8],[20,0],[30,6]],"connect":false})).unwrap()["curves"][0] + .as_str() + .unwrap() + .to_owned(); + let control = h.app.run("sketch.spline.control_point", json!({"points":[[0,-12],[10,-4],[20,-12]],"connect":false})).unwrap()["curves"][0] + .as_str() + .unwrap() + .to_owned(); + let sid = h.app.session.active_sketch.unwrap(); + let spot = |h: &crate::scenario::Harness, id: &str, piece: usize| { + let state = h.app.session.world_state(); + let sk = &state.sketch(sid).unwrap().sketch; + sk.exact_segs(sk.curve_index(id).unwrap()).unwrap()[piece].point_at(0.5) + }; + let count = |h: &crate::scenario::Harness, id: &str| { + let state = h.app.session.world_state(); + let sk = &state.sketch(sid).unwrap().sketch; + sk.curves[sk.curve_index(id).unwrap()].kind.point_ids().len() + }; + h.call("ui.view", json!({"view":"top"})); + h.app.cam.distance = 80.0; + h.settle(); + + let c = spot(&h, &control, 0); + h.step(&json!({"click":{"world":[c.x,c.y,0]},"button":"right"})).unwrap(); + assert_eq!(h.app.session.selection, vec![Sel::SketchCurve { id: control.clone(), sketch: None }]); + assert!(items(&h.app, &Target::Viewport).iter().all(|item| item.id != "sketch.spline.insert_point")); + close(&mut h.app); + + let at = spot(&h, &fit, 1); + h.step(&json!({"click":{"world":[at.x,at.y,0]},"button":"right"})).unwrap(); + assert_eq!(h.app.session.selection, vec![Sel::SketchCurve { id: fit.clone(), sketch: None }]); + let menu = items(&h.app, &Target::Viewport); + let item = menu.iter().find(|item| item.id == "sketch.spline.insert_point").expect("a fit spline offers Add Spline Point"); + assert_eq!(item.label, "Add Spline Point"); + assert!(item.enabled); + let p = item.params.clone().unwrap(); + assert_eq!(p["curve"], json!(fit)); + let clicked = solidcraft_engine::geom::Vec2::new(p["at"][0].as_f64().unwrap(), p["at"][1].as_f64().unwrap()); + assert!(clicked.dist(at) < 0.5, "the item carries the clicked spot: {clicked:?} for {at:?}"); + h.step(&json!({"click":{"handle":"menu:sketch.spline.insert_point"}})).unwrap(); + assert_eq!(count(&h, &fit), 5); + let state = h.app.session.world_state(); + let sk = &state.sketch(sid).unwrap().sketch; + let added = sk.point(sk.curves[sk.curve_index(&fit).unwrap()].kind.point_ids()[2]).unwrap(); + assert!(added.dist(at) < 0.5, "the new fit point is where the menu was opened: {added:?}"); + } + #[test] fn solidworks_face_menu_runs_normal_to_selection_and_rejects_curved_faces() { let mut h = crate::scenario::Harness::new(); From 5bd8387cf7d78737e30e7af99b03d96d714fdb15 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 14:40:36 +0000 Subject: [PATCH 051/102] Repeat Last Command in the command palette, with a key you can change (#7077) (#7353) * claim: #7077 * Repeat Last Command in command search, with a key you can change (#7077) Shift+R already started the last tool or dialog again (#3045), but it was a key the app kept for itself: command search could not find it and Keyboard Shortcuts could not change it. It is now the command edit.repeat, with Shift+R as its default key. A call through the engine is refused, because only the app has a tool to start. Co-Authored-By: Claude Opus 5.5 * Locales: Arabic and Hebrew for the new strings ar and he are complete catalogs on main now (#3458): every new message needs them. The pending-messages test compares right-to-left messages in display order once #7532 lands (#7527). Co-Authored-By: Claude Opus 5.5 * Locales: Vietnamese for the new strings Vietnamese became a complete catalog on main (#5823), so every new English message needs it too. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- .../locales/pending/repeat-last-command.json | 34 ++++++++++ crates/engine/src/cmd/edit.rs | 18 ++++++ crates/engine/src/cmd/edit_tests.rs | 14 ++++ crates/engine/src/schema/edit.rs | 26 ++++++++ crates/engine/src/schema/mod.rs | 1 + crates/ui-egui/src/context_menu.rs | 8 ++- crates/ui-egui/src/keymap.rs | 64 ++++++++++++++++--- crates/ui-egui/src/lib.rs | 15 ++++- crates/ui-egui/src/toolbar.rs | 3 - 9 files changed, 165 insertions(+), 18 deletions(-) create mode 100644 assets/locales/pending/repeat-last-command.json create mode 100644 crates/engine/src/schema/edit.rs diff --git a/assets/locales/pending/repeat-last-command.json b/assets/locales/pending/repeat-last-command.json new file mode 100644 index 000000000..00d1d85f2 --- /dev/null +++ b/assets/locales/pending/repeat-last-command.json @@ -0,0 +1,34 @@ +{ + "en": { + "cmd.edit_repeat": "Repeat Last Command", + "ui.repeat_nothing": "Nothing to repeat yet: start a tool or dialog first." + }, + "ar": { + "cmd.edit_repeat": "تكرار آخر أمر", + "ui.repeat_nothing": "لا يوجد ما يُكرَّر بعد: ابدأ أداة أو مربع حوار أولًا." + }, + "de": { + "cmd.edit_repeat": "Letzten Befehl wiederholen", + "ui.repeat_nothing": "Noch nichts zu wiederholen: Starten Sie zuerst ein Werkzeug oder einen Dialog." + }, + "he": { + "cmd.edit_repeat": "חזרה על הפקודה האחרונה", + "ui.repeat_nothing": "אין עדיין מה לחזור עליו: התחל קודם כלי או תיבת דו־שיח." + }, + "ja": { + "cmd.edit_repeat": "最後のコマンドを繰り返す", + "ui.repeat_nothing": "まだ繰り返すものがありません。先にツールかダイアログを開始してください。" + }, + "ko": { + "cmd.edit_repeat": "마지막 명령 반복", + "ui.repeat_nothing": "아직 반복할 것이 없습니다. 먼저 도구나 대화 상자를 시작하세요." + }, + "vi": { + "cmd.edit_repeat": "Lặp lại lệnh trước", + "ui.repeat_nothing": "Chưa có gì để lặp lại: hãy bắt đầu một công cụ hoặc hộp thoại trước." + }, + "zh": { + "cmd.edit_repeat": "重复上一个命令", + "ui.repeat_nothing": "还没有可重复的操作:请先启动一个工具或对话框。" + } +} diff --git a/crates/engine/src/cmd/edit.rs b/crates/engine/src/cmd/edit.rs index 00d4871d6..43eafdc34 100644 --- a/crates/engine/src/cmd/edit.rs +++ b/crates/engine/src/cmd/edit.rs @@ -12,6 +12,14 @@ use crate::{EngineError, Result, Sel, Session, Snapshot}; pub static COMMANDS: &[CommandSpec] = &[ CommandSpec::new("edit.undo", "Undo", undo).icon("undo").key("Ctrl+Z").noundo().doc_only(), CommandSpec::new("edit.redo", "Redo", redo).icon("redo").key("Ctrl+Y").noundo().doc_only(), + CommandSpec::new("edit.repeat", "Repeat Last Command", crate::checked!("edit.repeat", repeat)) + .icon("redo") + .key("Shift+R") + .noundo() + .doc_only() + .contract(&REPEAT_CONTRACT) + .output(crate::schema::output_schema_for::) + .params("Starts the last tool or dialog started in the app again, with its defaults (a toolbar click, not a replay of its values). Only the app has a tool to start: called here it is refused, and changes nothing"), CommandSpec::new("edit.checkpoint", "Checkpoint", checkpoint).icon("checkpoint") .noundo() .doc_only() @@ -91,6 +99,16 @@ fn redo(s: &mut Session, _p: &Value) -> Result { Ok(json!({"redone": label})) } +const REPEAT_CONTRACT: crate::schema::TypedContract = crate::schema::TypedContract::new(); + +/// Repeat Last Command (#7077) starts a tool, which only the app has: it starts the last one in +/// `SolveApp::start` and never reaches this. A script runs the command it wants itself. +fn repeat(_s: &mut Session, _p: &Value) -> Result { + Err(EngineError::Other( + "edit.repeat starts the last tool or dialog again in the app (its key, the canvas menu or command search); there is no tool to start here: run that command itself".into(), + )) +} + /// Put the session at `snap`; returns where it was, under the same label. fn go_to(s: &mut Session, snap: Snapshot) -> Snapshot { let was = Snapshot { diff --git a/crates/engine/src/cmd/edit_tests.rs b/crates/engine/src/cmd/edit_tests.rs index 7c63ea787..f847fde53 100644 --- a/crates/engine/src/cmd/edit_tests.rs +++ b/crates/engine/src/cmd/edit_tests.rs @@ -40,6 +40,20 @@ fn roll_to_takes_a_number_or_end_and_refuses_anything_else() { } } +/// #7077: Repeat Last Command is a command (its key can change, command search finds it), but +/// only the app has a tool to start, so a script's call is refused and changes nothing. +#[test] +fn repeat_is_refused_outside_the_app_and_changes_nothing() { + let mut s = Session::default(); + run(&mut s, "solid.box", json!({"length": 10, "width": 10, "height": 10})); + let (doc, undo) = (s.doc.to_json(), s.undo.len()); + let e = s.execute("edit.repeat", &json!({})).unwrap_err().to_string(); + assert!(e.contains("in the app"), "{e}"); + assert_eq!((s.doc.to_json(), s.undo.len()), (doc, undo)); + let spec = crate::find_command("edit.repeat").unwrap(); + assert_eq!((spec.shortcut, spec.tab, spec.undoable), (Some("Shift+R"), "", false)); +} + #[test] fn g2_fillet_survives_edit_undo_and_reopen() { use solidcraft_doc::{Document, FeatureKind, FilletStyle}; diff --git a/crates/engine/src/schema/edit.rs b/crates/engine/src/schema/edit.rs new file mode 100644 index 000000000..d2f9ada5d --- /dev/null +++ b/crates/engine/src/schema/edit.rs @@ -0,0 +1,26 @@ +//! Contracts and result types for the commands in `cmd/edit.rs`. + +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +/// `edit.repeat` takes no parameters: it starts the last tool with its defaults. +#[derive(Debug, Deserialize, JsonSchema)] +#[schemars(deny_unknown_fields)] +pub struct RepeatParams {} + +/// What `edit.repeat` returns: nothing. Called through the engine it is always refused, since +/// only the app has a tool to start. +#[derive(Debug, Serialize, JsonSchema)] +pub struct RepeatResult {} + +#[cfg(test)] +mod tests { + use super::RepeatParams; + use crate::schema::input_schema_for; + use crate::schema::tests::assert_keys; + + #[test] + fn schemas_and_the_key_check_agree() { + assert_keys(input_schema_for::(), &[]); + } +} diff --git a/crates/engine/src/schema/mod.rs b/crates/engine/src/schema/mod.rs index f74283644..562f3e888 100644 --- a/crates/engine/src/schema/mod.rs +++ b/crates/engine/src/schema/mod.rs @@ -54,6 +54,7 @@ mod coverage_tests; mod tests; // The contracts, by command file. +pub mod edit; pub mod features; pub mod inspect; diff --git a/crates/ui-egui/src/context_menu.rs b/crates/ui-egui/src/context_menu.rs index 692b1a788..74a84cb61 100644 --- a/crates/ui-egui/src/context_menu.rs +++ b/crates/ui-egui/src/context_menu.rs @@ -325,9 +325,10 @@ pub fn component_bodies(app: &SolveApp, id: u64) -> Vec { /// The eight radial commands, clockwise from the top. pub fn radial_items(app: &SolveApp) -> Vec { + let key = crate::keymap::display_for(app, "edit.repeat").unwrap_or_default(); let repeat = match &app.last_command { - Some((_, label)) => act("ui.repeat", &format!("Repeat {label}"), "redo").key(crate::keymap::REPEAT_KEY), - None => act("ui.repeat", "Repeat", "redo").key(crate::keymap::REPEAT_KEY).on(false), + Some((_, label)) => act("ui.repeat", &format!("Repeat {label}"), "redo").key(&key), + None => act("ui.repeat", "Repeat", "redo").key(&key).on(false), }; let delete = act("ui.delete", "Delete", "delete").key("Del").on(!app.session.selection.is_empty()); if app.session.active_sketch.is_some() { @@ -500,7 +501,8 @@ fn viewport_items(app: &SolveApp) -> Vec { let has = |f: fn(&Sel) -> bool| sel.iter().any(f); let mut v = Vec::new(); if let Some((_, label)) = &app.last_command { - v.push(act("ui.repeat", &format!("Repeat {label}"), "redo").key(crate::keymap::REPEAT_KEY)); + let key = crate::keymap::display_for(app, "edit.repeat").unwrap_or_default(); + v.push(act("ui.repeat", &format!("Repeat {label}"), "redo").key(&key)); v.push(Item::sep()); } // Everything under the cursor, for what lies beneath something else. diff --git a/crates/ui-egui/src/keymap.rs b/crates/ui-egui/src/keymap.rs index 36f1bcad4..90ebe494c 100644 --- a/crates/ui-egui/src/keymap.rs +++ b/crates/ui-egui/src/keymap.rs @@ -11,12 +11,8 @@ use solidcraft_engine::{CommandSpec, command_specs}; use crate::SolveApp; use crate::ui_kit; -/// Repeats the last tool or dialog started (`SolveApp::repeat_last`, #3045). -pub const REPEAT_KEY: &str = "Shift+R"; - /// Keys the application handles before any command shortcut. pub const RESERVED: &[&str] = &[ - REPEAT_KEY, "Escape", "S", "V", @@ -1072,8 +1068,7 @@ mod tests { } /// #3045: Shift+R starts the last tool again (here a sketch's Line after Escape put it - /// down), R alone is still the rectangle; the menus show the key on Repeat, and no command - /// can take it. + /// down), R alone is still the rectangle; the menus show the key on Repeat. #[test] fn shift_r_repeats_the_last_tool() { let mut h = crate::scenario::Harness::new(); @@ -1093,9 +1088,60 @@ mod tests { let rectangle = h.app.tool.as_ref().map(|t| t.cmd.to_string()).unwrap_or_default(); assert!(rectangle.starts_with("sketch.rectangle"), "R alone: {rectangle}"); let repeat = crate::context_menu::radial_items(&h.app).into_iter().find(|i| i.id == "ui.repeat").unwrap(); - assert_eq!(repeat.shortcut, REPEAT_KEY); - let mut a = app(); - assert!(bind(&mut a, "solid.extrude", REPEAT_KEY, true).is_err(), "Shift+R is the app's"); + assert_eq!(repeat.shortcut, display("Shift+R")); + } + + /// #7077: Repeat Last Command is the command `edit.repeat`: Keyboard Shortcuts lists it and + /// can give it another key (the old one then does nothing, and the menus show the new one), + /// another command takes its key only on request, and command search finds and starts it. + /// Typing Shift+R into a field is text, not Repeat. + #[test] + fn repeat_last_command_is_a_command_with_a_key_that_can_change() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.frames(2); + assert_eq!(effective(&h.app, "edit.repeat").as_deref(), Some("Shift+R")); + assert_eq!(commands_for(&h.app, "Shift+R"), ["edit.repeat"], "no other default uses Shift+R"); + assert!(bind(&mut h.app, "solid.extrude", "Shift+R", false).unwrap_err().contains("Repeat Last Command")); + // Nothing was started yet: Repeat says so and starts nothing. + h.step(&json!({"key": "R", "shift": true})).unwrap(); + assert!(h.app.dialog.is_none() && h.app.tool.is_none()); + assert_eq!(h.app.status.as_ref().map(|s| s.0.as_str()), Some(h.app.tr("ui.repeat_nothing"))); + h.step(&json!({"start": "solid.box"})).unwrap(); + h.frames(2); + assert!(h.app.dialog.is_some(), "Box opens its dialog"); + crate::dialogs::cancel(&mut h.app); + h.frames(1); + assert!(h.app.dialog.is_none()); + // Another key for Repeat: Shift+R is free again, Alt+Shift+R starts Box's dialog again. + bind(&mut h.app, "edit.repeat", "Alt+Shift+R", false).unwrap(); + h.step(&json!({"key": "R", "shift": true})).unwrap(); + h.frames(1); + assert!(h.app.dialog.is_none(), "the old key no longer repeats"); + h.step(&json!({"key": "R", "shift": true, "alt": true})).unwrap(); + h.frames(2); + assert_eq!(h.app.dialog.as_ref().and_then(|d| d.command()), Some("solid.box"), "the new key repeats"); + let repeat = crate::context_menu::radial_items(&h.app).into_iter().find(|i| i.id == "ui.repeat").unwrap(); + assert_eq!(repeat.shortcut, display("Alt+Shift+R")); + crate::dialogs::cancel(&mut h.app); + reset(&mut h.app, Some("edit.repeat")); + // Command search lists it, and choosing it starts the last command again. + assert_eq!(crate::shortcut_box::search(&h.app, "repeat last").first().map(|r| r.0), Some("edit.repeat")); + h.call("ui.palette", json!({"text": "repeat last"})); + h.frames(3); + h.step(&json!({"key": "Enter"})).unwrap(); + h.frames(2); + assert!(!h.app.ui.palette_open); + assert_eq!(h.app.dialog.as_ref().and_then(|d| d.command()), Some("solid.box"), "chosen in command search"); + assert_eq!(h.app.last_command.as_ref().map(|c| c.0.as_str()), Some("solid.box"), "Repeat is never what is repeated"); + crate::dialogs::cancel(&mut h.app); + h.frames(1); + // While command search's field takes the keyboard, Shift+R is a letter typed there. + h.call("ui.palette", json!({})); + h.frames(3); + h.step(&json!({"key": "R", "shift": true})).unwrap(); + h.frames(1); + assert!(h.app.ui.palette_open && h.app.dialog.is_none(), "typing in a field never repeats"); } } diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index b6b0514d6..6132443d3 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -1136,10 +1136,14 @@ impl SolveApp { workspace::sync_context(self); } - /// Start the last tool or dialog started again (Repeat in the menus, Shift+R; #3045). - /// `false` when none was started yet. + /// Start the last tool or dialog started again, with its defaults (Repeat in the menus, + /// the `edit.repeat` command and its key, Shift+R by default; #3045, #7077). `false` when + /// none was started yet: the status line says so. pub fn repeat_last(&mut self) -> bool { - let Some((id, _)) = self.last_command.clone() else { return false }; + let Some((id, _)) = self.last_command.clone() else { + self.set_status(self.tr("ui.repeat_nothing").to_string(), false); + return false; + }; self.start(&id); true } @@ -1170,6 +1174,11 @@ impl SolveApp { if self.file_load.busy() || self.file_picker.is_some() { return; } + // Repeat Last Command starts the tool it names; it is never the one repeated itself. + if id == "edit.repeat" { + self.repeat_last(); + return; + } // Front … Isometric (Ctrl+1…7 by default) turn the view as the view cube'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() { diff --git a/crates/ui-egui/src/toolbar.rs b/crates/ui-egui/src/toolbar.rs index 458513106..85600c8d9 100644 --- a/crates/ui-egui/src/toolbar.rs +++ b/crates/ui-egui/src/toolbar.rs @@ -2163,9 +2163,6 @@ pub fn shortcuts(app: &mut SolveApp, ctx: &egui::Context) { app.start("ui.palette"); } Key::V => crate::context_menu::toggle_visibility(app), - Key::R if mods.shift && !mods.alt => { - app.repeat_last(); - } Key::F2 => { let at = ctx.input(|i| i.pointer.latest_pos()).unwrap_or(ctx.content_rect().center()); crate::context_menu::rename_selection(app, at); From 96b3ebba545ad16cfdf6f790a9230bc1445329f3 Mon Sep 17 00:00:00 2001 From: amolinari-autotex Date: Tue, 27 Oct 2026 14:40:47 +0000 Subject: [PATCH 052/102] Physical Material: initialize from selected bodies (#7240) (#7241) * Fix physical material dialog selection initialization * Fix material selector translations for complete catalogs --- .../locales/pending/material-selection.json | 38 +++++++++ crates/ui-egui/src/dialogs.rs | 20 ++++- crates/ui-egui/src/dialogs_dense.rs | 1 + crates/ui-egui/src/manage_dialogs_tests.rs | 53 +++++++++++++ crates/ui-egui/src/material_editor.rs | 48 +++++++++++- crates/ui-egui/src/preselect_tests.rs | 78 +++++++++++++++++++ 6 files changed, 233 insertions(+), 5 deletions(-) create mode 100644 assets/locales/pending/material-selection.json diff --git a/assets/locales/pending/material-selection.json b/assets/locales/pending/material-selection.json new file mode 100644 index 000000000..b1661a7c0 --- /dev/null +++ b/assets/locales/pending/material-selection.json @@ -0,0 +1,38 @@ +{ + "en": { + "material.selection.choose": "Choose a material", + "material.selection.mixed": "Different materials" + }, + "it": { + "material.selection.choose": "Scegli un materiale", + "material.selection.mixed": "Materiali diversi" + }, + "ja": { + "material.selection.choose": "材料を選択", + "material.selection.mixed": "異なる材料" + }, + "zh": { + "material.selection.choose": "选择材料", + "material.selection.mixed": "不同材料" + }, + "ar": { + "material.selection.choose": "اختر مادة", + "material.selection.mixed": "مواد مختلفة" + }, + "he": { + "material.selection.choose": "בחירת חומר", + "material.selection.mixed": "חומרים שונים" + }, + "vi": { + "material.selection.choose": "Chọn vật liệu", + "material.selection.mixed": "Các vật liệu khác nhau" + }, + "de": { + "material.selection.choose": "Material auswählen", + "material.selection.mixed": "Unterschiedliche Materialien" + }, + "ko": { + "material.selection.choose": "재질 선택", + "material.selection.mixed": "서로 다른 재질" + } +} diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 52bbf5b00..557a5860e 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -876,7 +876,9 @@ impl Dialog { }, vec![SelInput::new("Cylindrical face", FACES, false)], ), - "material.assign" => Dialog::new(Kind::Material { index: 1, editor: Default::default() }, vec![SelInput::new("Bodies", BODIES, true)]), + "material.assign" => { + Dialog::new(Kind::Material { index: usize::MAX, editor: Default::default() }, vec![SelInput::new("Bodies", BODIES, true)]) + } "inspect.section" => Dialog::new( Kind::Section { offset: length_default(s, "0"), flip: false, hatch: true }, vec![SelInput::new("Plane", PLANES | PLANAR_FACES, false)], @@ -1103,10 +1105,17 @@ impl Dialog { inp.items = default_profiles(s); } d.sync_thread(s); + d.sync_material(s); d.advance(); Some(d) } + fn sync_material(&mut self, s: &Session) { + let Kind::Material { index, editor } = &mut self.kind else { return }; + let bodies = self.inputs.first().map(|input| input.items.body_names()).unwrap_or_default(); + editor.sync_selection(&s.doc, &bodies, index); + } + /// Resolve a newly selected face without replacing an authored size or changing the /// document. Clearing the face also clears a suggestion that no longer applies. fn sync_thread(&mut self, s: &Session) { @@ -1484,6 +1493,7 @@ impl Dialog { self.focus = true; self.error = None; self.sync_thread(s); + self.sync_material(s); true } @@ -1556,6 +1566,7 @@ impl Dialog { } self.error = None; self.sync_thread(s); + self.sync_material(s); } /// Box selection result: replace (or add to) the active input. @@ -1601,6 +1612,7 @@ impl Dialog { } } self.sync_thread(s); + self.sync_material(s); } /// Rebuild a Fillet or Chamfer dialog's edge input from the edges that were picked when @@ -2779,6 +2791,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) { sync_reach(app, &mut d); auto_operation(app, &mut d); d.sync_thread(&app.session); + d.sync_material(&app.session); update_measure(app, &mut d); update_fill_cells(app, &mut d); // A refused OK's error is about the inputs it ran with (#641). Once a value (in the dialog, @@ -2838,7 +2851,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) { Kind::Sketch => false, // Nothing picked is an answer too: OK empties the chat's tray. Kind::ChatContext => true, - Kind::Material { editor, .. } if editor.editing() => false, + Kind::Material { editor, .. } => !editor.editing() && apply_commands(app, &d).is_ok(), Kind::SaveMesh(_) => crate::dialogs_save_mesh::ready(&d.inputs), Kind::SketchModify(crate::sketch_modify_ui::Mod::Corner { .. }) => { // Corner dialogs: preview errors are visual only; validation errors from @@ -3655,6 +3668,7 @@ pub(crate) fn report_title(d: &Dialog) -> String { /// The commands OK runs (an edit rebuilds its feature in place); the live preview runs the same. pub fn apply_commands(app: &SolveApp, d: &Dialog) -> Result, String> { let mut normalized = d.clone(); + normalized.sync_material(&app.session); for value in crate::length_input::fields(&app.session.doc, &mut normalized.kind) { *value = crate::length_input::expression(&app.session.doc, value, ValueKind::Length); } @@ -4303,7 +4317,7 @@ fn dialog_commands(app: &SolveApp, d: &Dialog) -> Result, S return Err(crate::i18n::tr("material.editor.save_or_discard").to_string()); } need(0, "bodies")?; - let name = s.doc.material_names().get(*index).cloned().unwrap_or_else(|| solidcraft_engine::doc::DEFAULT_MATERIAL.into()); + let name = s.doc.material_names().get(*index).cloned().ok_or_else(|| crate::i18n::tr("material.selection.choose").to_string())?; ("material.assign", json!({"bodies": sels(d, 0).body_names(), "material": name})) } Kind::Section { offset, flip, hatch } => { diff --git a/crates/ui-egui/src/dialogs_dense.rs b/crates/ui-egui/src/dialogs_dense.rs index 0b0f957a8..513cda600 100644 --- a/crates/ui-egui/src/dialogs_dense.rs +++ b/crates/ui-egui/src/dialogs_dense.rs @@ -190,6 +190,7 @@ pub(super) fn rows(app: &mut SolveApp, ctx: &egui::Context, d: &mut Dialog, ui: } else { input_rows(d, ui, &app.session); } + d.sync_material(&app.session); match &mut d.kind { Kind::Material { index, editor } => crate::material_editor::rows(app, ui, index, editor), Kind::Appearance(k) => enter |= crate::dialogs_appearance::rows(app, ui, k, &mut d.inputs), diff --git a/crates/ui-egui/src/manage_dialogs_tests.rs b/crates/ui-egui/src/manage_dialogs_tests.rs index 8c4e63185..cc41cbf46 100644 --- a/crates/ui-egui/src/manage_dialogs_tests.rs +++ b/crates/ui-egui/src/manage_dialogs_tests.rs @@ -144,6 +144,59 @@ fn physical_material_is_dense_and_keeps_assignment() { assert!(commands[0].1["material"].is_string()); } +#[test] +fn material_selector_clicking_the_suggested_material_preserves_that_choice_for_new_targets() { + let mut h = fixture(); + h.app.run("material.assign", json!({"bodies":["Body1"],"material":"Aluminum"})).unwrap(); + h.app.run("solid.box", json!({"corner":[30,0,0],"length":10,"width":10,"height":10,"body_name":"Other"})).unwrap(); + h.app.run("material.assign", json!({"bodies":["Other"],"material":"Steel"})).unwrap(); + h.app.session.selection = vec![Sel::Body { name: "Body1".into() }]; + let doc = h.app.session.doc.clone(); + let history = (h.app.session.undo.len(), h.app.session.redo.len()); + h.app.start("material.assign"); + h.frames(3); + assert!(h.widget("Density: 2.7 g/cm³").is_some()); + h.step(&json!({"click":{"handle":"dialog:Material"}})).unwrap(); + h.step(&json!({"click":{"handle":"dialog:Material:Aluminum"}})).unwrap(); + let d = h.app.dialog.as_mut().unwrap(); + d.active = 0; + d.take_box(&h.app.session, vec![Sel::Body { name: "Other".into() }], false); + h.frames(3); + let commands = dialogs::apply_commands(&h.app, h.app.dialog.as_ref().unwrap()).unwrap(); + assert_eq!(commands[0].1["material"], "Aluminum"); + assert_eq!(commands[0].1["bodies"], json!(["Other"])); + h.step(&json!({"click":{"handle":"dialog:cancel"}})).unwrap(); + assert!(std::sync::Arc::ptr_eq(&doc, &h.app.session.doc)); + assert_eq!(history, (h.app.session.undo.len(), h.app.session.redo.len())); +} + +#[test] +fn material_selector_mixed_targets_show_a_placeholder_and_cannot_confirm_until_chosen() { + let mut h = fixture(); + h.app.run("solid.box", json!({"corner":[30,0,0],"length":10,"width":10,"height":10,"body_name":"Other"})).unwrap(); + h.app.run("material.assign", json!({"bodies":["Body1"],"material":"Aluminum"})).unwrap(); + h.app.run("material.assign", json!({"bodies":["Other"],"material":"Steel"})).unwrap(); + h.app.session.selection = vec![Sel::Body { name: "Body1".into() }, Sel::Body { name: "Other".into() }]; + let before = h.app.session.doc.clone(); + h.app.start("material.assign"); + h.frames(3); + assert!(h.widget("Different materials").is_some()); + assert!(dialogs::apply_commands(&h.app, h.app.dialog.as_ref().unwrap()).is_err()); + assert_eq!(scenario::count_of("dialog:ok:enabled"), Some(0.0)); + h.step(&json!({"click":{"handle":"dialog:Material"}})).unwrap(); + h.step(&json!({"click":{"handle":"dialog:Material:Copper"}})).unwrap(); + h.frames(2); + assert_eq!(scenario::count_of("dialog:ok:enabled"), Some(1.0)); + assert!(std::sync::Arc::ptr_eq(&before, &h.app.session.doc)); + let undo = h.app.session.undo.len(); + h.step(&json!({"click":{"handle":"dialog:ok"}})).unwrap(); + assert_eq!(h.app.session.doc.body_material("Body1"), "Copper"); + assert_eq!(h.app.session.doc.body_material("Other"), "Copper"); + assert_eq!(h.app.session.undo.len(), undo + 1); + h.app.run("edit.undo", json!({})).unwrap(); + assert_eq!(h.app.session.doc.materials, before.materials); +} + #[test] fn physical_material_panel_reviews_saved_si_card_without_changing_the_design() { let mut h = fixture(); diff --git a/crates/ui-egui/src/material_editor.rs b/crates/ui-egui/src/material_editor.rs index 32dd87d1e..8342941ec 100644 --- a/crates/ui-egui/src/material_editor.rs +++ b/crates/ui-egui/src/material_editor.rs @@ -27,9 +27,37 @@ pub struct Editor { pub(crate) draft: Option, error: Option, note: Option, + chosen_material: Option, + observed_index: Option, + mixed_materials: bool, } impl Editor { + /// Follow the targets until the user deliberately chooses a material. Keep a + /// choice by name: inserting, renaming or deleting a library row must not + /// silently turn it into another material at the same ordinal. + pub(crate) fn sync_selection(&mut self, doc: &Document, bodies: &[String], index: &mut usize) { + if self.editing() { + return; + } + let names = doc.material_names(); + if self.observed_index.is_some_and(|previous| previous != *index) { + self.chosen_material = names.get(*index).cloned(); + } + let materials: Vec<_> = bodies + .iter() + .map(|body| { + let assigned = doc.materials.get(body).map(String::as_str).unwrap_or(solidcraft_engine::doc::DEFAULT_MATERIAL); + doc.material_name(assigned).filter(|name| doc.material_density(name).is_some()) + }) + .collect(); + self.mixed_materials = materials.first().is_some_and(|first| materials.iter().any(|material| material != first)); + let common = materials.first().and_then(Option::as_ref).filter(|first| materials.iter().all(|material| material.as_ref() == Some(*first))); + let selected = self.chosen_material.as_ref().or(common); + *index = selected.and_then(|name| names.iter().position(|candidate| candidate == name)).unwrap_or(usize::MAX); + self.observed_index = Some(*index); + } + pub fn editing(&self) -> bool { self.draft.is_some() } @@ -47,6 +75,8 @@ impl Editor { app.run(command, params)?; } *index = app.session.doc.material_names().iter().position(|n| n == &name).unwrap_or(*index); + self.chosen_material = Some(name); + self.observed_index = Some(*index); self.draft = None; self.error = None; self.note = Some(tr("material.editor.saved").to_string()); @@ -406,8 +436,22 @@ fn card_rows(ui: &mut egui::Ui, card: &mut CardDraft) { pub(crate) fn rows(app: &mut SolveApp, ui: &mut egui::Ui, index: &mut usize, editor: &mut Editor) { let names = app.session.doc.material_names(); if editor.draft.is_none() { - let refs: Vec<_> = names.iter().map(String::as_str).collect(); - ui_kit::choice_row(ui, "Material", "mat", index, &refs); + let placeholder = if editor.mixed_materials { "material.selection.mixed" } else { "material.selection.choose" }; + let current = names.get(*index).map(String::as_str).unwrap_or_else(|| tr(placeholder)); + ui_kit::row(ui, "Material", |ui| { + ui_kit::dropdown_menu(ui, "mat", current, |ui| { + for (i, name) in names.iter().enumerate() { + let option = ui_kit::list_picker(ui, &format!("physical_material_{i}"), name, *index == i); + crate::scenario::publish_handle(&format!("dialog:Material:{name}"), option.rect.center()); + if option.clicked() { + *index = i; + editor.chosen_material = Some(name.clone()); + editor.observed_index = Some(i); + ui.close(); + } + } + }); + }); let selected = names.get(*index).map(String::as_str); ui.horizontal_wrapped(|ui| { let new = ui_kit::button(ui, tr("New"), ui_kit::Button::Normal); diff --git a/crates/ui-egui/src/preselect_tests.rs b/crates/ui-egui/src/preselect_tests.rs index e261be25c..ba2318280 100644 --- a/crates/ui-egui/src/preselect_tests.rs +++ b/crates/ui-egui/src/preselect_tests.rs @@ -7,6 +7,84 @@ use solidcraft_engine::doc::expr::Kind as ValueKind; use solidcraft_engine::geom::Vec3; use solidcraft_engine::{Sel, Session}; +#[test] +fn material_selector_starts_with_the_assigned_material() { + let mut app = app_with(json!([ + {"command":"solid.box","params":{"length":10,"width":10,"height":10}}, + {"command":"material.assign","params":{"bodies":["Body1"],"material":"Aluminum"}} + ])); + app.session.selection = vec![Sel::Body { name: "Body1".into() }]; + let before = app.session.doc.to_json(); + let d = crate::dialogs::Dialog::for_command(&app, "material.assign").unwrap(); + let commands = crate::dialogs::apply_commands(&app, &d).unwrap(); + assert_eq!(commands[0].1["material"], "Aluminum"); + assert_eq!(app.session.doc.to_json(), before); +} + +fn material_selector_fixture() -> crate::SolveApp { + app_with(json!([ + {"command":"solid.box","params":{"length":10,"width":10,"height":10,"body_name":"Plate"}}, + {"command":"solid.box","params":{"corner":[30,0,0],"length":10,"width":10,"height":10,"body_name":"Block"}}, + {"command":"material.assign","params":{"bodies":["Plate"],"material":"Aluminum"}}, + {"command":"material.assign","params":{"bodies":["Block"],"material":"Steel"}} + ])) +} + +fn material_body(name: &str) -> Sel { + Sel::Body { name: name.into() } +} + +#[test] +fn material_selector_mixed_and_empty_targets_require_an_explicit_choice() { + let mut app = material_selector_fixture(); + let before = app.session.doc.to_json(); + for selected in [vec![], vec![material_body("Plate"), material_body("Block")]] { + app.session.selection = selected; + let d = crate::dialogs::Dialog::for_command(&app, "material.assign").unwrap(); + assert!(crate::dialogs::apply_commands(&app, &d).is_err()); + } + assert_eq!(app.session.doc.to_json(), before); +} + +#[test] +fn material_selector_follows_target_changes_until_a_material_is_chosen() { + let mut app = material_selector_fixture(); + app.session.selection = vec![material_body("Plate")]; + let mut d = crate::dialogs::Dialog::for_command(&app, "material.assign").unwrap(); + d.active = 0; + d.take_box(&app.session, vec![material_body("Block")], false); + assert_eq!(crate::dialogs::apply_commands(&app, &d).unwrap()[0].1["material"], "Steel"); + d.take_box(&app.session, vec![material_body("Plate"), material_body("Block")], false); + assert!(crate::dialogs::apply_commands(&app, &d).is_err()); + d.pick(&app.session, material_body("Block")); + assert_eq!(crate::dialogs::apply_commands(&app, &d).unwrap()[0].1["material"], "Aluminum"); + let crate::dialogs::Kind::Material { index, .. } = &mut d.kind else { panic!("material dialog") }; + *index = app.session.doc.material_names().iter().position(|name| name == "Copper").unwrap(); + d.take_box(&app.session, vec![material_body("Block")], false); + let commands = crate::dialogs::apply_commands(&app, &d).unwrap(); + assert_eq!(commands[0].1["material"], "Copper"); + assert_eq!(commands[0].1["bodies"], json!(["Block"])); +} + +#[test] +fn material_selector_supports_custom_materials_faces_and_default_without_editing_the_document() { + let mut app = material_selector_fixture(); + app.run("material.create", json!({"name":"Synthetic material","density_g_cm3":0.8})).unwrap(); + app.run("material.assign", json!({"bodies":["Plate","Block"],"material":"Synthetic material"})).unwrap(); + app.session = Session::new(solidcraft_engine::doc::Document::from_json(&app.session.doc.to_json()).unwrap()); + for selection in [vec![material_body("Plate"), material_body("Block")], vec![Sel::Face { body: "Plate".into(), index: 0, point: Vec3::ZERO }]] { + app.session.selection = selection; + let before = app.session.doc.to_json(); + let d = crate::dialogs::Dialog::for_command(&app, "material.assign").unwrap(); + assert_eq!(crate::dialogs::apply_commands(&app, &d).unwrap()[0].1["material"], "Synthetic material"); + assert_eq!(app.session.doc.to_json(), before); + } + app.run("material.assign", json!({"bodies":["Plate"],"material":"Default"})).unwrap(); + app.session.selection = vec![material_body("Plate")]; + let d = crate::dialogs::Dialog::for_command(&app, "material.assign").unwrap(); + assert_eq!(crate::dialogs::apply_commands(&app, &d).unwrap()[0].1["material"], "Default"); +} + #[test] fn confirming_coplanar_body_faces_uses_one_atomic_extrusion() { let mut h = crate::scenario::Harness::new(); From 02981d6bcfd2c52a13feb0008a36828d7c8f1b27 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 14:48:04 +0000 Subject: [PATCH 053/102] Lost GPU: a dropped frame no longer crashes the window's close (#7148) (#7400) * claim: #7148 * Lost GPU: a dropped frame no longer crashes the window's close (#7148) On a lost device wgpu's present and discard return early and leave the acquired frame's image in the surface, holding a swapchain acquire semaphore. Dropping the surface later (the window closing for the restart after the loss) then panicked in wgpu-hal. The painter now holds the frame as AcquiredFrame, which destroys a second handle to the frame's texture after the frame is presented or dropped; wgpu-core's destroy of a surface texture takes the image back without checking the device, and does nothing once a present or discard took it. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- vendor/README.md | 6 ++ vendor/egui-wgpu/src/lib.rs | 160 ++++++++++++++++++++++++++++++++++ vendor/egui-wgpu/src/winit.rs | 17 ++-- 3 files changed, 177 insertions(+), 6 deletions(-) diff --git a/vendor/README.md b/vendor/README.md index aaf33cc51..384f2353b 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -325,6 +325,12 @@ SolidCraft changes: default handler panicked (#7007). An unsupported surface is a refused configure too. The acquire runs under `capture_errors`, and the `Validation` status it then returns reconfigures the surface instead of skipping every later frame. +- `src/lib.rs`, `src/winit.rs`: the painter holds an acquired frame as `AcquiredFrame`, which + destroys a second handle to the frame's texture once the frame is presented or dropped. On a + lost device wgpu's present and discard keep the frame's image in the surface, and dropping + the surface (the window closing for the restart) then panicked in wgpu-hal ("Trying to + destroy a SwapchainAcquireSemaphore that is still in use by a SurfaceTexture", #7148); the + destroy takes the image back whatever the device's state. - `src/lib.rs`: creation of the egui renderer uses validation, internal and out-of-memory error scopes, awaiting every result before returning it. A refused UI pipeline (D3D12 `egui_pipeline` shader compilation, #6648) returns `WgpuError::CreateRendererError` through diff --git a/vendor/egui-wgpu/src/lib.rs b/vendor/egui-wgpu/src/lib.rs index ca4d9c1e0..1e65ac7a0 100644 --- a/vendor/egui-wgpu/src/lib.rs +++ b/vendor/egui-wgpu/src/lib.rs @@ -194,6 +194,67 @@ impl DeviceLost { } } +/// SolidCraft: a frame acquired from a window's surface, which gives its swapchain image back +/// however the frame ends: presented, dropped unpresented, or dropped while a panic unwinds +/// (#7148). +/// +/// wgpu presents or discards a frame only on a valid device. On a lost one both return early, and +/// the surface keeps the frame's image, which holds one of the swapchain's acquire semaphores. +/// Dropping or reconfiguring that surface later (the window closing as the app restarts after the +/// loss) then panics in wgpu-hal: "Trying to destroy a SwapchainAcquireSemaphore that is still in +/// use by a SurfaceTexture". So the frame keeps a second handle to its texture, and once the frame +/// is gone that handle is destroyed ([`FreeSurfaceTexture`]), which takes the image (and its +/// semaphores) back from the surface, lost device or not. After a present or discard that worked, +/// the image is already back and the destroy does nothing. +/// +/// The order is the struct's: Rust drops fields in declaration order, so [`Self::frame`] always +/// goes before the texture handle is destroyed, and [`Self::present`] presents before it. +pub struct AcquiredFrame { + /// The frame; dropped (discarded) before the texture is freed. + pub frame: F, + texture: FreeOnDrop, +} + +impl AcquiredFrame { + /// `texture` is a second handle to `frame`'s texture. + pub fn new(frame: F, texture: T) -> Self { + Self { + frame, + texture: FreeOnDrop(texture), + } + } + + /// Present the frame with `present`, then free the texture. + pub fn present(self, present: impl FnOnce(F)) { + let Self { frame, texture } = self; + present(frame); + drop(texture); + } +} + +/// SolidCraft: what [`AcquiredFrame`] does with its texture handle once the frame is gone. +pub trait FreeSurfaceTexture { + /// Give the surface's image back, whatever the device's state; nothing once it is back. + fn free(&self); +} + +impl FreeSurfaceTexture for wgpu::Texture { + /// wgpu-core's destroy of a surface texture takes its image and drops it without checking the + /// device, and does nothing when a present or discard took it already. + fn free(&self) { + self.destroy(); + } +} + +/// Frees its texture when dropped, also while a panic unwinds. +struct FreeOnDrop(T); + +impl Drop for FreeOnDrop { + fn drop(&mut self) { + self.0.free(); + } +} + /// Access to the render state for egui. #[derive(Clone)] pub struct RenderState { @@ -1032,4 +1093,103 @@ mod device_lost_tests { assert!(flag.load(std::sync::atomic::Ordering::Acquire)); assert_eq!(painter.reason().as_deref(), Some("Unknown: Device lost")); } + + /// A window's surface as wgpu-core treats the image of an acquired frame: a present or a + /// discard gives it back only on a valid device, a destroy of the texture always (#7148). + #[derive(Default)] + struct Surface { + lost: std::cell::Cell, + image_held: std::cell::Cell, + calls: std::cell::RefCell>, + } + + impl Surface { + fn call(&self, name: &'static str, gives_back: bool) { + self.calls.borrow_mut().push(name); + if gives_back { + self.image_held.set(false); + } + } + } + + /// A frame of [`Surface`]: discarded when dropped unpresented. + struct Frame<'s> { + surface: &'s Surface, + presented: bool, + } + + impl Drop for Frame<'_> { + fn drop(&mut self) { + if !self.presented { + self.surface.call("discard", !self.surface.lost.get()); + } + } + } + + struct Texture<'s>(&'s Surface); + + impl super::FreeSurfaceTexture for Texture<'_> { + fn free(&self) { + self.0.call("free", true); + } + } + + #[derive(Clone, Copy, Debug)] + enum End { + Present, + Drop, + Panic, + } + + /// Acquire a frame from `surface` and end it as `end`. + fn run_frame(surface: &Surface, end: End) { + surface.image_held.set(true); + let frame = super::AcquiredFrame::new( + Frame { + surface, + presented: false, + }, + Texture(surface), + ); + match end { + End::Present => frame.present(|mut frame| { + frame.presented = true; + surface.call("present", !surface.lost.get()); + }), + End::Drop => drop(frame), + End::Panic => { + let unwound = std::panic::catch_unwind(std::panic::AssertUnwindSafe(move || { + let _frame = frame; + panic!("a paint callback panics while the frame is held"); + })); + assert!(unwound.is_err()); + } + } + } + + /// However a frame ends, on a valid or a lost device, the surface has its image back by the + /// time the frame is gone, so dropping or reconfiguring the surface can't meet a semaphore + /// still in use (#7148). The texture is freed only after the present or discard: freed first, + /// a valid device's present or discard would find it destroyed. + #[test] + fn a_frame_gives_its_image_back_however_it_ends_even_on_a_lost_device() { + for lost in [false, true] { + for end in [End::Present, End::Drop, End::Panic] { + let surface = Surface::default(); + surface.lost.set(lost); + run_frame(&surface, end); + let first = if matches!(end, End::Present) { + "present" + } else { + "discard" + }; + assert_eq!( + *surface.calls.borrow(), + [first, "free"], + "lost {lost}, {end:?}" + ); + assert!(!surface.image_held.get(), "lost {lost}, {end:?}"); + } + } + } } diff --git a/vendor/egui-wgpu/src/winit.rs b/vendor/egui-wgpu/src/winit.rs index 9f728d835..aa9f948c0 100644 --- a/vendor/egui-wgpu/src/winit.rs +++ b/vendor/egui-wgpu/src/winit.rs @@ -735,7 +735,7 @@ impl Painter { output_frame }; - let output_frame = match output_frame { + let frame = match output_frame { wgpu::CurrentSurfaceTexture::Success(frame) => frame, wgpu::CurrentSurfaceTexture::Suboptimal(frame) => { surface_state.needs_reconfigure = true; @@ -770,6 +770,11 @@ impl Painter { return vsync_sec; } }; + // SolidCraft: however this frame ends (presented, dropped by an early return below, or + // dropped while a panic unwinds), the surface gets its image back, also on a lost device, + // where wgpu's present and discard keep it and the surface's drop then panicked (#7148). + let texture = frame.texture.clone(); + let output_frame = crate::AcquiredFrame::new(frame, texture); // SolidCraft: before the uploads, an empty submission asks the driver whether the device // is still there. The first queue write to meet a lost device panics inside wgpu (#4172); @@ -831,13 +836,13 @@ impl Painter { let target_texture = if capture { let capture_state = self.screen_capture_state.get_or_insert_with(|| { - CaptureState::new(&render_state.device, &output_frame.texture) + CaptureState::new(&render_state.device, &output_frame.frame.texture) }); - capture_state.update(&render_state.device, &output_frame.texture); + capture_state.update(&render_state.device, &output_frame.frame.texture); &capture_state.texture } else { - &output_frame.texture + &output_frame.frame.texture }; let target_view = target_texture.create_view(&wgpu::TextureViewDescriptor::default()); @@ -908,7 +913,7 @@ impl Painter { if capture && let Some(capture_state) = &mut self.screen_capture_state { capture_buffer = Some(capture_state.copy_textures( &render_state.device, - &output_frame, + &output_frame.frame, &mut encoder, )); } @@ -962,7 +967,7 @@ impl Painter { profiling::scope!("present"); // wgpu doesn't document where vsync can happen. Maybe here? let start = web_time::Instant::now(); - render_state.queue.present(output_frame); + output_frame.present(|frame| render_state.queue.present(frame)); vsync_sec += start.elapsed().as_secs_f32(); } From 35913ced4686395536bdb3e269e78f3d018e4613 Mon Sep 17 00:00:00 2001 From: bherbruck Date: Tue, 27 Oct 2026 15:16:48 +0000 Subject: [PATCH 054/102] Fix flaky dielectric_preflight_and_start test: render a view that does not hit a box edge (#7722) The default view sends the single pixel's ray through a box edge, which the raytracer rejects as an ambiguous interface normal. The job then ended Failed whenever the render thread got ahead of render.cancel (about 7% of runs under load), and the test only accepted Cancelled or Completed. Render off-axis so the outcome no longer depends on that race, and print the phase and error if it ever fails again. Co-authored-by: Claude Opus 5.5 --- crates/engine/src/cmd/render/job_tests.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/render/job_tests.rs b/crates/engine/src/cmd/render/job_tests.rs index 4b8391605..b534d3438 100644 --- a/crates/engine/src/cmd/render/job_tests.rs +++ b/crates/engine/src/cmd/render/job_tests.rs @@ -1044,9 +1044,13 @@ fn dielectric_preflight_and_start_resolve_refraction_without_broadening_boundari let mut s = Session::default(); s.set_render_job_host(Some(host.clone())).unwrap(); s.execute("solid.box", &json!({"length":20,"width":20,"height":2,"body_name":"Glass"})).unwrap(); + // The default view sends the single pixel's ray exactly through a box edge, which the optics reject + // as an ambiguous interface normal. Whether the job then ends Failed or Cancelled would depend on + // whether the cancel below beats the render thread, so view the glass off-axis. + let camera = solidcraft_render::Camera { yaw: 0.3, pitch: 0.4, ..Default::default() }; let document = s.doc.clone(); let before = (s.revision, s.evaluations, s.is_dirty(), s.undo.len(), s.redo.len()); - let params = json!({"integrator":"raytrace","settings":{"width":1,"height":1},"raytrace":{"dielectrics":[{ + let params = json!({"integrator":"raytrace","settings":{"width":1,"height":1,"camera":camera},"raytrace":{"dielectrics":[{ "body_index":0,"body_name":"Glass","boundary":"closed_box","ior":1.5,"absorption_per_mm":[0,0,0],"thickness_mm":0 }]}}); for command in ["render.preflight", "render.start"] { @@ -1065,7 +1069,12 @@ fn dielectric_preflight_and_start_resolve_refraction_without_broadening_boundari let handle = s.render_job_handle(id).unwrap(); s.execute("render.cancel", &json!({"job":id})).unwrap(); let status = handle.wait_timeout(std::time::Duration::from_secs(10)).unwrap(); - assert!(matches!(status.progress.phase, solidcraft_render::job::Phase::Cancelled | solidcraft_render::job::Phase::Completed)); + assert!( + matches!(status.progress.phase, solidcraft_render::job::Phase::Cancelled | solidcraft_render::job::Phase::Completed), + "phase {:?}, error {:?}", + status.progress.phase, + status.error + ); } } for boundary in ["closed_mesh", "thin_sheet"] { From 98b57a3588170ec1a1c7acc91b4bf8a60ea29865 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 15:17:11 +0000 Subject: [PATCH 055/102] Report a bug: Retake rebuilds the details instead of refusing, and keeps the screenshot (#7350) (#7352) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * claim: #7350 * Report a bug: Retake rebuilds the details instead of refusing, and keeps the screenshot (#7350) Once anything changed with a report open, every Retake refused with "Settings or model changed. Close this draft…", and each refused, waiting, timed-out or stale capture deleted the screenshot the draft had. Retake now rebuilds the technical details for the current view (keeping what was typed, edited details and a crash draft's body) and re-baselines before it captures; the screenshot is replaced only when a new frame is accepted. Co-Authored-By: Claude Opus 5.5 * Locales: Arabic and Hebrew for the new strings ar and he are complete catalogs on main now (#3458): every new message needs them. The pending-messages test compares right-to-left messages in display order once #7532 lands (#7527). Co-Authored-By: Claude Opus 5.5 * Locales: Vietnamese for the new strings Vietnamese became a complete catalog on main (#5823), so every new English message needs it too. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- .../pending/report-retake-rebuilds.json | 37 +++ crates/ui-egui/src/issue_report.rs | 215 ++++++++++++++++-- 2 files changed, 236 insertions(+), 16 deletions(-) create mode 100644 assets/locales/pending/report-retake-rebuilds.json diff --git a/assets/locales/pending/report-retake-rebuilds.json b/assets/locales/pending/report-retake-rebuilds.json new file mode 100644 index 000000000..7b69f1b11 --- /dev/null +++ b/assets/locales/pending/report-retake-rebuilds.json @@ -0,0 +1,37 @@ +{ + "en": { + "issue.note_changed_while_waiting": "Settings or model changed while waiting for the preview. Retake the screenshot to update the technical details for the current view.", + "issue.note_details_kept": "Screenshot captured locally. Your edited technical details were kept: check that they still match the current view.", + "issue.note_details_updated": "Technical details updated to match the current view. Screenshot captured locally. Review it before attaching it on GitHub." + }, + "ar": { + "issue.note_changed_while_waiting": "تغيّرت الإعدادات أو النموذج أثناء انتظار المعاينة. أعد التقاط الشاشة لتحديث التفاصيل التقنية للعرض الحالي.", + "issue.note_details_kept": "التُقطت لقطة الشاشة محليًا. احتُفظ بالتفاصيل التقنية التي عدّلتها: تحقّق من أنها لا تزال تطابق العرض الحالي.", + "issue.note_details_updated": "حُدّثت التفاصيل التقنية لتطابق العرض الحالي. التُقطت لقطة الشاشة محليًا. راجعها قبل إرفاقها في GitHub." + }, + "de": { + "issue.note_changed_while_waiting": "Einstellungen oder Modell haben sich geändert, während auf die Vorschau gewartet wurde. Nehmen Sie den Screenshot neu auf, um die technischen Details für die aktuelle Ansicht zu aktualisieren.", + "issue.note_details_kept": "Screenshot lokal aufgenommen. Ihre bearbeiteten technischen Details wurden beibehalten: Prüfen Sie, ob sie noch zur aktuellen Ansicht passen.", + "issue.note_details_updated": "Technische Details an die aktuelle Ansicht angepasst. Screenshot lokal aufgenommen. Prüfen Sie ihn, bevor Sie ihn auf GitHub anhängen." + }, + "he": { + "issue.note_changed_while_waiting": "ההגדרות או המודל השתנו בזמן ההמתנה לתצוגה המקדימה. צלם את המסך מחדש כדי לעדכן את הפרטים הטכניים לתצוגה הנוכחית.", + "issue.note_details_kept": "צילום המסך נלכד מקומית. הפרטים הטכניים שערכת נשמרו: בדוק שהם עדיין תואמים לתצוגה הנוכחית.", + "issue.note_details_updated": "הפרטים הטכניים עודכנו כך שיתאימו לתצוגה הנוכחית. צילום המסך נלכד מקומית. בדוק אותו לפני שתצרף אותו ב־GitHub." + }, + "ja": { + "issue.note_changed_while_waiting": "プレビューを待っている間に設定またはモデルが変更されました。スクリーンショットを撮り直すと、技術的な詳細が現在の表示に合わせて更新されます。", + "issue.note_details_kept": "スクリーンショットをローカルに取得しました。編集した技術的な詳細はそのまま残しました。現在の表示と合っているか確認してください。", + "issue.note_details_updated": "技術的な詳細を現在の表示に合わせて更新しました。スクリーンショットをローカルに取得しました。GitHub に添付する前に確認してください。" + }, + "vi": { + "issue.note_changed_while_waiting": "Cài đặt hoặc mô hình đã thay đổi trong lúc chờ bản xem trước. Hãy chụp lại màn hình để cập nhật chi tiết kỹ thuật cho góc nhìn hiện tại.", + "issue.note_details_kept": "Đã chụp ảnh màn hình trên máy. Chi tiết kỹ thuật bạn đã chỉnh sửa được giữ lại: hãy kiểm tra xem chúng còn khớp với góc nhìn hiện tại không.", + "issue.note_details_updated": "Chi tiết kỹ thuật đã được cập nhật theo góc nhìn hiện tại. Đã chụp ảnh màn hình trên máy. Hãy xem lại trước khi đính kèm trên GitHub." + }, + "zh": { + "issue.note_changed_while_waiting": "等待预览时设置或模型已更改。重新截图即可按当前视图更新技术详情。", + "issue.note_details_kept": "已在本地截图。已保留你编辑过的技术详情:请检查它们是否仍与当前视图一致。", + "issue.note_details_updated": "技术详情已按当前视图更新。已在本地截图。附加到 GitHub 之前请先检查。" + } +} diff --git a/crates/ui-egui/src/issue_report.rs b/crates/ui-egui/src/issue_report.rs index 20fd19058..d6bd0cf01 100644 --- a/crates/ui-egui/src/issue_report.rs +++ b/crates/ui-egui/src/issue_report.rs @@ -135,6 +135,12 @@ pub struct Draft { expected: String, image: Option>, texture: Option, + /// What the technical details are built from, to rebuild them on Retake (#7350). + origin: Origin, + /// [`Draft::body`] as built: when it is unchanged, the user didn't edit it. + built_body: String, + /// Said with the next screenshot: the technical details were rebuilt for it. + rebuilt: Option<&'static str>, pub note: String, source_signature: u64, /// The description has taken the focus it gets on opening; Continue finding it empty clears @@ -155,6 +161,9 @@ impl Draft { expected: String::new(), image: None, texture: None, + origin: Origin::View { error: None }, + built_body: String::new(), + rebuilt: None, note: String::new(), source_signature, focus_requested: false, @@ -192,6 +201,18 @@ impl Draft { } } +enum Origin { + /// [`draft_for`] with the dialog open and the error the report was made with. + View { error: Option }, + /// [`crash_draft`]: the crash report, not the view. + Crash, +} + +/// What a draft's note says after a Retake rebuilt its technical details for the current view. +const NOTE_DETAILS_UPDATED: &str = + "Technical details updated to match the current view. Screenshot captured locally. Review it before attaching it on GitHub."; +const NOTE_DETAILS_KEPT: &str = "Screenshot captured locally. Your edited technical details were kept: check that they still match the current view."; + struct Pending { token: u64, signature: u64, @@ -475,6 +496,9 @@ pub fn draft_for(app: &SolveApp, dialog: Option<&dialogs::Dialog>, error: Option truncate(&mut title, 160); let mut draft = Draft::new(title, body, source_signature(app, dialog)); draft.title_prefix = format!("{label}: "); + // More than the details show of it, so a rebuild shows the same. + draft.origin = Origin::View { error: error.map(|e| limited(e, 8000)) }; + draft.built_body.clone_from(&draft.body); draft } @@ -545,6 +569,7 @@ pub fn crash_draft(report: &serde_json::Value) -> Draft { let mut title = format!("Crash: {}", s("message").lines().next().unwrap_or_default()); truncate(&mut title, 160); let mut draft = Draft::new(title, body, 0); + draft.origin = Origin::Crash; draft.description = limited(&format!("{what}{}.", command.map(|c| format!(" while running `{}`", limited(c, 160))).unwrap_or_default()), MAX_ANSWER); draft @@ -592,17 +617,51 @@ pub fn begin(app: &mut SolveApp, ctx: &egui::Context, dialog: Option<&dialogs::D app.issue_report.cad_focus = ctx.memory(|m| m.focused()); } cancel_capture(app); - app.issue_report.draft = Some(draft_for(app, dialog, error)); - if let Some(draft) = app.issue_report.draft.as_mut() { - let rect = ctx.content_rect(); - let _ = write!( - &mut draft.body, - "\nWindow: {:.0}×{:.0} logical points; {:.2} physical pixels/point\n", - rect.width(), - rect.height(), - ctx.pixels_per_point() - ); - truncate(&mut draft.body, MAX_BODY); + app.issue_report.draft = Some(window_draft(app, ctx, dialog, error)); + capture(app, ctx, dialog); +} + +/// [`draft_for`] and the window it is shown in. +fn window_draft(app: &SolveApp, ctx: &egui::Context, dialog: Option<&dialogs::Dialog>, error: Option<&str>) -> Draft { + let mut draft = draft_for(app, dialog, error); + let rect = ctx.content_rect(); + let _ = write!( + &mut draft.body, + "\nWindow: {:.0}×{:.0} logical points; {:.2} physical pixels/point\n", + rect.width(), + rect.height(), + ctx.pixels_per_point() + ); + truncate(&mut draft.body, MAX_BODY); + draft.built_body.clone_from(&draft.body); + draft +} + +/// Retake: a draft whose design, dialog, selection or preview changed since it was made gets its +/// technical details rebuilt for the current view first, and keeps what was typed (#7350). Edited +/// details stay as edited; a crash draft's come from its crash report and stay too. +fn retake(app: &mut SolveApp, ctx: &egui::Context, dialog: Option<&dialogs::Dialog>) { + let current = source_signature(app, dialog); + let Some(draft) = app.issue_report.draft.as_ref() else { return }; + let changed = draft.source_signature != current; + let fresh = match &draft.origin { + Origin::View { error } if changed => Some(window_draft(app, ctx, dialog, error.as_deref())), + _ => None, + }; + let Some(draft) = app.issue_report.draft.as_mut() else { return }; + draft.rebuilt = None; + if changed { + draft.source_signature = current; + } + if let Some(fresh) = fresh { + if draft.body == draft.built_body { + draft.body.clone_from(&fresh.body); + draft.rebuilt = Some(NOTE_DETAILS_UPDATED); + } else { + draft.rebuilt = Some(NOTE_DETAILS_KEPT); + } + draft.built_body = fresh.body; + draft.title_prefix = fresh.title_prefix; } capture(app, ctx, dialog); } @@ -626,12 +685,11 @@ fn capture_unless_busy(app: &mut SolveApp, ctx: &egui::Context, dialog: Option<& let context = context_signature(app, dialog); let full = app.queued_shots.len() >= 16; let busy = app.preview.busy; + // The screenshot the draft has stays until a new one is taken (#7350). let Some(draft) = app.issue_report.draft.as_mut() else { return }; - draft.image = None; - draft.texture = None; if draft.source_signature != current_source { draft.note = - "Settings or model changed. Close this draft and create a new report to capture matching context; your text is still available to copy." + "Settings or model changed while waiting for the preview. Retake the screenshot to update the technical details for the current view." .into(); return; } @@ -652,8 +710,12 @@ fn capture_unless_busy(app: &mut SolveApp, ctx: &egui::Context, dialog: Option<& PREVIEW_WAIT_MS / 1000.0 ); if !draft.body.contains(line.trim()) { + let built = draft.body == draft.built_body; draft.body.push_str(&line); truncate(&mut draft.body, MAX_BODY); + if built { + draft.built_body.clone_from(&draft.body); + } } } // The form hides for the capture: give its focused field back after it. @@ -784,7 +846,8 @@ pub(crate) fn receive(app: &mut SolveApp, token: u64, image: Arc) { match fitted(image, MAX_IMAGE_PIXELS, max_side) { Some(image) => { draft.image = Some(image); - draft.note = "Screenshot captured locally. Review it before attaching it on GitHub.".into(); + draft.texture = None; + draft.note = draft.rebuilt.take().unwrap_or("Screenshot captured locally. Review it before attaching it on GitHub.").into(); } None => draft.note = "Screenshot dimensions are unsupported. The text draft is still available.".into(), } @@ -846,7 +909,7 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) { app.issue_report.draft = Some(draft); if retake { let dialog = app.dialog.clone(); - capture(app, ctx, dialog.as_ref()); + self::retake(app, ctx, dialog.as_ref()); } } else { cancel_capture(app); @@ -1740,6 +1803,126 @@ mod tests { assert!(draft.image.is_some()); } + fn green(w: usize, h: usize) -> Arc { + Arc::new(ColorImage::new([w, h], vec![egui::Color32::GREEN; w * h])) + } + + /// Retake after the design changed rebuilds the technical details for the current view and + /// keeps what was typed; it used to refuse for the rest of the draft (#7350). + #[test] + fn issue_report_retake_after_a_command_rebuilds_the_details_and_keeps_the_answers() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.run("solid.box", json!({"length":10,"width":10,"height":10,"name":"FirstBox"})).unwrap(); + help::run(&mut h.app, &h.ctx, "report"); + let token = h.app.issue_report.pending.as_ref().unwrap().token; + receive(&mut h.app, token, green(4, 3)); + h.frames(16); + let draft = h.app.issue_report.draft.as_mut().unwrap(); + (draft.title, draft.description, draft.steps, draft.expected) = ("Title".into(), "Happened".into(), "Steps".into(), "Expected".into()); + assert!(draft.body.contains("FirstBox") && !draft.body.contains("SecondBox")); + // An agent runs a command while the report is open. + h.app.run("solid.box", json!({"length":5,"width":5,"height":5,"name":"SecondBox"})).unwrap(); + h.frames(16); + h.step(&json!({"widget":"Retake screenshot"})).unwrap(); + assert!(pending(&h.app), "{}", h.app.issue_report.draft.as_ref().unwrap().note); + let draft = h.app.issue_report.draft.as_ref().unwrap(); + assert!(draft.body.contains("SecondBox") && draft.body.contains(&format!("Revision: {}", h.app.session.revision)), "{}", draft.body); + assert_eq!((&*draft.title, &*draft.description, &*draft.steps, &*draft.expected), ("Title", "Happened", "Steps", "Expected")); + assert_eq!(draft.image.as_ref().unwrap().size, [4, 3], "the old screenshot stays until the new one is taken"); + let token = h.app.issue_report.pending.as_ref().unwrap().token; + receive(&mut h.app, token, green(6, 5)); + let draft = h.app.issue_report.draft.as_ref().unwrap(); + assert_eq!(draft.image.as_ref().unwrap().size, [6, 5]); + assert_eq!(draft.note, NOTE_DETAILS_UPDATED); + // And again: the rebuilt draft is the new baseline. + h.app.run("solid.box", json!({"length":3,"width":3,"height":3,"name":"ThirdBox"})).unwrap(); + let (ctx, dialog) = (h.ctx.clone(), h.app.dialog.clone()); + retake(&mut h.app, &ctx, dialog.as_ref()); + assert!(pending(&h.app) && h.app.issue_report.draft.as_ref().unwrap().body.contains("ThirdBox")); + } + + /// Technical details edited by hand are the user's: Retake keeps them, and says so. + #[test] + fn issue_report_retake_after_a_change_keeps_edited_details() { + let mut app = app(); + let ctx = crate::fonts::test_context(); + begin(&mut app, &ctx, None, None); + let draft = app.issue_report.draft.as_mut().unwrap(); + draft.body = "Details with the private parts removed".into(); + draft.description = "Happened".into(); + app.run("solid.box", json!({"length":5,"width":5,"height":5,"body_name":"SecondBox"})).unwrap(); + retake(&mut app, &ctx, None); + assert!(pending(&app)); + let token = app.issue_report.pending.as_ref().unwrap().token; + receive(&mut app, token, green(4, 3)); + let draft = app.issue_report.draft.as_ref().unwrap(); + assert_eq!((&*draft.body, &*draft.description), ("Details with the private parts removed", "Happened")); + assert!(draft.image.is_some()); + assert_eq!(draft.note, NOTE_DETAILS_KEPT); + } + + /// A crash draft's details come from its crash report: Retake keeps them and takes the + /// screenshot, also with a feature dialog open. + #[test] + fn issue_report_retake_of_a_crash_draft_keeps_its_body() { + let mut app = app(); + combine(&mut app); + let ctx = crate::fonts::test_context(); + begin_crash(&mut app, &ctx, &json!({"kind":"command_panic","message":"synthetic panic","id":"crash-1"})); + let body = app.issue_report.draft.as_ref().unwrap().body.clone(); + assert!(body.contains("synthetic panic")); + app.session.selection = vec![Sel::Feature { id: 1 }]; + let dialog = app.dialog.clone(); + retake(&mut app, &ctx, dialog.as_ref()); + assert!(pending(&app), "{}", app.issue_report.draft.as_ref().unwrap().note); + let token = app.issue_report.pending.as_ref().unwrap().token; + receive(&mut app, token, green(4, 3)); + let draft = app.issue_report.draft.as_ref().unwrap(); + assert_eq!(draft.body, body); + assert!(draft.image.is_some() && draft.note.starts_with("Screenshot captured locally"), "{}", draft.note); + } + + /// A capture that is refused, waits, times out, comes back stale or malformed keeps the + /// screenshot the draft has; only a new frame replaces it (#7350). + #[test] + fn issue_report_failed_capture_keeps_the_screenshot() { + let mut app = app(); + let ctx = crate::fonts::test_context(); + begin(&mut app, &ctx, None, None); + let token = app.issue_report.pending.as_ref().unwrap().token; + receive(&mut app, token, green(4, 3)); + let kept = |app: &SolveApp| app.issue_report.draft.as_ref().unwrap().image.as_ref().map(|i| i.size); + // Waits for the preview, then is refused: the selection changed meanwhile. + app.preview.busy = true; + retake(&mut app, &ctx, None); + assert!(app.issue_report.waiting.is_some()); + assert_eq!(kept(&app), Some([4, 3])); + app.session.selection = vec![Sel::Feature { id: 1 }]; + app.preview.busy = false; + tick(&mut app, &ctx); + assert!(!pending(&app) && app.issue_report.draft.as_ref().unwrap().note.contains("Settings or model changed")); + assert_eq!(kept(&app), Some([4, 3]), "refused"); + retake(&mut app, &ctx, None); + app.issue_report.pending.as_mut().unwrap().deadline = -1.0; + tick(&mut app, &ctx); + assert!(app.issue_report.draft.as_ref().unwrap().note.contains("No app frame")); + assert_eq!(kept(&app), Some([4, 3]), "timed out"); + retake(&mut app, &ctx, None); + let token = app.issue_report.pending.as_ref().unwrap().token; + app.cam.distance *= 2.0; + receive(&mut app, token, green(6, 5)); + assert_eq!(kept(&app), Some([4, 3]), "stale"); + retake(&mut app, &ctx, None); + let token = app.issue_report.pending.as_ref().unwrap().token; + receive(&mut app, token, Arc::new(ColorImage::new([0, 0], vec![]))); + assert_eq!(kept(&app), Some([4, 3]), "malformed"); + retake(&mut app, &ctx, None); + let token = app.issue_report.pending.as_ref().unwrap().token; + receive(&mut app, token, green(6, 5)); + assert_eq!(kept(&app), Some([6, 5])); + } + #[test] fn issue_report_capture_accepts_only_its_matching_unchanged_frame() { let mut app = app(); From 1aaa2cdc2ad46087f87b127dd4521170940e14b4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 17:03:02 +0000 Subject: [PATCH 056/102] Regenerate generated files and fold pending files [skip ci] --- assets/locales/ar.json | 1 + assets/locales/de.json | 1 + assets/locales/en.json | 1 + assets/locales/he.json | 1 + assets/locales/ja.json | 1 + .../locales/pending/spline-insert-point.json | 23 ------------------- assets/locales/vi.json | 1 + assets/locales/zh.json | 1 + docs/features.md | 1 + 9 files changed, 8 insertions(+), 23 deletions(-) delete mode 100644 assets/locales/pending/spline-insert-point.json diff --git a/assets/locales/ar.json b/assets/locales/ar.json index cff581615..d1df2e8b1 100644 --- a/assets/locales/ar.json +++ b/assets/locales/ar.json @@ -1009,6 +1009,7 @@ "cmd.sketch_spline_control_point": "منحنى شريحي بنقاط تحكم", "cmd.sketch_spline_control_point_5": "منحنى شريحي بنقاط تحكم (الدرجة 5)", "cmd.sketch_spline_fit_point": "منحنى شريحي بنقاط ملاءمة", + "cmd.sketch_spline_insert_point": "إضافة نقطة إلى المنحنى الشريحي", "cmd.sketch_spun_profile": "مقطع دوراني", "cmd.sketch_toggle_driven": "تبديل البُعد المُشتق", "cmd.sketch_transform": "تحويل", diff --git a/assets/locales/de.json b/assets/locales/de.json index dbe5921bf..8a7e989c8 100644 --- a/assets/locales/de.json +++ b/assets/locales/de.json @@ -947,6 +947,7 @@ "cmd.sketch_spline_control_point": "Spline mit Kontrollpunkten", "cmd.sketch_spline_control_point_5": "Spline mit Kontrollpunkten (Grad 5)", "cmd.sketch_spline_fit_point": "Spline mit Fitpunkten", + "cmd.sketch_spline_insert_point": "Splinepunkt hinzufügen", "cmd.sketch_spun_profile": "Gedrehtes Profil", "cmd.sketch_toggle_driven": "Abhängiges Maß umschalten", "cmd.sketch_transform": "Transformieren", diff --git a/assets/locales/en.json b/assets/locales/en.json index 8345b70d7..7dad02416 100644 --- a/assets/locales/en.json +++ b/assets/locales/en.json @@ -1009,6 +1009,7 @@ "cmd.sketch_spline_control_point": "Control Point Spline", "cmd.sketch_spline_control_point_5": "Control Point Spline (Degree 5)", "cmd.sketch_spline_fit_point": "Fit Point Spline", + "cmd.sketch_spline_insert_point": "Add Spline Point", "cmd.sketch_spun_profile": "Spun Profile", "cmd.sketch_toggle_driven": "Toggle Driven Dimension", "cmd.sketch_transform": "Transform", diff --git a/assets/locales/he.json b/assets/locales/he.json index 0cb294b8b..29bbcf472 100644 --- a/assets/locales/he.json +++ b/assets/locales/he.json @@ -1009,6 +1009,7 @@ "cmd.sketch_spline_control_point": "ספליין נקודות בקרה", "cmd.sketch_spline_control_point_5": "ספליין נקודות בקרה (מעלה 5)", "cmd.sketch_spline_fit_point": "ספליין נקודות התאמה", + "cmd.sketch_spline_insert_point": "הוספת נקודה לספליין", "cmd.sketch_spun_profile": "פרופיל סיבובי", "cmd.sketch_toggle_driven": "מעבר בין מידה מונעת למניעה", "cmd.sketch_transform": "התמרה", diff --git a/assets/locales/ja.json b/assets/locales/ja.json index 1d02c1cc0..005b9a003 100644 --- a/assets/locales/ja.json +++ b/assets/locales/ja.json @@ -1009,6 +1009,7 @@ "cmd.sketch_spline_control_point": "制御点スプライン", "cmd.sketch_spline_control_point_5": "制御点スプライン (次数 5)", "cmd.sketch_spline_fit_point": "通過点スプライン", + "cmd.sketch_spline_insert_point": "スプライン点を追加", "cmd.sketch_spun_profile": "回転プロファイル", "cmd.sketch_toggle_driven": "従動寸法の切り替え", "cmd.sketch_transform": "変形", diff --git a/assets/locales/pending/spline-insert-point.json b/assets/locales/pending/spline-insert-point.json deleted file mode 100644 index 26f4180b8..000000000 --- a/assets/locales/pending/spline-insert-point.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "en": { - "cmd.sketch_spline_insert_point": "Add Spline Point" - }, - "ar": { - "cmd.sketch_spline_insert_point": "إضافة نقطة إلى المنحنى الشريحي" - }, - "de": { - "cmd.sketch_spline_insert_point": "Splinepunkt hinzufügen" - }, - "he": { - "cmd.sketch_spline_insert_point": "הוספת נקודה לספליין" - }, - "ja": { - "cmd.sketch_spline_insert_point": "スプライン点を追加" - }, - "vi": { - "cmd.sketch_spline_insert_point": "Thêm điểm vào đường cong Spline" - }, - "zh": { - "cmd.sketch_spline_insert_point": "添加样条曲线点" - } -} diff --git a/assets/locales/vi.json b/assets/locales/vi.json index 60a891e92..6cbe0ae60 100644 --- a/assets/locales/vi.json +++ b/assets/locales/vi.json @@ -1009,6 +1009,7 @@ "cmd.sketch_spline_control_point": "Đường cong Spline qua điểm điều khiển", "cmd.sketch_spline_control_point_5": "Đường cong Spline qua điểm điều khiển (Bậc 5)", "cmd.sketch_spline_fit_point": "Đường cong Spline qua các điểm", + "cmd.sketch_spline_insert_point": "Thêm điểm vào đường cong Spline", "cmd.sketch_spun_profile": "Biên dạng xoay tròn (Spun Profile)", "cmd.sketch_toggle_driven": "Chuyển đổi kích thước tham chiếu (Driven Dimension)", "cmd.sketch_transform": "Biến đổi", diff --git a/assets/locales/zh.json b/assets/locales/zh.json index c3c8f1938..71e87d1c1 100644 --- a/assets/locales/zh.json +++ b/assets/locales/zh.json @@ -1009,6 +1009,7 @@ "cmd.sketch_spline_control_point": "控制点样条曲线", "cmd.sketch_spline_control_point_5": "控制点样条曲线(5 次)", "cmd.sketch_spline_fit_point": "拟合点样条曲线", + "cmd.sketch_spline_insert_point": "添加样条曲线点", "cmd.sketch_spun_profile": "旋转轮廓", "cmd.sketch_toggle_driven": "切换被驱动尺寸", "cmd.sketch_transform": "变换", diff --git a/docs/features.md b/docs/features.md index 46de6a096..ee3a857cd 100644 --- a/docs/features.md +++ b/docs/features.md @@ -109,6 +109,7 @@ SolidCraft's commands by area, generated by `cargo xtask features` from the comm | Control Point Spline | `sketch.spline.control_point` | SKETCH › CREATE | | Control Point Spline (Degree 5) | `sketch.spline.control_point_5` | SKETCH › CREATE | | Fit Point Spline | `sketch.spline.fit_point` | SKETCH › CREATE | +| Add Spline Point | `sketch.spline.insert_point` | – | | 3D Spline | `sketch.spline3d` | – | | Spun Profile | `sketch.spun_profile` | SKETCH › CREATE | | Text | `sketch.text` | SKETCH › CREATE | From c5fbf6650cede673aa223e0f601acebe081efdde Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 17:09:41 +0000 Subject: [PATCH 057/102] Regenerate generated files and fold pending files [skip ci] --- assets/locales/ar.json | 7 ++++ assets/locales/de.json | 7 ++++ assets/locales/en.json | 7 ++++ assets/locales/he.json | 7 ++++ assets/locales/it.json | 2 + assets/locales/ja.json | 7 ++++ assets/locales/ko.json | 4 ++ .../locales/pending/material-selection.json | 38 ------------------- .../locales/pending/repeat-last-command.json | 34 ----------------- .../pending/report-retake-rebuilds.json | 37 ------------------ assets/locales/vi.json | 7 ++++ assets/locales/zh.json | 7 ++++ docs/features.md | 1 + 13 files changed, 56 insertions(+), 109 deletions(-) delete mode 100644 assets/locales/pending/material-selection.json delete mode 100644 assets/locales/pending/repeat-last-command.json delete mode 100644 assets/locales/pending/report-retake-rebuilds.json diff --git a/assets/locales/ar.json b/assets/locales/ar.json index d1df2e8b1..eddd132ae 100644 --- a/assets/locales/ar.json +++ b/assets/locales/ar.json @@ -769,6 +769,7 @@ "cmd.document_revision": "مراجعة التصميم", "cmd.document_units": "تغيير وحدات التصميم", "cmd.edit_checkpoint": "نقطة حفظ", + "cmd.edit_repeat": "تكرار آخر أمر", "cmd.edit_restore_checkpoint": "استعادة نقطة الحفظ", "cmd.engine_commands": "قائمة الأوامر", "cmd.engine_describe": "وصف الأمر", @@ -1291,6 +1292,9 @@ "install.steps_intro": "يثبّت Safari تطبيقات الويب من قوائمه الخاصة:", "install.title": "تثبيت SolidCraft", "issue.body_label": "نص البلاغ", + "issue.note_changed_while_waiting": "تغيّرت الإعدادات أو النموذج أثناء انتظار المعاينة. أعد التقاط الشاشة لتحديث التفاصيل التقنية للعرض الحالي.", + "issue.note_details_kept": "التُقطت لقطة الشاشة محليًا. احتُفظ بالتفاصيل التقنية التي عدّلتها: تحقّق من أنها لا تزال تطابق العرض الحالي.", + "issue.note_details_updated": "حُدّثت التفاصيل التقنية لتطابق العرض الحالي. التُقطت لقطة الشاشة محليًا. راجعها قبل إرفاقها في GitHub.", "issue.note_image_copied": "الصق الصورة في مسودة GitHub، أو احفظ ملف PNG إن لم يتوفر نسخ الصور.", "issue.note_opened": "راجع مسودة GitHub وأرفق لقطة الشاشة. زر Submit new issue في GitHub ينشرها.", "issue.note_opened_copied": "نُسخ البلاغ. الصقه في مسودة GitHub، وأرفق لقطة الشاشة، ثم انقر Submit new issue في GitHub.", @@ -1357,6 +1361,8 @@ "material.editor.unknown_card": "الخصائص الهندسية غير معروفة. قد يحتفظ الحفظ بالكثافة المعيّنة والمظهر الحالي فقط.", "material.editor.user_supplied": "من المستخدم", "material.editor.wood": "خشب", + "material.selection.choose": "اختر مادة", + "material.selection.mixed": "مواد مختلفة", "measure.at": "عند", "measure.item": "العنصر {number}", "messages.ago_h": "قبل {n} ساعة", @@ -3100,6 +3106,7 @@ "ui.render": "التصيير", "ui.renderer": "محرك التصيير", "ui.repeat": "تكرار", + "ui.repeat_nothing": "لا يوجد ما يُكرَّر بعد: ابدأ أداة أو مربع حوار أولًا.", "ui.replace_with_link_done": "أصبحت النسخ الآن مواضع للتصميم المرتبط.", "ui.report_a_bug": "الإبلاغ عن خطأ", "ui.reset": "إعادة تعيين", diff --git a/assets/locales/de.json b/assets/locales/de.json index 8a7e989c8..d226f5db8 100644 --- a/assets/locales/de.json +++ b/assets/locales/de.json @@ -730,6 +730,7 @@ "cmd.document_revision": "Konstruktionsrevision", "cmd.document_units": "Einheiten der Konstruktion ändern", "cmd.edit_checkpoint": "Prüfpunkt", + "cmd.edit_repeat": "Letzten Befehl wiederholen", "cmd.edit_restore_checkpoint": "Prüfpunkt wiederherstellen", "cmd.engine_commands": "Befehle auflisten", "cmd.engine_describe": "Befehl beschreiben", @@ -1163,6 +1164,9 @@ "install.steps_intro": "Safari installiert Web-Apps über seine eigenen Menüs:", "install.title": "SolidCraft installieren", "issue.body_label": "Berichtstext", + "issue.note_changed_while_waiting": "Einstellungen oder Modell haben sich geändert, während auf die Vorschau gewartet wurde. Nehmen Sie den Screenshot neu auf, um die technischen Details für die aktuelle Ansicht zu aktualisieren.", + "issue.note_details_kept": "Screenshot lokal aufgenommen. Ihre bearbeiteten technischen Details wurden beibehalten: Prüfen Sie, ob sie noch zur aktuellen Ansicht passen.", + "issue.note_details_updated": "Technische Details an die aktuelle Ansicht angepasst. Screenshot lokal aufgenommen. Prüfen Sie ihn, bevor Sie ihn auf GitHub anhängen.", "issue.note_image_copied": "Fügen Sie das Bild in den GitHub-Entwurf ein oder speichern Sie das PNG, falls das Kopieren von Bildern nicht verfügbar ist.", "issue.note_opened": "Prüfen Sie den GitHub-Entwurf und hängen Sie den Screenshot an. Die Schaltfläche Submit new issue von GitHub veröffentlicht ihn.", "issue.note_opened_copied": "Bericht kopiert. Fügen Sie ihn in den GitHub-Entwurf ein, hängen Sie den Screenshot an und klicken Sie auf GitHub auf Submit new issue.", @@ -1186,6 +1190,8 @@ "manage.rules_hint": "Wählen Sie eine Regel zum Bearbeiten oder erstellen Sie eine neue. Bestätigen Sie, um die Regel zu speichern.", "material.editor.axes_numeric": "1 / 2 / 3", "material.editor.axes_wood": "L / R / T", + "material.selection.choose": "Material auswählen", + "material.selection.mixed": "Unterschiedliche Materialien", "measure.at": "Bei", "measure.item": "Element {number}", "messages.ago_h": "vor {n} Std.", @@ -2216,6 +2222,7 @@ "ui.render": "Rendern", "ui.renderer": "Renderer", "ui.repeat": "Wiederholen", + "ui.repeat_nothing": "Noch nichts zu wiederholen: Starten Sie zuerst ein Werkzeug oder einen Dialog.", "ui.replace_with_link_done": "Die Kopien sind jetzt Platzierungen des verknüpften Designs.", "ui.report_a_bug": "Fehler melden", "ui.reset": "Zurücksetzen", diff --git a/assets/locales/en.json b/assets/locales/en.json index 7dad02416..26542b269 100644 --- a/assets/locales/en.json +++ b/assets/locales/en.json @@ -769,6 +769,7 @@ "cmd.document_revision": "Design Revision", "cmd.document_units": "Change Design Units", "cmd.edit_checkpoint": "Checkpoint", + "cmd.edit_repeat": "Repeat Last Command", "cmd.edit_restore_checkpoint": "Restore Checkpoint", "cmd.engine_commands": "List Commands", "cmd.engine_describe": "Describe Command", @@ -1291,6 +1292,9 @@ "install.steps_intro": "Safari installs web apps from its own menus:", "install.title": "Install SolidCraft", "issue.body_label": "Report text", + "issue.note_changed_while_waiting": "Settings or model changed while waiting for the preview. Retake the screenshot to update the technical details for the current view.", + "issue.note_details_kept": "Screenshot captured locally. Your edited technical details were kept: check that they still match the current view.", + "issue.note_details_updated": "Technical details updated to match the current view. Screenshot captured locally. Review it before attaching it on GitHub.", "issue.note_image_copied": "Paste the image into the GitHub draft, or save the PNG if image copying is unavailable.", "issue.note_opened": "Review the GitHub draft and attach the screenshot. GitHub's Submit new issue button publishes it.", "issue.note_opened_copied": "Report copied. Paste into the GitHub draft, attach the screenshot, then click Submit new issue on GitHub.", @@ -1357,6 +1361,8 @@ "material.editor.unknown_card": "Engineering properties are unknown. Save may keep only the assigned density and existing appearance.", "material.editor.user_supplied": "User supplied", "material.editor.wood": "Wood", + "material.selection.choose": "Choose a material", + "material.selection.mixed": "Different materials", "measure.at": "At", "measure.item": "Item {number}", "messages.ago_h": "{n} h ago", @@ -3100,6 +3106,7 @@ "ui.render": "Render", "ui.renderer": "Renderer", "ui.repeat": "Repeat", + "ui.repeat_nothing": "Nothing to repeat yet: start a tool or dialog first.", "ui.replace_with_link_done": "The copies are now placements of the linked design.", "ui.report_a_bug": "Report a bug", "ui.reset": "Reset", diff --git a/assets/locales/he.json b/assets/locales/he.json index 29bbcf472..9ebba361d 100644 --- a/assets/locales/he.json +++ b/assets/locales/he.json @@ -769,6 +769,7 @@ "cmd.document_revision": "גרסת התכן", "cmd.document_units": "שינוי יחידות התכן", "cmd.edit_checkpoint": "נקודת שמירה", + "cmd.edit_repeat": "חזרה על הפקודה האחרונה", "cmd.edit_restore_checkpoint": "שחזור נקודת שמירה", "cmd.engine_commands": "רשימת פקודות", "cmd.engine_describe": "תיאור פקודה", @@ -1291,6 +1292,9 @@ "install.steps_intro": "Safari מתקין יישומי רשת מהתפריטים שלו:", "install.title": "התקנת SolidCraft", "issue.body_label": "טקסט הדוח", + "issue.note_changed_while_waiting": "ההגדרות או המודל השתנו בזמן ההמתנה לתצוגה המקדימה. צלם את המסך מחדש כדי לעדכן את הפרטים הטכניים לתצוגה הנוכחית.", + "issue.note_details_kept": "צילום המסך נלכד מקומית. הפרטים הטכניים שערכת נשמרו: בדוק שהם עדיין תואמים לתצוגה הנוכחית.", + "issue.note_details_updated": "הפרטים הטכניים עודכנו כך שיתאימו לתצוגה הנוכחית. צילום המסך נלכד מקומית. בדוק אותו לפני שתצרף אותו ב־GitHub.", "issue.note_image_copied": "יש להדביק את התמונה בטיוטה ב־GitHub, או לשמור את קובץ ה־PNG אם העתקת תמונות אינה זמינה.", "issue.note_opened": "יש לבדוק את הטיוטה ב־GitHub ולצרף את צילום המסך. הלחצן Submit new issue ב־GitHub מפרסם אותה.", "issue.note_opened_copied": "הדוח הועתק. יש להדביק אותו בטיוטה ב־GitHub, לצרף את צילום המסך ואז ללחוץ על Submit new issue ב־GitHub.", @@ -1357,6 +1361,8 @@ "material.editor.unknown_card": "התכונות ההנדסיות אינן ידועות. ייתכן שהשמירה תשמור רק את הצפיפות המוקצית ואת המראה הקיים.", "material.editor.user_supplied": "סופק על ידי המשתמש", "material.editor.wood": "עץ", + "material.selection.choose": "בחירת חומר", + "material.selection.mixed": "חומרים שונים", "measure.at": "מיקום", "measure.item": "פריט {number}", "messages.ago_h": "לפני {n} שע'", @@ -3100,6 +3106,7 @@ "ui.render": "הדמיה", "ui.renderer": "מנוע גרפי", "ui.repeat": "חזרה", + "ui.repeat_nothing": "אין עדיין מה לחזור עליו: התחל קודם כלי או תיבת דו־שיח.", "ui.replace_with_link_done": "העותקים הם עכשיו מיקומים של התכן המקושר.", "ui.report_a_bug": "דיווח על באג", "ui.reset": "איפוס", diff --git a/assets/locales/it.json b/assets/locales/it.json index 0044f9e7f..9a9c2fbef 100644 --- a/assets/locales/it.json +++ b/assets/locales/it.json @@ -980,6 +980,8 @@ "manage.material_hint": "Seleziona i corpi e scegli il loro materiale fisico.", "manage.parameters_hint": "Modifica espressioni e unità. Le modifiche vengono applicate premendo Invio o uscendo da un campo.", "manage.rules_hint": "Scegli una regola da modificare o creane una nuova. Conferma per salvare la regola.", + "material.selection.choose": "Scegli un materiale", + "material.selection.mixed": "Materiali diversi", "measure.at": "In", "measure.item": "Elemento {number}", "messages.ago_h": "{n} h fa", diff --git a/assets/locales/ja.json b/assets/locales/ja.json index 005b9a003..9c22fde70 100644 --- a/assets/locales/ja.json +++ b/assets/locales/ja.json @@ -769,6 +769,7 @@ "cmd.document_revision": "デザイン リビジョン", "cmd.document_units": "デザインの単位を変更", "cmd.edit_checkpoint": "チェックポイント", + "cmd.edit_repeat": "最後のコマンドを繰り返す", "cmd.edit_restore_checkpoint": "チェックポイントを復元", "cmd.engine_commands": "コマンドを一覧表示", "cmd.engine_describe": "コマンドの詳細を表示", @@ -1291,6 +1292,9 @@ "install.steps_intro": "Safari では、Web アプリを Safari 自身のメニューからインストールします:", "install.title": "SolidCraft をインストール", "issue.body_label": "レポート本文", + "issue.note_changed_while_waiting": "プレビューを待っている間に設定またはモデルが変更されました。スクリーンショットを撮り直すと、技術的な詳細が現在の表示に合わせて更新されます。", + "issue.note_details_kept": "スクリーンショットをローカルに取得しました。編集した技術的な詳細はそのまま残しました。現在の表示と合っているか確認してください。", + "issue.note_details_updated": "技術的な詳細を現在の表示に合わせて更新しました。スクリーンショットをローカルに取得しました。GitHub に添付する前に確認してください。", "issue.note_image_copied": "GitHubの下書きに画像を貼り付けてください。画像をコピーできない場合はPNGを保存してください。", "issue.note_opened": "GitHubの下書きを確認し、スクリーンショットを添付してください。GitHubのSubmit new issueボタンで公開されます。", "issue.note_opened_copied": "レポートをコピーしました。GitHubの下書きに貼り付け、スクリーンショットを添付してから、GitHubでSubmit new issueをクリックしてください。", @@ -1357,6 +1361,8 @@ "material.editor.unknown_card": "工学特性は不明です。割り当て密度と既存の外観だけでも保存できます。", "material.editor.user_supplied": "ユーザー提供", "material.editor.wood": "木材", + "material.selection.choose": "材料を選択", + "material.selection.mixed": "異なる材料", "measure.at": "位置", "measure.item": "項目 {number}", "messages.ago_h": "{n} 時間前", @@ -3100,6 +3106,7 @@ "ui.render": "レンダリング", "ui.renderer": "レンダラー", "ui.repeat": "繰り返し", + "ui.repeat_nothing": "まだ繰り返すものがありません。先にツールかダイアログを開始してください。", "ui.replace_with_link_done": "コピーはリンクされたデザインの配置になりました。", "ui.report_a_bug": "不具合を報告", "ui.reset": "リセット", diff --git a/assets/locales/ko.json b/assets/locales/ko.json index dc84f11ed..b4f278b61 100644 --- a/assets/locales/ko.json +++ b/assets/locales/ko.json @@ -677,6 +677,7 @@ "cmd.document_metadata_set": "설계 속성 변경", "cmd.document_units": "설계 단위 변경", "cmd.edit_checkpoint": "체크포인트", + "cmd.edit_repeat": "마지막 명령 반복", "cmd.edit_restore_checkpoint": "체크포인트 복원", "cmd.engine_commands": "명령 목록", "cmd.engine_describe": "명령 설명", @@ -1136,6 +1137,8 @@ "manage.material_hint": "바디를 선택하고 물리 재질을 지정하세요.", "manage.parameters_hint": "표현식과 단위를 편집하세요. Enter를 누르거나 필드를 벗어나면 변경 사항이 적용됩니다.", "manage.rules_hint": "편집할 규칙을 선택하거나 새 규칙을 만드세요. 확인하면 규칙이 저장됩니다.", + "material.selection.choose": "재질 선택", + "material.selection.mixed": "서로 다른 재질", "measure.at": "위치", "measure.item": "항목 {number}", "messages.ago_h": "{n}시간 전", @@ -2290,6 +2293,7 @@ "ui.render": "렌더", "ui.renderer": "렌더러", "ui.repeat": "반복", + "ui.repeat_nothing": "아직 반복할 것이 없습니다. 먼저 도구나 대화 상자를 시작하세요.", "ui.report_a_bug": "버그 신고", "ui.reset": "재설정", "ui.reset_all": "모두 재설정", diff --git a/assets/locales/pending/material-selection.json b/assets/locales/pending/material-selection.json deleted file mode 100644 index b1661a7c0..000000000 --- a/assets/locales/pending/material-selection.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "en": { - "material.selection.choose": "Choose a material", - "material.selection.mixed": "Different materials" - }, - "it": { - "material.selection.choose": "Scegli un materiale", - "material.selection.mixed": "Materiali diversi" - }, - "ja": { - "material.selection.choose": "材料を選択", - "material.selection.mixed": "異なる材料" - }, - "zh": { - "material.selection.choose": "选择材料", - "material.selection.mixed": "不同材料" - }, - "ar": { - "material.selection.choose": "اختر مادة", - "material.selection.mixed": "مواد مختلفة" - }, - "he": { - "material.selection.choose": "בחירת חומר", - "material.selection.mixed": "חומרים שונים" - }, - "vi": { - "material.selection.choose": "Chọn vật liệu", - "material.selection.mixed": "Các vật liệu khác nhau" - }, - "de": { - "material.selection.choose": "Material auswählen", - "material.selection.mixed": "Unterschiedliche Materialien" - }, - "ko": { - "material.selection.choose": "재질 선택", - "material.selection.mixed": "서로 다른 재질" - } -} diff --git a/assets/locales/pending/repeat-last-command.json b/assets/locales/pending/repeat-last-command.json deleted file mode 100644 index 00d1d85f2..000000000 --- a/assets/locales/pending/repeat-last-command.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "en": { - "cmd.edit_repeat": "Repeat Last Command", - "ui.repeat_nothing": "Nothing to repeat yet: start a tool or dialog first." - }, - "ar": { - "cmd.edit_repeat": "تكرار آخر أمر", - "ui.repeat_nothing": "لا يوجد ما يُكرَّر بعد: ابدأ أداة أو مربع حوار أولًا." - }, - "de": { - "cmd.edit_repeat": "Letzten Befehl wiederholen", - "ui.repeat_nothing": "Noch nichts zu wiederholen: Starten Sie zuerst ein Werkzeug oder einen Dialog." - }, - "he": { - "cmd.edit_repeat": "חזרה על הפקודה האחרונה", - "ui.repeat_nothing": "אין עדיין מה לחזור עליו: התחל קודם כלי או תיבת דו־שיח." - }, - "ja": { - "cmd.edit_repeat": "最後のコマンドを繰り返す", - "ui.repeat_nothing": "まだ繰り返すものがありません。先にツールかダイアログを開始してください。" - }, - "ko": { - "cmd.edit_repeat": "마지막 명령 반복", - "ui.repeat_nothing": "아직 반복할 것이 없습니다. 먼저 도구나 대화 상자를 시작하세요." - }, - "vi": { - "cmd.edit_repeat": "Lặp lại lệnh trước", - "ui.repeat_nothing": "Chưa có gì để lặp lại: hãy bắt đầu một công cụ hoặc hộp thoại trước." - }, - "zh": { - "cmd.edit_repeat": "重复上一个命令", - "ui.repeat_nothing": "还没有可重复的操作:请先启动一个工具或对话框。" - } -} diff --git a/assets/locales/pending/report-retake-rebuilds.json b/assets/locales/pending/report-retake-rebuilds.json deleted file mode 100644 index 7b69f1b11..000000000 --- a/assets/locales/pending/report-retake-rebuilds.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "en": { - "issue.note_changed_while_waiting": "Settings or model changed while waiting for the preview. Retake the screenshot to update the technical details for the current view.", - "issue.note_details_kept": "Screenshot captured locally. Your edited technical details were kept: check that they still match the current view.", - "issue.note_details_updated": "Technical details updated to match the current view. Screenshot captured locally. Review it before attaching it on GitHub." - }, - "ar": { - "issue.note_changed_while_waiting": "تغيّرت الإعدادات أو النموذج أثناء انتظار المعاينة. أعد التقاط الشاشة لتحديث التفاصيل التقنية للعرض الحالي.", - "issue.note_details_kept": "التُقطت لقطة الشاشة محليًا. احتُفظ بالتفاصيل التقنية التي عدّلتها: تحقّق من أنها لا تزال تطابق العرض الحالي.", - "issue.note_details_updated": "حُدّثت التفاصيل التقنية لتطابق العرض الحالي. التُقطت لقطة الشاشة محليًا. راجعها قبل إرفاقها في GitHub." - }, - "de": { - "issue.note_changed_while_waiting": "Einstellungen oder Modell haben sich geändert, während auf die Vorschau gewartet wurde. Nehmen Sie den Screenshot neu auf, um die technischen Details für die aktuelle Ansicht zu aktualisieren.", - "issue.note_details_kept": "Screenshot lokal aufgenommen. Ihre bearbeiteten technischen Details wurden beibehalten: Prüfen Sie, ob sie noch zur aktuellen Ansicht passen.", - "issue.note_details_updated": "Technische Details an die aktuelle Ansicht angepasst. Screenshot lokal aufgenommen. Prüfen Sie ihn, bevor Sie ihn auf GitHub anhängen." - }, - "he": { - "issue.note_changed_while_waiting": "ההגדרות או המודל השתנו בזמן ההמתנה לתצוגה המקדימה. צלם את המסך מחדש כדי לעדכן את הפרטים הטכניים לתצוגה הנוכחית.", - "issue.note_details_kept": "צילום המסך נלכד מקומית. הפרטים הטכניים שערכת נשמרו: בדוק שהם עדיין תואמים לתצוגה הנוכחית.", - "issue.note_details_updated": "הפרטים הטכניים עודכנו כך שיתאימו לתצוגה הנוכחית. צילום המסך נלכד מקומית. בדוק אותו לפני שתצרף אותו ב־GitHub." - }, - "ja": { - "issue.note_changed_while_waiting": "プレビューを待っている間に設定またはモデルが変更されました。スクリーンショットを撮り直すと、技術的な詳細が現在の表示に合わせて更新されます。", - "issue.note_details_kept": "スクリーンショットをローカルに取得しました。編集した技術的な詳細はそのまま残しました。現在の表示と合っているか確認してください。", - "issue.note_details_updated": "技術的な詳細を現在の表示に合わせて更新しました。スクリーンショットをローカルに取得しました。GitHub に添付する前に確認してください。" - }, - "vi": { - "issue.note_changed_while_waiting": "Cài đặt hoặc mô hình đã thay đổi trong lúc chờ bản xem trước. Hãy chụp lại màn hình để cập nhật chi tiết kỹ thuật cho góc nhìn hiện tại.", - "issue.note_details_kept": "Đã chụp ảnh màn hình trên máy. Chi tiết kỹ thuật bạn đã chỉnh sửa được giữ lại: hãy kiểm tra xem chúng còn khớp với góc nhìn hiện tại không.", - "issue.note_details_updated": "Chi tiết kỹ thuật đã được cập nhật theo góc nhìn hiện tại. Đã chụp ảnh màn hình trên máy. Hãy xem lại trước khi đính kèm trên GitHub." - }, - "zh": { - "issue.note_changed_while_waiting": "等待预览时设置或模型已更改。重新截图即可按当前视图更新技术详情。", - "issue.note_details_kept": "已在本地截图。已保留你编辑过的技术详情:请检查它们是否仍与当前视图一致。", - "issue.note_details_updated": "技术详情已按当前视图更新。已在本地截图。附加到 GitHub 之前请先检查。" - } -} diff --git a/assets/locales/vi.json b/assets/locales/vi.json index 6cbe0ae60..05ff32de4 100644 --- a/assets/locales/vi.json +++ b/assets/locales/vi.json @@ -769,6 +769,7 @@ "cmd.document_revision": "Phiên bản thiết kế", "cmd.document_units": "Thay đổi đơn vị thiết kế", "cmd.edit_checkpoint": "Điểm kiểm tra (Checkpoint)", + "cmd.edit_repeat": "Lặp lại lệnh trước", "cmd.edit_restore_checkpoint": "Khôi phục điểm kiểm tra", "cmd.engine_commands": "Danh sách lệnh hệ thống", "cmd.engine_describe": "Mô tả lệnh", @@ -1291,6 +1292,9 @@ "install.steps_intro": "Safari cài đặt ứng dụng web từ menu của chính nó:", "install.title": "Cài đặt SolidCraft", "issue.body_label": "Nội dung báo cáo", + "issue.note_changed_while_waiting": "Cài đặt hoặc mô hình đã thay đổi trong lúc chờ bản xem trước. Hãy chụp lại màn hình để cập nhật chi tiết kỹ thuật cho góc nhìn hiện tại.", + "issue.note_details_kept": "Đã chụp ảnh màn hình trên máy. Chi tiết kỹ thuật bạn đã chỉnh sửa được giữ lại: hãy kiểm tra xem chúng còn khớp với góc nhìn hiện tại không.", + "issue.note_details_updated": "Chi tiết kỹ thuật đã được cập nhật theo góc nhìn hiện tại. Đã chụp ảnh màn hình trên máy. Hãy xem lại trước khi đính kèm trên GitHub.", "issue.note_image_copied": "Hãy dán hình ảnh vào bản nháp GitHub, hoặc lưu tệp PNG nếu không thể sao chép hình ảnh.", "issue.note_opened": "Hãy xem lại bản nháp GitHub và đính kèm ảnh chụp màn hình. Nút Submit new issue của GitHub sẽ đăng bản nháp.", "issue.note_opened_copied": "Đã sao chép báo cáo. Hãy dán vào bản nháp GitHub, đính kèm ảnh chụp màn hình, rồi nhấp Submit new issue trên GitHub.", @@ -1357,6 +1361,8 @@ "material.editor.unknown_card": "Chưa xác định đặc tính kỹ thuật. Có thể chỉ lưu khối lượng riêng đã gán và diện mạo hiện có.", "material.editor.user_supplied": "Người dùng cung cấp", "material.editor.wood": "Gỗ", + "material.selection.choose": "Chọn vật liệu", + "material.selection.mixed": "Các vật liệu khác nhau", "measure.at": "Tại", "measure.item": "Mục {number}", "messages.ago_h": "{n} giờ trước", @@ -3100,6 +3106,7 @@ "ui.render": "Kết xuất hình ảnh", "ui.renderer": "Trình kết xuất hình ảnh (Renderer)", "ui.repeat": "Lặp lại", + "ui.repeat_nothing": "Chưa có gì để lặp lại: hãy bắt đầu một công cụ hoặc hộp thoại trước.", "ui.replace_with_link_done": "Các bản sao hiện đã trở thành các vị trí đặt của thiết kế liên kết.", "ui.report_a_bug": "Báo cáo lỗi", "ui.reset": "Đặt lại", diff --git a/assets/locales/zh.json b/assets/locales/zh.json index 71e87d1c1..b7fe567fa 100644 --- a/assets/locales/zh.json +++ b/assets/locales/zh.json @@ -769,6 +769,7 @@ "cmd.document_revision": "设计版本号", "cmd.document_units": "更改设计单位", "cmd.edit_checkpoint": "检查点", + "cmd.edit_repeat": "重复上一个命令", "cmd.edit_restore_checkpoint": "恢复检查点", "cmd.engine_commands": "列出命令", "cmd.engine_describe": "描述命令", @@ -1291,6 +1292,9 @@ "install.steps_intro": "Safari 通过自身的菜单安装网页应用:", "install.title": "安装 SolidCraft", "issue.body_label": "报告正文", + "issue.note_changed_while_waiting": "等待预览时设置或模型已更改。重新截图即可按当前视图更新技术详情。", + "issue.note_details_kept": "已在本地截图。已保留你编辑过的技术详情:请检查它们是否仍与当前视图一致。", + "issue.note_details_updated": "技术详情已按当前视图更新。已在本地截图。附加到 GitHub 之前请先检查。", "issue.note_image_copied": "请将图片粘贴到 GitHub 草稿中。如果无法复制图片,请保存 PNG。", "issue.note_opened": "请检查 GitHub 草稿并附上截图。点击 GitHub 的 Submit new issue 按钮即可发布。", "issue.note_opened_copied": "报告已复制。请粘贴到 GitHub 草稿中,附上截图,然后在 GitHub 上点击 Submit new issue。", @@ -1357,6 +1361,8 @@ "material.editor.unknown_card": "工程属性未知。可以只保存指定密度和现有外观。", "material.editor.user_supplied": "用户提供", "material.editor.wood": "木材", + "material.selection.choose": "选择材料", + "material.selection.mixed": "不同材料", "measure.at": "位置", "measure.item": "项目 {number}", "messages.ago_h": "{n} 小时前", @@ -3100,6 +3106,7 @@ "ui.render": "渲染", "ui.renderer": "渲染器", "ui.repeat": "重复", + "ui.repeat_nothing": "还没有可重复的操作:请先启动一个工具或对话框。", "ui.replace_with_link_done": "这些副本现在是链接设计的放置。", "ui.report_a_bug": "报告缺陷", "ui.reset": "重置", diff --git a/docs/features.md b/docs/features.md index ee3a857cd..def9f238d 100644 --- a/docs/features.md +++ b/docs/features.md @@ -383,6 +383,7 @@ SolidCraft's commands by area, generated by `cargo xtask features` from the comm |---|---|---| | Checkpoint | `edit.checkpoint` | – | | Redo (Ctrl+Y) | `edit.redo` | – | +| Repeat Last Command (Shift+R) | `edit.repeat` | – | | Restore Checkpoint | `edit.restore_checkpoint` | – | | Undo (Ctrl+Z) | `edit.undo` | – | From 4515af3eb98a6993dfd48508f00bee1832c29aeb Mon Sep 17 00:00:00 2001 From: Parman Mohammadalizadeh Date: Tue, 27 Oct 2026 16:01:57 +0000 Subject: [PATCH 058/102] Update Links reads again only the linked designs that changed (#5606) (#5674) * Update Links reads again only the linked designs that changed (#5606) Update Links read, evaluated and STEP round-tripped every linked design on every run. Remember a digest of each linked file, of the STEP it gave and of its face names, and skip a link whose file, bodies and face names are all unchanged. Read a linked design through its saved model when the file has one, as opening it does. * Drop an import the rebase left unused Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: bherbruck Co-authored-by: Claude Opus 5.5 --- crates/engine/src/cmd/component_link.rs | 129 +++++++++++++++++++++-- crates/ui-egui/src/file_load_ui_tests.rs | 5 +- 2 files changed, 124 insertions(+), 10 deletions(-) diff --git a/crates/engine/src/cmd/component_link.rs b/crates/engine/src/cmd/component_link.rs index 011c6b831..33bedf07a 100644 --- a/crates/engine/src/cmd/component_link.rs +++ b/crates/engine/src/cmd/component_link.rs @@ -8,7 +8,9 @@ //! the design gives them (`Feature::link_faces`), so a joint on a linked face stays on that face //! when the design changes, as it would inside the design, and reports it when the face is gone. -use std::path::Path; +use std::hash::{Hash, Hasher}; +use std::path::{Path, PathBuf}; +use std::sync::Mutex; use serde_json::{Value, json}; use solidcraft_doc::{DesignLink, Document, FeatureKind}; @@ -88,20 +90,87 @@ pub fn resolve_design_links(doc: &mut Document, from: Option<&str>) { /// the design gives their faces (`Feature::link_faces`), with the source's design properties. type Linked = (String, solidcraft_io::StepFeature, Vec>, solidcraft_doc::Metadata); -/// The solid bodies of the design at `file`, evaluated, as an Import feature. -fn linked_bodies(file: &Path, own: Option<&str>) -> Result { +/// What a linked file last gave, by the file: digests of its bytes, of the STEP text it gave and +/// of its face names, and that read's warnings. Update Links evaluates a file again only when its +/// bytes or the linked bodies changed since (#5606). Bounded, oldest first out. +static READS: Mutex> = Mutex::new(Vec::new()); +const READS_SIZE: usize = 256; + +struct LinkRead { + file: PathBuf, + bytes: u64, + step: u64, + faces: u64, + warnings: Vec, +} + +#[cfg(test)] +thread_local! { + /// Linked designs read and evaluated on this thread, for tests. + static EVALUATED: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +fn digest(value: &T) -> u64 { + let mut h = std::collections::hash_map::DefaultHasher::new(); + value.hash(&mut h); + h.finish() +} + +/// The warnings of the last read of `file`, when it had these bytes and gave the STEP text +/// `step` and the face names `faces`: the bodies it gives are the ones the link holds. +fn unchanged_read(file: &Path, bytes: u64, step: u64, faces: u64) -> Option> { + let file = absolute(file); + let reads = READS.lock().ok()?; + reads.iter().find(|r| r.file == file && r.bytes == bytes && r.step == step && r.faces == faces).map(|r| r.warnings.clone()) +} + +fn remember_read(file: &Path, bytes: u64, feature: &solidcraft_io::StepFeature, faces: &[Vec]) { + let FeatureKind::Import { step, .. } = &feature.kind else { return }; + let file = absolute(file); + let Ok(mut reads) = READS.lock() else { return }; + reads.retain(|r| r.file != file); + if reads.len() >= READS_SIZE { + reads.remove(0); + } + reads.push(LinkRead { file, bytes, step: digest(step.as_bytes()), faces: digest(faces), warnings: feature.warnings.clone() }); +} + +/// The bytes of the design at `file`, which must not be the design saved at `own`. +fn read_link(file: &Path, own: Option<&str>) -> Result> { let shown = file.display().to_string(); if own.is_some_and(|o| absolute(Path::new(o)) == absolute(file)) { return Err(EngineError::Other(format!("{shown}: a design can't be linked into itself"))); } // A network location only when its server is allowed, a device never: judged from the text // before anything is read (on Windows, reading `\\host\share\x` connects to the host). - let bytes = solidcraft_io::vfs::read_design_path(&shown, own, solidcraft_io::MAX_DESIGN_BYTES).map_err(|e| { + solidcraft_io::vfs::read_design_path(&shown, own, solidcraft_io::MAX_DESIGN_BYTES).map_err(|e| { let e = e.to_string(); EngineError::Other(if e.starts_with(&shown) { e } else { format!("{shown}: {e}") }) - })?; - let doc = solidcraft_io::read_design(&bytes).map_err(|e| EngineError::Other(format!("{shown}: {e}")))?; - session_bodies(&Session::opened_at(doc, None, Some(&shown)), &shown) + }) +} + +/// The solid bodies of the design at `file`, evaluated, as an Import feature. +fn linked_bodies(file: &Path, own: Option<&str>) -> Result { + design_bodies(file, &read_link(file, own)?) +} + +/// The solid bodies of `bytes`, the design at `file`, as an Import feature. The model the file +/// keeps is its evaluation when this build saved it for exactly that design, as when it is opened. +fn design_bodies(file: &Path, bytes: &[u8]) -> Result { + #[cfg(test)] + EVALUATED.with(|n| n.set(n.get() + 1)); + let shown = file.display().to_string(); + let fail = |e: solidcraft_io::IoError| EngineError::Other(format!("{shown}: {e}")); + let (doc, saved) = if solidcraft_io::is_design_container(bytes) { + let mut reader = solidcraft_io::DesignContainerReader::new(std::io::Cursor::new(bytes)).map_err(fail)?; + let saved = reader.geometry(); + (reader.read_document().map_err(fail)?, saved) + } else { + (solidcraft_io::read_design(bytes).map_err(fail)?, None) + }; + let (name, feature, faces, metadata) = session_bodies(&Session::opened_at(doc, saved.as_ref(), Some(&shown)), &shown)?; + remember_read(file, digest(bytes), &feature, &faces); + Ok((name, feature, faces, metadata)) } /// The solid bodies of `part`, the design saved as `shown`, as an Import feature. @@ -224,7 +293,14 @@ fn update_links(s: &mut Session, p: &Value) -> Result { let old = old.clone(); link_refused(s.path.as_deref(), &link.path).map_err(|e| bad(cmd, format!("{cname}: {e}")))?; let file = resolve(s.path.as_deref(), &link.path); - let (_, sf, faces, _) = linked_bodies(&file, s.path.as_deref()).map_err(|e| bad(cmd, format!("{cname}: {e}")))?; + let bytes = read_link(&file, s.path.as_deref()).map_err(|e| bad(cmd, format!("{cname}: {e}")))?; + let kept_faces = s.doc.feature(link.feature).map(|f| digest(f.link_faces.as_slice())); + if let Some(known) = kept_faces.and_then(|faces| unchanged_read(&file, digest(bytes.as_slice()), digest(old.as_bytes()), faces)) { + warnings.extend(known); + unchanged.push(cname); + continue; + } + let (_, sf, faces, _) = design_bodies(&file, &bytes).map_err(|e| bad(cmd, format!("{cname}: {e}")))?; warnings.extend(sf.warnings.iter().cloned()); let same = matches!(&sf.kind, FeatureKind::Import { step, .. } if *step == old); let kept = s.doc.feature(link.feature).map(|f| &f.link_faces); @@ -525,6 +601,43 @@ mod tests { let _ = std::fs::remove_dir_all(&dir); } + #[test] + fn update_links_reads_again_only_the_designs_that_changed() { + let dir = std::env::temp_dir().join(format!("solidcraft-link-reads-{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + let (plate, block) = (dir.join("plate.solidcraft"), dir.join("block.solidcraft")); + save_box(&plate, 30.0); + save_box(&block, 10.0); + let mut a = Session::default(); + run(&mut a, "component.insert_design", json!({"path": plate})); + run(&mut a, "component.insert_design", json!({"path": block, "translate": [50, 0, 0]})); + let evaluated = || EVALUATED.with(std::cell::Cell::get); + // Unchanged files are not evaluated again. + let before = evaluated(); + let r = run(&mut a, "component.update_links", json!({})); + assert_eq!((r["updated"].clone(), r["unchanged"].clone()), (json!([]), json!(["plate", "block"])), "{r}"); + assert_eq!(evaluated(), before); + // An edited file is, and only that one. + save_box(&plate, 45.0); + let r = run(&mut a, "component.update_links", json!({})); + assert_eq!((r["updated"].clone(), r["unchanged"].clone()), (json!(["plate"]), json!(["block"])), "{r}"); + assert_eq!(evaluated(), before + 1); + assert!((volume(&mut a) - 11000.0).abs() < 1e-6, "{}", volume(&mut a)); + // Undone, the link holds the old bodies again: the same file brings the new ones back. + run(&mut a, "edit.undo", json!({})); + assert!((volume(&mut a) - 8000.0).abs() < 1e-6, "{}", volume(&mut a)); + assert_eq!(run(&mut a, "component.update_links", json!({}))["updated"], json!(["plate"])); + assert!((volume(&mut a) - 11000.0).abs() < 1e-6, "{}", volume(&mut a)); + // A file saved again without its model is evaluated, and gives the same bodies. + let mut part = Session::default(); + run(&mut part, "doc.open", json!({"path": block})); + run(&mut part, "file.save", json!({"cache": false})); + let before = evaluated(); + assert_eq!(run(&mut a, "component.update_links", json!({}))["unchanged"], json!(["plate", "block"])); + assert_eq!(evaluated(), before + 1); + let _ = std::fs::remove_dir_all(&dir); + } + #[test] fn inserting_a_missing_file_or_bad_parameters_changes_nothing() { let mut s = Session::default(); diff --git a/crates/ui-egui/src/file_load_ui_tests.rs b/crates/ui-egui/src/file_load_ui_tests.rs index e38543c2c..08c3b7d00 100644 --- a/crates/ui-egui/src/file_load_ui_tests.rs +++ b/crates/ui-egui/src/file_load_ui_tests.rs @@ -189,14 +189,15 @@ fn update_links_names_the_design_it_reads_while_the_window_draws() { let dir = scratch("links"); let part = dir.join("plate.solidcraft"); let case = dir.join("case.solidcraft"); - // A plate with two holes (three features: the read can be held at the third). + // A plate with two holes (three features: the read can be held at the third), saved without + // its model so reading it rebuilds the features. let save_part = |height: f64| { let mut s = Session::default(); s.execute("solid.box", &json!({"length": 40, "width": 20, "height": height})).unwrap(); for x in [10, 30] { s.execute("solid.cylinder", &json!({"radius": 2, "height": 200, "base": [x, 10, -1], "operation": "cut"})).unwrap(); } - s.execute("file.save", &json!({"path": part})).unwrap(); + s.execute("file.save", &json!({"path": part, "cache": false})).unwrap(); s.execute("inspect.measure", &json!({})).unwrap()["total"]["volume_mm3"].as_f64().unwrap() }; let volume = |app: &mut SolveApp| app.session.execute("inspect.measure", &json!({})).unwrap()["total"]["volume_mm3"].as_f64().unwrap(); From d0c594d311cbc82d8b916677cf135063967be3d7 Mon Sep 17 00:00:00 2001 From: tr1pp4 <38721264+tr1pp4@users.noreply.github.com> Date: Tue, 27 Oct 2026 16:25:28 +0000 Subject: [PATCH 059/102] History: a face picked in the view lights the feature that made it (#6910) Hovering or picking a face in the view lights the feature that made that face (its creator, as Edit Feature on a face finds it: the hole, not the plate it was cut into) in the bottom timeline, the History on the left and the Browser's Features folder; edges and vertices light the feature that made their body, as before. A new face or edge pick scrolls the history shown to that feature once, through the Find in Timeline reveal. Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/browser.rs | 3 + crates/ui-egui/src/browser/features.rs | 6 +- crates/ui-egui/src/context_menu.rs | 5 ++ crates/ui-egui/src/lib.rs | 1 + crates/ui-egui/src/timeline.rs | 98 +++++++++++++++++++++++--- crates/ui-egui/src/timeline_left.rs | 11 +-- 6 files changed, 106 insertions(+), 18 deletions(-) diff --git a/crates/ui-egui/src/browser.rs b/crates/ui-egui/src/browser.rs index b5f2bdab8..a68aad20f 100644 --- a/crates/ui-egui/src/browser.rs +++ b/crates/ui-egui/src/browser.rs @@ -128,6 +128,9 @@ pub struct TreeState { /// Find in Timeline: the feature the history scrolls to the next time it draws its items, in /// the bottom strip or in the history on the left (#5850). pub timeline_reveal: Option, + /// The feature of the face or edge last picked in the view, so a new pick scrolls the + /// history to it once. + pub view_pick: Option, /// The Edit Canvas / Calibrate panel. pub canvas_panel: Option, /// The bodies a row at the top of the history lights this frame (`history_rows`), for the diff --git a/crates/ui-egui/src/browser/features.rs b/crates/ui-egui/src/browser/features.rs index 5ebae12a0..2d6728c98 100644 --- a/crates/ui-egui/src/browser/features.rs +++ b/crates/ui-egui/src/browser/features.rs @@ -71,6 +71,9 @@ pub(super) fn rows(app: &mut SolveApp, ui: &mut egui::Ui, component: u64, path: .filter_map(|(i, f)| (f.component == component && !matches!(f.kind, FeatureKind::Sketch { .. })).then_some(i)) .collect(), }; + // The feature that made what is under the cursor or picked in the viewport, as the history + // lights it. + let from_view = [crate::timeline::hovered_feature(app), crate::timeline::picked_feature(app)]; for index in indices { let Some(feature) = app.session.doc.features.get(index) else { continue }; let (id, label, icon) = (feature.id, feature.name.clone(), crate::timeline::icon_of(&feature.kind)); @@ -78,6 +81,7 @@ pub(super) fn rows(app: &mut SolveApp, ui: &mut egui::Ui, component: u64, path: // Behind the history marker or suppressed: not built, drawn faint as in the timeline. let dim = feature.suppressed || app.session.doc.marker.is_some_and(|marker| index >= marker); let selected = app.session.selection.contains(&Sel::Feature { id }); + let mark = if from_view.contains(&Some(id)) { Mark::Here } else { Mark::None }; app.tree.remember(&format!("f:{id}")); let action = sketch.map(|_| ("sketch", "Edit Profile Sketch")); // The bodies it made show and hide with its eye (#5099); a component listed on its own @@ -89,7 +93,7 @@ pub(super) fn rows(app: &mut SolveApp, ui: &mut egui::Ui, component: u64, path: let r = draw_row( ui, ui.id().with(("browser_feature", id)), - &Row { depth: depth + 1, eye, icon, label: &label, selected, dim: dim || eye == Some(false), action, ..Default::default() }, + &Row { depth: depth + 1, eye, icon, label: &label, selected, dim: dim || eye == Some(false), mark, action, ..Default::default() }, ); if r.eye { let mut p = json!({"visible": !visible, "features": [id]}); diff --git a/crates/ui-egui/src/context_menu.rs b/crates/ui-egui/src/context_menu.rs index 74a84cb61..e82635d7d 100644 --- a/crates/ui-egui/src/context_menu.rs +++ b/crates/ui-egui/src/context_menu.rs @@ -450,6 +450,11 @@ fn picked_face_feature(app: &SolveApp) -> Option { Sel::Face { body, index, .. } => Some((body, *index)), _ => None, })?; + face_feature(app, body, index) +} + +/// The feature that made face `index` of `body` (by its world name). +pub(crate) fn face_feature(app: &SolveApp, body: &str, index: usize) -> Option { let state = app.session.world_state(); let body = state.body(body)?; let names = solidcraft_engine::doc::naming::face_names(body); diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 6132443d3..85625449c 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -2180,6 +2180,7 @@ impl SolveApp { } } let floating = ui_kit::Container::new(ui.ctx(), ui_kit::Surface::Panel).floating(); + timeline::follow_view_pick(self); let show_timeline = self.ui.show_timeline && !render_workspace::active(self); let left_timeline = show_timeline && self.preferences.timeline_left; timeline_left::animate_folds(self, ui.ctx()); diff --git a/crates/ui-egui/src/timeline.rs b/crates/ui-egui/src/timeline.rs index 909be62e1..e263a7974 100644 --- a/crates/ui-egui/src/timeline.rs +++ b/crates/ui-egui/src/timeline.rs @@ -26,6 +26,46 @@ pub(crate) fn run_transport(app: &mut SolveApp, control: crate::ui_kit::HistoryT let _ = app.run_heavy("timeline.roll_to", params); } +/// The feature that made a face, edge or vertex of `body` (its world name): a face's own creator, +/// as Edit Feature on a face finds it (the hole, not the plate it was cut into), else the feature +/// that made the body. +fn geometry_feature(app: &SolveApp, body: &str, face: Option) -> Option { + face.and_then(|index| crate::context_menu::face_feature(app, body, index)) + .or_else(|| app.session.world_state().body(body).map(|b| b.feature)) + .filter(|id| app.session.doc.feature(*id).is_some()) +} + +/// The feature of the face, edge or vertex under the pointer in the view. +pub(crate) fn hovered_feature(app: &SolveApp) -> Option { + match &app.viewport.hover { + Some(crate::viewport::Hit::Face { body, index, .. }) => geometry_feature(app, body, Some(*index)), + Some(crate::viewport::Hit::Edge { body, .. } | crate::viewport::Hit::Vertex { body, .. }) => geometry_feature(app, body, None), + _ => None, + } +} + +/// The feature of the first face or edge picked in the view. +pub(crate) fn picked_feature(app: &SolveApp) -> Option { + app.session.selection.iter().find_map(|selection| match selection { + solidcraft_engine::Sel::Face { body, index, .. } => geometry_feature(app, body, Some(*index)), + solidcraft_engine::Sel::Edge { body, .. } => geometry_feature(app, body, None), + _ => None, + }) +} + +/// A new face or edge picked in the view scrolls the history shown to the feature that made it, +/// once per pick; the history stays where it is while the pick does not change. +pub(crate) fn follow_view_pick(app: &mut SolveApp) { + let picked = picked_feature(app); + if picked == app.tree.view_pick { + return; + } + app.tree.view_pick = picked; + if picked.is_some() && app.ui.show_timeline { + app.tree.timeline_reveal = picked; + } +} + // Snapshot only the data used by timeline interactions. Cloning FeatureKind here would // also copy imported mesh vertices and triangles on every frame. #[derive(Clone, Copy)] @@ -510,14 +550,8 @@ fn timeline_contents(app: &mut SolveApp, ui: &mut egui::Ui, floating: bool) { let order: Vec = feats.iter().map(|f| f.0).collect(); // Find in Timeline: scroll the found feature into the strip on this frame (#5850). let reveal = app.tree.timeline_reveal.take(); - // The feature whose body is under the cursor in the viewport. - let st = app.session.world_state(); - let from_view = match &app.viewport.hover { - Some( - crate::viewport::Hit::Face { body, .. } | crate::viewport::Hit::Edge { body, .. } | crate::viewport::Hit::Vertex { body, .. }, - ) => st.body(body).map(|b| b.feature), - _ => None, - }; + // The feature that made what is under the cursor or picked in the viewport. + let from_view = [hovered_feature(app), picked_feature(app)]; let drag_id = ui.id().with("tl_drag"); let mut drag: Option = ui.data(|d| d.get_temp(drag_id)); let pointer = ui.input(|i| i.pointer.hover_pos()); @@ -551,7 +585,7 @@ fn timeline_contents(app: &mut SolveApp, ui: &mut egui::Ui, floating: bool) { name, kind: ty, selected: sel, - hovered: resp.hovered() || from_view == Some(*id), + hovered: resp.hovered() || from_view.contains(&Some(*id)), dim: rolled, suppressed: *suppressed, error: err.is_some(), @@ -929,6 +963,52 @@ mod tests { } } + /// A face picked in the view lights the feature that made it, the hole rather than the block + /// it was cut into, and scrolls both timelines to it once; hovering finds the same feature. + #[test] + fn a_face_picked_in_the_view_scrolls_both_timelines_to_the_feature_that_made_it() { + for left in [false, true] { + let mut h = Harness::new(); + h.app.preferences.timeline_left = left; + let block = + h.app.run("solid.box", json!({"length": 20, "width": 20, "height": 10, "name": "Block", "body_name": "Plate"})).unwrap()["feature"] + .as_u64() + .unwrap(); + for i in 0..80 { + h.app.run("sketch.create", json!({"plane": "XY", "name": format!("S{i}")})).unwrap(); + h.app.run("sketch.finish", json!({})).unwrap(); + } + let hole = h + .app + .run("solid.cylinder", json!({"base": [10, 10, -1], "radius": 3, "height": 12, "operation": "cut", "name": "Hole"})) + .unwrap()["feature"] + .as_u64() + .unwrap(); + h.app.run("select.clear", json!({})).unwrap(); + h.frames(4); + let shown = |h: &Harness| h.app.shell.history.unwrap().contains(crate::scenario::handle_at("timeline:Hole").unwrap()); + assert!(!shown(&h), "left={left}: the hole starts outside the timeline"); + + let state = h.app.session.world_state(); + let body = state.bodies.first().unwrap(); + let names = solidcraft_engine::doc::naming::face_names(body); + let index = names.iter().position(|name| solidcraft_engine::doc::persistent_name::made_by(name) == Some(hole)).unwrap(); + let plate = body.name.clone(); + h.app.viewport.hover = Some(crate::viewport::Hit::Face { body: plate.clone(), index, point: solidcraft_engine::geom::Vec3::ZERO }); + assert_eq!(crate::timeline::hovered_feature(&h.app), Some(hole), "left={left}: hovering the hole's face finds the hole"); + h.app.viewport.hover = Some(crate::viewport::Hit::Vertex { body: plate.clone(), point: solidcraft_engine::geom::Vec3::ZERO }); + assert_eq!(crate::timeline::hovered_feature(&h.app), Some(block), "left={left}: a vertex finds the feature that made its body"); + h.app.viewport.hover = None; + + h.app.run("select.set", json!({"items": [{"type": "face", "body": plate, "index": index, "point": [0, 0, 0]}]})).unwrap(); + h.frames(30); + assert_eq!(crate::timeline::picked_feature(&h.app), Some(hole), "left={left}"); + assert_eq!(h.app.tree.view_pick, Some(hole), "left={left}"); + assert!(shown(&h), "left={left}: the pick scrolled the hole into the timeline"); + assert!(h.app.tree.timeline_reveal.is_none(), "left={left}: once, not on every frame"); + } + } + #[test] fn the_feature_menu_edits_its_profile_sketch_in_both_timelines() { for left in [false, true] { diff --git a/crates/ui-egui/src/timeline_left.rs b/crates/ui-egui/src/timeline_left.rs index e07a3e6e3..bc9ca93a3 100644 --- a/crates/ui-egui/src/timeline_left.rs +++ b/crates/ui-egui/src/timeline_left.rs @@ -1036,7 +1036,7 @@ struct Rows<'a> { /// Find in Timeline: the feature to scroll into view this frame (#5850). reveal: Option, /// The feature whose body is under the pointer in the 3D view. - from_view: Option, + from_view: [Option; 2], /// A sketch that has a reference row and one of whose rows was hovered last frame: all its /// rows light up. linked_hover: Option, @@ -1081,12 +1081,7 @@ fn vertical_features(app: &mut SolveApp, ui: &mut egui::Ui, names: bool) { .iter() .map(|group| (group.id, group_last_feature(&groups, &features, group.id).map_or(features.len(), |index| index.saturating_add(1)))) .collect(); - let from_view = match &app.viewport.hover { - Some(crate::viewport::Hit::Face { body, .. } | crate::viewport::Hit::Edge { body, .. } | crate::viewport::Hit::Vertex { body, .. }) => { - app.session.world_state().body(body).map(|body| body.feature) - } - _ => None, - }; + let from_view = [crate::timeline::hovered_feature(app), crate::timeline::picked_feature(app)]; let drag_id = ui.id().with("tl_vertical_drag"); let mut rows = Rows { names, @@ -1329,7 +1324,7 @@ fn feature_row(app: &mut SolveApp, ui: &mut egui::Ui, rows: &mut Rows, index: us name, kind: ty, selected, - hovered: response.hovered() || rows.from_view == Some(id) || rows.linked_hover == Some(id), + hovered: response.hovered() || rows.from_view.contains(&Some(id)) || rows.linked_hover == Some(id), dim: rolled, suppressed: *suppressed, error: error.is_some(), From 9a7b657fdcccfbf62d00af62eb976ea5c6075cb2 Mon Sep 17 00:00:00 2001 From: Mateusz Sych <151755914+SychPL@users.noreply.github.com> Date: Tue, 27 Oct 2026 16:38:26 +0000 Subject: [PATCH 060/102] Assistant: connect the last-used agent on startup (#7009) (#7124) * claim: #7009 * Assistant: connect the last-used agent and open the panel at start (#7009) Two Settings > AI options, off by default: when SolidCraft starts, connect the agent started last (once the installed agents are known; a missing one is not swapped for another) and open the Assistant panel. Not for runs started with --control. A connection that never gets ready (no agent, start error, the agent ends while starting) is a new Failed state: the header reads Connection failed and Connect reads Retry. The control channel reports it as "failed" and takes connect_at_start / open_at_start. * Assistant: keep the start-up agent when a design replaces the blank one (#7009) Opening a design over the blank design SolidCraft starts with reset its chat and stopped the agent connected at start. A chat not asked anything yet now starts over in place and keeps its agent. Turning AI features off also drops a start-up connection still waiting for discovery. * i18n: Arabic, Hebrew and Vietnamese for the start-up options (#7009) ar, he and vi are complete catalogs on main now, so every new English message needs them. --------- Co-authored-by: MateuszSychXpl <151755914+MateuszSychXpl@users.noreply.github.com> --- apps/solidcraft-cli/src/bench_assistant.rs | 2 +- apps/solidcraft/src/main.rs | 1 + .../pending/agent-connect-at-start.json | 56 +++++++++ crates/ui-egui/src/agent_chat/mod.rs | 88 ++++++++++++-- crates/ui-egui/src/agent_chat/panel.rs | 9 +- crates/ui-egui/src/agent_chat/settings.rs | 10 ++ crates/ui-egui/src/agent_chat/tests.rs | 110 +++++++++++++++++- crates/ui-egui/src/documents.rs | 7 ++ crates/ui-egui/src/prefs.rs | 7 ++ docs/agent-chat.md | 13 ++- docs/control-protocol.md | 2 +- 11 files changed, 287 insertions(+), 18 deletions(-) create mode 100644 assets/locales/pending/agent-connect-at-start.json diff --git a/apps/solidcraft-cli/src/bench_assistant.rs b/apps/solidcraft-cli/src/bench_assistant.rs index 9ec3b1b31..3cf2a67f7 100644 --- a/apps/solidcraft-cli/src/bench_assistant.rs +++ b/apps/solidcraft-cli/src/bench_assistant.rs @@ -419,7 +419,7 @@ fn wait_for_turn(control: &mut Control, mut chat: Value, began: Instant, end: In let idle = !matches!(state, "busy" | "starting") && !turn && !queued; // A turn can start and end between two polls: then the conversation has its answer. let answered = chat["items"].as_array().into_iter().flatten().any(|i| i.get("user").is_none()); - if idle && (seen_busy || answered || matches!(state, "exited" | "auth" | "off") || began.elapsed() >= START_GRACE) { + if idle && (seen_busy || answered || matches!(state, "exited" | "failed" | "auth" | "off") || began.elapsed() >= START_GRACE) { return Ok((chat, false)); } let Some(left) = end.checked_duration_since(Instant::now()).filter(|d| !d.is_zero()) else { return Ok((chat, true)) }; diff --git a/apps/solidcraft/src/main.rs b/apps/solidcraft/src/main.rs index ba5e4c004..ea12cf4b7 100644 --- a/apps/solidcraft/src/main.rs +++ b/apps/solidcraft/src/main.rs @@ -122,6 +122,7 @@ impl eframe::App for App { // Automation runs (a control port was asked for) leave the user's AI apps alone. if !self.take_focus_unwanted { solidcraft_ui_egui::ai_connect::begin(&mut self.solve); + solidcraft_ui_egui::agent_chat::begin(&mut self.solve); } if let Some(dir) = self.starting.take() { startup::started(&dir); diff --git a/assets/locales/pending/agent-connect-at-start.json b/assets/locales/pending/agent-connect-at-start.json new file mode 100644 index 000000000..07366ad00 --- /dev/null +++ b/assets/locales/pending/agent-connect-at-start.json @@ -0,0 +1,56 @@ +{ + "en": { + "ai.prefs.connect_at_start": "Connect the last-used agent when SolidCraft starts", + "ai.prefs.connect_at_start_note": "Starts the agent you connected last (or the default one) in the background each time SolidCraft starts, so it is ready for chatting. Not when SolidCraft is started with --control. If it cannot connect, the Assistant shows Connection failed and a Retry button.", + "ai.prefs.open_at_start": "Open the Assistant panel when SolidCraft starts", + "ai.prefs.open_at_start_note": "Shows the Assistant panel (or its own window) each time SolidCraft starts. Not when SolidCraft is started with --control.", + "ui.agent_chat_last_missing": "The agent used last ({agent}) is not available any more. Pick an agent, then press Retry.", + "ui.agent_chat_retry": "Retry", + "ui.agent_chat_state_failed": "Connection failed" + }, + "ar": { + "ai.prefs.connect_at_start": "الاتصال بآخر وكيل مستخدم عند بدء SolidCraft", + "ai.prefs.connect_at_start_note": "يبدأ في الخلفية الوكيل الذي اتصلت به آخر مرة (أو الوكيل الافتراضي) في كل مرة يبدأ فيها SolidCraft، ليكون جاهزًا للمحادثة. لا يحدث ذلك عند بدء SolidCraft مع --control. إذا تعذّر الاتصال، يعرض المساعد «فشل الاتصال» وزر «إعادة المحاولة».", + "ai.prefs.open_at_start": "فتح لوحة المساعد عند بدء SolidCraft", + "ai.prefs.open_at_start_note": "يعرض لوحة المساعد (أو نافذتها المستقلة) في كل مرة يبدأ فيها SolidCraft. لا يحدث ذلك عند بدء SolidCraft مع --control.", + "ui.agent_chat_last_missing": "الوكيل المستخدم آخر مرة ({agent}) لم يعد متاحًا. اختر وكيلًا، ثم اضغط «إعادة المحاولة».", + "ui.agent_chat_retry": "إعادة المحاولة", + "ui.agent_chat_state_failed": "فشل الاتصال" + }, + "he": { + "ai.prefs.connect_at_start": "התחברות לסוכן האחרון שבו השתמשת בהפעלת SolidCraft", + "ai.prefs.connect_at_start_note": "מפעיל ברקע את הסוכן שאליו התחברת לאחרונה (או את סוכן ברירת המחדל) בכל הפעלה של SolidCraft, כך שהוא מוכן לשיחה. לא כש-SolidCraft מופעל עם --control. אם ההתחברות נכשלת, העוזר מציג „ההתחברות נכשלה” ולחצן „ניסיון חוזר”.", + "ai.prefs.open_at_start": "פתיחת חלונית העוזר בהפעלת SolidCraft", + "ai.prefs.open_at_start_note": "מציג את חלונית העוזר (או את החלון הנפרד שלה) בכל הפעלה של SolidCraft. לא כש-SolidCraft מופעל עם --control.", + "ui.agent_chat_last_missing": "הסוכן שבו השתמשת לאחרונה ({agent}) כבר אינו זמין. בחר סוכן ולחץ על „ניסיון חוזר”.", + "ui.agent_chat_retry": "ניסיון חוזר", + "ui.agent_chat_state_failed": "ההתחברות נכשלה" + }, + "ja": { + "ai.prefs.connect_at_start": "SolidCraft の起動時に前回使用したエージェントに接続", + "ai.prefs.connect_at_start_note": "SolidCraft を起動するたびに、前回接続したエージェント (またはデフォルトのエージェント) をバックグラウンドで起動し、すぐにチャットできるようにします。--control を付けて起動した場合は行いません。接続できない場合、アシスタントに「接続に失敗しました」と「再試行」ボタンが表示されます。", + "ai.prefs.open_at_start": "SolidCraft の起動時にアシスタントパネルを開く", + "ai.prefs.open_at_start_note": "SolidCraft を起動するたびにアシスタントパネル (または独立したウィンドウ) を表示します。--control を付けて起動した場合は行いません。", + "ui.agent_chat_last_missing": "前回使用したエージェント ({agent}) は利用できなくなりました。エージェントを選んでから「再試行」を押してください。", + "ui.agent_chat_retry": "再試行", + "ui.agent_chat_state_failed": "接続に失敗しました" + }, + "vi": { + "ai.prefs.connect_at_start": "Kết nối tác tử dùng gần nhất khi SolidCraft khởi động", + "ai.prefs.connect_at_start_note": "Mỗi lần SolidCraft khởi động, chạy ngầm tác tử bạn kết nối gần nhất (hoặc tác tử mặc định) để sẵn sàng trò chuyện. Không áp dụng khi SolidCraft được khởi động với --control. Nếu không kết nối được, Trợ lý hiển thị “Kết nối thất bại” và nút “Thử lại”.", + "ai.prefs.open_at_start": "Mở bảng Trợ lý khi SolidCraft khởi động", + "ai.prefs.open_at_start_note": "Hiển thị bảng Trợ lý (hoặc cửa sổ riêng của nó) mỗi lần SolidCraft khởi động. Không áp dụng khi SolidCraft được khởi động với --control.", + "ui.agent_chat_last_missing": "Tác tử dùng gần nhất ({agent}) không còn khả dụng. Hãy chọn một tác tử rồi nhấn “Thử lại”.", + "ui.agent_chat_retry": "Thử lại", + "ui.agent_chat_state_failed": "Kết nối thất bại" + }, + "zh": { + "ai.prefs.connect_at_start": "SolidCraft 启动时连接上次使用的智能体", + "ai.prefs.connect_at_start_note": "每次启动 SolidCraft 时,在后台启动上次连接的智能体(或默认智能体),以便随时开始聊天。使用 --control 启动 SolidCraft 时不会这样做。如果无法连接,助手会显示“连接失败”和“重试”按钮。", + "ai.prefs.open_at_start": "SolidCraft 启动时打开助手面板", + "ai.prefs.open_at_start_note": "每次启动 SolidCraft 时显示助手面板(或其独立窗口)。使用 --control 启动 SolidCraft 时不会这样做。", + "ui.agent_chat_last_missing": "上次使用的智能体({agent})已不可用。请选择一个智能体,然后按“重试”。", + "ui.agent_chat_retry": "重试", + "ui.agent_chat_state_failed": "连接失败" + } +} diff --git a/crates/ui-egui/src/agent_chat/mod.rs b/crates/ui-egui/src/agent_chat/mod.rs index 47d316d9c..866a61a23 100644 --- a/crates/ui-egui/src/agent_chat/mod.rs +++ b/crates/ui-egui/src/agent_chat/mod.rs @@ -76,6 +76,9 @@ pub enum State { Busy, NeedsAuth, Exited, + /// The agent never got ready: none to start, it could not start, or it ended while starting. + /// Connect reads Retry. + Failed, } impl State { @@ -87,6 +90,7 @@ impl State { State::Busy => "busy", State::NeedsAuth => "auth", State::Exited => "exited", + State::Failed => "failed", } } fn label(self) -> &'static str { @@ -97,6 +101,7 @@ impl State { State::Busy => "ui.agent_chat_state_busy", State::NeedsAuth => "ui.agent_chat_state_auth", State::Exited => "ui.agent_chat_state_exited", + State::Failed => "ui.agent_chat_state_failed", }) } fn running(self) -> bool { @@ -417,6 +422,8 @@ pub struct AgentChat { pub control_starter: Option, /// The picker is unfolded (it folds to one line once an agent is connected). picking: Option, + /// This launch connects the agent started last once the installed agents are known ([`begin`]). + connect_at_start: bool, #[cfg(not(target_arch = "wasm32"))] detection: Option, #[cfg(not(target_arch = "wasm32"))] @@ -438,6 +445,7 @@ impl AgentChat { std::mem::swap(&mut self.control_starter, &mut other.control_starter); std::mem::swap(&mut self.models_cache, &mut other.models_cache); std::mem::swap(&mut self.window_placed, &mut other.window_placed); + std::mem::swap(&mut self.connect_at_start, &mut other.connect_at_start); #[cfg(not(target_arch = "wasm32"))] { std::mem::swap(&mut self.detection, &mut other.detection); @@ -701,12 +709,14 @@ impl AgentChat { } Event::Error(e) => { self.notice(e, true); - if !self.state().running() || self.state() == State::Starting { - self.state = Some(State::Exited); + match self.state() { + State::Starting | State::Failed => self.state = Some(State::Failed), + s if !s.running() => self.state = Some(State::Exited), + _ => {} } } Event::Exited { tail } => { - self.state = Some(State::Exited); + self.state = Some(if matches!(self.state(), State::Starting | State::Failed) { State::Failed } else { State::Exited }); self.steering = false; let last: Vec = tail.into_iter().rev().take(6).collect::>().into_iter().rev().collect(); let detail = if last.is_empty() { String::new() } else { format!("\n{}", last.join("\n")) }; @@ -755,7 +765,7 @@ fn assistant_mark_for(state: State, login: &str, configured: bool, waiting: usiz if state == State::NeedsAuth { return AssistantMark::NeedsAuth; } - if state == State::Exited || stopped || failed { + if matches!(state, State::Exited | State::Failed) || stopped || failed { return AssistantMark::Stopped; } match state { @@ -829,7 +839,11 @@ fn working_dir() -> std::path::PathBuf { pub fn connect(app: &mut SolveApp, ctx: &egui::Context) { disconnect(app); let Some(entry) = agents::current(app) else { - app.agent_chat.notice(tr("ui.agent_chat_none_found"), true); + let chat = &mut app.agent_chat; + chat.notice(panel::no_agents_message(), true); + chat.state = Some(State::Failed); + // The picker lists what to install (and, in the Flatpak, the permissions to grant). + chat.picking = Some(true); return; }; // An API agent's key comes from the keychain for this connection only. @@ -838,6 +852,7 @@ pub fn connect(app: &mut SolveApp, ctx: &egui::Context) { Some(Ok(k)) => k, Some(Err(e)) => { app.agent_chat.notice(trf("ui.ai_keychain_error", &[("error", &e)]), true); + app.agent_chat.state = Some(State::Failed); return; } None => None, @@ -892,6 +907,7 @@ pub fn connect(app: &mut SolveApp, ctx: &egui::Context) { }; match started { Ok(b) => { + app.preferences.agent_last = entry.id.clone(); chat.backend = Some(b); chat.argv = entry.argv.clone(); chat.running_id = entry.id.clone(); @@ -912,11 +928,52 @@ pub fn connect(app: &mut SolveApp, ctx: &egui::Context) { } Err(e) => { chat.notice(trf("ui.agent_chat_failed_start", &[("error", &e)]), true); - chat.state = Some(State::Exited); + chat.state = Some(State::Failed); } } } +/// The launch, once the window is up (the desktop host; not for runs driven over `--control`): +/// Settings → AI can open the panel and connect the agent started last (#7009). +pub fn begin(app: &mut SolveApp) { + if !shown(app) { + return; + } + if app.preferences.agent_chat_open_at_start { + app.agent_chat.open = true; + } + app.agent_chat.connect_at_start = app.preferences.agent_connect_at_start; +} + +/// Connect at start, once the installed agents are known (the one started last may be one of +/// them). A missing agent is not swapped for another: the chat says so and shows Connection +/// failed, whose Retry starts the agent the switcher shows. Nothing waits on it: discovery and +/// the agent run in the background, and an agent connected by hand meanwhile stays. +#[cfg(not(target_arch = "wasm32"))] +fn connect_at_start(app: &mut SolveApp, ctx: &egui::Context) { + if !app.agent_chat.connect_at_start { + return; + } + if app.agent_chat.detection.is_none() { + refresh(app, ctx); + return; + } + app.agent_chat.connect_at_start = false; + if app.agent_chat.state.is_some() || !app.preferences.agent_connect_at_start { + return; + } + let last = app.preferences.agent_last.clone(); + if !last.is_empty() { + if !agents::entries(app).iter().any(|e| e.id == last) { + app.agent_chat.notice(trf("ui.agent_chat_last_missing", &[("agent", &last)]), true); + app.agent_chat.state = Some(State::Failed); + return; + } + app.agent_chat.agent_id = Some(last); + } + connect(app, ctx); +} + /// Stop the agent (and everything it started); the conversation stays. pub fn disconnect(app: &mut SolveApp) { app.agent_chat.disconnect_document(&mut app.session, false); @@ -1669,6 +1726,8 @@ pub fn poll(app: &mut SolveApp, ctx: &egui::Context) { } // AI features turned off: nothing keeps running, nothing is looked for. if !shown(app) { + // Turned back on later, AI features don't connect as if SolidCraft were starting. + app.agent_chat.connect_at_start = false; crate::documents::disconnect_background_chats(app, false); if app.agent_chat.backend.is_some() || app.agent_chat.open { disconnect(app); @@ -1701,7 +1760,10 @@ pub fn poll(app: &mut SolveApp, ctx: &egui::Context) { } } #[cfg(not(target_arch = "wasm32"))] - settings::poll_capabilities(app, ctx); + { + settings::poll_capabilities(app, ctx); + connect_at_start(app, ctx); + } pump_tools(app); if !app.agent_chat.held.is_empty() || app.agent_chat.state() == State::Busy { ctx.request_repaint_after(std::time::Duration::from_millis(250)); @@ -1842,7 +1904,8 @@ pub fn set_mode(app: &mut SolveApp, mode: &str) { } } -/// `ui.agent_chat` on the control channel (tests and screenshots): `enabled`, `command`, `open`, +/// `ui.agent_chat` on the control channel (tests and screenshots): `enabled`, `command`, +/// `connect_at_start` and `open_at_start` (the launch preferences), `open`, /// `side`, `minimized`, `width`, `refresh`, `connect`, `stop`, `attach` (a file's path, for the /// next message), `remove_file` (index), `send`, `attach_view`, `attach_selection`, `pick`, /// `permission` (an option id, or `"cancel"`), `approve` (`true`/`false`, the oldest held @@ -1854,6 +1917,12 @@ pub fn control(app: &mut SolveApp, ctx: &egui::Context, p: &Value) -> Result Value { json!({ "features": app.preferences.ai_features, "toolbarButton": app.preferences.ai_toolbar_button, + "connectAtStart": app.preferences.agent_connect_at_start, + "openAtStart": app.preferences.agent_chat_open_at_start, + "lastAgent": app.preferences.agent_last, "permissions": app.preferences.ai_permissions.id(), "agents": agents::entries(app).iter().map(|e| json!({"id": e.id, "name": e.name, "kind": e.kind.id(), "found": e.found, "version": e.version, "login": e.login, "request_timeout_s": e.kind.is_api().then_some(e.request_timeout_s)})).collect::>(), "currentAgent": agents::current(app).map(|e| e.id), diff --git a/crates/ui-egui/src/agent_chat/panel.rs b/crates/ui-egui/src/agent_chat/panel.rs index 2f2724a66..d06925b5c 100644 --- a/crates/ui-egui/src/agent_chat/panel.rs +++ b/crates/ui-egui/src/agent_chat/panel.rs @@ -634,7 +634,7 @@ fn state_color(state: State) -> Color32 { let t = Tokens::get(); match state { State::Ready | State::Busy => t.accent, - State::NeedsAuth | State::Exited => t.warning, + State::NeedsAuth | State::Exited | State::Failed => t.warning, _ => t.text_dim, } } @@ -703,7 +703,7 @@ fn header(app: &mut SolveApp, ui: &mut egui::Ui, left: bool) { State::Ready => ui_kit::AssistantTone::Success, State::Busy => ui_kit::AssistantTone::Working, State::NeedsAuth => ui_kit::AssistantTone::Warning, - State::Exited => ui_kit::AssistantTone::Error, + State::Exited | State::Failed => ui_kit::AssistantTone::Error, _ => ui_kit::AssistantTone::Neutral, } }, @@ -1170,7 +1170,8 @@ fn switcher(app: &mut SolveApp, ui: &mut egui::Ui) { let b = if app.agent_chat.state().running() { ui_kit::button(ui, tr("ui.agent_chat_stop"), ui_kit::Button::Normal).on_hover_text(tr("ui.agent_chat_stop_tip")) } else { - ui_kit::button(ui, tr("ui.agent_chat_connect"), ui_kit::Button::Normal) + let label = if app.agent_chat.state() == State::Failed { "ui.agent_chat_retry" } else { "ui.agent_chat_connect" }; + ui_kit::button(ui, tr(label), ui_kit::Button::Normal) }; crate::scenario::publish_handle("agent_chat:connect", b.rect.center()); if b.clicked() { @@ -1190,7 +1191,7 @@ fn switcher(app: &mut SolveApp, ui: &mut egui::Ui) { const FLATPAK_OVERRIDE: &str = "flatpak override --user ai.storyteller.solidcraft --filesystem=~/.nvm:ro --filesystem=~/.local/bin:ro --filesystem=~/.local/share/claude:ro --filesystem=~/.claude --filesystem=~/.claude.json --share=network"; #[cfg(not(target_arch = "wasm32"))] -fn no_agents_message() -> String { +pub(super) fn no_agents_message() -> String { if std::env::var_os("FLATPAK_ID").is_some() { tr("ui.agent_chat_flatpak_none_found") } else { tr("ui.agent_chat_none_found") }.to_string() } diff --git a/crates/ui-egui/src/agent_chat/settings.rs b/crates/ui-egui/src/agent_chat/settings.rs index 659ba261c..a65fbe8a5 100644 --- a/crates/ui-egui/src/agent_chat/settings.rs +++ b/crates/ui-egui/src/agent_chat/settings.rs @@ -249,6 +249,12 @@ pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) { let response = ui_kit::checkbox(ui, tr("ui.ai_toolbar_button"), &mut app.preferences.ai_toolbar_button) .on_hover_text(tr("ui.ai_toolbar_button_note")); crate::scenario::publish_handle("prefs:ai_toolbar_button", response.rect.center()); + let response = ui_kit::checkbox(ui, tr("ai.prefs.connect_at_start"), &mut app.preferences.agent_connect_at_start) + .on_hover_text(tr("ai.prefs.connect_at_start_note")); + crate::scenario::publish_handle("prefs:agent_connect_at_start", response.rect.center()); + let response = ui_kit::checkbox(ui, tr("ai.prefs.open_at_start"), &mut app.preferences.agent_chat_open_at_start) + .on_hover_text(tr("ai.prefs.open_at_start_note")); + crate::scenario::publish_handle("prefs:agent_chat_open_at_start", response.rect.center()); } let response = ui_kit::checkbox(ui, tr("ai.prefs.background_commands"), &mut app.preferences.agent_off_thread) .on_hover_text(tr("ui.agent_off_thread_note")); @@ -535,6 +541,10 @@ fn agents_section(app: &mut SolveApp, ui: &mut egui::Ui) { if app.agent_chat.agent_id.as_deref() == Some(id.as_str()) { app.agent_chat.agent_id = None; } + // A removed agent is not missed at the next start: the default connects instead. + if app.preferences.agent_last == id { + app.preferences.agent_last.clear(); + } } if app.agent_chat.settings.tests.values().any(|t| matches!(t, Test::Running(_))) { ui.ctx().request_repaint_after(std::time::Duration::from_millis(200)); diff --git a/crates/ui-egui/src/agent_chat/tests.rs b/crates/ui-egui/src/agent_chat/tests.rs index cad57919c..ee177a3aa 100644 --- a/crates/ui-egui/src/agent_chat/tests.rs +++ b/crates/ui-egui/src/agent_chat/tests.rs @@ -1973,9 +1973,14 @@ fn assistant_marks_follow_chat_login_turns_and_approvals() { } assert_eq!(mark(State::Off, "signed_out", true), NeedsAuth); for login in ["", "signed_out", "unknown", "signed_in"] { - for (state, expected) in - [(State::Ready, Ready), (State::Busy, Busy), (State::Starting, Busy), (State::NeedsAuth, NeedsAuth), (State::Exited, Stopped)] - { + for (state, expected) in [ + (State::Ready, Ready), + (State::Busy, Busy), + (State::Starting, Busy), + (State::NeedsAuth, NeedsAuth), + (State::Exited, Stopped), + (State::Failed, Stopped), + ] { assert_eq!(mark(state, login, true), expected); assert_eq!(assistant_mark_for(state, login, true, 12, false, false), Waiting(12)); } @@ -1984,6 +1989,105 @@ fn assistant_marks_follow_chat_login_turns_and_approvals() { assert_eq!(assistant_mark_for(State::Ready, "signed_in", true, 0, false, true), Stopped); } +/// An app whose endpoint agents answer at once (offline), with `api-1` and `api-2` added. +#[cfg(not(target_arch = "wasm32"))] +fn app_with_endpoints() -> SolveApp { + let http: backend::HttpFn = Arc::new(|_| Err("offline".into())); + let mut app = SolveApp::new(solidcraft_engine::Session::default(), crate::Services { agent_http: Some(http), ..Default::default() }); + for id in ["api-1", "api-2"] { + app.preferences.agents.push(agents::AgentConfig { + id: id.into(), + kind: agents::Kind::Api, + base_url: "http://localhost:11434/v1".into(), + model: "m".into(), + ..Default::default() + }); + } + app +} + +#[cfg(not(target_arch = "wasm32"))] +#[test] +fn the_agent_started_last_connects_at_start_once_the_agents_are_known() { + let ctx = crate::fonts::test_context(); + let mut app = app_with_endpoints(); + // Off by default: a launch starts nothing and leaves the panel closed. + begin(&mut app); + poll(&mut app, &ctx); + assert!(!app.agent_chat.open && app.agent_chat.backend.is_none() && app.agent_chat.detecting.is_none()); + + app.preferences.agent_connect_at_start = true; + app.preferences.agent_chat_open_at_start = true; + app.preferences.agent_last = "api-2".into(); + begin(&mut app); + assert!(app.agent_chat.open); + // Nothing waits for discovery: the agent starts when it is in, in whichever tab is shown. + let (found, detecting) = channel(); + app.agent_chat.detecting = Some(detecting); + poll(&mut app, &ctx); + assert!(app.agent_chat.backend.is_none()); + crate::documents::open_tab(&mut app, solidcraft_engine::Session::default()).unwrap(); + found.send(discover::Detection::default()).unwrap(); + poll(&mut app, &ctx); + assert_eq!(app.agent_chat.agent_id.as_deref(), Some("api-2"), "the agent started last, not the default"); + assert_eq!(app.agent_chat.state(), State::Starting); + assert!(app.agent_chat.backend.is_some()); + // A design opened over the launch's blank one keeps the agent: nothing was asked yet. + crate::documents::adopt(&mut app, solidcraft_engine::Session::default()); + assert!(app.agent_chat.backend.is_some() && app.agent_chat.items.is_empty()); + assert_eq!(app.docs.count(), 2); + // Once per launch. + disconnect(&mut app); + poll(&mut app, &ctx); + assert!(app.agent_chat.backend.is_none()); + // Connecting another agent makes it the one started last. + app.agent_chat.agent_id = Some("api-1".into()); + connect(&mut app, &ctx); + assert_eq!(app.preferences.agent_last, "api-1"); + assert!(status(&app)["lastAgent"] == "api-1" && status(&app)["connectAtStart"] == true); +} + +#[cfg(not(target_arch = "wasm32"))] +#[test] +fn a_connection_that_never_gets_ready_says_connection_failed_and_offers_retry() { + let ctx = crate::fonts::test_context(); + // The agent started last is gone: the chat says so, and no other agent starts by itself. + let mut app = app_with_endpoints(); + app.preferences.agent_connect_at_start = true; + app.preferences.agent_last = "claude".into(); + app.agent_chat.detection = Some(discover::Detection::default()); + begin(&mut app); + poll(&mut app, &ctx); + assert_eq!(app.agent_chat.state(), State::Failed); + assert!(app.agent_chat.backend.is_none() && app.agent_chat.agent_id.is_none()); + assert!(matches!(app.agent_chat.items.last(), Some(Item::Notice { text, error: true }) if text.contains("claude"))); + assert!(!State::Failed.running(), "the Connect button reads Retry, not Stop"); + assert_eq!(status(&app)["state"], "failed"); + + // An agent that cannot start. + let mut app = SolveApp::new(solidcraft_engine::Session::default(), crate::Services::default()); + app.preferences.agents.push(agents::AgentConfig { id: "custom-1".into(), command: "solidcraft-no-such-agent-7009".into(), ..Default::default() }); + connect(&mut app, &ctx); + assert_eq!(app.agent_chat.state(), State::Failed); + assert!(app.preferences.agent_last.is_empty(), "only an agent that started is remembered"); + + // No agent at all: the picker opens on what to install. + let mut app = SolveApp::new(solidcraft_engine::Session::default(), crate::Services::default()); + app.agent_chat.detection = Some(discover::Detection::default()); + connect(&mut app, &ctx); + assert_eq!((app.agent_chat.state(), app.agent_chat.picking), (State::Failed, Some(true))); + + // An agent that ends while starting failed to connect; one that ends later stopped. + let mut c = chat(); + c.state = Some(State::Starting); + c.on_event(Event::Error("initialize failed".into())); + c.on_event(Event::Exited { tail: Vec::new() }); + assert_eq!(c.state(), State::Failed); + let mut c = chat(); + c.on_event(Event::Exited { tail: Vec::new() }); + assert_eq!(c.state(), State::Exited); +} + #[test] fn assistant_click_and_shortcut_toggle_the_same_panel_without_a_connection() { let mut h = crate::scenario::Harness::new(); diff --git a/crates/ui-egui/src/documents.rs b/crates/ui-egui/src/documents.rs index 3c61adf82..c6ba36de0 100644 --- a/crates/ui-egui/src/documents.rs +++ b/crates/ui-egui/src/documents.rs @@ -403,6 +403,13 @@ pub fn close(app: &mut SolveApp, i: usize, force: bool) { /// A replacement design starts a fresh conversation while retaining the window's chat services. pub(crate) fn reset_chat(app: &mut SolveApp) { + // A chat not asked anything yet (an agent connected at start, say) holds nothing of the old + // design: it starts over in place, and its agent stays connected. + if !app.agent_chat.items.iter().any(|i| matches!(i, crate::agent_chat::Item::User { .. })) { + crate::agent_chat::new_chat(app); + app.agent_chat.input.clear(); + return; + } crate::agent_chat::leave_document(app); app.agent_chat.swap_document(&mut crate::agent_chat::AgentChat::default()); } diff --git a/crates/ui-egui/src/prefs.rs b/crates/ui-egui/src/prefs.rs index 6633e0ee4..c7759a611 100644 --- a/crates/ui-egui/src/prefs.rs +++ b/crates/ui-egui/src/prefs.rs @@ -754,6 +754,13 @@ preference_settings! { agents: Vec = Vec::new(); /// The agent a new conversation starts with (an agent's id; empty: the first one available). agent_default: String = String::new(); + /// The agent the chat last started (an agent's id; empty: none yet). + agent_last: String = String::new(); + /// When SolidCraft starts: connect the agent started last (`agent_last`, else the one a new + /// conversation starts with), and open the panel (#7009). Off by default: an agent starts + /// only when a message is sent or Connect is pressed, and the panel opens when asked for. + agent_connect_at_start: bool = false, PAGE_AI; + agent_chat_open_at_start: bool = false, PAGE_AI; /// How much the agent may do without asking (`ask`, `edits`, `all`), and per agent. ai_permissions: crate::agent_chat::agents::Mode = crate::agent_chat::agents::Mode::Edits, PAGE_AI; agent_permissions: std::collections::BTreeMap = Default::default(), PAGE_AI; diff --git a/docs/agent-chat.md b/docs/agent-chat.md index de99380ac..2e067ad0d 100644 --- a/docs/agent-chat.md +++ b/docs/agent-chat.md @@ -20,6 +20,17 @@ Everything about it is on one page: **Preferences → AI**. - **Show Assistant button in application bar** (on by default): the **Assistant** icon in the application bar row, which stays there however wide the window is. Turn it off to keep only the shortcut and the menu entry. +- **Connect the last-used agent when SolidCraft starts** (off by default): each launch starts + the agent you connected last (the default one if you never connected), in the background, + once SolidCraft has looked for the installed agents. The panel's header shows **Starting…**, + then **Ready**, or **Connection failed** with **Retry** in place of **Connect** (the agent is + missing, could not start, or ended while starting); the conversation says why. A design + opened in place of the empty one SolidCraft starts with keeps the agent connected, as long + as nothing was asked in that empty design's chat. +- **Open the Assistant panel when SolidCraft starts** (off by default): the panel (or its own + window) is shown at each launch. + +Neither applies when SolidCraft is started with `--control` for automation. With AI features on, the panel opens from: @@ -29,7 +40,7 @@ With AI features on, the panel opens from: Nothing runs until you need it: SolidCraft looks for installed agents (a quick `--version` each, in the background) when the panel or the AI page first opens, and starts an agent only -when you send a message or press **Connect**. +when you send a message or press **Connect** (or at launch, when you turned that on above). ## The panel diff --git a/docs/control-protocol.md b/docs/control-protocol.md index 10e4a6ef5..36b73f330 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -311,7 +311,7 @@ labels; `prefs:measure_axis_distances` identifies the checkbox. | `engine.execute` → `browser.expand_all` | `path?`: occurrence ids; `component?`: id; omit both for the whole tree | Open every Browser row under that scope, including folders that start closed (Origin, Named Views, Features). Display only: not saved in the design, not an undo step. | | `engine.execute` → `browser.collapse_all` | same | Close those rows. The design row stays open when the whole tree is collapsed. | | `engine.execute` → `view.history_layout` | `width?`, `dock?`: `bottom`, `left`, `under_browser`, `collapsed?` | Resize/dock the history without opening a dialog or changing the design. Contents respond to measured width; browser-stacked history shares its width and splits height equally. One folded header gives the expanded card the rest; two folded headers stay at the top. | -| `ui.agent_chat` | `features?`, `toolbar_button?`, `permissions?` (`ask`, `edits`, `all`), `add_agent?` ({`name`, `kind`: `acp`, `api` or `anthropic` (`api` is OpenAI-compatible, `anthropic` Anthropic-compatible), `command` or `base_url` + `model` + `request_timeout_s?` (seconds one model request may take, 300 by default, rounded and clamped to 30 to 3600)}; no keys), `add_dialog?` (`installed`, `custom`, `api`, `anthropic`, or `false` to close), `default_agent?`, `agent?` (the conversation's agent, by id), `mode?` (the agent's own mode), `provider?` (which provider's models the model picker lists, when they come from several), `model?` (one of its models), `open?`, `side?` (`left`, `right`), `minimized?`, `popped?` (in its own window), `width?`, `picker?`, `refresh?`, `connect?`, `stop?`, `attach?`: a file's path (a picture, a text file or a CAD file, for the next message; CAD files are imported at once), `remove_file?` (index of a file on the next message), `send?`: text (files alone make a message too), `attach_view?`, `attach_selection?`, `pick?` (true: open the context picker), `permission?`: an option id or `"cancel"` (the newest question of the agent's own), `approve?`: true, false or `"always"` (the oldest request held for Allow/Deny), `cancel?` (Stop: the queue stays), `send_now?` (stop the running step, then send the queued messages), `remove_pending?` (index), `new_chat?` (clear the chat, new session), `undo?` (the last message's changes) | the chat's state: `features`, `agents` (found and added), `currentAgent`, `state` (off, starting, ready, busy, auth, exited), `popped`, `window` (its place and size), `agent`, `modes`, `mode`, `models`, `model`, `modelWarning` (the model capability warning text, or `null` when unknown or tool support is reported; checked asynchronously and never blocks sending), `turnWarning` (the latest completed turn's no-tool notice, otherwise `null`; cleared on the next turn or new chat), `providers` (`name` and `count` of each, empty with one provider), `provider` (the one listed), `authMethods`, `toolsPort`, `pid`, `waiting`, `turn`, `pending` (queued messages, with their `files`), `attachments` (the files on the next message, by name), `loading` (pictures still being read for it, by name), `stopped`, `detection` and the conversation (`items`). With `features` off only the settings apply. Desktop only; see [Agent chat](agent-chat.md) | +| `ui.agent_chat` | `features?`, `toolbar_button?`, `connect_at_start?` and `open_at_start?` (connect the agent started last, and open the panel, when SolidCraft starts; both off by default, never with `--control`), `permissions?` (`ask`, `edits`, `all`), `add_agent?` ({`name`, `kind`: `acp`, `api` or `anthropic` (`api` is OpenAI-compatible, `anthropic` Anthropic-compatible), `command` or `base_url` + `model` + `request_timeout_s?` (seconds one model request may take, 300 by default, rounded and clamped to 30 to 3600)}; no keys), `add_dialog?` (`installed`, `custom`, `api`, `anthropic`, or `false` to close), `default_agent?`, `agent?` (the conversation's agent, by id), `mode?` (the agent's own mode), `provider?` (which provider's models the model picker lists, when they come from several), `model?` (one of its models), `open?`, `side?` (`left`, `right`), `minimized?`, `popped?` (in its own window), `width?`, `picker?`, `refresh?`, `connect?`, `stop?`, `attach?`: a file's path (a picture, a text file or a CAD file, for the next message; CAD files are imported at once), `remove_file?` (index of a file on the next message), `send?`: text (files alone make a message too), `attach_view?`, `attach_selection?`, `pick?` (true: open the context picker), `permission?`: an option id or `"cancel"` (the newest question of the agent's own), `approve?`: true, false or `"always"` (the oldest request held for Allow/Deny), `cancel?` (Stop: the queue stays), `send_now?` (stop the running step, then send the queued messages), `remove_pending?` (index), `new_chat?` (clear the chat, new session), `undo?` (the last message's changes) | the chat's state: `features`, `agents` (found and added), `currentAgent`, `state` (off, starting, ready, busy, auth, exited, failed: the agent never got ready, and Connect reads Retry), `connectAtStart`, `openAtStart`, `lastAgent` (the agent started last), `popped`, `window` (its place and size), `agent`, `modes`, `mode`, `models`, `model`, `modelWarning` (the model capability warning text, or `null` when unknown or tool support is reported; checked asynchronously and never blocks sending), `turnWarning` (the latest completed turn's no-tool notice, otherwise `null`; cleared on the next turn or new chat), `providers` (`name` and `count` of each, empty with one provider), `provider` (the one listed), `authMethods`, `toolsPort`, `pid`, `waiting`, `turn`, `pending` (queued messages, with their `files`), `attachments` (the files on the next message, by name), `loading` (pictures still being read for it, by name), `stopped`, `detection` and the conversation (`items`). With `features` off only the settings apply. Desktop only; see [Agent chat](agent-chat.md) | | `ui.resize` | `width`, `height` | | | `app.quit` | `force?` (quit without asking about unsaved designs) | `quitting` (the window closes), `asking` (a "save changes?" prompt is open) | From d24554107552f4531ec3298fa58848ff2da97e57 Mon Sep 17 00:00:00 2001 From: takuto-NA Date: Tue, 27 Oct 2026 16:51:09 +0000 Subject: [PATCH 061/102] Reuse placement-independent model results (#6525) (#6527) * claim: #6525 * perf(eval): reuse local geometry across placement changes Co-Authored-By: Claude Opus 5.5 * fix(engine): preserve recovery journal through shared refresh The shared evaluator retains the document Arc, so refresh and body-name pinning can copy it after command_done recorded its address. The next read then mistakes that copy for an outside edit and discards the replay. Record completion after refresh, name pinning or failed-command restoration. Add a minimal journaled box/inspect regression in the existing crash suite. --------- Co-authored-by: Claude Opus 5.5 --- crates/doc/src/eval.rs | 12 + crates/doc/src/eval_cost_tests.rs | 142 +++++++++++ crates/doc/src/placement_reuse.rs | 222 ++++++++++++++++++ crates/engine/src/crash_tests.rs | 24 ++ crates/engine/src/lib.rs | 32 ++- .../engine/src/world_placement_cache_tests.rs | 171 ++++++++++++++ docs/perf.md | 76 ++++++ 7 files changed, 667 insertions(+), 12 deletions(-) create mode 100644 crates/doc/src/placement_reuse.rs diff --git a/crates/doc/src/eval.rs b/crates/doc/src/eval.rs index 38e7c50ef..159390769 100644 --- a/crates/doc/src/eval.rs +++ b/crates/doc/src/eval.rs @@ -2,6 +2,8 @@ #[path = "placed_mesh.rs"] mod placed_mesh; +#[path = "placement_reuse.rs"] +mod placement_reuse; use std::collections::BTreeMap; use std::hash::{Hash, Hasher}; @@ -1294,6 +1296,10 @@ pub struct Model { primed: Option<(u64, Arc>)>, /// Shared with copies of this evaluator; states hold only a weak reference. frame_bodies: Arc>, + /// Inputs proven to describe placement-independent geometry, and the state they produced. + placement_inputs: Option, + /// All evaluated features use supported local inputs; computed with the existing owner index. + placement_local: bool, } /// Parameters a feature uses directly (inputs, sketch dimensions and the expressions of a @@ -2014,6 +2020,7 @@ impl Model { pub fn adopt_solved_sketches(&mut self, doc: &mut Document) -> usize { let solved: Vec = self.edited_sketches(doc).cloned().collect(); let Some(first) = solved.iter().filter_map(|s| doc.features.iter().position(|f| f.id == s.feature)).min() else { return 0 }; + self.placement_inputs = None; for s in &solved { if let Ok(stored) = doc.sketch_mut(s.feature) { adopt_solution(stored, &s.sketch); @@ -2101,6 +2108,8 @@ impl Model { /// Re-evaluate the document, reusing results up to the first changed feature. pub fn evaluate(&mut self, doc: &Document) { + self.placement_inputs = None; + self.placement_local = true; let (vals, perr) = evaluation_values(doc); self.param_errors = perr; self.frame_bodies.lock().unwrap_or_else(|e| e.into_inner()).next_generation(); @@ -2128,6 +2137,7 @@ impl Model { } let watched = crate::progress::begin(doc.features.len()); for (i, f) in doc.features.iter().enumerate() { + self.placement_local = self.placement_local && placement_reuse::local_geometry(f, &feature_component); let rolled_back = i >= marker; // Retain at most one active result per rolled-back feature, even across several // marker moves. Build the map anew so deleted features release their states too. @@ -2344,6 +2354,7 @@ impl Model { state: state.clone(), }); } + self.placement_local = self.placement_local && out.iter().all(|r| !r.skipped && !r.stale && !r.unkept && r.error.is_none()); self.results = out; self.last_recomputed = recomputed; self.recomputed += recomputed; @@ -2465,6 +2476,7 @@ impl Model { /// Set every result's fingerprint to `doc`'s, so the next evaluation reuses every result /// (after a change that builds nothing differently). pub fn refingerprint(&mut self, doc: &Document) { + self.placement_inputs = None; let (vals, _) = evaluation_values(doc); let marker = doc.marker.unwrap_or(usize::MAX); self.step_digests = StepDigests::of(doc, &self.step_digests); diff --git a/crates/doc/src/eval_cost_tests.rs b/crates/doc/src/eval_cost_tests.rs index 41f5150ba..d4a82fe4b 100644 --- a/crates/doc/src/eval_cost_tests.rs +++ b/crates/doc/src/eval_cost_tests.rs @@ -474,3 +474,145 @@ fn placed_bodies_taken_as_before_keep_their_measure() { let again = world_state_reusing(&doc, &state, &mut cache); assert_eq!(counted(|| assert_eq!(again.bodies[0].measure().unwrap().centroid, centroid)).measures, 0); } + +#[test] +fn shared_evaluation_requires_its_actual_model_and_unmodified_geometry_inputs() { + let mut doc = Document::new("shared evaluation"); + let feature = doc + .add_feature( + FeatureKind::Box { + corner: point_expr(Vec3::ZERO), + length: "2".into(), + width: "3".into(), + height: "4".into(), + operation: Operation::NewBody, + }, + None, + ) + .unwrap(); + let mut doc = Arc::new(doc); + let mut model = Model::new(); + assert!(model.evaluate_shared(&doc)); + let original = model.state(); + assert!(!model.evaluate_shared(&doc)); + assert_eq!(model.last_recomputed, 0); + assert!(Arc::ptr_eq(&original, &model.state())); + + // A geometry edit must be seen even when a caller did not evaluate it before moving. + let FeatureKind::Box { length, .. } = &mut Arc::make_mut(&mut doc).feature_mut(feature).unwrap().kind else { panic!("box") }; + *length = "5".into(); + assert!(model.evaluate_shared(&doc)); + assert!((model.state().bodies[0].measure().unwrap().volume - 60.).abs() < 1e-8); + assert!((original.bodies[0].measure().unwrap().volume - 24.).abs() < 1e-8); + assert!(!model.evaluate_shared(&doc)); + + let mut other_doc = (*doc).clone(); + let FeatureKind::Box { length, .. } = &mut other_doc.feature_mut(feature).unwrap().kind else { panic!("box") }; + *length = "7".into(); + let mut other = Model::new(); + other.evaluate(&other_doc); + model.results = other.results; + assert!(model.evaluate_shared(&doc), "replaced results cannot use the retained proof"); + assert_eq!(model.state().bodies.len(), 1); + model.no_cache = true; + assert!(model.evaluate_shared(&doc)); + model.no_cache = false; + assert!(model.evaluate_shared(&doc)); + let ahead = model.clone(); + model.prime(&ahead); + assert!(model.evaluate_shared(&doc), "primed results use normal evaluation"); + model.unprime(); + assert!(model.evaluate_shared(&doc)); + model.evaluate(&doc); + assert!(model.evaluate_shared(&doc), "the borrowed-document API invalidates the shared-input proof"); + Arc::make_mut(&mut doc).set_param("Width", "6 mm", None, None).unwrap(); + let FeatureKind::Box { width, .. } = &mut Arc::make_mut(&mut doc).feature_mut(feature).unwrap().kind else { panic!("box") }; + *width = "Width".into(); + assert!(model.evaluate_shared(&doc)); + assert!((model.state().bodies[0].measure().unwrap().volume - 120.).abs() < 1e-8); + Arc::make_mut(&mut doc).set_param("Width", "9 mm", None, None).unwrap(); + assert!(model.evaluate_shared(&doc)); + assert!((model.state().bodies[0].measure().unwrap().volume - 180.).abs() < 1e-8); + // A primitive's label can change its result without replacing the geometry state. + // Restoring the earlier document must restore that label and fingerprint too. + let name = doc.feature(feature).unwrap().name.clone(); + let mut renamed = (*doc).clone(); + renamed.feature_mut(feature).unwrap().name = "Renamed box".into(); + assert!(model.rename_feature(&renamed, feature)); + assert!(model.evaluate_shared(&doc), "refingerprinted results must not keep the old shared-input proof"); + assert_eq!(model.result(feature).unwrap().name, name); + assert!(model.is_current(&doc)); +} + +#[test] +fn shared_imported_mesh_inputs_keep_payload_identity_and_invalidate_replacements() { + let mut doc = Document::new("shared mesh input"); + let component = doc.add_component(Some("Part"), 0).unwrap(); + let feature = doc + .add_feature( + FeatureKind::MeshImport { + file: "triangle.stl".into(), + meshes: vec![MeshData { + name: "Triangle".into(), + positions: Arc::from([0., 0., 0., 1., 0., 0., 0., 1., 0.]), + triangles: Arc::from([0, 1, 2]), + color: None, + }], + }, + None, + ) + .unwrap(); + doc.feature_mut(feature).unwrap().component = component; + let mut doc = Arc::new(doc); + let mut model = Model::new(); + assert!(model.evaluate_shared(&doc)); + let original = model.state(); + Arc::make_mut(&mut doc).occurrences[0].transform = rigid(Vec3::new(10., 0., 0.), Vec3::ZERO, Vec3::Z, 0.3); + assert!(!model.evaluate_shared(&doc)); + assert!(Arc::ptr_eq(&original, &model.state())); + for edit in 0..5 { + let FeatureKind::MeshImport { meshes, .. } = &mut Arc::make_mut(&mut doc).feature_mut(feature).unwrap().kind else { panic!("mesh") }; + let mesh = &mut meshes[0]; + match edit { + 0 => Arc::make_mut(&mut mesh.positions)[3] = 2., + 1 => Arc::make_mut(&mut mesh.triangles).swap(1, 2), + 2 => mesh.color = Some([0.2, 0.4, 0.6]), + 3 => mesh.name = "Renamed".into(), + _ => mesh.positions = Arc::from(mesh.positions.to_vec()), + } + assert!(model.evaluate_shared(&doc), "mesh edit {edit} must invalidate"); + assert!(model.results.iter().all(|r| r.error.is_none())); + let mut fresh = Model::new(); + fresh.no_cache = true; + fresh.evaluate(&doc); + let (actual, expected) = (model.state(), fresh.state()); + assert_eq!(actual.bodies[0].name, expected.bodies[0].name); + let (actual, expected) = (actual.bodies[0].mesh(), expected.bodies[0].mesh()); + assert_eq!(actual.positions, expected.positions); + assert_eq!(actual.triangles, expected.triangles); + assert_eq!(actual.normals, expected.normals); + assert!(!model.evaluate_shared(&doc)); + } +} + +#[test] +fn shared_evaluation_refreshes_live_sketches_and_keeps_unknown_features_conservative() { + let mut doc = Document::new("live and unknown inputs"); + let feature = doc.add_feature(line_sketch(PlaneRef::Origin { name: "XY".into() }, Vec2::new(2., 1.)), None).unwrap(); + let mut doc = Arc::new(doc); + let mut model = Model::new(); + assert!(model.evaluate_shared(&doc)); + assert!(!model.evaluate_shared(&doc)); + let solved = model.state().sketch(feature).unwrap().clone(); + let mut live = solved.sketch.clone(); + live.points[1].pos.y += 2.; + assert!(model.show_live_sketch(feature, live, solved.report.clone())); + assert!(model.is_stale()); + assert!(model.evaluate_shared(&doc)); + assert!(!model.is_stale()); + assert_eq!(model.state().sketch(feature).unwrap().sketch.points, solved.sketch.points); + Arc::make_mut(&mut doc).add_feature(FeatureKind::ConstructionPlane { plane: PlaneRef::Origin { name: "XY".into() } }, None).unwrap(); + assert!(model.evaluate_shared(&doc)); + assert!(model.results.iter().all(|r| r.error.is_none())); + assert!(model.evaluate_shared(&doc), "an unclassified feature must keep the ordinary evaluation path"); +} diff --git a/crates/doc/src/placement_reuse.rs b/crates/doc/src/placement_reuse.rs new file mode 100644 index 000000000..865451ca3 --- /dev/null +++ b/crates/doc/src/placement_reuse.rs @@ -0,0 +1,222 @@ +//! Retain a proven evaluation across changes to assembly placement. Unknown feature kinds +//! use the ordinary evaluator; adding an eligible kind requires checking all of its inputs. + +use super::{Document, Feature, FeatureKind, Model, ModelState, Operation, PlaneRef}; +use std::sync::{Arc, Weak}; + +#[derive(Clone, Debug)] +pub(super) struct Inputs { + document: Arc, + state: Weak, +} + +impl Model { + /// Evaluate a shared document, retaining a proof for subsequent placement-only changes. + /// Returns whether the timeline was evaluated. The normal `evaluate` remains available + /// for callers without a shared document and invalidates this proof. + /// + /// Only explicitly supported local geometry qualifies. Geometry edits, unknown feature + /// kinds, stale/primed results and `no_cache` continue through the ordinary evaluator. + pub fn evaluate_shared(&mut self, doc: &Arc) -> bool { + let reusable = !self.no_cache + && self.primed.is_none() + && self.placement_inputs.as_ref().is_some_and(|inputs| { + inputs.state.upgrade().is_some_and(|state| Arc::ptr_eq(&state, &self.state())) + && !self.is_stale() + && (Arc::ptr_eq(doc, &inputs.document) || same_geometry_inputs(doc, &inputs.document)) + }); + if reusable { + self.last_recomputed = 0; + self.last_restored = 0; + return false; + } + self.evaluate(doc); + if !self.no_cache && self.primed.is_none() && self.placement_local { + self.placement_inputs = Some(Inputs { document: doc.clone(), state: Arc::downgrade(&self.state()) }); + } + true + } + + /// [`Model::refingerprint`] for a shared document: a proof that held for the results before + /// is kept for `doc`, since nothing was built differently (pinned body names, say). + pub fn refingerprint_shared(&mut self, doc: &Arc) { + let proven = !self.no_cache + && self.primed.is_none() + && self.placement_inputs.as_ref().is_some_and(|inputs| inputs.state.upgrade().is_some_and(|state| Arc::ptr_eq(&state, &self.state()))) + && !self.is_stale(); + self.refingerprint(doc); + if proven && self.placement_local { + self.placement_inputs = Some(Inputs { document: doc.clone(), state: Arc::downgrade(&self.state()) }); + } + } +} + +fn local_plane(plane: &PlaneRef, depth: usize) -> bool { + if depth > crate::MAX_PLACEMENT_DEPTH { + return false; + } + match plane { + PlaneRef::Origin { name: _ } | PlaneRef::Custom { plane: _ } | PlaneRef::Placed { origin: _, x_dir: _, y_dir: _ } => true, + PlaneRef::Offset { base, distance: _ } + | PlaneRef::Flipped { base, about_y: _ } + | PlaneRef::AtAngle { base, axis_origin: _, axis_dir: _, angle: _, line: None } => local_plane(base, depth + 1), + _ => false, + } +} + +pub(super) fn local_geometry(f: &Feature, components: &std::collections::HashMap) -> bool { + // Persistent picked-face/edge attachments can move an otherwise literal input. + if !f.face_names.is_empty() || !f.edge_names.is_empty() || !f.edge_refs.is_empty() { + return false; + } + match &f.kind { + FeatureKind::Box { corner: _, length: _, width: _, height: _, operation: Operation::NewBody } + | FeatureKind::Cylinder { base: _, axis: _, radius: _, height: _, operation: Operation::NewBody } + | FeatureKind::Sphere { center: _, radius: _, operation: Operation::NewBody } + | FeatureKind::Torus { center: _, major: _, minor: _, operation: Operation::NewBody } + | FeatureKind::Import { file: _, step: _, components: _, skip: _ } + | FeatureKind::MeshImport { file: _, meshes: _ } => true, + FeatureKind::Sketch { plane, sketch } => sketch.links.is_empty() && sketch.wires.is_empty() && local_plane(plane, 0), + FeatureKind::Extrude { sketch, profiles: _, extent, operation: Operation::NewBody, targets: _, thin: _ } => { + let crate::Extent { + distance: _, + convention: _, + direction: _, + distance2: _, + start_offset: _, + through_all, + taper: _, + to, + to_offset: _, + from, + } = extent; + to.is_none() && from.is_none() && !through_all && components.get(&sketch.0) == Some(&f.component) + } + _ => false, + } +} + +/// Every non-placement field is named, so a new input requires an explicit decision here. +/// Assembly records do not feed any of the feature kinds accepted by `local_geometry`. +fn same_geometry_inputs(a: &Document, b: &Document) -> bool { + let Document { + render, + format, + format_pending, + name, + units, + metadata, + params, + features, + marker, + next_id, + reserved_body_names, + components, + occurrences: _, + assembly: _, + sheet, + plastic, + parts, + links, + configs, + favorites, + canvases, + param_comments, + text_params, + next_component_color_index, + materials, + user_materials, + appearances, + body_components, + body_offsets, + browser_groups, + timeline_groups, + browser_order, + named_views, + visibility, + } = a; + (Arc::ptr_eq(render, &b.render) || *render == b.render) + && *format == b.format + && *format_pending == b.format_pending + && *name == b.name + && *units == b.units + && *metadata == b.metadata + && *params == b.params + && features.len() == b.features.len() + && features.iter().zip(&b.features).all(|(a, b)| same_feature(a, b)) + && *marker == b.marker + && *next_id == b.next_id + && *reserved_body_names == b.reserved_body_names + && *components == b.components + && *sheet == b.sheet + && *plastic == b.plastic + && *parts == b.parts + && *links == b.links + && *configs == b.configs + && *favorites == b.favorites + && *canvases == b.canvases + && *param_comments == b.param_comments + && *text_params == b.text_params + && *next_component_color_index == b.next_component_color_index + && *materials == b.materials + && *user_materials == b.user_materials + && *appearances == b.appearances + && *body_components == b.body_components + && *body_offsets == b.body_offsets + && *browser_groups == b.browser_groups + && *timeline_groups == b.timeline_groups + && *browser_order == b.browser_order + && *named_views == b.named_views + && *visibility == b.visibility +} + +/// Compare feature definitions without traversing immutable imported payloads. A replacement +/// allocation conservatively evaluates again, even when it happens to contain equal bytes. +fn same_feature(a: &Feature, b: &Feature) -> bool { + let Feature { + id, + name, + suppressed, + body_names, + param_names, + component, + edge_refs, + edge_names, + face_names, + participants, + shell_piece_order, + kernel_piece_order, + inserted, + link_faces, + kind, + } = a; + *id == b.id + && *name == b.name + && *suppressed == b.suppressed + && *body_names == b.body_names + && *param_names == b.param_names + && *component == b.component + && *edge_refs == b.edge_refs + && *edge_names == b.edge_names + && *face_names == b.face_names + && *participants == b.participants + && *shell_piece_order == b.shell_piece_order + && *kernel_piece_order == b.kernel_piece_order + && *inserted == b.inserted + && *link_faces == b.link_faces + && match (kind, &b.kind) { + (FeatureKind::MeshImport { file: a, meshes }, FeatureKind::MeshImport { file: b, meshes: other }) => { + a == b + && meshes.len() == other.len() + && meshes.iter().zip(other).all(|(a, b)| { + let crate::MeshData { name, positions, triangles, color } = a; + *name == b.name && *color == b.color && Arc::ptr_eq(positions, &b.positions) && Arc::ptr_eq(triangles, &b.triangles) + }) + } + ( + FeatureKind::Import { file: a, step, components, skip }, + FeatureKind::Import { file: b, step: other, components: other_components, skip: other_skip }, + ) => a == b && Arc::ptr_eq(step, other) && components == other_components && skip == other_skip, + (a, b) => a == b, + } +} diff --git a/crates/engine/src/crash_tests.rs b/crates/engine/src/crash_tests.rs index 799e3a2b5..13a1ab599 100644 --- a/crates/engine/src/crash_tests.rs +++ b/crates/engine/src/crash_tests.rs @@ -53,6 +53,22 @@ fn child() { set_environment("Renderer: test"); let mut s = Session { crash_journal: true, ..Default::default() }; s.execute("solid.box", &json!({"length": 10, "width": 20, "height": 30})).unwrap(); + if mode == "read_only" { + let state = STATE.get().unwrap(); + let before = read_live_journal(state); + assert_eq!(before.base, json!("new")); + assert_eq!(before.replay, vec![json!({"command":"solid.box","params":{"length":10,"width":20,"height":30}})]); + let evaluations = s.evaluations; + s.execute("document.inspect", &json!({})).unwrap(); + assert_eq!(s.evaluations, evaluations, "reading the design does not evaluate it"); + let after = read_live_journal(state); + assert_eq!(after.base, before.base, "a read must not rebase the recovery journal"); + assert_eq!(after.replay, before.replay, "the command that made the box must remain replayable"); + assert!(after.in_flight.is_none()); + end_session(); + println!("READ_ONLY_JOURNAL_OK"); + return; + } // Commands that only read are not kept. for _ in 0..50 { s.execute("document.inspect", &json!({})).unwrap(); @@ -179,6 +195,14 @@ fn accepted_prepared_commands_replay_and_discarded_work_is_not_journaled() { let _ = fs::remove_dir_all(directory); } +#[test] +fn a_read_only_command_keeps_the_replay_after_body_names_are_pinned() { + let directory = fresh_dir("read-only"); + let (output, ok) = run_child(&directory, "read_only"); + assert!(ok && output.contains("READ_ONLY_JOURNAL_OK"), "{output}"); + let _ = fs::remove_dir_all(directory); +} + fn only_report(dir: &Path) -> (Summary, Value) { let all = list(dir); assert_eq!(all.len(), 1, "{all:?}"); diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index e9e28f0e8..85600713b 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -541,7 +541,7 @@ impl Session { .and_then(|saved| Model::adopt(&doc, saved).map_err(|e| log::info!("the saved model is not used: {e}")).ok()); let model = adopted.unwrap_or_else(|| { let mut model = Model::new(); - model.evaluate(&doc); + model.evaluate_shared(&doc); model }); Session { @@ -822,10 +822,11 @@ impl Session { } pub fn refresh(&mut self) { - self.model.evaluate(&self.doc); - #[cfg(test)] - { - self.evaluations += 1; + if self.model.evaluate_shared(&self.doc) { + #[cfg(test)] + { + self.evaluations += 1; + } } self.revision += 1; self.prune_occurrence_state(); @@ -940,7 +941,7 @@ impl Session { } doc.reserved_body_names.extend(reserve); // The pinned names are the ones the bodies have: no result changes, so none is evaluated. - self.model.refingerprint(&self.doc); + self.model.refingerprint_shared(&self.doc); } /// A hidden construction plane stays hidden when the design renames it, or undo or redo @@ -1175,10 +1176,8 @@ impl Session { for (host, _) in additional_jobs { self.register_render_job_host(host)?; } - if outermost && crash::enabled() { - // A failed command leaves the design as it was (restored below). + let crash_outcome = if outermost && crash::enabled() { let failed = r.as_ref().err().map(ToString::to_string); - let after = if failed.is_some() { &before.doc } else { &self.doc }; // Commands that only read leave no trace (the journal keeps what a replay needs). let changed = !Arc::ptr_eq(&self.doc, &before.doc) || self.active_sketch != before.active_sketch @@ -1186,13 +1185,15 @@ impl Session { || self.active_component != active_before.0 || self.active_occurrence_path != active_before.1 || spec.id.starts_with("select."); - crash::command_done(self.crash_journal, changed, &before.doc, after, spec.id, given, failed.map_or(Ok(()), Err)); - } + Some((before.doc.clone(), changed, failed)) + } else { + None + }; let changed = !Arc::ptr_eq(&self.doc, &before.doc); // Hiding or showing (`browser.visibility`) leaves the document alone, so it needs its own // test: it is saved with the design and has an undo step of its own. let hidden = self.visibility != before.visibility; - match r { + let result = match r { Ok((v, live_edit)) => { let v = if changed { self.with_created(spec.id, params, &before, v) } else { v }; if changed || hidden { @@ -1236,7 +1237,14 @@ impl Session { } Err(e) } + }; + if let Some((before, changed, failed)) = crash_outcome { + // Refresh and body-name pinning can copy the shared document. Remember the final + // document, so the next command does not mistake that work for an outside edit + // and discard the replay. Failed commands have restored their document by now. + crash::command_done(self.crash_journal, changed, &before, &self.doc, spec.id, given, failed.map_or(Ok(()), Err)); } + result } /// A sketch command's result gets `created`: the ids of the points, curves, constraints and diff --git a/crates/engine/src/world_placement_cache_tests.rs b/crates/engine/src/world_placement_cache_tests.rs index 9c736b7fb..9fa268529 100644 --- a/crates/engine/src/world_placement_cache_tests.rs +++ b/crates/engine/src/world_placement_cache_tests.rs @@ -7,6 +7,177 @@ fn run(session: &mut Session, command: &str, params: Value) -> Value { session.execute(command, ¶ms).unwrap_or_else(|error| panic!("{command}: {error}")) } +#[test] +fn geometry_independent_moves_do_not_evaluate_the_timeline() { + let mut session = Session::default(); + let created = run(&mut session, "component.create", json!({"name":"Part","grounded":false})); + let occurrence = created["occurrence"].as_u64().unwrap(); + run(&mut session, "solid.box", json!({"length":2,"width":3,"height":4,"body_name":"Block"})); + let definitions = session.model.state(); + let before = session.evaluations; + run(&mut session, "occurrence.move", json!({"occurrence":occurrence,"translate":[10,0,0],"capture":true})); + assert_eq!(session.evaluations - before, 0, "a placement-independent model must not enter timeline evaluation"); + let world = session.world_state(); + let block = world.bodies.iter().find(|b| b.source_name.as_deref() == Some("Block")).unwrap(); + assert!(block.mesh().bounds().min.dist(Vec3::new(10., 0., 0.)) < 1e-9); + assert!(Arc::ptr_eq(&definitions, &session.model.state())); + assert_fresh_world(&session); + for command in ["edit.undo", "edit.redo"] { + let before = session.evaluations; + run(&mut session, command, json!({})); + assert_eq!(session.evaluations, before, "{command} must share the placement reuse decision"); + assert!(Arc::ptr_eq(&definitions, &session.model.state())); + assert_fresh_world(&session); + } + let mut scratch = session.scratch(); + run(&mut scratch, "occurrence.move", json!({"occurrence":occurrence,"translate":[5,0,0],"capture":true})); + assert_eq!(scratch.evaluations, 0); + assert!(Arc::ptr_eq(&definitions, &scratch.model.state())); + assert_fresh_world(&scratch); + assert!(session.world_state().bodies[0].mesh().bounds().min.dist(Vec3::new(10., 0., 0.)) < 1e-9); +} + +fn assert_fresh_world(session: &Session) { + let mut fresh = crate::doc::Model::new(); + fresh.no_cache = true; + fresh.evaluate(&session.doc); + assert!(fresh.results.iter().all(|r| r.error.is_none())); + let expected = crate::doc::world_state(&session.doc, &fresh.state()); + let actual = session.world_state(); + assert_eq!(actual.bodies.len(), expected.bodies.len()); + for (a, b) in actual.bodies.iter().zip(&expected.bodies) { + assert_eq!(a.name, b.name); + assert_eq!(a.component, b.component); + let (a, b) = (a.mesh(), b.mesh()); + assert_eq!(a.triangles, b.triangles); + assert_eq!(a.tri_face, b.tri_face); + assert_eq!(a.edge_faces, b.edge_faces); + assert_eq!(a.positions.len(), b.positions.len()); + assert_eq!(a.normals.len(), b.normals.len()); + for (a, b) in a.positions.iter().zip(&b.positions) { + assert!(a.dist(*b) < 1e-8); + } + for (a, b) in a.normals.iter().zip(&b.normals) { + assert!(a.dist(*b) < 1e-8); + } + } +} + +#[test] +fn geometry_independent_joint_drive_and_reach_keep_the_evaluated_model() { + let mut session = Session::default(); + let created = run(&mut session, "component.create", json!({"name":"Rotor","grounded":false})); + let occurrence = created["occurrence"].as_u64().unwrap(); + run(&mut session, "solid.box", json!({"length":2,"width":3,"height":4,"body_name":"Block"})); + run(&mut session, "joint.as_built", json!({"type":"revolute","name":"Turn","a":0,"b":"Rotor","at":{"occurrence":0,"point":[0,0,0],"z":[0,0,1]}})); + let definitions = session.model.state(); + for angle in [30_f64, -45., 90.] { + let before = session.evaluations; + let answer = run(&mut session, "joint.drive", json!({"joint":"Turn","value":angle,"quiet":true})); + assert_eq!(answer["errors"], json!([])); + assert_eq!(answer["conflicts"], json!([])); + assert_eq!(session.evaluations, before); + assert!(Arc::ptr_eq(&definitions, &session.model.state())); + let m = crate::doc::joints::occurrence_world(&session.doc, occurrence); + let expected = Vec3::new(2. * angle.to_radians().cos(), 2. * angle.to_radians().sin(), 0.); + assert!(crate::doc::apply_point(&m, Vec3::new(2., 0., 0.)).dist(expected) < 1e-8); + assert_fresh_world(&session); + } + let at = crate::doc::apply_point(&crate::doc::joints::occurrence_world(&session.doc, occurrence), Vec3::new(2., 0., 0.)); + let before = session.evaluations; + let answer = + run(&mut session, "joint.reach", json!({"occurrence":occurrence,"at":[at.x,at.y,at.z],"point":[2.,0.,0.],"quiet":true,"continuous":true})); + assert_eq!(answer["reached"], true, "{answer}"); + assert_eq!(session.evaluations, before); + assert!(Arc::ptr_eq(&definitions, &session.model.state())); + assert_fresh_world(&session); + for command in ["edit.undo", "edit.redo"] { + let before = session.evaluations; + run(&mut session, command, json!({})); + assert_eq!(session.evaluations, before); + assert_fresh_world(&session); + } +} + +#[test] +fn geometry_independent_fixed_sketch_extrusions_reuse_only_their_geometry() { + let mut session = Session::default(); + let created = run(&mut session, "component.create", json!({"name":"Part","grounded":false})); + let occurrence = created["occurrence"].as_u64().unwrap(); + run(&mut session, "sketch.create", json!({"plane":"XY"})); + run(&mut session, "sketch.rectangle.two_point", json!({"p0":[0,0],"p1":[2,3]})); + run(&mut session, "sketch.finish", json!({})); + run(&mut session, "solid.extrude", json!({"distance":4,"operation":"new"})); + let definitions = session.model.state(); + let before = session.evaluations; + run(&mut session, "occurrence.move", json!({"occurrence":occurrence,"translate":[10,0,0],"capture":true})); + assert_eq!(session.evaluations, before); + assert!(Arc::ptr_eq(&definitions, &session.model.state())); + assert_fresh_world(&session); + // An edit made directly before the move is not the model's evaluated input, even though + // the command itself changes only placement. The proof must name the evaluated document. + let sketch = session.doc.features.iter().find(|f| matches!(f.kind, crate::doc::FeatureKind::Sketch { .. })).unwrap().id; + session.doc_mut().sketch_mut(sketch).unwrap().points[1].pos.x += 1.; + let before = session.evaluations; + run(&mut session, "occurrence.move", json!({"occurrence":occurrence,"translate":[1,0,0],"capture":true})); + assert!(session.evaluations > before); + assert_fresh_world(&session); +} + +#[test] +fn placement_dependent_cross_component_cuts_still_evaluate_and_undo() { + use crate::doc::{Document, FeatureKind, Model, Operation, point_expr}; + let mut document = Document::new("cross-component placement dependency"); + let plate = document.add_component(Some("Plate"), 0).unwrap(); + let tools = document.add_component(Some("Tools"), 0).unwrap(); + for occurrence in &mut document.occurrences { + occurrence.grounded = occurrence.component == tools; + } + let feature = document + .add_feature( + FeatureKind::Box { + corner: point_expr(Vec3::ZERO), + length: "10".into(), + width: "10".into(), + height: "4".into(), + operation: Operation::NewBody, + }, + None, + ) + .unwrap(); + document.feature_mut(feature).unwrap().component = plate; + let mut model = Model::new(); + model.evaluate(&document); + let plate_body = model.state().bodies[0].name.clone(); + let feature = document + .add_feature( + FeatureKind::Box { + corner: point_expr(Vec3::new(4., 4., -1.)), + length: "2".into(), + width: "2".into(), + height: "6".into(), + operation: Operation::Cut, + }, + None, + ) + .unwrap(); + let feature = document.feature_mut(feature).unwrap(); + feature.component = tools; + feature.participants = vec![plate_body.clone()]; + let mut session = Session::new(document); + run(&mut session, "joint.as_built", json!({"type":"slider","name":"Slide","a":0,"b":"Plate","at":{"occurrence":0,"point":[0,0,0],"z":[1,0,0]}})); + assert!((session.model.state().body(&plate_body).unwrap().measure().unwrap().volume - 384.).abs() < 1e-7); + for (command, params, volume) in + [("joint.drive", json!({"joint":"Slide","value":5,"quiet":true}), 392.), ("edit.undo", json!({}), 384.), ("edit.redo", json!({}), 392.)] + { + let before = session.evaluations; + run(&mut session, command, params); + assert!(session.evaluations > before, "{command} must update the cut"); + assert!((session.model.state().body(&plate_body).unwrap().measure().unwrap().volume - volume).abs() < 1e-7); + assert_fresh_world(&session); + } +} + #[test] fn world_placement_cache_preserves_pending_picks_materials_scratch_and_named_joint_frames() { let mut session = Session::default(); diff --git a/docs/perf.md b/docs/perf.md index 6f36e29cb..597abdd99 100644 --- a/docs/perf.md +++ b/docs/perf.md @@ -902,3 +902,79 @@ edited New Body and Offset Face drag regressions fail while Join passes. With th all six distance-preview regressions pass, covering intermediate geometry, exact final convergence, unchanged document/undo, obsolete errors and setup changes. A separate regression checks the arrow's position on each held input frame. + +## Placement-only model reuse + +`Model::evaluate_shared(&Arc)` retains the document that produced a model and a weak +reference to that exact model state. A subsequent shared document can keep the model without +entering `Model::evaluate` when its geometry inputs are unchanged and all its features have +explicitly supported local inputs. Session opening and refresh use this entry point; drive, +reach, occurrence movement, scratch sessions and Undo/Redo share its decision. Joint solving, +motion traces, view revision and world placement still follow the normal refresh path. + +Eligibility is computed during ordinary evaluation with its existing feature-owner index. +The initial supported set is new-body boxes/cylinders/spheres/tori, embedded STEP/mesh imports, +sketches on explicit local planes without links or 3D wires, and new-body extrudes of their own +component's sketches without To Object, From Object or Through All. Other features, attachments, +failed/skipped/stale results, primed evaluation and `no_cache` retain ordinary evaluation. +The borrowed-document `evaluate` invalidates the retained proof. A saved model establishes a +shared-input proof on its first ordinary refresh; this does not change saved model formats. +Renaming results and adopting solved sketches also invalidate it: result labels and +fingerprints can change while the geometry state stays identical. + +Every non-placement document field and every feature field is compared explicitly. Immutable +import arrays/text are accepted by retained Arc identity; replacing an allocation conservatively +evaluates again, including an equal-content replacement. New fields of the document, feature, +mesh or supported feature variants require a decision in this comparison/eligibility policy. +There is still a linear comparison of lightweight feature definitions and result freshness on a +new document Arc. This is not a constant-time geometry revision system; the avoided work is the +evaluator, parameter/context preparation, fingerprints and imported-payload traversal. + +Regression tests in the existing placement-cache and evaluation-cost suites check zero timeline +evaluations, real world-space vertices/normals/topology against fresh evaluation, actual joint +poses, retained snapshots, scratch and Undo/Redo. Direct geometry/parameter changes, mesh payload +and metadata replacements, foreign model results, live sketches and unknown features invalidate +or retain the fallback. The cross-component cut control is a 10 x 10 x 4 mm plate and a 2 x 2 x +6 mm tool: after a 5 mm slider move it still evaluates to 392 mm3, undo to 384 mm3, redo to 392 mm3. + +### Release measurements (2026-10-25) + +Windows x64, Intel Core i9-14900K, Rust 1.99.0, release profile (opt-level 3, thin LTO, 16 codegen +units). Baseline is main `ac53fc1e6fab85a50bdc410178cc75133183393f`; the changed build adds only +this placement-reuse implementation. Each new process warms canonical meshes and eight operations, +then runs 64 alternating +10/-10 degree drives/reaches. Three pairs alternate which build runs +first. Numbers below are medians of the three per-run command/total medians, in milliseconds. +Total includes the command, world placement and canonical display/reference mesh preparation; +it excludes UI scene packing, GPU/presentation and input-to-photon latency. + +To separate additional benefit from #5480, a second comparison includes that same PR's +`4720ac3c3f296bfc1d957c0363c656bce8d845cd` implementation in both builds, preserving main's +feature-JSON and body-measurement caches when integrating it locally: + +| Case, with #5480 in both builds | Command before | Command after | Total before | Total after | +| --- | ---: | ---: | ---: | ---: | +| One moving component, 256 box bodies | 0.8599 | 0.5457 | 2.7114 | 2.3632 | +| SO-101 drive | 0.3829 | 0.1363 | 1.4217 | 1.1349 | +| SO-101 reach (the drag command) | 0.4024 | 0.1401 | 1.4474 | 1.1314 | +| Cross-component cut, fallback control | 0.0335 | 0.0339 | 0.0842 | 0.0866 | + +That is 36.5% less command time / 12.8% less total for 256 bodies, and 65.2% / 21.8% for SO-101 +reach in this integration. The fallback control has no intended speedup; its small absolute +variation is retained in the table. Against main alone, 256 bodies measure 0.8666 -> 0.5524 ms +command and 2.7039 -> 2.3913 ms total. SO-101 reach measures 2.8656 -> 0.1443 ms command and +4.0597 -> 1.1411 ms total; that larger difference overlaps #5480 and is not additive to it. + +Every pair agrees on all 64 command responses and occurrence matrices, the final world-space +position/normal/topology hash, body/triangle counts and Undo/Redo. SO-101 retains its public +13 bodies / 398,884 triangles; its input SHA-256 is +`a335456ea4fba3729d41f901374575c785a14d2c4e6bf3bb7081d64062f3f7cb`. + +A separate counting build uses #6465's recorder from `969c15c2`, with only the model-evaluation +and feature-fingerprint hooks wired. It records 1 evaluation / 256 fingerprints -> 0 / 0 for +256 boxes, and 1 / 1 -> 0 / 0 for SO-101 drive and reach. The cut control stays at 1 / 3. +The captures are complete for those two instrumented units; no claim is made about the other +recorder units. The control explicitly disables reuse while retaining the ordinary feature +cache. These counting-only hooks/switch are absent from the published source and timing builds. + +[Reproduction code, exact source/executable hashes and per-operation release samples](https://gist.github.com/takuto-NA/cf4c0c9a40f50d44e1b6cda96bba18bd) +cover both baseline contexts and the independent counting probe. From 95ff76cb9778578c719d96c4664d81da3aa14477 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:22:08 +0000 Subject: [PATCH 062/102] Regenerate generated files and fold pending files [skip ci] --- assets/locales/ar.json | 7 +++ assets/locales/en.json | 7 +++ assets/locales/he.json | 7 +++ assets/locales/ja.json | 7 +++ .../pending/agent-connect-at-start.json | 56 ------------------- assets/locales/vi.json | 7 +++ assets/locales/zh.json | 7 +++ 7 files changed, 42 insertions(+), 56 deletions(-) delete mode 100644 assets/locales/pending/agent-connect-at-start.json diff --git a/assets/locales/ar.json b/assets/locales/ar.json index eddd132ae..49fb2f332 100644 --- a/assets/locales/ar.json +++ b/assets/locales/ar.json @@ -631,6 +631,8 @@ "ai.prefs.background_commands": "تشغيل أوامر الوكيل في الخلفية", "ai.prefs.connect_apps": "إتاحة SolidCraft لتطبيقات الذكاء الاصطناعي على هذا الحاسوب", "ai.prefs.connect_apps_note": "عند بدء تشغيل SolidCraft، يُضاف كخادم MCP إلى تطبيقات الذكاء الاصطناعي الموجودة على هذا الحاسوب (OpenCode وClaude Desktop وClaude Code وCursor وCodex وGemini CLI وCopilot CLI وWindsurf وZed وVS Code)، ليتمكن الوكيل من استخدامه دون أي إعداد. لا يُضاف إلا مُدخل solidcraft أو يُحدَّث مساره؛ ويُترك المُدخل الذي غيّرته كما هو، ويُنسخ الملف احتياطيًا أولًا. عند الإيقاف تُزال المُدخلات التي أضافها. الأمر «المساعدة > ربط مساعدي الذكاء الاصطناعي…» يفعل ذلك يدويًا.", + "ai.prefs.connect_at_start": "الاتصال بآخر وكيل مستخدم عند بدء SolidCraft", + "ai.prefs.connect_at_start_note": "يبدأ في الخلفية الوكيل الذي اتصلت به آخر مرة (أو الوكيل الافتراضي) في كل مرة يبدأ فيها SolidCraft، ليكون جاهزًا للمحادثة. لا يحدث ذلك عند بدء SolidCraft مع --control. إذا تعذّر الاتصال، يعرض المساعد «فشل الاتصال» وزر «إعادة المحاولة».", "ai.prefs.follow_camera": "توجيه الكاميرا نحو الرسومات", "ai.prefs.follow_camera_off": "تتبّع الكاميرا التلقائي متوقف.", "ai.prefs.follow_camera_on": "تتجه الكاميرا نحو الرسومات التي ينشئها الوكيل.", @@ -638,6 +640,8 @@ "ai.prefs.make_default": "الاستخدام افتراضيًا", "ai.prefs.no_agents": "لا يوجد وكلاء بعد. أضف وكيلًا أو حدّث القائمة للعثور على الوكلاء المثبّتين.", "ai.prefs.no_saved_approvals": "لا توجد موافقات محفوظة.", + "ai.prefs.open_at_start": "فتح لوحة المساعد عند بدء SolidCraft", + "ai.prefs.open_at_start_note": "يعرض لوحة المساعد (أو نافذتها المستقلة) في كل مرة يبدأ فيها SolidCraft. لا يحدث ذلك عند بدء SolidCraft مع --control.", "ai.prefs.override_all_warning": "قد يحفظ هذا الوكيل التصميم أو يكتب فوقه أو يصدّره أو يستبدله دون أن يسأل.", "ai.prefs.permission_all": "السماح بكل شيء", "ai.prefs.permission_all_summary": "تعمل أدوات SolidCraft المتاحة دون سؤال.", @@ -2475,6 +2479,7 @@ "ui.agent_chat_import_failed": "{name}: فشل الاستيراد: {error}", "ui.agent_chat_intro": "تحدّث مع وكيل برمجي تستخدمه أصلًا، أو مع نقطة نهاية نموذج تختارها. يعمل على التصميم المفتوح عبر أدوات SolidCraft: تظهر تغييراته أثناء إجرائها، وتُلغى بخطوة تراجع واحدة لكل رسالة. ما يمكنه فعله دون سؤال يُضبط في التفضيلات › الذكاء الاصطناعي.", "ui.agent_chat_key_in_env": "المفتاح مضبوط", + "ui.agent_chat_last_missing": "الوكيل المستخدم آخر مرة ({agent}) لم يعد متاحًا. اختر وكيلًا، ثم اضغط «إعادة المحاولة».", "ui.agent_chat_left": "يسار", "ui.agent_chat_limit": "بلغ الوكيل حد {limit} تغييرات للرسالة الواحدة. أرسل رسالة أخرى ليتابع.", "ui.agent_chat_login_found": "تم العثور على تسجيل دخول", @@ -2521,6 +2526,7 @@ "ui.agent_chat_remove": "إزالة من قائمة الانتظار", "ui.agent_chat_remove_file": "إزالته من هذه الرسالة", "ui.agent_chat_remove_imported": "إزالته من هذه الرسالة؛ تبقى القطعة في التصميم (التراجع يزيلها)", + "ui.agent_chat_retry": "إعادة المحاولة", "ui.agent_chat_right": "يمين", "ui.agent_chat_save": "حفظ", "ui.agent_chat_send": "إرسال", @@ -2533,6 +2539,7 @@ "ui.agent_chat_state_auth": "يلزم تسجيل الدخول", "ui.agent_chat_state_busy": "جارٍ العمل…", "ui.agent_chat_state_exited": "توقف الوكيل", + "ui.agent_chat_state_failed": "فشل الاتصال", "ui.agent_chat_state_off": "غير متصل", "ui.agent_chat_state_ready": "جاهز", "ui.agent_chat_state_starting": "جارٍ البدء…", diff --git a/assets/locales/en.json b/assets/locales/en.json index 26542b269..3a92922d7 100644 --- a/assets/locales/en.json +++ b/assets/locales/en.json @@ -631,6 +631,8 @@ "ai.prefs.background_commands": "Run agent commands in the background", "ai.prefs.connect_apps": "Make SolidCraft available to AI apps on this computer", "ai.prefs.connect_apps_note": "When SolidCraft starts, adds it as an MCP server to the AI apps found on this computer (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), so an agent can use it without any setup. Only the solidcraft entry is added or its path refreshed; an entry you changed is left alone, and the file is backed up first. Off: the entries it added are removed. Help > Connect AI assistants… does this by hand.", + "ai.prefs.connect_at_start": "Connect the last-used agent when SolidCraft starts", + "ai.prefs.connect_at_start_note": "Starts the agent you connected last (or the default one) in the background each time SolidCraft starts, so it is ready for chatting. Not when SolidCraft is started with --control. If it cannot connect, the Assistant shows Connection failed and a Retry button.", "ai.prefs.follow_camera": "Turn the camera to sketches", "ai.prefs.follow_camera_off": "Automatic camera following is off.", "ai.prefs.follow_camera_on": "The camera turns to face sketches the agent creates.", @@ -638,6 +640,8 @@ "ai.prefs.make_default": "Use by default", "ai.prefs.no_agents": "No agents yet. Add an agent or refresh to find installed agents.", "ai.prefs.no_saved_approvals": "No saved approvals.", + "ai.prefs.open_at_start": "Open the Assistant panel when SolidCraft starts", + "ai.prefs.open_at_start_note": "Shows the Assistant panel (or its own window) each time SolidCraft starts. Not when SolidCraft is started with --control.", "ai.prefs.override_all_warning": "This agent may save, overwrite, export or replace the design without asking.", "ai.prefs.permission_all": "Allow everything", "ai.prefs.permission_all_summary": "Available SolidCraft tools run without asking.", @@ -2475,6 +2479,7 @@ "ui.agent_chat_import_failed": "{name}: the import failed: {error}", "ui.agent_chat_intro": "Chat with a coding agent you already use, or a model endpoint you choose. It works on the open design through SolidCraft's tools: its changes show as it makes them and undo as one step per message. What it may do without asking is set in Preferences > AI.", "ui.agent_chat_key_in_env": "key set", + "ui.agent_chat_last_missing": "The agent used last ({agent}) is not available any more. Pick an agent, then press Retry.", "ui.agent_chat_left": "Left", "ui.agent_chat_limit": "The agent reached the limit of {limit} changes for one message. Send another message to let it go on.", "ui.agent_chat_login_found": "login found", @@ -2521,6 +2526,7 @@ "ui.agent_chat_remove": "Remove from the queue", "ui.agent_chat_remove_file": "Take it off this message", "ui.agent_chat_remove_imported": "Take it off this message; the part stays in the design (Undo removes it)", + "ui.agent_chat_retry": "Retry", "ui.agent_chat_right": "Right", "ui.agent_chat_save": "Save", "ui.agent_chat_send": "Send", @@ -2533,6 +2539,7 @@ "ui.agent_chat_state_auth": "Sign-in needed", "ui.agent_chat_state_busy": "Working…", "ui.agent_chat_state_exited": "Agent stopped", + "ui.agent_chat_state_failed": "Connection failed", "ui.agent_chat_state_off": "Not connected", "ui.agent_chat_state_ready": "Ready", "ui.agent_chat_state_starting": "Starting…", diff --git a/assets/locales/he.json b/assets/locales/he.json index 9ebba361d..bf0cf493f 100644 --- a/assets/locales/he.json +++ b/assets/locales/he.json @@ -631,6 +631,8 @@ "ai.prefs.background_commands": "הרצת פקודות הסוכן ברקע", "ai.prefs.connect_apps": "הנגשת SolidCraft ליישומי בינה מלאכותית במחשב זה", "ai.prefs.connect_apps_note": "בהפעלת SolidCraft הוא מתווסף כשרת MCP ליישומי הבינה המלאכותית שנמצאו במחשב זה (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), כך שסוכן יכול להשתמש בו בלי שום הגדרה. רק הרשומה solidcraft נוספת או שהנתיב שלה מתעדכן; רשומה ששינית נשארת כפי שהיא, ולפני כן נשמר גיבוי של הקובץ. כבוי: הרשומות שנוספו מוסרות. הפקודה עזרה > חיבור עוזרי בינה מלאכותית… עושה זאת ידנית.", + "ai.prefs.connect_at_start": "התחברות לסוכן האחרון שבו השתמשת בהפעלת SolidCraft", + "ai.prefs.connect_at_start_note": "מפעיל ברקע את הסוכן שאליו התחברת לאחרונה (או את סוכן ברירת המחדל) בכל הפעלה של SolidCraft, כך שהוא מוכן לשיחה. לא כש-SolidCraft מופעל עם --control. אם ההתחברות נכשלת, העוזר מציג „ההתחברות נכשלה” ולחצן „ניסיון חוזר”.", "ai.prefs.follow_camera": "הפניית המצלמה אל סקיצות", "ai.prefs.follow_camera_off": "מעקב המצלמה האוטומטי כבוי.", "ai.prefs.follow_camera_on": "המצלמה פונה אל הסקיצות שהסוכן יוצר.", @@ -638,6 +640,8 @@ "ai.prefs.make_default": "שימוש כברירת מחדל", "ai.prefs.no_agents": "אין עדיין סוכנים. אפשר להוסיף סוכן או לרענן כדי למצוא סוכנים מותקנים.", "ai.prefs.no_saved_approvals": "אין אישורים שמורים.", + "ai.prefs.open_at_start": "פתיחת חלונית העוזר בהפעלת SolidCraft", + "ai.prefs.open_at_start_note": "מציג את חלונית העוזר (או את החלון הנפרד שלה) בכל הפעלה של SolidCraft. לא כש-SolidCraft מופעל עם --control.", "ai.prefs.override_all_warning": "הסוכן הזה עשוי לשמור, לדרוס, לייצא או להחליף את התכן בלי לשאול.", "ai.prefs.permission_all": "התרת הכול", "ai.prefs.permission_all_summary": "כלי SolidCraft הזמינים פועלים בלי לשאול.", @@ -2475,6 +2479,7 @@ "ui.agent_chat_import_failed": "{name}: הייבוא נכשל: {error}", "ui.agent_chat_intro": "צ'אט עם סוכן קוד שכבר נמצא בשימוש, או עם נקודת קצה של מודל לבחירתך. הסוכן עובד על התכן הפתוח דרך הכלים של SolidCraft: השינויים מוצגים תוך כדי ביצוע, וכל הודעה מתבטלת כצעד אחד. מה מותר לו לעשות בלי לשאול נקבע בהעדפות > AI.", "ui.agent_chat_key_in_env": "מפתח מוגדר", + "ui.agent_chat_last_missing": "הסוכן שבו השתמשת לאחרונה ({agent}) כבר אינו זמין. בחר סוכן ולחץ על „ניסיון חוזר”.", "ui.agent_chat_left": "שמאל", "ui.agent_chat_limit": "הסוכן הגיע למגבלה של {limit} שינויים להודעה אחת. יש לשלוח הודעה נוספת כדי שימשיך.", "ui.agent_chat_login_found": "נמצאה התחברות", @@ -2521,6 +2526,7 @@ "ui.agent_chat_remove": "הסרה מהתור", "ui.agent_chat_remove_file": "הסרה מההודעה הזו", "ui.agent_chat_remove_imported": "הסרה מההודעה הזו; החלק נשאר בתכן (ביטול מסיר אותו)", + "ui.agent_chat_retry": "ניסיון חוזר", "ui.agent_chat_right": "ימין", "ui.agent_chat_save": "שמירה", "ui.agent_chat_send": "שליחה", @@ -2533,6 +2539,7 @@ "ui.agent_chat_state_auth": "נדרשת התחברות", "ui.agent_chat_state_busy": "עובד…", "ui.agent_chat_state_exited": "הסוכן נעצר", + "ui.agent_chat_state_failed": "ההתחברות נכשלה", "ui.agent_chat_state_off": "לא מחובר", "ui.agent_chat_state_ready": "מוכן", "ui.agent_chat_state_starting": "מופעל…", diff --git a/assets/locales/ja.json b/assets/locales/ja.json index 9c22fde70..08dc52c77 100644 --- a/assets/locales/ja.json +++ b/assets/locales/ja.json @@ -631,6 +631,8 @@ "ai.prefs.background_commands": "エージェントのコマンドをバックグラウンドで実行", "ai.prefs.connect_apps": "このコンピューターの AI アプリで SolidCraft を使えるようにする", "ai.prefs.connect_apps_note": "SolidCraft の起動時に、このコンピューターで見つかった AI アプリ(OpenCode、Claude Desktop、Claude Code、Cursor、Codex、Gemini CLI、Copilot CLI、Windsurf、Zed、VS Code)へ MCP サーバーとして追加します。追加または更新するのは solidcraft のエントリのみで、変更済みのエントリには触れず、ファイルは先にバックアップされます。オフにすると追加したエントリを削除します。", + "ai.prefs.connect_at_start": "SolidCraft の起動時に前回使用したエージェントに接続", + "ai.prefs.connect_at_start_note": "SolidCraft を起動するたびに、前回接続したエージェント (またはデフォルトのエージェント) をバックグラウンドで起動し、すぐにチャットできるようにします。--control を付けて起動した場合は行いません。接続できない場合、アシスタントに「接続に失敗しました」と「再試行」ボタンが表示されます。", "ai.prefs.follow_camera": "カメラをスケッチに向ける", "ai.prefs.follow_camera_off": "カメラの自動追従はオフです。", "ai.prefs.follow_camera_on": "エージェントが作成するスケッチにカメラを向けます。", @@ -638,6 +640,8 @@ "ai.prefs.make_default": "既定にする", "ai.prefs.no_agents": "エージェントはまだありません。追加するか、更新してインストール済みのエージェントを検索してください。", "ai.prefs.no_saved_approvals": "保存された許可はありません。", + "ai.prefs.open_at_start": "SolidCraft の起動時にアシスタントパネルを開く", + "ai.prefs.open_at_start_note": "SolidCraft を起動するたびにアシスタントパネル (または独立したウィンドウ) を表示します。--control を付けて起動した場合は行いません。", "ai.prefs.override_all_warning": "このエージェントは確認せずに設計を保存、上書き、書き出し、置換できます。", "ai.prefs.permission_all": "すべて許可", "ai.prefs.permission_all_summary": "利用可能なSolidCraftツールを確認せず実行します。", @@ -2475,6 +2479,7 @@ "ui.agent_chat_import_failed": "{name}: インポートに失敗しました: {error}", "ui.agent_chat_intro": "普段使っているコーディングエージェント、または選んだモデルのエンドポイントとチャットできます。SolidCraft のツールで開いているデザインを操作し、変更はその場で表示され、メッセージごとに1回で元に戻せます。確認なしで許可する範囲は「環境設定 > AI」で設定します。", "ui.agent_chat_key_in_env": "キー設定済み", + "ui.agent_chat_last_missing": "前回使用したエージェント ({agent}) は利用できなくなりました。エージェントを選んでから「再試行」を押してください。", "ui.agent_chat_left": "左", "ui.agent_chat_limit": "エージェントが1メッセージあたりの変更上限 {limit} に達しました。続けさせるには、もう一度メッセージを送ってください。", "ui.agent_chat_login_found": "ログイン情報あり", @@ -2521,6 +2526,7 @@ "ui.agent_chat_remove": "待機から削除", "ui.agent_chat_remove_file": "このメッセージから外す", "ui.agent_chat_remove_imported": "このメッセージから外します。パーツはデザインに残ります (元に戻すで削除できます)", + "ui.agent_chat_retry": "再試行", "ui.agent_chat_right": "右", "ui.agent_chat_save": "保存", "ui.agent_chat_send": "送信", @@ -2533,6 +2539,7 @@ "ui.agent_chat_state_auth": "サインインが必要", "ui.agent_chat_state_busy": "作業中…", "ui.agent_chat_state_exited": "エージェント停止", + "ui.agent_chat_state_failed": "接続に失敗しました", "ui.agent_chat_state_off": "未接続", "ui.agent_chat_state_ready": "準備完了", "ui.agent_chat_state_starting": "起動中…", diff --git a/assets/locales/pending/agent-connect-at-start.json b/assets/locales/pending/agent-connect-at-start.json deleted file mode 100644 index 07366ad00..000000000 --- a/assets/locales/pending/agent-connect-at-start.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "en": { - "ai.prefs.connect_at_start": "Connect the last-used agent when SolidCraft starts", - "ai.prefs.connect_at_start_note": "Starts the agent you connected last (or the default one) in the background each time SolidCraft starts, so it is ready for chatting. Not when SolidCraft is started with --control. If it cannot connect, the Assistant shows Connection failed and a Retry button.", - "ai.prefs.open_at_start": "Open the Assistant panel when SolidCraft starts", - "ai.prefs.open_at_start_note": "Shows the Assistant panel (or its own window) each time SolidCraft starts. Not when SolidCraft is started with --control.", - "ui.agent_chat_last_missing": "The agent used last ({agent}) is not available any more. Pick an agent, then press Retry.", - "ui.agent_chat_retry": "Retry", - "ui.agent_chat_state_failed": "Connection failed" - }, - "ar": { - "ai.prefs.connect_at_start": "الاتصال بآخر وكيل مستخدم عند بدء SolidCraft", - "ai.prefs.connect_at_start_note": "يبدأ في الخلفية الوكيل الذي اتصلت به آخر مرة (أو الوكيل الافتراضي) في كل مرة يبدأ فيها SolidCraft، ليكون جاهزًا للمحادثة. لا يحدث ذلك عند بدء SolidCraft مع --control. إذا تعذّر الاتصال، يعرض المساعد «فشل الاتصال» وزر «إعادة المحاولة».", - "ai.prefs.open_at_start": "فتح لوحة المساعد عند بدء SolidCraft", - "ai.prefs.open_at_start_note": "يعرض لوحة المساعد (أو نافذتها المستقلة) في كل مرة يبدأ فيها SolidCraft. لا يحدث ذلك عند بدء SolidCraft مع --control.", - "ui.agent_chat_last_missing": "الوكيل المستخدم آخر مرة ({agent}) لم يعد متاحًا. اختر وكيلًا، ثم اضغط «إعادة المحاولة».", - "ui.agent_chat_retry": "إعادة المحاولة", - "ui.agent_chat_state_failed": "فشل الاتصال" - }, - "he": { - "ai.prefs.connect_at_start": "התחברות לסוכן האחרון שבו השתמשת בהפעלת SolidCraft", - "ai.prefs.connect_at_start_note": "מפעיל ברקע את הסוכן שאליו התחברת לאחרונה (או את סוכן ברירת המחדל) בכל הפעלה של SolidCraft, כך שהוא מוכן לשיחה. לא כש-SolidCraft מופעל עם --control. אם ההתחברות נכשלת, העוזר מציג „ההתחברות נכשלה” ולחצן „ניסיון חוזר”.", - "ai.prefs.open_at_start": "פתיחת חלונית העוזר בהפעלת SolidCraft", - "ai.prefs.open_at_start_note": "מציג את חלונית העוזר (או את החלון הנפרד שלה) בכל הפעלה של SolidCraft. לא כש-SolidCraft מופעל עם --control.", - "ui.agent_chat_last_missing": "הסוכן שבו השתמשת לאחרונה ({agent}) כבר אינו זמין. בחר סוכן ולחץ על „ניסיון חוזר”.", - "ui.agent_chat_retry": "ניסיון חוזר", - "ui.agent_chat_state_failed": "ההתחברות נכשלה" - }, - "ja": { - "ai.prefs.connect_at_start": "SolidCraft の起動時に前回使用したエージェントに接続", - "ai.prefs.connect_at_start_note": "SolidCraft を起動するたびに、前回接続したエージェント (またはデフォルトのエージェント) をバックグラウンドで起動し、すぐにチャットできるようにします。--control を付けて起動した場合は行いません。接続できない場合、アシスタントに「接続に失敗しました」と「再試行」ボタンが表示されます。", - "ai.prefs.open_at_start": "SolidCraft の起動時にアシスタントパネルを開く", - "ai.prefs.open_at_start_note": "SolidCraft を起動するたびにアシスタントパネル (または独立したウィンドウ) を表示します。--control を付けて起動した場合は行いません。", - "ui.agent_chat_last_missing": "前回使用したエージェント ({agent}) は利用できなくなりました。エージェントを選んでから「再試行」を押してください。", - "ui.agent_chat_retry": "再試行", - "ui.agent_chat_state_failed": "接続に失敗しました" - }, - "vi": { - "ai.prefs.connect_at_start": "Kết nối tác tử dùng gần nhất khi SolidCraft khởi động", - "ai.prefs.connect_at_start_note": "Mỗi lần SolidCraft khởi động, chạy ngầm tác tử bạn kết nối gần nhất (hoặc tác tử mặc định) để sẵn sàng trò chuyện. Không áp dụng khi SolidCraft được khởi động với --control. Nếu không kết nối được, Trợ lý hiển thị “Kết nối thất bại” và nút “Thử lại”.", - "ai.prefs.open_at_start": "Mở bảng Trợ lý khi SolidCraft khởi động", - "ai.prefs.open_at_start_note": "Hiển thị bảng Trợ lý (hoặc cửa sổ riêng của nó) mỗi lần SolidCraft khởi động. Không áp dụng khi SolidCraft được khởi động với --control.", - "ui.agent_chat_last_missing": "Tác tử dùng gần nhất ({agent}) không còn khả dụng. Hãy chọn một tác tử rồi nhấn “Thử lại”.", - "ui.agent_chat_retry": "Thử lại", - "ui.agent_chat_state_failed": "Kết nối thất bại" - }, - "zh": { - "ai.prefs.connect_at_start": "SolidCraft 启动时连接上次使用的智能体", - "ai.prefs.connect_at_start_note": "每次启动 SolidCraft 时,在后台启动上次连接的智能体(或默认智能体),以便随时开始聊天。使用 --control 启动 SolidCraft 时不会这样做。如果无法连接,助手会显示“连接失败”和“重试”按钮。", - "ai.prefs.open_at_start": "SolidCraft 启动时打开助手面板", - "ai.prefs.open_at_start_note": "每次启动 SolidCraft 时显示助手面板(或其独立窗口)。使用 --control 启动 SolidCraft 时不会这样做。", - "ui.agent_chat_last_missing": "上次使用的智能体({agent})已不可用。请选择一个智能体,然后按“重试”。", - "ui.agent_chat_retry": "重试", - "ui.agent_chat_state_failed": "连接失败" - } -} diff --git a/assets/locales/vi.json b/assets/locales/vi.json index 05ff32de4..0b3e50108 100644 --- a/assets/locales/vi.json +++ b/assets/locales/vi.json @@ -631,6 +631,8 @@ "ai.prefs.background_commands": "Chạy các lệnh của agent dưới nền", "ai.prefs.connect_apps": "Cho phép các ứng dụng AI trên máy tính này kết nối với SolidCraft", "ai.prefs.connect_apps_note": "Khi SolidCraft khởi động, tự động thêm phần mềm dưới dạng MCP server vào các ứng dụng AI tìm thấy trên máy tính này (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code) để AI agent có thể sử dụng ngay mà không cần cấu hình thủ công. Chỉ mục cấu hình solidcraft sẽ được thêm mới hoặc làm mới đường dẫn; các mục bạn tự tùy chỉnh sẽ được giữ nguyên và file được sao lưu .bak trước khi sửa. Tắt: các mục đã thêm sẽ được gỡ bỏ. Trợ giúp > Kết nối trợ lý ảo AI… để thực hiện thủ công.", + "ai.prefs.connect_at_start": "Kết nối tác tử dùng gần nhất khi SolidCraft khởi động", + "ai.prefs.connect_at_start_note": "Mỗi lần SolidCraft khởi động, chạy ngầm tác tử bạn kết nối gần nhất (hoặc tác tử mặc định) để sẵn sàng trò chuyện. Không áp dụng khi SolidCraft được khởi động với --control. Nếu không kết nối được, Trợ lý hiển thị “Kết nối thất bại” và nút “Thử lại”.", "ai.prefs.follow_camera": "Xoay camera theo phác thảo", "ai.prefs.follow_camera_off": "Tự động xoay camera theo phác thảo đang tắt.", "ai.prefs.follow_camera_on": "Camera sẽ tự động xoay vuông góc với phác thảo do agent tạo.", @@ -638,6 +640,8 @@ "ai.prefs.make_default": "Đặt làm mặc định", "ai.prefs.no_agents": "Chưa có agent nào. Thêm một agent hoặc làm mới để tìm các agent đã cài đặt.", "ai.prefs.no_saved_approvals": "Chưa có phê duyệt nào được lưu.", + "ai.prefs.open_at_start": "Mở bảng Trợ lý khi SolidCraft khởi động", + "ai.prefs.open_at_start_note": "Hiển thị bảng Trợ lý (hoặc cửa sổ riêng của nó) mỗi lần SolidCraft khởi động. Không áp dụng khi SolidCraft được khởi động với --control.", "ai.prefs.override_all_warning": "Agent này có thể lưu, ghi đè, xuất hoặc thay thế thiết kế mà không cần hỏi trước.", "ai.prefs.permission_all": "Cho phép tất cả", "ai.prefs.permission_all_summary": "Các công cụ SolidCraft khả dụng sẽ chạy mà không cần hỏi trước.", @@ -2475,6 +2479,7 @@ "ui.agent_chat_import_failed": "{name}: nhập tệp thất bại: {error}", "ui.agent_chat_intro": "Trò chuyện với tác tử lập trình (AI agent) bạn đang dùng hoặc một điểm cuối mô hình bạn chọn. AI thao tác trên thiết kế đang mở thông qua các công cụ của SolidCraft: các thay đổi hiển thị ngay khi thực hiện và có thể hoàn tác theo từng bước cho mỗi tin nhắn. Các thao tác AI được phép thực hiện mà không cần hỏi được đặt trong Tùy chọn cài đặt > AI.", "ui.agent_chat_key_in_env": "đã đặt khóa", + "ui.agent_chat_last_missing": "Tác tử dùng gần nhất ({agent}) không còn khả dụng. Hãy chọn một tác tử rồi nhấn “Thử lại”.", "ui.agent_chat_left": "Trái", "ui.agent_chat_limit": "AI Agent đã đạt giới hạn {limit} thay đổi cho một tin nhắn. Hãy gửi tin nhắn tiếp theo để tiếp tục.", "ui.agent_chat_login_found": "đã tìm thấy thông tin đăng nhập", @@ -2521,6 +2526,7 @@ "ui.agent_chat_remove": "Xóa khỏi hàng đợi", "ui.agent_chat_remove_file": "Bỏ tệp này khỏi tin nhắn", "ui.agent_chat_remove_imported": "Gỡ khỏi tin nhắn này; chi tiết vẫn nằm trong thiết kế (sử dụng Hoàn tác để xóa)", + "ui.agent_chat_retry": "Thử lại", "ui.agent_chat_right": "Phải (Hình chiếu cạnh)", "ui.agent_chat_save": "Lưu", "ui.agent_chat_send": "Gửi", @@ -2533,6 +2539,7 @@ "ui.agent_chat_state_auth": "Cần đăng nhập", "ui.agent_chat_state_busy": "Đang xử lý…", "ui.agent_chat_state_exited": "Tác tử đã dừng", + "ui.agent_chat_state_failed": "Kết nối thất bại", "ui.agent_chat_state_off": "Chưa kết nối", "ui.agent_chat_state_ready": "Sẵn sàng", "ui.agent_chat_state_starting": "Đang khởi động…", diff --git a/assets/locales/zh.json b/assets/locales/zh.json index b7fe567fa..2a3ce9f20 100644 --- a/assets/locales/zh.json +++ b/assets/locales/zh.json @@ -631,6 +631,8 @@ "ai.prefs.background_commands": "在后台执行代理命令", "ai.prefs.connect_apps": "让此电脑上的 AI 应用可以使用 SolidCraft", "ai.prefs.connect_apps_note": "SolidCraft 启动时,会把自己作为 MCP 服务器添加到此电脑上找到的 AI 应用(OpenCode、Claude Desktop、Claude Code、Cursor、Codex、Gemini CLI、Copilot CLI、Windsurf、Zed、VS Code)。只添加或更新 solidcraft 条目;你修改过的条目不会被改动,文件会先备份。关闭后,会删除它添加的条目。", + "ai.prefs.connect_at_start": "SolidCraft 启动时连接上次使用的智能体", + "ai.prefs.connect_at_start_note": "每次启动 SolidCraft 时,在后台启动上次连接的智能体(或默认智能体),以便随时开始聊天。使用 --control 启动 SolidCraft 时不会这样做。如果无法连接,助手会显示“连接失败”和“重试”按钮。", "ai.prefs.follow_camera": "将相机转向草图", "ai.prefs.follow_camera_off": "相机自动跟随已关闭。", "ai.prefs.follow_camera_on": "相机将转向代理创建的草图。", @@ -638,6 +640,8 @@ "ai.prefs.make_default": "设为默认", "ai.prefs.no_agents": "尚无代理。添加代理或刷新以查找已安装的代理。", "ai.prefs.no_saved_approvals": "没有已保存的批准。", + "ai.prefs.open_at_start": "SolidCraft 启动时打开助手面板", + "ai.prefs.open_at_start_note": "每次启动 SolidCraft 时显示助手面板(或其独立窗口)。使用 --control 启动 SolidCraft 时不会这样做。", "ai.prefs.override_all_warning": "此代理可在不询问的情况下保存、覆盖、导出或替换设计。", "ai.prefs.permission_all": "全部允许", "ai.prefs.permission_all_summary": "可用的 SolidCraft 工具无需询问即可运行。", @@ -2475,6 +2479,7 @@ "ui.agent_chat_import_failed": "{name}:导入失败:{error}", "ui.agent_chat_intro": "与你已在使用的编程智能体或你选择的模型端点聊天。它通过 SolidCraft 的工具处理打开的设计:更改即时显示,每条消息的更改可一步撤销。无需询问即可执行的范围在“首选项 > AI”中设置。", "ui.agent_chat_key_in_env": "已设置密钥", + "ui.agent_chat_last_missing": "上次使用的智能体({agent})已不可用。请选择一个智能体,然后按“重试”。", "ui.agent_chat_left": "左侧", "ui.agent_chat_limit": "智能体已达到每条消息 {limit} 项更改的上限。再发送一条消息可让它继续。", "ui.agent_chat_login_found": "已找到登录信息", @@ -2521,6 +2526,7 @@ "ui.agent_chat_remove": "从队列中移除", "ui.agent_chat_remove_file": "从这条消息中移除", "ui.agent_chat_remove_imported": "从这条消息中移除;零件仍保留在设计中(撤销可将其删除)", + "ui.agent_chat_retry": "重试", "ui.agent_chat_right": "右侧", "ui.agent_chat_save": "保存", "ui.agent_chat_send": "发送", @@ -2533,6 +2539,7 @@ "ui.agent_chat_state_auth": "需要登录", "ui.agent_chat_state_busy": "工作中…", "ui.agent_chat_state_exited": "智能体已停止", + "ui.agent_chat_state_failed": "连接失败", "ui.agent_chat_state_off": "未连接", "ui.agent_chat_state_ready": "就绪", "ui.agent_chat_state_starting": "正在启动…", From 236b5c9ebf001fe84f3022ca244348b19e82f0e3 Mon Sep 17 00:00:00 2001 From: raykholo Date: Tue, 27 Oct 2026 17:46:31 +0000 Subject: [PATCH 063/102] Add the built-in 1-bit and 1-bit Dark themes (#7550) (#7557) --- assets/styles/ui/palettes.rs | 2 + assets/styles/ui/themes/1-bit-dark.json | 247 +++++++++++++++++++++ assets/styles/ui/themes/1-bit.json | 247 +++++++++++++++++++++ assets/styles/ui/themes/cga.json | 1 + attribution/pending/theme-1-bit.md | 2 + crates/ui-egui/src/colour_vision_tests.rs | 1 + crates/ui-egui/src/icon_svg.rs | 3 +- crates/ui-egui/src/theme.rs | 2 + crates/ui-egui/src/theme_files.rs | 105 ++++++++- crates/ui-egui/src/ui_kit/actions.rs | 8 +- crates/ui-egui/src/ui_kit/actions_tests.rs | 48 ++++ crates/ui-egui/src/ui_kit/checks.rs | 2 +- crates/ui-egui/src/ui_kit/fields.rs | 9 +- crates/ui-egui/src/ui_kit/fields_tests.rs | 27 ++- docs/book/src/guide/ui-tour.md | 10 +- 15 files changed, 695 insertions(+), 19 deletions(-) create mode 100644 assets/styles/ui/themes/1-bit-dark.json create mode 100644 assets/styles/ui/themes/1-bit.json create mode 100644 attribution/pending/theme-1-bit.md diff --git a/assets/styles/ui/palettes.rs b/assets/styles/ui/palettes.rs index cf1fda870..e535b3b1e 100644 --- a/assets/styles/ui/palettes.rs +++ b/assets/styles/ui/palettes.rs @@ -73,6 +73,7 @@ impl Tokens { form_ink: Color32::from_rgb(27, 36, 48), form_dim: Color32::from_rgb(74, 88, 104), form_primary: Color32::from_rgb(35, 110, 173), + form_primary_fill: Color32::from_rgb(35, 110, 173), form_error: Color32::from_rgb(161, 52, 44), form_error_fill: Color32::from_rgb(252, 239, 237), form_success: Color32::from_rgb(39, 107, 44), @@ -363,6 +364,7 @@ impl Tokens { t.form_ink = t.text; t.form_dim = Color32::from_rgb(180, 187, 200); t.form_primary = t.accent; + t.form_primary_fill = t.form_primary; t.form_error = t.error; t.form_error_fill = t.timeline_item_error; t.form_success = Color32::from_rgb(143, 219, 154); diff --git a/assets/styles/ui/themes/1-bit-dark.json b/assets/styles/ui/themes/1-bit-dark.json new file mode 100644 index 000000000..cea69a7a9 --- /dev/null +++ b/assets/styles/ui/themes/1-bit-dark.json @@ -0,0 +1,247 @@ +{ + "base": "dark", + "colors": { + "accent": "#ffffff", + "accent_soft": "#000000", + "agent_busy": "#ffffff", + "agent_ok": "#ffffff", + "app_bar": "#000000", + "app_bar_hover": "#000000", + "app_bar_hover_button": "#000000", + "app_bar_hover_strong": "#000000", + "app_bar_hover_subtle": "#000000", + "app_bar_separator": "#ffffff", + "app_bar_tab_active": "#000000", + "app_bar_text": "#ffffff", + "axis_x": "#ffffff", + "axis_y": "#ffffff", + "axis_z": "#ffffff", + "bend_down": "#ffffff", + "bend_up": "#ffffff", + "body": "#000000", + "body_edge": "#ffffff", + "body_selected": "#ffffff", + "border": "#ffffff", + "box_crossing": "#ffffff", + "box_window": "#ffffff", + "chip": "#ffffff", + "construction_geom": "#ffffff", + "construction_plane": "#000000", + "continuity": [ + "#ffffff", + "#ffffff", + "#ffffff", + "#ffffff" + ], + "control_border": "#ffffff", + "control_fill": "#000000", + "cube_border": "#ffffff", + "cube_face": "#000000", + "cube_hover": "#000000", + "cube_text": "#ffffff", + "dialog_bg": "#000000", + "dialog_body": "#000000", + "dialog_border": "#ffffff", + "dialog_footer": "#000000", + "dialog_label": "#ffffff", + "dialog_rule": "#ffffff", + "dimension": "#ffffff", + "dimension_driven": "#ffffff", + "error": "#ffffff", + "field": "#000000", + "file_background": "#000000", + "file_border": "#ffffff", + "file_dim": "#ffffff", + "file_image_tint": "#ffffff", + "file_primary": "#000000", + "file_primary_border": "#ffffff", + "file_primary_ink": "#ffffff", + "file_rail": "#000000", + "file_rail_hover": "#000000", + "file_rail_ink": "#ffffff", + "file_recovery": "#000000", + "file_recovery_border": "#ffffff", + "file_recovery_ink": "#ffffff", + "file_recovery_well": "#000000", + "file_surface": "#000000", + "form_accent": "#ffffff", + "form_dim": "#ffffff", + "form_error": "#ffffff", + "form_error_fill": "#000000", + "form_fill": "#ffffff", + "form_ink": "#ffffff", + "form_primary": "#000000", + "form_primary_fill": "#ffffff", + "form_soft": "#000000", + "form_success": "#ffffff", + "form_success_fill": "#000000", + "form_tab_ink": "#ffffff", + "glyph_bg": "#000000", + "glyph_edge": "#ffffff", + "glyph_text": "#ffffff", + "grid": "#000000", + "grid_major": "#ffffff", + "hover": "#000000", + "hover_edge": "#ffffff", + "hover_edge_halo": "#000000", + "hover_profile": "#ffffff", + "hover_profile_edge": "#000000", + "icon": "#ffffff", + "icons.agent": "#ffffff", + "icons.highlight": "#000000", + "icons.marker_halo": "#000000", + "interference": "#ffffff", + "logo": [ + "#ffffff", + "#ffffff", + "#ffffff" + ], + "manipulator": "#ffffff", + "mesh_accent": "#ffffff", + "mesh_fill": "#ffffff", + "mesh_ink": "#ffffff", + "mesh_soft": "#000000", + "on_accent": "#000000", + "origin_plane": "#000000", + "origin_plane_edge": "#ffffff", + "origin_plane_hover": "#ffffff", + "origin_point": "#ffffff", + "overlay": "#000000", + "panel": "#000000", + "panel_header": "#000000", + "preview_add": "#ffffff", + "preview_cut": "#ffffff", + "preview_new": "#ffffff", + "preview_sketch": "#ffffff", + "profile_fill": "#000000", + "render_accent": "#ffffff", + "render_fill": "#ffffff", + "render_ink": "#ffffff", + "render_soft": "#000000", + "rubber_band": "#ffffff", + "section_cap": "#ffffff", + "sel_edge": "#000000", + "sel_edge_rim": "#000000", + "sel_face": "#ffffff", + "sel_profile": "#ffffff", + "sel_profile_edge": "#000000", + "sel_vertex": "#ffffff", + "selected_bg": "#ffffff", + "selected_ink": "#000000", + "sheet_fill": "#ffffff", + "sheet_ink": "#ffffff", + "sheet_soft": "#000000", + "sketch": "#ffffff", + "sketch_accent": "#ffffff", + "sketch_centerline": "#ffffff", + "sketch_construction": "#ffffff", + "sketch_fixed": "#ffffff", + "sketch_halo": "#000000", + "sketch_ink": "#ffffff", + "sketch_locked": "#ffffff", + "sketch_lost": "#ffffff", + "sketch_point": "#ffffff", + "sketch_point_free": "#ffffff", + "sketch_projected": "#ffffff", + "sketch_soft": "#000000", + "surface_accent": "#ffffff", + "surface_fill": "#ffffff", + "surface_ink": "#ffffff", + "surface_soft": "#000000", + "tab_on_fill_dark": "#ffffff", + "text": "#ffffff", + "text_dim": "#ffffff", + "timeline": "#000000", + "timeline_item": "#000000", + "timeline_item_error": "#000000", + "timeline_marker": "#ffffff", + "toolbar": "#000000", + "viewport_bottom": "#000000", + "viewport_top": "#000000", + "warning": "#ffffff" + }, + "format": "solidcraft-theme/1", + "name": "1-bit Dark", + "radii": { + "radius_sm": 0, + "radius_md": 0, + "radius_lg": 0, + "radius_xl": 0, + "control_radius": 0, + "sketch_mode_radius": 0 + }, + "icon_palette": { + "ink": "#ffffff", + "line": "#ffffff", + "passive-1": "#000000", + "passive-2": "#000000", + "passive-3": "#000000", + "guide": "#ffffff", + "solid": [ + "#000000", + "#000000", + "#ffffff" + ], + "surface": [ + "#000000", + "#000000", + "#ffffff" + ], + "mesh": [ + "#000000", + "#000000", + "#ffffff" + ], + "form": [ + "#000000", + "#000000", + "#ffffff" + ], + "sketch": [ + "#000000", + "#000000", + "#ffffff" + ], + "constraint": [ + "#000000", + "#000000", + "#ffffff" + ], + "construction": [ + "#000000", + "#000000", + "#ffffff" + ], + "active-1": "#000000", + "active-2": "#000000", + "active-3": "#ffffff", + "component-orange-1": "#000000", + "component-orange-2": "#000000", + "component-orange-3": "#ffffff", + "component-yellow-1": "#000000", + "component-yellow-2": "#000000", + "component-yellow-3": "#ffffff" + }, + "borders": { + "primary": { + "width": 1, + "color": "#ffffff" + }, + "secondary": { + "width": 1, + "color": "#ffffff" + }, + "tertiary": { + "width": 1, + "color": "#ffffff" + }, + "container": { + "width": 1, + "color": "#ffffff" + }, + "control": { + "width": 1, + "color": "#ffffff" + } + } +} diff --git a/assets/styles/ui/themes/1-bit.json b/assets/styles/ui/themes/1-bit.json new file mode 100644 index 000000000..a8c8c8ff2 --- /dev/null +++ b/assets/styles/ui/themes/1-bit.json @@ -0,0 +1,247 @@ +{ + "base": "light", + "colors": { + "accent": "#000000", + "accent_soft": "#ffffff", + "agent_busy": "#000000", + "agent_ok": "#000000", + "app_bar": "#ffffff", + "app_bar_hover": "#ffffff", + "app_bar_hover_button": "#ffffff", + "app_bar_hover_strong": "#ffffff", + "app_bar_hover_subtle": "#ffffff", + "app_bar_separator": "#000000", + "app_bar_tab_active": "#ffffff", + "app_bar_text": "#000000", + "axis_x": "#000000", + "axis_y": "#000000", + "axis_z": "#000000", + "bend_down": "#000000", + "bend_up": "#000000", + "body": "#ffffff", + "body_edge": "#000000", + "body_selected": "#000000", + "border": "#000000", + "box_crossing": "#000000", + "box_window": "#000000", + "chip": "#000000", + "construction_geom": "#000000", + "construction_plane": "#ffffff", + "continuity": [ + "#000000", + "#000000", + "#000000", + "#000000" + ], + "control_border": "#000000", + "control_fill": "#ffffff", + "cube_border": "#000000", + "cube_face": "#ffffff", + "cube_hover": "#ffffff", + "cube_text": "#000000", + "dialog_bg": "#ffffff", + "dialog_body": "#ffffff", + "dialog_border": "#000000", + "dialog_footer": "#ffffff", + "dialog_label": "#000000", + "dialog_rule": "#000000", + "dimension": "#000000", + "dimension_driven": "#000000", + "error": "#000000", + "field": "#ffffff", + "file_background": "#ffffff", + "file_border": "#000000", + "file_dim": "#000000", + "file_image_tint": "#ffffff", + "file_primary": "#ffffff", + "file_primary_border": "#000000", + "file_primary_ink": "#000000", + "file_rail": "#ffffff", + "file_rail_hover": "#ffffff", + "file_rail_ink": "#000000", + "file_recovery": "#ffffff", + "file_recovery_border": "#000000", + "file_recovery_ink": "#000000", + "file_recovery_well": "#ffffff", + "file_surface": "#ffffff", + "form_accent": "#000000", + "form_dim": "#000000", + "form_error": "#000000", + "form_error_fill": "#ffffff", + "form_fill": "#000000", + "form_ink": "#000000", + "form_primary": "#ffffff", + "form_primary_fill": "#000000", + "form_soft": "#ffffff", + "form_success": "#000000", + "form_success_fill": "#ffffff", + "form_tab_ink": "#000000", + "glyph_bg": "#ffffff", + "glyph_edge": "#000000", + "glyph_text": "#000000", + "grid": "#ffffff", + "grid_major": "#000000", + "hover": "#ffffff", + "hover_edge": "#000000", + "hover_edge_halo": "#ffffff", + "hover_profile": "#000000", + "hover_profile_edge": "#ffffff", + "icon": "#000000", + "icons.agent": "#000000", + "icons.highlight": "#ffffff", + "icons.marker_halo": "#ffffff", + "interference": "#000000", + "logo": [ + "#000000", + "#000000", + "#000000" + ], + "manipulator": "#000000", + "mesh_accent": "#000000", + "mesh_fill": "#000000", + "mesh_ink": "#000000", + "mesh_soft": "#ffffff", + "on_accent": "#ffffff", + "origin_plane": "#ffffff", + "origin_plane_edge": "#000000", + "origin_plane_hover": "#000000", + "origin_point": "#000000", + "overlay": "#ffffff", + "panel": "#ffffff", + "panel_header": "#ffffff", + "preview_add": "#000000", + "preview_cut": "#000000", + "preview_new": "#000000", + "preview_sketch": "#000000", + "profile_fill": "#ffffff", + "render_accent": "#000000", + "render_fill": "#000000", + "render_ink": "#000000", + "render_soft": "#ffffff", + "rubber_band": "#000000", + "section_cap": "#000000", + "sel_edge": "#ffffff", + "sel_edge_rim": "#ffffff", + "sel_face": "#000000", + "sel_profile": "#000000", + "sel_profile_edge": "#ffffff", + "sel_vertex": "#000000", + "selected_bg": "#000000", + "selected_ink": "#ffffff", + "sheet_fill": "#000000", + "sheet_ink": "#000000", + "sheet_soft": "#ffffff", + "sketch": "#000000", + "sketch_accent": "#000000", + "sketch_centerline": "#000000", + "sketch_construction": "#000000", + "sketch_fixed": "#000000", + "sketch_halo": "#ffffff", + "sketch_ink": "#000000", + "sketch_locked": "#000000", + "sketch_lost": "#000000", + "sketch_point": "#000000", + "sketch_point_free": "#000000", + "sketch_projected": "#000000", + "sketch_soft": "#ffffff", + "surface_accent": "#000000", + "surface_fill": "#000000", + "surface_ink": "#000000", + "surface_soft": "#ffffff", + "tab_on_fill_dark": "#000000", + "text": "#000000", + "text_dim": "#000000", + "timeline": "#ffffff", + "timeline_item": "#ffffff", + "timeline_item_error": "#ffffff", + "timeline_marker": "#000000", + "toolbar": "#ffffff", + "viewport_bottom": "#ffffff", + "viewport_top": "#ffffff", + "warning": "#000000" + }, + "format": "solidcraft-theme/1", + "name": "1-bit", + "radii": { + "radius_sm": 0, + "radius_md": 0, + "radius_lg": 0, + "radius_xl": 0, + "control_radius": 0, + "sketch_mode_radius": 0 + }, + "icon_palette": { + "ink": "#000000", + "line": "#000000", + "passive-1": "#ffffff", + "passive-2": "#ffffff", + "passive-3": "#ffffff", + "guide": "#000000", + "solid": [ + "#ffffff", + "#ffffff", + "#000000" + ], + "surface": [ + "#ffffff", + "#ffffff", + "#000000" + ], + "mesh": [ + "#ffffff", + "#ffffff", + "#000000" + ], + "form": [ + "#ffffff", + "#ffffff", + "#000000" + ], + "sketch": [ + "#ffffff", + "#ffffff", + "#000000" + ], + "constraint": [ + "#ffffff", + "#ffffff", + "#000000" + ], + "construction": [ + "#ffffff", + "#ffffff", + "#000000" + ], + "active-1": "#ffffff", + "active-2": "#ffffff", + "active-3": "#000000", + "component-orange-1": "#ffffff", + "component-orange-2": "#ffffff", + "component-orange-3": "#000000", + "component-yellow-1": "#ffffff", + "component-yellow-2": "#ffffff", + "component-yellow-3": "#000000" + }, + "borders": { + "primary": { + "width": 1, + "color": "#000000" + }, + "secondary": { + "width": 1, + "color": "#000000" + }, + "tertiary": { + "width": 1, + "color": "#000000" + }, + "container": { + "width": 1, + "color": "#000000" + }, + "control": { + "width": 1, + "color": "#000000" + } + } +} diff --git a/assets/styles/ui/themes/cga.json b/assets/styles/ui/themes/cga.json index 56bc8b3e9..ce334652d 100644 --- a/assets/styles/ui/themes/cga.json +++ b/assets/styles/ui/themes/cga.json @@ -71,6 +71,7 @@ "form_fill": "#ff5555", "form_ink": "#ffffff", "form_primary": "#ff55ff", + "form_primary_fill": "#ff55ff", "form_soft": "#000000", "form_success": "#55ff55", "form_success_fill": "#000000", diff --git a/attribution/pending/theme-1-bit.md b/attribution/pending/theme-1-bit.md new file mode 100644 index 000000000..f5f8868e9 --- /dev/null +++ b/attribution/pending/theme-1-bit.md @@ -0,0 +1,2 @@ +| assets/styles/ui/themes/1-bit.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 | +| assets/styles/ui/themes/1-bit-dark.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 | diff --git a/crates/ui-egui/src/colour_vision_tests.rs b/crates/ui-egui/src/colour_vision_tests.rs index 9b54848c7..607835ebf 100644 --- a/crates/ui-egui/src/colour_vision_tests.rs +++ b/crates/ui-egui/src/colour_vision_tests.rs @@ -387,6 +387,7 @@ const NO_MEANING: &[(&str, &str)] = &[ ("borders.bevel", "structural chrome: hierarchy uses width, pattern and placement, not hue"), ("icon_palette", "optional SVG palette; actual roles and theme contrast are guarded in icon and theme tests"), ("file_dim", "File view secondary text, WCAG guarded in theme tests"), + ("form_primary_fill", "ground under a filled primary field; form_primary carries the meaning, contrast guarded in theme tests"), ("file_recovery_well", "decorative recovery icon ground"), ("file_action_height", "layout dimension"), ("file_back_height", "layout dimension"), diff --git a/crates/ui-egui/src/icon_svg.rs b/crates/ui-egui/src/icon_svg.rs index 05552ea0d..7a75fb332 100644 --- a/crates/ui-egui/src/icon_svg.rs +++ b/crates/ui-egui/src/icon_svg.rs @@ -853,7 +853,8 @@ mod tests { for file in crate::theme_files::builtin() { let tokens = crate::theme_files::resolve(file); let palette = tokens.icon_palette.expect("shipped icon palette"); - for ramp in palette.accents.into_iter().flatten() { + // Two colours can't make a pale/medium/strong ramp three distinct shades (1-bit, 1-bit Dark). + for ramp in palette.accents.into_iter().flatten().filter(|_| !crate::theme_files::is_two_colour(&file.id)) { // Ordered faces stay visibly distinct without changing accepted paths. assert_ne!(ramp[0], ramp[1], "{} pale/medium", file.id); assert_ne!(ramp[1], ramp[2], "{} medium/strong", file.id); diff --git a/crates/ui-egui/src/theme.rs b/crates/ui-egui/src/theme.rs index 71086dba5..16358f217 100644 --- a/crates/ui-egui/src/theme.rs +++ b/crates/ui-egui/src/theme.rs @@ -587,6 +587,8 @@ pub struct Tokens { pub form_ink: Color32, pub form_dim: Color32, pub form_primary: Color32, + /// Primary action fill; theme files without this token inherit `form_primary`. + pub form_primary_fill: Color32, pub form_error: Color32, pub form_error_fill: Color32, /// Successful validation text and its badge surface. diff --git a/crates/ui-egui/src/theme_files.rs b/crates/ui-egui/src/theme_files.rs index dbe6bde90..d877e6918 100644 --- a/crates/ui-egui/src/theme_files.rs +++ b/crates/ui-egui/src/theme_files.rs @@ -313,7 +313,7 @@ theme_keys! { sketch_ink, sketch_soft, surface_fill, surface_ink, surface_soft, mesh_fill, mesh_ink, mesh_soft, form_fill, form_tab_ink, form_soft, sheet_fill, sheet_ink, sheet_soft, render_fill, render_ink, render_soft, tab_on_fill_dark, app_bar_separator, surface_accent, mesh_accent, form_accent, render_accent, on_accent, agent_ok, agent_busy, app_bar_hover_subtle, app_bar_hover_button, app_bar_hover_strong, app_bar_tab_active, - form_ink, form_dim, form_primary, form_error, form_error_fill, form_success, form_success_fill, dialog_body, dialog_footer, dialog_rule, control_fill, control_border, dialog_label, selected_ink, selected_bg, + form_ink, form_dim, form_primary, form_primary_fill, form_error, form_error_fill, form_success, form_success_fill, dialog_body, dialog_footer, dialog_rule, control_fill, control_border, dialog_label, selected_ink, selected_bg, ], many: [continuity, logo], icons: [highlight, agent, marker_halo], @@ -487,6 +487,9 @@ pub fn resolve(theme: &ThemeFile) -> Tokens { s.copy_from_slice(&c); } } + if !theme.colors.contains_key("form_primary_fill") { + t.form_primary_fill = t.form_primary; + } for (key, value) in &theme.radii { if *value <= MAX_RADIUS && let Some(slot) = radius_slot(&mut t, key) @@ -610,8 +613,8 @@ pub fn export(name: &str, base: Base, t: &Tokens) -> Value { json!({"format": FORMAT, "name": name, "base": base, "colors": colors, "radii": radii, "borders": borders, "icon_palette": icon_palette}) } -/// The theme files that come with SolidCraft (original files; Gruvbox, Tokyo Night, Solarized, Nord, Nosferatu and Catppuccin map open-source palettes, MIT; Okibi and Akari map the Okibi design system; Clay and Clay Dark are original warm paper and charcoal palettes; CGA keeps to the 16 colours of the IBM Color Graphics Adapter). -const BUILTIN: [(&str, &str); 25] = [ +/// The theme files that come with SolidCraft (original files; Gruvbox, Tokyo Night, Solarized, Nord, Nosferatu and Catppuccin map open-source palettes, MIT; Okibi and Akari map the Okibi design system; Clay and Clay Dark are original warm paper and charcoal palettes; CGA keeps to the 16 colours of the IBM Color Graphics Adapter; 1-bit and 1-bit Dark are original black-and-white palettes). +const BUILTIN: [(&str, &str); 27] = [ ("gruvbox-dark", include_str!("../../../assets/styles/ui/themes/gruvbox-dark.json")), ("gruvbox-dark-hard", include_str!("../../../assets/styles/ui/themes/gruvbox-dark-hard.json")), ("gruvbox-dark-soft", include_str!("../../../assets/styles/ui/themes/gruvbox-dark-soft.json")), @@ -619,6 +622,8 @@ const BUILTIN: [(&str, &str); 25] = [ ("gruvbox-light-hard", include_str!("../../../assets/styles/ui/themes/gruvbox-light-hard.json")), ("gruvbox-light-soft", include_str!("../../../assets/styles/ui/themes/gruvbox-light-soft.json")), ("solidcraft-95", include_str!("../../../assets/styles/ui/themes/solidcraft-95.json")), + ("1-bit", include_str!("../../../assets/styles/ui/themes/1-bit.json")), + ("1-bit-dark", include_str!("../../../assets/styles/ui/themes/1-bit-dark.json")), ("platinum-9", include_str!("../../../assets/styles/ui/themes/platinum-9.json")), ("cupertino", include_str!("../../../assets/styles/ui/themes/cupertino.json")), ("green-phosphor", include_str!("../../../assets/styles/ui/themes/green-phosphor.json")), @@ -639,6 +644,13 @@ const BUILTIN: [(&str, &str); 25] = [ ("cga", include_str!("../../../assets/styles/ui/themes/cga.json")), ]; +/// The two-colour built-in themes (1-bit and 1-bit Dark): pure black and white, so a few looks +/// other themes tell apart by colour are told apart by text or shape instead. +#[cfg(test)] +pub(crate) fn is_two_colour(id: &str) -> bool { + matches!(id, "1-bit" | "1-bit-dark") +} + /// The built-in themes, read once (one that fails to read is left out; a test reads them all). pub fn builtin() -> &'static [ThemeFile] { static THEMES: OnceLock> = OnceLock::new(); @@ -804,23 +816,106 @@ mod tests { for file in builtin() { let t = resolve(file); assert!(t.icon_palette.is_some(), "{} has no icon palette", file.id); + // A two-colour theme (1-bit, 1-bit Dark) can't give each workspace its own fill; it + // still has to keep every tab readable, below. + let two_colour = is_two_colour(&file.id); let mut fills = std::collections::HashSet::new(); for tab in ["MODEL", "SURFACE", "MESH", "FORM", "SHEET METAL", "RENDER", "SKETCH"] { let accent = TabAccent::for_tab(&t, tab); - assert!(fills.insert(accent.color), "{} repeats {tab}", file.id); + assert!(fills.insert(accent.color) || two_colour, "{} repeats {tab}", file.id); assert!(contrast_ratio(accent.ink, accent.soft) >= 4.5, "{} {tab} soft text", file.id); assert!(contrast_ratio(accent.on_fill(&t), accent.color) >= 4.5, "{} {tab} pill text", file.id); } } } + #[test] + fn one_bit_themes_are_complete_opaque_black_and_white() { + for (id, name, base) in [("1-bit", "1-bit", Base::Light), ("1-bit-dark", "1-bit Dark", Base::Dark)] { + assert!(is_two_colour(id)); + let file = find(id, &[]).unwrap(); + assert_eq!(file.name, name); + assert_eq!(file.base, base); + one_bit_is_complete_opaque_black_and_white(file); + } + } + + fn one_bit_is_complete_opaque_black_and_white(file: &ThemeFile) { + let t = resolve(file); + let exported = export(&file.name, file.base, &t); + let mut resolved = t; + for key in keys() { + for color in slot(&mut resolved, key).unwrap() { + let [r, g, b, _] = color.to_srgba_unmultiplied(); + assert!(matches!([r, g, b], [0, 0, 0] | [255, 255, 255]), "{}: {key}: {color:?}", file.id); + } + assert!(file.colors.contains_key(key), "{}: missing {key}", file.id); + } + fn check(value: &Value) { + match value { + Value::String(color) if color.starts_with('#') => { + assert!(matches!(color.as_str(), "#000000" | "#ffffff"), "{color}"); + } + Value::Array(values) => values.iter().for_each(check), + Value::Object(values) => values.values().for_each(check), + _ => {} + } + } + check(&exported); + for role in crate::icon_svg::ROLE_NAMES.iter().filter(|role| **role != "gap") { + assert!(file.icon_palette.contains_key(*role), "{}: missing icon role {role}", file.id); + } + for ramp in std::iter::once("solid").chain(crate::icon_svg::ACCENT_NAMES.iter().copied()) { + assert!(file.icon_palette.contains_key(ramp), "{}: missing icon ramp {ramp}", file.id); + } + assert_eq!(radius_values(t), [0; 6]); + } + + #[test] + fn one_bit_selection_and_viewport_tokens_have_full_contrast() { + for (id, paper, ink) in [("1-bit", Color32::WHITE, Color32::BLACK), ("1-bit-dark", Color32::BLACK, Color32::WHITE)] { + one_bit_has_full_contrast(&resolve(find(id, &[]).unwrap()), id, paper, ink); + } + } + + /// `paper` is the theme's page (panels, viewport, bodies, hover); `ink` its text, and its selection. + fn one_bit_has_full_contrast(t: &Tokens, id: &str, paper: Color32, ink: Color32) { + assert_eq!((t.text, t.panel), (ink, paper), "{id}"); + for (fg, bg) in [ + (t.text, t.panel), + (t.text_dim, t.field), + (t.icon, t.toolbar), + (t.app_bar_text, t.app_bar_tab_active), + (t.selected_ink, t.selected_bg), + (t.text, t.hover), + (t.app_bar_text, t.app_bar_hover), + (t.body_edge, t.body), + (t.sel_edge, t.body_selected), + (t.dimension, t.viewport_top), + (t.sketch, t.viewport_bottom), + (t.glyph_text, t.glyph_bg), + (t.dialog_label, t.dialog_body), + ] { + assert_eq!(crate::theme::contrast_ratio(fg, bg), 21.0, "{id}: {fg:?} on {bg:?}"); + } + assert_eq!((t.viewport_top, t.viewport_bottom, t.body), (paper, paper, paper), "{id}"); + assert_eq!((t.selected_bg, t.body_selected), (ink, ink), "{id}"); + // Hover fills are the paper, so a hovered row, card or tab never swallows its ink label. + for hover in [t.hover, t.app_bar_hover, t.app_bar_hover_subtle, t.app_bar_hover_button, t.app_bar_hover_strong] { + assert_eq!(hover, paper, "{id}: hover fill"); + } + assert_eq!((t.body_edge, t.selected_ink), (ink, paper), "{id}"); + // Thumbnails and other pictures keep their own pixels: the tint stays neutral white. + assert_eq!(t.file_image_tint, Color32::WHITE, "{id}"); + } + #[test] fn built_in_themes_read_and_differ_from_their_base() { assert_eq!(builtin().len(), BUILTIN.len(), "every built-in theme file reads"); for t in builtin() { let base = if t.base.is_dark() { Tokens::dark() } else { Tokens::light() }; assert_ne!(resolve(t), base, "{}", t.id); - if t.id.starts_with("gruvbox-") { + if t.id.starts_with("gruvbox-") || is_two_colour(&t.id) { assert_eq!(t.base.is_dark(), t.id.contains("dark"), "{}", t.id); } } diff --git a/crates/ui-egui/src/ui_kit/actions.rs b/crates/ui-egui/src/ui_kit/actions.rs index 823ca7e67..98c9fbf86 100644 --- a/crates/ui-egui/src/ui_kit/actions.rs +++ b/crates/ui-egui/src/ui_kit/actions.rs @@ -195,7 +195,7 @@ impl ActionLook { } else if danger { t.form_error } else { - t.form_primary + t.form_primary_fill }; let primary_ink = if t.borders.bevel.is_some() && !danger { t.form_ink @@ -409,8 +409,8 @@ fn button_widget(label: egui::WidgetText, options: Button) -> egui::Button<'stat match options { Button::Small => egui::Button::new(label).small(), Button::Primary => { - let ink = if crate::theme::contrast_ratio(t.on_accent, t.form_primary) >= 4.5 { t.on_accent } else { t.tab_on_fill_dark }; - egui::Button::new(label.color(ink)).fill(t.form_primary) + let ink = if crate::theme::contrast_ratio(t.on_accent, t.form_primary_fill) >= 4.5 { t.on_accent } else { t.tab_on_fill_dark }; + egui::Button::new(label.color(ink)).fill(t.form_primary_fill) } Button::Ghost => egui::Button::new(label).frame(false), Button::SmallSelected => { @@ -480,7 +480,7 @@ pub(crate) fn wide_primary_button(ui: &mut Ui, label: &str) -> Response { .inner_margin(egui::Margin::symmetric(t.space_10 as i8, t.space_6 as i8)) .show(ui, |ui| { let button = egui::Button::new(crate::fonts::RichTextExt::bold_face(text)) - .fill(if bevel { t.control_fill } else { t.form_primary }) + .fill(if bevel { t.control_fill } else { t.form_primary_fill }) .stroke(egui::Stroke::NONE) .corner_radius(t.control_radius); ui.add_sized(vec2(dimension(ui.available_width()), t.form_button_height), button) diff --git a/crates/ui-egui/src/ui_kit/actions_tests.rs b/crates/ui-egui/src/ui_kit/actions_tests.rs index 1f8a93322..d714b7e06 100644 --- a/crates/ui-egui/src/ui_kit/actions_tests.rs +++ b/crates/ui-egui/src/ui_kit/actions_tests.rs @@ -136,3 +136,51 @@ fn positioned_shared_buttons_center_text_and_respect_disabled_clicks_in_both_the } crate::theme::set_dark(previous); } + +#[test] +fn one_bit_primary_actions_keep_inverted_labels_and_legacy_fills() { + use crate::theme::{Tokens, scoped_tokens}; + use egui::{Color32, Shape}; + + for base in [crate::theme_files::Base::Dark, crate::theme_files::Base::Light] { + let old = crate::theme_files::parse(&format!( + r##"{{"format":"solidcraft-theme/1","name":"Old","base":"{}","colors":{{"form_primary":"#123456"}}}}"##, + if base.is_dark() { "dark" } else { "light" } + )) + .unwrap(); + let t = crate::theme_files::resolve(&old); + assert_eq!(t.form_primary_fill, t.form_primary); + } + for theme in crate::theme_files::builtin().iter().filter(|theme| !crate::theme_files::is_two_colour(&theme.id)) { + let t = crate::theme_files::resolve(theme); + assert_eq!(t.form_primary_fill, t.form_primary, "{} retains its primary fill", theme.id); + } + // 1-bit's primary actions are black with white labels; 1-bit Dark's the reverse. + for (id, fill, ink) in [("1-bit", Color32::BLACK, Color32::WHITE), ("1-bit-dark", Color32::WHITE, Color32::BLACK)] { + let t = crate::theme_files::resolve(crate::theme_files::find(id, &[]).unwrap()); + let _restore = scoped_tokens(t); + assert_eq!(Tokens::get().form_primary_fill, fill, "{id}"); + let ctx = crate::fonts::test_context(); + let mut rects = Vec::new(); + let mut output = ctx.run_ui(egui::RawInput::default(), |ui| { + ui.set_width(400.0); + scope(ui, |ui| { + rects.push(primary_button(ui, "Primary").rect); + rects.push(wide_primary_button(ui, "Wide").rect); + footer(ui, "OK", "Cancel", true, Footer::default()); + rects.push(scenario::rect_of("dialog:ok").unwrap()); + }); + }); + output.textures_delta.clear(); + for rect in rects { + assert!( + output.shapes.iter().any(|shape| matches!(&shape.shape, Shape::Rect(r) if rect.contains_rect(r.rect) && r.fill == fill)), + "{id}: {rect:?} has its fill" + ); + assert!( + output.shapes.iter().any(|shape| matches!(&shape.shape, Shape::Text(text) if rect.contains(text.pos) && text.galley.job.sections.iter().all(|section| section.format.color == ink))), + "{id}: {rect:?} has its label ink" + ); + } + } +} diff --git a/crates/ui-egui/src/ui_kit/checks.rs b/crates/ui-egui/src/ui_kit/checks.rs index e17bd2c47..de96a13a1 100644 --- a/crates/ui-egui/src/ui_kit/checks.rs +++ b/crates/ui-egui/src/ui_kit/checks.rs @@ -26,7 +26,7 @@ pub(super) fn paint_box(ui: &Ui, square: Rect, response: &Response, on: bool, mi let fill = if t.borders.bevel.is_some() { t.input_fill() } else if selected { - t.form_primary + t.form_primary_fill } else if response.hovered() { t.hover } else { diff --git a/crates/ui-egui/src/ui_kit/fields.rs b/crates/ui-egui/src/ui_kit/fields.rs index 78aff2153..5d5b39176 100644 --- a/crates/ui-egui/src/ui_kit/fields.rs +++ b/crates/ui-egui/src/ui_kit/fields.rs @@ -313,17 +313,21 @@ pub(crate) fn selection_field(ui: &mut Ui, text: &str, options: Selection) -> Re let Selection { active, filled } = options; let t = Tokens::get(); let (rect, response) = ui.allocate_exact_size(vec2(dimension(ui.available_width()), row_height()), egui::Sense::CLICK); - if active && !filled { + // A separate action fill lets two-colour palettes reserve the focus accent for inverted ink. + let inverted = t.form_primary_fill != t.form_primary; + if active && !filled && !inverted { ui.painter().rect_filled(rect, t.control_radius, t.selected_bg); } let (fill, border) = match (active, filled) { + (true, _) if inverted => (t.selected_bg, t.form_primary), + (false, _) if inverted => (t.control_fill, t.control_border), (true, true) => (t.selected_bg, t.form_primary), (true, false) => (t.control_fill, t.form_primary), (false, true) => (t.control_fill.lerp_to_gamma(t.form_ink, 0.06), t.control_border.lerp_to_gamma(t.form_ink, 0.35)), (false, false) => (t.control_fill, t.control_border), }; ui.painter().rect( - if active && !filled { rect.shrink(t.space_2) } else { rect }, + if active && !filled && !inverted { rect.shrink(t.space_2) } else { rect }, t.control_radius, fill, match (active, filled) { @@ -345,6 +349,7 @@ pub(crate) fn selection_field(ui: &mut Ui, text: &str, options: Selection) -> Re text, crate::fonts::medium(t.font_label), match (active, filled) { + (true, _) if inverted => t.selected_ink, (true, true) => t.selected_ink, (false, true) => t.form_ink, _ => t.form_dim, diff --git a/crates/ui-egui/src/ui_kit/fields_tests.rs b/crates/ui-egui/src/ui_kit/fields_tests.rs index 4a57eb5c7..c3376ef07 100644 --- a/crates/ui-egui/src/ui_kit/fields_tests.rs +++ b/crates/ui-egui/src/ui_kit/fields_tests.rs @@ -358,8 +358,31 @@ fn selection_field_has_three_distinct_looks_in_every_theme() { assert!(!accented(&filled), "{name}: a filled inactive input is not accented: {filled:?}"); assert!(!accented(&empty), "{name}: an empty inactive input is not accented: {empty:?}"); let outline = |l: &Look| l.0.last().copied().unwrap(); - assert_ne!(outline(&filled).0, outline(&empty).0, "{name}: filled and empty fills differ"); - assert_ne!(outline(&filled).1, outline(&empty).1, "{name}: filled and empty borders differ"); + // Two colours can't give filled and empty their own fill and border on top of the accent; + // in 1-bit and 1-bit Dark the text itself tells them apart (a count against the prompt). + if crate::theme_files::is_two_colour(&name) { + // Inactive inputs are the page with an ink border: white on black in 1-bit, the + // reverse in 1-bit Dark. + let (paper, ink) = if dark { (egui::Color32::BLACK, egui::Color32::WHITE) } else { (egui::Color32::WHITE, egui::Color32::BLACK) }; + for look in [&active_filled, &active_empty, &filled, &empty] { + for &(fill, border) in &look.0 { + for color in [fill, border] { + assert!(matches!(color, egui::Color32::BLACK | egui::Color32::WHITE), "{name}: {look:?}"); + } + } + } + for look in [&active_filled, &active_empty] { + assert_eq!(outline(look).0, t.selected_bg, "{name}"); + assert_eq!(outline(look).0, ink, "{name}: the active input is inverted"); + assert_eq!(look.1, Some(t.selected_ink), "{name}"); + } + for look in [&filled, &empty] { + assert_eq!(outline(look), (paper, ink), "{name}"); + } + } else { + assert_ne!(outline(&filled).0, outline(&empty).0, "{name}: filled and empty fills differ"); + assert_ne!(outline(&filled).1, outline(&empty).1, "{name}: filled and empty borders differ"); + } assert_eq!(filled.1, Some(t.form_ink), "{name}: a filled input's count is in text colour"); assert_eq!(empty.1, Some(t.form_dim), "{name}: an empty input's prompt is dim"); } diff --git a/docs/book/src/guide/ui-tour.md b/docs/book/src/guide/ui-tour.md index dcddfb5bd..f8723fe44 100644 --- a/docs/book/src/guide/ui-tour.md +++ b/docs/book/src/guide/ui-tour.md @@ -141,9 +141,11 @@ Interface › **Theme** lists Dark, Light and System (follows the operating syst themes and any themes you have imported. A choice applies at once. Under the themes, **Viewport** draws the 3D view in the Light or Dark theme's colours whatever the window uses, for example the model on a light view in a dark window (**Follow theme**, the default, keeps the theme's own). The built-in themes are Gruvbox (dark and light, each in hard, normal and soft contrast), SolidCraft 95, Platinum 9, Cupertino, Green Phosphor, Amber Phosphor, Blueprint, One Dark, Tokyo Night, Solarized Light, Nord, High -Contrast, Graphite, Nosferatu, Catppuccin Mocha, and Okibi and Akari (dark and light, from the -[Okibi design system](https://kaievns.github.io/okibi-akiri-design-system-spec/)), and Clay and -Clay Dark (warm ivory paper and warm charcoal, with a terracotta accent and rounded corners). +Contrast, Graphite, Nosferatu, Catppuccin Mocha, Okibi and Akari (dark and light, from the +[Okibi design system](https://kaievns.github.io/okibi-akiri-design-system-spec/)), Clay and +Clay Dark (warm ivory paper and warm charcoal, with a terracotta accent and rounded corners), and +1-bit and 1-bit Dark (pure black and white with square corners: black on white, or white on +black, with selections drawn inverted). A theme is a small JSON file that starts from the Dark or Light palette and changes any of its colours and corner radii by name: @@ -186,7 +188,7 @@ respectively. The first four style small accents through large surfaces; `contro styles form controls, and `sketch_mode_radius` styles sketch creation buttons. Themes own these settings, with matching shapes across light and dark variants. Dock joins remain square, circular controls remain circular, and control sizes and spacing stay the same. -Platinum 9 and the phosphor themes use square corners, SolidCraft 95 uses subtle 3-point +Platinum 9, 1-bit, 1-bit Dark, and the phosphor themes use square corners, SolidCraft 95 uses subtle 3-point corners, Blueprint uses the standard radii, Cupertino uses softer corners, and Clay and Clay Dark use rounded corners. Other built-in themes retain the defaults. From 5a477b77742122cb8cc9bd0ffc2cc610d328a0fe Mon Sep 17 00:00:00 2001 From: Lars Jansen Date: Tue, 27 Oct 2026 17:59:00 +0000 Subject: [PATCH 064/102] Dialogs: open in the left column in place of the browser and History (#6707) (#6712) * claim: #6707 * feat(dialogs): open in the left column in place of the browser and History (#6707) * fix(i18n): Vietnamese messages for the dialog placement option (#6707) --- .../locales/pending/dialogs-left-column.json | 56 +++++ crates/ui-egui/src/browser.rs | 11 +- crates/ui-egui/src/dialog_column.rs | 104 ++++++++ crates/ui-egui/src/dialogs.rs | 56 +++-- crates/ui-egui/src/lib.rs | 5 +- crates/ui-egui/src/prefs.rs | 4 + crates/ui-egui/src/prefs/interface.rs | 11 + crates/ui-egui/src/shell.rs | 7 + crates/ui-egui/src/shell_tests.rs | 227 ++++++++++++++++++ crates/ui-egui/src/sketch_palette.rs | 5 +- crates/ui-egui/src/timeline_left.rs | 21 +- crates/ui-egui/src/ui_kit/container.rs | 5 +- crates/ui-egui/src/ui_kit/panel.rs | 19 +- .../scenarios/dialog_in_the_left_column.json | 24 ++ crates/ui-egui/tests/ui_layout.rs | 42 +++- docs/book/src/guide/ui-tour.md | 5 +- docs/control-protocol.md | 2 +- 17 files changed, 569 insertions(+), 35 deletions(-) create mode 100644 assets/locales/pending/dialogs-left-column.json create mode 100644 crates/ui-egui/src/dialog_column.rs create mode 100644 crates/ui-egui/tests/scenarios/dialog_in_the_left_column.json diff --git a/assets/locales/pending/dialogs-left-column.json b/assets/locales/pending/dialogs-left-column.json new file mode 100644 index 000000000..78c67066d --- /dev/null +++ b/assets/locales/pending/dialogs-left-column.json @@ -0,0 +1,56 @@ +{ + "en": { + "prefs.dialogs": "Dialogs", + "prefs.dialogs_edge": "At the view's edge", + "prefs.dialogs_left_column": "In the left column", + "prefs.dialogs_note": "Where command dialogs open: docked at the view's edge, or in the left column in place of the browser and the History, which come back as they were when the dialog closes." + }, + "de": { + "prefs.dialogs": "Dialoge", + "prefs.dialogs_edge": "Am Rand der Ansicht", + "prefs.dialogs_left_column": "In der linken Spalte", + "prefs.dialogs_note": "Wo Befehlsdialoge öffnen: am Rand der Ansicht angedockt oder in der linken Spalte anstelle von Browser und Verlauf, die beim Schließen des Dialogs wie zuvor zurückkehren." + }, + "ja": { + "prefs.dialogs": "ダイアログ", + "prefs.dialogs_edge": "ビューの端", + "prefs.dialogs_left_column": "左の列", + "prefs.dialogs_note": "コマンドダイアログを開く場所:ビューの端にドッキングするか、左の列でブラウザーと履歴の代わりに表示します。ダイアログを閉じるとブラウザーと履歴は元どおりに戻ります。" + }, + "ko": { + "prefs.dialogs": "대화 상자", + "prefs.dialogs_edge": "뷰 가장자리", + "prefs.dialogs_left_column": "왼쪽 열", + "prefs.dialogs_note": "명령 대화 상자가 열리는 위치: 뷰 가장자리에 고정하거나, 왼쪽 열에서 브라우저와 이력 대신 표시합니다. 대화 상자를 닫으면 브라우저와 이력이 그대로 돌아옵니다." + }, + "nl": { + "prefs.dialogs": "Dialogen", + "prefs.dialogs_edge": "Aan de rand van de weergave", + "prefs.dialogs_left_column": "In de linkerkolom", + "prefs.dialogs_note": "Waar opdrachtdialogen openen: vastgezet aan de rand van de weergave, of in de linkerkolom in plaats van de browser en de geschiedenis, die terugkomen zoals ze waren wanneer de dialoog sluit." + }, + "zh": { + "prefs.dialogs": "对话框", + "prefs.dialogs_edge": "视图边缘", + "prefs.dialogs_left_column": "左侧栏", + "prefs.dialogs_note": "命令对话框的打开位置:停靠在视图边缘,或在左侧栏中替代浏览器和历史;关闭对话框后,浏览器和历史恢复原样。" + }, + "ar": { + "prefs.dialogs": "الحوارات", + "prefs.dialogs_edge": "عند حافة العرض", + "prefs.dialogs_left_column": "في العمود الأيسر", + "prefs.dialogs_note": "مكان فتح حوارات الأوامر: مثبتة عند حافة العرض، أو في العمود الأيسر مكان المستعرض والسجل، اللذين يعودان كما كانا عند إغلاق الحوار." + }, + "he": { + "prefs.dialogs": "תיבות דו־שיח", + "prefs.dialogs_edge": "בקצה התצוגה", + "prefs.dialogs_left_column": "בעמודה השמאלית", + "prefs.dialogs_note": "היכן נפתחות תיבות הדו־שיח של הפקודות: מעוגנות בקצה התצוגה, או בעמודה השמאלית במקום הדפדפן וההיסטוריה, שחוזרים כפי שהיו כשהתיבה נסגרת." + }, + "vi": { + "prefs.dialogs": "Hộp thoại", + "prefs.dialogs_edge": "Ở cạnh khung nhìn", + "prefs.dialogs_left_column": "Trong cột bên trái", + "prefs.dialogs_note": "Nơi hộp thoại lệnh mở ra: gắn ở cạnh khung nhìn, hoặc trong cột bên trái thay cho trình duyệt và Lịch sử, hai phần này trở lại như cũ khi hộp thoại đóng." + } +} diff --git a/crates/ui-egui/src/browser.rs b/crates/ui-egui/src/browser.rs index a68aad20f..9b7be8aa6 100644 --- a/crates/ui-egui/src/browser.rs +++ b/crates/ui-egui/src/browser.rs @@ -957,6 +957,12 @@ pub(crate) fn resize_column(app: &mut SolveApp, ui: &egui::Ui, rect: Rect, width crate::scenario::publish_handle(handle, pos2(rect.right() - BROWSER_RAIL / 2.0, rect.center().y)); } +/// The width of the browser folded to its rail beside a left History. +pub(crate) fn collapsed_width() -> f32 { + let t = Tokens::get(); + t.space_24 + t.space_10 +} + /// One content-hugging browser; the shared container supplies floating or flush compact chrome. pub fn browser(app: &mut SolveApp, ui: &mut egui::Ui) { let available = ui.available_rect_before_wrap(); @@ -986,11 +992,12 @@ pub fn browser(app: &mut SolveApp, ui: &mut egui::Ui) { let bounds = if stacked { crate::timeline_left::stacked_rects(app, available).0 } else { - panel_bounds(available, if vertical { None } else { app.shell.history }, if collapsed { t.space_24 + t.space_10 } else { width }, gap) + panel_bounds(available, if vertical { None } else { app.shell.history }, if collapsed { collapsed_width() } else { width }, gap) }; app.shell.browser = None; let min_height = HEADER_H + 2.0 * (CARD_INSET + 1.0); - if bounds.is_positive() && bounds.height() >= min_height { + // A dialog in the left column holds the browser's place (`dialog_column`). + if !crate::dialog_column::holds(app) && bounds.is_positive() && bounds.height() >= min_height { let fill = if container.floating() && app.preferences.browser_float { t.panel.gamma_multiply(BROWSER_FLOAT_ALPHA) } else { t.panel }; let frame = container.frame(ui.ctx(), fill, crate::frame::Side::Left).inner_margin(CARD_INSET as i8); let inner_width = (bounds.width() - frame.total_margin().sum().x).max(0.0); diff --git a/crates/ui-egui/src/dialog_column.rs b/crates/ui-egui/src/dialog_column.rs new file mode 100644 index 000000000..7702b1932 --- /dev/null +++ b/crates/ui-egui/src/dialog_column.rs @@ -0,0 +1,104 @@ +//! Command dialogs in the left column (#6707). With Preferences › Interface › Dialogs set to +//! *In the left column* (`dialog_place: "left_column"`), an open command dialog takes the place +//! of the browser and of the History at the left, whichever of them the column shows, at the +//! column's width and never narrower than the dialog's own card. The column is only not drawn +//! while the dialog holds it: no width, fold or collapsed state changes, so OK, Cancel or Esc +//! bring it back exactly as it was. +//! +//! - History at the bottom: the dialog takes the browser's place and the strip stays. +//! - No column at the left (the browser hidden, or translucent over the view, and the History +//! not at the left): the dialog docks at the left edge in a column of its own width. +//! - The Assistant docked on the left keeps the outside edge: the column starts beside it, as +//! the browser does. +//! - Compact layout with the History at the left: the History's edge panel stays allocated +//! (empty) under the dialog, so the view keeps its size and the model doesn't move. +//! - The Sketch Palette keeps the right edge; Delete confirmations stay where they are. + +use egui::{Rect, pos2}; +use serde::{Deserialize, Serialize}; + +use crate::SolveApp; +use crate::theme::Tokens; +use crate::ui_kit::{Container, Surface}; + +/// Where command dialogs open (Preferences › Interface › Dialogs). +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum DialogPlace { + /// Docked at the view's edge: the right, or the left while the Sketch Palette holds the right. + #[default] + Edge, + /// In the left column, in place of the browser and the History there. + LeftColumn, +} + +/// Does the open dialog hold the left column this frame? +pub(crate) fn holds(app: &SolveApp) -> bool { + app.preferences.dialog_place == DialogPlace::LeftColumn && app.dialog.as_ref().is_some_and(crate::dialogs::docks) +} + +/// The History is drawn at the left this frame (beside or under the browser). +fn left_history(app: &SolveApp) -> bool { + app.ui.show_timeline && app.preferences.timeline_left && !crate::render_workspace::active(app) +} + +/// The column a dialog of `width` holds, laid out in `available` (the space the browser and a +/// left History are laid out in this frame): from the left edge, beside the Assistant, to the +/// right of what the column shows, at least `width` wide, and from the top down to a bottom +/// History card. It mirrors where `timeline_left::left_panel` and `browser::browser` put +/// their cards. +pub(crate) fn rect(app: &SolveApp, available: Rect, width: f32) -> Rect { + let t = Tokens::get(); + let panel = Container::for_layout(app.ui.layout, Surface::Panel); + let gap = panel.gap(); + let left = (available.left() + crate::agent_chat::left_inset(app, available) + gap).min(available.right()); + let history = left_history(app); + let stacked = history && app.preferences.timeline_under_browser; + let browser_width = crate::browser::browser_width(app.preferences.browser_width); + let mut right = left; + if stacked { + // Browser and History share one column of the browser's width. + right = left + browser_width; + } else if history { + right = left + crate::timeline_left::strip_width(app); + } + let translucent = panel.floating() && app.preferences.browser_float; + if app.ui.show_browser && !stacked && !translucent { + let from = if history { right + gap } else { left }; + let collapsed = history && app.preferences.timeline_left_browser_collapsed; + right = from + if collapsed { crate::browser::collapsed_width() } else { browser_width }; + } + let bottom = app.shell.history.filter(|_| app.ui.show_timeline && !app.preferences.timeline_left).map_or(available.bottom(), |h| h.top()) - gap; + let width = if width.is_finite() { width.max(t.space_24) } else { t.form_card_width }; + let right = right.max(left + width).min(available.right() - gap).max(left); + Rect::from_min_max(pos2(left, available.top()), pos2(right, bottom.max(available.top()))) +} + +/// The column the dialog `d` holds, or `None` when it docks at the view's edge. The column +/// laid out with the browser this frame, or (a dialog opened after that, from a key in the view) +/// the same column worked out now from the space the browser had; the next frame then leaves +/// the browser out. +pub(crate) fn place(app: &SolveApp, ctx: &egui::Context, d: &crate::dialogs::Dialog) -> Option { + if app.preferences.dialog_place != DialogPlace::LeftColumn || !crate::dialogs::docks(d) { + return None; + } + let column = app.shell.dialog_column.or_else(|| { + ctx.request_repaint(); + app.shell.left_space.map(|available| rect(app, available, crate::dialogs::card_width(d))) + }); + column.filter(|r| r.is_finite() && r.is_positive()) +} + +/// Lay out this frame's column before the browser and the History are drawn: they skip +/// themselves while a dialog holds it, and the view's content area starts beside it. +pub(crate) fn layout(app: &mut SolveApp, available: Rect) { + app.shell.left_space = Some(available); + app.shell.dialog_column = app.dialog.as_ref().filter(|_| holds(app)).map(|d| rect(app, available, crate::dialogs::card_width(d))); +} + +/// The bounds the dialog's card is placed in: the column's left and top, the space's right edge, +/// and the column's bottom plus the gap the card keeps to it. +pub(crate) fn bounds(app: &SolveApp, column: Rect, viewport: Rect) -> Rect { + let gap = Container::for_layout(app.ui.layout, Surface::Feature).gap(); + Rect::from_min_max(column.min, pos2(viewport.right().max(column.right()), column.bottom() + gap)) +} diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 557a5860e..be4757434 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -2743,6 +2743,24 @@ pub(crate) fn sync_feature_edit_sketch(app: &mut SolveApp) { }); } +/// Does this dialog dock as a card (at the view's edge or in the left column)? A delete +/// confirmation is a centred prompt instead. +pub(crate) fn docks(d: &Dialog) -> bool { + !matches!(d.kind, Kind::ConfirmDelete { .. }) +} + +/// The width a dialog's card asks for: the managers' wider form, a study's table, or a card. +pub(crate) fn card_width(d: &Dialog) -> f32 { + let t = Tokens::get(); + if matches!(d.kind, Kind::Appearance(_) | Kind::Material { .. }) { + t.form_card_width + t.form_label_width + t.space_6 + } else if matches!(&d.kind, Kind::Motion(k) if k.wide()) { + t.form_card_width * 3.0 + } else { + t.form_card_width + } +} + /// A dialog's primary and closing actions. Measure only closes; a deletion's primary action /// says what it does. pub(crate) fn action_labels(kind: &Kind) -> (&'static str, &'static str) { @@ -2764,6 +2782,7 @@ pub(crate) fn corner_confirms(d: &Dialog) -> bool { /// Show the active dialog (if any), docked flush to an edge of the viewport just below the axis /// view, sized to its content. The right edge is its place, except while a sketch is open: the /// Sketch Palette keeps the right there, and the dialog takes the left so both stay on screen. +/// With Dialogs › In the left column it holds the left column instead (`dialog_column`). pub fn show(app: &mut SolveApp, ctx: &egui::Context) { // A click in the view's corner is for the dialog open this frame, or for none. let corner = app.viewport.corner.take(); @@ -2814,7 +2833,8 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) { let vp = crate::agent_chat::tool_space(app, crate::shell::content_rect(app, app.viewport.rect.unwrap_or_else(|| ctx.content_rect()))); // The Sketch Palette owns the right edge for as long as a sketch is being edited. A dialog // started there docks at the left instead, so neither panel hides the other. - let side = if crate::sketch_palette::editing(app) && crate::sketch_palette::fits_beside_a_dialog(app, ctx) { + let column = crate::dialog_column::place(app, ctx, &d); + let side = if column.is_some() || (crate::sketch_palette::editing(app) && crate::sketch_palette::fits_beside_a_dialog(app, ctx)) { crate::frame::Side::Left } else { crate::frame::Side::Right @@ -2826,12 +2846,17 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) { return; } // Command dialogs share the last dragged offset on this side until the application - // exits, kept inside the viewport. - let drag_key = side.dialog_offset_key(); - let moved = crate::frame::dock_offset(ctx, drag_key); - let docked = egui::pos2(side.anchor_x(vp), top); - let drag_bounds = crate::shell::tool_drag_rect(app, vp); - let anchor = crate::frame::offset_anchor(docked, moved, drag_bounds, side); + // exits, kept inside the viewport. In the left column a dialog stays in its place. + let (drag_key, moved, docked, drag_bounds, anchor) = if let Some(column) = column { + crate::scenario::publish_rect("dialog:column", column); + ("", egui::Vec2::ZERO, column.min, crate::dialog_column::bounds(app, column, vp), column.min) + } else { + let drag_key = side.dialog_offset_key(); + let moved = crate::frame::dock_offset(ctx, drag_key); + let docked = egui::pos2(side.anchor_x(vp), top); + let drag_bounds = crate::shell::tool_drag_rect(app, vp); + (drag_key, moved, docked, drag_bounds, crate::frame::offset_anchor(docked, moved, drag_bounds, side)) + }; let mut keep = true; let mut ok = false; let mut applied = false; @@ -2865,18 +2890,13 @@ pub fn show(app: &mut SolveApp, ctx: &egui::Context) { let ok_enabled = valid && !ok_label.is_empty() && app.applying.is_none(); let panel = crate::ui_kit::Panel::new(&heading, egui::Id::new(("sc_dialog", title(&d.kind))), anchor, drag_bounds, side, frame) .actions(ok_label, close_label); - let panel = if matches!(d.kind, Kind::Appearance(_) | Kind::Material { .. }) { - panel.width(t.form_card_width + t.form_label_width + t.space_6) - } else if wide { - let panel = panel.wide(); - if side == crate::frame::Side::Left { - let available = app.viewport.palette_rect.map_or(vp.width(), |r| (r.left() - vp.left() - t.space_8).max(0.0)); - panel.width((t.form_card_width * 3.0).min(available)) - } else { - panel - } + let panel = if let Some(column) = column { + panel.width(column.width()).joined(crate::ui_kit::DockEdges { left: true, top: true, ..Default::default() }) + } else if wide && side == crate::frame::Side::Left { + let available = app.viewport.palette_rect.map_or(vp.width(), |r| (r.left() - vp.left() - t.space_8).max(0.0)); + panel.width(card_width(&d).min(available)) } else { - panel + panel.width(card_width(&d)) }; let reset_scroll = d.reset_scroll; let panel = diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 85625449c..e774ea0de 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -32,6 +32,7 @@ pub mod crash_ui; pub mod deferred; pub mod delete; pub mod design_properties; +pub mod dialog_column; mod dialog_descriptor; pub mod dialogs; pub mod dialogs_appearance; @@ -2209,7 +2210,8 @@ impl SolveApp { self.shell.cards = vec![cards.workspace, cards.ribbon]; self.shell.history = if left_timeline { let below_ribbon = egui::Rect::from_min_max(egui::pos2(full.left(), cards.bottom), full.max); - Some(timeline_left::floating_rect(self, below_ribbon)) + // A dialog in the left column holds the History's place. + (!dialog_column::holds(self)).then(|| timeline_left::floating_rect(self, below_ribbon)) } else { show_timeline.then(|| timeline::floating_rect(full)) }; @@ -2238,6 +2240,7 @@ impl SolveApp { if floating && show_timeline && !left_timeline { timeline::timeline(self, ui); } + dialog_column::layout(self, ui.available_rect_before_wrap()); if left_timeline { timeline_left::left_panel(self, ui); } diff --git a/crates/ui-egui/src/prefs.rs b/crates/ui-egui/src/prefs.rs index c7759a611..716715190 100644 --- a/crates/ui-egui/src/prefs.rs +++ b/crates/ui-egui/src/prefs.rs @@ -663,6 +663,9 @@ preference_settings! { /// Draw the parts browser on a translucent card over the 3D view instead of a column of its /// own, so the workspace keeps the whole window width. browser_float: bool = false, PAGE_INTERFACE; + /// Where command dialogs open: at the view's edge, or in the left column in place of the + /// browser and the History there (#6707). + dialog_place: crate::dialog_column::DialogPlace = Default::default(), PAGE_INTERFACE; /// The wheel zooms toward the point under the cursor (else toward the view's centre). zoom_to_cursor: bool = true, PAGE_NAVIGATION => check("Zoom to the cursor", "The wheel zooms toward the point under the cursor (off: toward the view's centre)"); /// Spread discrete wheel input across frames (off: apply each event immediately). @@ -3422,6 +3425,7 @@ mod tests { ("timeline_under_browser", json!(true), PAGE_INTERFACE), ("history_sketches", json!("under_feature"), PAGE_INTERFACE), ("browser_float", json!(true), PAGE_INTERFACE), + ("dialog_place", json!("left_column"), PAGE_INTERFACE), ("color_vision", json!("protan"), PAGE_INTERFACE), ("viewport_theme", json!("light"), PAGE_INTERFACE), ("view_confirm_corner", json!(true), PAGE_INTERFACE), diff --git a/crates/ui-egui/src/prefs/interface.rs b/crates/ui-egui/src/prefs/interface.rs index c9665e7f0..ee2a6368c 100644 --- a/crates/ui-egui/src/prefs/interface.rs +++ b/crates/ui-egui/src/prefs/interface.rs @@ -112,6 +112,17 @@ pub(super) fn interface(app: &mut SolveApp, ui: &mut egui::Ui, t: &Tokens) { } }); }); + // Where command dialogs open (#6707). + ui_kit::row(ui, app.tr("prefs.dialogs"), |ui| { + use crate::dialog_column::DialogPlace; + let mut selected = usize::from(app.preferences.dialog_place == DialogPlace::LeftColumn); + let options = [app.tr("prefs.dialogs_edge"), app.tr("prefs.dialogs_left_column")]; + let segments = ui.scope(|ui| ui_kit::segmented(ui, &mut selected, &options, Default::default())); + segments.response.on_hover_text(app.tr("prefs.dialogs_note")); + if segments.inner { + app.preferences.dialog_place = if selected == 1 { DialogPlace::LeftColumn } else { DialogPlace::Edge }; + } + }); // Where a dialog's and a sketch's OK and Cancel also sit (#6709). ui_kit::row(ui, "", |ui| { let check = setting::view_confirm_corner(app, ui).on_hover_text(app.tr("prefs.view_confirm_corner_note")); diff --git a/crates/ui-egui/src/shell.rs b/crates/ui-egui/src/shell.rs index 661a5e56c..17f0b0e09 100644 --- a/crates/ui-egui/src/shell.rs +++ b/crates/ui-egui/src/shell.rs @@ -103,6 +103,10 @@ pub(crate) struct State { pub history_folding: Option<[f32; 2]>, pub history_fold_motion: Option<[crate::timeline_left::FoldMotion; 2]>, pub content: Option, + /// The space the browser and a left History are laid out in this frame. + pub left_space: Option, + /// The left column an open dialog holds this frame (`dialog_column`). + pub dialog_column: Option, } /// One source of occlusion for navigation, picking, overlays and fit. @@ -170,6 +174,9 @@ pub(crate) fn workspace_content(app: &SolveApp, mut content: Rect) -> Rect { if let Some(browser) = app.shell.browser { content.min.x = (browser.right() + gap).clamp(content.left(), content.right()); } + if let Some(column) = app.shell.dialog_column { + content.min.x = (column.right() + gap).clamp(content.left(), content.right()); + } content } diff --git a/crates/ui-egui/src/shell_tests.rs b/crates/ui-egui/src/shell_tests.rs index e959c65d6..7d8bba3fa 100644 --- a/crates/ui-egui/src/shell_tests.rs +++ b/crates/ui-egui/src/shell_tests.rs @@ -680,3 +680,230 @@ fn embed_keeps_model_panels_without_application_chrome() { assert!(rect_of("browser:card").is_some()); assert!(h.app.viewport.rect.is_some()); } + +/// A design with a finished sketch nothing uses yet, so Extrude opens ready for OK. +fn sketched(h: &mut Harness) { + h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); + h.app.run("sketch.rectangle.two_point", json!({"p0":[0,0],"p1":[40,30]})).unwrap(); + h.app.run("sketch.finish", json!({})).unwrap(); +} + +/// Dialogs › In the left column (#6707): Extrude takes the place of the browser and the History +/// at the left, at the column's width and never narrower than its card, in both layouts and +/// every History dock. The view keeps its size, the dialog is covered, the content area starts +/// beside it, and OK, Cancel or Esc bring the column back exactly as it was. +#[test] +fn a_dialog_in_the_left_column_takes_the_place_of_browser_and_history() { + let card = crate::theme::Tokens::get().form_card_width; + for mode in [LayoutMode::Floating, LayoutMode::Docked] { + for (dock, close) in [("bottom", "Cancel"), ("left", "Escape"), ("under_browser", "OK")] { + let what = format!("{mode:?}, History {dock}, {close}"); + let mut h = Harness::new(); + h.call("ui.resize", json!({"width":1400,"height":900})); + h.call("ui.set", json!({"layout":mode})); + h.call("ui.prefs", json!({"dialog_place":"left_column"})); + h.app.run("view.history_layout", json!({"dock":dock})).unwrap(); + sketched(&mut h); + h.settle(); + let browser = h.app.shell.browser.expect("browser"); + let history = h.app.shell.history.expect("history"); + let viewport = h.app.viewport.rect.unwrap(); + let prefs = serde_json::to_value(&h.app.preferences).unwrap(); + let column = if dock == "bottom" { browser } else { browser.union(history) }; + h.step(&json!({"start":"solid.extrude"})).unwrap(); + h.settle(); + let dialog = h.app.viewport.dialog_rect.expect("dialog"); + assert_eq!(rect_of("dialog:outer"), Some(dialog), "{what}"); + let place = rect_of("dialog:column").expect("the column is published"); + assert!((dialog.left() - column.left()).abs() <= 1.0 && (place.left() - column.left()).abs() <= 1.0, "{what}: {dialog:?} {column:?}"); + assert!((dialog.top() - column.top()).abs() <= 1.0, "{what}: {dialog:?} {column:?}"); + // The card's outline lies outside its response rect, one stroke at each side. + assert!((dialog.width() - column.width().max(card)).abs() <= 2.5, "{what}: {dialog:?} {column:?}"); + assert!(dialog.bottom() <= place.bottom() + 1.0, "{what}: {dialog:?} {place:?}"); + assert!(rect_of("browser:card").is_none() && h.app.shell.browser.is_none(), "{what}: the browser is not drawn"); + if dock == "bottom" { + assert_eq!(h.app.shell.history, Some(history), "{what}: the bottom strip stays"); + assert!(dialog.bottom() < history.top(), "{what}"); + } else { + assert!(rect_of("history:vertical").is_none(), "{what}: the History is not drawn"); + } + assert_eq!(h.app.viewport.rect, Some(viewport), "{what}: the view keeps its size"); + assert!(covered(&h.app, dialog.center()), "{what}"); + assert!(content_rect(&h.app, viewport).left() >= dialog.right(), "{what}"); + assert!(h.widget("Distance").is_some(), "{what}: the inputs are there"); + match close { + "Escape" => h.step(&json!({"key":"Escape"})).unwrap(), + other => h.step(&json!({"widget":other})).unwrap(), + } + h.settle(); + assert!(h.app.dialog.is_none(), "{what}"); + assert_eq!(h.app.session.doc.features.len(), if close == "OK" { 2 } else { 1 }, "{what}: OK adds the extrude"); + let back = h.app.shell.browser.expect("the browser is back"); + assert_eq!((back.x_range(), back.top()), (browser.x_range(), browser.top()), "{what}"); + assert_eq!(h.app.shell.history, Some(history), "{what}: the History is back as it was"); + assert_eq!(serde_json::to_value(&h.app.preferences).unwrap(), prefs, "{what}: no width or fold changed"); + assert!(rect_of("dialog:column").is_none(), "{what}"); + } + } +} + +/// With no column at the left (the browser hidden, or translucent over the view) a dialog in +/// the left column docks at the left edge at its own width, above the bottom History strip. +#[test] +fn without_a_left_column_a_dialog_docks_at_the_left_edge_at_its_own_width() { + let card = crate::theme::Tokens::get().form_card_width; + for (mode, browser) in [(LayoutMode::Floating, "hidden"), (LayoutMode::Docked, "hidden"), (LayoutMode::Floating, "translucent")] { + let what = format!("{mode:?}, browser {browser}"); + let mut h = Harness::new(); + h.call("ui.resize", json!({"width":1400,"height":900})); + h.call("ui.set", json!({"layout":mode})); + h.call("ui.prefs", json!({"dialog_place":"left_column","browser_float":browser == "translucent"})); + h.app.ui.show_browser = browser != "hidden"; + sketched(&mut h); + h.settle(); + let history = h.app.shell.history.expect("history"); + let viewport = h.app.viewport.rect.unwrap(); + h.step(&json!({"start":"solid.extrude"})).unwrap(); + h.settle(); + let dialog = h.app.viewport.dialog_rect.expect("dialog"); + let gap = Container::for_layout(mode, Surface::Panel).gap(); + assert!((dialog.left() - (viewport.left() + gap)).abs() <= 1.0, "{what}: {dialog:?} {viewport:?}"); + assert!((dialog.width() - card).abs() <= 2.5, "{what}: {dialog:?}"); + assert!(dialog.bottom() < history.top(), "{what}"); + assert!(rect_of("browser:card").is_none(), "{what}"); + h.step(&json!({"widget":"Cancel"})).unwrap(); + h.settle(); + assert_eq!(rect_of("browser:card").is_some(), browser == "translucent", "{what}"); + } +} + +/// The Assistant docked on the left keeps the outside edge: the column starts beside it, where +/// the browser was. +#[test] +fn a_dialog_in_the_left_column_starts_beside_the_assistant() { + let mut h = Harness::new(); + h.app.home.open = false; + h.call("ui.resize", json!({"width":1800,"height":1000})); + h.call("ui.set", json!({"layout":"floating"})); + h.call("ui.prefs", json!({"dialog_place":"left_column"})); + h.call("ui.agent_chat", json!({"open":true,"side":"left","width":380,"picker":false})); + h.frames(5); + let browser = h.app.shell.browser.unwrap(); + h.app.start("sketch.create"); + h.frames(5); + let chat = h.app.agent_chat.panel_rect.unwrap(); + let dialog = h.app.viewport.dialog_rect.unwrap(); + assert!((dialog.left() - browser.left()).abs() <= 1.0, "{dialog:?} {browser:?}"); + assert!(!dialog.intersect(chat).is_positive(), "{dialog:?} {chat:?}"); + let title = crate::scenario::handle_at("dialog:title").unwrap(); + h.call("ui.drag", json!({"x0":title.x,"y0":title.y,"x1":title.x + 300.0,"y1":title.y + 200.0,"steps":10})); + h.frames(4); + assert_eq!(h.app.viewport.dialog_rect, Some(dialog), "a dialog in the column stays in its place"); +} + +/// The Sketch Palette keeps the right edge while a sketch dialog holds the left column, also on +/// a view too narrow for both side by side; editing a feature reopens its dialog in the column +/// and Cancel rolls the marker back. +#[test] +fn the_sketch_palette_stays_and_editing_a_feature_opens_in_the_left_column() { + for width in [1400.0, 900.0] { + let mut h = Harness::new(); + h.call("ui.resize", json!({"width":width,"height":900})); + h.call("ui.prefs", json!({"dialog_place":"left_column"})); + h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); + h.app.run("sketch.rectangle.two_point", json!({"p0":[0,0],"p1":[40,30]})).unwrap(); + h.settle(); + let palette = rect_of("sketch_palette:outer").expect("palette"); + let browser = h.app.shell.browser.unwrap(); + h.step(&json!({"start":"inspect.measure"})).unwrap(); + h.settle(); + let dialog = h.app.viewport.dialog_rect.expect("measure"); + let kept = rect_of("sketch_palette:outer").expect("the palette stays on screen"); + assert!((kept.right() - palette.right()).abs() <= 1.0 && (kept.top() - palette.top()).abs() <= 1.0, "width {width}: {kept:?} {palette:?}"); + assert!((dialog.left() - browser.left()).abs() <= 1.0 && !dialog.intersect(palette).is_positive(), "width {width}: {dialog:?}"); + h.step(&json!({"widget":"Close"})).unwrap(); + h.app.run("sketch.finish", json!({})).unwrap(); + h.app.run("solid.extrude", json!({"distance":10})).unwrap(); + h.settle(); + let extrude = h.app.session.doc.features.last().unwrap().id; + let marker = h.app.session.doc.marker; + h.app.edit_feature(extrude); + h.settle(); + assert!(h.app.dialog.as_ref().is_some_and(|d| d.editing.is_some())); + assert_ne!(h.app.session.doc.marker, marker, "editing rolls the marker to the feature"); + let edit = h.app.viewport.dialog_rect.expect("edit dialog"); + assert!((edit.left() - browser.left()).abs() <= 1.0, "width {width}: {edit:?}"); + assert!(h.app.shell.browser.is_none()); + h.step(&json!({"widget":"Cancel"})).unwrap(); + h.settle(); + assert_eq!(h.app.session.doc.marker, marker); + assert!(h.app.shell.browser.is_some()); + } +} + +/// OK and Cancel in the view's corner (#6709) with a dialog in the left column: the pair keeps +/// the view's top right, beside the column's content area and clear of the dialog; its check +/// applies the dialog and its cross cancels, and either way the column comes back. +#[test] +fn the_view_corner_answers_a_dialog_in_the_left_column() { + for how in ["ok", "cancel"] { + let mut h = Harness::new(); + h.call("ui.resize", json!({"width":1400,"height":900})); + h.call("ui.prefs", json!({"dialog_place":"left_column","view_confirm_corner":true})); + sketched(&mut h); + h.settle(); + let browser = h.app.shell.browser.expect("browser"); + h.step(&json!({"start":"solid.extrude"})).unwrap(); + h.settle(); + let dialog = h.app.viewport.dialog_rect.expect("dialog"); + let pair = rect_of("view:confirm").expect("the pair in the view's corner"); + let content = content_rect(&h.app, h.app.viewport.rect.unwrap()); + assert!((dialog.left() - browser.left()).abs() <= 1.0, "{how}: the dialog holds the column: {dialog:?}"); + assert!(content.contains_rect(pair) && pair.left() > content.center().x, "{how}: {pair:?} in the top right of {content:?}"); + assert!(!pair.intersects(dialog), "{how}: {pair:?} {dialog:?}"); + assert!(covered(&h.app, pair.center()), "{how}"); + assert_eq!(crate::scenario::count_of("view:confirm:ok:enabled"), Some(1.0), "{how}"); + h.step(&json!({"click":{"handle":format!("view:confirm:{how}")}})).unwrap(); + h.settle(); + assert!(h.app.dialog.is_none(), "{how}: the dialog closes"); + assert_eq!(h.app.session.doc.features.len(), if how == "ok" { 2 } else { 1 }, "{how}: the check makes the extrude"); + assert!(h.app.shell.browser.is_some_and(|b| b.x_range() == browser.x_range()), "{how}: the column comes back"); + } +} + +/// Dialogs is an Interface preference: set from the page or the control channel, saved, +/// refused when unknown, and Cancel and Restore Defaults put it back. A dialog already open +/// moves with it. +#[test] +fn dialog_place_is_saved_and_survives_cancel_defaults_and_bad_input() { + use crate::dialog_column::DialogPlace; + let mut h = Harness::new(); + sketched(&mut h); + h.step(&json!({"start":"solid.extrude"})).unwrap(); + h.settle(); + let right = h.app.viewport.dialog_rect.unwrap(); + assert_eq!(h.app.preferences.dialog_place, DialogPlace::Edge); + h.call("ui.prefs", json!({"open":"Interface"})); + crate::prefs::reveal_preference(&mut h, "dialog:Dialogs:In the left column"); + h.step(&json!({"click":{"handle":"dialog:Dialogs:In the left column"}})).unwrap(); + assert_eq!(h.app.preferences.dialog_place, DialogPlace::LeftColumn); + h.call("ui.prefs", json!({"button":"ok"})); + h.settle(); + let left = h.app.viewport.dialog_rect.unwrap(); + assert!(left.left() < right.left() && h.app.shell.browser.is_none(), "the open dialog moves to the column: {left:?}"); + let mut restored = crate::SolveApp::new(Default::default(), Default::default()); + restored.load_prefs(&h.app.prefs()); + assert_eq!(restored.preferences.dialog_place, DialogPlace::LeftColumn); + h.call("ui.prefs", json!({"open":"Interface","dialog_place":"edge"})); + h.call("ui.prefs", json!({"button":"cancel"})); + assert_eq!(h.app.preferences.dialog_place, DialogPlace::LeftColumn); + h.call("ui.prefs", json!({"open":"Interface"})); + h.call("ui.prefs", json!({"button":"defaults"})); + assert_eq!(h.app.preferences.dialog_place, DialogPlace::Edge); + h.call("ui.prefs", json!({"button":"ok"})); + assert!(crate::prefs::set(&mut h.app, &json!({"dialog_place":"top"})).is_err()); + assert_eq!(h.app.preferences.dialog_place, DialogPlace::Edge); + restored.load_prefs(r#"{"preferences":{"dialog_place":"top","default_units":"in"}}"#); + assert_eq!(restored.preferences.dialog_place, DialogPlace::Edge); + assert_eq!(restored.preferences.default_units, "in"); +} diff --git a/crates/ui-egui/src/sketch_palette.rs b/crates/ui-egui/src/sketch_palette.rs index cd91c2bc0..f7d7babcc 100644 --- a/crates/ui-egui/src/sketch_palette.rs +++ b/crates/ui-egui/src/sketch_palette.rs @@ -253,9 +253,10 @@ pub fn fits_beside_a_dialog(app: &SolveApp, ctx: &egui::Context) -> bool { } /// Is the palette on screen? It stays for as long as a sketch is being edited, a command dialog -/// open or not: the dialog takes the left edge of the viewport and the palette keeps the right. +/// open or not: the dialog takes the left edge of the viewport (or the left column) and the +/// palette keeps the right. pub fn visible(app: &SolveApp, ctx: &egui::Context) -> bool { - editing(app) && ((app.dialog.is_none() && app.tree.redefine.is_none()) || fits_beside_a_dialog(app, ctx)) + editing(app) && ((app.dialog.is_none() && app.tree.redefine.is_none()) || fits_beside_a_dialog(app, ctx) || crate::dialog_column::holds(app)) } /// The creation family of the tool that is running, and the exact variant it is running, when diff --git a/crates/ui-egui/src/timeline_left.rs b/crates/ui-egui/src/timeline_left.rs index bc9ca93a3..59a0b1eba 100644 --- a/crates/ui-egui/src/timeline_left.rs +++ b/crates/ui-egui/src/timeline_left.rs @@ -181,10 +181,16 @@ pub fn left_panel(app: &mut SolveApp, ui: &mut egui::Ui) { let t = Tokens::get(); let available = ui.available_rect_before_wrap(); app.shell.history_dock_space = Some(available); + // A dialog in the left column holds the History's place (`dialog_column`). + let held = crate::dialog_column::holds(app); + if held { + // No row is under the pointer: the view lights no feature for the History. + app.viewport.hover_feature = None; + } if Container::for_layout(app.ui.layout, Surface::Panel).floating() || stacked(app) { let bounds = floating_rect(app, available); app.shell.history = None; - if !bounds.is_finite() || bounds.width() < crate::ui_kit::history_width(false) || bounds.height() < t.control_height { + if held || !bounds.is_finite() || bounds.width() < crate::ui_kit::history_width(false) || bounds.height() < t.control_height { return; } let container = Container::new(ui.ctx(), Surface::Panel).joined(crate::ui_kit::DockEdges { left: true, top: true, ..Default::default() }); @@ -217,15 +223,22 @@ pub fn left_panel(app: &mut SolveApp, ui: &mut egui::Ui) { if width < crate::ui_kit::history_width(false) { return; } + // Held by a dialog, the docked panel stays allocated but empty, so the view keeps its size. let response = Container::new(ui.ctx(), Surface::Panel) .edge("sc_timeline_left", Edge::Left) .exact_size(width) .resizable(false) .frame(Container::new(ui.ctx(), Surface::Panel).edge_frame(t.panel).inner_margin(t.space_4)) - .show(ui, |ui| left_timeline(app, ui)); - crate::scenario::publish_rect("history:vertical", response.response.rect); + .show(ui, |ui| { + if !held { + left_timeline(app, ui); + } + }); app.shell.history = Some(response.response.rect); - seam_handle(app, ui, response.response.rect); + if !held { + crate::scenario::publish_rect("history:vertical", response.response.rect); + seam_handle(app, ui, response.response.rect); + } } } diff --git a/crates/ui-egui/src/ui_kit/container.rs b/crates/ui-egui/src/ui_kit/container.rs index 518f1a0a8..107e94b57 100644 --- a/crates/ui-egui/src/ui_kit/container.rs +++ b/crates/ui-egui/src/ui_kit/container.rs @@ -111,10 +111,11 @@ impl Container { } } - /// Movable tool sheets round all exposed corners, joining only their right dock edge. + /// Movable tool sheets round all exposed corners, joining only their right dock edge (or the + /// edges they were declared `joined` at). pub(crate) fn tool_frame(self, mut frame: Frame, right_docked: bool) -> Frame { if self.surface == Surface::Feature && !self.floating() { - frame.corner_radius = Self::compact_rounding(DockEdges { right: right_docked, ..Default::default() }); + frame.corner_radius = Self::compact_rounding(self.joined.unwrap_or(DockEdges { right: right_docked, ..Default::default() })); } frame } diff --git a/crates/ui-egui/src/ui_kit/panel.rs b/crates/ui-egui/src/ui_kit/panel.rs index ba0830c62..632a5894e 100644 --- a/crates/ui-egui/src/ui_kit/panel.rs +++ b/crates/ui-egui/src/ui_kit/panel.rs @@ -194,11 +194,13 @@ pub(crate) struct Panel<'a> { ok: &'a str, cancel: &'a str, reset_scroll: bool, + joined: Option, } pub(crate) struct FeatureOptions<'a> { pub icon: &'a str, pub title: &'a str, + /// The dock offset the title band drags; empty for a card that stays in its place. pub drag_key: &'a str, pub moved: egui::Vec2, pub docked: egui::Pos2, @@ -265,9 +267,17 @@ impl<'a> Panel<'a> { ok: "OK", cancel: "Cancel", reset_scroll: false, + joined: None, } } + /// The edges the card meets the window or a docked surface at (a dialog in the left column): + /// in Compact, only its other corners round. + pub(crate) fn joined(mut self, edges: super::DockEdges) -> Self { + self.joined = Some(edges); + self + } + /// A newly opened manager starts at its first section. Later frames retain user scrolling. pub(crate) fn reset_scroll(mut self, reset: bool) -> Self { self.reset_scroll = reset; @@ -324,7 +334,8 @@ impl<'a> Panel<'a> { crate::frame::Side::Right => anchor.x, crate::frame::Side::Left => anchor.x + self.width.min(self.viewport.width().max(0.0)), }; - super::Container::new(ctx, super::Surface::Feature).tool_frame(self.frame, right >= self.viewport.right() - 0.5) + let container = super::Container::new(ctx, super::Surface::Feature); + self.joined.map_or(container, |edges| container.joined(edges)).tool_frame(self.frame, right >= self.viewport.right() - 0.5) } pub(crate) fn window(&self, ctx: &egui::Context) -> egui::Window<'a> { @@ -403,7 +414,11 @@ impl<'a> Panel<'a> { let t = Tokens::get(); let min = ui.cursor().min; let band = egui::Rect::from_min_size(min, vec2(ui.available_width(), super::header_height())); - crate::frame::drag_dock(ui, band, heading.drag_key, heading.moved, self.bounded_anchor(ui.ctx()) - heading.docked); + if heading.drag_key.is_empty() { + scenario::publish_handle("dialog:title", band.center()); + } else { + crate::frame::drag_dock(ui, band, heading.drag_key, heading.moved, self.bounded_anchor(ui.ctx()) - heading.docked); + } let mut close = false; let top = if DialogButtons::current(ui.ctx()) == DialogButtons::Top { Some(TopHeader::new(ui, self.ok, heading.apply_label, self.cancel, collapsed.as_deref_mut(), &mut close)) diff --git a/crates/ui-egui/tests/scenarios/dialog_in_the_left_column.json b/crates/ui-egui/tests/scenarios/dialog_in_the_left_column.json new file mode 100644 index 000000000..a7bbb7e0d --- /dev/null +++ b/crates/ui-egui/tests/scenarios/dialog_in_the_left_column.json @@ -0,0 +1,24 @@ +[ + {"note": "Dialogs: In the left column (#6707). Extrude takes the browser's place at its width (never narrower than the card), the bottom History strip stays, and Cancel (or Enter, which applies it) brings the browser back as it was."}, + {"call": "ui.prefs", "params": {"dialog_place": "left_column"}}, + {"start": "sketch.create"}, + {"click": {"plane": "XY"}}, + {"start": "sketch.rectangle.two_point"}, + {"click": {"sketch": [0, 0]}}, + {"click": {"sketch": [40, 30]}}, + {"key": "Escape"}, + {"start": "sketch.finish"}, + {"expect": {"sketching": false, "same_width": "browser:card"}}, + {"start": "solid.extrude"}, + {"frames": 4}, + {"expect": {"dialog": "Extrude", "spans": {"inner": "dialog:outer", "outer": "dialog:column", "axis": "x", "tol": 3}}}, + {"expect": {"shown_handles": ["dialog:OK"]}}, + {"widget": "Cancel"}, + {"frames": 4}, + {"expect": {"dialog": null, "same_width": "browser:card"}}, + {"start": "solid.extrude"}, + {"text": "10"}, + {"key": "Enter"}, + {"frames": 4}, + {"expect": {"dialog": null, "bodies": 1, "same_width": "browser:card"}} +] diff --git a/crates/ui-egui/tests/ui_layout.rs b/crates/ui-egui/tests/ui_layout.rs index 571321e8e..e5c196fac 100644 --- a/crates/ui-egui/tests/ui_layout.rs +++ b/crates/ui-egui/tests/ui_layout.rs @@ -1,6 +1,6 @@ //! Layout checks over every toolbar command, headless (see `solidcraft_ui_egui::scenario`): -//! each command's dialog opens docked at the viewport's right within its width limits, and -//! every window it opens fits on screen. +//! each command's dialog opens docked at the viewport's right within its width limits (or in +//! the left column, when the preferences put it there), and every window it opens fits on screen. use serde_json::{Value, json}; use solidcraft_ui_egui::scenario::{Harness, check, rect_of}; @@ -55,6 +55,44 @@ fn every_dialog_opens_docked_within_its_width_limits() { assert!(bad.is_empty(), "{} problems:\n{}", bad.len(), bad.join("\n")); } +/// Dialogs › In the left column (#6707): every command's dialog opens in the browser's place, at +/// least as wide as the browser and its own card, and fits on screen. +#[test] +fn every_dialog_opens_in_the_left_column_when_asked() { + let mut bad = Vec::new(); + let mut seen = 0; + for spec in solidcraft_engine::command_specs() { + if spec.tab.is_empty() || spec.tab == "SKETCH" { + continue; + } + let mut h = harness(); + h.call("ui.prefs", json!({"dialog_place": "left_column"})); + h.frames(2); + let Some(browser) = rect_of("browser:card") else { + bad.push(format!("{}: no browser before the dialog", spec.id)); + continue; + }; + h.call("ui.start", json!({"command": spec.id})); + h.frames(4); + let (Some(dialog), Some(column)) = (rect_of("dialog:outer").filter(|_| h.app.dialog.is_some()), rect_of("dialog:column")) else { + continue; + }; + seen += 1; + let screen = h.ctx.content_rect(); + if (dialog.left() - browser.left()).abs() > 1.0 || (dialog.top() - browser.top()).abs() > 1.0 { + bad.push(format!("{}: dialog {dialog:?} is not in the browser's place {browser:?}", spec.id)); + } + if dialog.width() < browser.width().max(260.0) - 2.5 || (dialog.width() - column.width()).abs() > 2.5 { + bad.push(format!("{}: dialog width {:.0}, column {:.0}, browser {:.0}", spec.id, dialog.width(), column.width(), browser.width())); + } + if !screen.expand(1.0).contains_rect(dialog) || rect_of("browser:card").is_some() { + bad.push(format!("{}: dialog {dialog:?} off screen or beside a browser", spec.id)); + } + } + assert!(seen > 20, "only {seen} commands opened a dialog in the column"); + assert!(bad.is_empty(), "{} problems:\n{}", bad.len(), bad.join("\n")); +} + /// Windows that are not command dialogs: each fits on screen. #[test] fn other_windows_fit_on_screen() { diff --git a/docs/book/src/guide/ui-tour.md b/docs/book/src/guide/ui-tour.md index f8723fe44..f6a8e9722 100644 --- a/docs/book/src/guide/ui-tour.md +++ b/docs/book/src/guide/ui-tour.md @@ -82,7 +82,10 @@ identity or change the exported solid. Unsupported or uncertain wall geometry keeps its existing edge presentation. - **Dialogs** dock on the right with a live preview. Most features also show drag handles and a - value box in the viewport. Interface › **Dialog buttons** › **Top** puts OK, Cancel and Apply in + value box in the viewport. Preferences › Interface › **Dialogs** › *In the left column* opens + them in the browser's place instead (and the History's, when it is at the left), at least as + wide as that column; the column comes back as it was when the dialog closes. + Interface › **Dialog buttons** › **Top** puts OK, Cancel and Apply in the dialog's title row, right of the title, where they stay while sections open and close; Cancel then also takes the place of the close button. Enter and Esc work as before. - **Timeline** (bottom). Every feature in order. Double-click to edit, drag the marker to roll diff --git a/docs/control-protocol.md b/docs/control-protocol.md index 36b73f330..8a99c08ba 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -303,7 +303,7 @@ labels; `prefs:measure_axis_distances` identifies the checkbox. | `ui.home` | `open?`: bool; `sample?`: index | the start page: show or hide it, open a built-in sample (once built); returns `open` and the recent designs | | `ui.shortcut` | `command`, `key?`, `replace?` | a command's key, or rebinds it (`""` clears; a key another command uses is refused unless `replace`) | | `ui.help` | `item?`: `about`, `shortcuts` (read only), `report` (opens a report draft for review), `crashes` (the Crash Reports window) | the version, commit, build date and diagnostic text | -| `ui.prefs` | any of `default_units`, `nav` (`fusion`, `solidworks`, `inventor`, `alias`, `blender`, `tinkercad`, `openscad`, `touchpad`), `zoom_reverse`, `pan_reverse_x` (default false: horizontal scrolling pans the other way), `zoom_to_cursor`, `smooth_wheel_zoom` (default true), `trackpad_pan` (default true: two-finger scroll pans, except Touchpad always zooms; pinch zooms), `orbit_around` (`view_centre` (default: what Pan moves and Fit frames), `origin` (the world origin stays still on screen), `cursor` (the model point under the pointer when the drag began); the older `orbit_cursor` boolean still sets `cursor` when true), `sketch_exit_view` (`keep` (default: the view stays where it is when a sketch ends), `previous` (back to the view from before the sketch), `unless_rotated` (back unless the sketch view was turned)), `look_at_anim`, `look_at_speed`, `middle_double_click` (`home` (default), `fit`, `off`), `msaa`, `show_frame_rate` (default false: frames per second in the view's bottom-right corner, counting the frames the view draws anyway; it reads 0 FPS once the view is idle), `window_system` (Linux: `auto` (default: XWayland whenever there is an X display, native Wayland on niri), `wayland`, `x11`; saved in `graphics.json`, applies at the next start; `SOLIDCRAFT_WAYLAND` overrides it), `graphics_adapter` (exact card name, or empty for Automatic; applies after restart; `WGPU_ADAPTER_NAME` takes precedence), `frame_rate_details` (default false: with the frame rate, a frame-time graph of the frames drawn with the triangles over it, a frame-time histogram and what the GPU drew; clicking the readout switches it), `length_decimals`, `angle_decimals`, `step_values` (default false: Up/Down and the wheel step a plain number in a focused value field), `theme` (`dark`, `light`, `system` or a theme file's id: a built-in one such as `gruvbox-dark`, or an imported one; the reply's `theme_ids` lists them), `viewport_theme` (`theme` (default: the theme's own), `light`, `dark`: the 3D view in the Light or Dark theme's colours whatever the window uses, #4146), `theme_import` (a `solidcraft-theme/1` file's JSON or text: adds the theme and turns it on; the reply's `theme_imported` is its id), `theme_remove` (an imported theme's id), `theme_export: true` (the reply's `theme_file` is the theme on now as a complete file; see [colour themes](book/src/guide/ui-tour.md#colour-themes)), `language` (`en`, `ar`, `ja`, `de`, `fr`, `he`, `ko`, `ms`, `ru`, `uk`, `zh`; see [localization](localization.md)), `ui_scale`, `ui_font` (an installed font family or a font file for the interface; empty for the built-in font), `up_axis` (`z`, `y`), `offer_stand_up`, `extrude_auto_to_object` (default false: in the Extrude dialog, with a profile picked, a face, vertex or parallel plane picked off its plane switches the extent to To Object; it applies to Extrude dialogs opened afterwards), `hole_snaps` (default false: a Single hole snaps to its face's middle and round edges' centres), `hole_moves` (default false: a placed Single hole has a drag handle (`hole:`), and a pick on a face that has a hole moves it there), `placement_handles` (default false: handles on the preview of a Rest, Boss or Snap Fit that move it across the model and turn it), `color_vision` (`off` (default), `protan`, `deutan`, `tritan`: colour vision modes, #778), `view_confirm_corner` (default false: while a dialog or a sketch is open, a check and a cross at the view's top right, handles `view:confirm:ok` and `view:confirm:cancel`, do what the dialog's OK and Cancel do, or Finish Sketch and Cancel Sketch; the axis view or cube moves down below them, #6709), `history_sketches` (`in_order` (default), `under_feature`: the History at the left lists a sketch under the first feature built from it, #6489; the timeline at the bottom keeps the creation order), `dialog_buttons` (`bottom` (default), `top`: a feature dialog's OK, Cancel and Apply sit in its title row instead of under its inputs, #6708; the buttons keep their handles, and `dialog:close` is then Cancel's), `timeline_origin_bodies` (default false: the History on the left or under the browser starts with the active component's Bodies folder and the Origin, the browser's rows with their eyes, folds and menus; the bottom History is unchanged), `check_updates` (default true; [updates](book/src/guide/updates.md)), `nav_bridge_enabled` (default false) and `nav_bridge_port` (default 8765: a device's own app on this computer moves the view, [the navigation bridge](3d-mouse.md#device-apps-the-navigation-bridge)); `open` (a page: General, Interface, Design, Navigation, Keyboard Shortcuts, Sketch, Graphics, AI, Plugins; Shortcuts, Assistant and Sketch & selection are aliases, and the former Selection page opens Sketch) opens the Preferences dialog there; `button`: `ok`, `cancel`, `apply`, `defaults`; `stand_up: true` stands up a just-opened Y-up file, `stand_up: false` leaves it as it is ("Leave it": the offer closes and `offer_stand_up` stays on); the offer's buttons are the handles `stand_up:stand`, `stand_up:leave` and `stand_up:never` | sets preferences (kept between runs), returns them all plus `dialog` (the open page or null), `dark`, `viewport_dark` (whether the 3D view is dark) and `stand_up_offer` | +| `ui.prefs` | any of `default_units`, `nav` (`fusion`, `solidworks`, `inventor`, `alias`, `blender`, `tinkercad`, `openscad`, `touchpad`), `zoom_reverse`, `pan_reverse_x` (default false: horizontal scrolling pans the other way), `zoom_to_cursor`, `smooth_wheel_zoom` (default true), `trackpad_pan` (default true: two-finger scroll pans, except Touchpad always zooms; pinch zooms), `orbit_around` (`view_centre` (default: what Pan moves and Fit frames), `origin` (the world origin stays still on screen), `cursor` (the model point under the pointer when the drag began); the older `orbit_cursor` boolean still sets `cursor` when true), `sketch_exit_view` (`keep` (default: the view stays where it is when a sketch ends), `previous` (back to the view from before the sketch), `unless_rotated` (back unless the sketch view was turned)), `look_at_anim`, `look_at_speed`, `middle_double_click` (`home` (default), `fit`, `off`), `msaa`, `show_frame_rate` (default false: frames per second in the view's bottom-right corner, counting the frames the view draws anyway; it reads 0 FPS once the view is idle), `window_system` (Linux: `auto` (default: XWayland whenever there is an X display, native Wayland on niri), `wayland`, `x11`; saved in `graphics.json`, applies at the next start; `SOLIDCRAFT_WAYLAND` overrides it), `graphics_adapter` (exact card name, or empty for Automatic; applies after restart; `WGPU_ADAPTER_NAME` takes precedence), `frame_rate_details` (default false: with the frame rate, a frame-time graph of the frames drawn with the triangles over it, a frame-time histogram and what the GPU drew; clicking the readout switches it), `length_decimals`, `angle_decimals`, `step_values` (default false: Up/Down and the wheel step a plain number in a focused value field), `theme` (`dark`, `light`, `system` or a theme file's id: a built-in one such as `gruvbox-dark`, or an imported one; the reply's `theme_ids` lists them), `viewport_theme` (`theme` (default: the theme's own), `light`, `dark`: the 3D view in the Light or Dark theme's colours whatever the window uses, #4146), `theme_import` (a `solidcraft-theme/1` file's JSON or text: adds the theme and turns it on; the reply's `theme_imported` is its id), `theme_remove` (an imported theme's id), `theme_export: true` (the reply's `theme_file` is the theme on now as a complete file; see [colour themes](book/src/guide/ui-tour.md#colour-themes)), `language` (`en`, `ar`, `ja`, `de`, `fr`, `he`, `ko`, `ms`, `ru`, `uk`, `zh`; see [localization](localization.md)), `ui_scale`, `ui_font` (an installed font family or a font file for the interface; empty for the built-in font), `up_axis` (`z`, `y`), `offer_stand_up`, `extrude_auto_to_object` (default false: in the Extrude dialog, with a profile picked, a face, vertex or parallel plane picked off its plane switches the extent to To Object; it applies to Extrude dialogs opened afterwards), `hole_snaps` (default false: a Single hole snaps to its face's middle and round edges' centres), `hole_moves` (default false: a placed Single hole has a drag handle (`hole:`), and a pick on a face that has a hole moves it there), `placement_handles` (default false: handles on the preview of a Rest, Boss or Snap Fit that move it across the model and turn it), `color_vision` (`off` (default), `protan`, `deutan`, `tritan`: colour vision modes, #778), `view_confirm_corner` (default false: while a dialog or a sketch is open, a check and a cross at the view's top right, handles `view:confirm:ok` and `view:confirm:cancel`, do what the dialog's OK and Cancel do, or Finish Sketch and Cancel Sketch; the axis view or cube moves down below them, #6709), `history_sketches` (`in_order` (default), `under_feature`: the History at the left lists a sketch under the first feature built from it, #6489; the timeline at the bottom keeps the creation order), `dialog_buttons` (`bottom` (default), `top`: a feature dialog's OK, Cancel and Apply sit in its title row instead of under its inputs, #6708; the buttons keep their handles, and `dialog:close` is then Cancel's), `timeline_origin_bodies` (default false: the History on the left or under the browser starts with the active component's Bodies folder and the Origin, the browser's rows with their eyes, folds and menus; the bottom History is unchanged), `dialog_place` (`edge` (default) or `left_column`: command dialogs open in the left column in place of the browser and the History, #6707), `check_updates` (default true; [updates](book/src/guide/updates.md)), `nav_bridge_enabled` (default false) and `nav_bridge_port` (default 8765: a device's own app on this computer moves the view, [the navigation bridge](3d-mouse.md#device-apps-the-navigation-bridge)); `open` (a page: General, Interface, Design, Navigation, Keyboard Shortcuts, Sketch, Graphics, AI, Plugins; Shortcuts, Assistant and Sketch & selection are aliases, and the former Selection page opens Sketch) opens the Preferences dialog there; `button`: `ok`, `cancel`, `apply`, `defaults`; `stand_up: true` stands up a just-opened Y-up file, `stand_up: false` leaves it as it is ("Leave it": the offer closes and `offer_stand_up` stays on); the offer's buttons are the handles `stand_up:stand`, `stand_up:leave` and `stand_up:never` | sets preferences (kept between runs), returns them all plus `dialog` (the open page or null), `dark`, `viewport_dark` (whether the 3D view is dark) and `stand_up_offer` | | `ui.capture` | `action?`: `capture`, `revert`, `cancel` | answers the Capture Position question (asked when a command starts or the design is saved while components were moved without capturing); without `action`, what waits | | `ui.window` | `action`: minimize, maximize, restore, toggle, close | what the title bar's caption buttons do (on Windows and Linux the application bar is the title bar); close asks about unsaved designs first | | `ui.agent_cursor` | `show` (bool), `speed`: a number from 1 to 5 (times the normal speed) or `"instant"` (no animation: the command runs at once and the pointer jumps to where it acted), `follow_camera` (bool); all optional | the settings. While the cursor is shown, `engine.execute` first glides to the command's toolbar button and to each pick, then runs and replies; later requests wait their turn. The pointer shows the command's localized name, including commands inside a closed toolbar group; an animated batch names each command it visits. It also follows the pointer input sent with `ui.move`, `ui.click`, `ui.drag` and `ui.scroll`, as each event reaches the app, and a press leaves a ripple. `"animate": false` on a call skips it | From 28b27aac8f96d442441f24adedeba646536f2265 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:28:41 +0000 Subject: [PATCH 065/102] Saved model: kept only when every body decodes to itself (#6760) (#6761) The native codec gave one body back with other topology: a pattern copy cut by an automatic extrude, 10 faces, 18 edges and 10 vertices, came back with 12 vertices, so the design opened with another body than it was saved with. Encoded::of now decodes each body it encodes and keeps the model only when every body comes back with the same face, edge, vertex and shell counts; otherwise the design is saved without its model, as when the encoder refuses a body, and opening it evaluates it. Co-authored-by: Claude Opus 5.5 --- crates/engine/src/cmd/file.rs | 50 ++++++++++++++++++++++++++++ crates/io/src/design/native_cache.rs | 15 ++++++++- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/file.rs b/crates/engine/src/cmd/file.rs index 02c6e4e27..17d383a00 100644 --- a/crates/engine/src/cmd/file.rs +++ b/crates/engine/src/cmd/file.rs @@ -1146,6 +1146,56 @@ mod tests { assert!(d.rejected.is_empty()); } + /// A design whose saved model would give a body back with other topology opens with the + /// bodies it was saved with. A pattern copy cut by an automatic extrude came back from the + /// native codec with two loose vertices more (10 faces, 18 edges, 12 vertices instead of 10); + /// such a body is not kept, the design is saved without its model and evaluated on opening. + #[test] + fn a_design_opens_with_the_bodies_it_was_saved_with_when_one_does_not_decode_to_itself() { + let mut session = Session::new(Document::new("Roundtrip")); + for (cmd, p) in [ + ("solid.cylinder", json!({"axis": "Z", "base": [-2, -17, -2], "body_name": "B2", "height": 11, "radius": 6})), + ("sketch.create", json!({"plane": "YZ"})), + ( + "sketch.line", + json!({"closed": true, "ids": ["w3a", "w3b", "w3c", "w3d"], "infer": true, "points": [[-3, -22], [1, -22], [1, -17], [-3, -17]]}), + ), + ("sketch.dimension", json!({"entities": ["w3a"], "type": "length", "value": 9})), + ("solid.extrude", json!({"distance": -1, "operation": "cut"})), + ("solid.box", json!({"corner": [27, -22, 0], "height": 12, "length": "d3", "operation": "new", "width": 3})), + ("sketch.create", json!({"plane": "YZ"})), + ( + "sketch.line", + json!({"closed": true, "ids": ["w6a", "w6b", "w6c", "w6d"], "infer": true, "points": [[-16, -23], [2, -23], [2, -15], [-16, -15]]}), + ), + ("sketch.dimension", json!({"entities": ["w6a"], "type": "length", "value": 11})), + ("solid.extrude", json!({"distance": 18, "operation": "new"})), + ("solid.extrude", json!({"distance": -5, "operation": "new"})), + ("sketch.create", json!({"plane": "YZ"})), + ("sketch.circle.center", json!({"center": [15, -8], "radius": 9})), + ("solid.extrude", json!({"distance": "d8", "operation": "new"})), + ("solid.pattern.circular", json!({"axis": "Y", "bodies": ["Body4"], "count": 3})), + ("solid.extrude", json!({"distance": -16, "operation": "auto"})), + ] { + session.execute(cmd, &p).unwrap(); + } + let counts = |s: &Session| { + s.model + .state() + .bodies + .iter() + .map(|b| (b.name.clone(), b.body.face_count(), b.body.edge_count(), b.body.vertex_count())) + .collect::>() + }; + let bytes = session.design_container(solidcraft_io::DesignCompression::Fast, false, true).unwrap(); + let path = std::env::temp_dir().join(format!("solidcraft-roundtrip-{}.solidcraft", std::process::id())); + std::fs::write(&path, &bytes).unwrap(); + let mut reopened = Session::default(); + reopened.execute("doc.open", &json!({"path": path})).unwrap(); + std::fs::remove_file(&path).unwrap(); + assert_eq!(counts(&reopened), counts(&session)); + } + #[test] fn saved_model_needs_no_meshes_and_is_adopted_only_for_its_document() { let mut session = Session::new(Document::new("Saved model")); diff --git a/crates/io/src/design/native_cache.rs b/crates/io/src/design/native_cache.rs index 109856ff8..fc9d28822 100644 --- a/crates/io/src/design/native_cache.rs +++ b/crates/io/src/design/native_cache.rs @@ -101,6 +101,12 @@ struct Encoded { parts: Vec, } +/// What a decoded body must share with the one encoded: its faces, edges, vertices and shells. +fn same_topology(a: &solidcraft_kernel::Body, b: &solidcraft_kernel::Body) -> bool { + let counts = |x: &solidcraft_kernel::Body| (x.face_count(), x.edge_count(), x.vertex_count(), x.shell_count()); + counts(a) == counts(b) +} + impl Encoded { fn of(model: &SavedModel) -> Result { // What to encode: every body, and the part every placed copy shows. @@ -117,7 +123,14 @@ impl Encoded { })); } let bodies: Vec<&solidcraft_kernel::Body> = model.bodies.iter().chain(shares.iter().map(|s| s.original())).collect(); - let encoded = solidcraft_kernel::map_on_threads(&bodies, 16, |b| solidcraft_kernel::encode_native_body(b).ok()); + // A body is kept only when it decodes to itself: one the codec gave back with other + // topology (two loose vertices more on a pattern copy cut by an extrude) would open as + // another body. Then the model isn't kept, and opening the design evaluates it. + let encoded = solidcraft_kernel::map_on_threads(&bodies, 16, |b| { + let bytes = solidcraft_kernel::encode_native_body(b).ok()?; + let back = solidcraft_kernel::decode_native_body(&bytes).ok()?; + same_topology(b, &back).then_some(bytes) + }); let mut slices = Vec::new(); let mut by_digest = std::collections::HashMap::new(); let mut index = Vec::with_capacity(encoded.len()); From 8962ae10e77f47cfc8e4302b1a05e7d1f5030de9 Mon Sep 17 00:00:00 2001 From: HiroKenEz <59478073+HiroKenEz@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:29:05 +0000 Subject: [PATCH 066/102] Box dialog: place the box by its corner or centre (#5638) (#6248) * claim: #5638 * Box dialog: place the box by its corner or centre (#5638) The Box dialog gets a Placement choice (Corner or Center) with X, Y and Z fields that take expressions and units, and a Point input: a vertex, a point on an edge or face, or the origin picked in the view fills them. The Cylinder dialog gets X, Y and Z for the centre of its base. Left alone, a new dialog sends no placement, so the box stays at the origin; Edit Feature shows the stored point and OK without a change keeps it. Co-Authored-By: Claude Opus 5.5 * Box dialog test: pass the active feature to Input::accepts Co-Authored-By: Claude Opus 5.5 * Box dialog: Base Center in the complete Arabic, Hebrew and Vietnamese catalogs (#5638) Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 Co-authored-by: bherbruck --- .../locales/pending/box-dialog-placement.json | 9 + crates/ui-egui/src/dialogs.rs | 10 +- crates/ui-egui/src/dialogs_dense.rs | 3 + crates/ui-egui/src/lib.rs | 1 + crates/ui-egui/src/primitive_placement.rs | 133 +++++++++++++ crates/ui-egui/src/primitive_units_tests.rs | 175 +++++++++++++++++- 6 files changed, 328 insertions(+), 3 deletions(-) create mode 100644 assets/locales/pending/box-dialog-placement.json create mode 100644 crates/ui-egui/src/primitive_placement.rs diff --git a/assets/locales/pending/box-dialog-placement.json b/assets/locales/pending/box-dialog-placement.json new file mode 100644 index 000000000..4f5220ae6 --- /dev/null +++ b/assets/locales/pending/box-dialog-placement.json @@ -0,0 +1,9 @@ +{ + "en": { "Base Center": "Base Center" }, + "en-GB": { "Base Center": "Base Centre" }, + "ar": { "Base Center": "مركز القاعدة" }, + "he": { "Base Center": "מרכז הבסיס" }, + "ja": { "Base Center": "底面の中心" }, + "vi": { "Base Center": "Tâm đáy" }, + "zh": { "Base Center": "底面中心" } +} diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index be4757434..0cf0bdc37 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -933,7 +933,7 @@ impl Dialog { operation: 0, at: None, }, - vec![], + crate::primitive_placement::inputs("solid.box"), ), "solid.cylinder" => Dialog::new( Kind::Primitive { @@ -1567,6 +1567,10 @@ impl Dialog { self.error = None; self.sync_thread(s); self.sync_material(s); + if let Kind::Primitive { cmd, at, .. } = &mut self.kind { + let picked = self.inputs.get(self.active).and_then(|i| i.items.first()); + crate::primitive_placement::picked(s, cmd, at, &mut self.extra, picked); + } } /// Box selection result: replace (or add to) the active input. @@ -3435,7 +3439,7 @@ pub(crate) fn length_default(s: &Session, number: &str) -> String { /// A feature's length as its edit field shows it. A bare number is kept in millimetres: where the /// design reads bare numbers in another unit, the field says "mm" (as the configuration table /// does), so OK keeps the size. Anything else shows as stored. -fn stored_length(s: &Session, e: &str) -> String { +pub(crate) fn stored_length(s: &Session, e: &str) -> String { if s.doc.with_design_unit(e, ValueKind::Length) == e { e.to_string() } else { format!("{} mm", e.trim()) } } @@ -4498,6 +4502,8 @@ fn dialog_commands(app: &SolveApp, d: &Dialog) -> Result, S p.insert("center".into(), pt(point)); } } + } else { + crate::primitive_placement::params(s, cmd, &d.extra, &mut p); } p.insert("operation".into(), json!(OPS.get(*operation).copied().unwrap_or("new"))); (cmd, Value::Object(p)) diff --git a/crates/ui-egui/src/dialogs_dense.rs b/crates/ui-egui/src/dialogs_dense.rs index 513cda600..708b7c345 100644 --- a/crates/ui-egui/src/dialogs_dense.rs +++ b/crates/ui-egui/src/dialogs_dense.rs @@ -804,6 +804,9 @@ fn additional_rows(app: &mut SolveApp, d: &mut Dialog, ui: &mut egui::Ui) -> boo if *cmd == "solid.coil" { enter |= coil_rows(ui, &mut d.extra); } + if at.is_none() { + enter |= crate::primitive_placement::rows(ui, &app.session, cmd, &mut d.extra); + } if let Some((p, _)) = *at { form_row(ui, "Position", |ui| { ui.horizontal(|ui| { diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index e774ea0de..02c794eff 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -197,6 +197,7 @@ pub mod prefs_notice; #[cfg(test)] mod preselect_tests; pub mod preview; +mod primitive_placement; #[cfg(test)] mod primitive_units_tests; pub mod recovery_ui; diff --git a/crates/ui-egui/src/primitive_placement.rs b/crates/ui-egui/src/primitive_placement.rs new file mode 100644 index 000000000..053d399a8 --- /dev/null +++ b/crates/ui-egui/src/primitive_placement.rs @@ -0,0 +1,133 @@ +//! Where a Box or Cylinder goes, typed in its dialog (#5638). The Box is placed by its corner +//! or its centre, the Cylinder by the centre of its base, as X, Y and Z fields that take +//! expressions and units like the size fields. A point picked in the view (a vertex, a point on +//! an edge or face, the origin) fills the Box's fields. +//! +//! The placement lives in the dialog's extra parameters under the command's own key (`corner`, +//! `center` or `base`). It is written there only once a field or the choice changes, so a new +//! dialog left alone sends no placement (the box stays at the origin, as before), and an edited +//! feature's stored point goes back unchanged. + +use serde_json::{Map, Value, json}; +use solidcraft_engine::Session; +use solidcraft_engine::doc::expr::Kind as ValueKind; +use solidcraft_engine::geom::Vec3; + +use crate::i18n::tr; +use crate::selection::{EDGES, FACES, ORIGIN, SelInput, VERTICES}; +use crate::ui_kit::{self, choice_row, expr_row}; +use solidcraft_engine::Sel; + +/// The placement keys a primitive's dialog offers, the choice's first option first. +fn keys(cmd: &str) -> &'static [&'static str] { + match cmd { + "solid.box" => &["corner", "center"], + "solid.cylinder" => &["base"], + _ => &[], + } +} + +/// The Box's choice of the point its fields place. +const BOX_PLACEMENTS: [&str; 2] = ["Corner", "Center"]; + +/// The selection inputs of a primitive's dialog: the Box takes a point for its corner or centre. +pub(crate) fn inputs(cmd: &str) -> Vec { + match cmd { + "solid.box" => vec![SelInput::new("Point", VERTICES | EDGES | FACES | ORIGIN, false)], + _ => Vec::new(), + } +} + +/// The text a placement coordinate shows: typed text as it is, a stored number (millimetres) as +/// the edit fields show stored lengths. +fn shown(s: &Session, v: Option<&Value>) -> String { + match v { + Some(Value::String(t)) => t.clone(), + // "10", not the JSON number's "10.0". + Some(Value::Number(n)) => crate::dialogs::stored_length(s, &n.as_f64().map_or_else(|| n.to_string(), |v| v.to_string())), + _ => crate::dialogs::length_default(s, "0"), + } +} + +/// The current placement: which key, and its three coordinates as the fields show them. +fn current(s: &Session, cmd: &str, extra: &Map) -> Option<(usize, [String; 3])> { + let keys = keys(cmd); + let first = keys.first()?; + let index = keys.iter().position(|k| extra.contains_key(*k)).unwrap_or(0); + let point = extra.get(keys.get(index).copied().unwrap_or(first)).and_then(Value::as_array); + let coord = |i: usize| shown(s, point.and_then(|p| p.get(i))); + Some((index, [coord(0), coord(1), coord(2)])) +} + +/// Store a placement under `key`, replacing the other choice. +fn store(cmd: &str, extra: &mut Map, index: usize, coords: &[String; 3]) { + let keys = keys(cmd); + let Some(key) = keys.get(index) else { return }; + for k in keys { + extra.remove(*k); + } + extra.insert((*key).into(), json!(coords)); +} + +/// The placement rows (shown while no pre-selected face or vertex places the primitive). True +/// when Enter was pressed in a field. +pub(crate) fn rows(ui: &mut egui::Ui, s: &Session, cmd: &str, extra: &mut Map) -> bool { + let Some((index, mut coords)) = current(s, cmd, extra) else { return false }; + let mut choice = index; + if keys(cmd).len() > 1 { + choice_row(ui, "Placement", "pr_place", &mut choice, &BOX_PLACEMENTS); + } else { + ui_kit::row(ui, "Placement", |ui| { + ui_kit::text(ui, tr("Base Center"), ui_kit::Text::Cell); + }); + } + let before = coords.clone(); + let mut enter = false; + for (label, value) in ["X", "Y", "Z"].into_iter().zip(coords.iter_mut()) { + enter |= expr_row(ui, label, value); + } + if choice != index || coords != before { + store(cmd, extra, choice, &coords); + } + enter +} + +/// A coordinate of a picked point as a field shows it, in millimetres. +fn mm(v: f64) -> String { + let v = (v * 1e6).round() / 1e6; + // No "-0 mm". + let v = if v == 0.0 { 0.0 } else { v }; + format!("{v} mm") +} + +/// A point picked into the Box's input: it goes into the X, Y and Z of the current placement +/// (the corner or the centre), replacing a pre-selected face or vertex. +pub(crate) fn picked(s: &Session, cmd: &str, at: &mut Option<(Vec3, Option)>, extra: &mut Map, sel: Option<&Sel>) { + let point = match sel { + Some(Sel::Vertex { point, .. } | Sel::Face { point, .. } | Sel::Edge { point, .. }) => *point, + _ => return, + }; + if !point.is_finite() || inputs(cmd).is_empty() { + return; + } + let Some((index, _)) = current(s, cmd, extra) else { return }; + store(cmd, extra, index, &[mm(point.x), mm(point.y), mm(point.z)]); + *at = None; +} + +/// The typed placement into the command's parameters: a bare number typed into a field is in the +/// design's units (as in the size fields), an empty field is 0, and a stored number is kept. +pub(crate) fn params(s: &Session, cmd: &str, extra: &Map, p: &mut Map) { + for key in keys(cmd) { + let Some(Value::Array(point)) = extra.get(*key) else { continue }; + let coords: Vec = point + .iter() + .map(|c| match c { + Value::String(t) if t.trim().is_empty() => json!(0), + Value::String(t) => json!(s.doc.with_design_unit(t, ValueKind::Length)), + other => other.clone(), + }) + .collect(); + p.insert((*key).into(), Value::Array(coords)); + } +} diff --git a/crates/ui-egui/src/primitive_units_tests.rs b/crates/ui-egui/src/primitive_units_tests.rs index 5f94a7463..7c2fcbf63 100644 --- a/crates/ui-egui/src/primitive_units_tests.rs +++ b/crates/ui-egui/src/primitive_units_tests.rs @@ -1,6 +1,7 @@ //! #630: the Box, Cylinder, Sphere, Torus and Coil dialogs show the unit of their sizes, as the //! other dialogs do ("10 mm"), in the design's units. OK makes what the bare numbers made before, -//! and a bare number typed into a field still means the design's units. +//! and a bare number typed into a field still means the design's units. #5638: the Box dialog +//! places the box by its corner or centre and the Cylinder dialog by its base, typed or picked. use serde_json::{Value, json}; use solidcraft_engine::Session; @@ -438,3 +439,175 @@ fn cone_dialog_makes_a_cone_and_edits_it_into_a_frustum() { let (_, params) = apply_commands(&h.app, h.app.dialog.as_ref().unwrap()).unwrap().remove(0); assert_eq!(params["operation"], json!("cut")); } + +/// The bounding boxes of the design's bodies, in order: (min, max) in mm. +fn bounds(s: &mut Session) -> Vec<([f64; 3], [f64; 3])> { + let r = s.execute("inspect.measure", &json!({})).unwrap(); + let corner = |v: &Value| -> [f64; 3] { std::array::from_fn(|i| v[i].as_f64().unwrap()) }; + r["bodies"].as_array().unwrap().iter().map(|b| (corner(&b["bbox"]["min"]), corner(&b["bbox"]["max"]))).collect() +} + +/// Within a micron. +fn assert_near(got: [f64; 3], want: [f64; 3]) { + assert_within(got, want, 1e-6); +} + +fn assert_within(got: [f64; 3], want: [f64; 3], tol: f64) { + assert!(got.iter().zip(want).all(|(g, w)| (g - w).abs() < tol), "{got:?}, want {want:?}"); +} + +/// The open dialog's command parameters. +fn sent(h: &Harness) -> Value { + apply_commands(&h.app, h.app.dialog.as_ref().unwrap()).unwrap().remove(0).1 +} + +/// Choose a dropdown option, as a person does. +fn choose(h: &mut Harness, row: &str, option: &str) { + h.step(&json!({"click": {"handle": format!("dialog:{row}")}})).unwrap(); + h.frames(2); + h.step(&json!({"click": {"handle": format!("dialog:{row}:{option}")}})).unwrap(); + h.frames(2); +} + +#[test] +fn the_box_dialog_places_the_box_by_its_corner_or_its_centre() { + let mut h = design("mm"); + h.app.start("solid.box"); + h.frames(3); + let origin: Vec<(&str, String)> = ["X", "Y", "Z"].iter().map(|k| (*k, "0 mm".to_string())).collect(); + assert_shown(&h, &origin); + // Left alone it sends no placement: the box at the origin, as before. + let p = sent(&h); + assert!(p.get("corner").is_none() && p.get("center").is_none(), "{p}"); + // The corner, typed: a bare number, a unit, an expression. + type_into(&mut h, "X", "10"); + type_into(&mut h, "Y", "-5 mm"); + type_into(&mut h, "Z", "2 * 5 mm"); + h.frames(2); + assert_eq!(sent(&h)["corner"], json!(["10", "-5 mm", "2 * 5 mm"])); + ok(&mut h); + let made = bounds(&mut h.app.session); + assert_near(made[0].0, [10.0, -5.0, 10.0]); + assert_near(made[0].1, [30.0, 15.0, 30.0]); + // The centre instead. + h.app.start("solid.box"); + h.frames(3); + choose(&mut h, "Placement", "Center"); + type_into(&mut h, "X", "50"); + h.frames(2); + let p = sent(&h); + assert_eq!(p["center"], json!(["50", "0 mm", "0 mm"]), "{p}"); + assert!(p.get("corner").is_none(), "{p}"); + ok(&mut h); + let made = bounds(&mut h.app.session); + assert_near(made[1].0, [40.0, -10.0, -10.0]); + assert_near(made[1].1, [60.0, 10.0, 10.0]); +} + +#[test] +fn a_bare_placement_number_is_in_the_designs_units_and_negative_sizes_go_the_other_way() { + let mut h = design("in"); + h.app.start("solid.box"); + h.frames(3); + type_into(&mut h, "X", "1"); + type_into(&mut h, "length", "-1"); + h.frames(2); + let p = sent(&h); + assert_eq!((&p["corner"][0], &p["length"]), (&json!("1 in"), &json!("-1 in")), "{p}"); + ok(&mut h); + // From the corner at x = 1 in back to x = 0. + let made = bounds(&mut h.app.session); + assert_near(made[0].0, [0.0, 0.0, 0.0]); + assert_near(made[0].1, [25.4, 508.0, 508.0]); +} + +#[test] +fn editing_a_box_or_cylinder_shows_its_placement_and_keeps_it() { + use solidcraft_engine::doc::FeatureKind; + let mut h = design("mm"); + h.app.run("parameters.add", json!({"name": "w", "expression": "15 mm"})).unwrap(); + h.app.run("solid.box", json!({"length": 10, "width": 10, "height": 10, "corner": ["w", 0, 5]})).unwrap(); + h.app.run("solid.cylinder", json!({"radius": 5, "height": 10, "base": [60, 0, 0], "operation": "new"})).unwrap(); + h.frames(2); + let ids: Vec = h.app.session.doc.features.iter().map(|f| f.id).collect(); + let stored = |h: &Harness, id: u64| match h.app.session.doc.feature(id).map(|f| &f.kind) { + Some(FeatureKind::Box { corner, .. }) => corner.iter().map(ToString::to_string).collect::>(), + Some(FeatureKind::Cylinder { base, .. }) => base.iter().map(ToString::to_string).collect(), + other => panic!("not a box or cylinder: {other:?}"), + }; + let (box_id, cylinder_id) = (ids[0], ids[1]); + let box_corner = stored(&h, box_id); + h.app.edit_feature(box_id); + h.frames(3); + assert_shown(&h, &[("X", "w".into()), ("Y", "0".into()), ("Z", "5".into())]); + ok(&mut h); + assert_eq!(stored(&h, box_id), box_corner, "OK without a change keeps the corner"); + // A changed coordinate moves it. + h.app.edit_feature(box_id); + h.frames(3); + type_into(&mut h, "Z", "8"); + h.frames(2); + ok(&mut h); + assert_eq!(stored(&h, box_id), ["w", "0", "8"]); + assert_near(bounds(&mut h.app.session)[0].0, [15.0, 0.0, 8.0]); + // The cylinder's base. + let base = stored(&h, cylinder_id); + h.app.edit_feature(cylinder_id); + h.frames(3); + assert_shown(&h, &[("X", "60".into()), ("Y", "0".into()), ("Z", "0".into())]); + ok(&mut h); + assert_eq!(stored(&h, cylinder_id), base); +} + +#[test] +fn the_cylinder_dialog_takes_its_base_point() { + let mut h = design("mm"); + h.app.start("solid.cylinder"); + h.frames(3); + assert!(sent(&h).get("base").is_none(), "left alone, at the origin as before"); + type_into(&mut h, "X", "30"); + type_into(&mut h, "Z", "-4"); + h.frames(2); + assert_eq!(sent(&h)["base"], json!(["30", "0 mm", "-4"])); + ok(&mut h); + let made = bounds(&mut h.app.session); + assert_within(made[0].0, [20.0, -10.0, -4.0], 1e-2); + assert_within(made[0].1, [40.0, 10.0, 16.0], 1e-2); +} + +#[test] +fn a_point_picked_in_the_box_dialog_becomes_its_corner_or_centre() { + use solidcraft_engine::Sel; + use solidcraft_engine::geom::Vec3; + let mut h = design("mm"); + h.app.run("solid.box", json!({"length": 40, "width": 30, "height": 20, "body_name": "Base"})).unwrap(); + h.frames(2); + // A face picked before the command: the box stands on it, as before (no typed placement). + h.app.session.selection = vec![Sel::Face { body: "Base".into(), index: 0, point: Vec3::new(20.0, 15.0, 20.0) }]; + h.app.start("solid.box"); + h.frames(3); + let pick = |h: &mut Harness, sel: Sel| { + let mut d = h.app.dialog.take().unwrap(); + let hit = crate::viewport::Hit::Vertex { body: "Base".into(), point: Vec3::ZERO }; + assert!(d.active_input().is_some_and(|i| i.accepts(&hit, None, |_, _| true).is_some()), "the Box dialog takes a vertex"); + d.pick(&h.app.session, sel); + h.app.dialog = Some(d); + h.frames(2); + }; + let placed = |h: &Harness| matches!(h.app.dialog.as_ref().map(|d| &d.kind), Some(Kind::Primitive { at: Some(_), .. })); + assert!(placed(&h), "the pre-selected face places it"); + // A vertex picked in the dialog: the corner there, in the fields, instead of the face. + pick(&mut h, Sel::Vertex { body: "Base".into(), point: Vec3::new(40.0, 30.0, 20.0) }); + assert!(!placed(&h)); + assert_shown(&h, &[("X", "40 mm".into()), ("Y", "30 mm".into()), ("Z", "20 mm".into())]); + assert_eq!(sent(&h)["corner"], json!(["40 mm", "30 mm", "20 mm"])); + // With Center chosen, the pick is the centre. + choose(&mut h, "Placement", "Center"); + pick(&mut h, Sel::Vertex { body: "Base".into(), point: Vec3::new(0.0, 0.0, 0.0) }); + let p = sent(&h); + assert_eq!(p["center"], json!(["0 mm", "0 mm", "0 mm"]), "{p}"); + assert!(p.get("corner").is_none(), "{p}"); + ok(&mut h); + let made = bounds(&mut h.app.session); + assert_near(made[1].0, [-10.0, -10.0, -10.0]); +} From 0accea759d36127154b99478601b4ba8ff71c899 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:59:12 +0000 Subject: [PATCH 067/102] Regenerate generated files and fold pending files [skip ci] --- ATTRIBUTION.md | 2 ++ attribution/pending/theme-1-bit.md | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 attribution/pending/theme-1-bit.md diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index af28fda57..e1ce57146 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -579,6 +579,8 @@ Original SolidCraft drawings, Open for owner review; no runtime assignments. | assets/locales/ar.json | Abdullah (A-AL-ANAZI) | Original Arabic translation of SolidCraft's English catalog; no commercial CAD text used | MIT OR Apache-2.0 | | assets/locales/he.json | SolidCraft contributors | Original Hebrew translation of SolidCraft's English catalog; no commercial CAD text used | MIT OR Apache-2.0 | | assets/styles/ui/themes/cga.json | SolidCraft contributors | original SolidCraft theme file using the 16 colours of the IBM Color Graphics Adapter (black, cyan, magenta, and white of its high-intensity palette 1 for the interface) | MIT OR Apache-2.0 | +| assets/styles/ui/themes/1-bit.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 | +| assets/styles/ui/themes/1-bit-dark.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 | ## Code adapted from sibling projects diff --git a/attribution/pending/theme-1-bit.md b/attribution/pending/theme-1-bit.md deleted file mode 100644 index f5f8868e9..000000000 --- a/attribution/pending/theme-1-bit.md +++ /dev/null @@ -1,2 +0,0 @@ -| assets/styles/ui/themes/1-bit.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 | -| assets/styles/ui/themes/1-bit-dark.json | SolidCraft contributors | original SolidCraft theme file | MIT OR Apache-2.0 | From ee6ec09b0a6d76ff614cc16da492072dce25b35f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 19:07:17 +0000 Subject: [PATCH 068/102] Regenerate generated files and fold pending files [skip ci] --- assets/locales/ar.json | 5 ++ assets/locales/de.json | 4 ++ assets/locales/en-GB.json | 1 + assets/locales/en.json | 5 ++ assets/locales/he.json | 5 ++ assets/locales/ja.json | 5 ++ assets/locales/ko.json | 4 ++ assets/locales/nl.json | 4 ++ .../locales/pending/box-dialog-placement.json | 9 --- .../locales/pending/dialogs-left-column.json | 56 ------------------- assets/locales/vi.json | 5 ++ assets/locales/zh.json | 5 ++ 12 files changed, 43 insertions(+), 65 deletions(-) delete mode 100644 assets/locales/pending/box-dialog-placement.json delete mode 100644 assets/locales/pending/dialogs-left-column.json diff --git a/assets/locales/ar.json b/assets/locales/ar.json index 49fb2f332..c5b61b474 100644 --- a/assets/locales/ar.json +++ b/assets/locales/ar.json @@ -56,6 +56,7 @@ "BOUNDARY SURFACE": "سطح حدودي", "BROWSER": "المستعرض", "Bar": "قضيب", + "Base Center": "مركز القاعدة", "Bend": "زاوية الثني", "Bend Edges": "حواف الثني", "Bend Line Position": "موضع خط الثني", @@ -1471,6 +1472,10 @@ "prefs.design_note": "ما تبدأ به التصاميم الجديدة. التصاميم المفتوحة تحتفظ بإعداداتها.", "prefs.devices": "الفأرة ثلاثية الأبعاد", "prefs.dialog_buttons": "أزرار مربعات الحوار", + "prefs.dialogs": "الحوارات", + "prefs.dialogs_edge": "عند حافة العرض", + "prefs.dialogs_left_column": "في العمود الأيسر", + "prefs.dialogs_note": "مكان فتح حوارات الأوامر: مثبتة عند حافة العرض، أو في العمود الأيسر مكان المستعرض والسجل، اللذين يعودان كما كانا عند إغلاق الحوار.", "prefs.display": "العرض", "prefs.edges": "الحواف والتظليل", "prefs.extend": "توسيع", diff --git a/assets/locales/de.json b/assets/locales/de.json index d226f5db8..feb8a21ac 100644 --- a/assets/locales/de.json +++ b/assets/locales/de.json @@ -1250,6 +1250,10 @@ "pick a hole to seat it, or OK places it at the origin": "Wählen Sie eine Bohrung zum Einsetzen, oder OK platziert es im Ursprung", "pick one or two vertices, edges or faces": "Wählen Sie ein oder zwei Ecken, Kanten oder Flächen", "prefs.cpu": "CPU (Software)", + "prefs.dialogs": "Dialoge", + "prefs.dialogs_edge": "Am Rand der Ansicht", + "prefs.dialogs_left_column": "In der linken Spalte", + "prefs.dialogs_note": "Wo Befehlsdialoge öffnen: am Rand der Ansicht angedockt oder in der linken Spalte anstelle von Browser und Verlauf, die beim Schließen des Dialogs wie zuvor zurückkehren.", "prefs.history_origin_bodies": "Ursprung und Körper oben zeigen", "prefs.history_origin_bodies_note": "Der Verlauf links oder unter dem Browser beginnt mit dem Körper-Ordner der aktiven Komponente und dem Ursprung, mit Augen und Menüs wie im Browser. Der Verlauf unten bleibt unverändert.", "prefs.minutes_suffix": " min", diff --git a/assets/locales/en-GB.json b/assets/locales/en-GB.json index 168c5cfac..235431930 100644 --- a/assets/locales/en-GB.json +++ b/assets/locales/en-GB.json @@ -1,4 +1,5 @@ { + "Base Center": "Base Centre", "Center X": "Centre X", "Center Y": "Centre Y", "Center of mass": "Centre of mass", diff --git a/assets/locales/en.json b/assets/locales/en.json index 3a92922d7..41e670889 100644 --- a/assets/locales/en.json +++ b/assets/locales/en.json @@ -56,6 +56,7 @@ "BOUNDARY SURFACE": "BOUNDARY SURFACE", "BROWSER": "BROWSER", "Bar": "Bar", + "Base Center": "Base Center", "Bend": "Bend", "Bend Edges": "Bend Edges", "Bend Line Position": "Bend Line Position", @@ -1471,6 +1472,10 @@ "prefs.design_note": "What new designs start with. Open designs keep their own.", "prefs.devices": "3D mouse", "prefs.dialog_buttons": "Dialog buttons", + "prefs.dialogs": "Dialogs", + "prefs.dialogs_edge": "At the view's edge", + "prefs.dialogs_left_column": "In the left column", + "prefs.dialogs_note": "Where command dialogs open: docked at the view's edge, or in the left column in place of the browser and the History, which come back as they were when the dialog closes.", "prefs.display": "Display", "prefs.edges": "Edges and shading", "prefs.extend": "Extend", diff --git a/assets/locales/he.json b/assets/locales/he.json index bf0cf493f..a2aa673aa 100644 --- a/assets/locales/he.json +++ b/assets/locales/he.json @@ -56,6 +56,7 @@ "BOUNDARY SURFACE": "משטח גבול", "BROWSER": "עץ התכן", "Bar": "מוט", + "Base Center": "מרכז הבסיס", "Bend": "זווית כיפוף", "Bend Edges": "מקצועות כיפוף", "Bend Line Position": "מיקום קו הכיפוף", @@ -1471,6 +1472,10 @@ "prefs.design_note": "ההגדרות שתכנים חדשים מתחילים איתן. תכנים פתוחים שומרים על ההגדרות שלהם.", "prefs.devices": "עכבר תלת־ממדי", "prefs.dialog_buttons": "לחצני תיבות דו־שיח", + "prefs.dialogs": "תיבות דו־שיח", + "prefs.dialogs_edge": "בקצה התצוגה", + "prefs.dialogs_left_column": "בעמודה השמאלית", + "prefs.dialogs_note": "היכן נפתחות תיבות הדו־שיח של הפקודות: מעוגנות בקצה התצוגה, או בעמודה השמאלית במקום הדפדפן וההיסטוריה, שחוזרים כפי שהיו כשהתיבה נסגרת.", "prefs.display": "תצוגה", "prefs.edges": "מקצועות והצללה", "prefs.extend": "הרחבה", diff --git a/assets/locales/ja.json b/assets/locales/ja.json index 08dc52c77..4eb079ff0 100644 --- a/assets/locales/ja.json +++ b/assets/locales/ja.json @@ -56,6 +56,7 @@ "BOUNDARY SURFACE": "境界サーフェス", "BROWSER": "ブラウザ", "Bar": "平鋼", + "Base Center": "底面の中心", "Bend": "曲げ角度", "Bend Edges": "曲げエッジ", "Bend Line Position": "曲げ線位置", @@ -1471,6 +1472,10 @@ "prefs.design_note": "新しいデザインの初期設定です。開いているデザインはそれぞれの設定を保持します。", "prefs.devices": "3D マウス", "prefs.dialog_buttons": "ダイアログのボタン", + "prefs.dialogs": "ダイアログ", + "prefs.dialogs_edge": "ビューの端", + "prefs.dialogs_left_column": "左の列", + "prefs.dialogs_note": "コマンドダイアログを開く場所:ビューの端にドッキングするか、左の列でブラウザーと履歴の代わりに表示します。ダイアログを閉じるとブラウザーと履歴は元どおりに戻ります。", "prefs.display": "表示", "prefs.edges": "エッジと陰影", "prefs.extend": "拡張", diff --git a/assets/locales/ko.json b/assets/locales/ko.json index b4f278b61..acc3a023b 100644 --- a/assets/locales/ko.json +++ b/assets/locales/ko.json @@ -1227,6 +1227,10 @@ "prefs.design_note": "새 설계가 시작할 때의 설정입니다. 열려 있는 설계는 자체 설정을 유지합니다.", "prefs.devices": "3D 마우스", "prefs.dialog_buttons": "대화 상자 버튼", + "prefs.dialogs": "대화 상자", + "prefs.dialogs_edge": "뷰 가장자리", + "prefs.dialogs_left_column": "왼쪽 열", + "prefs.dialogs_note": "명령 대화 상자가 열리는 위치: 뷰 가장자리에 고정하거나, 왼쪽 열에서 브라우저와 이력 대신 표시합니다. 대화 상자를 닫으면 브라우저와 이력이 그대로 돌아옵니다.", "prefs.display": "표시", "prefs.edges": "모서리 및 음영", "prefs.extend": "확장", diff --git a/assets/locales/nl.json b/assets/locales/nl.json index 278c27022..260043a33 100644 --- a/assets/locales/nl.json +++ b/assets/locales/nl.json @@ -1001,6 +1001,10 @@ "pick a hole to seat it, or OK places it at the origin": "kies een gat om het te plaatsen, of OK plaatst het op de oorsprong", "pick one or two vertices, edges or faces": "kies een of twee hoekpunten, randen of vlakken", "prefs.cpu": "CPU (software)", + "prefs.dialogs": "Dialogen", + "prefs.dialogs_edge": "Aan de rand van de weergave", + "prefs.dialogs_left_column": "In de linkerkolom", + "prefs.dialogs_note": "Waar opdrachtdialogen openen: vastgezet aan de rand van de weergave, of in de linkerkolom in plaats van de browser en de geschiedenis, die terugkomen zoals ze waren wanneer de dialoog sluit.", "prefs.minutes_suffix": " min", "properties.title": "Eigenschappen: {name}", "recovery.days_ago": "{count} dagen geleden", diff --git a/assets/locales/pending/box-dialog-placement.json b/assets/locales/pending/box-dialog-placement.json deleted file mode 100644 index 4f5220ae6..000000000 --- a/assets/locales/pending/box-dialog-placement.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "en": { "Base Center": "Base Center" }, - "en-GB": { "Base Center": "Base Centre" }, - "ar": { "Base Center": "مركز القاعدة" }, - "he": { "Base Center": "מרכז הבסיס" }, - "ja": { "Base Center": "底面の中心" }, - "vi": { "Base Center": "Tâm đáy" }, - "zh": { "Base Center": "底面中心" } -} diff --git a/assets/locales/pending/dialogs-left-column.json b/assets/locales/pending/dialogs-left-column.json deleted file mode 100644 index 78c67066d..000000000 --- a/assets/locales/pending/dialogs-left-column.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "en": { - "prefs.dialogs": "Dialogs", - "prefs.dialogs_edge": "At the view's edge", - "prefs.dialogs_left_column": "In the left column", - "prefs.dialogs_note": "Where command dialogs open: docked at the view's edge, or in the left column in place of the browser and the History, which come back as they were when the dialog closes." - }, - "de": { - "prefs.dialogs": "Dialoge", - "prefs.dialogs_edge": "Am Rand der Ansicht", - "prefs.dialogs_left_column": "In der linken Spalte", - "prefs.dialogs_note": "Wo Befehlsdialoge öffnen: am Rand der Ansicht angedockt oder in der linken Spalte anstelle von Browser und Verlauf, die beim Schließen des Dialogs wie zuvor zurückkehren." - }, - "ja": { - "prefs.dialogs": "ダイアログ", - "prefs.dialogs_edge": "ビューの端", - "prefs.dialogs_left_column": "左の列", - "prefs.dialogs_note": "コマンドダイアログを開く場所:ビューの端にドッキングするか、左の列でブラウザーと履歴の代わりに表示します。ダイアログを閉じるとブラウザーと履歴は元どおりに戻ります。" - }, - "ko": { - "prefs.dialogs": "대화 상자", - "prefs.dialogs_edge": "뷰 가장자리", - "prefs.dialogs_left_column": "왼쪽 열", - "prefs.dialogs_note": "명령 대화 상자가 열리는 위치: 뷰 가장자리에 고정하거나, 왼쪽 열에서 브라우저와 이력 대신 표시합니다. 대화 상자를 닫으면 브라우저와 이력이 그대로 돌아옵니다." - }, - "nl": { - "prefs.dialogs": "Dialogen", - "prefs.dialogs_edge": "Aan de rand van de weergave", - "prefs.dialogs_left_column": "In de linkerkolom", - "prefs.dialogs_note": "Waar opdrachtdialogen openen: vastgezet aan de rand van de weergave, of in de linkerkolom in plaats van de browser en de geschiedenis, die terugkomen zoals ze waren wanneer de dialoog sluit." - }, - "zh": { - "prefs.dialogs": "对话框", - "prefs.dialogs_edge": "视图边缘", - "prefs.dialogs_left_column": "左侧栏", - "prefs.dialogs_note": "命令对话框的打开位置:停靠在视图边缘,或在左侧栏中替代浏览器和历史;关闭对话框后,浏览器和历史恢复原样。" - }, - "ar": { - "prefs.dialogs": "الحوارات", - "prefs.dialogs_edge": "عند حافة العرض", - "prefs.dialogs_left_column": "في العمود الأيسر", - "prefs.dialogs_note": "مكان فتح حوارات الأوامر: مثبتة عند حافة العرض، أو في العمود الأيسر مكان المستعرض والسجل، اللذين يعودان كما كانا عند إغلاق الحوار." - }, - "he": { - "prefs.dialogs": "תיבות דו־שיח", - "prefs.dialogs_edge": "בקצה התצוגה", - "prefs.dialogs_left_column": "בעמודה השמאלית", - "prefs.dialogs_note": "היכן נפתחות תיבות הדו־שיח של הפקודות: מעוגנות בקצה התצוגה, או בעמודה השמאלית במקום הדפדפן וההיסטוריה, שחוזרים כפי שהיו כשהתיבה נסגרת." - }, - "vi": { - "prefs.dialogs": "Hộp thoại", - "prefs.dialogs_edge": "Ở cạnh khung nhìn", - "prefs.dialogs_left_column": "Trong cột bên trái", - "prefs.dialogs_note": "Nơi hộp thoại lệnh mở ra: gắn ở cạnh khung nhìn, hoặc trong cột bên trái thay cho trình duyệt và Lịch sử, hai phần này trở lại như cũ khi hộp thoại đóng." - } -} diff --git a/assets/locales/vi.json b/assets/locales/vi.json index 0b3e50108..139ebb9b2 100644 --- a/assets/locales/vi.json +++ b/assets/locales/vi.json @@ -56,6 +56,7 @@ "BOUNDARY SURFACE": "BỀ MẶT BIÊN DẠNG", "BROWSER": "CÂY ĐỐI TƯỢNG", "Bar": "Thép thanh", + "Base Center": "Tâm đáy", "Bend": "Góc uốn", "Bend Edges": "Cạnh uốn gập", "Bend Line Position": "Vị trí đường chấn", @@ -1471,6 +1472,10 @@ "prefs.design_note": "Cài đặt khởi đầu cho các tệp thiết kế mới. Các thiết kế đang mở giữ nguyên cài đặt riêng của chúng.", "prefs.devices": "Chuột 3D", "prefs.dialog_buttons": "Nút hộp thoại", + "prefs.dialogs": "Hộp thoại", + "prefs.dialogs_edge": "Ở cạnh khung nhìn", + "prefs.dialogs_left_column": "Trong cột bên trái", + "prefs.dialogs_note": "Nơi hộp thoại lệnh mở ra: gắn ở cạnh khung nhìn, hoặc trong cột bên trái thay cho trình duyệt và Lịch sử, hai phần này trở lại như cũ khi hộp thoại đóng.", "prefs.display": "Hiển thị", "prefs.edges": "Cạnh và đổ bóng", "prefs.extend": "Kéo dài", diff --git a/assets/locales/zh.json b/assets/locales/zh.json index 2a3ce9f20..78e89fdc8 100644 --- a/assets/locales/zh.json +++ b/assets/locales/zh.json @@ -56,6 +56,7 @@ "BOUNDARY SURFACE": "边界曲面", "BROWSER": "浏览器", "Bar": "扁钢", + "Base Center": "底面中心", "Bend": "折弯角度", "Bend Edges": "折弯边", "Bend Line Position": "弯折线位置", @@ -1471,6 +1472,10 @@ "prefs.design_note": "新建设计的初始设置。已打开的设计保留各自的设置。", "prefs.devices": "3D 鼠标", "prefs.dialog_buttons": "对话框按钮", + "prefs.dialogs": "对话框", + "prefs.dialogs_edge": "视图边缘", + "prefs.dialogs_left_column": "左侧栏", + "prefs.dialogs_note": "命令对话框的打开位置:停靠在视图边缘,或在左侧栏中替代浏览器和历史;关闭对话框后,浏览器和历史恢复原样。", "prefs.display": "显示", "prefs.edges": "边缘与着色", "prefs.extend": "扩展", From 98658142c007eb41d323fb8adf00d42c37d52657 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:44:44 +0000 Subject: [PATCH 069/102] Delete: deleting one instance of a component takes its joints with it (#7749) (#7782) * claim: #7749 Co-Authored-By: Claude Opus 5.5 * Delete: deleting one instance of a component takes its joints with it (#7749) Deleting an occurrence while its component had other instances dropped only the occurrence: the joints on it, their motion links, joint origins, contact set places and exploded moves stayed, so a joint stayed in the Browser naming an occurrence that was gone. The clean-up that remove_component_tree did is now Document::remove_occurrences, used by both. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/doc/src/component_removal.rs | 26 ++++++++++++++++--------- crates/engine/src/cmd/delete.rs | 30 ++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 10 deletions(-) diff --git a/crates/doc/src/component_removal.rs b/crates/doc/src/component_removal.rs index 1e3256614..3899e7da3 100644 --- a/crates/doc/src/component_removal.rs +++ b/crates/doc/src/component_removal.rs @@ -58,6 +58,22 @@ impl Document { let occurrences: BTreeSet = self.occurrences.iter().filter(|o| inside.contains(&o.component) || inside.contains(&o.parent)).map(|o| o.id).collect(); + let joints = self.remove_occurrences(&occurrences); + + let bodies: BTreeSet = self.body_components.iter().filter(|(_, c)| inside.contains(*c)).map(|(name, _)| name.clone()).collect(); + self.body_components.retain(|_, c| !inside.contains(c)); + self.body_offsets.retain(|name, _| !bodies.contains(name)); + self.components.retain(|c| !inside.contains(&c.id)); + self.parts.retain(|c, _| !inside.contains(c)); + self.links.retain(|c, _| !inside.contains(c)); + self.remove_configuration_components(&components); + Ok(RemovedTree { components, features, deleted, occurrences: occurrences.into_iter().collect(), joints: joints.into_iter().collect() }) + } + + /// Remove these occurrences and every assembly record that refers to them: the joints with + /// either side on one (with those joints' motion links and motion keys), the joint origins + /// on them, their places in contact sets and their exploded moves. Returns the joints removed. + pub fn remove_occurrences(&mut self, occurrences: &BTreeSet) -> BTreeSet { let joints: BTreeSet = self .assembly .joints @@ -79,14 +95,6 @@ impl Document { view.moves.retain(|(o, _)| !occurrences.contains(o)); } self.occurrences.retain(|o| !occurrences.contains(&o.id)); - - let bodies: BTreeSet = self.body_components.iter().filter(|(_, c)| inside.contains(*c)).map(|(name, _)| name.clone()).collect(); - self.body_components.retain(|_, c| !inside.contains(c)); - self.body_offsets.retain(|name, _| !bodies.contains(name)); - self.components.retain(|c| !inside.contains(&c.id)); - self.parts.retain(|c, _| !inside.contains(c)); - self.links.retain(|c, _| !inside.contains(c)); - self.remove_configuration_components(&components); - Ok(RemovedTree { components, features, deleted, occurrences: occurrences.into_iter().collect(), joints: joints.into_iter().collect() }) + joints } } diff --git a/crates/engine/src/cmd/delete.rs b/crates/engine/src/cmd/delete.rs index f471c67f7..ffa949f39 100644 --- a/crates/engine/src/cmd/delete.rs +++ b/crates/engine/src/cmd/delete.rs @@ -160,7 +160,11 @@ fn apply(s: &mut Session, p: &Value) -> Result { return Err(bad(cmd, format!("no occurrence `{k}`"))); }; if s.doc.occurrences.iter().filter(|x| x.component == o.component).count() > 1 { - s.doc_mut().occurrences.retain(|x| x.id != o.id); + // The joints on it and the other assembly records naming it go with it: left behind, + // a joint stays in the Browser joined to nothing (#7749). + let gone = s.doc_mut().remove_occurrences(&std::collections::BTreeSet::from([o.id])); + s.visibility.hidden_joints.retain(|h| !gone.contains(h)); + joints.extend(gone); s.pending_moves.remove(&o.id); done = true; } else { @@ -406,6 +410,30 @@ mod tests { } } + /// An instance deleted while its component has others goes alone, and the joints on it go + /// with it, with their motion links (#7749): left behind, a joint names an occurrence that is + /// gone, and every solve reports it. + #[test] + fn an_instance_deleted_alone_takes_its_joints_with_it() { + let mut s = joint_assembly(); + let b1 = s.doc.occurrences.iter().find(|o| o.name == "B:1").unwrap().id; + let b2 = run(&mut s, "occurrence.copy", json!({"occurrence": "B:1", "translate": [0, 40, 0]}))["occurrence"].as_u64().unwrap(); + let dry = run(&mut s, "selection.delete", json!({"occurrences": [b1], "dry_run": true})); + assert_eq!(s.doc.assembly.joints.len(), 2, "a dry run changes nothing"); + let deleted = run(&mut s, "selection.delete", json!({"occurrences": [b1]})); + assert_eq!(deleted, dry); + let left: Vec<&str> = s.doc.assembly.joints.iter().map(|j| j.name.as_str()).collect(); + assert_eq!(left, ["Glue"], "the joint on the deleted instance goes with it"); + assert!(s.doc.assembly.links.is_empty(), "and so does its motion link"); + assert_eq!(deleted["deleted_joints"].as_array().map(Vec::len), Some(1), "the reply names it: {deleted}"); + assert!(s.doc.occurrences.iter().any(|o| o.id == b2), "the other instance stays"); + let solved = run(&mut s, "joint.solve", json!({})); + assert_eq!(solved["errors"], json!([]), "no joint is left pointing at the deleted instance"); + run(&mut s, "edit.undo", json!({})); + assert_eq!(s.doc.assembly.joints.len(), 2); + assert_eq!(s.doc.assembly.links.len(), 1); + } + #[test] fn occurrences_components_and_sketch_entities() { let (mut s, _) = part(); From 143145751c019fa81732c48b6db1279541671619 Mon Sep 17 00:00:00 2001 From: Igor Bronovskyi Date: Tue, 27 Oct 2026 18:46:33 +0000 Subject: [PATCH 070/102] i18n(uk): add pending translations for missing strings (#7556) --- .../pending/history-origin-bodies.json | 979 ++++++++++++++++++ 1 file changed, 979 insertions(+) create mode 100644 assets/locales/pending/history-origin-bodies.json diff --git a/assets/locales/pending/history-origin-bodies.json b/assets/locales/pending/history-origin-bodies.json new file mode 100644 index 000000000..f50b8fed9 --- /dev/null +++ b/assets/locales/pending/history-origin-bodies.json @@ -0,0 +1,979 @@ +{ + "uk": { + "A Single hole snaps to the middle of its face and to the centres of its round edges": "Одинарний отвір прив'язується до центру грані та до центрів круглих ребер", + "A placed Single hole has a handle to drag it, and picking its face again moves the hole there instead of taking it out": "Розміщений одинарний отвір має маркер для перетягування; повторне вибрання грані переміщує отвір туди замість видалення", + "A short title for the problem (optional)": "Короткий заголовок проблеми (необов'язково)", + "Add bend": "Додати згин", + "All Lines": "Усі лінії", + "Anchor": "Прив'язка", + "Angle Display": "Відображення кута", + "Another bend on the far edge of the last flange": "Ще один згин на дальньому ребрі останнього фланця", + "Bar": "Смуга", + "Bend": "Згин", + "Bottom Left": "Нижній лівий", + "Bottom Middle": "Нижній по центру", + "Bottom Right": "Нижній правий", + "Centroid": "Центроїд", + "Channel": "Швелер", + "Circle center": "Центр кола", + "Copies the definition only. Assign it from Physical Material when ready.": "Копіює лише визначення. Призначте з «Фізичного матеріалу», коли буде готово.", + "Corner radius": "Радіус кута", + "Create Hole": "Створити отвір", + "Current plane": "Поточна площина", + "Drag to move the boss across the model. It snaps to sketch points on the face.": "Перетягніть, щоб перемістити виступ по моделі. Він прив'язується до точок ескізу на грані.", + "Drag to move the hole; click to remove it": "Перетягніть для переміщення отвору; клацніть для видалення", + "Drag to move the rest across the model. It snaps to sketch points on the face.": "Перетягніть, щоб перемістити підпірку по моделі. Вона прив'язується до точок ескізу на грані.", + "Drag to move the snap fit across the model. It snaps to sketch points on the face.": "Перетягніть, щоб перемістити защіпку по моделі. Вона прив'язується до точок ескізу на грані.", + "Drag to point the catch in another direction.": "Перетягніть, щоб змінити напрямок зачеплення.", + "Drag to turn the rest in 5° steps. Hold Alt or Ctrl to turn it freely.": "Перетягніть, щоб повернути підпірку з кроком 5°. Утримуйте Alt або Ctrl для вільного повороту.", + "Exported by SolidWorks, which usually saves Y up": "Експортовано з SolidWorks, який зазвичай зберігає з віссю Y вгору", + "Face center": "Центр грані", + "Flange thickness": "Товщина фланця", + "Flanges": "Фланці", + "Full thread depth": "Повна глибина різьби", + "Further Bends": "Додаткові згини", + "Halo under sketch curves": "Орбіта під кривими ескізу", + "Height From": "Висота від", + "I-Beam": "Двотавр", + "Import material into design": "Імпортувати матеріал у проєкт", + "Included": "Включено", + "Inner Sharp": "Гострий внутрішній", + "L-Angle": "Кутник", + "Left Middle": "Лівий по центру", + "Lines": "Lines", + "M5, M5x0.5, 1/4-20 UNC": "M5, M5x0.5, 1/4-20 UNC", + "Material Outside": "Material Outside", + "Material copied. Existing body assignments are unchanged.": "Material copied. Existing body assignments are unchanged.", + "Move holes by clicking or dragging": "Move holes by clicking or dragging", + "Name on import": "Name on import", + "No matching physical materials.": "No matching physical materials.", + "Not saved yet": "Not saved yet", + "Open bodies (no volume)": "Open bodies (no volume)", + "Open surface — no volume": "Open surface — no volume", + "Other way": "Other way", + "Outer Sharp": "Гострий зовнішній", + "Outer radius": "Outer radius", + "Physical material definitions": "Physical material definitions", + "Rectangular Tube": "Rectangular Tube", + "Remove this bend": "Remove this bend", + "Reopen designs": "Reopen designs", + "Reopen the designs that were open when SolidCraft was last closed": "Reopen the designs that were open when SolidCraft was last closed", + "Right Middle": "Правий по центру", + "Root radius": "Root radius", + "Round Bar": "Round Bar", + "Round Tube": "Round Tube", + "Same way": "Same way", + "Section (optional)": "Section (optional)", + "Show ghost": "Show ghost", + "Snap to face and edge centres": "Snap to face and edge centres", + "Tangent": "Tangent", + "Tangent to Edge": "Tangent to Edge", + "Thread depth": "Thread depth", + "Thread diameter": "Thread diameter", + "Toe radius": "Toe radius", + "Top Left": "Верхній лівий", + "Top Middle": "Верхній по центру", + "Top Right": "Верхній правий", + "Web thickness": "Web thickness", + "ai.connected_toast": "SolidCraft is now available in {clients}. Restart them to use it (Settings > Assistant).", + "ai.prefs.allow_control": "Let AI agents connect (control channel / MCP)", + "ai.prefs.allow_control_note": "Opens a control channel on this computer only (127.0.0.1, port 27878 or the next free one). A program that connects must also show a secret token that only your user account can read, made fresh at every start. Takes effect the next time SolidCraft starts. Off: nothing listens unless you start SolidCraft with --control.", + "ai.prefs.connect_apps": "Make SolidCraft available to AI apps on this computer", + "ai.prefs.connect_apps_note": "When SolidCraft starts, adds it as an MCP server to the AI apps found on this computer (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), so an agent can use it without any setup. Only the solidcraft entry is added or its path refreshed; an entry you changed is left alone, and the file is backed up first. Off: the entries it added are removed. Help > Connect AI assistants… does this by hand.", + "cmd.browser_collapse_all": "Collapse All", + "cmd.browser_expand_all": "Expand All", + "cmd.component_copies": "Find Identical Copies", + "cmd.component_copy_bodies": "Paste Bodies", + "cmd.component_cycle_color": "Cycle Component Color", + "cmd.component_extract": "Extract to File", + "cmd.component_replace_with_link": "Replace with Link", + "cmd.document_revision": "Design Revision", + "cmd.file_send_to_slicer": "Send to Slicer", + "cmd.inspect_colored_components": "Enable Component Colors", + "cmd.inspect_colored_components_disable": "Disable Component Colors", + "cmd.inspect_parameter_sweep": "Parameter Sweep", + "cmd.motion_trace_edit": "Edit Motion Trace", + "cmd.occurrence_drag": "Drag Occurrence", + "cmd.occurrence_reparent": "Move to Component", + "cmd.render_aging_describe": "Layered Surface Aging", + "cmd.render_camera_fit": "Frame Render Subject", + "cmd.render_camera_get": "Inspect Render Camera", + "cmd.render_effects_describe": "Lens and Creative Effects", + "cmd.render_hdr_inspect": "Inspect HDR Source", + "cmd.render_library_appearance_apply": "Apply Library Opaque Appearance", + "cmd.render_library_describe": "Inspect Render Library Resource", + "cmd.render_library_environment_apply": "Apply Built-in HDR Environment", + "cmd.render_library_list": "Browse Render Library", + "cmd.render_library_physical_prepare": "Prepare Physical Reference", + "cmd.render_library_preview": "Inspect Original Surface Map", + "cmd.render_library_studio_apply": "Apply Authored Studio Lights", + "cmd.render_library_studio_prepare": "Prepare Authored Studio Lights", + "cmd.render_library_surface_bind": "Save Surface Binding", + "cmd.render_library_surface_prepare": "Prepare Authored Surface Maps", + "cmd.render_library_surface_unbind": "Remove Surface Binding", + "cmd.render_library_targets": "Find Render Library Targets", + "cmd.render_optics_bind": "Save Optical Binding", + "cmd.render_optics_unbind": "Remove Optical Binding", + "cmd.render_preset_apply": "Apply Native Studio", + "cmd.render_preset_resolve": "Review Native Studio", + "cmd.render_quality_prepare": "Review Fixed Sampling Budget", + "cmd.render_result_pin": "Retain Displayed Render Result", + "cmd.render_result_regrade": "Regrade Linear Master", + "cmd.render_settings_capture_hdr": "Save Render Settings with HDR", + "cmd.render_shot_duplicate": "Duplicate Render Shot", + "cmd.render_shot_remove": "Remove Render Shot", + "cmd.render_shot_rename": "Rename Render Shot", + "cmd.render_stage_backdrop": "Save Physical Render Background", + "cmd.render_stage_clear": "Remove Render Stage", + "cmd.render_stage_ground": "Save Render Ground", + "cmd.sheet_path_flange": "Path Flange", + "cmd.sketch_arc3d": "3D Arc", + "cmd.sketch_cancel": "Cancel Sketch", + "cmd.sketch_drawing_bounds": "Drawing Size", + "cmd.sketch_transform": "Transform", + "cmd.view_back": "Back View", + "cmd.view_bottom": "Bottom View", + "cmd.view_fit": "Fit", + "cmd.view_front": "Front View", + "cmd.view_grid": "Grid", + "cmd.view_ground_shadow": "Ground shadow", + "cmd.view_home": "Home view", + "cmd.view_isometric": "Isometric View", + "cmd.view_left": "Left View", + "cmd.view_navigation_bar": "Navigation bar", + "cmd.view_right": "Right View", + "cmd.view_spin": "Continuous orbit", + "cmd.view_tool": "Navigation tool", + "cmd.view_top": "Top View", + "cmd.view_visual_style": "Visual style", + "diagnostic.empty_boolean_component": "there is no body to cut or intersect in component '{component}'; the tool may overlap '{body}' in component '{other}' — activate that component or pick the body as a target", + "document.changed_on_disk": "{name} changed on disk", + "document.changed_on_disk_detail": "{name} was changed by another program or computer since you opened or last saved it. Overwrite replaces those changes with yours; Save a Copy keeps both.", + "document.copy_name": "{name} copy", + "document.open_anyway": "Open Anyway", + "document.open_elsewhere": "{name} is already open", + "document.open_elsewhere_detail": "{name} is open in SolidCraft {app} on {who}, opened {when}. If you both save, one of you loses work. Open it read-only to look at it without saving over it.", + "document.open_read_only": "Open Read-Only", + "document.opened_read_only": "Opened read-only: Save asks for a new file", + "document.overwrite": "Overwrite", + "document.read_only_save": "This design was opened read-only: save it as a new file", + "document.save_copy": "Save a Copy…", + "file.open.drawing_filter": "Designs, CAD files, meshes and drawings", + "file_load.link_item": "{name} ({done} of {total})", + "file_load.updating_links": "Updating links", + "from the profile": "from the profile", + "help.connect_note": "Restart each assistant to load the SolidCraft server. Each file was backed up as .bak before it changed.", + "help.connect_title": "Connect AI assistants", + "help.solid.combine": "Joins bodies, cuts them out of a target body, or keeps only the volume they share, and can keep the tool bodies. Use it to merge parts, to cut one shape with another or to find where two bodies overlap.", + "help.solid.loft": "Blends a smooth solid between two or more sketch profiles, or from a profile to a point. Use it for transitions, funnels, handles and any shape that changes section along its length.", + "help.solid.mirror": "Makes a mirrored copy of the selected bodies or features across a plane, and can merge it with the original. Use it for symmetric parts, so that you model one half and get both.", + "help.solid.pattern.circular": "Repeats the selected objects around an axis, for the count and total angle you set. Use it for bolt circles, spokes, fins and teeth.", + "help.solid.pattern.rectangular": "Repeats the selected objects in one or two directions with the count and spacing you set. Use it for rows and grids of holes, ribs, pins or feet.", + "help.solid.sweep": "Drags a sketch profile along a path to make a solid. Use it for pipes, rails, handles and any part of constant section that follows a curve.", + "hole_presets.confirm_delete": "Confirm delete", + "hole_presets.delete": "Delete", + "hole_presets.delete_prompt": "Delete this personal preset? Existing holes are unchanged.", + "hole_presets.full": "The personal library already contains 64 presets.", + "hole_presets.invalid_name": "Enter a short name without line breaks or control characters.", + "hole_presets.invalid_parameters": "Complete the hole parameters using valid expressions of reasonable length.", + "hole_presets.missing": "The selected preset is no longer available.", + "hole_presets.name": "Preset name", + "hole_presets.name_exists": "A preset with this name already exists. Use a different name.", + "hole_presets.name_hint": "A unique name", + "hole_presets.overwrite": "Save changes to selected preset", + "hole_presets.preset": "Preset", + "hole_presets.recall": "Recall", + "hole_presets.rename": "Rename", + "hole_presets.save": "Save new", + "hole_presets.scope": "Saved in your profile for all projects.", + "hole_presets.select": "Select a preset", + "hole_presets.title": "Personal presets", + "hole_presets.unsupported_options": "This preset uses thread options that this version cannot recall.", + "hole_presets.unsupported_overwrite": "This preset contains options that cannot be overwritten safely.", + "joint.rigid_group_one_component": "These {count} bodies are all in one component (or in the design itself): use {command} first.", + "joint.rigid_group_select_components": "Select two or more components.", + "material.editor.add_property": "Add property", + "material.editor.add_source": "Add source", + "material.editor.assigned_density": "Assigned density", + "material.editor.axes": "Material axes", + "material.editor.axes_numeric": "1 / 2 / 3", + "material.editor.axes_wood": "L / R / T", + "material.editor.copy_name": "Copy of {name}", + "material.editor.density_range": "Assigned density must be above 0 and at most 1000 g/cm³.", + "material.editor.designation": "Designation", + "material.editor.duplicate": "Duplicate", + "material.editor.engineering_card": "Engineering property card", + "material.editor.family": "Material family", + "material.editor.glass": "Glass", + "material.editor.illustrative": "Illustrative", + "material.editor.invalid_property": "Unsupported property type.", + "material.editor.isotropic": "Isotropic", + "material.editor.measurement": "Measurement", + "material.editor.metal": "Metal", + "material.editor.moisture": "Moisture, dry basis", + "material.editor.name_required": "Enter a name with 1–128 characters.", + "material.editor.no_draft": "No material draft is open.", + "material.editor.number_required": "Enter a finite numeric value.", + "material.editor.orthotropic": "Orthotropic", + "material.editor.other": "Other", + "material.editor.polymer": "Polymer", + "material.editor.preserved_appearance": "Preserved appearance", + "material.editor.public_reference": "Public reference", + "material.editor.reference": "Reference", + "material.editor.save_or_discard": "Save or discard the material draft before assigning a material.", + "material.editor.saved": "Material saved. Body assignments are unchanged.", + "material.editor.scope": "Save stores this material without assigning it to bodies. Blank properties and conditions remain unknown. Card density does not change assigned density or mass.", + "material.editor.source_id": "Source ID", + "material.editor.source_kind": "Source type", + "material.editor.source_title": "Source title", + "material.editor.sources": "Sources", + "material.editor.stale": "This material changed while the draft was open. Discard and reopen it before saving.", + "material.editor.state": "Material state", + "material.editor.strain_rate": "Strain rate", + "material.editor.symmetry": "Elastic symmetry", + "material.editor.temperature": "Temperature", + "material.editor.unknown_card": "Engineering properties are unknown. Save may keep only the assigned density and existing appearance.", + "material.editor.user_supplied": "User supplied", + "material.editor.wood": "Wood", + "nav.free_orbit.snap_help": "Mouse and 3D mouse rotate through both poles and preserve roll. Hold Shift during an orbit drag to snap the view direction and roll.", + "nav.perspective.sketch": "Sketch editing uses orthographic view. Finish the sketch to switch perspective.", + "network.allow_once": "Allow once", + "network.always_allow": "Always allow this server", + "network.prompt_detail": "This design links to a file on network location {host}. Opening it connects to that computer and may send your Windows sign-in to it. Only allow servers you trust.", + "network.prompt_title": "Network location", + "perf.click_for_details": "Click for details: frame-time graph, histogram and what the GPU drew", + "perf.draw_calls": "Draw calls", + "perf.line_segments": "Line segments", + "perf.low_1": "1% low", + "perf.renderer": "Renderer", + "perf.scene_build": "Scene build", + "perf.triangles": "Triangles", + "perf.ui_time": "UI time", + "perf.viewport": "Viewport", + "perf.worst": "worst", + "pick the path": "pick the path", + "prefs.anti_aliasing_amd_dx12": "Anti-aliasing uses 1× because the startup check drew nothing with multisampling and passed at 1×. You can choose another setting above; restart to apply it if the check passes.", + "prefs.dialog_buttons": "Dialog buttons", + "prefs.graphics_card": "Graphics card", + "prefs.graphics_card_auto": "Automatic", + "prefs.graphics_card_missing": "The saved graphics card is unavailable; Automatic is used.", + "prefs.graphics_card_restart": "Takes effect after restarting SolidCraft. WGPU_ADAPTER_NAME overrides this choice.", + "prefs.history_sketches": "Sketches", + "prefs.history_sketches_in_order": "In order", + "prefs.history_sketches_note": "With Sketches set to Under their feature, the History at the left lists each sketch one level in, under the first feature built from it, whenever it is wide enough for names. The timeline at the bottom always keeps the creation order.", + "prefs.history_sketches_under_feature": "Under their feature", + "prefs.network_host_remove": "Remove", + "prefs.network_locations": "Allow network locations in designs", + "prefs.network_locations_note": "Off: a design's linked files on another computer (\\\\server\\share) are opened only from the servers listed here, or after you allow one when asked.", + "prefs.network_locations_section": "Network locations", + "prefs.placement": "Placement", + "prefs.prefer_free_sketch_points": "Prefer movable sketch points when points overlap", + "prefs.sketch_exit_view": "When a sketch ends", + "prefs.sketch_exit_view.keep": "Keep the current view", + "prefs.sketch_exit_view.previous": "Return to the previous view", + "prefs.sketch_exit_view.unless_rotated": "Return unless rotated", + "prefs.sketch_exit_view_note": "Where the view goes after Finish Sketch, Cancel or a double Esc.", + "prefs.top": "Top", + "prefs.view_confirm_corner": "OK and Cancel in the view's corner", + "prefs.view_confirm_corner_note": "While a dialog or a sketch is open, a check and a cross at the top right of the view do what the dialog's OK and Cancel do, or finish and cancel the sketch. The view navigator moves down below them.", + "render.adaptive_absolute": "Absolute RGB error floor", + "render.adaptive_coverage": "Coverage error target", + "render.adaptive_enable": "Allocate samples with independent pilots", + "render.adaptive_help": "GPU only. Independent pilot samples are discarded, then allocate 16 or more production samples per pixel up to Samples per pixel. RGB and coverage variance guide allocation; rare paths may be missed and capped pixels may remain noisy. The final report counts actual work. No certified noise or time guarantee.", + "render.adaptive_minimum": "Minimum production samples", + "render.adaptive_pending": "GPU independent-pilot adaptive allocation and conditional Fresnel strata are available. Certified convergence, rare-event guarantees and CPU adaptive transport remain unavailable.", + "render.adaptive_pilots": "Pilot samples per pixel", + "render.adaptive_relative": "Relative RGB error target", + "render.add_ground": "Add fitted ground to setup", + "render.advanced_material_scope": "One finite homogeneous GPU medium is available under explicit limits. Density grids, nested glass/volume combinations, subsurface surfaces, displacement, spectral transport and unbound advanced material concepts remain unavailable.", + "render.aging_add": "Add aging layer", + "render.aging_airborne": "Airborne dust / participating medium", + "render.aging_airborne_help": "Airborne dust is a separate finite homogeneous scattering volume. It changes transport and raw EXR, not the surface-aging stack. Existing volume/glass/denoising restrictions remain explicit; no atmosphere is added automatically.", + "render.aging_all_bodies": "All eligible opaque bodies", + "render.aging_chips": "Chipped paint", + "render.aging_class_any": "All opaque material classes", + "render.aging_class_dielectric": "Nonmetallic surfaces only", + "render.aging_class_metal": "Metallic surfaces only", + "render.aging_color": "Layer colour · sRGB", + "render.aging_coverage": "Coverage", + "render.aging_dust": "Deposited dust", + "render.aging_empty": "No aging layers: the original surfaces remain unchanged.", + "render.aging_fading": "Faded coating", + "render.aging_grime": "Grime & staining", + "render.aging_help": "Combine up to eight optical layers, in order. Rust and patina are authored appearances, not age/corrosion simulations. Scale is in world millimetres. No geometry, mass or engineering property is changed; glass and passive stages are excluded.", + "render.aging_metallic": "Layer metallic fraction", + "render.aging_origin": "Field origin · world mm", + "render.aging_patina": "Copper-green patina", + "render.aging_refresh_targets": "Inspect current bodies", + "render.aging_roughness": "Layer roughness", + "render.aging_rust": "Oxidized iron / rust", + "render.aging_scale": "Pattern scale", + "render.aging_scratches": "Fine scratches", + "render.aging_target": "Target & coordinates", + "render.aging_target_help": "A named target must still match its captured index and name. Global masks are world-anchored; they do not follow moving parts. This is neither cavity detection nor true edge wear. Filter the list to reach additional bodies.", + "render.aging_target_search": "Filter body names", + "render.aging_upward": "Upward-facing deposition", + "render.all_controls_help": "Dense inspection of all current controls. Section pages provide focused editing without changing the underlying request.", + "render.appearance_physics_separate": "Visual appearance does not assign density, thermal data or other engineering properties.", + "render.availability_native": "Native composition; review before applying", + "render.availability_projection": "Supported projection; see scope and omissions", + "render.availability_reference": "Reference data; not an automatic assignment", + "render.backdrop_alpha_conflict": "Choose this backdrop or transparent PNG output; the renderer will not silently ignore either setting.", + "render.backdrop_enable": "Use camera-only gradient backdrop", + "render.backdrop_first": "Start / center color", + "render.backdrop_help": "This screen-space backdrop does not illuminate, cast shadows, reflect or represent terrain. It is excluded from raw EXR. Geometry, lights and the HDR environment stay independent.", + "render.backdrop_horizontal": "Horizontal gradient", + "render.backdrop_radial": "Radial gradient", + "render.backdrop_radius": "Radius", + "render.backdrop_second": "End / edge color", + "render.backdrop_vertical": "Vertical gradient", + "render.backdrop_x": "Center X", + "render.backdrop_y": "Center Y", + "render.background_camera_section": "Camera background · PNG presentation", + "render.background_completed_frozen": "The displayed result is a frozen completed image. Editing a background does not repaint that result automatically. Use Regrade for camera-only changes, or Render for a new physical stage.", + "render.background_hdr_separate": "The current HDR resources illuminate and reflect on surfaces; they are not automatically displayed as a panorama behind the subject. Changing a gradient does not rotate or recolour the lighting.", + "render.background_lighting_section": "HDR illumination · separate from camera background", + "render.background_no_alpha_override": "A camera background is not added to transparent output silently. Raw-master regrading uses captured coverage and does not reapply denoising; the source EXR remains unchanged.", + "render.background_not_light": "Background color is presentation, not an additional lighting source.", + "render.background_regrade": "Apply to retained raw master", + "render.background_stage_occlusion": "This shot includes physical stage geometry. A large floor or wall can fill the frame and hide a camera-only background. Clear or resize the stage deliberately, or change its physical reflectance. Regrading cannot remove captured geometry.", + "render.background_workflow": "Choose the background you intend: a camera-only colour/gradient, a physical stage that receives light, or HDR illumination. They are independent. Live Preview is a modelling view; render a new image or regrade a retained master to see camera finishing.", + "render.base_appearance": "Editable body appearance", + "render.base_apply": "Apply body appearance", + "render.base_apply_help": "One undoable visual assignment to the reviewed exact body. Existing face-specific looks and engineering materials remain separate.", + "render.base_color": "Base color · sRGB", + "render.base_metallic": "Metallic fraction", + "render.base_opaque_only": "This editor preserves opaque body semantics. Use the explicit glass controls for optical transmission.", + "render.bloom_enable": "Display bloom", + "render.bloom_help": "Creative output-only glow from positive linear highlights, spread with three normalized box passes. Radius is in output pixels. Added in linear display light before sRGB; not a lens, volumetric effect or convergence improvement. The raw EXR is unchanged.", + "render.bloom_opaque": "Bloom requires opaque output. Transparent PNG is refused, not silently flattened.", + "render.bloom_radius": "Bloom radius", + "render.bloom_strength": "Bloom strength", + "render.bloom_threshold": "Linear highlight threshold", + "render.browse_capabilities": "Inspect complete capability catalog", + "render.browse_environments": "Browse original HDR environments", + "render.browse_native_scenes": "Browse native studios", + "render.browse_physical": "Inspect physical references", + "render.browse_quality": "Inspect quality specifications", + "render.browse_rigs": "Browse authored light rigs", + "render.browse_scene_specs": "Browse advanced scene specifications", + "render.browse_surfaces": "Browse authored surfaces", + "render.browser_library": "Library", + "render.browser_model": "Model", + "render.camera_distance": "Eye-to-target distance", + "render.camera_exact_help": "World millimeters; angles are displayed in degrees and saved as radians. Navigation uses the same camera as the viewport.", + "render.camera_fov": "Vertical field of view", + "render.camera_pitch": "Camera pitch", + "render.camera_roll": "Roll", + "render.camera_set": "Set Render Camera", + "render.camera_target": "Target position · mm", + "render.camera_yaw": "Yaw", + "render.chromatic_offset": "Chromatic edge offset", + "render.clear_stage": "Remove saved stage", + "render.copy_request": "Copy JSON", + "render.cpu_aa_help": "Spatial samples: more samples improve edges and increase render time.", + "render.cpu_area_add": "Add rectangular CPU light", + "render.cpu_area_editor": "CPU rectangular lights", + "render.cpu_area_editor_help": "Full side vectors in millimeters; U cross V points towards the emitting side. This differs from GPU half-edge vectors.", + "render.cpu_area_full_u": "Full U side · mm", + "render.cpu_area_full_v": "Full V side · mm", + "render.cpu_area_samples": "Area-light samples", + "render.cpu_binding_confirm": "Confirm this body", + "render.cpu_binding_stale": "The scene changed. Confirm this reflection target again before rendering.", + "render.cpu_body_choose": "Choose a body", + "render.cpu_body_filter": "Filter bodies by name", + "render.cpu_body_filter_more": "Refine the filter to see more bodies.", + "render.cpu_body_missing": "A reflection target is missing, hidden, ambiguous or has a name longer than 128 bytes. Choose it again.", + "render.cpu_budget": "CPU resource profile", + "render.cpu_budget_bodies": "Body ceiling", + "render.cpu_budget_compact": "Compact (legacy limits)", + "render.cpu_budget_details": "Resource limits", + "render.cpu_budget_help": "Choose larger limits explicitly. Resolution and samples are never reduced automatically.", + "render.cpu_budget_memory": "Job memory ceiling", + "render.cpu_budget_not_guarantee": "These are admission ceilings, not a RAM reservation or a speed guarantee. Geometry, film and retained previews share the memory budget; rendering remains cancellable.", + "render.cpu_budget_resize": "The draft exceeds this CPU profile or its camera-sample budget. Accept smaller dimensions explicitly or select a larger profile.", + "render.cpu_budget_studio": "Studio (large images)", + "render.cpu_budget_triangles": "Triangle ceiling", + "render.cpu_budget_workstation": "Workstation (heavy scenes)", + "render.cpu_captured_hdr": "HDR captured for this image", + "render.cpu_check_capture_help": "Check and Start verify the same file digest or use the embedded HDR. Each image keeps its captured source.", + "render.cpu_check_changed": "The controls or model changed after this check. Check again before rendering.", + "render.cpu_constant_help": "Constant radiance is visible to reflected or transmitted rays. It does not provide direct diffuse lighting.", + "render.cpu_custom_directions": "Replace preset with custom directional lights", + "render.cpu_direction": "Direction toward light (X, Y, Z)", + "render.cpu_directional": "Directional light", + "render.cpu_directional_add": "Add directional light", + "render.cpu_environment": "CPU environment", + "render.cpu_environment_background": "The image background stays separate from environment lighting.", + "render.cpu_environment_bounds": "CPU intensity must be 0–64, HDR rotation finite within ±1,000,000 radians, and HDR samples 1, 4, 16 or 64.", + "render.cpu_environment_constant": "Constant secondary-ray environment", + "render.cpu_environment_none": "No CPU environment", + "render.cpu_environment_samples": "HDR lighting samples", + "render.cpu_exposure_help": "CPU exposure must be between −16 and 16 EV. A GPU exposure outside that range is retained until you change it.", + "render.cpu_fixed": "Single image", + "render.cpu_hdr_help": "Radiance .hdr, 2:1 panorama, up to 2048 × 1024 and 16 MiB. CPU requires explicit sRGB/D65 primaries in the file; unspecified primaries and EXR are refused.", + "render.cpu_hdr_reflection_help": "HDR rough reflections require fully metallic body and face surfaces. Check reports unsupported combinations.", + "render.cpu_key_rim": "Key and rim", + "render.cpu_last_check": "Last CPU check", + "render.cpu_light_help": "Up to eight directional lights. An empty custom list turns them off; selecting a preset restores its lights. Colors are linear RGB and intensity is relative, not watts.", + "render.cpu_light_intensity": "Relative intensity (0–64)", + "render.cpu_light_minimum": "Minimum distance for attenuation", + "render.cpu_light_position": "World position (X, Y, Z)", + "render.cpu_light_reference": "Reference distance for intensity", + "render.cpu_light_remove": "Remove light", + "render.cpu_lighting": "Lighting preset", + "render.cpu_lights": "CPU lights", + "render.cpu_linear_color": "Linear color (R, G, B)", + "render.cpu_neutral": "Neutral", + "render.cpu_opaque_required": "CPU ray tracing needs an opaque background. Clear Transparent background to continue.", + "render.cpu_options_pending": "This CPU panel cannot edit emission, surface effects, glass or anisotropy yet. Clear those API options before using it.", + "render.cpu_point": "Point light", + "render.cpu_point_add": "Add point light", + "render.cpu_point_help": "Up to eight point lights, added to the selected directional lighting. Distances are in mm; the minimum must not exceed the reference distance.", + "render.cpu_primary_samples": "Edge samples per pixel", + "render.cpu_progressive": "CPU progressive", + "render.cpu_progressive_help": "Accumulate the existing CPU integrator in passes of one primary sample. Selected reflections require one sample; area lights, dielectrics and anisotropy require Single image.", + "render.cpu_progressive_limits": "At most 1,048,576 pixels and 16,777,216 pixel × sample evaluations. Changing samples never resizes the image automatically.", + "render.cpu_progressive_seed": "CPU sampling seed", + "render.cpu_progressive_spp": "samples per pixel", + "render.cpu_reflection_add": "Add rough reflection", + "render.cpu_reflection_depth": "Reflection depth (1–8)", + "render.cpu_reflection_empty": "No bodies selected: scene reflections are off.", + "render.cpu_reflection_help": "Choose bodies and set Off, Mirror or Rough. Rough uses the assigned surface roughness. More samples and bounces increase time; this is bounded specular transport, not global illumination.", + "render.cpu_reflection_limit": "Up to 64 reflected bodies are supported.", + "render.cpu_reflection_mirror": "Mirror", + "render.cpu_reflection_off": "Off", + "render.cpu_reflection_rough": "Rough", + "render.cpu_reflection_samples": "Reflection samples (1–64)", + "render.cpu_reflections": "CPU reflections", + "render.cpu_runtime_help": "Numeric light and environment settings are saved with the setup. Body reflections and HDR files remain temporary. Existing area-light and spot-cone values are retained.", + "render.cpu_sampling_mode": "CPU sampling mode", + "render.cpu_shadows": "Cast shadows", + "render.cpu_summary": "CPU ray tracing · reflections · HDR · directional and point lights", + "render.cpu_warm_cool": "Warm and cool", + "render.diag_bodies": "Visible bodies", + "render.diag_job_details": "Captured job details", + "render.diag_last_check": "Last preflight", + "render.diag_memory": "Logical admission estimate", + "render.diag_not_implemented": "Explicit capability boundaries", + "render.diag_preflight_details": "Preflight details", + "render.diag_request": "Exact current request", + "render.diag_triangles": "Triangles", + "render.discard_continue": "Discard draft and continue", + "render.draft_confirm_help": "The current render draft has unapplied edits. Save them before switching, discard them explicitly, or keep editing.", + "render.draft_confirm_title": "Preserve edited render settings", + "render.effects_gpu_only": "These effects require GPU path tracing. Changing the page never switches the renderer automatically.", + "render.effects_help": "Combine ordered colour looks and image-space lens effects. Rendering and raw-master regrading use the same saved settings. Raw EXR stays unchanged. These are original artistic controls, not calibrated lens or branded-film emulations.", + "render.effects_reset_lens": "Reset lens effects", + "render.effects_seed": "Pattern seed", + "render.export_display": "Export: display PNG", + "render.export_linear": "Export: raw linear EXR", + "render.exr_pending": "GPU can retain raw linear EXR. Compression, multilayer images and auxiliary render passes remain unavailable.", + "render.film_grain": "Photographic grain", + "render.flare_ghosts": "Ghost rings per source", + "render.flare_halo": "Flare halo", + "render.flare_streak": "Anamorphic-style streak", + "render.flare_strength": "Highlight flare strength", + "render.flare_threshold": "Scene-linear flare threshold", + "render.gpu_depth": "Maximum path depth", + "render.gpu_options_help": "Samples, depth, seed and exposure are saved with this setup. Only the active image method is saved.", + "render.gpu_path_failed": "GPU path tracer unavailable", + "render.gpu_path_first_setup": "The first setup on this GPU can take several minutes; SolidCraft stays usable meanwhile. Later starts reuse the compiled shaders where the driver keeps them.", + "render.gpu_path_preparing": "GPU path tracer: compiling shaders…", + "render.gpu_seed": "Random seed", + "render.gpu_unavailable": "GPU path tracing is not ready on this device.", + "render.ground_apply": "Fit and save ground", + "render.ground_gap": "Explicit clearance gap", + "render.ground_linear_rgb": "Diffuse reflectance · linear RGB", + "render.ground_margin": "Ground extent margin", + "render.hdr_details": "HDR source details", + "render.hdr_embedded": "HDR saved inside this design", + "render.hdr_embedded_help": "Rendering uses the bytes included in the design; the original file is no longer needed.", + "render.hdr_file_captured": "HDR file checked. Save will embed these bytes; if the file changes, check it again explicitly.", + "render.hdr_inspect": "Check HDR file", + "render.hdr_inspect_required": "Select and check an HDR file before saving or rendering.", + "render.hdr_primaries_declared": "The source declares its color primaries.", + "render.hdr_primaries_srgb": "Color primaries: sRGB/D65", + "render.hdr_primaries_undeclared": "The source does not declare primaries; review the renderer color requirements.", + "render.hdr_resource_missing": "This design is missing the saved HDR resource.", + "render.image_advanced": "Advanced GPU controls", + "render.image_exposure": "Exposure", + "render.image_host_missing": "No image host is installed.", + "render.image_method": "Image method", + "render.image_progressive": "Progressive rendering", + "render.image_samples": "Samples per pixel", + "render.image_scene_stale": "Finish the modelling gesture or refresh the scene before checking or starting an image.", + "render.include_rig_cards": "Include passive cards and flags", + "render.inspect_scene": "Refresh captured scene summary", + "render.keep_editing": "Keep editing", + "render.layer_down": "Move down", + "render.layer_enabled": "Layer enabled", + "render.layer_remove": "Remove layer", + "render.layer_strength": "Layer strength", + "render.layer_up": "Move up", + "render.lens_effects_help": "Flare uses up to four separated bright sources in the actual linear image. Ghosts, halo, streaks, chromatic offsets and radial distortion are artistic image-space approximations. Spatial effects need opaque output; outside samples extend the image edge. Grain is deterministic. No physics, EXR or geometry is altered.", + "render.lens_effects_title": "Lens-inspired & photographic", + "render.library_all": "Catalog", + "render.library_all_states": "All availability states", + "render.library_applied": "Resource projection applied. Check the complete render request before starting.", + "render.library_apply_hdr": "Save with this HDR environment", + "render.library_apply_maps": "Use authored GPU surface maps", + "render.library_apply_studio": "Save authored studio projection", + "render.library_apply_uniform": "Apply uniform opaque appearance", + "render.library_authored_help": "Original authored resources are illustrative, not measured engineering data. Each action applies only its stated projection.", + "render.library_blocked": "Blocked / requires calibration", + "render.library_capabilities": "Capability specifications", + "render.library_center": "Rig center", + "render.library_clear_search": "Clear", + "render.library_details": "Specification and provenance", + "render.library_emitters_only_ack": "Use emitters only; omit the documented passive cards", + "render.library_empty": "No matching resources. Try a different query or availability filter.", + "render.library_environment_concepts": "Environment concepts", + "render.library_extent": "Subject extent", + "render.library_favorite": "Add favorite", + "render.library_favorites": "Favorites", + "render.library_hdr": "Built-in HDR environments", + "render.library_hdr_help": "Embeds the original HDR in the saved setup. The authored longitude origin is converted explicitly; no external file is needed after saving.", + "render.library_inspect_only": "Select to inspect; nothing is applied automatically. Favorites and recent history belong to this open document session.", + "render.library_light_concepts": "Lighting concepts", + "render.library_maps_help": "Built-in maps can be saved with pinned sources and local occurrence mapping. Temporary optical overrides remain a separate mode.", + "render.library_material_concepts": "Material concepts", + "render.library_native_scenes": "Native studios", + "render.library_next": "Next page", + "render.library_omitted": "Not included", + "render.library_physical_profiles": "Physical reference profiles", + "render.library_previous": "Previous page", + "render.library_quality_concepts": "Quality specifications", + "render.library_recent": "Recent", + "render.library_replace_environment": "Replace the existing environment explicitly", + "render.library_replace_studio": "Replace saved lighting, environment and stage", + "render.library_results": "Matching resources", + "render.library_rig_help": "Fit once at an explicit center and physical extent. Complete rigs include passive cards; calibration blockers still refuse. Conservative emitter/card clearance is checked before saving.", + "render.library_rigs": "Authored lighting rigs", + "render.library_save_maps": "Save maps to this setup", + "render.library_scene_bounds": "Use captured scene bounds", + "render.library_scenes": "Scene specifications", + "render.library_search": "Search library", + "render.library_select_hint": "Choose a resource in the Library to inspect its supported actions and limitations.", + "render.library_selene": "SELENE opaque appearances", + "render.library_selene_shots": "SELENE shot specifications", + "render.library_short_blocked": "Unavailable", + "render.library_short_native": "Native composition", + "render.library_short_projection": "Supported projection", + "render.library_short_reference": "Reference only", + "render.library_short_specification": "Specification only", + "render.library_source_preview": "Load source-map preview", + "render.library_source_preview_help": "Authored base-color source map. This is not a rendered or measured material preview.", + "render.library_specification_only": "Specification only: not a complete executable preset. Required effects, resources and subject roles still need explicit implementation and binding.", + "render.library_specs": "Specifications only", + "render.library_status": "Availability", + "render.library_surfaces": "Authored PBR surfaces", + "render.library_target": "Target body", + "render.library_title": "Render resource library", + "render.library_unfavorite": "Remove favorite", + "render.library_uniform_ack": "Use the uniform approximation without spatial or advanced effects", + "render.library_usable": "Executable projections", + "render.linear_help": "Keeps a 32-bit float RGBA master before denoising, exposure, tone mapping, filters and backdrop. Linear sRGB/D65; coverage-premultiplied. Additional memory is admitted explicitly. No compression or extra passes.", + "render.linear_retain": "Retain raw linear EXR", + "render.linear_unavailable": "The selected completed frame has no retained EXR. Enable retention before rendering; an older PNG cannot recover raw radiance.", + "render.look_add": "Add colour look", + "render.look_bleach": "Bleach-bypass-inspired", + "render.look_cool": "Cool", + "render.look_cyanotype": "Cyanotype-inspired", + "render.look_faded": "Faded print", + "render.look_mono": "Monochrome", + "render.look_sepia": "Sepia", + "render.look_strength": "Look strength", + "render.look_teal_orange": "Teal / orange", + "render.look_title": "Creative look stack", + "render.look_warm": "Warm", + "render.mapping_scale": "Physical repeat multiplier", + "render.material_absorption": "Absorption R · G · B (per mm)", + "render.material_add": "Add or edit this body", + "render.material_assignments": "Body assignments", + "render.material_binding_enable": "Include this body override", + "render.material_box": "Axis-aligned box", + "render.material_browse": "Choose image…", + "render.material_certification": "Closed glass uses geometric distance. Topology, orientation, overlap and optical boundaries are checked during GPU preparation; Check only admits the request.", + "render.material_choose_body": "Choose a scene body", + "render.material_closed": "Closed solid mesh", + "render.material_coat": "Clear coat over the base material", + "render.material_coat_enable": "Enable clear coat", + "render.material_coat_help": "Illustrative dielectric coating over the existing opaque appearance. Zero weight leaves the base unchanged.", + "render.material_color_map": "Base color image (sRGB)", + "render.material_color_replace": "Base map replaces body color", + "render.material_custom": "Custom illustrative optics", + "render.material_enable": "Use these GPU material overrides", + "render.material_filter": "Filter scene bodies…", + "render.material_filter_help": "Up to 128 matching bodies are shown. Refine the filter for large scenes.", + "render.material_glass": "Glass and optical absorption", + "render.material_glass_enable": "Use physical glass on this body", + "render.material_glass_exclusive": "Glass cannot share a body with clear coat or runtime maps in this renderer.", + "render.material_glass_help": "Original illustrative recipes. Swatches show transmittance, not a rendered preview. Absorption is −ln(linear transmittance) / reference distance; alpha is unchanged.", + "render.material_gpu_required": "These active material overrides require GPU path tracing. Select GPU or disable the overrides before Check or Start.", + "render.material_ior": "Index of refraction (IOR)", + "render.material_limits": "At most 128 body overrides, 32 disjoint glass bodies, 64 coats and 128 texture bindings. Identical maps share storage; actual device and total memory limits still apply.", + "render.material_map_invalid": "Map paths must be bounded local paths; normal strength must be finite and between 0 and 1.", + "render.material_map_required": "Choose a color image or a normal image before using maps.", + "render.material_maps": "Planar color and normal maps", + "render.material_maps_enable": "Enable maps for this opaque body", + "render.material_maps_help": "PNG/JPEG up to 1024×1024; 16 MiB encoded total. U and V are orthogonal world-mm repeat vectors (maximum 128 repeats). Color is sRGB; normal data uses OpenGL +Y. Files are captured at Check/Start.", + "render.material_metallic_map": "Metallic map (linear)", + "render.material_normal_map": "Normal image (OpenGL, +Y)", + "render.material_normal_strength": "Normal strength (0–1)", + "render.material_origin": "Mapping origin X · Y · Z (mm)", + "render.material_refresh": "Refresh scene bodies", + "render.material_refresh_needed": "Scene changed. Refresh the body list before adding a target.", + "render.material_remove": "Remove this assignment", + "render.material_repeat_u": "One U repeat X · Y · Z (mm)", + "render.material_repeat_v": "One V repeat X · Y · Z (mm)", + "render.material_revalidate": "Revalidate this body", + "render.material_revalidate_needed": "This assignment belongs to an earlier scene revision. Revalidate its exact body identity before rendering.", + "render.material_roughness": "Coat roughness (0.045–1)", + "render.material_roughness_map": "Roughness map (linear)", + "render.material_shadow": "Transmit straight shadow rays", + "render.material_target_missing": "The body ordinal and name no longer match. Remove this assignment and explicitly choose the intended body again.", + "render.material_thickness": "Thin-sheet thickness (mm)", + "render.material_thin": "Thin sheet", + "render.material_title": "GPU image materials", + "render.material_transient": "Temporary optical overrides for this document tab. They are not saved in the design, render setup or material library.", + "render.material_v_up": "Texture V points upward in the image", + "render.material_weight": "Coat weight (0–1)", + "render.method_cpu": "CPU ray tracing", + "render.method_gpu": "GPU path tracing", + "render.method_limit_raster": "Raster uses the fixed opaque studio preview. Select an explicit raytracing method for supported optical controls.", + "render.method_raster": "CPU raster", + "render.nested_enable": "Certified nested dielectrics", + "render.nested_help": "Up to 16 containing layers; every parent must be convex and every child strictly inside it. Intersections, touching surfaces, thin sheets and straight-shadow transmission refuse. Camera-inside state follows the certified hierarchy. Does not create a liquid surface or merge touching CAD boundaries.", + "render.optics_remove": "Remove saved optics", + "render.optics_replace": "Replace this target’s saved optics explicitly", + "render.optics_save": "Save these optics to the setup", + "render.optics_saved": "Saved optical targets", + "render.optics_saved_help": "Exact definition, feature and occurrence identity survives offline reopen. Missing/replaced/hidden targets refuse; engineering materials are unchanged. Save or discard numeric edits before removing a saved target.", + "render.output_format_status": "PNG is the exact completed display image. Optional GPU EXR retains raw scene-linear FLOAT32 radiance before display filters. Export never substitutes the preview cache or a different job.", + "render.output_lock_ratio": "Lock aspect ratio", + "render.output_over_budget": "The requested image exceeds the selected resource envelope. Choose a compatible size or profile explicitly; no automatic downgrade occurs.", + "render.output_ratio_refused": "The linked dimension exceeds this method’s size limit. The previous size is retained; unlock the ratio or choose a smaller value.", + "render.output_swap_orientation": "Swap width and height", + "render.page_aging": "Aging & contamination", + "render.page_all": "All controls", + "render.page_appearance": "Appearance", + "render.page_background": "Backgrounds", + "render.page_camera": "Camera", + "render.page_diagnostics": "Diagnostics", + "render.page_effects": "Lens & finishing effects", + "render.page_environment": "Environment", + "render.page_lighting": "Lighting", + "render.page_output": "Output", + "render.page_scene": "Scene", + "render.passive_stage": "Ground and passive stage", + "render.passive_stage_help": "Finite passive panels belong only to rendered images. They do not add CAD bodies or mass. Placement is fixed after applying; intersecting product bounds refuse. CPU does not provide diffuse bounce lighting.", + "render.physical_acknowledge": "I understand this partial reference needs grade, condition and source review", + "render.physical_associations": "Physical candidates and roles", + "render.physical_background_help": "Real passive floor and wall, separate from the camera backdrop. Cyclorama uses 24 polygonal strips; it is not an infinite or analytically smooth surface. Replaces the saved stage only with your consent.", + "render.physical_copy_plan": "Copy plan with sources and omissions", + "render.physical_cyclorama": "Fit polygonal cyclorama", + "render.physical_floor_wall": "Fit physical floor and wall", + "render.physical_material_name": "Proposed reference material name", + "render.physical_omissions": "Properties not representable in the native card", + "render.physical_plan_only": "Read-only plan prepared. No material was created or assigned. Keep its extended profile and omissions when reviewing the native card.", + "render.physical_prepare_plan": "Prepare creation plan (does not apply)", + "render.physical_separate": "Appearance is not material identification. These are sourced references, not certified effective properties. Existing mass, engineering materials and optics are unchanged.", + "render.physical_unknown": "No numerical candidate is established. Grade, formulation or construction must be specified; unknown is not zero.", + "render.post_contrast": "Contrast", + "render.post_gain_b": "Blue gain", + "render.post_gain_g": "Green gain", + "render.post_gain_r": "Red gain", + "render.post_help": "Creative presentation only. RGB gains precede tone mapping; contrast, saturation and vignette follow in display-linear light. Start Render creates new transport samples. Regrade uses the selected retained raw master without denoising or new rays.", + "render.post_reset": "Reset presentation filters", + "render.post_saturation": "Saturation", + "render.post_title": "Presentation filters", + "render.post_vignette": "Vignette", + "render.preview_image_settings_help": "Live Preview keeps fixed studio lighting. Exposure and image lighting apply to the image job when you Check or Start.", + "render.preview_retry": "Retry live preview", + "render.preview_unavailable_help": "The live preview is unavailable. Saved setups and image-job controls remain accessible. Change the scene or explicitly retry; a refused scene is not rebuilt on every frame.", + "render.preview_upload": "Live-preview vertex payload", + "render.preview_upload_help": "Exact preview vertex bytes, not total GPU or process memory. Geometry is not simplified. Image jobs use their own admission and lighting.", + "render.progressive_image_summary": "Preview PNG · PBR and glass · progressive samples", + "render.quality_ack": "Acknowledge the fixed-budget projection and omissions", + "render.quality_apply": "Use this fixed sampling budget", + "render.quality_projection_help": "Q presets include future requirements. This action projects only a supported fixed-sample PNG budget and explicitly omits adaptive stopping, raw linear output and independent transmission limits.", + "render.quality_review": "Review sampling budget", + "render.queue_pending": "There is no automatic production queue or animation renderer in this UI. Completed still images remain separately exportable.", + "render.radial_distortion": "Radial distortion", + "render.regrade_action": "Regrade raw master (no denoising)", + "render.regrade_help": "Creates a separate PNG from the selected completed raw master, using these presentation controls. Does not trace rays, change the captured size/camera/lights, or overwrite the EXR. Denoising is not reapplied: raw masters do not retain its guides. The derivative remains exportable through the same job controls.", + "render.replace_ground": "Confirm replacement of existing stage", + "render.replace_saved_surface": "Replace an existing saved binding for this target", + "render.result_actual_help": "One image pixel per display pixel.", + "render.result_capture": "Captured revision", + "render.result_current": "The captured model revision is current.", + "render.result_empty": "No completed image yet. Check the settings, then start a render.", + "render.result_fit": "Fit Image", + "render.result_job": "Job", + "render.result_navigation": "Pan and zoom use Navigation preferences. Space + drag pans.", + "render.result_open": "Open the completed image in the main canvas.", + "render.result_preview": "Live Preview", + "render.result_provisional": "Provisional CPU image", + "render.result_provisional_help": "This checkpoint is not exportable. Export keeps the last completed result; cancellation returns to that result.", + "render.result_reduced_display": "Display preview reduced to the viewport device/cache limit. The retained PNG and export keep full resolution; native 100% inspection is unavailable for this reduced view.", + "render.result_retained": "Showing the last completed image; a newer render has not replaced it.", + "render.result_sequence": "Checkpoint", + "render.result_title": "Render Result", + "render.review_stale": "This review is stale. Resolve or check again before applying.", + "render.ribbon_aging": "Aging", + "render.ribbon_backgrounds": "Backgrounds", + "render.ribbon_check": "Check", + "render.ribbon_check_help": "Validate the exact current draft that Render will submit. No renderer fallback, silent resize or resource replacement.", + "render.ribbon_edit_lights": "Edit Lights", + "render.ribbon_effects": "Effects", + "render.ribbon_environment_help": "HDR illumination, camera-only backgrounds and physical stage surfaces are separate controls with explicit replacement consent.", + "render.ribbon_finish_dialog": "Finish the current file or confirmation dialog first.", + "render.ribbon_frame": "Frame", + "render.ribbon_hdr_library": "HDR Library", + "render.ribbon_job_active": "A render is already running; cancel it explicitly before starting another.", + "render.ribbon_light_rigs": "Light Rigs", + "render.ribbon_lights_help": "Inspect authored rigs or edit supported lights without replacing the current setup until you explicitly apply the change.", + "render.ribbon_materials": "Materials", + "render.ribbon_materials_help": "Open the shared appearance inspector and original surface library. Optical edits never silently change engineering properties.", + "render.ribbon_no_active_job": "There is no active render to cancel.", + "render.ribbon_no_result": "Complete a render before exporting its exact image.", + "render.ribbon_no_saved_camera": "Save a shot before restoring its camera.", + "render.ribbon_saved_camera": "Saved Camera", + "render.ribbon_shots": "Shots", + "render.ribbon_studios": "Studios", + "render.ribbon_studios_help": "Browse implemented studio compositions and review their replacements before applying. Concept-only scenes remain labelled.", + "render.ribbon_surface_maps": "Surface Maps", + "render.sampling_title": "Adaptive and transmission sampling", + "render.save_continue": "Save and continue", + "render.saved_maps_runtime_conflict": "Saved surface bindings cannot be mixed with temporary optical overrides or an unsaved HDR. Save the HDR or remove the temporary inputs explicitly.", + "render.saved_surface_remove": "Remove saved binding", + "render.saved_surfaces": "Saved surface bindings", + "render.saved_surfaces_help": "Pinned built-in maps follow the selected occurrence in local millimeters. A replaced or missing target is an error, never an automatic reassignment.", + "render.scene_apply": "Apply reviewed studio", + "render.scene_consent": "Confirm lighting, environment, exposure and stage replacement", + "render.scene_preserved_fields": "Camera, sampling, dimensions, optical bindings, CAD geometry and engineering materials are preserved.", + "render.scene_preserves_design": "Compose lighting and a passive stage for the visible subject. Geometry, engineering materials and the camera remain separate.", + "render.scene_replaces": "Replaces", + "render.scene_review": "Resolve and review", + "render.scene_review_help": "Review the complete native composition before applying. Unbound advanced SCENE specifications are not substituted.", + "render.scene_scope_details": "Composition scope", + "render.setup_legacy_environment": "This older setup uses legacy environment rotation or intensity. Those values are retained; convert them explicitly before saving a full image job.", + "render.setup_numeric_help": "Save records the active image method and all its numeric settings. Reload or choosing another setup replaces this draft; restore the camera separately.", + "render.setup_offline_help": "You can edit and save this method without its renderer. Check and Start require an available host.", + "render.setup_runtime_unsupported": "This full job cannot be saved yet: it contains maps or scene-body bindings. Remove those temporary inputs before saving a portable setup.", + "render.setup_save_missing": "The saved render configuration could not be found after the command completed.", + "render.sharpening": "Detail sharpening", + "render.shot_duplicate": "Duplicate saved shot", + "render.shot_manager": "Saved shots", + "render.shot_new_name": "New shot name", + "render.shot_remove": "Remove saved shot", + "render.shot_remove_help": "Remove only this saved setup. Source geometry and completed images are preserved; the action can be undone.", + "render.shot_remove_title": "Remove saved shot?", + "render.shot_rename": "Rename saved shot", + "render.shot_saved_only": "Save the current draft first. Duplicate and rename preserve exact saved options and resource references.", + "render.sky_ground": "Ground · linear RGB", + "render.sky_horizon": "Horizon · linear RGB", + "render.sky_zenith": "Zenith · linear RGB", + "render.soft_focus": "Soft focus", + "render.stage_panel_count": "Saved panels", + "render.studio_add_area": "Add area light", + "render.studio_ambient": "Constant environment radiance", + "render.studio_ambient_rgb": "Constant environment radiance (linear RGB)", + "render.studio_aperture": "Aperture radius", + "render.studio_area": "Area light", + "render.studio_area_help": "Up to four one-sided rectangles. Orthogonal half-edges U and V define size; U × V faces the lit side. Coordinates are world-space millimetres.", + "render.studio_center": "Center X, Y, Z (mm)", + "render.studio_denoise": "Reduce noise in the finished image", + "render.studio_denoise_help": "Final edge-aware filter; fine detail can soften. Glass and sharp specular surfaces bypass the filter.", + "render.studio_direction": "Direction toward sun (X, Y, Z)", + "render.studio_environment": "Environment", + "render.studio_environment_bounds": "Environment rotation must be finite within ±1,000,000 radians and intensity between 0 and 100.", + "render.studio_environment_none": "No environment map", + "render.studio_focus": "Axial focus distance", + "render.studio_half_u": "Half-edge U (mm)", + "render.studio_half_v": "Half-edge V (mm)", + "render.studio_hdr": "Radiance HDR file", + "render.studio_hdr_browse": "Choose HDR…", + "render.studio_hdr_help": "Radiance .hdr, 2:1 panorama, up to 2048 × 1024. EXR is unavailable. The color assumption applies only when primaries are unspecified.", + "render.studio_hdr_required": "Choose a local .hdr file.", + "render.studio_hdr_srgb": "Interpret unspecified primaries as linear sRGB", + "render.studio_intensity": "Environment intensity", + "render.studio_lens": "Depth of field", + "render.studio_lens_perspective": "Depth of field requires a perspective camera.", + "render.studio_lighting": "Studio lighting", + "render.studio_lighting_enable": "Use custom studio lighting", + "render.studio_needs_review": "Review method and settings", + "render.studio_radiance": "Linear RGB radiance", + "render.studio_ready": "Ready to check", + "render.studio_remove_area": "Remove area light", + "render.studio_rotation": "Environment rotation", + "render.studio_runtime_help": "Numeric studio settings and checked HDR sources can be saved with the setup. Body optical/material overrides remain temporary and do not change saved appearances.", + "render.studio_saved": "Saved setup / current camera", + "render.studio_sky": "Artistic sky", + "render.studio_sky_help": "Original sky gradient for lighting; not a calibrated atmospheric model.", + "render.studio_sun": "Sun", + "render.studio_sun_radius": "Angular radius", + "render.studio_title": "Render studio", + "render.studio_tone_map": "Tone mapping", + "render.subsurface_enable": "Interior scattering random walk", + "render.subsurface_help": "Closed dielectric only. Scattering and RGB absorption are separate per-mm coefficients. Paths scatter inside actual geometry, then refract or reflect at the boundary. Disable straight shadow transmission, surface denoising and exterior volume; use one Fresnel stratum. Not a diffusion shader, density grid or measured material. Dense media may need more samples and path depth.", + "render.subsurface_rate": "Scattering collision rate", + "render.transmission_scope": "GPU glass supports certified disjoint media. Unrestricted nested media and a noise-free transmission estimator are not provided.", + "render.transmission_strata": "Conditional Fresnel strata", + "render.transmission_strata_help": "1 preserves the original stream. 2 or 4 subpaths stratify the first glass reflection/transmission choice with unchanged Snell and absorption laws. More paths cost more work; this is not denoising, nested-media support or a promise of faster rendering.", + "render.volume_albedo": "Scattering albedo · linear RGB", + "render.volume_anisotropy": "Phase mean cosine", + "render.volume_enable": "Enable participating medium", + "render.volume_extinction": "Extinction coefficient", + "render.volume_help": "GPU transport inside one finite box, with Beer attenuation and HG scattering on camera and indirect paths. Uses explicit studio/HDR/sky lighting, including shadow attenuation. Positive phase cosine scatters forward. Glass boundaries and surface denoising must be disabled explicitly. Zero extinction leaves transport unchanged. Not a physical lunar atmosphere, density grid, volume emission, spectral transport or certified material property.", + "render.volume_max": "Maximum bounds · world mm", + "render.volume_min": "Minimum bounds · world mm", + "render.volume_title": "Bounded homogeneous volume", + "section.off_hint": "No plane picked: OK turns the section off.", + "set by the sketch's lines": "set by the sketch's lines", + "settings.frame_rate_details_note": "Adds a graph of the last frames' times with the triangles drawn over it, a histogram of frame times and what the GPU drew. Click the frame rate in the view to show or hide them.", + "settings.reference_geometry_through_bodies": "Show reference geometry through bodies", + "settings.reference_geometry_through_bodies_help": "Draw inactive sketch contours and datum planes over shaded bodies", + "settings.window_system_details": "Details", + "settings.window_system_note_now": "Applies after a restart. Now: {now}.", + "settings.window_system_wayland_limited": "Some features are limited on native Wayland.", + "sheet.no_body": "there is no sheet metal body: start one with Flange > Base, or turn a plate into sheet metal with Convert to Sheet Metal (pick its large flat face)", + "sketch_panel.plane_angle": "{plane}, turned by {angle}", + "sketch_panel.plane_fixed": "A fixed plane", + "sketch_panel.plane_flipped": "{plane}, from its other side", + "sketch_panel.plane_offset": "{plane}, offset by {distance}", + "sketch_panel.plane_origin": "The {plane} plane", + "thread.direction": "Thread direction", + "thread.left_hand": "Left-hand", + "thread.right_hand": "Right-hand", + "timeline.delete_after_marker_one": "Delete 1 Feature After History Marker", + "timeline.delete_after_marker_other": "Delete {count} Features After History Marker", + "timeline.delete_folders_tip": "Keep their features and nested folders in the history", + "timeline.delete_many": "Delete {count} Selected Features", + "timeline.feature_error": "Error: {message}", + "timeline.feature_hint": "Double-click to edit · drag to reorder · right-click for more", + "timeline.feature_warning": "Warning: {message}", + "toolbar.render_appearance": "APPEARANCE", + "toolbar.render_camera": "CAMERA", + "toolbar.render_environment": "ENVIRONMENT", + "toolbar.render_lighting": "LIGHTING", + "ui.agent_chat_attach_selection": "Attach selection", + "ui.agent_chat_attach_selection_tip": "Send what is selected in the model (faces, edges, features, bodies) with the message, so the agent knows what you mean", + "ui.agent_chat_changes_n": "{n} changes", + "ui.agent_chat_choose_model": "Choose a model", + "ui.agent_chat_ctx_bodies": "Bodies", + "ui.agent_chat_ctx_elements": "Elements", + "ui.agent_chat_ctx_features": "Features", + "ui.agent_chat_ctx_more": "+{n} more", + "ui.agent_chat_ctx_other": "Other", + "ui.agent_chat_login_found": "login found", + "ui.agent_chat_model_no_tools": "{model} can't use SolidCraft's tools, so it can only chat. Pick a model with tool support.", + "ui.agent_chat_no_tool_call": "The model didn't use SolidCraft's tools, so the design wasn't changed. Choose a model that supports tool calling; see Local models in the agent chat guide.", + "ui.agent_chat_pick_context": "Pick context", + "ui.agent_chat_pick_context_tip": "Choose faces, edges, features and bodies in the model for the agent to look at, then press OK", + "ui.agent_chat_provider_models": "{count} models", + "ui.agent_chat_provider_other": "Other", + "ui.agent_chat_provider_tip": "The provider whose models the next list shows.", + "ui.agent_chat_turn_unlimited": "Unlimited", + "ui.ai_add_anthropic": "Anthropic-compatible API", + "ui.ai_add_endpoint": "API endpoint", + "ui.ai_kind": "Kind", + "ui.ai_protocol": "Protocol", + "ui.ai_request_timed_out": "The model took longer than {seconds} s. You can raise the request timeout for this endpoint in Preferences › Assistant.", + "ui.ai_request_timeout": "Request timeout", + "ui.ai_request_timeout_hint": "How long one model request to this endpoint may take, from 30 s to an hour. Raise it for a slow local model.", + "ui.ai_test_answered": "Reached: {model} answered", + "ui.ai_test_anthropic_tip": "Sends a short message to the endpoint", + "ui.ai_tool_arguments": "Arguments", + "ui.ai_tool_details": "Details", + "ui.ai_tool_result": "Result", + "ui.ai_tool_sum_bodies_one": "{count} body", + "ui.ai_tool_sum_bodies_other": "{count} bodies", + "ui.ai_tool_sum_by": "by {value}", + "ui.ai_tool_sum_edges_one": "{count} edge", + "ui.ai_tool_sum_edges_other": "{count} edges", + "ui.ai_tool_sum_faces_one": "{count} face", + "ui.ai_tool_sum_faces_other": "{count} faces", + "ui.ai_tool_sum_features_one": "{count} feature", + "ui.ai_tool_sum_features_other": "{count} features", + "ui.ai_tool_sum_measured": "Measured {what}", + "ui.ai_tool_sum_more": "{steps}, and {count} more", + "ui.ai_tool_sum_radius": "r {value}", + "ui.ai_tool_sum_saved": "Saved {file}", + "ui.ai_tool_sum_screenshot": "Screenshot", + "ui.ai_tool_sum_then": "{first}, then {next}", + "ui.cosmetic_thread_markings": "Cosmetic thread markings", + "ui.cosmetic_thread_markings_help": "Show schematic markings on threaded cylindrical walls. Changes only the display, never the design or exports.", + "ui.extract_component": "Extract to File…", + "ui.extract_design_changed": "The design changed while choosing a file. Start Extract to File again.", + "ui.extract_done": "The component is now its own design, linked here.", + "ui.extrude_auto_to_object": "Extrude to a picked target", + "ui.extrude_auto_to_object_tip": "In Extrude, with a profile picked, picking a face, vertex or parallel plane off its plane switches the extent to To Object", + "ui.frame_rate_details": "Frame rate details", + "ui.hide_origin_by_default": "Hide origin by default", + "ui.hide_origin_note": "New designs start with the Origin folder hidden. A design keeps its own Origin setting once you show or hide it.", + "ui.history_sketch_listed_under": "Listed under {feature}", + "ui.horizontal_constraint": "Horizontal Constraint", + "ui.link_copies": "Link Identical Copies", + "ui.link_copies_keep": "Keep", + "ui.link_copies_link": "Link", + "ui.link_copies_text": "These components build the same bodies as {name}. Make them placements of its link?", + "ui.nav_bridge": "Navigate with a device app on this computer", + "ui.nav_bridge_connected": "Connected", + "ui.nav_bridge_port": "Port", + "ui.nav_bridge_tip": "A 3D input device's own program (for example a homemade 3D mouse's driver) moves the view over a local connection, so the mouse pointer stays yours. SolidCraft connects to it on this port on this computer only.", + "ui.nav_bridge_waiting": "Waiting for the device app", + "ui.open_linked_design": "Open Linked Design", + "ui.perforate_margin_default": "from the diameter", + "ui.perforate_pitch": "Pitch", + "ui.perforate_square": "Square", + "ui.perforate_staggered": "Staggered (60°)", + "ui.perforate_title": "PERFORATE", + "ui.placement_handles": "Placement handles", + "ui.placement_handles_tip": "Handles on the preview of a Rest, Boss or Snap Fit: drag the marker to move it across the model, turn it by its ring", + "ui.plugins_none": "No plugins match this search.", + "ui.plugins_search": "Search plugins", + "ui.reference_1": "Reference 1", + "ui.reference_2": "Reference 2", + "ui.reference_distance": "Reference distance", + "ui.replace_with_link_done": "The copies are now placements of the linked design.", + "ui.save_mesh_no_slicer_open": "No slicer found: choose Custom… and pick your slicer program", + "ui.send_to_slicer_unavailable": "Send to Slicer needs the desktop app: a browser can't start a program", + "ui.sent_to_slicer_copy": "Sent to {slicer} as {file}, because the first file is still open there", + "ui.shortcut_capture_add_key": "Add one ordinary key. Escape cancels.", + "ui.shortcut_capture_hint": "Click a binding, then press modifiers and one key. Add modifiers within one second; release all keys to confirm. Escape cancels.", + "ui.shortcut_capture_press": "Press modifiers and one key. Escape cancels.", + "ui.shortcut_capture_release": "Release all keys to confirm. Escape cancels.", + "ui.shortcut_capture_settling": "Confirming shortcut… Escape cancels.", + "ui.shortcut_cycles_modes": "Pressing a tool's shortcut again switches its mode", + "ui.shortcut_cycles_modes_tip": "Before the first point, pressing a sketch tool's shortcut again steps through its creation modes. Off: it starts the tool again.", + "ui.shortcut_multiple_keys": "Use modifiers and only one other key. Click the binding to try again.", + "ui.slicer_lost": "{slicer} was started but can't be found again to send it the file. The file is saved at {path}: open it from there.", + "ui.slicer_no_file": "{slicer} is ready, but there is no file to send to it.", + "ui.slicer_no_response": "{slicer} didn't respond in time. The file is already saved at {path}: send it again once the slicer has started.", + "ui.slicer_resend_hint": "Sending again replaces the file the slicer has open.", + "ui.slicer_single_instance": "Open files in a slicer that is already running", + "ui.slicer_single_instance_tip": "PrusaSlicer, SuperSlicer and Cura load the file in the window that is open instead of starting another. Other slicers are started as they are. PrusaSlicer 3.0 always does this: its launcher can't take a file any other way.", + "ui.slicer_starting": "Starting {slicer}…", + "ui.slicer_still_starting": "Still waiting for {slicer} to start. Nothing else was sent.", + "ui.slicer_stl_fallback": "The 3MF could not be written, so this is an STL.", + "ui.step_values": "Step values with the arrow keys and the wheel", + "ui.step_values_tip": "In a value field you are typing in, Up/Down change a plain number by 1 (Shift: 10, Alt: 0.1), and so does the mouse wheel over the field. Expressions are left as typed.", + "ui.turn_up_axis": "Turn Up Axis", + "ui.vertical_constraint": "Vertical Constraint", + "ui.viewport_theme_follow": "Follow theme", + "ui.window_system": "Window system", + "ui.window_system_auto": "Automatic", + "ui.window_system_wayland": "Wayland", + "ui.window_system_x11": "X11", + "update.prefs_web": "Reload the page to get the latest web app. If the network is unavailable or the update cannot finish downloading in time, the saved version opens instead; a download in progress continues for the next reload.", + "view.auto_ortho_faces": "Perspective while orbiting, ortho on faces", + "web.files.insert_drawings_hint": "CAD files, meshes, DXF or SVG into the open design", + "web.files.insert_stored_drawings_hint": "Into the open design (CAD files, meshes, DXF, SVG)", + "web.open_full": "Open in SolidCraft", + "web.open_link": "Open linked design?", + "web.open_link_confirm": "There are unsaved changes. Open the linked design in a new tab?", + "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ choose · Enter applies what you typed · Esc dismiss" + } +} From d14dbe5e3968350de4b6565d43d6bd798b256928 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:47:01 +0000 Subject: [PATCH 071/102] Move: a copying Move can be edited from the History (#7741) (#7761) * claim: #7741 Co-Authored-By: Claude Opus 5.5 * Move: a copying Move can be edited from the History (#7741) Editing a feature runs its command on a scratch session with the marker right after it. For the last feature that marker sits at the end of the timeline, and place_feature pushed the new feature after it, rolled back, so a copying Move found no copies and refused the edit. A marker right after the last feature now moves on past a feature added there. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/doc/src/document.rs | 4 +++- crates/doc/src/tests.rs | 15 +++++++++++++++ crates/engine/src/cmd/solid_move_copy_tests.rs | 18 ++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/crates/doc/src/document.rs b/crates/doc/src/document.rs index f04a25b06..1a9fcd0d8 100644 --- a/crates/doc/src/document.rs +++ b/crates/doc/src/document.rs @@ -3505,7 +3505,9 @@ impl Document { let id = f.id; let insertion_group = self.marker.and_then(|marker| self.timeline_group_at_insertion(marker)); match self.marker { - Some(m) if m < self.features.len() => { + // A marker right after the last feature moves on past a feature added there, or the + // new feature would be added rolled back (#7741). + Some(m) if m <= self.features.len() => { self.features.insert(m, f); self.marker = Some(m + 1); } diff --git a/crates/doc/src/tests.rs b/crates/doc/src/tests.rs index 0c521ec14..9f338af0c 100644 --- a/crates/doc/src/tests.rs +++ b/crates/doc/src/tests.rs @@ -562,6 +562,21 @@ fn feature_inserted_at_a_marker_inside_a_timeline_folder_joins_it() { assert!(Document::from_json(&doc.to_json()).is_ok(), "the inserted feature must leave a reopenable design"); } +/// A marker after the last feature leaves every feature active, as no marker does, so a feature +/// added then is active too, not added rolled back (#7741: editing the last feature from the +/// History runs its command with the marker there). +#[test] +fn feature_added_with_the_marker_at_the_end_is_active() { + let mut doc = Document::new("marker at the end"); + let first = doc.add_feature(FeatureKind::Sketch { plane: PlaneRef::Origin { name: "XY".into() }, sketch: Sketch::new() }, Some("First")).unwrap(); + doc.marker = Some(1); + + let added = doc.add_feature(FeatureKind::Sketch { plane: PlaneRef::Origin { name: "XY".into() }, sketch: Sketch::new() }, Some("Added")).unwrap(); + + assert_eq!(doc.features.iter().map(|feature| feature.id).collect::>(), vec![first, added]); + assert_eq!(doc.marker, Some(2), "the marker stays after the last feature"); +} + /// A construction plane that is its own side resolves through the model and back into the /// document. The depth count has to survive that hop, or the recursion overflows the stack and /// aborts the process, which no panic guard can intercept. diff --git a/crates/engine/src/cmd/solid_move_copy_tests.rs b/crates/engine/src/cmd/solid_move_copy_tests.rs index 7c057c386..793817540 100644 --- a/crates/engine/src/cmd/solid_move_copy_tests.rs +++ b/crates/engine/src/cmd/solid_move_copy_tests.rs @@ -89,6 +89,24 @@ fn a_copied_body_keeps_the_appearance_of_the_body_it_came_from() { assert_eq!(s.doc.appearances.bodies.get(©), Some(&source), "the copy must keep the appearance of the body it came from"); } +/// Editing a copying Move from the History redefines it on a scratch session, where the old Move +/// is still in the timeline as a suppressed placeholder (#7741). +#[test] +fn a_copying_move_can_be_edited_from_the_history() { + let mut s = Session::default(); + cube20(&mut s, "Cube"); + run(&mut s, "appearance.assign", json!({"bodies": ["Cube"], "appearance": "ABS - Blue"})); + let reply = run(&mut s, "solid.move", json!({"bodies": ["Cube"], "translate": [30, 0, 0], "copy": true})); + let feature = reply["feature"].clone(); + let copy = created(&reply); + let edit = json!({"feature": feature, "command": "solid.move", "params": {"bodies": ["Cube"], "translate": [40, 0, 0], "copy": true}}); + s.execute("timeline.redefine", &edit).expect("editing a copying move must keep copying"); + assert_eq!(s.model.state().bodies.len(), 2, "the edited move still makes one copy"); + assert_eq!(copy_of(&s, "Cube", Vec3::new(40.0, 0.0, 0.0)), copy, "the copy keeps its name and moves to the new place"); + let source = s.doc.appearances.bodies.get("Cube").expect("the source body keeps its look").clone(); + assert_eq!(s.doc.appearances.bodies.get(©), Some(&source), "the edited copy keeps the look of the body it came from"); +} + #[test] fn a_copied_body_keeps_the_material_of_the_body_it_came_from() { let mut s = Session::default(); From d139e415e4d7c2c411d52b6e68817604a59d0e4d Mon Sep 17 00:00:00 2001 From: phanoob Date: Tue, 27 Oct 2026 18:49:30 +0000 Subject: [PATCH 072/102] Sketch: switch a circle or arc dimension between radius and diameter (#7499) (#7729) * Sketch: switch a circle or arc dimension between radius and diameter (#7499) Co-Authored-By: Claude Opus 5.5 * Sketch: Toggle Radius / Diameter for a circle's or an arc's dimension (#7499) New command sketch.toggle_diameter, with input and output schemas, and a context-menu item on a single selected radius or diameter dimension. The circle keeps its size: the dimension's parameter is halved or doubled (a plain value is rewritten, an expression is wrapped). Refused, with nothing changed, when anything else uses that parameter. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Phanoob Co-authored-by: Claude Opus 5.5 --- .../sketch-radius-diameter-toggle.json | 11 ++++ crates/engine/src/cmd/sketch_constraints.rs | 64 +++++++++++++++++++ .../src/cmd/sketch_constraints_tests.rs | 56 ++++++++++++++++ crates/engine/src/schema/mod.rs | 1 + .../engine/src/schema/sketch_constraints.rs | 49 ++++++++++++++ .../src/schema/sketch_constraints_tests.rs | 48 ++++++++++++++ crates/ui-egui/src/context_menu.rs | 51 ++++++++++++++- 7 files changed, 279 insertions(+), 1 deletion(-) create mode 100644 assets/locales/pending/sketch-radius-diameter-toggle.json create mode 100644 crates/engine/src/schema/sketch_constraints.rs create mode 100644 crates/engine/src/schema/sketch_constraints_tests.rs diff --git a/assets/locales/pending/sketch-radius-diameter-toggle.json b/assets/locales/pending/sketch-radius-diameter-toggle.json new file mode 100644 index 000000000..19418540a --- /dev/null +++ b/assets/locales/pending/sketch-radius-diameter-toggle.json @@ -0,0 +1,11 @@ +{ + "en": { "cmd.sketch_toggle_diameter": "Toggle Radius / Diameter" }, + "ar": { "cmd.sketch_toggle_diameter": "تبديل نصف القطر / القطر" }, + "de": { "cmd.sketch_toggle_diameter": "Radius / Durchmesser umschalten" }, + "es": { "cmd.sketch_toggle_diameter": "Alternar radio / diámetro" }, + "fr": { "cmd.sketch_toggle_diameter": "Basculer rayon / diamètre" }, + "he": { "cmd.sketch_toggle_diameter": "מעבר בין רדיוס לקוטר" }, + "ja": { "cmd.sketch_toggle_diameter": "半径 / 直径の切り替え" }, + "vi": { "cmd.sketch_toggle_diameter": "Chuyển đổi bán kính / đường kính" }, + "zh": { "cmd.sketch_toggle_diameter": "切换半径 / 直径" } +} diff --git a/crates/engine/src/cmd/sketch_constraints.rs b/crates/engine/src/cmd/sketch_constraints.rs index f12a394d2..09b048296 100644 --- a/crates/engine/src/cmd/sketch_constraints.rs +++ b/crates/engine/src/cmd/sketch_constraints.rs @@ -8,8 +8,12 @@ use solidcraft_sketch::{ConstraintKind, CurveKind, Sketch}; use super::sketch::{add_c, constraint_result, dof_now, edit, listed, redundancy, residual_of}; use super::{CommandSpec, in_sketch}; use crate::params::{bad, num, req_vec2, str_, string_list, vec2}; +use crate::schema::sketch_constraints::{ToggleDiameterParams, ToggleDiameterResult}; +use crate::schema::{TypedContract, output_schema_for}; use crate::{EngineError, Result, Session}; +const TOGGLE_DIAMETER_CONTRACT: TypedContract = TypedContract::new(); + pub static COMMANDS: &[CommandSpec] = &[ CommandSpec::new("sketch.constraint.curvature", "Curvature", c_smooth) .at("SKETCH", "CONSTRAINTS") @@ -44,6 +48,12 @@ pub static COMMANDS: &[CommandSpec] = &[ CommandSpec::new("sketch.toggle_driven", "Toggle Driven Dimension", toggle_driven).icon("dimension") .enabled(in_sketch) .params("constraint: dimension id, driven?: bool (default toggles); a driving dimension gets a parameter with its current value"), + CommandSpec::new("sketch.toggle_diameter", "Toggle Radius / Diameter", crate::checked!("sketch.toggle_diameter", toggle_diameter)) + .icon("dimension") + .enabled(in_sketch) + .contract(&TOGGLE_DIAMETER_CONTRACT) + .output(output_schema_for::) + .params("constraint: a circle's or an arc's radius or diameter dimension id; diameter?: bool (default: the other one); sketch?: id|name (default: the one being edited). The circle stays the same size: its parameter is halved or doubled (a plain value is rewritten, an expression becomes `(e) / 2` or `2 * (e)`); refused when anything else uses that parameter"), CommandSpec::new("sketch.glyphs", "Constraint Glyphs", glyphs).icon("eye") .enabled(in_sketch) .noundo() @@ -408,6 +418,60 @@ fn toggle_driven(s: &mut Session, p: &Value) -> Result { Ok(json!({"constraint": cid, "driven": driven, "sketch": info})) } +fn toggle_diameter(s: &mut Session, p: &Value) -> Result { + let cmd = "sketch.toggle_diameter"; + let cid = str_(p, "constraint").ok_or_else(|| bad(cmd, "`constraint` must be a dimension id"))?.to_string(); + let want = crate::params::bool_(p, "diameter"); + let sketch = super::sketch::target_sketch(s, p, cmd)?; + let (diameter, info) = edit(s, p, cmd, true, |sk, doc| { + let c = sk.constraints.iter().find(|c| c.id == cid).cloned().ok_or_else(|| bad(cmd, format!("no constraint `{cid}`")))?; + let round = |curve: usize| matches!(sk.curves.get(curve).map(|c| &c.kind), Some(CurveKind::Circle { .. } | CurveKind::Arc { .. })); + let (curve, value, now) = match c.kind { + ConstraintKind::Radius { c, value } if round(c) => (c, value, false), + ConstraintKind::Diameter { c, value } if round(c) => (c, value, true), + _ => return Err(bad(cmd, format!("`{cid}` is not a circle's or an arc's radius or diameter dimension"))), + }; + let diameter = want.unwrap_or(!now); + if diameter == now { + return Ok(diameter); + } + let (kind, value) = if diameter { + (ConstraintKind::Diameter { c: curve, value: 2.0 * value }, 2.0 * value) + } else { + (ConstraintKind::Radius { c: curve, value: value / 2.0 }, value / 2.0) + }; + // Its parameter now holds the other measure, so the circle keeps its size; another user + // of that parameter would change size with it. + if let Some(name) = &c.param { + let others: Vec = doc + .param_users(name) + .into_iter() + .filter( + |u| !matches!(u, solidcraft_doc::ParamUser::Dimension { feature, constraint, .. } if *feature == sketch && *constraint == cid), + ) + .map(|u| u.describe()) + .collect(); + if !others.is_empty() { + return Err(bad(cmd, format!("`{name}` is also used by {}; switching `{cid}` would change them", others.join(", ")))); + } + let e = doc.param(name).map(|p| p.expr.clone()).ok_or_else(|| bad(cmd, format!("no parameter `{name}`")))?; + let e = if solidcraft_doc::expr::references(&e).is_empty() { + doc.design_length(value).1 + } else if diameter { + format!("2 * ({e})") + } else { + format!("({e}) / 2") + }; + doc.set_param(name, &e, None, None).map_err(|e| bad(cmd, e.to_string()))?; + } + let slot = sk.constraints.iter_mut().find(|c| c.id == cid).ok_or_else(|| bad(cmd, "constraint"))?; + slot.kind = kind; + Ok(diameter) + })?; + let reply = ToggleDiameterResult { constraint: cid, diameter, sketch: info, param_warnings: Vec::new() }; + serde_json::to_value(reply).map_err(|e| EngineError::Other(e.to_string())) +} + /// Where a constraint's glyph goes (sketch coordinates): beside the middle of its first curve, /// or at its point. fn anchor(sk: &Sketch, k: &ConstraintKind) -> Option { diff --git a/crates/engine/src/cmd/sketch_constraints_tests.rs b/crates/engine/src/cmd/sketch_constraints_tests.rs index ccbf55927..e75d23184 100644 --- a/crates/engine/src/cmd/sketch_constraints_tests.rs +++ b/crates/engine/src/cmd/sketch_constraints_tests.rs @@ -285,6 +285,62 @@ fn smart_constrain_and_driven_toggle() { assert_eq!(r["driven"], false); } +/// #7499: a circle's or an arc's dimension switches between its radius and its diameter, the +/// circle keeping its size: the parameter is halved or doubled, an expression wrapped. +#[test] +fn a_radius_dimension_switches_to_a_diameter_and_back() { + use solidcraft_sketch::ConstraintKind; + let mut s = new_sketch(); + let dim = |s: &Session, param: &str| sketch(s).constraints.iter().find(|c| c.param.as_deref() == Some(param)).unwrap().clone(); + let c1 = ids(&run(&mut s, "sketch.circle.center", json!({"center": [0, 0], "radius": 10}))["curves"])[0].clone(); + let d = run(&mut s, "sketch.dimension", json!({"entities": [c1]})); + let p1 = d["param"].as_str().unwrap().to_string(); + let did = dim(&s, &p1).id; + assert!(matches!(dim(&s, &p1).kind, ConstraintKind::Diameter { .. }), "a circle is dimensioned by its diameter"); + let r = run(&mut s, "sketch.toggle_diameter", json!({"constraint": did})); + assert_eq!(r["diameter"], false, "{r}"); + assert!(matches!(dim(&s, &p1).kind, ConstraintKind::Radius { value, .. } if (value - 10.0).abs() < 1e-9), "{:?}", dim(&s, &p1).kind); + assert_eq!(s.doc.param(&p1).unwrap().expr, "10 mm"); + assert!((sketch(&s).radius(0).unwrap() - 10.0).abs() < 1e-9, "the circle keeps its size"); + // Asking for what it already is changes nothing; then back to the diameter. + let r = run(&mut s, "sketch.toggle_diameter", json!({"constraint": did, "diameter": false})); + assert_eq!(r["diameter"], false, "{r}"); + run(&mut s, "sketch.toggle_diameter", json!({"constraint": did})); + assert!(matches!(dim(&s, &p1).kind, ConstraintKind::Diameter { value, .. } if (value - 20.0).abs() < 1e-9)); + assert_eq!(s.doc.param(&p1).unwrap().expr, "20 mm"); + + // An expression is wrapped, so it still reads the parameters it names. + run(&mut s, "parameters.add", json!({"name": "w", "expression": "30 mm"})); + let c2 = ids(&run(&mut s, "sketch.circle.center", json!({"center": [50, 0], "radius": 10}))["curves"])[0].clone(); + let p2 = run(&mut s, "sketch.dimension", json!({"entities": [c2], "value": "w"}))["param"].as_str().unwrap().to_string(); + let d2 = dim(&s, &p2).id; + run(&mut s, "sketch.toggle_diameter", json!({"constraint": d2})); + assert_eq!(s.doc.param(&p2).unwrap().expr, "(w) / 2"); + assert!((sketch(&s).radius(1).unwrap() - 15.0).abs() < 1e-6, "{:?}", sketch(&s).radius(1)); + + // Another user of the parameter would change size with it: refused, nothing changes. + run(&mut s, "parameters.add", json!({"name": "k", "expression": format!("{p1} + 1 mm")})); + let e = s.execute("sketch.toggle_diameter", &json!({"constraint": did})).unwrap_err().to_string(); + assert!(e.contains("also used by parameter k"), "{e}"); + assert!(matches!(dim(&s, &p1).kind, ConstraintKind::Diameter { .. })); + assert_eq!(s.doc.param(&p1).unwrap().expr, "20 mm"); + + // An arc's driven radius becomes its driven diameter; a line's length is no radius. + let a = ids(&run(&mut s, "sketch.arc.center_point", json!({"center": [0, 80], "start": [20, 80], "sweep": 90}))["curves"])[0].clone(); + run(&mut s, "sketch.dimension", json!({"entities": [a], "driven": true})); + let arc = sketch(&s).curves.iter().position(|c| c.id == a).unwrap(); + let driven = sketch(&s).constraints.iter().find(|c| matches!(c.kind, ConstraintKind::Radius { c, .. } if c == arc)).unwrap().clone(); + assert!(driven.driven && driven.param.is_none()); + run(&mut s, "sketch.toggle_diameter", json!({"constraint": driven.id})); + let now = sketch(&s).constraints.iter().find(|c| c.id == driven.id).unwrap().clone(); + assert!(now.driven && matches!(now.kind, ConstraintKind::Diameter { value, .. } if (value - 40.0).abs() < 1e-6), "{now:?}"); + let l = ids(&run(&mut s, "sketch.line", json!({"points": [[0, -50], [10, -50]]}))["curves"])[0].clone(); + let pl = run(&mut s, "sketch.dimension", json!({"entities": [l], "value": 10}))["param"].as_str().unwrap().to_string(); + let dl = dim(&s, &pl).id; + let e = s.execute("sketch.toggle_diameter", &json!({"constraint": dl})).unwrap_err().to_string(); + assert!(e.contains("is not a circle's or an arc's radius or diameter dimension"), "{e}"); +} + /// #4691: a point put on a line's midpoint snap is held there (a MidPoint constraint), and one /// put on a curve stays on it, as a line's end does: they no longer move freely. #[test] diff --git a/crates/engine/src/schema/mod.rs b/crates/engine/src/schema/mod.rs index 562f3e888..0e95a1648 100644 --- a/crates/engine/src/schema/mod.rs +++ b/crates/engine/src/schema/mod.rs @@ -57,6 +57,7 @@ mod tests; pub mod edit; pub mod features; pub mod inspect; +pub mod sketch_constraints; pub use check::{Contract, Issue, ParamCheck, TypedContract, input_schema_for, output_schema_for, run_checked, run_checked_as}; pub use types::*; diff --git a/crates/engine/src/schema/sketch_constraints.rs b/crates/engine/src/schema/sketch_constraints.rs new file mode 100644 index 000000000..9ab8de314 --- /dev/null +++ b/crates/engine/src/schema/sketch_constraints.rs @@ -0,0 +1,49 @@ +//! Contracts and result types for the commands in `cmd/sketch_constraints.rs`. + +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; +use serde_json::Value; + +use super::types::{SketchRef, present}; + +/// Switch a circle's or an arc's dimension between its radius and its diameter. +#[derive(Debug, Deserialize, JsonSchema)] +#[schemars(deny_unknown_fields)] +pub struct ToggleDiameterParams { + /// The radius or diameter dimension's constraint id. + #[serde(deserialize_with = "dimension_id")] + pub constraint: String, + /// `true` for a diameter, `false` for a radius (default: the other one). + #[serde(default)] + pub diameter: Option, + /// The sketch (default: the one being edited). + #[serde(default, deserialize_with = "present", skip_serializing_if = "Option::is_none")] + #[schemars(with = "SketchRef")] + pub sketch: Option, +} + +/// A constraint id, with the handler's message for anything else. +fn dimension_id<'de, D: serde::Deserializer<'de>>(d: D) -> Result { + match Value::deserialize(d)? { + Value::String(s) => Ok(s), + _ => Err(serde::de::Error::custom("must be a dimension id")), + } +} + +/// What `sketch.toggle_diameter` returns. +#[derive(Debug, Serialize, JsonSchema)] +pub struct ToggleDiameterResult { + /// The dimension's constraint id (unchanged). + pub constraint: String, + /// Whether it now holds the diameter. + pub diameter: bool, + /// The sketch's solve: `{solved, dof}`. + pub sketch: Value, + /// In the warn parameter-check mode: what the call's parameters got wrong. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub param_warnings: Vec, +} + +#[cfg(test)] +#[path = "sketch_constraints_tests.rs"] +mod tests; diff --git a/crates/engine/src/schema/sketch_constraints_tests.rs b/crates/engine/src/schema/sketch_constraints_tests.rs new file mode 100644 index 000000000..9a225954e --- /dev/null +++ b/crates/engine/src/schema/sketch_constraints_tests.rs @@ -0,0 +1,48 @@ +use serde_json::json; + +use super::{ToggleDiameterParams, ToggleDiameterResult}; +use crate::Session; +use crate::schema::tests::{assert_keys, assert_strict_keeps_todays_errors, conforms}; +use crate::schema::{ParamCheck, input_schema_for, output_schema_for}; + +#[test] +fn schemas_and_the_key_check_agree() { + assert_keys(input_schema_for::(), &["constraint", "diameter", "sketch"]); +} + +#[test] +fn strict_keeps_todays_errors() { + assert_strict_keeps_todays_errors(&[ + ("sketch.toggle_diameter", json!({"constraint": 5})), + ("sketch.toggle_diameter", json!({"constraint": null})), + ("sketch.toggle_diameter", json!({"constraint": "c1"})), + ("sketch.toggle_diameter", json!({"constraint": "c1", "diameter": true})), + ]); +} + +#[test] +fn toggle_diameter_reply_matches_its_schema() { + let mut s = Session { param_check: ParamCheck::Warn, ..Session::default() }; + let run = |s: &mut Session, id: &str, p: serde_json::Value| s.execute(id, &p).unwrap_or_else(|e| panic!("{id}: {e}")); + run(&mut s, "sketch.create", json!({"plane": "XY"})); + let c = run(&mut s, "sketch.circle.center", json!({"center": [0, 0], "radius": 10})); + let circle = c["curves"][0].as_str().unwrap_or_else(|| panic!("{c}")).to_string(); + let d = run(&mut s, "sketch.dimension", json!({"entities": [circle]})); + let g = run(&mut s, "sketch.glyphs", json!({})); + let did = g["glyphs"] + .as_array() + .into_iter() + .flatten() + .find(|x| x["param"] == d["param"]) + .and_then(|x| x["id"].as_str()) + .unwrap_or_else(|| panic!("{g}")) + .to_string(); + let schema = output_schema_for::(); + let schema = schema.as_value(); + let r = run(&mut s, "sketch.toggle_diameter", json!({"constraint": did})); + assert!(conforms(schema, schema, &r), "{r} doesn't match {schema}"); + assert_eq!(r["diameter"], false, "{r}"); + let r = run(&mut s, "sketch.toggle_diameter", json!({"constraint": did, "unknown": 1})); + assert!(conforms(schema, schema, &r), "{r} doesn't match {schema}"); + assert!(r["param_warnings"].as_array().is_some_and(|w| !w.is_empty()), "{r}"); +} diff --git a/crates/ui-egui/src/context_menu.rs b/crates/ui-egui/src/context_menu.rs index e82635d7d..692c2655d 100644 --- a/crates/ui-egui/src/context_menu.rs +++ b/crates/ui-egui/src/context_menu.rs @@ -953,7 +953,7 @@ fn alignment_items(selection: &[Sel]) -> Vec { /// Sketch entity items: construction, fix, delete, dimension and the constraints the selection /// can take. fn sketch_entity_items(app: &SolveApp) -> Vec { - use solidcraft_engine::sketch::CurveKind; + use solidcraft_engine::sketch::{ConstraintKind, CurveKind}; let Some(sid) = app.session.active_sketch else { return Vec::new() }; let st = app.session.world_state(); let Some(ss) = st.sketch(sid) else { return Vec::new() }; @@ -1002,6 +1002,16 @@ fn sketch_entity_items(app: &SolveApp) -> Vec { if curves.is_empty() && points.is_empty() { if dims.len() == 1 { v.push(cmd(app, "sketch.toggle_driven", "Toggle Driven Dimension").with(json!({ "constraint": dims[0] }))); + // A circle's or an arc's radius or diameter switches to the other one (#7499). + let round = |c: usize| matches!(ss.sketch.curves.get(c).map(|c| &c.kind), Some(CurveKind::Circle { .. } | CurveKind::Arc { .. })); + if ss + .sketch + .constraints + .iter() + .any(|k| k.id == dims[0] && matches!(k.kind, ConstraintKind::Radius { c, .. } | ConstraintKind::Diameter { c, .. } if round(c))) + { + v.push(cmd(app, "sketch.toggle_diameter", "Toggle Radius / Diameter").with(json!({ "constraint": dims[0] }))); + } } if app.session.selection.iter().any(|s| matches!(s, Sel::SketchConstraint { .. })) { v.push(act("ui.delete", "Delete", "delete").key("Del")); @@ -2291,6 +2301,45 @@ mod tests { assert!(!items(&h.app, &Target::Viewport).iter().any(|i| i.id == "sketch.toggle_driven")); } + /// #7499: a selected circle's dimension offers Toggle Radius / Diameter, which switches it + /// both ways; a line's length does not. + #[test] + fn a_circle_dimension_menu_toggles_radius_and_diameter() { + use solidcraft_engine::sketch::ConstraintKind; + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); + let sid = h.app.session.active_sketch.unwrap(); + let c = h.app.run("sketch.circle.center", json!({"center":[0,0],"radius":10})).unwrap()["curves"][0].as_str().unwrap().to_owned(); + let l = h.app.run("sketch.line", json!({"points":[[30,0],[50,0]],"connect":false,"infer":false})).unwrap()["curves"][0] + .as_str() + .unwrap() + .to_owned(); + let pc = h.app.run("sketch.dimension", json!({"entities":[c]})).unwrap()["param"].as_str().unwrap().to_owned(); + let pl = h.app.run("sketch.dimension", json!({"entities":[l],"value":20})).unwrap()["param"].as_str().unwrap().to_owned(); + let dim = |h: &crate::scenario::Harness, p: &str| { + h.app.session.world_state().sketch(sid).unwrap().sketch.constraints.iter().find(|c| c.param.as_deref() == Some(p)).unwrap().clone() + }; + let did = dim(&h, &pc).id; + + h.app.session.selection = vec![Sel::SketchConstraint { id: did.clone() }]; + let menu = items(&h.app, &Target::Viewport); + let item = menu.iter().find(|i| i.id == "sketch.toggle_diameter").expect("a circle's dimension must offer Toggle Radius / Diameter"); + assert!(item.enabled); + assert_eq!(item.params, Some(json!({"constraint": did}))); + run_item(&mut h.app, item, egui::pos2(0.0, 0.0)); + assert!(matches!(dim(&h, &pc).kind, ConstraintKind::Radius { .. }), "the diameter is a radius now"); + let menu = items(&h.app, &Target::Viewport); + let item = menu.iter().find(|i| i.id == "sketch.toggle_diameter").expect("a radius still offers the toggle"); + run_item(&mut h.app, item, egui::pos2(0.0, 0.0)); + assert!(matches!(dim(&h, &pc).kind, ConstraintKind::Diameter { .. }), "and a diameter again"); + + h.app.session.selection = vec![Sel::SketchConstraint { id: dim(&h, &pl).id }]; + let menu = items(&h.app, &Target::Viewport); + assert!(menu.iter().any(|i| i.id == "sketch.toggle_driven")); + assert!(!menu.iter().any(|i| i.id == "sketch.toggle_diameter"), "a length is no radius"); + } + #[test] fn units_toolbar_start_offers_choices_and_one_undo_step() { let mut h = crate::scenario::Harness::new(); From 3179cd2ebd657b7e2a0a19461e919d6706d8bd13 Mon Sep 17 00:00:00 2001 From: selune <35337584+0xlillith@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:51:44 +0000 Subject: [PATCH 073/102] Sketch text: cover line pitch and format-12 glyph zero (#6570) (#6574) * claim: #6570 * test(text): cover nonpositive pitch and format-12 glyph zero (#6570) Original synthetic font regressions. Focused native font tests, strict scoped Clippy and wasm pass. Full repository gate status is recorded in PR #6574; no CI infrastructure changes. --- crates/sketch/src/font_tests.rs | 92 ++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/crates/sketch/src/font_tests.rs b/crates/sketch/src/font_tests.rs index 8de9066d2..b8f21b6bb 100644 --- a/crates/sketch/src/font_tests.rs +++ b/crates/sketch/src/font_tests.rs @@ -29,6 +29,11 @@ fn hole(x0: i16, y0: i16, x1: i16, y1: i16) -> Vec<(i16, i16)> { /// A TrueType font of 1000 units per em with these glyphs (and an empty `.notdef`), named `family`. It has /// no OS/2 table, so it has no capital height of its own. fn build_font(family: &str, glyphs: &[Glyph]) -> Vec { + build_font_with(family, glyphs, [800, -200, 0], &[]) +} + +/// The same font with explicit hhea ascent, descent and line gap, and format-12 characters mapped to glyph zero. +fn build_font_with(family: &str, glyphs: &[Glyph], metrics: [i16; 3], notdef: &[char]) -> Vec { fn u16s(out: &mut Vec, values: &[u16]) { values.iter().for_each(|v| out.extend(v.to_be_bytes())); } @@ -72,7 +77,8 @@ fn build_font(family: &str, glyphs: &[Glyph]) -> Vec { u16s(&mut head, &[0, 0, 1000, 1000, 0, 8, 2, 1, 0]); // box, style, smallest size, direction, long loca, format let mut hhea = Vec::new(); u32s(&mut hhea, &[0x0001_0000]); - u16s(&mut hhea, &[800, (-200i16) as u16, 0, 1000, 0, 0, 1000, 1, 0, 0, 0, 0, 0, 0, 0, count]); + u16s(&mut hhea, &metrics.map(|value| value as u16)); + u16s(&mut hhea, &[1000, 0, 0, 1000, 1, 0, 0, 0, 0, 0, 0, 0, count]); let mut maxp = Vec::new(); u32s(&mut maxp, &[0x0001_0000]); u16s(&mut maxp, &[count]); @@ -83,7 +89,9 @@ fn build_font(family: &str, glyphs: &[Glyph]) -> Vec { } // cmap: one format 12 subtable, a group per character. let mut chars: Vec<(u32, u32)> = glyphs.iter().enumerate().map(|(i, g)| (g.ch as u32, i as u32 + 1)).collect(); + chars.extend(notdef.iter().map(|ch| (*ch as u32, 0))); chars.sort(); + assert!(chars.windows(2).all(|pair| pair[0].0 < pair[1].0), "test cmap groups must not overlap"); let mut cmap = Vec::new(); u16s(&mut cmap, &[0, 1, 3, 10]); u32s(&mut cmap, &[12, 0x000C_0000, 16 + 12 * chars.len() as u32, 0, chars.len() as u32]); @@ -322,6 +330,88 @@ fn a_font_file_is_measured_by_its_own_tables() { assert!(TextMetrics::new(&elsewhere, &TextStyle::default()).is_err()); } +#[test] +fn a_nonpositive_font_pitch_uses_one_and_a_half_heights_for_measurement_and_outlines() { + let folder = Folder::new("nonpositive-pitch"); + let glyphs = [Glyph { ch: 'H', advance: 700, contours: vec![block(0, 0, 600, 700)] }]; + let style = TextStyle { line_spacing: 1.25, ..Default::default() }; + // H supplies the 700-unit cap height. The hhea sums are 0, -100 and 1000 units. + // At 7 mm the fallback is 7 * 1.5 * 1.25 = 13.125 mm; the positive control is 1000 * 0.01 * 1.25 = 12.5 mm. + for (name, metrics, pitches) in + [("zero", [800, -200, -1000], [13.125, 26.25]), ("negative", [800, -200, -1100], [13.125, 26.25]), ("positive", [800, -200, 0], [12.5, 25.0])] + { + let path = folder.0.join(format!("{name}.ttf")).to_string_lossy().into_owned(); + std::fs::write(&path, build_font_with("Pitch", &glyphs, metrics, &[])).unwrap(); + let font = font_data(Some(&path)).unwrap(); + let face = ttf_parser::Face::parse(font.bytes(), 0).unwrap(); + assert_eq!([face.ascender(), face.descender(), face.line_gap()], metrics); + let m = TextMetrics::new(&font, &style).unwrap(); + // Reuse one measure at both heights; expected placement is independent of its returned pitch. + for ((height, scale), expected_pitch) in [(7.0, 0.01), (14.0, 0.02)].into_iter().zip(pitches) { + assert!((m.scale(height).unwrap() - scale).abs() < 1e-15, "{name}: {height}"); + assert!((m.line_pitch(height).unwrap() - expected_pitch).abs() < 1e-12, "{name}: {height}"); + let geometry = text_geometry_styled(Some(&path), "H\nH", v(10.0, 20.0), height, 0.0, &style, None).unwrap(); + assert_eq!(geometry.len(), 8, "{name}: {height}"); + for (row, baseline) in [20.0, 20.0 - expected_pitch].into_iter().enumerate() { + let (lo, hi) = extent(&geometry[row * 4..(row + 1) * 4]); + assert!(lo.dist(v(10.0, baseline)) < 1e-9, "{name}: {height}: {lo:?}"); + assert!(hi.dist(v(10.0 + 600.0 * scale, baseline + height)) < 1e-9, "{name}: {height}: {hi:?}"); + } + } + } +} + +#[test] +fn format_twelve_missing_characters_keep_their_order_and_repetitions() { + let folder = Folder::new("format-twelve-missing"); + // Explicit glyph zero in both planes, absent characters in both planes, and a present non-BMP glyph. + let notdef = ['\u{e000}', '\u{10000}']; + let text = "\u{e000}H\u{1f642}x\u{10000}\u{10ffff}\u{e000}x\u{10000}"; + let expected = ['\u{e000}', 'x', '\u{10000}', '\u{10ffff}', '\u{e000}', 'x', '\u{10000}']; + for fallback in [false, true] { + let mut glyphs = vec![ + Glyph { ch: 'H', advance: 700, contours: vec![block(0, 0, 600, 700)] }, + Glyph { ch: '\u{1f642}', advance: 200, contours: vec![block(0, 0, 100, 700)] }, + ]; + if fallback { + glyphs.push(Glyph { ch: '?', advance: 300, contours: vec![block(0, 0, 200, 700)] }); + } + let path = folder.0.join(format!("fallback-{fallback}.ttf")).to_string_lossy().into_owned(); + std::fs::write(&path, build_font_with("Missing", &glyphs, [800, -200, 0], ¬def)).unwrap(); + let font = font_data(Some(&path)).unwrap(); + let face = ttf_parser::Face::parse(font.bytes(), 0).unwrap(); + for ch in notdef { + assert_eq!(face.glyph_index(ch), Some(ttf_parser::GlyphId(0)), "{ch:?}"); + } + for ch in ['x', '\u{10ffff}'] { + assert_eq!(face.glyph_index(ch), None, "{ch:?}"); + } + assert_eq!(face.glyph_index('\u{1f642}'), Some(ttf_parser::GlyphId(2))); + let m = TextMetrics::new(&font, &TextStyle::default()).unwrap(); + assert_eq!(m.missing(text), expected, "fallback: {fallback}"); + assert!(m.missing("").is_empty()); + assert!(m.missing("H\u{1f642}H").is_empty()); + // H and the present non-BMP glyph advance 9 mm together. Only the three absent characters use '?', + // adding 3 * 3 mm when it exists. Explicit glyph zero is empty with zero advance in this original font. + let expected_width = if fallback { 18.0 } else { 9.0 }; + assert!((m.line_width(text, 7.0).unwrap() - expected_width).abs() < 1e-12); + assert_eq!(m.line_width("\u{e000}\u{10000}", 7.0).unwrap(), 0.0); + let draw = |line: &str| text_geometry_in(Some(&path), line, Vec2::ZERO, 7.0, 0.0).unwrap(); + assert!(draw("\u{e000}\u{10000}").is_empty()); + let geometry = draw(text); + assert_eq!(geometry, draw(if fallback { "H\u{1f642}???" } else { "H\u{1f642}" })); + // Independent outline oracle: two blocks, or five with the three replacements; four lines each. + assert_eq!(geometry.len(), if fallback { 20 } else { 8 }); + let boxes: &[(f64, f64)] = + if fallback { &[(0.0, 6.0), (7.0, 8.0), (9.0, 11.0), (12.0, 14.0), (15.0, 17.0)] } else { &[(0.0, 6.0), (7.0, 8.0)] }; + for (&(lo_x, hi_x), glyph) in boxes.iter().zip(geometry.as_chunks::<4>().0) { + let (lo, hi) = extent(glyph); + assert!(lo.dist(v(lo_x, 0.0)) < 1e-9, "fallback: {fallback}: {lo:?}"); + assert!(hi.dist(v(hi_x, 7.0)) < 1e-9, "fallback: {fallback}: {hi:?}"); + } + } +} + #[test] fn a_font_is_kept_in_the_design_and_old_designs_read_without_one() { let source = |font: Option<&str>| LinkSource::Text { From e2d409e6edd70ef1d2d4639b46c4e34a6c383da6 Mon Sep 17 00:00:00 2001 From: sascha2101 Date: Tue, 27 Oct 2026 18:52:36 +0000 Subject: [PATCH 074/102] Save: a design changed while it is written stays unsaved, and scripts wait for it (#6003) (#7619) * claim: #6003 * Save: a design changed while it is written stays unsaved, and scripts wait for it (#6003) Two of the gaps @raykholo found in #6003 were still open on main: - `engine.script` ran while the window's Save was being written: it calls the session directly, past `SolveApp::run`'s file-operation guard, and `drain_control` did not hold design-changing requests for a save. They now wait for the save like they wait for a file being loaded or picked. - `adopt_save` marked whatever the session held when the save finished as saved. It now takes up the state the save wrote (`done.saved`, and its visibility), so a change made meanwhile stays unsaved instead of being lost on close without a prompt. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FN5eEMrqWWXqi65FcK8GXq --------- Co-authored-by: sascha2101 <221609842+sascha2101@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- crates/engine/src/cmd/file.rs | 38 ++++++++++++++++++++++--- crates/ui-egui/src/lib.rs | 11 ++++--- crates/ui-egui/src/save_job.rs | 52 ++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 8 deletions(-) diff --git a/crates/engine/src/cmd/file.rs b/crates/engine/src/cmd/file.rs index 17d383a00..dcd91a6f5 100644 --- a/crates/engine/src/cmd/file.rs +++ b/crates/engine/src/cmd/file.rs @@ -470,9 +470,11 @@ impl Session { } /// Take up a save that ran on `done`, a [`Session::scratch`] copy of this session that - /// `file.save` or `file.save_as` ran on (on another thread, so the window keeps drawing) - /// while this one did not change: the name the save gave the design, its - /// file, and its saved state, as running the command here would have left them. + /// `file.save` or `file.save_as` ran on (on another thread, so the window keeps drawing): + /// the name the save gave the design, its file, and its saved state, as running the command + /// here would have left them. What is saved is the design the file holds, `done`'s, not this + /// one's: a change made here while the save was written is not in the file, so it stays + /// unsaved (#6003). pub fn adopt_save(&mut self, done: &Session) { if done.doc.name != self.doc.name { let (from, to) = (self.doc.name.clone(), done.doc.name.clone()); @@ -481,7 +483,8 @@ impl Session { self.path.clone_from(&done.path); self.disk = done.disk; self.read_only = done.read_only; - self.mark_saved(); + self.saved = done.saved.clone(); + self.saved_visibility = done.saved_visibility.clone(); } /// Another program or computer wrote the design's file since it was opened or last saved: @@ -923,6 +926,33 @@ mod tests { let _ = std::fs::remove_dir_all(&dir); } + /// #6003: a session changed while its save ran on a copy takes up the save's file and name, + /// but only what the file holds counts as saved: the change stays unsaved, and undoing it + /// leaves nothing unsaved again. A hidden body is a change too. + #[test] + fn a_change_made_while_a_copy_saves_stays_unsaved() { + let dir = std::env::temp_dir().join(format!("solidcraft-adopt-changed-{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + let path = dir.join("Bracket.solidcraft"); + for hide in [false, true] { + let mut s = Session::default(); + s.execute("solid.box", &json!({"length": 10, "width": 10, "height": 10, "body_name": "Block"})).unwrap(); + let mut copy = s.scratch(); + copy.execute("file.save_as", &json!({"path": path.to_string_lossy()})).unwrap(); + if hide { + s.execute("browser.visibility", &json!({"items": ["Block"], "visible": false})).unwrap(); + } else { + s.execute("solid.sphere", &json!({"diameter": 4})).unwrap(); + } + s.adopt_save(©); + assert_eq!((s.path.as_deref(), s.doc.name.as_str()), (path.to_str(), "Bracket")); + assert!(s.is_dirty(), "hide {hide}: the change is not in the file"); + s.execute("edit.undo", &json!({})).unwrap(); + assert!(!s.is_dirty(), "hide {hide}: back to what the file holds"); + } + let _ = std::fs::remove_dir_all(&dir); + } + /// #5467: a script, the CLI or the control channel never gets a prompt. A Save over a file /// another program or computer changed since it was opened is refused with an error naming /// `overwrite`, which replaces it; a design opened read-only only saves to another file. diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 02c794eff..7cb238713 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -2320,10 +2320,13 @@ impl SolveApp { } let rx = self.control_rx.take(); for _ in 0..PER_FRAME { - // A file loading, an agent's design change computing, or the agent cursor acting one - // out: commands that change the design wait their turn (the window, inspection and - // screenshots still answer, #1989). - let waits = self.file_load.busy() || self.file_picker.is_some() || self.control_job.is_some() || self.agent.busy(); + // A file loading, a save being written, an agent's design change computing, or the + // agent cursor acting one out: commands that change the design wait their turn (the + // window, inspection and screenshots still answer, #1989). `engine.script` runs + // directly, past `SolveApp::run`'s guard, so without the save here it changed the + // design the save was taken up for (#6003). + let waits = + self.file_load.busy() || self.file_picker.is_some() || self.saving.is_some() || self.control_job.is_some() || self.agent.busy(); // A screenshot waiting for an opened design to be meshed holds what came after it. let shot_waits = open_meshing::active(self) && self.control_held.front().is_some_and(|r| r.method == "ui.screenshot"); // Held requests go first, in order, once nothing makes them wait. diff --git a/crates/ui-egui/src/save_job.rs b/crates/ui-egui/src/save_job.rs index 5b2095a7c..0c5ce06f7 100644 --- a/crates/ui-egui/src/save_job.rs +++ b/crates/ui-egui/src/save_job.rs @@ -107,6 +107,58 @@ mod tests { assert!(h.app.dialog.as_ref().unwrap().error.as_ref().unwrap().contains("file operation")); } + /// #6003: an agent's `engine.script` that arrives while the window's Save is being written + /// waits for the save, as the other design-changing requests do, and runs after it: the + /// file has the design as it was when Save was pressed, and the script's change is left + /// unsaved. Before, the script ran at once, and taking up the save marked its change saved. + #[test] + fn a_script_waits_for_a_save_being_written() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.run("solid.box", json!({"length": 10, "width": 10, "height": 10})).unwrap(); + let path = h.dir.join("Plate.solidcraft"); + // The save, written on a worker, finishes when the test says. + let mut copy = h.app.session.scratch(); + copy.execute("file.save_as", &json!({"path": path.to_string_lossy()})).unwrap(); + let (finish, done) = std::sync::mpsc::channel(); + h.app.saving = Some(super::Saving { command: "file.save_as", done }); + let (tx, rx) = std::sync::mpsc::channel(); + h.app.control_rx = Some(rx); + let (req, reply) = crate::control::ControlRequest::new("engine.script", json!([{"command": "solid.sphere", "params": {"diameter": 4}}])); + tx.send(req).unwrap(); + h.app.drain_control(&h.ctx); + assert!(reply.try_recv().is_err(), "held while the save is written"); + assert_eq!(h.app.session.doc.features.len(), 1); + finish.send((copy, Ok(json!({})))).unwrap(); + super::tick(&mut h.app, false); + assert!(h.app.saving.is_none() && !h.app.session.is_dirty()); + h.app.drain_control(&h.ctx); + assert!(reply.try_recv().is_ok(), "run once the save is taken up"); + assert_eq!(h.app.session.doc.features.len(), 2); + assert!(h.app.session.is_dirty(), "the script's change is not in the file"); + } + + /// #6003: a save is taken up as saved only for the design it wrote. A design changed while + /// the save was being written keeps its file and name from the save, but stays unsaved. + #[test] + fn a_design_changed_during_its_save_stays_unsaved() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.run("solid.box", json!({"length": 10, "width": 10, "height": 10})).unwrap(); + let path = h.dir.join("Plate.solidcraft"); + let mut copy = h.app.session.scratch(); + copy.execute("file.save_as", &json!({"path": path.to_string_lossy()})).unwrap(); + let (finish, done) = std::sync::mpsc::channel(); + h.app.saving = Some(super::Saving { command: "file.save_as", done }); + // A change that reaches the session past the window's guards. + h.app.session.execute("solid.sphere", &json!({"diameter": 4})).unwrap(); + finish.send((copy, Ok(json!({})))).unwrap(); + super::tick(&mut h.app, false); + assert_eq!(h.app.session.path.as_deref(), path.to_str()); + assert_eq!(h.app.session.doc.name, "Plate"); + assert!(h.app.session.is_dirty(), "the sphere is not in the file"); + } + /// #3044: Save writes on a worker while the window keeps drawing; the design waits (commands /// are refused) until the save is taken up, which leaves it saved under its file, in the /// recent files, with the command echoed, as a save run here does. From 5dc95ef7f6a5e3149ace8fdbfc2950daf0c23bdf Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:58:31 +0000 Subject: [PATCH 075/102] Viewport: a frame the GPU has no memory for is drawn smaller, not a crash (#7296) (#7398) * claim: #7296 * Viewport: a frame the GPU has no memory for is drawn smaller, not a crash (#7296) The viewport's offscreen frame, its see-through targets and the cached still picture were created with no error scope, so a texture the card had no video memory for went to wgpu's default handler and closed the app ("wgpu error: Out of Memory" on a GT 740). They are now created under error scopes; a refused frame lowers the renderer's frame budget and is asked for again smaller (less supersampling, or the view's own frame drawn smaller and filtered up), refused OIT targets fall back to sorted see-through surfaces, and the status line says once that the view is drawn at a lower quality. Co-Authored-By: Claude Opus 5.5 * Locales: Arabic and Hebrew for the new strings ar and he are complete catalogs on main now (#3458): every new message needs them. The pending-messages test compares right-to-left messages in display order once #7532 lands (#7527). Co-Authored-By: Claude Opus 5.5 * GPU memory test: targets take the OIT flag main added (#7296) The test's two GpuTarget initializers predate the oit field and no longer compiled once the branch met main. Co-Authored-By: Claude Opus 5.5 * Locales: Vietnamese for the new strings Vietnamese became a complete catalog on main (#5823), so every new English message needs it too. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- .../locales/pending/gpu-memory-lowered.json | 23 ++ crates/gpu/src/view.rs | 220 +++++++++++++++--- crates/ui-egui/src/viewport.rs | 10 + 3 files changed, 226 insertions(+), 27 deletions(-) create mode 100644 assets/locales/pending/gpu-memory-lowered.json diff --git a/assets/locales/pending/gpu-memory-lowered.json b/assets/locales/pending/gpu-memory-lowered.json new file mode 100644 index 000000000..1c445c660 --- /dev/null +++ b/assets/locales/pending/gpu-memory-lowered.json @@ -0,0 +1,23 @@ +{ + "en": { + "ui.gpu_memory_lowered": "The graphics card is out of memory: the view is drawn at a lower quality." + }, + "ar": { + "ui.gpu_memory_lowered": "نفدت ذاكرة بطاقة الرسومات: يُرسم العرض بجودة أقل." + }, + "de": { + "ui.gpu_memory_lowered": "Die Grafikkarte hat keinen Speicher mehr frei: Die Ansicht wird in geringerer Qualität gezeichnet." + }, + "he": { + "ui.gpu_memory_lowered": "הזיכרון של כרטיס המסך אזל: התצוגה מוצגת באיכות נמוכה יותר." + }, + "ja": { + "ui.gpu_memory_lowered": "グラフィックカードのメモリが不足しています。ビューは低い画質で描画されます。" + }, + "vi": { + "ui.gpu_memory_lowered": "Card đồ họa đã hết bộ nhớ: khung nhìn được vẽ với chất lượng thấp hơn." + }, + "zh": { + "ui.gpu_memory_lowered": "显卡内存不足:视图以较低画质绘制。" + } +} diff --git a/crates/gpu/src/view.rs b/crates/gpu/src/view.rs index 467e1a0c2..2ae93b40f 100644 --- a/crates/gpu/src/view.rs +++ b/crates/gpu/src/view.rs @@ -175,6 +175,9 @@ pub struct DrawStats { pub line_segments: u64, /// The frame was drawn supersampled and filtered down. pub supersampled: bool, + /// The device refused the memory for a frame (#7296): the view is drawn at a lower + /// resolution, or with its see-through surfaces sorted. + pub lowered: bool, } /// What the last scene change uploaded to the GPU, in bytes: what an edit costs beyond the CPU @@ -224,7 +227,13 @@ impl Tally { } fn stats(&self) -> DrawStats { - DrawStats { draw_calls: self.calls.get(), triangles: self.triangles.get(), line_segments: self.segments.get(), supersampled: false } + DrawStats { + draw_calls: self.calls.get(), + triangles: self.triangles.get(), + line_segments: self.segments.get(), + supersampled: false, + lowered: false, + } } } @@ -2033,6 +2042,13 @@ pub struct Renderer { /// The filtered picture at the viewport's own size, made on the first still frame and blitted /// as it is until the content changes: a still view does not pay for the filter every frame. cached: Option, + /// The device refused the cached picture's texture: still frames are filtered every time. + no_cache: bool, + /// Most memory (bytes) an offscreen frame may take ([`frame_bytes`]): [`SS_BUDGET`], halved + /// below each frame the device refused (out of video memory, #7296). + frame_budget: u64, + /// The device refused memory for a frame or its see-through targets ([`DrawStats::lowered`]). + lowered: bool, /// Reversed depth drawn into the window's pass: egui clears its depth to 1, which is the near /// plane then, so the viewport first sets its rectangle to the far plane (0). depth_reset: Option, @@ -2078,11 +2094,23 @@ struct CachedPicture { /// Most memory (bytes) a supersampled frame's colour and depth may take. const SS_BUDGET: u64 = 384 << 20; +/// The least [`Renderer::frame_budget`] falls to after refused frames: about 256 × 256 pixels at +/// 4× MSAA. +const MIN_FRAME_BUDGET: u64 = 2 << 20; + +/// How many smaller frames one frame asks for after the device refuses one. +const FRAME_TRIES: usize = 8; + /// The size (px) to draw a `size` viewport supersampled `factor` times in each direction: /// within the device's largest texture side (#869) and the memory budget (at `samples` per pixel, /// four bytes of colour and four of depth each). `None` when that leaves under 1.25×: the frame /// is drawn as usual. A `factor` under 1 draws it that much smaller, to be filtered up. pub fn supersampled_size(size: [f32; 2], factor: f32, max_side: u32, samples: u32) -> Option<[u32; 2]> { + supersampled_within(size, factor, max_side, samples, SS_BUDGET) +} + +/// [`supersampled_size`] within `budget` bytes instead of [`SS_BUDGET`]. +fn supersampled_within(size: [f32; 2], factor: f32, max_side: u32, samples: u32, budget: u64) -> Option<[u32; 2]> { let [w, h] = size; if w >= 1.0 && h >= 1.0 && factor > 0.0 && factor < 1.0 { return Some([((w * factor).floor() as u32).clamp(1, max_side.max(1)), ((h * factor).floor() as u32).clamp(1, max_side.max(1))]); @@ -2092,11 +2120,45 @@ pub fn supersampled_size(size: [f32; 2], factor: f32, max_side: u32, samples: u3 } let side = max_side as f32; let bytes_per_px = 8.0 * samples.max(1) as f32; - let by_memory = (SS_BUDGET as f32 / (w * h * bytes_per_px)).sqrt(); + let by_memory = (budget as f32 / (w * h * bytes_per_px)).sqrt(); let f = factor.min(side / w).min(side / h).min(by_memory); (f >= 1.25).then(|| [((w * f).floor() as u32).clamp(1, max_side), ((h * f).floor() as u32).clamp(1, max_side)]) } +/// The memory (bytes) a frame of `size` pixels at `samples` per pixel takes by the measure of +/// the budgets: four bytes of colour and four of depth per sample. +fn frame_bytes(size: [u32; 2], samples: u32) -> u64 { + u64::from(size[0]) * u64::from(size[1]) * 8 * u64::from(samples.max(1)) +} + +/// `size` made smaller, keeping its shape, until its frame ([`frame_bytes`]) fits `budget`: a +/// device that refused a frame of the viewport's own size draws it smaller, filtered up (#7296). +/// At least 1 × 1. +fn fitted_size(size: [u32; 2], samples: u32, budget: u64) -> [u32; 2] { + let bytes = frame_bytes(size, samples); + if bytes <= budget { + return size; + } + let f = (budget as f64 / bytes as f64).sqrt(); + size.map(|side| ((f64::from(side) * f).floor() as u32).max(1)) +} + +/// `make`'s value, or the error the device raised while it ran. A texture the device has no +/// memory for (#7296) would otherwise reach the uncaptured-error handler (a panic by default) +/// and be drawn into, invalid, every frame. A browser answers later and is not waited for (no +/// error is assumed). +fn allocated(device: &wgpu::Device, make: impl FnOnce() -> T) -> Result { + let scopes = [wgpu::ErrorFilter::OutOfMemory, wgpu::ErrorFilter::Internal, wgpu::ErrorFilter::Validation].map(|f| device.push_error_scope(f)); + let value = make(); + let mut failed = None; + for scope in scopes.into_iter().rev() { + if let Some(e) = crate::popped(scope.pop()) { + failed.get_or_insert(e); + } + } + failed.map_or(Ok(value), Err) +} + /// The filter: each viewport pixel the mean of the supersampled pixels under it (four bilinear /// taps a quarter of its footprint from its centre: exactly the 2 × 2 box at 2×). const SS_SHADER: &str = r#" @@ -2805,6 +2867,9 @@ impl Renderer { ss_stats: DrawStats::default(), ss_key: None, cached: None, + no_cache: false, + frame_budget: SS_BUDGET, + lowered: false, image: image.join(), image_bgl, sampler, @@ -3285,6 +3350,12 @@ impl Renderer { self.publish(DrawStats { draw_calls: self.ss_stats.draw_calls + 1, supersampled: self.ss_scaled, ..self.ss_stats }); return; } + // The pipelines draw into the scene's kind of target, not the window's pass: with no + // offscreen frame (the device had no memory for one, #7296) nothing can be drawn. + if self.window_differs() { + self.publish(DrawStats::default()); + return; + } let tally = Tally::default(); if let Some(reset) = &self.depth_reset { pass.set_pipeline(reset); @@ -3307,7 +3378,7 @@ impl Renderer { fn publish(&self, drawn: DrawStats) { if let Ok(mut s) = self.stats.lock() { - *s = drawn; + *s = DrawStats { lowered: self.lowered, ..drawn }; } } @@ -3631,21 +3702,32 @@ impl Renderer { fn cache_picture(&mut self, device: &wgpu::Device, encoder: &mut wgpu::CommandEncoder, size_px: [f32; 2]) { let Some(ss) = &self.ss else { return }; let [w, h] = size_px; - if !(w >= 1.0 && h >= 1.0) { + if !(w >= 1.0 && h >= 1.0) || self.no_cache { return; } let max = self.max_texture.max(1); let size = [(w.round() as u32).clamp(1, max), (h.round() as u32).clamp(1, max)]; - let texture = device.create_texture(&wgpu::TextureDescriptor { - label: Some("sc_ssaa_cached"), - size: wgpu::Extent3d { width: size[0], height: size[1], depth_or_array_layers: 1 }, - mip_level_count: 1, - sample_count: 1, - dimension: wgpu::TextureDimension::D2, - format: self.target.format, - usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::TEXTURE_BINDING, - view_formats: &[], + let made = allocated(device, || { + device.create_texture(&wgpu::TextureDescriptor { + label: Some("sc_ssaa_cached"), + size: wgpu::Extent3d { width: size[0], height: size[1], depth_or_array_layers: 1 }, + mip_level_count: 1, + sample_count: 1, + dimension: wgpu::TextureDimension::D2, + format: self.target.format, + usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::TEXTURE_BINDING, + view_formats: &[], + }) }); + let texture = match made { + Ok(texture) => texture, + Err(e) => { + log::warn!("still frames are filtered every time: the GPU refused a {} × {} picture: {e}", size[0], size[1]); + self.no_cache = true; + self.lowered = true; + return; + } + }; let view = texture.create_view(&Default::default()); let bind = device.create_bind_group(&wgpu::BindGroupDescriptor { label: Some("sc_ssaa_cached"), @@ -3683,27 +3765,66 @@ impl Renderer { fn supersample(&mut self, device: &wgpu::Device, encoder: &mut wgpu::CommandEncoder, cb: &Frame, see_through: bool) -> bool { // Supersampled when asked (and worth it); else, for order-independent transparency, at // the viewport's own size. + let max = self.max_texture.max(1); let own = || { let [w, h] = cb.size_px; - (w >= 1.0 && h >= 1.0) - .then(|| [(w.round() as u32).clamp(1, self.max_texture.max(1)), (h.round() as u32).clamp(1, self.max_texture.max(1))]) + (w >= 1.0 && h >= 1.0).then(|| [(w.round() as u32).clamp(1, max), (h.round() as u32).clamp(1, max)]) }; - let scaled = if cb.ssaa != 1.0 { supersampled_size(cb.size_px, cb.ssaa, self.max_texture, self.target.samples) } else { None }; // See-through surfaces (order-independent transparency) and a window pass of another kind // (samples, depth) need a frame of their own, even at the viewport's own size. - let Some(size) = scaled.or_else(|| if see_through || self.window_differs() { own() } else { None }) else { + let needs_own = see_through || self.window_differs(); + let samples = self.target.samples; + let mut drawn = None; + for _ in 0..FRAME_TRIES { + let budget = self.frame_budget; + let scaled = if cb.ssaa != 1.0 { supersampled_within(cb.size_px, cb.ssaa, self.max_texture, samples, budget) } else { None }; + // After refused frames, one of the viewport's own size may not fit either: it is drawn + // smaller and filtered up. + let frame = scaled.map(|s| (s, true)).or_else(|| { + needs_own.then(own).flatten().map(|s| { + let fitted = fitted_size(s, samples, budget); + (fitted, fitted != s) + }) + }); + let Some((size, filtered)) = frame else { + self.ss = None; + return false; + }; + if self.ss.as_ref().is_some_and(|ss| ss.size == size) { + drawn = Some((size, filtered)); + break; + } + // The old frame goes before the new one is asked for. self.ss = None; - return false; - }; - self.ss_scaled = scaled.is_some(); - if self.ss.as_ref().is_none_or(|ss| ss.size != size) { - self.ss = Some(self.supersampled(device, size)); + match allocated(device, || self.supersampled(device, size)) { + Ok(ss) => { + self.ss = Some(ss); + drawn = Some((size, filtered)); + break; + } + Err(e) => { + let before = self.frame_budget; + self.refused(size, &e); + // Already at the least budget: no smaller frame to ask for. + if self.frame_budget == before { + break; + } + } + } } - if see_through - && let Some(p) = &self.oit - && self.oit_targets.as_ref().is_none_or(|t| t.size != size) - { - self.oit_targets = Some(p.targets(device, size, self.target.samples)); + let Some((size, filtered)) = drawn else { return false }; + self.ss_scaled = filtered; + if see_through && self.oit_targets.as_ref().is_none_or(|t| t.size != size) { + self.oit_targets = None; + match self.oit.as_ref().map(|p| allocated(device, || p.targets(device, size, samples))) { + Some(Ok(targets)) => self.oit_targets = Some(targets), + Some(Err(e)) => { + log::warn!("see-through surfaces are sorted: the GPU refused their {} × {} targets: {e}", size[0], size[1]); + self.oit = None; + self.lowered = true; + } + None => {} + } } let Some(ss) = &self.ss else { return false }; let depth_format = self.target.depth; @@ -3758,6 +3879,14 @@ impl Renderer { true } + /// The device refused a frame of `size` pixels (out of video memory, #7296): the next one + /// asked for takes at most half its memory. + fn refused(&mut self, size: [u32; 2], e: &wgpu::Error) { + self.frame_budget = (self.frame_budget.min(frame_bytes(size, self.target.samples)) / 2).max(MIN_FRAME_BUDGET); + self.lowered = true; + log::warn!("the view is drawn at a lower resolution: the GPU refused a {} × {} frame: {e}", size[0], size[1]); + } + /// Textures for a supersampled frame of `size` pixels. fn supersampled(&self, device: &wgpu::Device, size: [u32; 2]) -> Supersampled { let t = self.target; @@ -4574,6 +4703,43 @@ mod glass_tests { assert!(max <= 1, "the blitted picture matches the direct one (max difference {max})"); } + /// A GT 740 had no video memory left for the viewport's frame, and the app closed with "wgpu + /// error: Out of Memory" (#7296). A frame the device refuses is drawn smaller instead, and the + /// device's refusals are reported. A texture past the device's largest side stands in for + /// one past its memory: the renderer is told the device takes larger textures than it does, + /// and the device refuses them the same way. An error that escaped would panic here (the + /// test device keeps wgpu's default handler). + #[test] + fn a_frame_the_device_refuses_is_drawn_smaller() { + let Some((_, device, queue)) = crate::open_headless().ok() else { return }; + let depth = crate::depth_format(&device, true); + let format = wgpu::TextureFormat::Rgba8Unorm; + let scene_target = GpuTarget { format, depth: Some(depth), samples: 1, tess: false, oit: false }; + let window_target = GpuTarget { format, depth: None, samples: 1, tess: false, oit: false }; + let limit = device.limits().max_texture_dimension_2d; + let red = |pixels: &[u8]| pixels.get((32 * 64 + 32) * 4..(32 * 64 + 32) * 4 + 4).is_some_and(|p| p[0] > 200 && p[1] < 60 && p[2] < 60); + // Supersampled 4× (a wide, flat viewport) and at the viewport's own size: each frame is + // refused at first, so drawn smaller, and the view still shows the model. + for (width, ssaa) in [(limit / 2 + 64, 4.0), (limit * 2, 1.0)] { + let mut r = Renderer::with_window_target(&device, scene_target, window_target, None); + r.max_texture = limit.saturating_mul(4); + let mut frame = test_frame(test_scene(), ssaa); + frame.size_px = [width as f32, 64.0]; + let shown = render_frame(&mut r, &device, &queue, &frame, false); + let size = r.ss.as_ref().map(|ss| ss.size); + assert!(r.ss_ready && size.is_some_and(|[w, _]| w <= limit), "{width} px at {ssaa}×: drawn within the device ({size:?})"); + assert!(red(&shown), "{width} px at {ssaa}×: the view shows the model"); + let stats = r.stats().lock().map(|s| *s).unwrap_or_default(); + assert!(stats.lowered, "{width} px at {ssaa}×: the lower quality is reported"); + // The next frame asks for no more than the device gave. + let budget = r.frame_budget; + frame.view_proj[3][0] += 0.01; + assert!( + red(&render_frame(&mut r, &device, &queue, &frame, false)) && r.frame_budget == budget && r.ss.as_ref().map(|ss| ss.size) == size + ); + } + } + /// The Render workspace's preview once painted the modelling viewport's last frame instead of /// its own (#5119): after a frame with see-through surfaces, drawn offscreen for /// order-independent transparency, it stayed frozen on that frame whatever the camera did. diff --git a/crates/ui-egui/src/viewport.rs b/crates/ui-egui/src/viewport.rs index 49ab68431..e3de2e971 100644 --- a/crates/ui-egui/src/viewport.rs +++ b/crates/ui-egui/src/viewport.rs @@ -118,6 +118,10 @@ pub struct ViewportState { pub(crate) tess_ready: Option, /// What the GPU drew last frame, shared with the renderer (the frame-rate details, #2548). pub(crate) draw_stats: Option, + /// The status line has said the view is drawn at a lower quality ([`DrawStats::lowered`]). + /// + /// [`DrawStats::lowered`]: crate::gpu::DrawStats::lowered + lowered_noted: bool, /// The graphics backend and adapter, as the frame-rate details show them. pub(crate) adapter: String, slot: SceneSlot, @@ -3933,6 +3937,12 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) { }, }); painter.add(egui_wgpu::Callback::new_paint_callback(rect, cb)); + // The graphics card had no memory for the view's frame (#7296): say once why it looks + // coarser. + if !app.viewport.lowered_noted && app.viewport.draw_stats.as_ref().is_some_and(|s| s.lock().is_ok_and(|s| s.lowered)) { + app.viewport.lowered_noted = true; + app.set_status(app.tr("ui.gpu_memory_lowered"), false); + } } let overlay_rect = crate::shell::bottom_overlay_rect(app, rect); analysis_legend(app, &painter, overlay_rect); From c8c5c882de253bddb25401fa14f292fc8bee3e1b Mon Sep 17 00:00:00 2001 From: Erlis Vidal Date: Tue, 27 Oct 2026 19:02:09 +0000 Subject: [PATCH 076/102] Sketch: name = value in a drawing tool's value box defines the parameter (#7567) (#7660) * claim: #7567 * Sketch: a drawing tool's value box takes `name = value` (#7567) While drawing, a value box (circle diameter, line length, rectangle width and height, slot, arc, polygon) now accepts `name = expression` and `#name = expression`, as the Dimension tool already does: the shape is drawn at the expression's size and its dimension defines and uses the user parameter `name`, in one undo step. - sketch.draw.dimensioned checks a definition's right-hand side, read as the new parameter will hold it (a bare number in the design's unit), and passes the text on to sketch.dimension; the reply lists `defined`. - The value boxes size the preview and validate by the right-hand side, refuse a definition in a box that is not a dimension (polygon sides, rounded rectangle corner radius, conic rho), and the status line names the parameters defined. - Guides: parameters and sketching. Fixes #7567 Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/engine/src/cmd/sketch.rs | 2 +- crates/engine/src/cmd/sketch_dimensioned.rs | 18 ++++- .../src/cmd/sketch_dimensioned_tests.rs | 78 +++++++++++++++++++ crates/ui-egui/src/sketch_dims.rs | 36 ++++++--- crates/ui-egui/src/sketch_dims_tests.rs | 63 +++++++++++++++ crates/ui-egui/src/tools.rs | 7 ++ docs/book/src/guide/parameters.md | 4 +- docs/book/src/guide/sketching.md | 8 ++ 8 files changed, 203 insertions(+), 13 deletions(-) diff --git a/crates/engine/src/cmd/sketch.rs b/crates/engine/src/cmd/sketch.rs index 3e6bfbb1e..7f0691b38 100644 --- a/crates/engine/src/cmd/sketch.rs +++ b/crates/engine/src/cmd/sketch.rs @@ -51,7 +51,7 @@ pub static COMMANDS: &[CommandSpec] = &[ .params(concat!("points: [[x,y] | \"l1.end\" | {at, ref}…] (x and y each a number or an expression over the design's parameters, \"W / 2\": such a point is fixed where it comes to and follows the parameters; likewise wherever a point argument also takes a point id), closed?: bool, construction?: bool, ids?: [..], infer?: bool (add horizontal/vertical)", connect_doc!(), created_doc!())), CommandSpec::new("sketch.draw.dimensioned", "Draw Dimensioned Sketch Geometry", draw_dimensioned).icon("dimension") .enabled(in_sketch) - .params(concat!("command: sketch creation command, params: object, dimensions: object of role to numeric or expression value; creates geometry and all driving dimensions atomically in one undo step", created_doc!())), + .params(concat!("command: sketch creation command, params: object, dimensions: object of role to numeric or expression value, or `name = expression` (also `#name = expression`), which defines the user parameter `name` as sketch.dimension does (the reply's `defined` lists the names); creates geometry and all driving dimensions atomically in one undo step", created_doc!())), CommandSpec::new("sketch.rectangle.two_point", "2-Point Rectangle", rect_two_point) .at("SKETCH", "CREATE") .icon("rect") diff --git a/crates/engine/src/cmd/sketch_dimensioned.rs b/crates/engine/src/cmd/sketch_dimensioned.rs index 9c828984f..3d563b37b 100644 --- a/crates/engine/src/cmd/sketch_dimensioned.rs +++ b/crates/engine/src/cmd/sketch_dimensioned.rs @@ -1,6 +1,6 @@ //! Shape creation and its typed driving dimensions form one command and one undo step. use serde_json::{Value, json}; -use solidcraft_doc::expr::Kind; +use solidcraft_doc::expr::{Kind, definition}; use crate::{ Result, Session, @@ -38,7 +38,14 @@ pub(super) fn draw(s: &mut Session, p: &Value) -> Result { .filter(|e| e.len() <= 4096) .ok_or_else(|| bad(cmd, "dimension values must be bounded expressions or finite numbers"))?; let kind = if role == "angle" || role == "sweep" { Kind::Angle } else { Kind::Length }; - let evaluated = s.doc.eval(&e, kind)?; + // `name = expression` is checked by its right-hand side, read as the user parameter + // `sketch.dimension` defines will hold it (a bare number in the design's unit) (#7567). + let rhs = match definition(&e) { + Some((name, "")) => return Err(bad(cmd, format!("{role}: `{name} =` needs a value after the `=`"))), + Some((_, rhs)) => rhs, + None => e.as_str(), + }; + let evaluated = s.doc.eval(&s.doc.with_design_unit(rhs, kind), kind)?; if role == "length" { overall_length = Some(evaluated); } @@ -85,6 +92,7 @@ pub(super) fn draw(s: &mut Session, p: &Value) -> Result { curves.get(index).filter(|v| v.is_string()).cloned().ok_or_else(|| bad(cmd, "creator did not return the expected curve")) }; let mut added = serde_json::Map::new(); + let mut defined = Vec::new(); for (role, value) in dimensions { let (entities, ty) = match (create, role.as_str()) { ("sketch.line" | "sketch.line.midpoint", "length") => (vec![curve(0)?], "length"), @@ -120,12 +128,18 @@ pub(super) fn draw(s: &mut Session, p: &Value) -> Result { dimension["sketch"] = sketch.clone(); } let result = scratch.execute("sketch.dimension", &dimension)?; + if let Some(name) = result.get("defined").filter(|v| v.is_string()) { + defined.push(name.clone()); + } added.insert(role.clone(), result); } // Session::execute records the wrapper's before snapshot. Nested history must not leak. scratch.undo.clear(); s.accept_computed(scratch); out["dimensions"] = Value::Object(added); + if !defined.is_empty() { + out["defined"] = Value::Array(defined); + } Ok(out) } diff --git a/crates/engine/src/cmd/sketch_dimensioned_tests.rs b/crates/engine/src/cmd/sketch_dimensioned_tests.rs index 3ff5e84a8..a3728e9bd 100644 --- a/crates/engine/src/cmd/sketch_dimensioned_tests.rs +++ b/crates/engine/src/cmd/sketch_dimensioned_tests.rs @@ -227,3 +227,81 @@ fn dimensioned_authoring_uses_selected_occurrence_and_keeps_local_geometry() { close(sk.points[a].pos.x, 0.0); close(sk.points[b].pos.x, 5.0 / std::f64::consts::SQRT_2); } + +/// The expression of the parameter driving the first dimension `kind` matches. +fn driving(s: &Session, kind: fn(&ConstraintKind) -> bool) -> String { + let sk = sketch(s); + let c = sk.constraints.iter().find(|c| kind(&c.kind)).unwrap(); + s.doc.param(c.param.as_deref().unwrap()).unwrap().expr.clone() +} + +/// A typed box value `name = expression` defines the user parameter `name`, which drives the +/// dimension, as the Dimension tool's value does (#7567). +#[test] +fn a_typed_definition_defines_the_parameter_that_drives_the_dimension() { + let is_diameter = |k: &ConstraintKind| matches!(k, ConstraintKind::Diameter { .. }); + let mut s = session(); + let undo = s.undo.len(); + let out = draw(&mut s, "sketch.circle.center", json!({"center":[0,0],"radius":3}), json!({"diameter":"width = 20"})); + assert_eq!(s.undo.len(), undo + 1); + assert_eq!(out["defined"], json!(["width"]), "{out}"); + close(measure(&s, is_diameter), 20.0); + let width = s.doc.param("width").unwrap(); + assert_eq!((width.expr.as_str(), width.unit.as_str(), width.model), ("20", "mm", false)); + assert_eq!(driving(&s, is_diameter), "width"); + run(&mut s, "edit.undo", json!({})); + assert!(sketch(&s).curves.is_empty() && s.doc.param("width").is_none()); + + // A bare number is in the design's unit, in the size checks too. + let mut s = session(); + run(&mut s, "document.units", json!({"units":"in"})); + draw(&mut s, "sketch.circle.center", json!({"center":[0,0],"radius":3}), json!({"diameter":"#w = 2"})); + close(measure(&s, is_diameter), 50.8); + assert_eq!(s.doc.param("w").unwrap().unit, "in"); + let mut s = session(); + run(&mut s, "document.units", json!({"units":"in"})); + let slot = json!({"p0":[0,0],"p1":[60,0],"width":10,"connect":false}); + draw(&mut s, "sketch.slot.overall", slot.clone(), json!({"length":"len = 2","width":"0.5"})); + close(measure(&s, |k| matches!(k, ConstraintKind::SlotOverallLength { .. })), 50.8); + + // Both boxes of a rectangle may define a name. + let mut s = session(); + let out = draw(&mut s, "sketch.rectangle.two_point", json!({"p0":[0,0],"p1":[5,5]}), json!({"width":"w = 30","height":"h=10"})); + assert_eq!(out["defined"], json!(["h", "w"]), "{out}"); + let is_length = |k: &ConstraintKind| matches!(k, ConstraintKind::Length { .. }); + let sk = sketch(&s); + let mut lengths: Vec<_> = + sk.constraints.iter().filter(|c| is_length(&c.kind)).map(|c| solidcraft_sketch::measure_dimension(&sk, &c.kind).unwrap()).collect(); + lengths.sort_by(f64::total_cmp); + assert_eq!(lengths.len(), 2); + close(lengths[0], 10.0); + close(lengths[1], 30.0); +} + +#[test] +fn a_refused_typed_definition_changes_nothing() { + let mut s = session(); + run(&mut s, "parameters.add", json!({"name":"taken","expression":"5","unit":"mm"})); + let circle = |value: &str| json!({"command":"sketch.circle.center","params":{"center":[0,0],"radius":3},"dimensions":{"diameter":value}}); + let rect = + |w: &str, h: &str| json!({"command":"sketch.rectangle.two_point","params":{"p0":[0,0],"p1":[5,5]},"dimensions":{"width":w,"height":h}}); + for (params, says) in [ + (circle("taken = 20"), "already a parameter"), + (circle("w ="), "needs a value"), + (circle("2 = 3"), ""), + (circle("w == 3"), ""), + (circle("w = -4"), "invalid diameter"), + (circle(&format!("w = {}", "1".repeat(4096))), "bounded"), + // The same name twice: the second box finds it taken. + (rect("w = 30", "w = 10"), "already a parameter"), + // A box's value can't use a name the other box defines: neither exists yet. + (rect("w = 30", "h = w / 2"), ""), + ] { + let snapshot = serde_json::to_value(&*s.doc).unwrap(); + let undo = s.undo.len(); + let error = s.execute("sketch.draw.dimensioned", ¶ms).expect_err(¶ms.to_string()).to_string(); + assert!(error.contains(says), "{params}: {error}"); + assert_eq!(serde_json::to_value(&*s.doc).unwrap(), snapshot, "{params}"); + assert_eq!(s.undo.len(), undo); + } +} diff --git a/crates/ui-egui/src/sketch_dims.rs b/crates/ui-egui/src/sketch_dims.rs index 756feb83e..e26abefe7 100644 --- a/crates/ui-egui/src/sketch_dims.rs +++ b/crates/ui-egui/src/sketch_dims.rs @@ -2,12 +2,14 @@ //! boxes (line length and angle, rectangle width and height, circle diameter…) sit next to the //! segment they measure and follow the cursor. Typing goes straight into the first box and //! locks that value; Tab moves to the next box; Enter places the shape with the typed values, -//! which become dimension constraints. Values are expressions ("25", "1 in", "d1 * 2"). +//! which become dimension constraints. Values are expressions ("25", "1 in", "d1 * 2"), or +//! `name = expression`, which also defines the user parameter `name` (#7567). use crate::ui_kit::{Container, Surface}; use egui::{Pos2, vec2}; use serde_json::{Value, json}; -use solidcraft_engine::doc::expr::Kind as ValueKind; +use solidcraft_engine::doc::Document; +use solidcraft_engine::doc::expr::{Kind as ValueKind, definition}; use solidcraft_engine::geom::Vec2; use crate::SolveApp; @@ -57,7 +59,19 @@ pub fn boxes_for(cmd: &str, n: usize) -> Vec { /// A locked box's value (mm or radians). fn locked(app: &SolveApp, t: &Tool, label: &str) -> Option { let b = t.dims.iter().chain(&t.dim_history).find(|b| b.label == label && b.locked)?; - crate::length_input::eval(&app.session.doc, &b.value, b.kind).ok().filter(|v| v.is_finite()) + eval(&app.session.doc, &b.value, b.kind).ok().filter(|v| v.is_finite()) +} + +/// A box value's size. `name = expression` is the right-hand side's: the size the parameter +/// `name` will hold once the shape is placed. +fn eval(doc: &Document, text: &str, kind: ValueKind) -> solidcraft_engine::doc::Result { + crate::length_input::eval(doc, definition(text).map_or(text, |(_, rhs)| rhs), kind) +} + +/// Whether a box becomes one of the shape's dimensions. A rounded rectangle's radius is its own +/// parameter (sent with the shape); sides and rho are counts and shape factors. +fn is_dimension(t: &Tool, label: &str) -> bool { + !matches!(label, "Sides" | "Rho") && !(t.cmd == "sketch.rectangle.rounded" && label == "Radius") } fn dir_or_x(v: Vec2) -> Vec2 { @@ -346,10 +360,7 @@ pub fn dimensions(t: &Tool) -> Value { .dim_history .iter() .chain(&t.dims) - // A rounded rectangle's radius is its own parameter (sent with the shape), not a dimension. - .filter(|dimension| { - dimension.locked && !matches!(dimension.label, "Sides" | "Rho") && !(t.cmd == "sketch.rectangle.rounded" && dimension.label == "Radius") - }) + .filter(|dimension| dimension.locked && is_dimension(t, dimension.label)) .map(|dimension| (dimension.label.to_ascii_lowercase(), json!(dimension.value))) .collect::>(); Value::Object(values) @@ -361,8 +372,15 @@ pub fn validate(app: &SolveApp, t: &Tool) -> Result<(), String> { if dimension.value.len() > 4096 { return Err(format!("{} expression is too long", dimension.label)); } - let value = - crate::length_input::eval(&app.session.doc, &dimension.value, dimension.kind).map_err(|error| format!("{}: {error}", dimension.label))?; + if let Some((name, rhs)) = definition(&dimension.value) { + if !is_dimension(t, dimension.label) { + return Err(format!("{}: only a box that becomes a dimension can define `{name}`; type the value alone", dimension.label)); + } + if rhs.is_empty() { + return Err(format!("{}: `{name} =` needs a value after the `=`", dimension.label)); + } + } + let value = eval(&app.session.doc, &dimension.value, dimension.kind).map_err(|error| format!("{}: {error}", dimension.label))?; if !value.is_finite() || value.abs() > 1e9 { return Err(format!("{} must be finite and within the model's size limits", dimension.label)); } diff --git a/crates/ui-egui/src/sketch_dims_tests.rs b/crates/ui-egui/src/sketch_dims_tests.rs index d57a82f5e..4f4c10ac8 100644 --- a/crates/ui-egui/src/sketch_dims_tests.rs +++ b/crates/ui-egui/src/sketch_dims_tests.rs @@ -454,3 +454,66 @@ fn value_boxes_stay_in_view_and_off_the_cursor() { let tiny = egui::Rect::from_min_size(egui::pos2(0.0, 0.0), egui::vec2(80.0, 30.0)); assert!(tiny.contains_rect(egui::Rect::from_min_size(in_view(egui::pos2(-200.0, -200.0), Some(tiny), Some(egui::pos2(40.0, 15.0))), BOX))); } + +/// `name = expression` in a value box, as in the Dimension tool's: the shape takes the +/// expression's size while it is typed and when placed, and the new parameter `name` drives its +/// dimension (#7567). +#[test] +fn a_box_typed_name_equals_value_defines_the_parameter_driving_the_dimension() { + let mut h = drawing("sketch.circle.center"); + type_value(&mut h, "width=20"); + let tool = h.app.tool.as_ref().unwrap(); + assert_eq!(crate::sketch_dims::locked_value(&h.app, tool, "Diameter"), Some(20.0), "the preview follows the typed size"); + h.step(&json!({"key": "Enter"})).unwrap(); + let state = h.app.session.world_state(); + let sk = &state.sketch(h.app.session.active_sketch.unwrap()).unwrap().sketch; + assert_eq!(sk.curves.len(), 1, "{:?}", h.app.status); + assert!(sk.radius(0).is_some_and(|r| (r - 10.0).abs() < 1e-6), "{:?}", sk.radius(0)); + let width = h.app.session.doc.param("width").expect("the parameter is defined"); + assert_eq!((width.expr.as_str(), width.unit.as_str(), width.model), ("20", "mm", false)); + let dimension = sk.constraints.iter().find_map(|c| c.param.as_deref()).expect("a driving dimension"); + assert_eq!(h.app.session.doc.param(dimension).unwrap().expr, "width"); + assert_eq!(h.app.status.as_ref().map(|(text, _, error)| (text.as_str(), *error)), Some(("Parameter `width` defined", false))); + + // In an inch design the right-hand side is in inches, while typing too. + let mut h = Harness::new(); + h.app.run("document.units", json!({"units":"in"})).unwrap(); + h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); + h.step(&json!({"start":"sketch.rectangle.two_point"})).unwrap(); + h.step(&json!({"click":{"world":[0,0,0]}})).unwrap(); + h.step(&json!({"move":{"world":[25.4,12.7,0]}})).unwrap(); + type_value(&mut h, "#w = 2"); + tab(&mut h, false); + type_value(&mut h, "h = 1"); + let tool = h.app.tool.as_ref().unwrap(); + assert!((crate::sketch_dims::locked_value(&h.app, tool, "Width").unwrap() - 50.8).abs() < 1e-6); + h.step(&json!({"key":"Enter"})).unwrap(); + assert_eq!(h.app.session.doc.param("w").map(|p| p.unit.as_str()), Some("in"), "{:?}", h.app.status); + assert!(h.app.session.doc.param("h").is_some()); + assert_eq!(h.app.status.as_ref().map(|(text, _, _)| text.as_str()), Some("Parameters `h`, `w` defined")); +} + +/// A box that is not a dimension (a polygon's sides, a rounded rectangle's corner radius) has +/// nothing for a parameter to drive: `name = ...` there is refused, not quietly dropped. +#[test] +fn a_definition_in_a_box_that_is_not_a_dimension_is_refused() { + for (command, tabs, text, says) in [ + ("sketch.polygon.inscribed", 1, "n = 6", "Sides: only a box that becomes a dimension can define `n`"), + ("sketch.rectangle.rounded", 2, "r = 2", "Radius: only a box that becomes a dimension can define `r`"), + ("sketch.circle.center", 0, "w =", "Diameter: `w =` needs a value after the `=`"), + ] { + let mut h = drawing(command); + for _ in 0..tabs { + tab(&mut h, false); + } + type_value(&mut h, text); + h.step(&json!({"key": "Enter"})).unwrap(); + let state = h.app.session.world_state(); + let sk = &state.sketch(h.app.session.active_sketch.unwrap()).unwrap().sketch; + assert!(sk.curves.is_empty(), "{command} {text}: placed {:?}", h.app.status); + assert!(h.app.session.doc.params.iter().all(|p| p.model), "{command} {text}: no user parameter"); + let status = h.app.status.as_ref().expect("the refusal is reported"); + assert!(status.2 && status.0.starts_with(says), "{command} {text}: {status:?}"); + assert_eq!(h.app.tool.as_ref().unwrap().pts.len(), 1, "{command} {text}: the first point stays down"); + } +} diff --git a/crates/ui-egui/src/tools.rs b/crates/ui-egui/src/tools.rs index 33d67dea0..9938f7631 100644 --- a/crates/ui-egui/src/tools.rs +++ b/crates/ui-egui/src/tools.rs @@ -508,6 +508,13 @@ pub(crate) fn draw(app: &mut SolveApp, t: &Tool, params: Value) -> Result = result["defined"].as_array().into_iter().flatten().filter_map(Value::as_str).map(|name| format!("`{name}`")).collect(); + match defined.as_slice() { + [] => {} + [name] => app.set_status(format!("Parameter {name} defined"), false), + names => app.set_status(format!("Parameters {} defined", names.join(", ")), false), + } Ok(result) } } diff --git a/docs/book/src/guide/parameters.md b/docs/book/src/guide/parameters.md index e00119a99..1e148b064 100644 --- a/docs/book/src/guide/parameters.md +++ b/docs/book/src/guide/parameters.md @@ -12,7 +12,9 @@ cursor, replacing selected text and keeping what you typed, so typing `10 + ` an `d1` gives `10 + d1`. Add arithmetic such as `/ 2` to build a dependent dimension. Press **Enter** to apply the expression or **Escape** to cancel the edit. When placing a new dimension, `width = 40` (or `#width = 40`) adds the user parameter `width` with that value (a bare number is in the design's units) and -dimensions with it; a name that is already taken is refused. +dimensions with it; a name that is already taken is refused. The value boxes shown while drawing +a shape (a line's length, a rectangle's width and height, a circle's diameter) take the same +form: the shape is drawn at that size, and its dimension uses the new parameter. Add and edit user parameters through the existing **Change Parameters** command. In the MANAGE tab's PARAMETERS section, click **Parameters** to open the user and model diff --git a/docs/book/src/guide/sketching.md b/docs/book/src/guide/sketching.md index 64550f518..e2a2b202c 100644 --- a/docs/book/src/guide/sketching.md +++ b/docs/book/src/guide/sketching.md @@ -44,6 +44,14 @@ drop-down. The button and the family's shortcut start the variant you picked las shortcut such as L can start a Midpoint Line; pick the variant you want from the drop-down to change it ([Keyboard shortcuts](shortcuts.md)). +Once a shape's first point is down, value boxes (a line's length and angle, a rectangle's width +and height, a circle's diameter…) follow the cursor. Typing goes into the first box, Tab moves to +the next and Enter places the shape; each typed value becomes a dimension. A value is an +expression (`25`, `1 in`, `d1 * 2`), or `width = 20` (also `#width = 20`), which also adds the +user parameter `width` and dimensions with it, as when [placing a dimension](parameters.md). A +box that does not become a dimension (a polygon's sides, a rounded rectangle's corner radius) +takes a value only. + The Sketch Palette's **Construction Geometries** option hides construction curves while you work. A hidden construction curve cannot be picked by a click or by a box. Nothing invisible is selectable. The option belongs to one sketch and is saved with the design. Centerlines are From 38820658fa9baedbb93614e5deeb92025849c9e0 Mon Sep 17 00:00:00 2001 From: raykholo Date: Tue, 27 Oct 2026 19:03:10 +0000 Subject: [PATCH 077/102] Body appearance replaces imported STEP face colours (#5769) (#5775) * claim: #5769 * Let body appearances replace imported STEP face colours (#5769) A body appearance assigned in the design now replaces the face colours the body was imported with; face appearances set in the design still win over it. --- crates/doc/src/appearance.rs | 87 ++++++++++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 13 deletions(-) diff --git a/crates/doc/src/appearance.rs b/crates/doc/src/appearance.rs index 756913ad8..03cab9ef1 100644 --- a/crates/doc/src/appearance.rs +++ b/crates/doc/src/appearance.rs @@ -201,20 +201,24 @@ impl Document { /// The faces of a body with appearances of their own: (B-rep face index, look). A later /// assignment to the same face wins. pub fn face_colors(&self, b: &crate::ModelBody) -> Vec<(usize, Look)> { - // Face colours the body was imported with, under the design's own. + // An assigned body appearance replaces imported paint; design face appearances still win. let to8 = |x: f32| (x.clamp(0.0, 1.0) * 255.0).round() as u8; - let mut out: Vec<(usize, Look)> = match b.body.paint() { - Some(p) => p.faces.iter().map(|f| (f.face, Look::custom(f.color.map(to8), f.opacity as f64))).collect(), - // Carried from an earlier version of the body: by face name (worked out only here: - // the viewport asks every body for its face colours on every change). - None => match &b.imported { - Some(imp) => crate::naming::face_names(b) - .iter() - .enumerate() - .filter_map(|(i, n)| imp.faces.get(crate::naming::strip_piece(n)).map(|(c, o)| (i, Look::custom(c.map(to8), *o as f64)))) - .collect(), - None => Vec::new(), - }, + let mut out: Vec<(usize, Look)> = if self.appearances.bodies.contains_key(b.definition_name()) { + Vec::new() + } else { + match b.body.paint() { + Some(p) => p.faces.iter().map(|f| (f.face, Look::custom(f.color.map(to8), f.opacity as f64))).collect(), + // Carried from an earlier version of the body: by face name (worked out only here: + // the viewport asks every body for its face colours on every change). + None => match &b.imported { + Some(imp) => crate::naming::face_names(b) + .iter() + .enumerate() + .filter_map(|(i, n)| imp.faces.get(crate::naming::strip_piece(n)).map(|(c, o)| (i, Look::custom(c.map(to8), *o as f64)))) + .collect(), + None => Vec::new(), + }, + } }; for f in self.appearances.faces.iter().filter(|f| f.body == b.definition_name()) { let (p, look) = (crate::apply_point(&b.source_transform, f.point), f.look.clone()); @@ -339,6 +343,63 @@ mod tests { assert!(!mixed.differs_only_in_appearance(&before), "a material change is not appearance-only"); } + fn imported_box() -> crate::ModelBody { + let body = solidcraft_kernel::box_solid(Vec3::ZERO, Vec3::new(10., 10., 10.)).unwrap(); + let faces = body + .faces(0.01) + .unwrap() + .iter() + .map(|face| solidcraft_kernel::FacePaint { face: face.index, color: [1., 0., 0.], opacity: 0.5 }) + .collect(); + crate::ModelBody::new("Imported".into(), body.with_paint(Some(solidcraft_kernel::Paint { opacity: 1., faces })), 1) + } + + fn check_imported_appearance_precedence(body: &crate::ModelBody) { + let mut doc = Document::default(); + let face_count = body.body.faces(0.01).unwrap().len(); + let imported = doc.face_colors(body); + assert_eq!(imported.len(), face_count); + assert!(imported.iter().all(|(_, look)| *look == Look::custom([255, 0, 0], 0.5))); + + let body_look = Look::custom([0, 0, 255], 0.8); + doc.appearances.bodies.insert(body.definition_name().into(), body_look.clone()); + assert_eq!(doc.model_body_look(body), Some(body_look.clone())); + assert_eq!(doc.model_body_opacity(body), body_look.opacity); + assert!(doc.face_colors(body).is_empty(), "all faces must inherit the assigned body appearance"); + + let face_look = Look::custom([0, 255, 0], 1.); + let name = crate::naming::face_names(body)[0].clone(); + doc.appearances.faces.push(FaceLook { + body: body.definition_name().into(), + point: Vec3::ZERO, + look: face_look.clone(), + name: Some(name), + strict_name: false, + certificate: None, + }); + assert_eq!(doc.face_colors(body), vec![(0, face_look.clone())]); + + doc.appearances.bodies.clear(); + let restored = doc.face_colors(body); + assert_eq!(restored.len(), face_count); + assert!(restored.iter().all(|(face, look)| *look == if *face == 0 { face_look.clone() } else { Look::custom([255, 0, 0], 0.5) })); + } + + #[test] + fn body_appearance_overrides_imported_face_paint() { + check_imported_appearance_precedence(&imported_box()); + } + + #[test] + fn body_appearance_overrides_carried_imported_face_paint() { + let mut body = imported_box(); + body.imported = ImportedLook::of(&body); + body.body = body.body.clone().with_paint(None); + body.source_name = Some(body.name.clone()); + body.name = "Occurrence".into(); + check_imported_appearance_precedence(&body); + } + #[test] fn library_and_materials() { assert_eq!(library("abs - red").map(|l| l.color), Some([196, 40, 40])); From 9030d2ff195dc4e29d01c888d89104710212c750 Mon Sep 17 00:00:00 2001 From: Hainlein4711 Date: Tue, 27 Oct 2026 19:06:07 +0000 Subject: [PATCH 078/102] Ribbon: wrap Japanese button labels across two lines (#7586) (#7669) * claim: #7586 * UI: wrap Japanese ribbon button labels across two lines at CJK script boundaries (Fixes #7586) --- assets/locales/ja.json | 2 +- crates/ui-egui/src/toolbar.rs | 74 +++++++++++++++++++++++++++++++++-- 2 files changed, 72 insertions(+), 4 deletions(-) diff --git a/assets/locales/ja.json b/assets/locales/ja.json index 4eb079ff0..b8413e59d 100644 --- a/assets/locales/ja.json +++ b/assets/locales/ja.json @@ -341,7 +341,7 @@ "Name on import": "インポート名", "Nearest": "最も近い", "New": "新規", - "New Comp.": "新規コンポーネント", + "New Comp.": "新規\nコンポ", "New Sketch": "新規スケッチ", "New rule…": "新規ルール…", "New study": "新規スタディ", diff --git a/crates/ui-egui/src/toolbar.rs b/crates/ui-egui/src/toolbar.rs index 85600c8d9..4cbf16b37 100644 --- a/crates/ui-egui/src/toolbar.rs +++ b/crates/ui-egui/src/toolbar.rs @@ -865,7 +865,52 @@ fn ribbon_button_width(painter: &egui::Painter, label: &str) -> f32 { (widest + BUTTON_LABEL_PADDING).clamp(BUTTON_MIN_WIDTH, BUTTON_MAX_WIDTH) } +#[derive(Clone, Copy, PartialEq, Eq)] +enum CjkScript { + Han, + Hiragana, + Katakana, + Other, +} + +fn cjk_script(c: char) -> CjkScript { + match c { + '\u{3040}'..='\u{309F}' => CjkScript::Hiragana, + '\u{30A0}'..='\u{30FF}' | '\u{31F0}'..='\u{31FF}' | '\u{FF65}'..='\u{FF9F}' => CjkScript::Katakana, + '\u{3400}'..='\u{4DBF}' | '\u{4E00}'..='\u{9FFF}' | '\u{F900}'..='\u{FAFF}' => CjkScript::Han, + _ => CjkScript::Other, + } +} + +/// Whether byte offset `end` sits at a word boundary in a spaceless Japanese ribbon label. +fn cjk_word_break(label: &str, end: usize) -> bool { + let (Some(prev), Some(next)) = (label.get(..end).and_then(|s| s.chars().next_back()), label.get(end..).and_then(|s| s.chars().next())) else { + return false; + }; + let (a, b) = (cjk_script(prev), cjk_script(next)); + if a == CjkScript::Katakana && b == CjkScript::Katakana { + let before = label.get(..end).unwrap_or_default(); + return before.ends_with("サーフェス") || before.ends_with("フラット"); + } + match (a, b) { + (CjkScript::Han, CjkScript::Katakana) + | (CjkScript::Katakana, CjkScript::Han | CjkScript::Hiragana) + | (CjkScript::Hiragana, CjkScript::Han | CjkScript::Katakana) => true, + (CjkScript::Han, CjkScript::Hiragana) => next == 'を', + (CjkScript::Other, CjkScript::Katakana | CjkScript::Hiragana) => prev.is_ascii_alphabetic(), + (CjkScript::Katakana | CjkScript::Hiragana, CjkScript::Other) => next.is_ascii_alphabetic(), + _ => false, + } +} + fn ribbon_label_lines(painter: &egui::Painter, label: &str, width: f32) -> Vec { + if let Some((first, second)) = label.split_once('\n') { + let first = first.trim(); + let second = second.trim(); + if !first.is_empty() && !second.is_empty() { + return vec![first.to_owned(), second.to_owned()]; + } + } let measure = |text: &str| ribbon_label_width(painter, text); let normalized = label.split_whitespace().collect::>().join(" "); let label = normalized.as_str(); @@ -890,9 +935,14 @@ fn ribbon_label_lines(painter: &egui::Painter, label: &str, width: f32) -> Vec 0 && measure(label.get(..next).unwrap_or_default().trim()) > width { break; } @@ -3303,7 +3353,7 @@ mod ribbon_label_tests { assert!( label.char_indices().any(|(at, ch)| { let end = at + ch.len_utf8(); - (ch.is_whitespace() || ch == '/') + (ch.is_whitespace() || ch == '/' || cjk_word_break(label, end)) && label[end..].trim_start().starts_with(next) && (first.ends_with('…') || label[..end].trim() == first) }), @@ -3343,6 +3393,24 @@ mod ribbon_label_tests { let lines = ribbon_button_lines(&painter, "長い日本語のラベル 続き", 50.0); assert_eq!(lines.len(), 2); assert!(lines[0].ends_with('…')); + let ja = crate::i18n::Locale::for_language("ja"); + for (id, expected) in [ + ("sketch.create", vec!["新規", "スケッチ"]), + ("config.table", vec!["構成", "テーブル"]), + ("construct.plane.offset", vec!["オフセット", "平面"]), + ("surface.loft", vec!["サーフェス", "ロフト"]), + ("mesh.convert", vec!["メッシュを", "変換"]), + ("component.create", vec!["新規", "コンポ"]), + ("joint.origin", vec!["ジョイント", "原点"]), + ("joint.drive", vec!["ジョイント", "を駆動"]), + ] { + let command = solidcraft_engine::find_command(id).unwrap(); + let label = ja.label(crate::workspace::ribbon_button_label(command)); + let width = ribbon_button_width(&painter, label) - BUTTON_LABEL_PADDING; + assert_eq!(ribbon_button_lines(&painter, label, width), expected, "{id}"); + } + let comp = solidcraft_engine::find_command("component.create").unwrap(); + assert_eq!(ja.label(comp.label), "新規コンポーネント"); // Hebrew comes in display order (`bidi::visual`): the reader starts at the right end, // so "סקיצה חדשה" (New Sketch, stored as "חדשה סקיצה") puts סקיצה on the first line. let label = crate::bidi::visual("סקיצה חדשה").into_owned(); From 0d18757ed744f7f978d6b14dded3e793bfe6a1d3 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 19:19:10 +0000 Subject: [PATCH 079/102] File dialogs open in the folder used last (#7756) (#7807) * claim: #7756 Co-Authored-By: Claude Opus 5.5 * File dialogs open in the folder used last (#7756) The desktop dialogs never said where to open, and the Linux ones then start in the home folder every time. Open, Insert, attach, Save As and Export now open in the folder of the file last chosen in a dialog, or of the open design when another design becomes the open one, whichever came last. Also fixes #7735. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- apps/solidcraft/src/main.rs | 113 +++++++++++++++++++++++++++++++++--- 1 file changed, 105 insertions(+), 8 deletions(-) diff --git a/apps/solidcraft/src/main.rs b/apps/solidcraft/src/main.rs index ea12cf4b7..74d835da5 100644 --- a/apps/solidcraft/src/main.rs +++ b/apps/solidcraft/src/main.rs @@ -92,6 +92,8 @@ struct App { native_menu: Option, /// A device's own app moving the view (Preferences › Navigation, off by default). nav_bridge: nav_bridge::NavBridge, + /// Where the next file dialog opens: it follows the open design (#7756). + dialog_folder: DialogFolder, } impl eframe::App for App { @@ -147,6 +149,7 @@ impl eframe::App for App { menu.tick(&mut self.solve, ctx); } self.solve.logic(ctx); + self.dialog_folder.design(self.solve.session.path.as_deref()); #[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))] if !self.solve.file_picker_busy() { self.space_mouse.tick(&mut self.solve, ctx); @@ -241,6 +244,60 @@ impl App { } } +/// Where the next file dialog opens (#7756): the folder of the file last chosen in one, or of the +/// design last opened or saved, whichever came last. Linux dialogs otherwise open in the home +/// folder every time; macOS and Windows remember a folder of their own, which this agrees with. +#[derive(Clone, Default)] +struct DialogFolder(std::sync::Arc>); + +#[derive(Default)] +struct DialogFolderState { + folder: Option, + /// The open design's path when last looked at, to notice another design opened or saved. + design: Option, +} + +impl DialogFolder { + /// A file was chosen in a dialog: the next one opens in its folder. + fn chosen(&self, file: &std::path::Path) { + if let (Some(folder), Ok(mut state)) = (file.parent().filter(|f| !f.as_os_str().is_empty()), self.0.lock()) { + state.folder = Some(folder.to_path_buf()); + } + } + + /// The open design's path, every frame: a design opened or saved somewhere else moves the + /// next dialog to its folder; the same design again leaves a folder chosen since alone. + fn design(&self, path: Option<&str>) { + let Ok(mut state) = self.0.lock() else { return }; + if state.design.as_deref() == path { + return; + } + state.design = path.map(str::to_string); + if let Some(folder) = path.and_then(|p| std::path::Path::new(p).parent()).filter(|f| !f.as_os_str().is_empty()) { + state.folder = Some(folder.to_path_buf()); + } + } + + /// A dialog's answer as a path, its folder remembered for the next dialog. + fn answer(&self, picked: Option) -> Option { + let picked = picked?; + self.chosen(picked.path()); + Some(picked.path().to_string_lossy().into_owned()) + } + + fn folder(&self) -> Option { + self.0.lock().ok().and_then(|state| state.folder.clone()) + } + + /// The dialog, opening in the remembered folder when there is one. + fn start(&self, dialog: rfd::AsyncFileDialog) -> rfd::AsyncFileDialog { + match self.folder() { + Some(folder) => dialog.set_directory(folder), + None => dialog, + } + } +} + /// Linux file dialogs match patterns by case, so each extension goes in as lower and upper /// case, plus FreeCAD's own mixed casing. fn case_variants(exts: &[&str]) -> Vec { @@ -290,15 +347,16 @@ fn fullscreen_content_insets(raw: &mut egui::RawInput, title_height: f32, zoom: raw.safe_area_insets = Some(insets); } -fn services(cc: &eframe::CreationContext<'_>) -> Services { +fn services(cc: &eframe::CreationContext<'_>, folder: &DialogFolder) -> Services { let parent = rfd::AsyncFileDialog::new().set_parent(cc); let open_parent = parent.clone(); let program_parent = parent.clone(); let file_parent = parent.clone(); + let (open_folder, file_folder, save_folder) = (folder.clone(), folder.clone(), folder.clone()); Services { pick_open: Some(Box::new(move |first: &[&str]| { // The file type the command reads comes first, so the picker opens on it (#1801). - let mut dialog = open_parent.clone(); + let mut dialog = open_folder.start(open_parent.clone()); if !first.is_empty() { let label = first.iter().map(|e| e.to_uppercase()).collect::>().join(", "); dialog = dialog.add_filter(label, &case_variants(first)); @@ -311,7 +369,8 @@ fn services(cc: &eframe::CreationContext<'_>) -> Services { dialog = dialog.add_filter(label, &case_variants(&exts)); } let future = dialog.add_filter("All files", &["*"]).pick_file(); - Box::pin(async move { future.await.map(|p| p.path().to_string_lossy().into_owned()) }) + let folder = open_folder.clone(); + Box::pin(async move { folder.answer(future.await) }) })), // One kind of file (the agent chat's attachments): only the types it names, as given and in // lower and upper case (Linux dialogs match case; macOS allows just the listed types). @@ -326,8 +385,9 @@ fn services(cc: &eframe::CreationContext<'_>) -> Services { } let all: Vec<&str> = all.iter().map(String::as_str).collect(); // Any other file attaches by reference, so the list is not the only choice. - let future = file_parent.clone().add_filter(label, &all).add_filter("All files", &["*"]).pick_file(); - Box::pin(async move { future.await.map(|p| p.path().to_string_lossy().into_owned()) }) + let future = file_folder.start(file_parent.clone()).add_filter(label, &all).add_filter("All files", &["*"]).pick_file(); + let folder = file_folder.clone(); + Box::pin(async move { folder.answer(future.await) }) })), pick_program: Some(Box::new(move || { let dialog = program_parent.clone().set_title("Choose your slicer"); @@ -336,7 +396,7 @@ fn services(cc: &eframe::CreationContext<'_>) -> Services { Box::pin(async move { future.await.map(|p| p.path().to_string_lossy().into_owned()) }) })), pick_save: Some(Box::new(move |name: &str, exts: &[&str]| { - let dialog = parent.clone().set_file_name(name); + let dialog = save_folder.start(parent.clone()).set_file_name(name); let dialog = if exts == [io::DESIGN_EXT, "json"] { if name.ends_with(".json") { dialog.add_filter("Plain JSON design", &["json"]).add_filter("SolidCraft container", &[io::DESIGN_EXT]) @@ -347,7 +407,8 @@ fn services(cc: &eframe::CreationContext<'_>) -> Services { dialog.add_filter("File", exts) }; let future = dialog.save_file(); - Box::pin(async move { future.await.map(|p| p.path().to_string_lossy().into_owned()) }) + let folder = save_folder.clone(); + Box::pin(async move { folder.answer(future.await) }) })), graphics_adapters: Vec::new(), graphics_path: graphics_path().map(|p| p.to_string_lossy().to_string()), @@ -841,7 +902,8 @@ fn main() -> eframe::Result { solidcraft_ui_egui::fonts::setup_bundled_fonts(&cc.egui_ctx); solidcraft_ui_egui::fonts::load_system_fonts_in_background(&cc.egui_ctx); mark("fonts"); - let mut app = SolveApp::new(Session::default(), services(cc)); + let dialog_folder = DialogFolder::default(); + let mut app = SolveApp::new(Session::default(), services(cc, &dialog_folder)); app.apply_off_thread = Some(solidcraft_ui_egui::dialogs::APPLY_AT_ONCE); app.custom_titlebar = custom_titlebar; #[cfg(target_os = "windows")] @@ -994,6 +1056,7 @@ fn main() -> eframe::Result { #[cfg(target_os = "macos")] native_menu, nav_bridge, + dialog_folder, })) }), ); @@ -1172,6 +1235,40 @@ mod backend_tests { } } +#[cfg(test)] +mod dialog_folder_tests { + use super::DialogFolder; + use std::path::{Path, PathBuf}; + + /// #7756: a file dialog opens where the last one left off, not in the home folder. + #[test] + fn the_next_dialog_opens_in_the_folder_of_the_file_chosen_last() { + let folder = DialogFolder::default(); + assert_eq!(folder.folder(), None, "before any choice the system decides"); + folder.chosen(Path::new("/work/prints/bracket.stl")); + assert_eq!(folder.folder(), Some(PathBuf::from("/work/prints"))); + // A bare file name has no folder to remember. + folder.chosen(Path::new("bracket.step")); + assert_eq!(folder.folder(), Some(PathBuf::from("/work/prints"))); + } + + /// Save As starts beside the open design (#7756), and a folder chosen since wins until another + /// design is opened or saved. + #[test] + fn the_open_design_moves_the_folder_only_when_it_changes() { + let folder = DialogFolder::default(); + folder.design(Some("/work/lid/lid.solidcraft")); + assert_eq!(folder.folder(), Some(PathBuf::from("/work/lid"))); + folder.chosen(Path::new("/exports/lid.3mf")); + folder.design(Some("/work/lid/lid.solidcraft")); + assert_eq!(folder.folder(), Some(PathBuf::from("/exports")), "the same design again leaves the export folder"); + folder.design(None); + assert_eq!(folder.folder(), Some(PathBuf::from("/exports")), "a new, unsaved design has no folder of its own"); + folder.design(Some("/work/base/base.solidcraft")); + assert_eq!(folder.folder(), Some(PathBuf::from("/work/base"))); + } +} + #[cfg(test)] mod viewport_tests { #[cfg(target_os = "macos")] From 295d04932fdd3138689120e391431b9efc5db5f0 Mon Sep 17 00:00:00 2001 From: Nathan Dane Date: Tue, 27 Oct 2026 19:21:09 +0000 Subject: [PATCH 080/102] Render workspace: stage bar, aligned floating docks and the Shots strip host (#6281) (#6296) * claim: #6281 * Render workspace: stage bar, aligned floating docks and the Shots strip host --- .../pending/render-stage-proportions.json | 26 ++ assets/locales/pending/render-stage-ui.json | 426 ++++++++++++++++++ crates/engine/src/cmd/mod.rs | 2 + crates/engine/src/cmd/render_ui.rs | 46 ++ crates/engine/src/cmd/view_navigation.rs | 77 ++++ crates/ui-egui/src/browser.rs | 47 +- crates/ui-egui/src/control.rs | 4 +- crates/ui-egui/src/i18n.rs | 40 ++ crates/ui-egui/src/lib.rs | 30 +- crates/ui-egui/src/prefs.rs | 6 + crates/ui-egui/src/render_ui/mod.rs | 229 ++++++++++ crates/ui-egui/src/render_workspace.rs | 96 +++- .../ui-egui/src/render_workspace_inspector.rs | 47 +- .../src/render_workspace_inspector_tests.rs | 98 +++- crates/ui-egui/src/render_workspace_tests.rs | 415 ++++++++++++++++- crates/ui-egui/src/scenario.rs | 5 + crates/ui-egui/src/shell.rs | 44 +- crates/ui-egui/src/shortcut_box.rs | 3 +- crates/ui-egui/src/theme.rs | 2 +- crates/ui-egui/src/timeline.rs | 4 +- crates/ui-egui/src/toolbar.rs | 153 +++++-- crates/ui-egui/src/toolbar_custom.rs | 55 ++- crates/ui-egui/src/ui_kit/actions.rs | 77 +++- crates/ui-egui/src/ui_kit/choice.rs | 44 +- crates/ui-egui/src/ui_kit/choice_tests.rs | 30 ++ crates/ui-egui/src/ui_kit/container.rs | 26 ++ crates/ui-egui/src/ui_kit/gallery.rs | 9 + crates/ui-egui/src/ui_kit/mod.rs | 4 +- crates/ui-egui/src/ui_kit/panel.rs | 123 +++++ crates/ui-egui/src/ui_kit/stages.rs | 234 ++++++++++ crates/ui-egui/src/viewport.rs | 20 +- crates/ui-egui/src/viewport_layout.rs | 50 +- crates/ui-egui/src/workspace.rs | 123 +++-- .../scenarios/render_workspace_shell.json | 21 + .../tests/scenarios/ribbon_docked.json | 2 +- docs/render-workspace.md | 28 ++ docs/ui-kit.md | 30 ++ 37 files changed, 2467 insertions(+), 209 deletions(-) create mode 100644 assets/locales/pending/render-stage-proportions.json create mode 100644 assets/locales/pending/render-stage-ui.json create mode 100644 crates/engine/src/cmd/render_ui.rs create mode 100644 crates/ui-egui/src/render_ui/mod.rs create mode 100644 crates/ui-egui/src/ui_kit/stages.rs create mode 100644 crates/ui-egui/tests/scenarios/render_workspace_shell.json diff --git a/assets/locales/pending/render-stage-proportions.json b/assets/locales/pending/render-stage-proportions.json new file mode 100644 index 000000000..ce9d7a39d --- /dev/null +++ b/assets/locales/pending/render-stage-proportions.json @@ -0,0 +1,26 @@ +{ + "en": { + "render.stage_preview_note": "Integrated preview · direct light" + }, + "de": { + "render.stage_preview_note": "Integrierte Vorschau · direktes Licht" + }, + "ja": { + "render.stage_preview_note": "統合プレビュー · 直接光" + }, + "zh": { + "render.stage_preview_note": "集成预览 · 直接光照" + }, + "ko": { + "render.stage_preview_note": "통합 미리 보기 · 직접광" + }, + "ar": { + "render.stage_preview_note": "معاينة مدمجة · ضوء مباشر" + }, + "he": { + "render.stage_preview_note": "תצוגה מקדימה משולבת · אור ישיר" + }, + "vi": { + "render.stage_preview_note": "Xem trước tích hợp · ánh sáng trực tiếp" + } +} diff --git a/assets/locales/pending/render-stage-ui.json b/assets/locales/pending/render-stage-ui.json new file mode 100644 index 000000000..a0c355c09 --- /dev/null +++ b/assets/locales/pending/render-stage-ui.json @@ -0,0 +1,426 @@ +{ + "en": { + "Render Stage": "Render Stage", + "cmd.appearance_paint": "Paint Appearance", + "cmd.appearance_pick_up": "Pick Up Appearance", + "cmd.appearance_replace": "Replace Appearance", + "cmd.render_batch": "Render All Shots", + "cmd.render_compare": "Compare Images", + "cmd.render_lights_solo": "Solo Light", + "cmd.view_shots_strip": "Shots Strip", + "render.all_shots_label": "All Shots", + "render.export_image_label": "Export Image", + "render.fixed_camera": "Camera", + "render.fixed_world": "World", + "render.heading_batch": "BATCH", + "render.heading_frame": "FRAME", + "render.heading_lens": "LENS", + "render.heading_results": "RESULTS", + "render.heading_shots": "SHOTS", + "render.hide_shots_label": "Hide Shots strip", + "render.inspector": "Inspector", + "render.light_anchor_pending": "Changing the light coordinate frame is not supported yet.", + "render.lights_fixed_to": "Lights fixed to", + "render.output_tools_inspector": "Edit size and format in the Output inspector.", + "render.paint_label": "Paint", + "render.pick_component": "Component", + "render.pick_label": "Pick", + "render.pick_up_label": "Pick Up", + "render.pick_waiting": "Product picking is not supported yet.", + "render.preview_lighting_help": "The live preview shows direct light only and no shadows.", + "render.regrade_label": "Regrade", + "render.replace_label": "Replace", + "render.save_shot": "Save Shot", + "render.shell_tab_appearance": "RENDER APPEARANCE", + "render.shell_tab_camera": "RENDER CAMERA", + "render.shell_tab_scene": "RENDER SCENE", + "render.show_shots_label": "Show Shots strip", + "render.stage_frame": "Frame", + "render.stage_light": "Light", + "render.stage_look": "Look", + "render.stage_orthographic": "Orthographic", + "render.stage_output": "Output", + "render.strip_label": "Strip", + "render.wait_batch": "not supported yet: the saved-shot render queue", + "render.wait_compare": "not supported yet: retained image comparison", + "render.wait_paint": "not supported yet: product picking and appearance painting", + "render.wait_pick_up": "not supported yet: product picking and appearance sampling", + "render.wait_replace": "not supported yet: replacing all uses of an appearance", + "render.wait_solo": "not supported yet: light visibility and solo controls", + "toolbar.render_lights": "LIGHTS", + "toolbar.render_result": "RESULT", + "toolbar.render_stage": "STAGE", + "toolbar.render_studio": "STUDIO" + }, + "de": { + "Render Stage": "Renderphase", + "cmd.appearance_paint": "Aussehen aufmalen", + "cmd.appearance_pick_up": "Aussehen aufnehmen", + "cmd.appearance_replace": "Erscheinungsbild ersetzen", + "cmd.render_batch": "Alle Aufnahmen rendern", + "cmd.render_compare": "Bilder vergleichen", + "cmd.render_lights_solo": "Licht allein anzeigen", + "cmd.view_shots_strip": "Aufnahmenleiste", + "render.all_shots_label": "Alle Aufnahmen", + "render.export_image_label": "Bild exportieren", + "render.fixed_camera": "Kamera", + "render.fixed_world": "Welt", + "render.heading_batch": "Stapel", + "render.heading_frame": "Bildrahmen", + "render.heading_lens": "Objektiv", + "render.heading_results": "Ergebnisse", + "render.heading_shots": "Aufnahmen", + "render.hide_shots_label": "Aufnahmenleiste ausblenden", + "render.inspector": "Inspektor", + "render.light_anchor_pending": "Das Koordinatensystem der Lichter kann noch nicht geändert werden.", + "render.lights_fixed_to": "Lichter gebunden an", + "render.output_tools_inspector": "Größe und Format im Ausgabe-Inspektor bearbeiten.", + "render.paint_label": "Aufmalen", + "render.pick_component": "Komponente", + "render.pick_label": "Auswahl", + "render.pick_up_label": "Aufnehmen", + "render.pick_waiting": "Die Produktauswahl wird noch nicht unterstützt.", + "render.preview_lighting_help": "Die Live-Vorschau zeigt nur direktes Licht und keine Schatten.", + "render.regrade_label": "Neu abstimmen", + "render.replace_label": "Ersetzen", + "render.save_shot": "Aufnahme speichern", + "render.shell_tab_appearance": "Aussehen", + "render.shell_tab_camera": "Kamera", + "render.shell_tab_scene": "SZENE", + "render.show_shots_label": "Aufnahmenleiste einblenden", + "render.stage_frame": "Bildausschnitt", + "render.stage_light": "Licht", + "render.stage_look": "Aussehen", + "render.stage_orthographic": "Orthografisch", + "render.stage_output": "Ausgabe", + "render.strip_label": "Leiste", + "render.wait_batch": "Noch nicht unterstützt: Renderwarteschlange gespeicherter Aufnahmen", + "render.wait_compare": "Noch nicht unterstützt: Vergleich gespeicherter Bilder", + "render.wait_paint": "Noch nicht unterstützt: Produktauswahl und Auftragen von Erscheinungsbildern", + "render.wait_pick_up": "Noch nicht unterstützt: Produktauswahl und Übernehmen von Erscheinungsbildern", + "render.wait_replace": "Noch nicht unterstützt: Ersetzen aller Verwendungen eines Erscheinungsbilds", + "render.wait_solo": "Noch nicht unterstützt: Lichtsichtbarkeit und Solo-Steuerung", + "toolbar.render_lights": "LICHTER", + "toolbar.render_result": "ERGEBNIS", + "toolbar.render_stage": "BÜHNE", + "toolbar.render_studio": "STUDIO" + }, + "ja": { + "Render Stage": "レンダリング段階", + "cmd.appearance_paint": "外観をペイント", + "cmd.appearance_pick_up": "外観を取得", + "cmd.appearance_replace": "外観を置換", + "cmd.render_batch": "すべてのショットをレンダリング", + "cmd.render_compare": "画像を比較", + "cmd.render_lights_solo": "ライトを単独表示", + "cmd.view_shots_strip": "ショットストリップ", + "render.all_shots_label": "すべてのショット", + "render.export_image_label": "画像を書き出す", + "render.fixed_camera": "カメラ", + "render.fixed_world": "ワールド", + "render.heading_batch": "バッチ", + "render.heading_frame": "フレーム", + "render.heading_lens": "レンズ", + "render.heading_results": "結果", + "render.heading_shots": "ショット", + "render.hide_shots_label": "ショットストリップを非表示", + "render.inspector": "インスペクター", + "render.light_anchor_pending": "ライトの座標系の変更はまだサポートされていません。", + "render.lights_fixed_to": "ライトの固定先", + "render.output_tools_inspector": "サイズと形式は出力インスペクターで編集してください。", + "render.paint_label": "ペイント", + "render.pick_component": "コンポーネント", + "render.pick_label": "選択", + "render.pick_up_label": "取得", + "render.pick_waiting": "製品の選択はまだサポートされていません。", + "render.preview_lighting_help": "ライブプレビューは直接光のみを表示し、影は表示しません。", + "render.regrade_label": "再グレーディング", + "render.replace_label": "置換", + "render.save_shot": "ショットを保存", + "render.shell_tab_appearance": "外観", + "render.shell_tab_camera": "カメラ", + "render.shell_tab_scene": "シーン", + "render.show_shots_label": "ショットストリップを表示", + "render.stage_frame": "構図", + "render.stage_light": "照明", + "render.stage_look": "外観", + "render.stage_orthographic": "平行投影", + "render.stage_output": "出力", + "render.strip_label": "ストリップ", + "render.wait_batch": "未対応: 保存ショットのレンダーキュー", + "render.wait_compare": "未対応: 保持された画像の比較", + "render.wait_paint": "未対応: 製品の選択と外観のペイント", + "render.wait_pick_up": "未対応: 製品の選択と外観の採取", + "render.wait_replace": "未対応: 外観のすべての使用箇所の置換", + "render.wait_solo": "未対応: ライトの表示とソロ操作", + "toolbar.render_lights": "ライト", + "toolbar.render_result": "結果", + "toolbar.render_stage": "ステージ", + "toolbar.render_studio": "スタジオ" + }, + "zh": { + "Render Stage": "渲染阶段", + "cmd.appearance_paint": "涂抹外观", + "cmd.appearance_pick_up": "拾取外观", + "cmd.appearance_replace": "替换外观", + "cmd.render_batch": "渲染所有镜头", + "cmd.render_compare": "比较图像", + "cmd.render_lights_solo": "单独显示灯光", + "cmd.view_shots_strip": "镜头条", + "render.all_shots_label": "所有镜头", + "render.export_image_label": "导出图像", + "render.fixed_camera": "相机", + "render.fixed_world": "世界", + "render.heading_batch": "批量", + "render.heading_frame": "取景框", + "render.heading_lens": "镜头设置", + "render.heading_results": "结果", + "render.heading_shots": "镜头", + "render.hide_shots_label": "隐藏镜头条", + "render.inspector": "检查器", + "render.light_anchor_pending": "暂不支持更改灯光坐标系。", + "render.lights_fixed_to": "灯光固定到", + "render.output_tools_inspector": "请在输出检查器中编辑尺寸和格式。", + "render.paint_label": "涂抹", + "render.pick_component": "组件", + "render.pick_label": "拾取", + "render.pick_up_label": "拾取", + "render.pick_waiting": "暂不支持产品拾取。", + "render.preview_lighting_help": "实时预览仅显示直接光照,不显示阴影。", + "render.regrade_label": "重新调色", + "render.replace_label": "替换", + "render.save_shot": "保存镜头", + "render.shell_tab_appearance": "外观", + "render.shell_tab_camera": "相机", + "render.shell_tab_scene": "场景", + "render.show_shots_label": "显示镜头条", + "render.stage_frame": "构图", + "render.stage_light": "照明", + "render.stage_look": "外观", + "render.stage_orthographic": "正交投影", + "render.stage_output": "输出", + "render.strip_label": "镜头条", + "render.wait_batch": "暂不支持:已保存镜头渲染队列", + "render.wait_compare": "暂不支持:保留图像比较", + "render.wait_paint": "暂不支持:产品拾取和外观涂绘", + "render.wait_pick_up": "暂不支持:产品拾取和外观采样", + "render.wait_replace": "暂不支持:替换外观的所有使用处", + "render.wait_solo": "暂不支持:灯光可见性和独显控制", + "toolbar.render_lights": "灯光", + "toolbar.render_result": "结果", + "toolbar.render_stage": "舞台", + "toolbar.render_studio": "工作室" + }, + "ko": { + "Render Stage": "렌더링 단계", + "cmd.appearance_paint": "모양 칠하기", + "cmd.appearance_pick_up": "모양 가져오기", + "cmd.appearance_replace": "모양 바꾸기", + "cmd.render_batch": "모든 샷 렌더링", + "cmd.render_compare": "이미지 비교", + "cmd.render_lights_solo": "광원 단독 표시", + "cmd.view_shots_strip": "샷 스트립", + "render.all_shots_label": "모든 샷", + "render.export_image_label": "이미지 내보내기", + "render.fixed_camera": "카메라", + "render.fixed_world": "월드", + "render.heading_batch": "일괄 처리", + "render.heading_frame": "프레임", + "render.heading_lens": "렌즈", + "render.heading_results": "결과", + "render.heading_shots": "샷", + "render.hide_shots_label": "샷 스트립 숨기기", + "render.inspector": "속성 검사기", + "render.light_anchor_pending": "조명 좌표계 변경은 아직 지원되지 않습니다.", + "render.lights_fixed_to": "조명 고정 기준", + "render.output_tools_inspector": "출력 검사기에서 크기와 형식을 편집하세요.", + "render.paint_label": "칠하기", + "render.pick_component": "구성요소", + "render.pick_label": "선택", + "render.pick_up_label": "가져오기", + "render.pick_waiting": "제품 선택은 아직 지원되지 않습니다.", + "render.preview_lighting_help": "실시간 미리 보기에는 직접 조명만 표시되며 그림자는 표시되지 않습니다.", + "render.regrade_label": "색상 재조정", + "render.replace_label": "바꾸기", + "render.save_shot": "샷 저장", + "render.shell_tab_appearance": "모양", + "render.shell_tab_camera": "카메라", + "render.shell_tab_scene": "장면", + "render.show_shots_label": "샷 스트립 표시", + "render.stage_frame": "구도", + "render.stage_light": "조명", + "render.stage_look": "외관", + "render.stage_orthographic": "직교 투영", + "render.stage_output": "출력", + "render.strip_label": "스트립", + "render.wait_batch": "아직 지원되지 않음: 저장된 샷 렌더 대기열", + "render.wait_compare": "아직 지원되지 않음: 보관된 이미지 비교", + "render.wait_paint": "아직 지원되지 않음: 제품 선택 및 모양 페인팅", + "render.wait_pick_up": "아직 지원되지 않음: 제품 선택 및 모양 샘플링", + "render.wait_replace": "아직 지원되지 않음: 모양이 사용된 모든 곳 바꾸기", + "render.wait_solo": "아직 지원되지 않음: 조명 표시 및 단독 표시 제어", + "toolbar.render_lights": "조명", + "toolbar.render_result": "결과", + "toolbar.render_stage": "스테이지", + "toolbar.render_studio": "스튜디오" + }, + "ar": { + "Render Stage": "مرحلة التصيير", + "cmd.appearance_paint": "تلوين المظهر", + "cmd.appearance_pick_up": "التقاط المظهر", + "cmd.appearance_replace": "استبدال المظهر", + "cmd.render_batch": "تصيير كل اللقطات", + "cmd.render_compare": "مقارنة الصور", + "cmd.render_lights_solo": "عزل الضوء", + "cmd.view_shots_strip": "شريط اللقطات", + "render.all_shots_label": "كل اللقطات", + "render.export_image_label": "تصدير الصورة", + "render.fixed_camera": "الكاميرا", + "render.fixed_world": "العالم", + "render.heading_batch": "الدفعة", + "render.heading_frame": "الإطار", + "render.heading_lens": "العدسة", + "render.heading_results": "النتائج", + "render.heading_shots": "اللقطات", + "render.hide_shots_label": "إخفاء شريط اللقطات", + "render.inspector": "المفتش", + "render.light_anchor_pending": "تغيير نظام إحداثيات الضوء غير مدعوم بعد.", + "render.lights_fixed_to": "الأضواء مثبّتة على", + "render.output_tools_inspector": "عدّل الحجم والصيغة في مفتش المخرجات.", + "render.paint_label": "تلوين", + "render.pick_component": "مكوّن", + "render.pick_label": "التقاط", + "render.pick_up_label": "التقاط المظهر", + "render.pick_waiting": "اختيار المنتج غير مدعوم بعد.", + "render.preview_lighting_help": "المعاينة الحية تعرض الضوء المباشر فقط وبلا ظلال.", + "render.regrade_label": "إعادة تدرّج", + "render.replace_label": "استبدال", + "render.save_shot": "حفظ اللقطة", + "render.shell_tab_appearance": "مظهر التصيير", + "render.shell_tab_camera": "كاميرا التصيير", + "render.shell_tab_scene": "مشهد التصيير", + "render.show_shots_label": "إظهار شريط اللقطات", + "render.stage_frame": "الإطار", + "render.stage_light": "الضوء", + "render.stage_look": "المظهر", + "render.stage_orthographic": "إسقاط متعامد", + "render.stage_output": "المخرجات", + "render.strip_label": "الشريط", + "render.wait_batch": "غير مدعوم بعد: قائمة تصيير اللقطات المحفوظة", + "render.wait_compare": "غير مدعوم بعد: مقارنة الصور المحتفظ بها", + "render.wait_paint": "غير مدعوم بعد: اختيار المنتج وتلوين المظهر", + "render.wait_pick_up": "غير مدعوم بعد: اختيار المنتج وأخذ عينة من المظهر", + "render.wait_replace": "غير مدعوم بعد: استبدال كل استخدامات المظهر", + "render.wait_solo": "غير مدعوم بعد: ظهور الأضواء وعزلها", + "toolbar.render_lights": "الأضواء", + "toolbar.render_result": "النتيجة", + "toolbar.render_stage": "المرحلة", + "toolbar.render_studio": "الاستوديو" + }, + "he": { + "Render Stage": "שלב הרינדור", + "cmd.appearance_paint": "צביעת מראה", + "cmd.appearance_pick_up": "בחירת מראה", + "cmd.appearance_replace": "החלפת מראה", + "cmd.render_batch": "רינדור כל הצילומים", + "cmd.render_compare": "השוואת תמונות", + "cmd.render_lights_solo": "בידוד אור", + "cmd.view_shots_strip": "סרגל צילומים", + "render.all_shots_label": "כל הצילומים", + "render.export_image_label": "ייצוא תמונה", + "render.fixed_camera": "מצלמה", + "render.fixed_world": "עולם", + "render.heading_batch": "אצווה", + "render.heading_frame": "מסגרת", + "render.heading_lens": "עדשה", + "render.heading_results": "תוצאות", + "render.heading_shots": "צילומים", + "render.hide_shots_label": "הסתר את סרגל הצילומים", + "render.inspector": "מפקח", + "render.light_anchor_pending": "שינוי מערכת הצירים של האור אינו נתמך עדיין.", + "render.lights_fixed_to": "האורות מקובעים אל", + "render.output_tools_inspector": "ערוך גודל ופורמט במפקח הפלט.", + "render.paint_label": "צביעה", + "render.pick_component": "רכיב", + "render.pick_label": "בחירה", + "render.pick_up_label": "בחירת מראה", + "render.pick_waiting": "בחירת מוצר אינה נתמכת עדיין.", + "render.preview_lighting_help": "התצוגה המקדימה החיה מציגה אור ישיר בלבד וללא צללים.", + "render.regrade_label": "כיול מחדש", + "render.replace_label": "החלפה", + "render.save_shot": "שמור צילום", + "render.shell_tab_appearance": "מראה רינדור", + "render.shell_tab_camera": "מצלמת רינדור", + "render.shell_tab_scene": "סצנת רינדור", + "render.show_shots_label": "הצג את סרגל הצילומים", + "render.stage_frame": "מסגרת", + "render.stage_light": "אור", + "render.stage_look": "מראה", + "render.stage_orthographic": "אורתוגרפי", + "render.stage_output": "פלט", + "render.strip_label": "סרגל", + "render.wait_batch": "לא נתמך עדיין: תור רינדור של צילומים שמורים", + "render.wait_compare": "לא נתמך עדיין: השוואת תמונות שנשמרו", + "render.wait_paint": "לא נתמך עדיין: בחירת מוצר וצביעת מראה", + "render.wait_pick_up": "לא נתמך עדיין: בחירת מוצר ודגימת מראה", + "render.wait_replace": "לא נתמך עדיין: החלפת כל השימושים במראה", + "render.wait_solo": "לא נתמך עדיין: נראות אורות ובידוד", + "toolbar.render_lights": "אורות", + "toolbar.render_result": "תוצאה", + "toolbar.render_stage": "שלב", + "toolbar.render_studio": "סטודיו" + }, + "vi": { + "Render Stage": "Giai đoạn kết xuất", + "cmd.appearance_paint": "Tô diện mạo", + "cmd.appearance_pick_up": "Lấy diện mạo", + "cmd.appearance_replace": "Thay diện mạo", + "cmd.render_batch": "Kết xuất mọi cảnh chụp", + "cmd.render_compare": "So sánh ảnh", + "cmd.render_lights_solo": "Chỉ hiện một đèn", + "cmd.view_shots_strip": "Dải cảnh chụp", + "render.all_shots_label": "Mọi cảnh chụp", + "render.export_image_label": "Xuất ảnh", + "render.fixed_camera": "Máy ảnh", + "render.fixed_world": "Thế giới", + "render.heading_batch": "LÔ", + "render.heading_frame": "KHUNG", + "render.heading_lens": "ỐNG KÍNH", + "render.heading_results": "KẾT QUẢ", + "render.heading_shots": "CẢNH CHỤP", + "render.hide_shots_label": "Ẩn dải cảnh chụp", + "render.inspector": "Bảng thuộc tính", + "render.light_anchor_pending": "Chưa hỗ trợ đổi hệ tọa độ của đèn.", + "render.lights_fixed_to": "Đèn gắn cố định với", + "render.output_tools_inspector": "Chỉnh kích thước và định dạng trong bảng thuộc tính Đầu ra.", + "render.paint_label": "Tô", + "render.pick_component": "Thành phần", + "render.pick_label": "Chọn", + "render.pick_up_label": "Lấy", + "render.pick_waiting": "Chưa hỗ trợ chọn sản phẩm.", + "render.preview_lighting_help": "Bản xem trước trực tiếp chỉ hiện ánh sáng trực tiếp và không có bóng đổ.", + "render.regrade_label": "Chỉnh lại màu", + "render.replace_label": "Thay", + "render.save_shot": "Lưu cảnh chụp", + "render.shell_tab_appearance": "DIỆN MẠO KẾT XUẤT", + "render.shell_tab_camera": "MÁY ẢNH KẾT XUẤT", + "render.shell_tab_scene": "CẢNH KẾT XUẤT", + "render.show_shots_label": "Hiện dải cảnh chụp", + "render.stage_frame": "Khung", + "render.stage_light": "Ánh sáng", + "render.stage_look": "Giao diện", + "render.stage_orthographic": "Trực giao", + "render.stage_output": "Đầu ra", + "render.strip_label": "Dải", + "render.wait_batch": "chưa hỗ trợ: hàng đợi kết xuất cảnh chụp đã lưu", + "render.wait_compare": "chưa hỗ trợ: so sánh ảnh được giữ lại", + "render.wait_paint": "chưa hỗ trợ: chọn sản phẩm và tô diện mạo", + "render.wait_pick_up": "chưa hỗ trợ: chọn sản phẩm và lấy mẫu diện mạo", + "render.wait_replace": "chưa hỗ trợ: thay mọi chỗ dùng một diện mạo", + "render.wait_solo": "chưa hỗ trợ: hiển thị và chỉ hiện một đèn", + "toolbar.render_lights": "ĐÈN", + "toolbar.render_result": "KẾT QUẢ", + "toolbar.render_stage": "GIAI ĐOẠN", + "toolbar.render_studio": "XƯỞNG" + } +} diff --git a/crates/engine/src/cmd/mod.rs b/crates/engine/src/cmd/mod.rs index 29ed3a392..9fb28e428 100644 --- a/crates/engine/src/cmd/mod.rs +++ b/crates/engine/src/cmd/mod.rs @@ -71,6 +71,7 @@ mod parameter_sweep; mod parameters; mod plastic; mod render; +mod render_ui; #[cfg(test)] mod script_tests; mod sheet; @@ -320,6 +321,7 @@ pub fn command_specs() -> Vec<&'static CommandSpec> { v.extend(view_dxf::COMMANDS.iter()); v.extend(diagnostics::COMMANDS.iter()); v.extend(render::COMMANDS.iter()); + v.extend(render_ui::COMMANDS.iter()); v } diff --git a/crates/engine/src/cmd/render_ui.rs b/crates/engine/src/cmd/render_ui.rs new file mode 100644 index 000000000..7822f05e5 --- /dev/null +++ b/crates/engine/src/cmd/render_ui.rs @@ -0,0 +1,46 @@ +//! Planned Render interactions, with explicit non-mutating refusals. +use super::CommandSpec; + +macro_rules! waiting { + ($id:literal, $label:literal, $tab:literal, $panel:literal, $icon:literal, $reason:literal) => { + CommandSpec::new($id, $label, |_, _| Err(crate::EngineError::Other(concat!("not supported yet: ", $reason).into()))) + .enabled(|_| Err(concat!("not supported yet: ", $reason).into())) + .planned("5493") + .noundo() + .doc_only() + .at($tab, $panel) + .icon($icon) + .params("No supported parameters. Always refuses without changing the design or history.") + }; +} + +pub static COMMANDS: &[CommandSpec] = &[ + waiting!("appearance.paint", "Paint Appearance", "RENDER APPEARANCE", "APPEARANCE", "appearance", "product picking and appearance painting"), + waiting!("appearance.pick_up", "Pick Up Appearance", "RENDER APPEARANCE", "APPEARANCE", "select", "product picking and appearance sampling"), + waiting!("appearance.replace", "Replace Appearance", "RENDER APPEARANCE", "APPEARANCE", "appearance", "replacing all uses of an appearance"), + waiting!("render.lights.solo", "Solo Light", "RENDER SCENE", "LIGHTS", "render_scene", "light visibility and solo controls"), + waiting!("render.compare", "Compare Images", "RENDER", "RESULT", "compare", "retained image comparison"), + waiting!("render.batch", "Render All Shots", "RENDER", "BATCH", "render_image", "the saved-shot render queue"), +]; + +#[cfg(test)] +#[test] +fn render_workspace_planned_commands_refuse_without_mutation() { + use serde_json::{Value, json}; + let mut session = crate::Session::default(); + session.execute("render.settings.set", &json!({"name":"Studio","set":{"width":800}})).unwrap(); + session.execute("render.settings.set", &json!({"name":"Studio","set":{"width":900}})).unwrap(); + session.execute("edit.undo", &json!({})).unwrap(); + let document = session.doc.clone(); + let before = (session.undo.len(), session.redo.len(), session.revision, session.evaluations, session.is_dirty()); + for command in COMMANDS { + assert!(command.planned.is_some()); + assert!(!command.info(&session).enabled); + for params in [json!({}), Value::Null, json!([]), json!({"target":1e300,"name":"hostile"})] { + let error = session.execute(command.id, ¶ms).unwrap_err().to_string(); + assert!(error.contains("not supported yet"), "{error}"); + assert!(std::sync::Arc::ptr_eq(&document, &session.doc)); + assert_eq!(before, (session.undo.len(), session.redo.len(), session.revision, session.evaluations, session.is_dirty())); + } + } +} diff --git a/crates/engine/src/cmd/view_navigation.rs b/crates/engine/src/cmd/view_navigation.rs index c4b0cc969..9fd280a2e 100644 --- a/crates/engine/src/cmd/view_navigation.rs +++ b/crates/engine/src/cmd/view_navigation.rs @@ -23,6 +23,12 @@ CommandSpec::new("view.ground_shadow", "Ground shadow", ground_shadow) .icon("style").noundo().doc_only().params("on?: bool (omitted: toggle) → on?; show the ground shadow"), CommandSpec::new("view.navigation_bar", "Navigation bar", navigation_bar) .icon("pan").noundo().doc_only().params("visible?: bool (omitted: toggle) → visible?; show the navigation bar (window setting)"), +CommandSpec::new("view.render_stage", "Render Stage", render_stage) + .icon("render_scene").noundo().doc_only() + .params("stage: look|light|frame|output → {stage}; per-document UI state, never edits or evaluates the design; headless validation only"), +CommandSpec::new("view.shots_strip", "Shots Strip", shots_strip) + .at("RENDER CAMERA", "SHOTS").icon("camera").noundo().doc_only() + .params("visible: bool → {visible}; Render Shots strip UI preference. Headless echo only, no document edits or undo"), CommandSpec::new("view.layout", "Workspace layout", layout) .icon("settings").noundo().doc_only().params("mode: floating|compact → validated workspace layout; display only, never opens a dialog"), CommandSpec::new("view.history_layout", "History layout", history_layout) @@ -204,6 +210,29 @@ fn navigation_bar(_s: &mut Session, p: &Value) -> Result { view_toggle(p, "view.navigation_bar", "visible") } +fn render_stage(_s: &mut Session, p: &Value) -> Result { + #[derive(serde::Deserialize)] + #[serde(deny_unknown_fields)] + struct Request { + stage: String, + } + let request: Request = serde_json::from_value(p.clone()).map_err(|e| bad("view.render_stage", e.to_string()))?; + if !matches!(request.stage.as_str(), "look" | "light" | "frame" | "output") { + return Err(bad("stage", "expected look, light, frame or output")); + } + Ok(json!({"stage":request.stage})) +} + +fn shots_strip(_s: &mut Session, p: &Value) -> Result { + #[derive(serde::Deserialize)] + #[serde(deny_unknown_fields)] + struct Request { + visible: bool, + } + let request: Request = serde_json::from_value(p.clone()).map_err(|e| bad("view.shots_strip", e.to_string()))?; + Ok(json!({"visible": request.visible})) +} + fn layout(_s: &mut Session, p: &Value) -> Result { let mode = p .get("mode") @@ -842,3 +871,51 @@ fn workspace_layout_validates_modes_without_mutating_the_design() { assert_eq!(session.doc.to_json(), before); assert!(session.undo.is_empty()); } + +#[cfg(test)] +#[test] +fn render_workspace_shots_strip_is_a_validated_headless_preference_request() { + let mut session = Session::default(); + let document = session.doc.clone(); + let before = (session.undo.len(), session.redo.len(), session.revision, session.evaluations, session.is_dirty()); + for visible in [false, true] { + assert_eq!(session.execute("view.shots_strip", &json!({"visible":visible})).unwrap(), json!({"visible":visible})); + } + for params in [ + Value::Null, + json!({}), + json!([]), + json!({"visible":null}), + json!({"visible":"yes"}), + json!({"visible":1e300}), + json!({"visible":true,"unknown":true}), + ] { + assert!(session.execute("view.shots_strip", ¶ms).is_err()); + } + assert!(std::sync::Arc::ptr_eq(&document, &session.doc)); + assert_eq!(before, (session.undo.len(), session.redo.len(), session.revision, session.evaluations, session.is_dirty())); +} + +#[cfg(test)] +#[test] +fn render_workspace_stage_validates_without_document_changes_or_evaluation() { + let mut session = Session::default(); + let document = session.doc.clone(); + let before = (session.undo.len(), session.redo.len(), session.revision, session.evaluations, session.is_dirty()); + for stage in ["look", "light", "frame", "output"] { + assert_eq!(session.execute("view.render_stage", &json!({"stage":stage})).unwrap(), json!({"stage":stage})); + } + for params in [ + Value::Null, + json!({}), + json!([]), + json!({"stage":true}), + json!({"stage":1e300}), + json!({"stage":"camera"}), + json!({"stage":"look","extra":true}), + ] { + assert!(session.execute("view.render_stage", ¶ms).is_err()); + } + assert!(std::sync::Arc::ptr_eq(&document, &session.doc)); + assert_eq!(before, (session.undo.len(), session.redo.len(), session.revision, session.evaluations, session.is_dirty())); +} diff --git a/crates/ui-egui/src/browser.rs b/crates/ui-egui/src/browser.rs index 9b7be8aa6..f2fb8de10 100644 --- a/crates/ui-egui/src/browser.rs +++ b/crates/ui-egui/src/browser.rs @@ -972,6 +972,11 @@ pub fn browser(app: &mut SolveApp, ui: &mut egui::Ui) { DRAWN.with(|d| d.borrow_mut().clear()); OCCURRENCES.with(|d| d.borrow_mut().clear()); let mut acts = Actions { hover_bodies: std::mem::take(&mut app.viewport.hover_bodies), ..Default::default() }; + if crate::render_workspace::active(app) { + render_card(app, ui, &mut acts); + finish_browser(app, ui, acts); + return; + } let stacked = crate::timeline_left::stacked(app); let container = Container::new(ui.ctx(), Surface::Panel).joined(crate::ui_kit::DockEdges { left: true, top: true, bottom: stacked, ..Default::default() }); @@ -1036,6 +1041,38 @@ pub fn browser(app: &mut SolveApp, ui: &mut egui::Ui) { finish_browser(app, ui, acts); } +fn render_card(app: &mut SolveApp, ui: &mut egui::Ui, acts: &mut Actions) { + let bounds = crate::shell::panel_bounds(app, ui.available_rect_before_wrap()); + let mut side = app.preferences.render_browser_side.clone(); + let mut width = app.preferences.render_browser_width; + let title = app.tr("ui.browser_title").to_string(); + let content = crate::ui_kit::Panel::workspace( + ui, + crate::ui_kit::WorkspaceOptions { id: "render:browser", title: &title, icon: "list", bounds, fill_height: true }, + &mut side, + &mut width, + |ui| { + browser_contents(app, ui, acts, true); + }, + ); + app.preferences.render_browser_width = width; + if app.preferences.render_browser_side != side { + app.preferences.render_inspector_side = if side == "left" { "right" } else { "left" }.into(); + } + app.preferences.render_browser_side = side.clone(); + let rect = content.map(|c| c.response.rect); + app.shell.browser = rect; + crate::shell::register_panel( + app, + "render:browser", + rect, + Some(if side == "left" { crate::ui_kit::Edge::Left } else { crate::ui_kit::Edge::Right }), + ); + if let Some(rect) = rect { + crate::scenario::publish_rect("browser:card", rect); + } +} + fn browser_collapsed_rail(app: &mut SolveApp, ui: &mut egui::Ui) { let t = Tokens::get(); let title_top = t.space_24 + ui.spacing().item_spacing.y; @@ -1073,9 +1110,13 @@ pub(crate) fn panel_bounds(available: Rect, history: Option, width: f32, g fn browser_contents(app: &mut SolveApp, ui: &mut egui::Ui, acts: &mut Actions, collapsible: bool) { let t = Tokens::get(); // Only the floating card folds; the docked column keeps its full height. - browser_header(app, ui, collapsible); - let stacked = crate::timeline_left::stacked(app); - if collapsible + let render = crate::render_workspace::active(app); + if !render { + browser_header(app, ui, collapsible); + } + let stacked = !render && crate::timeline_left::stacked(app); + if !render + && collapsible && (if stacked { (app.preferences.timeline_left_browser_collapsed && app.shell.history_folding.is_none_or(|p| p[0] >= 1.0)) || ui.available_height() <= t.space_3 diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rs index cd8a802ba..62750b315 100644 --- a/crates/ui-egui/src/control.rs +++ b/crates/ui-egui/src/control.rs @@ -586,8 +586,8 @@ fn dispatch(app: &mut SolveApp, ctx: &egui::Context, method: &str, p: &Value) -> v.hidden_folders.push(SKETCHES_FOLDER.to_string()); } } - if (u.tab == "RENDER") != crate::render_workspace::active(app) - && let Err(e) = crate::render_workspace::enter(app, u.tab == "RENDER") + if crate::workspace::render_tab(&u.tab) != crate::render_workspace::active(app) + && let Err(e) = crate::render_workspace::enter(app, crate::workspace::render_tab(&u.tab)) { return err(e); } diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rs index ce7e1fced..642a34d85 100644 --- a/crates/ui-egui/src/i18n.rs +++ b/crates/ui-egui/src/i18n.rs @@ -657,6 +657,46 @@ mod tests { ); } + #[test] + fn render_shell_labels_and_planned_reasons_translate_in_required_catalogs() { + for language in ["ja", "zh", "de", "ko"] { + let locale = Locale::for_language(language); + for label in [ + "APPEARANCE", + "SCENE", + "LIGHTS", + "STAGE", + "CAMERA", + "SHOTS", + "LENS", + "FRAME", + "RESULT", + "IMAGE", + "BATCH", + "Shots", + "Shots Strip", + "Strip", + "Pick", + "Component", + "Product picking is not supported yet.", + "The live preview shows direct light only and no shadows.", + ] { + assert_ne!(locale.label(label), label, "{language}: {label}"); + } + assert_ne!(locale.text("render.stage_preview_note"), Locale::for_language("en").text("render.stage_preview_note")); + // "Studio" is also the German word: require the translated catalog entry, + // rather than requiring its spelling to differ from English. + assert!(locale.0.messages().contains_key("toolbar.render_studio")); + assert_eq!(locale.label("STUDIO"), locale.text("toolbar.render_studio")); + let session = solidcraft_engine::Session::default(); + for command in solidcraft_engine::command_specs().into_iter().filter(|c| c.planned.is_some() && crate::workspace::render_tab(c.tab)) { + assert_ne!(locale.label(command.label), command.label, "{language}: {}", command.id); + let reason = command.info(&session).disabled_reason.unwrap(); + assert_ne!(locale.label(&reason), reason, "{language}: {} reason", command.id); + } + } + } + /// The mouse mapping picker shows its preset's help through `tr_label`, which the guard above /// can't see: the text sits in a struct field, not in a call. Each one must be the English text /// of its preset's catalog message, or it stays English in every locale. diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 7cb238713..e76b0d61f 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -202,6 +202,7 @@ mod primitive_placement; mod primitive_units_tests; pub mod recovery_ui; pub mod ref_images; +mod render_ui; pub mod render_workspace; #[cfg(test)] mod revolve_edit_tests; @@ -1032,6 +1033,16 @@ impl SolveApp { &strings("closed_by_default"), ); } + if id == "view.render_stage" + && let Some(stage) = v.get("stage").and_then(Value::as_str) + { + render_workspace::select_stage(self, stage); + } + if id == "view.shots_strip" + && let Some(visible) = v.get("visible").and_then(Value::as_bool) + { + self.preferences.render_shots_strip = visible; + } if id == "view.history_layout" { if let Some(width) = v.get("width").and_then(Value::as_f64) { self.preferences.timeline_left_width = ui_kit::history_snap_width(width as f32); @@ -1205,6 +1216,7 @@ impl SolveApp { && let Some(why) = info.disabled_reason { let label = self.tr_label(info.label).to_string(); + let why = self.tr_label(&why).to_string(); self.set_status(format!("{label}: {why}"), true); return; } @@ -1243,6 +1255,10 @@ impl SolveApp { let _ = self.run(id, json!({"mode":mode})); return; } + if id == "view.shots_strip" { + let _ = self.run(id, json!({"visible": !self.preferences.render_shots_strip})); + return; + } if id == "view.history_layout" { let _ = self.run(id, json!({})); return; @@ -1781,7 +1797,7 @@ impl SolveApp { if render_workspace::active(self) { self.cancel_view_animation(); match solidcraft_engine::product_scene::extract(&self.session) { - Ok(scene) if !scene.bounds.is_empty() => self.cam.fit(&scene.bounds), + Ok(scene) if !scene.bounds.is_empty() => self.fit_bounds(scene.bounds), Err(e) => self.set_status(e.to_string(), true), _ => {} } @@ -1816,6 +1832,9 @@ impl SolveApp { fn fitted_bounds(&self, mut cam: Camera, bounds: &solidcraft_engine::geom::Aabb3) -> Camera { if let Some(layout) = &self.viewport.layout { + if render_workspace::active(self) { + return viewport_layout::fit_product_bounds(cam, bounds, layout).unwrap_or(cam); + } return viewport_layout::fit_bounds(cam, bounds, layout, self.perspective_view()).unwrap_or(cam); } let previous = cam; @@ -2181,7 +2200,7 @@ impl SolveApp { return; } } - let floating = ui_kit::Container::new(ui.ctx(), ui_kit::Surface::Panel).floating(); + let floating = render_workspace::active(self) || ui_kit::Container::new(ui.ctx(), ui_kit::Surface::Panel).floating(); timeline::follow_view_pick(self); let show_timeline = self.ui.show_timeline && !render_workspace::active(self); let left_timeline = show_timeline && self.preferences.timeline_left; @@ -2199,6 +2218,7 @@ impl SolveApp { // Browser hugs its contents in either layout; it never becomes a full-height blank column. if !self.ui.show_browser { self.shell.browser = None; + shell::register_panel(self, "render:browser", None, None); } if floating || left_timeline || !show_timeline { self.shell.history = None; @@ -2207,7 +2227,7 @@ impl SolveApp { dialogs::sync_feature_edit_sketch(self); let full = ui.available_rect_before_wrap(); if floating { - let cards = shell::Cards::new(full, self.ui.layout, toolbar::ribbon_height(self.preferences.ribbon_labels)); + let cards = toolbar::shell_cards(self, full); self.shell.cards = vec![cards.workspace, cards.ribbon]; self.shell.history = if left_timeline { let below_ribbon = egui::Rect::from_min_max(egui::pos2(full.left(), cards.bottom), full.max); @@ -2246,6 +2266,7 @@ impl SolveApp { timeline_left::left_panel(self, ui); } if render_workspace::active(self) { + render_ui::shots_strip(self, ui); render_workspace::panel(self, ui); } if self.ui.show_browser { @@ -2274,6 +2295,9 @@ impl SolveApp { self.show_workspace(ui); } }); + if render_workspace::active(self) { + render_ui::overlays(self, ui); + } // Before the dialog: a click on the view's OK or Cancel is for this frame's dialog. view_confirm::show(self, ui.ctx()); dialogs::show(self, ui.ctx()); diff --git a/crates/ui-egui/src/prefs.rs b/crates/ui-egui/src/prefs.rs index 716715190..cb8cd1050 100644 --- a/crates/ui-egui/src/prefs.rs +++ b/crates/ui-egui/src/prefs.rs @@ -660,6 +660,12 @@ preference_settings! { /// Width of the browser sidebar, which /// the user drags wider or narrower at its right edge. browser_width: f32 = DEFAULT_BROWSER_WIDTH, PAGE_INTERFACE; + /// Render shell preference, independent of the document and Design history. + render_shots_strip: bool = true; + render_inspector_side: String = "right".into(); + render_inspector_width: f32 = 305.0; + render_browser_side: String = "left".into(); + render_browser_width: f32 = 266.0; /// Draw the parts browser on a translucent card over the 3D view instead of a column of its /// own, so the workspace keeps the whole window width. browser_float: bool = false, PAGE_INTERFACE; diff --git a/crates/ui-egui/src/render_ui/mod.rs b/crates/ui-egui/src/render_ui/mod.rs new file mode 100644 index 000000000..e26deee4b --- /dev/null +++ b/crates/ui-egui/src/render_ui/mod.rs @@ -0,0 +1,229 @@ +//! Render shell composition; all hosting and chrome belong to the shared kit. +use crate::{ + SolveApp, + theme::Tokens, + ui_kit::{self, Container, Edge}, +}; +use egui::{Rect, vec2}; + +pub(crate) fn reset_shell(app: &mut SolveApp) { + for id in ["render:inspector", "render:browser", "render:shots_strip", "render:shots:show"] { + crate::shell::register_panel(app, id, None, None); + } +} + +pub(crate) fn canvas(app: &SolveApp, viewport: Rect) -> Rect { + crate::shell::content_rect(app, viewport) +} + +/// The toolbar's shared floating Chrome card hosts both rows; there is no Render ribbon. +pub(crate) fn stage_bar(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect) { + use crate::render_workspace::Stage; + crate::scenario::publish_rect("render:stage_bar", rect); + ui.ctx().data_mut(|d| d.remove::(egui::Id::new("sc_ribbon_search"))); + let labels: Vec<_> = Stage::ALL.iter().map(|stage| app.tr(stage.label()).to_string()).collect(); + let selected = Stage::ALL.iter().position(|s| *s == app.render_workspace.view.stage).unwrap_or(0); + let ready = [crate::render_workspace::job_ready(app, "render.start"), crate::render_workspace::job_ready(app, "render.cancel")]; + let actions = [ + ui_kit::StageAction { + icon: Some("play"), + label: app.tr_label("Render"), + enabled: ready[0].is_ok(), + primary: true, + reason: ready[0].as_ref().err().map(String::as_str), + }, + ui_kit::StageAction { + icon: None, + label: app.tr_label("Cancel"), + enabled: ready[1].is_ok(), + primary: false, + reason: ready[1].as_ref().err().map(String::as_str), + }, + ]; + let choice = ui_kit::StageBar::row(ui, rect, false, |ui| { + ui_kit::StageBar::header(ui, selected, &labels.iter().map(String::as_str).collect::>(), &actions) + }); + if let Some(choice) = choice { + for (stage, chip) in Stage::ALL.iter().zip(choice.chips).filter(|(_, r)| r.is_positive()) { + crate::scenario::publish_target(&format!("render:stage:{}", stage.key()), chip); + } + for (id, action) in ["render.start", "render.cancel"].iter().zip(choice.actions).filter(|(_, r)| r.is_positive()) { + crate::scenario::publish_target(&format!("render:stage:{id}"), action); + } + if let Some(stage) = choice.stage.and_then(|index| Stage::ALL.get(index)) { + let _ = app.run("view.render_stage", serde_json::json!({"stage":stage.key()})); + } + if let Some(id) = choice.action.and_then(|index| ["render.start", "render.cancel"].get(index)) { + app.start(id); + } + } + let split = (rect.top() + ui_kit::StageBar::HEADER_HEIGHT).min(rect.bottom()); + crate::scenario::publish_rect("render:stage_header", Rect::from_min_max(rect.min, egui::pos2(rect.right(), split))); + crate::scenario::publish_rect("render:stage_divider", Rect::from_min_size(egui::pos2(rect.left(), split), vec2(rect.width(), 1.0))); + crate::scenario::publish_rect("render:stage_tools", Rect::from_min_max(egui::pos2(rect.left(), split), rect.max)); + ui_kit::StageBar::row(ui, rect, true, |ui| stage_tools(app, ui)); +} + +fn stage_tools(app: &mut SolveApp, ui: &mut egui::Ui) { + use crate::render_workspace::Stage; + match app.render_workspace.view.stage { + Stage::Look => { + let disabled = ui.add_enabled_ui(false, |ui| { + ui_kit::StageBar::caption(ui, crate::i18n::tr_label("Pick")); + let mut selected = 0; + ui_kit::segmented( + ui, + &mut selected, + &[crate::i18n::tr_label("Body"), crate::i18n::tr_label("Face"), crate::i18n::tr_label("Component")], + ui_kit::Segments { + icons: &["body", "surface", "component"], + workspace_accent: true, + dense: true, + intrinsic: true, + ..Default::default() + }, + ); + }); + disabled.response.on_disabled_hover_text(crate::i18n::tr_label("Product picking is not supported yet.")); + ui_kit::StageBar::tool_gap(ui); + for (id, label, icon) in + [("appearance.paint", "render.paint_label", "appearance"), ("appearance.pick_up", "render.pick_up_label", "select")] + { + if let Some(command) = solidcraft_engine::find_command(id) { + let info = crate::render_workspace::interactive_command_info(app, command); + let response = ui_kit::compact_icon_label_button(ui, app.tr(label), icon, info.enabled); + if response.clicked() { + app.start(id); + } + if let Some(reason) = info.disabled_reason { + response.on_disabled_hover_text(reason); + } + } + } + ui_kit::StageBar::separator(ui); + ui_kit::StageBar::note(ui, app.tr("render.stage_preview_note")).on_hover_text(app.tr("render.preview_lighting_help")); + if ui_kit::StageBar::icon_action(ui, "settings", app.tr("render.preview_image_settings_help")).clicked() { + app.start("render.settings.get"); + } + } + Stage::Light => { + ui_kit::text(ui, app.tr("render.lights_fixed_to"), ui_kit::Text::Inline); + ui.add_enabled_ui(false, |ui| { + let mut selected = usize::MAX; + ui_kit::segmented( + ui, + &mut selected, + &[app.tr("render.fixed_camera"), app.tr("render.fixed_world")], + ui_kit::Segments { intrinsic: true, ..Default::default() }, + ); + }) + .response + .on_disabled_hover_text(app.tr("render.light_anchor_pending")); + ui_kit::text(ui, app.tr("render.light_anchor_pending"), ui_kit::Text::Inline); + } + Stage::Frame => { + let mut projection = usize::from(app.cam.fov == 0.0); + if ui_kit::segmented( + ui, + &mut projection, + &[app.tr("render.perspective"), app.tr("render.stage_orthographic")], + ui_kit::Segments { intrinsic: true, ..Default::default() }, + ) && let Err(error) = crate::render_workspace::stage_projection(app, projection == 0) + { + app.set_status(error, true); + } + } + Stage::Output => { + ui.add_enabled_ui(false, |ui| { + let (size, format) = crate::render_workspace::output_summary(app); + ui_kit::button(ui, size, ui_kit::Button::Normal); + ui_kit::button(ui, format, ui_kit::Button::Normal); + }) + .response + .on_disabled_hover_text(app.tr("render.output_tools_inspector")); + ui_kit::text(ui, app.tr("render.output_tools_inspector"), ui_kit::Text::Inline); + } + } +} + +pub(crate) fn overlays(app: &mut SolveApp, ui: &mut egui::Ui) { + let Some(viewport) = app.viewport.rect else { return }; + let free = canvas(app, viewport); + if !free.is_positive() { + return; + } + crate::viewport::nav_bar(app, ui, viewport); + shots_pill(app, ui, free); +} + +fn shots_pill(app: &mut SolveApp, ui: &mut egui::Ui, free: Rect) { + crate::shell::register_panel(app, "render:shots:show", None, None); + if app.preferences.render_shots_strip { + return; + } + let ctx = ui.ctx().clone(); + let pill = Container::navigation_card( + &ctx, + egui::Id::new("sc_render_shots_pill"), + free.left_bottom() + vec2(Tokens::get().space_8, -Tokens::get().space_8), + egui::Align2::LEFT_BOTTOM, + |ui| { + let response = + ui_kit::button(ui, crate::i18n::tr_label("Shots"), ui_kit::Button::Normal).on_hover_text(crate::i18n::tr_label("Show Shots strip")); + crate::scenario::publish_target("render:shots:show", response.rect); + if response.clicked() { + let _ = app.run("view.shots_strip", serde_json::json!({"visible":true})); + } + }, + ); + crate::shell::register_panel(app, "render:shots:show", Some(pill.response.rect), None); +} + +/// Existing saved-shot and job actions inside the shared floating bottom-strip host. +pub(crate) fn shots_strip(app: &mut SolveApp, ui: &mut egui::Ui) { + crate::shell::register_panel(app, "render:shots_strip", None, None); + if !app.preferences.render_shots_strip { + return; + } + let available = ui.available_rect_before_wrap(); + let content = ui_kit::Panel::bottom_strip(ui, "sc_render_shots_strip", available, 48.0, |ui| { + ui.horizontal_centered(|ui| { + ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { + let hide = ui_kit::button(ui, crate::i18n::tr_label("Hide"), ui_kit::Button::Normal) + .on_hover_text(crate::i18n::tr_label("Hide Shots strip")); + crate::scenario::publish_target("render:shots:hide", hide.rect); + if hide.clicked() { + let _ = app.run("view.shots_strip", serde_json::json!({"visible":false})); + } + let ready = crate::render_workspace::job_ready(app, "render.start"); + let render = ui_kit::button(ui, app.tr("render.image_start"), ui_kit::Button::Enabled(ready.is_ok())); + let render = if let Err(reason) = ready { render.on_disabled_hover_text(reason) } else { render }; + crate::scenario::publish_target("render:shots:render", render.rect); + if render.clicked() { + app.start("render.start"); + } + let names: Vec<_> = app.session.doc.render.setups.keys().cloned().collect(); + egui::ScrollArea::horizontal() + .id_salt("render_shots_names") + .scroll_bar_visibility(egui::scroll_area::ScrollBarVisibility::AlwaysHidden) + .show(ui, |ui| { + ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| { + ui_kit::text(ui, crate::i18n::tr_label("Shots"), ui_kit::Text::Inline); + for name in names { + let shot = ui_kit::choice_chip(ui, &name, &name, name == app.render_workspace.view.name); + crate::scenario::publish_target(&format!("render:shots:setup:{name}"), shot.rect); + if shot.clicked() { + crate::render_workspace::switch_shot(app, name); + } + } + }); + }); + }); + }); + }); + let rect = content.map(|c| c.response.rect); + crate::shell::register_panel(app, "render:shots_strip", rect, Some(Edge::Bottom)); + if let Some(rect) = rect { + crate::scenario::publish_rect("render:shots_strip", rect); + } +} diff --git a/crates/ui-egui/src/render_workspace.rs b/crates/ui-egui/src/render_workspace.rs index 27c796ef8..f0cb50a36 100644 --- a/crates/ui-egui/src/render_workspace.rs +++ b/crates/ui-egui/src/render_workspace.rs @@ -204,10 +204,47 @@ fn setup_progress(ui: &mut egui::Ui, app: &SolveApp, started: std::time::Instant } } +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +pub(crate) enum Stage { + #[default] + Look, + Light, + Frame, + Output, +} +impl Stage { + pub(crate) const ALL: [Self; 4] = [Self::Look, Self::Light, Self::Frame, Self::Output]; + pub(crate) fn key(self) -> &'static str { + match self { + Self::Look => "look", + Self::Light => "light", + Self::Frame => "frame", + Self::Output => "output", + } + } + pub(crate) fn label(self) -> &'static str { + match self { + Self::Look => "render.stage_look", + Self::Light => "render.stage_light", + Self::Frame => "render.stage_frame", + Self::Output => "render.stage_output", + } + } + fn page(self) -> inspector::Page { + match self { + Self::Look => inspector::Page::Appearance, + Self::Light => inspector::Page::Lighting, + Self::Frame => inspector::Page::Camera, + Self::Output => inspector::Page::Output, + } + } +} + /// Small per-document editor state; GPU uploads and host capabilities stay outside tabs. #[derive(Clone, Debug)] pub struct ViewState { pub name: String, + pub(crate) stage: Stage, draft: RenderSetup, dirty: bool, clean_setup: Option, @@ -262,6 +299,7 @@ impl Default for ViewState { fn default() -> Self { Self { name: "Studio".into(), + stage: Stage::Look, draft: RenderSetup::default(), dirty: false, clean_setup: None, @@ -336,7 +374,7 @@ impl State { } pub fn active(app: &SolveApp) -> bool { - app.ui.tab == "RENDER" + crate::workspace::render_tab(&app.ui.tab) } pub(crate) fn result_active(app: &SolveApp) -> bool { @@ -358,7 +396,7 @@ pub(crate) fn inspect_state(app: &SolveApp) -> serde_json::Value { ImageMethod::GpuRaytrace => "gpu_path", }; json!({ - "active": active(app), "setup": view.name, "draft_dirty": view.dirty, + "active": active(app), "stage": view.stage.key(), "setup": view.name, "draft_dirty": view.dirty, "method": method, "job": view.job, "completed": view.completed, "showing_result": view.result, "export_format": if view.studio.export_exr {"exr"} else {"png"}, }) @@ -437,6 +475,7 @@ pub fn tick(app: &mut SolveApp, ctx: &egui::Context) { } pub fn reset_document(app: &mut SolveApp) { + crate::render_ui::reset_shell(app); app.ui.ribbon_context = None; let host = app.render_workspace.host.clone(); let image_host = app.render_workspace.image_host.clone(); @@ -478,9 +517,10 @@ pub fn enter(app: &mut SolveApp, render: bool) -> Result<(), String> { if !active(app) { app.render_workspace.design_camera = Some((app.cam, app.ui.perspective)); app.ui.tab = "RENDER".into(); + select_stage(app, app.render_workspace.view.stage.key()); let scene = solidcraft_engine::product_scene::extract(&app.session).map_err(|e| e.to_string())?; if !scene.bounds.is_empty() { - app.cam.fit(&scene.bounds); + app.fit_bounds(scene.bounds); } } setups::refresh_dirty(app); @@ -496,11 +536,52 @@ pub fn enter(app: &mut SolveApp, render: bool) -> Result<(), String> { app.ui.perspective = perspective; } app.ui.tab = "MODEL".into(); + crate::render_ui::reset_shell(app); + } + app.cam_anim = None; + if !render { + app.pending_fit = None; } - app.cancel_view_animation(); Ok(()) } +/// Stage navigation is transient per-document state. It never applies a resource or starts a job. +pub(crate) fn select_stage(app: &mut SolveApp, key: &str) { + let stage = match key { + "look" => Stage::Look, + "light" => Stage::Light, + "frame" => Stage::Frame, + "output" => Stage::Output, + _ => return, + }; + app.render_workspace.view.stage = stage; + app.render_workspace.view.inspector.page = stage.page(); + // The current Browser has model folders only. Reveal Objects for Look; scene-specific + // Lights/Shots/Output expansion belongs to the scene Browser implementation. + if stage == Stage::Look { + app.tree.collapsed.remove("c0"); + app.tree.collapsed.remove("c0/bodies"); + } +} + +pub(crate) fn switch_shot(app: &mut SolveApp, name: String) { + inspector::switch_shot(app, name); +} +pub(crate) fn stage_projection(app: &mut SolveApp, perspective: bool) -> Result<(), String> { + let mut camera = app.cam; + camera.fov = if perspective { 0.6 } else { 0.0 }; + inspector::apply_camera_draft(app, camera) +} + +pub(crate) fn output_summary(app: &SolveApp) -> (String, &'static str) { + let view = &app.render_workspace.view; + (format!("{} × {}", view.draft.width, view.draft.height), if view.studio.export_exr { "EXR" } else { "PNG" }) +} + +pub(crate) fn job_ready(app: &SolveApp, id: &str) -> Result<(), String> { + ribbon::action_ready(app, id) +} + pub fn panel(app: &mut SolveApp, ui: &mut egui::Ui) { inspector::panel(app, ui); } @@ -1342,8 +1423,13 @@ impl State { /// on the user-selected background (which may have the opposite theme contrast). fn preview_error(app: &mut SolveApp, ui: &mut egui::Ui, rect: egui::Rect, error: &str) { let t = Tokens::get(); - let bounded = rect.shrink(t.space_12); + let bounded = crate::shell::workspace_content(app, crate::shell::panel_bounds(app, rect)).shrink(t.space_12); + // At tiny window sizes the shell may leave no room for the shared error card. + if !bounded.is_finite() || bounded.width() < t.control_height + 2.0 * t.space_8 || bounded.height() < t.control_height + 2.0 * t.space_8 { + return; + } ui.scope_builder(egui::UiBuilder::new().max_rect(bounded), |ui| { + ui.set_clip_rect(ui.clip_rect().intersect(bounded)); ui.set_max_width(bounded.width().min(t.form_card_width * 2.0)); crate::ui_kit::Panel::feature_frame(ui.ctx(), crate::shell::LayoutMode::Floating, crate::frame::Side::Left).inner_margin(t.space_8).show( ui, diff --git a/crates/ui-egui/src/render_workspace_inspector.rs b/crates/ui-egui/src/render_workspace_inspector.rs index 26bbb2bfe..9b96896f1 100644 --- a/crates/ui-egui/src/render_workspace_inspector.rs +++ b/crates/ui-egui/src/render_workspace_inspector.rs @@ -219,17 +219,17 @@ pub(super) fn panel(app: &mut SolveApp, ui: &mut egui::Ui) { if app.render_workspace.revision != app.session.revision && !app.render_workspace.view.dirty { setups::load(app); } - let t = Tokens::get(); - let minimum = (ui.available_width() * 0.40).clamp(t.form_card_width, t.form_card_width + t.space_24); - let maximum = (ui.available_width() * 0.52).max(minimum).min(t.form_card_width * 1.8); - let frame = crate::ui_kit::Panel::feature_frame(ui.ctx(), app.ui.layout, crate::frame::Side::Right).inner_margin(t.space_10); - let content = ui_kit::Container::new(ui.ctx(), ui_kit::Surface::Panel) - .edge("sc_render_settings", ui_kit::Edge::Right) - .default_size(t.form_card_width + t.space_24 * 3.0) - .size_range(minimum..=maximum) - .resizable(true) - .frame(frame) - .show(ui, |ui| { + let bounds = crate::shell::panel_bounds(app, ui.available_rect_before_wrap()); + let mut side = app.preferences.render_inspector_side.clone(); + let mut width = app.preferences.render_inspector_width; + let title = app.tr("render.studio_title").to_string(); + let icon = app.render_workspace.view.inspector.page.icon(); + let content = ui_kit::Panel::workspace( + ui, + ui_kit::WorkspaceOptions { id: "render:inspector", title: &title, icon, bounds, fill_height: true }, + &mut side, + &mut width, + |ui| { ui_kit::scope(ui, |ui| { header(app, ui); pages(app, ui); @@ -273,8 +273,18 @@ pub(super) fn panel(app: &mut SolveApp, ui: &mut egui::Ui) { }, ); }); - }); - crate::scenario::publish_rect("render:inspector", content.response.rect); + }, + ); + app.preferences.render_inspector_width = width; + if app.preferences.render_inspector_side != side { + app.preferences.render_browser_side = if side == "left" { "right" } else { "left" }.into(); + } + app.preferences.render_inspector_side = side.clone(); + let rect = content.map(|c| c.response.rect); + crate::shell::register_panel(app, "render:inspector", rect, Some(if side == "left" { ui_kit::Edge::Left } else { ui_kit::Edge::Right })); + if let Some(rect) = rect { + crate::scenario::publish_rect("render:inspector", rect); + } confirmation(app, ui.ctx()); } fn pages(app: &mut SolveApp, ui: &mut egui::Ui) { @@ -302,7 +312,6 @@ fn pages(app: &mut SolveApp, ui: &mut egui::Ui) { ui.add_space(Tokens::get().space_4); } fn header(app: &mut SolveApp, ui: &mut egui::Ui) { - ui.heading(app.tr("render.studio_title")); let current = app.render_workspace.view.name.clone(); let names: Vec<_> = app.session.doc.render.setups.keys().cloned().collect(); let mut chosen = None; @@ -318,7 +327,7 @@ fn header(app: &mut SolveApp, ui: &mut egui::Ui) { }); crate::scenario::publish_target("render:setups", menu.rect); if let Some(name) = chosen { - request_action(app, PendingAction::Switch(name)); + switch_shot(app, name); } let field = ui_kit::bounded_cell_editor(ui, ui.id().with("render_setup_name"), &mut app.render_workspace.view.name, "", false, 128); crate::scenario::publish_target("render:setup-name", field.rect); @@ -348,6 +357,11 @@ fn header(app: &mut SolveApp, ui: &mut egui::Ui) { } } } +pub(super) fn switch_shot(app: &mut SolveApp, name: String) { + setups::refresh_dirty(app); + request_action(app, PendingAction::Switch(name)); +} + fn request_action(app: &mut SolveApp, action: PendingAction) { if app.render_workspace.view.dirty || matches!(&action, PendingAction::Remove(_)) { app.render_workspace.view.inspector.pending = @@ -611,7 +625,7 @@ fn vector(ui: &mut egui::Ui, label: &str, value: &mut [f64; 3], range: std::ops: } }); } -fn apply_camera_draft(app: &mut SolveApp, camera: solidcraft_engine::render::Camera) -> Result<(), String> { +pub(super) fn apply_camera_draft(app: &mut SolveApp, camera: solidcraft_engine::render::Camera) -> Result<(), String> { app.run("render.camera.set", json!({"camera":camera}))?; app.follow_view_request(false); app.render_workspace.view.dirty = true; @@ -1060,6 +1074,7 @@ pub(super) fn fit_subject(app: &mut SolveApp) -> Result<(), String> { app.run("render.camera.set", json!({"camera":app.cam}))?; app.run("render.camera.fit", json!({}))?; app.follow_view_request(false); + app.fit_view(); Ok(()) } diff --git a/crates/ui-egui/src/render_workspace_inspector_tests.rs b/crates/ui-egui/src/render_workspace_inspector_tests.rs index a8fb1713e..88e816095 100644 --- a/crates/ui-egui/src/render_workspace_inspector_tests.rs +++ b/crates/ui-egui/src/render_workspace_inspector_tests.rs @@ -5,20 +5,22 @@ fn fixture() -> Harness { h.call("ui.resize", json!({"width":1440,"height":1000})); h.app.run("solid.box", json!({"length":20,"width":15,"height":10,"body_name":"Subject"})).unwrap(); super::super::enter(&mut h.app, true).unwrap(); + h.app.run("view.render_stage", json!({"stage":"output"})).unwrap(); h.frames(3); h } #[test] -fn native_inspector_defaults_to_scene_and_keeps_job_actions_on_screen_in_both_shells() { +fn native_inspector_defaults_to_output_and_keeps_job_actions_on_screen_in_both_shells() { for dark in [false, true] { for layout in [crate::shell::LayoutMode::Docked, crate::shell::LayoutMode::Floating] { let mut h = fixture(); h.app.preferences.theme = if dark { "dark" } else { "light" }.into(); h.app.ui.layout = layout; h.call("ui.resize", json!({"width":1280,"height":900})); - assert_eq!(h.app.render_workspace.view.inspector.page, Page::Scene); + assert_eq!(h.app.render_workspace.view.inspector.page, Page::Output); let before = h.app.session.doc.to_json(); let revision = h.app.session.revision; + let history = (h.app.session.undo.len(), h.app.session.redo.len()); for page in Page::ALL { h.app.render_workspace.view.inspector.page = page; h.frames(3); @@ -31,6 +33,9 @@ fn native_inspector_defaults_to_scene_and_keeps_job_actions_on_screen_in_both_sh } assert_eq!(h.app.session.doc.to_json(), before); assert_eq!(h.app.session.revision, revision); + assert_eq!((h.app.session.undo.len(), h.app.session.redo.len()), history); + assert!(h.app.render_workspace.view.job.is_none()); + assert!(h.app.render_workspace.view.completed.is_none()); } } } @@ -41,7 +46,7 @@ fn icon_page_navigation_is_local_and_never_switches_executor_or_overwrites_draft let before = h.app.session.doc.to_json(); h.app.render_workspace.view.samples = 37; h.app.render_workspace.view.draft.width = 777; - for page in [Page::Appearance, Page::Camera, Page::Output, Page::Diagnostics, Page::Scene] { + for page in Page::ALL { h.step(&json!({"click":{"handle":format!("render:page:{}",page.handle())}})).unwrap(); assert_eq!(h.app.render_workspace.view.inspector.page, page); assert_eq!(h.app.render_workspace.view.method, ImageMethod::Raster); @@ -273,7 +278,7 @@ fn ribbon_navigation_reuses_inspector_and_preserves_exact_unsaved_intent() { h.app.render_workspace.view.samples = 37; h.app.render_workspace.view.draft.width = 777; let doc = h.app.session.doc.to_json(); - let undo = h.app.session.undo.len(); + let history = (h.app.session.revision, h.app.session.undo.len(), h.app.session.redo.len()); for (id, page) in [ ("render.preset.resolve", Page::Scene), ("render.settings.get", Page::Scene), @@ -287,6 +292,22 @@ fn ribbon_navigation_reuses_inspector_and_preserves_exact_unsaved_intent() { ("render.status", Page::Diagnostics), ("render.camera.get", Page::Camera), ("render.camera.set", Page::Camera), + ("render.preset.apply", Page::Scene), + ("render.shot.duplicate", Page::Scene), + ("render.shot.rename", Page::Scene), + ("render.shot.remove", Page::Scene), + ("render.optics.bind", Page::Appearance), + ("render.optics.unbind", Page::Appearance), + ("render.library.surface.prepare", Page::Appearance), + ("render.library.surface.unbind", Page::Appearance), + ("render.library.physical.prepare", Page::Appearance), + ("render.stage.ground", Page::Background), + ("render.stage.clear", Page::Background), + ("render.hdr.inspect", Page::Environment), + ("render.settings.capture_hdr", Page::Environment), + ("render.aging.describe", Page::Aging), + ("render.effects.describe", Page::Effects), + ("render.backends", Page::Diagnostics), ] { h.app.start(id); h.frames(3); @@ -294,32 +315,38 @@ fn ribbon_navigation_reuses_inspector_and_preserves_exact_unsaved_intent() { assert_eq!(h.app.render_workspace.view.samples, 37); assert_eq!(h.app.render_workspace.view.draft.width, 777); assert_eq!(h.app.session.doc.to_json(), doc, "navigation may not execute a parameterless apply"); - assert_eq!(h.app.session.undo.len(), undo); + assert_eq!((h.app.session.revision, h.app.session.undo.len(), h.app.session.redo.len()), history); + assert!(h.app.render_workspace.view.job.is_none()); + assert!(h.app.render_workspace.view.completed.is_none()); assert!(!crate::icon_svg::resolve(solidcraft_engine::find_command(id).unwrap().icon).placeholder); } } #[test] -fn render_ribbon_has_six_shared_groups_and_keeps_image_actions_at_narrow_widths() { - assert_eq!(crate::workspace::panels("RENDER"), vec!["SCENE", "APPEARANCE", "LIGHTING", "ENVIRONMENT", "CAMERA", "IMAGE"]); +fn render_stage_bar_keeps_actions_and_personal_preferences_in_both_layouts() { + assert!(crate::workspace::panels("RENDER").is_empty()); for layout in [crate::shell::LayoutMode::Docked, crate::shell::LayoutMode::Floating] { let mut h = fixture(); h.app.ui.layout = layout; + h.app.toolbar_custom.panels.insert("DESIGN/RENDER/RESULT".into(), vec!["render.export".into()]); + let preferences = h.app.toolbar_custom.prefs(); for width in [800, 1024, 1440, 2000] { h.call("ui.resize", json!({"width":width,"height":900})); h.frames(3); - for id in ["render.start", "render.preflight"] { - let r = crate::scenario::rect_of(&format!("button:{id}")).expect("pinned Image action"); - assert!(r.left() >= 0. && r.right() <= width as f32, "{layout:?} {width} {id}: {r:?}"); + let bar = crate::scenario::rect_of("render:stage_bar").unwrap(); + let workspace = crate::scenario::rect_of("ribbon:workspace").unwrap(); + assert_eq!(bar.height(), workspace.height()); + assert_eq!(bar.top(), workspace.top()); + for id in ["render:stage:render.start", "render:stage:render.cancel"] { + if let Some(action) = crate::scenario::rect_of(id) { + assert!(bar.contains_rect(action)); + } } + assert!(crate::scenario::rect_of("ribbon:card").is_none()); + assert!(super::super::job_ready(&h.app, "render.cancel").is_err()); + assert!(h.app.render_workspace.view.job.is_none()); + assert_eq!(h.app.toolbar_custom.prefs(), preferences); } - h.app.toolbar_custom.panels.insert("DESIGN/RENDER/SCENE".into(), vec!["render.scene".into()]); - h.app.toolbar_custom.panels.insert("DESIGN/RENDER/IMAGE".into(), vec!["render.export".into(), "render.start".into()]); - let before = h.app.toolbar_custom.prefs(); - h.frames(3); - assert_eq!(h.app.toolbar_custom.prefs(), before, "default expansion must not replace personal pins"); - assert!(crate::scenario::rect_of("button:render.scene").is_some()); - assert!(crate::scenario::rect_of("button:render.export").is_some()); } } @@ -335,7 +362,7 @@ fn ribbon_and_sticky_footer_submit_the_current_draft_not_defaults_or_saved_shot( assert!(export.info(&h.app.session).enabled, "UI state must not alter direct engine API semantics"); h.app.start("render.preflight"); let request = super::super::image_request(&h.app).unwrap(); - h.app.start("render.start"); + h.step(&json!({"click":{"handle":"render:stage:render.start"}})).unwrap(); let job = h.app.render_workspace.view.job.expect("ribbon submitted an actual job"); let handle = h.app.session.render_job_handle(job).unwrap(); assert_eq!((handle.status().unwrap().request.width, handle.status().unwrap().request.height), (32, 24)); @@ -659,3 +686,38 @@ fn camera_draft_uses_render_command_and_keeps_saved_design_unchanged() { assert_eq!(h.app.session.undo.len(), undo); } } + +#[test] +fn shots_strip_uses_the_existing_dirty_shot_confirmation() { + let mut h = fixture(); + h.app.render_workspace.view.name = "A".into(); + setups::save(&mut h.app).unwrap(); + h.app.run("render.settings.set", json!({"name":"B","set":{"width":321,"job":{"method":"raster"}}})).unwrap(); + h.app.render_workspace.view.draft.width = 123; + h.frames(3); + h.step(&json!({"click":{"handle":"render:shots:setup:B"}})).unwrap(); + assert!(confirmation_open(&h.app)); + assert_eq!(h.app.render_workspace.view.name, "A"); + h.step(&json!({"widget":h.app.tr("render.keep_editing")})).unwrap(); + assert_eq!(h.app.render_workspace.view.draft.width, 123); + h.step(&json!({"click":{"handle":"render:shots:setup:B"}})).unwrap(); + h.step(&json!({"widget":h.app.tr("render.discard_continue")})).unwrap(); + assert_eq!(h.app.render_workspace.view.name, "B"); + assert_eq!(h.app.render_workspace.view.draft.width, 321); +} + +#[test] +fn shots_strip_render_submits_the_current_job_request() { + let mut h = fixture(); + h.app.render_workspace.view.draft.width = 24; + h.app.render_workspace.view.draft.height = 16; + h.app.render_workspace.view.draft.background = [31, 57, 83]; + let document = h.app.session.doc.clone(); + h.frames(3); + h.step(&json!({"click":{"handle":"render:shots:render"}})).unwrap(); + let job = h.app.render_workspace.view.job.unwrap(); + let status = h.app.session.render_job_handle(job).unwrap().status().unwrap(); + assert_eq!((status.request.width, status.request.height), (24, 16)); + assert_eq!(status.request.background, [31, 57, 83]); + assert_eq!(h.app.session.doc, document); +} diff --git a/crates/ui-egui/src/render_workspace_tests.rs b/crates/ui-egui/src/render_workspace_tests.rs index 965207560..4512acba0 100644 --- a/crates/ui-egui/src/render_workspace_tests.rs +++ b/crates/ui-egui/src/render_workspace_tests.rs @@ -408,7 +408,6 @@ fn clicked_image_controls_complete_cancel_and_export_without_dirtying_the_design let check = h.app.tr("cmd.render_preflight").to_string(); let start = h.app.tr("render.image_start").to_string(); let export = h.app.tr("render.image_export").to_string(); - let cancel = h.app.tr("cmd.render_cancel").to_string(); h.call("ui.resize", json!({"width":1600,"height":1400})); enter(&mut h.app, true).unwrap(); h.app.render_workspace.view.inspector.page = inspector::Page::All; @@ -432,7 +431,8 @@ fn clicked_image_controls_complete_cancel_and_export_without_dirtying_the_design h.app.render_workspace.view.draft.width = 1024; h.app.render_workspace.view.draft.height = 768; h.step(&json!({"widget":start})).unwrap(); - h.step(&json!({"widget":cancel})).unwrap(); + assert!(job_ready(&h.app, "render.cancel").is_ok()); + h.step(&json!({"click":{"handle":"render:stage:render.cancel"}})).unwrap(); h.frames(5); assert_eq!(h.app.render_workspace.view.completed, Some(good)); assert_eq!( @@ -462,16 +462,15 @@ fn saved_camera_survives_frames_and_product_fit_ignores_selection() { assert_eq!(h.app.cam, camera); assert_eq!(h.app.render_workspace.view.draft.background, [21, 43, 65]); h.app.session.selection = vec![solidcraft_engine::Sel::Body { name: "Product".into() }]; - let bounds = solidcraft_engine::product_scene::extract(&h.app.session).unwrap().bounds; - let mut expected = camera; - expected.fit(&bounds); h.call("engine.execute", json!({"command":"view.fit","params":{}})); h.frames(3); - assert_eq!(h.app.cam, expected); - expected.set_view(solidcraft_engine::render::StandardView::Iso); - expected.fit(&bounds); - h.call("engine.execute", json!({"command":"view.home","params":{}})); - assert_eq!(h.app.cam, expected); + let selected_fit = h.app.cam; + assert_product_fits_canvas(&h.app); + h.app.session.selection.clear(); + h.app.cam = camera; + h.call("engine.execute", json!({"command":"view.fit","params":{}})); + h.frames(3); + assert_eq!(h.app.cam, selected_fit, "Fit Product ignores the selected subset"); enter(&mut h.app, false).unwrap(); assert_eq!(h.app.cam, design); } @@ -1517,10 +1516,8 @@ fn render_workspace_view_keys_double_middle_click_and_navigators_work() { enter(&mut h.app, true).unwrap(); h.app.render_workspace.view.inspector.page = inspector::Page::All; h.frames(3); - let bounds = solidcraft_engine::product_scene::extract(&h.app.session).unwrap().bounds; let mut home = h.app.cam; home.set_view(solidcraft_engine::render::StandardView::Iso); - home.fit(&bounds); let off = |h: &mut Harness| { h.app.cam.yaw += 0.7; h.app.cam.pitch = 0.1; @@ -1530,17 +1527,27 @@ fn render_workspace_view_keys_double_middle_click_and_navigators_work() { }; // F6 fits, keeping the direction. off(&mut h); - let mut fitted = h.app.cam; - fitted.fit(&bounds); + let before = h.app.cam; h.step(&json!({"key":"F6"})).unwrap(); h.settle(); - assert_eq!(h.app.cam, fitted, "{style:?}: F6"); + assert_eq!( + (h.app.cam.yaw, h.app.cam.pitch, h.app.cam.roll, h.app.cam.up), + (before.yaw, before.pitch, before.roll, before.up), + "{style:?}: F6 retains orientation" + ); + assert!(h.app.cam.distance < before.distance, "{style:?}: F6 frames the product"); + assert_product_fits_canvas(&h.app); // A middle double-click goes Home. off(&mut h); let centre = h.app.viewport.rect.unwrap().center(); h.step(&json!({"click":[centre.x, centre.y], "double":true, "button":"middle"})).unwrap(); h.settle(); - assert_eq!(h.app.cam, home, "{style:?}: middle double-click"); + assert_eq!( + (h.app.cam.yaw, h.app.cam.pitch, h.app.cam.roll, h.app.cam.up), + (home.yaw, home.pitch, home.roll, home.up), + "{style:?}: middle double-click" + ); + assert_product_fits_canvas(&h.app); // The navigator's Home control. off(&mut h); let handle = match style { @@ -2052,11 +2059,25 @@ fn clicked_setup_save_reload_and_switch_keep_gpu_numeric_intent_without_a_host() let completed = h.app.render_workspace.view.completed; let result_camera = h.app.render_workspace.view.result_camera; h.frames(3); - // Open the real editors: merely displaying degree controls and RGB fields must be lossless. + // Open the real editors inside the bounded, scrolling floating card. + let open_section = |h: &mut Harness, handle: String| { + for _ in 0..4 { + let at = crate::scenario::handle_at(&handle).unwrap(); + let top = crate::scenario::rect_of("render:page:all").unwrap().bottom() + Tokens::get().space_8; + let bottom = crate::scenario::rect_of("render:job-footer").unwrap().top() - Tokens::get().space_8; + if (top..=bottom).contains(&at.y) { + break; + } + let x = crate::scenario::rect_of("render:inspector").unwrap().center().x; + h.call("ui.scroll", json!({"x":x,"y":(top+bottom)/2.0,"delta":at.y.clamp(top,bottom)-at.y})); + h.frames(20); + } + h.step(&json!({"click":{"handle":handle}})).unwrap(); + }; for key in ["render.image_advanced", "render.studio_environment", "render.studio_lighting"] { - h.step(&json!({"click":{"handle":format!("dialog:section:{}", h.app.tr(key))}})).unwrap(); + open_section(&mut h, format!("dialog:section:{}", crate::i18n::tr(key))); } - h.step(&json!({"click":{"handle":format!("dialog:section:{} 1", h.app.tr("render.studio_area"))}})).unwrap(); + open_section(&mut h, format!("dialog:section:{} 1", crate::i18n::tr("render.studio_area"))); h.frames(3); assert_eq!(setups::snapshot(&h.app).unwrap(), expected); assert!(!h.app.render_workspace.view.dirty); @@ -2722,11 +2743,11 @@ fn product_preview_error_uses_shared_wrapped_surface_and_explicit_retry_target() h.frames(3); let rect = egui::Rect::from_min_size(egui::pos2(260.0, 200.0), egui::vec2(550.0, 360.0)); let message = "The original captured product geometry exceeds its bounded preview admission. The renderer must preserve all exact body identities and cannot silently simplify or drop geometry to paint this view."; - let output = h.ctx.run_ui( + let mut output = h.ctx.run_ui( egui::RawInput { screen_rect: Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1280.0, 800.0))), ..Default::default() }, |ui| preview_error(&mut h.app, ui, rect, message), ); - let _ = output; + output.textures_delta.clear(); let note = crate::scenario::rect_of("dialog:report:render.preview_failure").unwrap(); let retry = crate::scenario::rect_of("render:preview-retry").unwrap(); assert!(rect.contains_rect(note) && rect.contains_rect(retry)); @@ -2792,3 +2813,355 @@ fn missing_linear_master_is_never_reconstructed_from_a_finished_png() { assert!(!temp.exists()); assert_eq!(h.app.session.render_job_handle(id).unwrap().frame().unwrap().unwrap().png(), bytes); } + +#[test] +fn render_workspace_stage_commands_keep_registered_actions_without_a_ribbon() { + let mut h = Harness::new(); + enter(&mut h.app, true).unwrap(); + assert!(crate::workspace::visible_tabs(&h.app).is_empty()); + for command in solidcraft_engine::command_specs().into_iter().filter(|c| c.id.starts_with("render.") || c.tab.starts_with("RENDER")) { + assert!(solidcraft_engine::find_command(command.id).is_some()); + assert!(crate::workspace::destination(command).is_none(), "{} has a ribbon destination", command.id); + } + for tab in ["RENDER", "RENDER APPEARANCE", "RENDER SCENE", "RENDER CAMERA"] { + assert!(crate::workspace::panels(tab).is_empty()); + } + h.frames(3); + assert!(crate::scenario::rect_of("ribbon:card").is_none()); + assert!(crate::scenario::rect_of("tab:RENDER").is_none()); + assert!(crate::scenario::rect_of("render:hud").is_none()); + assert_eq!(h.app.render_workspace.view.stage, Stage::Look); + assert_eq!(h.app.render_workspace.view.inspector.page, inspector::Page::Appearance); +} + +#[test] +fn render_workspace_stage_chips_dispatch_without_mutations_and_remember_each_document() { + let mut h = Harness::new(); + h.call("ui.resize", json!({"width":1440,"height":1000})); + enter(&mut h.app, true).unwrap(); + let document = h.app.session.doc.clone(); + let history = (h.app.session.revision, h.app.session.undo.len(), h.app.session.redo.len()); + for stage in Stage::ALL { + h.frames(3); + h.step(&json!({"click":{"handle":format!("render:stage:{}",stage.key())}})).unwrap(); + assert_eq!(h.app.render_workspace.view.stage, stage); + assert_eq!(h.app.render_workspace.view.inspector.page, stage.page()); + assert!(Arc::ptr_eq(&h.app.session.doc, &document)); + assert_eq!((h.app.session.revision, h.app.session.undo.len(), h.app.session.redo.len()), history); + assert!(h.app.render_workspace.view.job.is_none()); + assert!(h.app.render_workspace.view.completed.is_none()); + // Stage selection focuses pages; it does not remove the other editors. + h.step(&json!({"click":{"handle":"render:page:diagnostics"}})).unwrap(); + h.frames(2); + assert_eq!(h.app.render_workspace.view.inspector.page, inspector::Page::Diagnostics); + } + h.app.run("view.render_stage", json!({"stage":"frame"})).unwrap(); + crate::documents::open_tab(&mut h.app, Session::default()).unwrap(); + assert_eq!(h.app.render_workspace.view.stage, Stage::Look); + h.app.run("view.render_stage", json!({"stage":"light"})).unwrap(); + crate::documents::switch(&mut h.app, 0); + enter(&mut h.app, true).unwrap(); + assert_eq!(h.app.render_workspace.view.stage, Stage::Frame); + crate::documents::switch(&mut h.app, 1); + enter(&mut h.app, true).unwrap(); + assert_eq!(h.app.render_workspace.view.stage, Stage::Light); +} + +#[test] +fn render_workspace_stage_shell_degrades_without_overlap_at_small_window_sizes() { + for mode in [crate::shell::LayoutMode::Floating, crate::shell::LayoutMode::Docked] { + let mut h = Harness::new(); + enter(&mut h.app, true).unwrap(); + h.app.ui.layout = mode; + for (width, height) in [(1440, 900), (1100, 700), (800, 600), (640, 480), (320, 240), (240, 160), (120, 80), (32, 32), (1, 1)] { + h.call("ui.resize", json!({"width":width,"height":height})); + for stage in Stage::ALL { + h.app.run("view.render_stage", json!({"stage":stage.key()})).unwrap(); + h.frames(3); + let bar = crate::scenario::rect_of("render:stage_bar").unwrap(); + let workspace = crate::scenario::rect_of("ribbon:workspace").unwrap(); + assert!(bar.is_finite() && workspace.is_finite()); + assert_eq!(bar.top(), workspace.top()); + assert_eq!(bar.height(), workspace.height()); + assert!(!bar.intersect(workspace).is_positive()); + if width >= 1100 { + assert_eq!(bar.height(), 88.0); + assert_eq!(workspace.width(), 104.0); + assert_eq!(bar.left() - workspace.right(), 8.0); + let header = crate::scenario::rect_of("render:stage_header").unwrap(); + let tools = crate::scenario::rect_of("render:stage_tools").unwrap(); + assert_eq!(header.height(), 36.0); + assert_eq!(tools.height(), 52.0); + assert_eq!(header.bottom(), tools.top()); + assert_eq!(header.top(), bar.top()); + assert_eq!(tools.bottom(), bar.bottom()); + } + let docks: Vec<_> = + ["render:browser", "render:inspector"].iter().filter_map(|id| h.app.shell.workspace_panels.get(id).map(|(r, _)| *r)).collect(); + if let [browser, inspector] = docks.as_slice() { + assert!((browser.top() - inspector.top()).abs() < 1.0); + assert!((browser.bottom() - inspector.bottom()).abs() < 1.0); + assert!(!browser.intersect(*inspector).is_positive()); + if width >= 1100 { + assert_eq!(browser.width(), 266.0); + assert_eq!(inspector.width(), 305.0); + assert_eq!(browser.top() - bar.bottom(), 8.0); + let (strip, _) = h.app.shell.workspace_panels.get("render:shots_strip").unwrap(); + assert_eq!(strip.top() - browser.bottom(), 8.0); + assert_eq!(strip.height(), 48.0); + } + } + for dock in docks { + assert!(!dock.intersect(bar).is_positive(), "{width}×{height}: {dock:?} {bar:?}"); + if let Some((strip, _)) = h.app.shell.workspace_panels.get("render:shots_strip") { + assert!(!dock.intersect(*strip).is_positive(), "{width}×{height}: {dock:?} {strip:?}"); + } + } + } + } + } +} + +#[test] +fn render_workspace_shots_toggle_persists_and_design_roundtrip_preserves_state() { + let mut h = Harness::new(); + h.call("ui.resize", json!({"width":1440,"height":1000})); + h.app.run("solid.box", json!({"length":20,"width":15,"height":10,"body_name":"Subject"})).unwrap(); + h.app.session.selection = vec![solidcraft_engine::Sel::Body { name: "Subject".into() }]; + h.app.cam.yaw = 0.71; + h.app.cam.pitch = 0.23; + h.app.cam.roll = 0.17; + let camera = h.app.cam; + let selection = h.app.session.selection.clone(); + let document = h.app.session.doc.clone(); + let state = ( + h.app.session.undo.len(), + h.app.session.redo.len(), + h.app.session.revision, + h.app.ui.show_timeline, + h.app.preferences.timeline_left, + h.app.preferences.timeline_collapsed, + ); + enter(&mut h.app, true).unwrap(); + h.frames(3); + let strip = crate::scenario::rect_of("render:shots_strip").unwrap(); + assert!((strip.height() - 48.0).abs() <= 1.0, "{strip:?}"); + h.step(&json!({"click":{"handle":"render:shots:hide"}})).unwrap(); + assert!(!h.app.preferences.render_shots_strip); + enter(&mut h.app, false).unwrap(); + h.frames(3); + assert_eq!(h.app.cam, camera); + assert_eq!(h.app.session.selection, selection); + assert_eq!(h.app.session.doc, document); + assert_eq!( + state, + ( + h.app.session.undo.len(), + h.app.session.redo.len(), + h.app.session.revision, + h.app.ui.show_timeline, + h.app.preferences.timeline_left, + h.app.preferences.timeline_collapsed + ) + ); + enter(&mut h.app, true).unwrap(); + h.frames(3); + assert!(crate::scenario::rect_of("render:shots_strip").is_none()); + assert!(crate::scenario::rect_of("render:shots:show").is_some()); + let saved = h.app.prefs(); + let mut next = Harness::new(); + next.app.load_prefs(&saved); + assert!(!next.app.preferences.render_shots_strip); + h.frames(2); + h.app.start("view.shots_strip"); + assert!(h.app.preferences.render_shots_strip); + h.frames(3); + assert!(crate::scenario::rect_of("render:shots_strip").is_some()); + assert_eq!(h.app.session.doc, document); + assert_eq!(h.app.session.undo.len(), state.0); +} + +#[test] +fn render_workspace_canvas_controls_and_fit_respect_panels_and_shots_in_both_layouts() { + for layout in [crate::shell::LayoutMode::Floating, crate::shell::LayoutMode::Docked] { + let mut h = Harness::new(); + h.app.ui.layout = layout; + h.call("ui.resize", json!({"width":1600,"height":1000})); + h.app.run("solid.box", json!({"length":60,"width":40,"height":30})).unwrap(); + enter(&mut h.app, true).unwrap(); + h.frames(4); + h.app.cam.fov = 0.9; + h.app.start("render.camera.fit"); + h.frames(4); + assert_eq!(h.app.cam.fov, 0.9); + let free = crate::shell::content_rect(&h.app, h.app.viewport.rect.unwrap()); + let layout = h.app.viewport.layout.as_ref().unwrap(); + assert!(free.contains_rect(layout.navigation), "{free:?} {layout:?}"); + assert!((layout.navigation.center().x - free.center().x).abs() < 1.0); + assert_product_fits_canvas(&h.app); + } +} + +#[test] +fn render_workspace_old_personal_pins_migrate_once_to_task_tabs() { + let mut custom = crate::toolbar_custom::ToolbarCustom::default(); + custom.load(&json!({"version":2,"panels":{ + "DESIGN/RENDER/SCENE":["render.settings.get","render.preset.resolve","solid.box"], + "DESIGN/RENDER/LIGHTING":["render.library.studio.apply"], + "DESIGN/RENDER/CAMERA":["render.settings.apply","render.camera.fit"], + "DESIGN/RENDER/IMAGE":["render.export","render.start"], + "DESIGN/RENDER/OUTPUT":["render.preflight"] + }})); + assert_eq!(custom.panels["DESIGN/RENDER CAMERA/SHOTS"], ["render.settings.get", "solid.box"]); + assert_eq!(custom.panels["DESIGN/RENDER SCENE/STUDIO"], ["render.preset.resolve", "render.library.studio.apply"]); + assert_eq!(custom.panels["DESIGN/RENDER CAMERA/VIEW"], ["render.settings.apply"]); + assert_eq!(custom.panels["DESIGN/RENDER/RESULT"], ["render.export"]); + assert_eq!(custom.panels["DESIGN/RENDER/RENDER"], ["render.start", "render.preflight"]); + let saved = custom.prefs(); + custom.load(&saved); + assert_eq!(custom.prefs(), saved); +} + +#[test] +fn render_workspace_scene_vocabulary_migrates_previous_shell_pins_once() { + let mut custom = crate::toolbar_custom::ToolbarCustom::default(); + custom.load(&json!({"version":2,"panels":{ + "DESIGN/RENDER LIGHTING/LIGHTING":["render.library.studio.apply","render.lights.solo"], + "DESIGN/RENDER LIGHTING/ENVIRONMENT":["render.library.environment.apply","render.hdr.inspect"], + "DESIGN/RENDER/OUTPUT":["render.preflight","render.quality.prepare"], + "DESIGN/RENDER/RESULTS":["render.export","render.effects.describe"] + }})); + assert_eq!(custom.panels["DESIGN/RENDER SCENE/STUDIO"], ["render.library.studio.apply", "render.library.environment.apply"]); + assert_eq!(custom.panels["DESIGN/RENDER SCENE/LIGHTS"], ["render.lights.solo"]); + assert_eq!(custom.panels["DESIGN/RENDER SCENE/STAGE"], ["render.hdr.inspect"]); + assert_eq!(custom.panels["DESIGN/RENDER/IMAGE"], ["render.quality.prepare", "render.effects.describe"]); + assert_eq!(custom.panels["DESIGN/RENDER/RENDER"], ["render.preflight"]); + assert_eq!(custom.panels["DESIGN/RENDER/RESULT"], ["render.export"]); + let saved = custom.prefs(); + custom.load(&saved); + assert_eq!(custom.prefs(), saved); +} + +fn assert_product_fits_canvas(app: &SolveApp) { + let layout = app.viewport.layout.as_ref().unwrap(); + let free = crate::shell::content_rect(app, layout.viewport); + assert!(free.contains_rect(layout.drawable), "fit region {:?} outside canvas {free:?}", layout.drawable); + let bounds = solidcraft_engine::product_scene::extract(&app.session).unwrap().bounds; + for x in [bounds.min.x, bounds.max.x] { + for y in [bounds.min.y, bounds.max.y] { + for z in [bounds.min.z, bounds.max.z] { + let (sx, sy, _) = app + .cam + .to_screen( + solidcraft_engine::geom::Vec3::new(x, y, z), + f64::from(layout.viewport.width()), + f64::from(layout.viewport.height()), + bounds.diagonal().max(10.0), + ) + .unwrap(); + let at = layout.viewport.min + egui::vec2(sx as f32, sy as f32); + assert!(layout.drawable.contains(at), "product corner {at:?} outside {:?}", layout.drawable); + } + } + } +} + +#[test] +fn render_workspace_hosts_float_and_shield_input_in_both_ribbon_layouts() { + for layout in [crate::shell::LayoutMode::Floating, crate::shell::LayoutMode::Docked] { + let mut h = Harness::new(); + h.app.ui.layout = layout; + h.call("ui.resize", json!({"width":1600,"height":1000})); + h.app.run("solid.box", json!({"length":30,"width":20,"height":10})).unwrap(); + h.frames(4); + + enter(&mut h.app, true).unwrap(); + h.frames(4); + let viewport = h.app.viewport.rect.unwrap(); + let history = crate::timeline::floating_rect(viewport); + let shots = crate::scenario::rect_of("render:shots_strip").unwrap(); + assert!((shots.height() - 48.0).abs() <= 1.0, "{layout:?}: {shots:?}"); + assert!( + (shots.left() - history.left()).abs() < 1.0 + && (shots.right() - history.right()).abs() < 1.0 + && (shots.bottom() - history.bottom()).abs() < 1.0, + "Shots must reuse History's floating placement: {shots:?} {history:?}" + ); + for key in ["render:inspector", "render:browser", "render:shots_strip"] { + let (card, _) = h.app.shell.workspace_panels.get(key).unwrap(); + assert!(viewport.contains_rect(*card), "{layout:?} {key}: {card:?} outside {viewport:?}"); + assert!(crate::shell::covered(&h.app, card.center()), "{key} must shield the viewport"); + } + let inspector = h.app.shell.workspace_panels["render:inspector"].0; + let browser = h.app.shell.workspace_panels["render:browser"].0; + let ribbon_bottom = h.app.shell.cards.iter().map(|r| r.bottom()).fold(0.0, f32::max); + assert!((inspector.bottom() - browser.bottom()).abs() < 1.0); + for key in ["render:browser", "render:inspector"] { + let card = h.app.shell.workspace_panels[key].0; + assert!( + (card.top() - ribbon_bottom - Tokens::get().space_8).abs() < 1.0, + "{layout:?} {key}: gap {} must be 8 pt", + card.top() - ribbon_bottom + ); + } + for key in ["render:browser", "render:inspector"] { + let card = h.app.shell.workspace_panels[key].0; + let header = crate::scenario::rect_of(&format!("{key}:header")).unwrap(); + assert!((header.height() - crate::ui_kit::header_height()).abs() < 0.1, "{key}: {header:?}"); + assert!((header.top() - card.top()).abs() <= 1.0, "header must have no outer content padding"); + let control = crate::scenario::rect_of(if key == "render:browser" { "render:browser-library" } else { "render:page:output" }).unwrap(); + assert!(control.top() >= header.bottom(), "navigation must be below the standard header: {control:?} {header:?}"); + } + + assert!(browser.left() > viewport.left() && inspector.right() < viewport.right()); + assert!(inspector.bottom() < shots.top() && browser.bottom() < shots.top()); + let camera = h.app.cam; + h.step( + &json!({"drag":[[inspector.center().x,inspector.center().y],[inspector.center().x-30.0,inspector.center().y+20.0]],"button":"middle"}), + ) + .unwrap(); + assert_eq!(h.app.cam, camera, "middle dragging over the card must not reach the model"); + h.step(&json!({"click":{"handle":"render:shots:hide"}})).unwrap(); + h.frames(3); + assert_eq!(h.app.viewport.rect, Some(viewport), "floating strips must preserve the viewport projection"); + let pill = h.app.shell.workspace_panels["render:shots:show"].0; + assert!(crate::shell::covered(&h.app, pill.center())); + enter(&mut h.app, false).unwrap(); + h.frames(3); + assert!(h.app.shell.workspace_panels.is_empty(), "Render card reservations must not leak into Design"); + } +} + +#[test] +fn render_workspace_card_grips_swap_sides_and_resize_without_design_edits() { + for layout in [crate::shell::LayoutMode::Floating, crate::shell::LayoutMode::Docked] { + let mut h = Harness::new(); + h.app.ui.layout = layout; + h.call("ui.resize", json!({"width":1600,"height":1000})); + enter(&mut h.app, true).unwrap(); + h.frames(4); + let document = h.app.session.doc.clone(); + let history = (h.app.session.undo.len(), h.app.session.redo.len()); + let camera = h.app.cam; + h.step(&json!({"drag":[{"handle":"render:inspector:grip"},[100.0,350.0]],"steps":8})).unwrap(); + h.frames(3); + assert_eq!(h.app.preferences.render_inspector_side, "left"); + assert_eq!(h.app.preferences.render_browser_side, "right"); + assert!(h.app.shell.workspace_panels["render:inspector"].0.right() < h.app.shell.workspace_panels["render:browser"].0.left()); + let width = h.app.preferences.render_inspector_width; + let rail = crate::scenario::handle_at("render:inspector:resize").unwrap(); + h.step(&json!({"drag":[[rail.x,rail.y],[rail.x+50.0,rail.y]],"steps":8})).unwrap(); + h.frames(3); + assert!(h.app.preferences.render_inspector_width > width); + h.step(&json!({"click":{"handle":"render:browser-library"}})).unwrap(); + h.frames(3); + h.step(&json!({"drag":[{"handle":"render:browser:grip"},[100.0,350.0]],"steps":8})).unwrap(); + h.frames(3); + assert_eq!(h.app.preferences.render_browser_side, "left"); + assert_eq!(h.app.preferences.render_inspector_side, "right"); + assert!(h.app.shell.workspace_panels["render:browser"].0.right() < h.app.shell.workspace_panels["render:inspector"].0.left()); + assert_eq!(h.app.cam, camera, "card gestures must not move the camera"); + assert_eq!(h.app.session.doc, document); + assert_eq!((h.app.session.undo.len(), h.app.session.redo.len()), history); + } +} diff --git a/crates/ui-egui/src/scenario.rs b/crates/ui-egui/src/scenario.rs index 42ae52b14..8cf72ff1b 100644 --- a/crates/ui-egui/src/scenario.rs +++ b/crates/ui-egui/src/scenario.rs @@ -845,7 +845,12 @@ pub fn check(h: &mut Harness, e: &Value) -> Result<(), String> { .filter_map(|l| m.area_rect(l.id).map(|r| (l.id, r))) .collect() }); + // Workspace panels (docks and strips) are laid out against the viewport, not sized like dialogs. + let panels: Vec = h.app.shell.workspace_panels.values().map(|(rect, _)| *rect).collect(); for (id, r) in rects { + if panels.iter().any(|p| (p.min - r.min).abs().max_elem() < 1.0 && (p.max - r.max).abs().max_elem() < 1.0) { + continue; + } if r.width() > max_w || !screen.expand(1.0).contains_rect(r) { return Err(format!("window {id:?} at {r:?} (width {:.0}) does not fit {screen:?} at ≤{max_w}", r.width())); } diff --git a/crates/ui-egui/src/shell.rs b/crates/ui-egui/src/shell.rs index 17f0b0e09..ae7c63542 100644 --- a/crates/ui-egui/src/shell.rs +++ b/crates/ui-egui/src/shell.rs @@ -93,6 +93,8 @@ impl Cards { pub(crate) struct State { pub cards: Vec, pub panels: Vec, + /// Actual floating workspace surfaces and their optional canvas reservation. + pub workspace_panels: std::collections::BTreeMap<&'static str, (Rect, Option)>, pub browser: Option, pub history: Option, /// In-memory seam drag width, never serialized as a preference. @@ -109,10 +111,37 @@ pub(crate) struct State { pub dialog_column: Option, } +/// Register the actual card, so fitting and pointer shielding use the same rectangle. +pub(crate) fn register_panel(app: &mut SolveApp, id: &'static str, rect: Option, edge: Option) { + if let Some(rect) = rect.filter(|r| r.is_finite() && r.is_positive()) { + app.shell.workspace_panels.insert(id, (rect, edge)); + } else { + app.shell.workspace_panels.remove(id); + } +} + +/// Shared workspace-card bounds below the ribbon and above a floating bottom strip. +pub(crate) fn panel_bounds(app: &SolveApp, mut available: Rect) -> Rect { + for card in &app.shell.cards { + available.min.y = card.bottom().clamp(available.top(), available.bottom()); + } + if crate::render_workspace::active(app) { + let bottom = app.shell.cards.iter().map(|r| r.bottom()).fold(available.top() - Tokens::get().space_8, f32::max); + available.min.y = (bottom + Tokens::get().space_8).min(available.bottom()); + } + for (rect, edge) in app.shell.workspace_panels.values() { + if matches!(edge, Some(crate::ui_kit::Edge::Bottom)) { + available.max.y = rect.top().clamp(available.top(), available.bottom()); + } + } + available +} + /// One source of occlusion for navigation, picking, overlays and fit. pub(crate) fn covered_rects(app: &SolveApp) -> Vec { let mut rects = Vec::new(); - if Container::for_layout(app.ui.layout, Surface::Panel).floating() { + rects.extend(app.shell.workspace_panels.values().map(|(rect, _)| *rect)); + if crate::render_workspace::active(app) || Container::for_layout(app.ui.layout, Surface::Panel).floating() { rects.extend(app.shell.cards.iter().copied()); rects.extend(app.shell.panels.iter().copied()); if crate::agent_chat::shown(app) && app.agent_chat.open && !app.preferences.agent_chat_popped { @@ -163,6 +192,19 @@ pub(crate) fn content_rect(app: &SolveApp, viewport: Rect) -> Rect { /// Free anchor space shared by both layouts. Compact edge hosts have already consumed /// their allocation; content-hugging Browser and floating overlays reserve their measured span. pub(crate) fn workspace_content(app: &SolveApp, mut content: Rect) -> Rect { + if crate::render_workspace::active(app) { + let gap = Container::floating_card(Surface::Panel).gap(); + for (rect, edge) in app.shell.workspace_panels.values() { + match edge { + Some(crate::ui_kit::Edge::Left) => content.min.x = (rect.right() + gap).clamp(content.left(), content.right()), + Some(crate::ui_kit::Edge::Right) => content.max.x = (rect.left() - gap).clamp(content.left(), content.right()), + Some(crate::ui_kit::Edge::Bottom) => content.max.y = (rect.top() - gap).clamp(content.top(), content.bottom()), + Some(crate::ui_kit::Edge::Top) => content.min.y = (rect.bottom() + gap).clamp(content.top(), content.bottom()), + None => {} + } + } + return content; + } let gap = Container::for_layout(app.ui.layout, Surface::Panel).gap(); if let Some(history) = app.shell.history { if app.preferences.timeline_left { diff --git a/crates/ui-egui/src/shortcut_box.rs b/crates/ui-egui/src/shortcut_box.rs index a64f76cf8..857ded954 100644 --- a/crates/ui-egui/src/shortcut_box.rs +++ b/crates/ui-egui/src/shortcut_box.rs @@ -140,7 +140,8 @@ pub fn search(app: &SolveApp, q: &str) -> Vec { .filter(|c| !crate::workspace::AGENT_ONLY.contains(&c.id)) .filter_map(|c| { let (home_tab, home_panel) = crate::workspace::destination(c).unwrap_or(("", "")); - let (label, tab, panel) = (crate::i18n::tr_label(c.label), crate::i18n::tr_label(home_tab), crate::i18n::tr_label(home_panel)); + let (label, tab, panel) = + (crate::i18n::tr_label(c.label), crate::i18n::tr_label(crate::workspace::tab_label(home_tab)), crate::i18n::tr_label(home_panel)); let place = (!home_tab.is_empty()).then_some((tab, panel)); let s = score(&q, label) .max(score(&q, c.label)) diff --git a/crates/ui-egui/src/theme.rs b/crates/ui-egui/src/theme.rs index 16358f217..b8574ede1 100644 --- a/crates/ui-egui/src/theme.rs +++ b/crates/ui-egui/src/theme.rs @@ -285,7 +285,7 @@ impl TabAccent { "MESH" => (t.mesh_fill, t.mesh_ink, t.mesh_soft), "FORM" => (t.form_fill, t.form_tab_ink, t.form_soft), "SHEET METAL" => (t.sheet_fill, t.sheet_ink, t.sheet_soft), - "RENDER" => (t.render_fill, t.render_ink, t.render_soft), + "RENDER" | "RENDER APPEARANCE" | "RENDER SCENE" | "RENDER CAMERA" => (t.render_fill, t.render_ink, t.render_soft), // Model and shared utility tabs retain their existing selection exactly. _ => (t.accent, t.selected_ink, t.accent_soft), }; diff --git a/crates/ui-egui/src/timeline.rs b/crates/ui-egui/src/timeline.rs index e263a7974..606f5da7c 100644 --- a/crates/ui-egui/src/timeline.rs +++ b/crates/ui-egui/src/timeline.rs @@ -464,9 +464,7 @@ pub fn timeline(app: &mut SolveApp, ui: &mut egui::Ui) { } pub(crate) fn floating_rect(available: Rect) -> Rect { - let gap = crate::shell::SHELL_GAP; - let inset = available.shrink(gap); - Rect::from_min_max(pos2(inset.left(), (inset.bottom() - 40.0).max(inset.top())), inset.max) + Container::floating_card(Surface::Panel).bottom_strip_rect(available, 40.0) } fn timeline_contents(app: &mut SolveApp, ui: &mut egui::Ui, floating: bool) { diff --git a/crates/ui-egui/src/toolbar.rs b/crates/ui-egui/src/toolbar.rs index 4cbf16b37..45587f5c1 100644 --- a/crates/ui-egui/src/toolbar.rs +++ b/crates/ui-egui/src/toolbar.rs @@ -967,7 +967,7 @@ fn ribbon_button_galley(painter: &egui::Painter, label: &str, width: f32, color: /// Ribbon headings use the translated labels, with normal word casing instead of registry caps. fn ribbon_label(app: &SolveApp, label: &str) -> String { let label = app - .tr_label(label) + .tr_label(crate::workspace::tab_label(label)) .split_whitespace() .map(|word| { let lower = word.to_lowercase(); @@ -1042,7 +1042,32 @@ fn ribbon_tabs(app: &mut SolveApp, ui: &mut egui::Ui, row: Rect) { let floating = Container::for_layout(app.ui.layout, Surface::Panel).floating(); let inset = RIBBON_TAB_INSET; let corner = if floating { t.radius_lg.saturating_sub(inset as u8).max(t.radius_sm / 2) } else { t.control_radius.saturating_sub(1) }; - let search = Rect::from_min_size(pos2(row.right() - search_width - inset, row.top() + inset), vec2(search_width, TAB_ROW_HEIGHT - 2.0 * inset)); + let render = crate::render_workspace::active(app); + let action_labels = [app.tr_label("Render").to_string(), app.tr_label("Cancel").to_string()]; + let action_widths = action_labels + .each_ref() + .map(|label| ui.painter().layout_no_wrap(label.clone(), crate::fonts::semibold(t.font_button), t.text).size().x + 24.0); + let action_width = if render { action_widths.iter().sum::() + 2.0 * t.space_2 } else { 0.0 }; + let search = Rect::from_min_size( + pos2(row.right() - search_width - inset - action_width, row.top() + inset), + vec2(search_width, TAB_ROW_HEIGHT - 2.0 * inset), + ); + if render { + let mut x = search.right() + t.space_2; + for ((id, label), width) in ["render.start", "render.cancel"].into_iter().zip(action_labels).zip(action_widths) { + let rect = Rect::from_min_size(pos2(x, row.top() + inset), vec2(width, search.height())); + let ready = crate::render_workspace::job_ready(app, id); + let response = crate::ui_kit::button_at(ui, id, rect, label, crate::ui_kit::Button::Enabled(ready.is_ok())); + crate::scenario::publish_target(&format!("ribbon:{id}"), response.rect); + if response.clicked() { + app.start(id); + } + if let Err(reason) = ready { + response.on_disabled_hover_text(reason); + } + x += width + t.space_2; + } + } // The single editor is drawn on the foreground layer by shortcut_box::show, so it // can grow over the ribbon without being clipped to the tab row. ui.ctx().data_mut(|d| d.insert_temp(egui::Id::new("sc_ribbon_search"), search)); @@ -1118,34 +1143,55 @@ fn dropdown_arrow(painter: &egui::Painter, at: egui::Pos2, ink: Color32) { crate::ui_kit::dropdown_indicator(painter, Rect::from_center_size(at, vec2(10.0, 10.0)), ink); } +pub(crate) fn shell_layout(app: &SolveApp) -> crate::shell::LayoutMode { + if crate::render_workspace::active(app) { crate::shell::LayoutMode::Floating } else { app.ui.layout } +} + +pub(crate) fn shell_cards(app: &SolveApp, available: Rect) -> crate::shell::Cards { + if crate::render_workspace::active(app) { + crate::ui_kit::StageBar::cards(available) + } else { + crate::shell::Cards::new(available, shell_layout(app), ribbon_height(app.preferences.ribbon_labels)) + } +} + pub fn toolbar(app: &mut SolveApp, ui: &mut egui::Ui) { let t = Tokens::get(); crate::workspace::sync_context(app); - let floating = Container::for_layout(app.ui.layout, Surface::Panel).floating(); + let layout = shell_layout(app); + let floating = Container::for_layout(layout, Surface::Panel).floating(); let labels = app.preferences.ribbon_labels; let button_height = if labels { BUTTON_HEIGHT } else { ICON_BUTTON_HEIGHT }; let group_height = if labels { GROUP_HEIGHT } else { ICON_GROUP_HEIGHT }; let ribbon_height = ribbon_height(labels); let gallery_width = if labels { CONSTRAINT_GRID_WIDTH } else { 6.0 * 27.0 }; - let cards = crate::shell::Cards::new(ui.available_rect_before_wrap(), app.ui.layout, ribbon_height); + let cards = shell_cards(app, ui.available_rect_before_wrap()); let height = if floating { cards.bottom - ui.available_rect_before_wrap().top() } else { ribbon_height }; let fill = if floating { Color32::TRANSPARENT } else { t.toolbar }; - let ribbon = Container::new(ui.ctx(), Surface::Chrome).edge("sc_toolbar", Edge::Top); - let frame = Container::new(ui.ctx(), Surface::Chrome).edge_frame(fill); + let host = Container::for_layout(layout, Surface::Chrome); + let ribbon = host.edge("sc_toolbar", Edge::Top); + let frame = host.edge_frame(fill); let chrome = ribbon.exact_size(height).show_separator_line(false).frame(frame).show(ui, |ui| { let r = if floating { Rect::from_min_max(cards.workspace.min, cards.ribbon.max) } else { frame.outer_rect(ui.max_rect()) }; let ws = if floating { cards.workspace } else { Rect::from_min_size(r.left_top(), vec2(WORKSPACE_WIDTH, ribbon_height - 1.0)) }; let ribbon_left = if floating { cards.ribbon.left() } else { ws.right() }; if floating { for card in [ws, cards.ribbon] { - let frame = Container::new(ui.ctx(), Surface::Chrome).frame(ui.ctx(), t.toolbar, crate::frame::Side::Left); + let fill = + if crate::render_workspace::active(app) && card == ws { crate::theme::TabAccent::current(ui.ctx()).soft } else { t.toolbar }; + let frame = host.frame(ui.ctx(), fill, crate::frame::Side::Left); ui.painter().add(frame.paint(card)); // Blank card space owns clicks as well as its buttons. ui.interact(card, ui.id().with(("shell_card", card.left().to_bits())), Sense::click_and_drag()); } - crate::scenario::publish_rect("ribbon:card", cards.ribbon); + if !crate::render_workspace::active(app) { + crate::scenario::publish_rect("ribbon:card", cards.ribbon); + } } app.shell.cards = vec![ws, Rect::from_min_max(pos2(ribbon_left, r.top()), r.max)]; + if crate::render_workspace::active(app) { + ui.set_clip_rect(ui.clip_rect().intersect(r)); + } let painter = ui.painter().clone(); let bg = ui.interact(if floating { cards.ribbon } else { r }, ui.id().with("toolbar_bg"), Sense::click()); if bg.secondary_clicked() { @@ -1157,42 +1203,56 @@ pub fn toolbar(app: &mut SolveApp, ui: &mut egui::Ui) { painter.rect_filled(ws, if floating { t.radius_lg } else { 0 }, t.hover); } // Keep the accent straight while leaving the floating card's top corners round. - let accent_inset = if floating { f32::from(t.radius_lg) } else { 0.0 }; + let accent_inset = if crate::render_workspace::active(app) { + t.space_12 + } else if floating { + f32::from(t.radius_lg) + } else { + 0.0 + }; painter.rect_filled( Rect::from_min_size(ws.left_top() + vec2(accent_inset, 0.0), vec2((ws.width() - 2.0 * accent_inset).max(0.0), t.space_3)), egui::CornerRadius { nw: 0, ne: 0, sw: if floating { t.radius_sm / 2 } else { 0 }, se: if floating { t.radius_sm / 2 } else { 0 } }, - t.accent, + if crate::render_workspace::active(app) { crate::theme::TabAccent::current(ui.ctx()).color } else { t.accent }, ); if !floating { t.secondary_line(&painter, [ws.right_top(), ws.right_bottom()], t.border); } let render = crate::render_workspace::active(app); - let workspace_icon = if render { "ws_render" } else { "ws_design" }; - icons::paint_icon( - &painter, - Rect::from_center_size(pos2(ws.center().x, ws.top() + if labels { 39.0 } else { 25.0 }), vec2(30.0, 30.0)), - workspace_icon, - 1.0, - ); - ribbon_text( - ui, - pos2(ws.center().x, ws.top() + if labels { 69.0 } else { 50.0 }), - app.tr(if render { "ui.render" } else { "ui.design" }), - t.font_button, - t.text, - true, - ); - let label = app.tr("ui.ribbon_workspace"); - let label_width = - painter.layout_no_wrap(label.to_string(), FontId::proportional(crate::theme::Tokens::get().font_small), t.text_dim).size().x; - ribbon_text(ui, pos2(ws.center().x - 6.0, ws.top() + if labels { 89.0 } else { 70.0 }), label, t.font_small, t.text_dim, false); - dropdown_arrow(&painter, pos2(ws.center().x - 6.0 + label_width / 2.0 + 7.0, ws.top() + if labels { 89.5 } else { 70.5 }), t.text_dim); + if render { + crate::ui_kit::StageBar::workspace(ui, ws, "ws_render", app.tr("ui.render"), app.tr("ui.ribbon_workspace")); + } else { + let workspace_icon = if render { "ws_render" } else { "ws_design" }; + icons::paint_icon( + &painter, + Rect::from_center_size(pos2(ws.center().x, ws.top() + if labels { 39.0 } else { 25.0 }), vec2(30.0, 30.0)), + workspace_icon, + 1.0, + ); + ribbon_text( + ui, + pos2(ws.center().x, ws.top() + if labels { 69.0 } else { 50.0 }), + app.tr(if render { "ui.render" } else { "ui.design" }), + t.font_button, + t.text, + true, + ); + let label = app.tr("ui.ribbon_workspace"); + let label_width = + painter.layout_no_wrap(label.to_string(), FontId::proportional(crate::theme::Tokens::get().font_small), t.text_dim).size().x; + ribbon_text(ui, pos2(ws.center().x - 6.0, ws.top() + if labels { 89.0 } else { 70.0 }), label, t.font_small, t.text_dim, false); + dropdown_arrow(&painter, pos2(ws.center().x - 6.0 + label_width / 2.0 + 7.0, ws.top() + if labels { 89.5 } else { 70.5 }), t.text_dim); + } if wresp.on_hover_text(app.tr("ui.change_workspace")).clicked() { crate::context_menu::toggle_for(app, ws, ws.left_bottom(), crate::context_menu::Target::Workspace); } crate::scenario::publish_rect("toolbar", r); crate::scenario::publish_rect("workspace_switcher", ws); crate::scenario::publish_target("ribbon:workspace", ws); + if render { + crate::render_ui::stage_bar(app, ui, cards.ribbon); + return; + } ribbon_tabs(app, ui, Rect::from_min_max(pos2(ribbon_left, r.top()), pos2(r.right(), r.top() + TAB_ROW_HEIGHT))); // Panels. let tab = app.ui.tab.clone(); @@ -1259,17 +1319,7 @@ pub fn toolbar(app: &mut SolveApp, ui: &mut egui::Ui) { let right = r.right(); // The Sketch exit group follows the last sketch panel, and is always kept room for so it // stays reachable at every width; when panels go into the » menu it moves to the far right. - let finish_plan = sizes.last().and_then(|size| { - if tab == "SKETCH" { - Some(Plan::full(size)) - } else if tab == "RENDER" { - // Personal pins remain uncapped: extra Image actions use the same - // trimming/menu policy rather than overflowing a fixed reservation. - fit(std::slice::from_ref(size), (right - 4.0 - px).clamp(0.0, 240.0)).pop() - } else { - None - } - }); + let finish_plan = sizes.last().and_then(|size| if tab == "SKETCH" { Some(Plan::full(size)) } else { None }); let finish_width = finish_plan.as_ref().map_or(0.0, |p| p.width().max(80.0)); let normal_count = sizes.len().saturating_sub(usize::from(finish_plan.is_some())); let mut plans = fit(sizes.get(..normal_count).unwrap_or_default(), right - 4.0 - px - finish_width); @@ -1293,7 +1343,7 @@ pub fn toolbar(app: &mut SolveApp, ui: &mut egui::Ui) { let collapsed = plan.fit == Fit::Collapsed || (shown.is_empty() && !cmds.is_empty()); let trimmed = plan.shown < plan.widths.len(); let finish = tab == "SKETCH" && *panel == "FINISH SKETCH"; - let pinned = finish || (tab == "RENDER" && *panel == "IMAGE"); + let pinned = finish; let width = if pinned { finish_width } else { plan.width() }; if pinned && finish_right { px = right - finish_width; @@ -1386,7 +1436,12 @@ pub fn toolbar(app: &mut SolveApp, ui: &mut egui::Ui) { } let accent = crate::theme::TabAccent::for_tab(&t, &tab); let family_open = family.is_some_and(|f| egui::Popup::is_id_open(ui.ctx(), ui.id().with(("family", f.label)).with("popup"))); - if !finish && (resp.is_pointer_button_down_on() || running.as_deref() == Some(selected.id) || family_open) { + if !finish + && (resp.is_pointer_button_down_on() + || running.as_deref() == Some(selected.id) + || family_open + || (selected.id == "view.shots_strip" && app.preferences.render_shots_strip)) + { painter.rect(whole, t.radius_sm, accent.soft, Stroke::new(1.0, accent.color), egui::StrokeKind::Inside); } else if resp.hovered() && info.enabled { painter.rect_filled(whole, t.radius_sm, t.hover); @@ -1701,7 +1756,7 @@ pub fn toolbar(app: &mut SolveApp, ui: &mut egui::Ui) { } }); if floating { - let frame = Container::new(ui.ctx(), Surface::Chrome).frame(ui.ctx(), t.toolbar, crate::frame::Side::Left); + let frame = host.frame(ui.ctx(), t.toolbar, crate::frame::Side::Left); for card in [cards.workspace, cards.ribbon] { Container::paint_inset(ui.painter(), frame.widget_rect(card), frame); } @@ -1805,7 +1860,7 @@ fn ribbon_tooltip(app: &SolveApp, response: egui::Response, command: &solidcraft ui.add(egui::Label::new(egui::RichText::new(help).color(t.text_dim)).wrap()); } if let Some(reason) = disabled { - ui.add(egui::Label::new(egui::RichText::new(reason).color(t.text_dim)).wrap()); + ui.add(egui::Label::new(egui::RichText::new(app.tr_label(reason)).color(t.text_dim)).wrap()); } }) } @@ -1882,6 +1937,9 @@ fn dropdown_row(app: &SolveApp, ui: &mut egui::Ui, c: &'static solidcraft_engine let hot = info.enabled && (pointer_on || resp.has_focus()); let mut row = crate::ui_kit::MenuItem::new(c.id, &label, info.icon); row.enabled = info.enabled; + if c.id == "view.shots_strip" { + row.checked = Some(app.preferences.render_shots_strip); + } row.highlighted = hot; let shortcut = crate::keymap::display_for(app, c.id).unwrap_or_default(); row.shortcut = &shortcut; @@ -1902,7 +1960,7 @@ fn dropdown_row(app: &SolveApp, ui: &mut egui::Ui, c: &'static solidcraft_engine return RowAction::TogglePin; } // A disabled row says why; a documented command also shows its help (#2758). - let reason = info.disabled_reason.as_deref().filter(|_| !info.enabled); + let reason = info.disabled_reason.as_deref().filter(|_| !info.enabled).map(|reason| app.tr_label(reason)); let resp = match crate::command_help::row_tip(c.id, &label, Some(shortcut.as_str()).filter(|k| !k.is_empty()), reason) { Some(tip) => crate::command_help::tooltip(resp, c.id, tip), None => resp, @@ -3017,9 +3075,10 @@ mod dropdown_tests { h.app.run("sketch.create", json!({"plane":"XY"})).unwrap(); let cmds: Vec<_> = solidcraft_engine::command_specs().into_iter().filter(|c| c.tab == "SKETCH" && c.panel == "CREATE").collect(); crate::icon_svg::audit::start(); - let _ = h.ctx.run_ui(egui::RawInput::default(), |ui| { + let mut output = h.ctx.run_ui(egui::RawInput::default(), |ui| { sketch_create_menu(&mut h.app, ui, &cmds, &mut None, &mut None); }); + output.textures_delta.clear(); let requested = crate::icon_svg::audit::take(); crate::icon_svg::audit::stop(); for family in crate::sketch_families::FAMILIES { diff --git a/crates/ui-egui/src/toolbar_custom.rs b/crates/ui-egui/src/toolbar_custom.rs index 4cffd9bca..520a14a96 100644 --- a/crates/ui-egui/src/toolbar_custom.rs +++ b/crates/ui-egui/src/toolbar_custom.rs @@ -40,10 +40,11 @@ impl ToolbarCustom { } pub fn prefs(&self) -> Value { - json!({"version": 2, "panels": self.panels, "gallery_buttons": self.gallery_buttons}) + json!({"version": 3, "panels": self.panels, "gallery_buttons": self.gallery_buttons}) } pub fn load(&mut self, v: &Value) { - let current = v.get("version").and_then(Value::as_u64) == Some(2); + let version = v.get("version").and_then(Value::as_u64).unwrap_or(0); + let current = version >= 2; let panels = if current { v.get("panels").unwrap_or(&Value::Null) } else { v }; self.panels = panels .as_object() @@ -73,7 +74,57 @@ impl ToolbarCustom { if !current { self.migrate(); } + if version < 3 { + self.migrate_render_tabs(); + } } + /// Split the former six-section Render ribbon without losing personal pins or removals. + fn migrate_render_tabs(&mut self) { + let mut migrated_panels: BTreeMap> = BTreeMap::new(); + for (old_tab, old, targets) in [ + ("RENDER", "SCENE", &[("RENDER CAMERA", "SHOTS"), ("RENDER CAMERA", "VIEW"), ("RENDER SCENE", "STUDIO")][..]), + ("RENDER", "APPEARANCE", &[("RENDER APPEARANCE", "APPEARANCE")][..]), + ("RENDER", "LIGHTING", &[("RENDER SCENE", "STUDIO")][..]), + ("RENDER", "ENVIRONMENT", &[("RENDER SCENE", "STAGE")][..]), + ("RENDER", "CAMERA", &[("RENDER CAMERA", "LENS"), ("RENDER CAMERA", "FRAME"), ("RENDER CAMERA", "VIEW")][..]), + ("RENDER", "IMAGE", &[("RENDER", "IMAGE"), ("RENDER", "RENDER"), ("RENDER", "RESULT")][..]), + ("RENDER LIGHTING", "LIGHTING", &[("RENDER SCENE", "STUDIO"), ("RENDER SCENE", "LIGHTS")][..]), + ("RENDER LIGHTING", "ENVIRONMENT", &[("RENDER SCENE", "STAGE"), ("RENDER SCENE", "STUDIO")][..]), + ("RENDER", "OUTPUT", &[("RENDER", "RENDER"), ("RENDER", "IMAGE")][..]), + ("RENDER", "RESULTS", &[("RENDER", "RESULT"), ("RENDER", "IMAGE")][..]), + ] { + let Some(ids) = self.panels.remove(&key(old_tab, old)) else { continue }; + for &(tab, panel) in targets { + let k = key(tab, panel); + let migrated: Vec<_> = ids + .iter() + .filter(|id| solidcraft_engine::find_command(id).and_then(crate::workspace::legacy_render_destination) == Some((tab, panel))) + .cloned() + .collect(); + let list = migrated_panels.entry(k).or_default(); + for id in migrated { + if !list.contains(&id) { + list.push(id); + } + } + } + // Preserve deliberately cross-pinned commands with no destination in this split. + if let Some(&(tab, panel)) = targets.first() { + let list = migrated_panels.entry(key(tab, panel)).or_default(); + for id in ids { + let destination = solidcraft_engine::find_command(&id).and_then(crate::workspace::legacy_render_destination); + if !targets.iter().any(|target| Some(*target) == destination) && !list.contains(&id) { + list.push(id); + } + } + } + } + for (k, ids) in migrated_panels { + // New-layout customisation is authoritative when both versions are present. + self.panels.entry(k).or_insert(ids); + } + } + fn migrate(&mut self) { use std::collections::BTreeSet; let specs = command_specs(); diff --git a/crates/ui-egui/src/ui_kit/actions.rs b/crates/ui-egui/src/ui_kit/actions.rs index 98c9fbf86..ce757fdbf 100644 --- a/crates/ui-egui/src/ui_kit/actions.rs +++ b/crates/ui-egui/src/ui_kit/actions.rs @@ -549,37 +549,90 @@ pub(crate) fn compact_button(ui: &mut Ui, glyph: &str, tooltip: &str, enabled: b /// Secondary action with an existing icon, optionally using the danger ink. Keeps button handles. pub(crate) fn icon_label_button(ui: &mut Ui, label: &str, icon: &str, enabled: bool, danger: bool) -> Response { + icon_label_presentation(ui, crate::i18n::tr_label(label), Some(icon), enabled, false, danger, false) +} + +/// Compact stage actions share the icon-label button's frame, typography and hit target. +pub(super) fn icon_label_width(ui: &Ui, label: &str, icon: Option<&str>, primary: bool) -> f32 { let t = Tokens::get(); - let label = crate::i18n::tr_label(label); - let text_width = ui.painter().layout_no_wrap(label.to_string(), egui::FontId::proportional(t.font_label), t.form_ink).size().x; + let font = if primary { crate::fonts::semibold(t.font_button) } else { egui::FontId::proportional(t.font_label) }; + ui.painter().layout_no_wrap(label.into(), font, t.form_ink).size().x.ceil() + + 2.0 + * if primary { + t.space_16 + } else if icon.is_some() { + t.space_10 + } else { + t.space_12 + } + + if icon.is_some() { t.space_14 + t.space_6 } else { 0.0 } +} + +pub(super) fn icon_label_action(ui: &mut Ui, label: &str, icon: Option<&str>, enabled: bool, primary: bool) -> Response { + icon_label_presentation(ui, label, icon, enabled, primary, false, false) +} + +pub(crate) fn compact_icon_label_button(ui: &mut Ui, label: &str, icon: &str, enabled: bool) -> Response { + icon_label_presentation(ui, label, Some(icon), enabled, false, false, true) +} + +fn icon_label_presentation(ui: &mut Ui, label: &str, icon: Option<&str>, enabled: bool, primary: bool, danger: bool, dense: bool) -> Response { + let t = Tokens::get(); + let width = icon_label_width(ui, label, icon, primary); let response = ui .add_enabled_ui(enabled, |ui| { let (rect, response) = - ui.allocate_exact_size(vec2(text_width + t.space_10 * 2.0 + t.space_14 + t.space_6, t.control_height), egui::Sense::click()); - let ink = if danger { t.form_error } else { t.form_ink }; + ui.allocate_exact_size(vec2(width, if dense { t.control_height - t.space_2 } else { t.control_height }), egui::Sense::click()); + let ink = if danger { + t.form_error + } else if primary { + t.on_accent + } else { + t.form_ink + }; ui.painter().rect( rect, t.control_radius, - if response.hovered() { t.hover } else { t.control_fill }, - t.control_border_stroke(t.control_border), + if primary { + t.form_primary + } else if response.hovered() { + t.hover + } else { + t.control_fill + }, + if primary { egui::Stroke::NONE } else { t.control_border_stroke(t.control_border) }, egui::StrokeKind::Inside, ); - let icon_rect = - egui::Rect::from_center_size(egui::pos2(rect.left() + t.space_10 + t.space_14 / 2.0, rect.center().y), vec2(t.space_14, t.space_14)); - crate::icons::paint_ink(ui.painter(), icon_rect, icon, ink); + let mut left = rect.left() + + if primary { + t.space_16 + } else if icon.is_some() { + t.space_10 + } else { + t.space_12 + }; + if let Some(icon) = icon { + crate::icons::paint_ink( + ui.painter(), + egui::Rect::from_center_size(egui::pos2(left + t.space_14 / 2.0, rect.center().y), vec2(t.space_14, t.space_14)), + icon, + ink, + ); + left += t.space_14 + t.space_6; + } super::text::paint_text( ui, - egui::Rect::from_min_max(egui::pos2(icon_rect.right() + t.space_6, rect.top()), rect.max), + egui::Rect::from_min_max(egui::pos2(left, rect.top()), rect.max), label, - egui::FontId::proportional(t.font_label), + if primary { crate::fonts::semibold(t.font_button) } else { egui::FontId::proportional(t.font_label) }, ink, false, ); response.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, ui.is_enabled(), label)); + pointer_on_hover(ui, &response); response }) .inner; - pointer_on_hover(ui, &response); let key = format!("dialog:button:{}:{label}", super::layout::label(ui)); scenario::publish_handle(&key, response.rect.center()); scenario::publish_rect(&key, response.rect); diff --git a/crates/ui-egui/src/ui_kit/choice.rs b/crates/ui-egui/src/ui_kit/choice.rs index a0bb20664..ec69d77cb 100644 --- a/crates/ui-egui/src/ui_kit/choice.rs +++ b/crates/ui-egui/src/ui_kit/choice.rs @@ -12,6 +12,10 @@ use egui::{Ui, vec2}; /// Text segments retain mixed states and optional compact clipping instead of dropdown fallback. #[derive(Default)] pub(crate) struct Segments<'a> { + /// Optional leading icons retain the same text-segment geometry and accessibility. + pub icons: &'a [&'a str], + pub workspace_accent: bool, + pub dense: bool, pub states: &'a [bool], pub compact: bool, pub primary: bool, @@ -20,7 +24,8 @@ pub(crate) struct Segments<'a> { } pub(crate) fn segmented(ui: &mut Ui, selected: &mut usize, options: &[&str], config: Segments<'_>) -> bool { - let Segments { states, compact, primary, intrinsic, proportional } = config; + let Segments { icons, workspace_accent, dense, states, compact, primary, intrinsic, proportional } = config; + let accent = crate::theme::TabAccent::current(ui.ctx()); let t = Tokens::get(); let segment_width = dimension(ui.available_width()) / options.len().max(1) as f32; let widest = options @@ -42,13 +47,16 @@ pub(crate) fn segmented(ui: &mut Ui, selected: &mut usize, options: &[&str], con } let natural: Vec<_> = options .iter() - .map(|option| { - ui.painter().layout_no_wrap((*option).to_owned(), crate::fonts::semibold(t.font_label), t.form_ink).size().x.ceil() + t.space_16 + .enumerate() + .map(|(index, option)| { + ui.painter().layout_no_wrap((*option).to_owned(), crate::fonts::semibold(t.font_label), t.form_ink).size().x.ceil() + + t.space_16 + + if icons.get(index).is_some() { t.space_14 + t.space_6 + t.space_4 } else { 0.0 } }) .collect(); let total = natural.iter().sum::(); let desired = if intrinsic { total.min(dimension(ui.available_width())) } else { dimension(ui.available_width()) }; - let (rect, _) = ui.allocate_exact_size(vec2(desired, row_height()), egui::Sense::hover()); + let (rect, _) = ui.allocate_exact_size(vec2(desired, if dense { t.control_height - t.space_2 } else { row_height() }), egui::Sense::hover()); ui.painter().rect_filled(rect, t.control_radius, t.control_fill); let equal_width = rect.width() / options.len().max(1) as f32; let mut clicked = false; @@ -72,6 +80,8 @@ pub(crate) fn segmented(ui: &mut Ui, selected: &mut usize, options: &[&str], con rounding, if on && primary { t.form_primary + } else if on && workspace_accent { + accent.soft } else if on { t.selected_bg } else { @@ -84,8 +94,18 @@ pub(crate) fn segmented(ui: &mut Ui, selected: &mut usize, options: &[&str], con } let font = if on { crate::fonts::semibold(t.font_label) } else { egui::FontId::proportional(t.font_label) }; let galley = ui.painter().layout_no_wrap((*option).to_string(), font.clone(), t.form_ink); - let text_rect = - egui::Rect::from_min_size(egui::pos2(segment.center().x - galley.size().x / 2.0, segment.top()), vec2(galley.size().x, segment.height())); + let icon_width = if icons.get(index).is_some() { t.space_14 + t.space_6 } else { 0.0 }; + let text_rect = egui::Rect::from_min_size( + egui::pos2(segment.center().x - (galley.size().x + icon_width) / 2.0 + icon_width, segment.top()), + vec2(galley.size().x, segment.height()), + ); + if let Some(icon) = icons.get(index) { + let icon_rect = egui::Rect::from_center_size( + egui::pos2(text_rect.left() - t.space_6 - t.space_14 / 2.0, segment.center().y), + vec2(t.space_14, t.space_14), + ); + crate::icons::paint_ink(ui.painter(), icon_rect, icon, if on && workspace_accent { accent.ink } else { t.form_ink }); + } let text_rect = if compact { text_rect.intersect(segment.shrink2(vec2(t.space_4, 0.0))) } else { text_rect }; paint_text( ui, @@ -94,6 +114,8 @@ pub(crate) fn segmented(ui: &mut Ui, selected: &mut usize, options: &[&str], con font, if on && primary { t.on_accent + } else if on && workspace_accent { + accent.ink } else if on { t.selected_ink } else { @@ -308,6 +330,16 @@ pub(crate) fn list_picker(ui: &mut Ui, key: &str, text: &str, selected: bool) -> response } +/// Intrinsic-width selection chip for horizontal lists, sharing list-picker styling. +pub(crate) fn choice_chip(ui: &mut Ui, key: &str, text: &str, selected: bool) -> egui::Response { + let t = Tokens::get(); + let width = (ui.painter().layout_no_wrap(text.to_owned(), crate::fonts::semibold(t.font_label), t.text).size().x + t.space_24) + .clamp(t.control_height * 2.0, t.form_card_width); + let response = ui.add_sized(vec2(width, super::row_height()), egui::Button::selectable(selected, text).truncate()); + crate::scenario::publish_target(&format!("dialog:list:{key}"), response.rect); + response +} + /// A reusable draggable document-colour sample; caller supplies the existing domain payload. /// Tokens: control_height/radius, border, accent, hover. pub(crate) fn color_swatch( diff --git a/crates/ui-egui/src/ui_kit/choice_tests.rs b/crates/ui-egui/src/ui_kit/choice_tests.rs index 1e9aafcdc..7230ac374 100644 --- a/crates/ui-egui/src/ui_kit/choice_tests.rs +++ b/crates/ui-egui/src/ui_kit/choice_tests.rs @@ -127,3 +127,33 @@ fn beveled_segments_share_fill_corners_at_internal_joins() { } } } + +#[test] +fn stage_chips_reserve_the_selected_weight_for_complete_labels_in_all_five_catalogs() { + let ctx = crate::fonts::test_context(); + let bounds = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1600.0, 120.0)); + for language in ["en", "ja", "zh", "de", "ko"] { + let locale = crate::i18n::Locale::for_language(language); + let labels: Vec<_> = ["render.stage_look", "render.stage_light", "render.stage_frame", "render.stage_output"] + .iter() + .map(|key| locale.text(key).to_string()) + .collect(); + for selected in 0..4 { + let mut output = ctx.run_ui(egui::RawInput { screen_rect: Some(bounds), ..Default::default() }, |ui| { + StageBar::row(ui, bounds, false, |ui| StageBar::header(ui, selected, &labels.iter().map(String::as_str).collect::>(), &[])); + }); + output.textures_delta.clear(); + let search = ctx.data(|d| d.get_temp::(egui::Id::new("sc_ribbon_search"))).unwrap(); + assert!((search.right() - (bounds.right() - crate::theme::Tokens::get().space_6)).abs() < 1.0); + for label in &labels { + assert!( + output + .shapes + .iter() + .any(|shape| { matches!(&shape.shape,egui::Shape::Text(text) if text.galley.rows.iter().any(|row|row.text()==*label)) }), + "{language}, selected {selected}: complete stage label {label}" + ); + } + } + } +} diff --git a/crates/ui-egui/src/ui_kit/container.rs b/crates/ui-egui/src/ui_kit/container.rs index 107e94b57..e2346b238 100644 --- a/crates/ui-egui/src/ui_kit/container.rs +++ b/crates/ui-egui/src/ui_kit/container.rs @@ -73,6 +73,32 @@ impl Container { Self { surface, layout, joined: None } } + /// Floating workspace cards retain their shared chrome even in compact ribbon layouts. + pub(crate) fn floating_card(surface: Surface) -> Self { + Self::for_layout(LayoutMode::Floating, surface) + } + + /// Shared bottom-strip placement, used by History and other workspace strips. + pub(crate) fn bottom_strip_rect(self, available: egui::Rect, height: f32) -> egui::Rect { + let inset = available.shrink(self.gap()); + egui::Rect::from_min_max(egui::pos2(inset.left(), (inset.bottom() - height).max(inset.top())), inset.max) + } + + /// Anchored navigation surfaces share the compass/nav-bar frame and token padding. + pub(crate) fn navigation_card( + ctx: &Context, + id: Id, + anchor: egui::Pos2, + pivot: egui::Align2, + add: impl FnOnce(&mut egui::Ui) -> R, + ) -> egui::InnerResponse { + let container = Self::new(ctx, Surface::Navigation); + container.area(id).movable(false).pivot(pivot).fixed_pos(anchor).order(egui::Order::Middle).show(ctx, |ui| { + let frame = container.frame(ctx, Tokens::get().overlay, Side::Left).inner_margin(Tokens::get().space_4); + container.show_frame(ui, frame, ctx.content_rect(), |ui| super::scope(ui, add)).inner + }) + } + /// Declare contacts from shell geometry; styling remains entirely in the container. pub fn joined(mut self, edges: DockEdges) -> Self { self.joined = Some(edges); diff --git a/crates/ui-egui/src/ui_kit/gallery.rs b/crates/ui-egui/src/ui_kit/gallery.rs index 12ba53451..1ef096d33 100644 --- a/crates/ui-egui/src/ui_kit/gallery.rs +++ b/crates/ui-egui/src/ui_kit/gallery.rs @@ -555,6 +555,12 @@ const ELEMENTS: &[Element] = &[ element!("icon_label_button", |ui, _| { icon_label_button(ui, "Copy path", "copy", true, false); }), + element!("compact_icon_label_button", |ui, _| { + ui.horizontal(|ui| { + compact_icon_label_button(ui, "Paint", "appearance", true); + compact_icon_label_button(ui, "Pick Up", "select", true); + }); + }), element!("section_count", |ui, _| { section_count(ui, "count", "Parameters", false, Some(5), |_| {}); }), @@ -717,6 +723,9 @@ const ELEMENTS: &[Element] = &[ element!("list_picker", "dialog:list:gallery", Some("dialog:list:gallery"), |ui, _| { list_picker(ui, "gallery", "Preset", true); }), + element!("choice_chip", "dialog:list:gallery", Some("dialog:list:gallery"), |ui, _| { + choice_chip(ui, "gallery", "Shot 1", true); + }), element!("inline_text", "dialog:inline:Active", Some("dialog:inline:Active"), |ui, _| { text(ui, "Active", Text::Inline); }), diff --git a/crates/ui-egui/src/ui_kit/mod.rs b/crates/ui-egui/src/ui_kit/mod.rs index ffece133c..9c8a889f8 100644 --- a/crates/ui-egui/src/ui_kit/mod.rs +++ b/crates/ui-egui/src/ui_kit/mod.rs @@ -28,6 +28,7 @@ mod reports; mod search; mod shortcuts; mod sphere; +mod stages; mod status; mod table; mod text; @@ -51,7 +52,7 @@ pub(crate) use layout::*; pub use look_chain::{LookStep, look_chain}; pub(crate) use menu::{Menu, MenuItem, rename_menu, workspace_menu}; pub(crate) use metrics::{ContentWidth, header_height, row_height, table_row_height}; -pub(crate) use panel::{ComputeStatus, FeatureOptions, Panel, Part, WindowPage, panel_header_hover}; +pub(crate) use panel::{ComputeStatus, FeatureOptions, Panel, Part, WindowPage, WorkspaceOptions, panel_header_hover}; pub use panel::{DialogButtons, Window}; #[cfg(test)] pub(crate) use panel::{collapsible_header, header}; @@ -64,6 +65,7 @@ pub(crate) use reports::*; pub(crate) use search::{CommandSearch, SearchBadge, SearchFieldGeometry}; pub(crate) use shortcuts::*; pub use sphere::{FinishKind, Sphere, sphere_thumbnail}; +pub(crate) use stages::{StageAction, StageBar}; pub(crate) use status::*; pub(crate) use table::*; pub(crate) use value_focus::*; diff --git a/crates/ui-egui/src/ui_kit/panel.rs b/crates/ui-egui/src/ui_kit/panel.rs index 632a5894e..c75888c91 100644 --- a/crates/ui-egui/src/ui_kit/panel.rs +++ b/crates/ui-egui/src/ui_kit/panel.rs @@ -197,6 +197,14 @@ pub(crate) struct Panel<'a> { joined: Option, } +pub(crate) struct WorkspaceOptions<'a> { + pub id: &'static str, + pub title: &'a str, + pub icon: &'a str, + pub bounds: egui::Rect, + pub fill_height: bool, +} + pub(crate) struct FeatureOptions<'a> { pub icon: &'a str, pub title: &'a str, @@ -235,6 +243,121 @@ impl<'a> Panel<'a> { .show(ui, add) } + /// Floating workspace strip using the same bottom rectangle and chrome as History. + pub(crate) fn bottom_strip( + ui: &mut Ui, + id: &'static str, + available: egui::Rect, + height: f32, + add: impl FnOnce(&mut Ui) -> R, + ) -> Option> { + let container = super::Container::floating_card(super::Surface::Panel); + let rect = container.bottom_strip_rect(available, height); + if !rect.is_finite() || rect.width() < Tokens::get().control_height || rect.height() < Tokens::get().control_height { + return None; + } + let ctx = ui.ctx().clone(); + Some(container.area(egui::Id::new(id)).fixed_pos(rect.min).movable(false).order(egui::Order::Middle).show(&ctx, |ui| { + let frame = container.frame(&ctx, Tokens::get().panel, crate::frame::Side::Left).inner_margin(Tokens::get().space_4); + container + .show_frame(ui, frame, rect, |ui| { + ui.set_min_size((rect.size() - frame.total_margin().sum()).max(egui::Vec2::ZERO)); + ui.set_max_size((rect.size() - frame.total_margin().sum()).max(egui::Vec2::ZERO)); + super::scope(ui, add) + }) + .inner + })) + } + + /// Bounded floating workspace card. The shared grip chooses a side; the inner resize + /// rail changes its remembered width. Neither gesture changes the document. + pub(crate) fn workspace( + ui: &mut Ui, + options: WorkspaceOptions<'_>, + side: &mut String, + width: &mut f32, + add: impl FnOnce(&mut Ui) -> R, + ) -> Option> { + let container = super::Container::floating_card(super::Surface::Panel); + // The ribbon has already reserved the top gap, as for the Design Browser. + let gap = Tokens::get().space_8; + let bounds = egui::Rect::from_min_max(options.bounds.min + vec2(gap, 0.0), options.bounds.max - vec2(gap, gap)); + let t = Tokens::get(); + if !bounds.is_finite() || bounds.width() < t.control_height || bounds.height() < t.form_header_height { + return None; + } + let maximum = (t.form_card_width * 1.8).min((bounds.width() - gap).max(0.0) / 2.0); + if maximum < t.control_height * 4.0 { + return None; + } + let minimum = crate::frame::DIALOG_MIN_W.min(maximum); + *width = if width.is_finite() { width.clamp(minimum, maximum) } else { t.form_card_width.min(maximum) }; + let left = side == "left"; + let rect = egui::Rect::from_min_size( + egui::pos2(if left { bounds.left() } else { bounds.right() - *width }, bounds.top()), + vec2(*width, bounds.height()), + ); + let ctx = ui.ctx().clone(); + let response = container.area(egui::Id::new(options.id)).fixed_pos(rect.min).movable(false).order(egui::Order::Middle).show(&ctx, |ui| { + let frame = container.frame(&ctx, t.panel, if left { crate::frame::Side::Left } else { crate::frame::Side::Right }).inner_margin(0.0); + let content = container.show_frame(ui, frame, bounds, |ui| { + let size = (rect.size() - frame.total_margin().sum()).max(egui::Vec2::ZERO); + // Allocate the bounded host once; overflowing controls scroll/clip inside a child, + // so a short window cannot grow a floating dock over the top bar or bottom strip. + let (body, _) = ui.allocate_exact_size(size, egui::Sense::hover()); + let mut child = ui.new_child(egui::UiBuilder::new().max_rect(body).id_salt("workspace_body")); + let ui = &mut child; + ui.set_clip_rect(ui.clip_rect().intersect(body)); + ui.set_width(size.x); + ui.set_max_height(size.y); + if options.fill_height { + ui.set_min_height(size.y); + } + // Use the same fixed-height header as Panel/Window. Workspace cards are + // persistent; their navigation lives in the separately padded body. + ui.spacing_mut().item_spacing.y = 0.0; + let band = egui::Rect::from_min_size(ui.cursor().min, vec2(ui.available_width(), header_height())); + let grip = ui.interact(band, ui.id().with("workspace_grip"), egui::Sense::drag()).on_hover_cursor(egui::CursorIcon::Grab); + scenario::publish_target(&format!("{}:grip", options.id), grip.rect); + header_impl(ui, options.icon, options.title, None, false, || {}); + scenario::publish_rect(&format!("{}:header", options.id), band); + if grip.dragged() { + let frame_nr = ui.ctx().cumulative_frame_nr(); + ui.ctx().data_mut(|d| d.insert_temp(egui::Id::new("sc_dock_drag_frame"), frame_nr)); + ui.ctx().set_cursor_icon(egui::CursorIcon::Grabbing); + } + if grip.drag_stopped() + && let Some(at) = ui.ctx().pointer_latest_pos() + { + *side = if at.x < options.bounds.center().x { "left" } else { "right" }.into(); + ui.ctx().request_repaint(); + } + egui::Frame::NONE + .inner_margin(t.space_12) + .show(ui, |ui| { + ui.spacing_mut().item_spacing.y = t.form_gap_y; + super::scope(ui, add) + }) + .inner + }); + let card = content.response.rect; + let rail = egui::Rect::from_x_y_ranges( + if left { card.right() - t.space_6..=card.right() } else { card.left()..=card.left() + t.space_6 }, + card.y_range(), + ); + let resize = ui.interact(rail, ui.id().with("workspace_resize"), egui::Sense::drag()).on_hover_cursor(egui::CursorIcon::ResizeHorizontal); + scenario::publish_target(&format!("{}:resize", options.id), rail); + if resize.dragged() { + let delta = ui.input(|i| i.pointer.delta().x) * if left { 1.0 } else { -1.0 }; + if delta.is_finite() { + *width = (*width + delta).clamp(minimum, maximum); + } + } + content.inner + }); + Some(response) + } + /// Shared floating card surface for panels, windows and modal confirmations. pub(super) fn card_frame(ctx: &egui::Context) -> egui::Frame { let t = Tokens::get(); diff --git a/crates/ui-egui/src/ui_kit/stages.rs b/crates/ui-egui/src/ui_kit/stages.rs new file mode 100644 index 000000000..00ab369cf --- /dev/null +++ b/crates/ui-egui/src/ui_kit/stages.rs @@ -0,0 +1,234 @@ +//! Numbered stage navigation in a two-row workspace card. The caller owns commands and state. +use crate::theme::{TabAccent, Tokens}; +use egui::{Rect, Sense, Ui, pos2, vec2}; + +pub(crate) struct StageAction<'a> { + pub icon: Option<&'a str>, + pub label: &'a str, + pub enabled: bool, + pub primary: bool, + pub reason: Option<&'a str>, +} + +pub(crate) struct StageResponse { + pub stage: Option, + pub action: Option, + pub chips: Vec, + pub actions: Vec, +} + +pub(crate) struct StageBar; +impl StageBar { + pub(crate) const HEIGHT: f32 = 88.0; + pub(crate) const HEADER_HEIGHT: f32 = 36.0; + + /// Shared compact workspace shell; independent of modelling ribbon label preferences. + pub(crate) fn cards(available: Rect) -> crate::shell::Cards { + let gap = Tokens::get().space_8; + let min = pos2(available.left() + gap, (available.top() + gap).min(available.bottom())); + let right = (available.right() - gap).max(min.x); + let bottom = (min.y + Self::HEIGHT).min(available.bottom()).max(min.y); + let workspace = Rect::from_min_max(min, pos2((min.x + 104.0).min(right), bottom)); + let ribbon = Rect::from_min_max(pos2((workspace.right() + gap).min(right), min.y), pos2(right, bottom)); + crate::shell::Cards { workspace, ribbon, bottom: (bottom + gap).min(available.bottom()) } + } + + /// Workspace switcher content uses the same accent as the numbered stage chips. + pub(crate) fn workspace(ui: &Ui, rect: Rect, icon: &str, label: &str, caption: &str) { + let t = Tokens::get(); + let accent = TabAccent::current(ui.ctx()); + let center = rect.center(); + let icon_side = t.control_height + t.space_2; + crate::icons::paint_icon(ui.painter(), Rect::from_center_size(center - vec2(0.0, t.space_16), vec2(icon_side, icon_side)), icon, 1.0); + super::text::paint_text( + ui, + Rect::from_center_size( + center + vec2(0.0, t.space_8), + vec2(ui.painter().layout_no_wrap(label.into(), crate::fonts::semibold(t.font_button), accent.ink).size().x, t.space_16), + ), + label, + crate::fonts::semibold(t.font_button), + accent.ink, + false, + ); + let width = ui.painter().layout_no_wrap(caption.into(), egui::FontId::proportional(t.font_small), t.text_dim).size().x; + let caption_rect = Rect::from_center_size(center + vec2(-t.space_4, t.space_24), vec2(width, t.space_16)); + super::text::paint_text(ui, caption_rect, caption, egui::FontId::proportional(t.font_small), t.text_dim, false); + super::dropdown_indicator( + ui.painter(), + Rect::from_center_size(pos2(caption_rect.right() + t.space_6, caption_rect.center().y), vec2(t.space_8, t.space_8)), + t.text_dim, + ); + } + + pub(crate) fn separator(ui: &mut Ui) { + let t = Tokens::get(); + let (rect, _) = ui.allocate_exact_size(vec2(1.0, t.space_16 + t.space_4), Sense::hover()); + ui.painter().vline(rect.center().x, rect.y_range(), t.control_border_stroke(t.dialog_rule)); + } + + pub(crate) fn icon_action(ui: &mut Ui, icon: &str, label: &str) -> egui::Response { + let side = Tokens::get().control_height - Tokens::get().space_2; + let (rect, _) = ui.allocate_exact_size(vec2(side, side), Sense::hover()); + super::icon_button_at(ui, rect, icon, label) + } + + pub(crate) fn tool_gap(ui: &mut Ui) { + ui.add_space(Tokens::get().space_4); + } + + pub(crate) fn caption(ui: &mut Ui, label: &str) { + let t = Tokens::get(); + let label = label.to_uppercase(); + let font = crate::fonts::semibold(t.font_small); + let width = ui.painter().layout_no_wrap(label.clone(), font.clone(), t.text_dim).size().x + + t.font_small * t.font_section_tracking * label.chars().count() as f32 + + t.space_8; + let (rect, _) = ui.allocate_exact_size(vec2(width, t.control_height), Sense::hover()); + super::text::paint_text(ui, rect.shrink2(vec2(t.space_4, 0.0)), &label, font, t.text_dim, true); + } + + /// Quiet information chip within the tools row, using the shared surface and ink tokens. + pub(crate) fn note(ui: &mut Ui, label: &str) -> egui::Response { + let t = Tokens::get(); + let width = ui.painter().layout_no_wrap(label.into(), egui::FontId::proportional(t.font_label), t.text_dim).size().x; + let (rect, response) = + ui.allocate_exact_size(vec2(width + t.space_14 + t.space_6 + t.space_8 * 2.0, t.control_height - t.space_2), Sense::hover()); + ui.painter().rect_filled(rect, t.control_radius, t.dialog_footer); + let icon = Rect::from_center_size(pos2(rect.left() + t.space_8 + t.space_14 / 2.0, rect.center().y), vec2(t.space_14, t.space_14)); + crate::icons::paint_ink(ui.painter(), icon, "help", t.text_dim); + super::text::paint_text( + ui, + Rect::from_min_max(pos2(icon.right() + t.space_6, rect.top()), rect.max), + label, + egui::FontId::proportional(t.font_label), + t.text_dim, + false, + ); + response + } + + /// Fixed 36 pt header; the remaining height is the stage's tool row. Both rows scroll + /// horizontally on small windows and clip to the enclosing workspace card. + pub(crate) fn row(ui: &mut Ui, card: Rect, tools: bool, add: impl FnOnce(&mut Ui) -> R) -> Option { + let t = Tokens::get(); + let split = (card.top() + Self::HEADER_HEIGHT).min(card.bottom()); + let rect = + if tools { Rect::from_min_max(pos2(card.left(), split), card.max) } else { Rect::from_min_max(card.min, pos2(card.right(), split)) }; + if !rect.is_finite() || rect.height() < t.control_height || rect.width() < t.control_height { + return None; + } + if tools { + t.secondary_hline(ui.painter(), rect.x_range(), rect.top() + 0.5, t.dialog_rule); + } + let inner = rect.shrink2(vec2(if tools { t.space_8 } else { t.space_6 }, 0.0)); + Some( + ui.scope_builder(egui::UiBuilder::new().max_rect(inner).id_salt(("stage_row", tools)), |ui| { + ui.set_clip_rect(ui.clip_rect().intersect(rect)); + ui.spacing_mut().item_spacing = vec2(if tools { t.space_8 } else { t.space_4 }, 0.0); + egui::ScrollArea::horizontal() + .id_salt("stage_scroll") + .animated(false) + .scroll_bar_visibility(egui::scroll_area::ScrollBarVisibility::AlwaysHidden) + .auto_shrink([false, false]) + .show(ui, |ui| { + ui.set_width(inner.width()); + ui.set_height(inner.height()); + super::scope(ui, |ui| { + ui.spacing_mut().item_spacing = vec2(if tools { t.space_8 } else { t.space_4 }, 0.0); + ui.horizontal_centered(add).inner + }) + }) + .inner + }) + .inner, + ) + } + + /// Stage chips, primary/cancel actions, then the existing command-search editor. No done + /// badges are drawn: a selected stage is navigation, not evidence that work is complete. + pub(crate) fn header(ui: &mut Ui, selected: usize, labels: &[&str], actions: &[StageAction<'_>]) -> StageResponse { + let t = Tokens::get(); + let accent = TabAccent::current(ui.ctx()); + let mut result = StageResponse { stage: None, action: None, chips: Vec::new(), actions: Vec::new() }; + for (index, label) in labels.iter().enumerate() { + if index > 0 { + let (line, _) = ui.allocate_exact_size(vec2(t.space_16 + t.space_2, t.control_height), Sense::hover()); + t.secondary_hline(ui.painter(), line.x_range(), line.center().y, t.control_border); + } + let font = egui::FontId::proportional(t.font_button); + let width = ui.painter().layout_no_wrap((*label).into(), crate::fonts::semibold(t.font_button), t.text).size().x.ceil() + + t.space_8 + + t.space_14 + + t.space_6 + + 1.0 + + t.space_16 + + t.space_2; + let (chip, response) = ui.allocate_exact_size(vec2(width, t.control_height + t.space_2), Sense::click()); + let on = index == selected; + if on || response.hovered() { + ui.painter().rect_filled(chip, chip.height() / 2.0, if on { accent.soft } else { t.hover }); + } + let badge = Rect::from_center_size( + pos2(chip.left() + t.space_8 + (t.space_16 + t.space_2) / 2.0, chip.center().y), + vec2(t.space_16 + t.space_2, t.space_16 + t.space_2), + ); + ui.painter().circle_filled(badge.center(), badge.width() / 2.0, if on { accent.color } else { t.control_fill }); + if !on { + ui.painter().circle_stroke(badge.center(), badge.width() / 2.0, t.control_border_stroke(t.control_border)); + } + super::text::paint_text( + ui, + { + let number = (index + 1).to_string(); + let width = ui.painter().layout_no_wrap(number, crate::fonts::semibold(t.font_small), t.text).size().x; + Rect::from_center_size(badge.center(), vec2(width, badge.height())) + }, + &(index + 1).to_string(), + crate::fonts::semibold(t.font_small), + if on { t.on_accent } else { t.text_dim }, + false, + ); + let text = Rect::from_min_max(pos2(badge.right() + t.space_6 + 1.0, chip.top()), chip.right_bottom() - vec2(t.space_14, 0.0)); + super::text::paint_text( + ui, + text, + label, + if on { crate::fonts::semibold(t.font_button) } else { font }, + if on { accent.ink } else { t.text }, + false, + ); + response.widget_info(|| egui::WidgetInfo::selected(egui::WidgetType::SelectableLabel, true, on, *label)); + result.chips.push(chip.intersect(ui.clip_rect())); + if response.clicked() { + result.stage = Some(index); + } + } + let search_width = super::CommandSearch::closed_width(ui.ctx()).max(188.0); + let action_width = actions.iter().map(|a| super::actions::icon_label_width(ui, a.label, a.icon, a.primary)).sum::(); + ui.add_space((ui.available_width() - search_width - action_width - t.space_4 * (actions.len() + 2) as f32).max(t.space_8)); + for (index, item) in actions.iter().enumerate() { + let response = super::actions::icon_label_action(ui, item.label, item.icon, item.enabled, item.primary); + result.actions.push(response.rect.intersect(ui.clip_rect())); + if response.clicked() { + result.action = Some(index); + } + if let Some(reason) = item.reason { + response.on_disabled_hover_text(reason); + } + } + ui.add_space((ui.available_width() - search_width).max(0.0)); + let (search, _) = ui.allocate_exact_size(vec2(search_width, t.control_height), Sense::hover()); + // CommandSearch owns the actual field, focus, S shortcut and registered command dispatch. + let search = search.intersect(ui.clip_rect()); + ui.ctx().data_mut(|d| { + let id = egui::Id::new("sc_ribbon_search"); + if search.is_positive() { + d.insert_temp(id, search); + } else { + d.remove::(id); + } + }); + result + } +} diff --git a/crates/ui-egui/src/viewport.rs b/crates/ui-egui/src/viewport.rs index e3de2e971..9e2285ae4 100644 --- a/crates/ui-egui/src/viewport.rs +++ b/crates/ui-egui/src/viewport.rs @@ -5369,16 +5369,14 @@ pub(crate) fn refresh_layout(app: &mut SolveApp, scale: f32) { } // 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 content = if app.ui.layout == crate::shell::LayoutMode::Docked { rect } else { content }; - app.viewport.layout = Some(crate::viewport_layout::Layout::with_content( - rect, - content, - &docks, - scale, - app.preferences.navigator_style, - corner, - app.ui.show_navigation_bar, - )); + let style = app.preferences.navigator_style; + let show_bar = app.ui.show_navigation_bar; + app.viewport.layout = Some(if crate::render_workspace::active(app) { + crate::viewport_layout::Layout::product(rect, content, &docks, scale, style, corner, show_bar) + } else { + let content = if app.ui.layout == crate::shell::LayoutMode::Docked { rect } else { content }; + crate::viewport_layout::Layout::with_content(rect, content, &docks, scale, style, corner, show_bar) + }); } } @@ -5560,7 +5558,7 @@ pub fn look_at_selection(app: &mut SolveApp) { } } -fn nav_bar(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect) { +pub(crate) fn nav_bar(app: &mut SolveApp, ui: &mut egui::Ui, rect: Rect) { if !app.ui.show_navigation_bar || app.viewport.layout.as_ref().is_some_and(|l| !l.navigation.is_positive()) { return; } diff --git a/crates/ui-egui/src/viewport_layout.rs b/crates/ui-egui/src/viewport_layout.rs index e2d3ef62d..c7c0e1b6c 100644 --- a/crates/ui-egui/src/viewport_layout.rs +++ b/crates/ui-egui/src/viewport_layout.rs @@ -66,6 +66,33 @@ impl Layout { style: crate::prefs::NavigatorStyle, corner: egui::Vec2, show_navigation_bar: bool, + ) -> Self { + Self::build(viewport, content, docks, scale, style, corner, show_navigation_bar, false) + } + + /// Render fits stay between the docked panels, including beneath a short Browser card. + pub fn product( + viewport: Rect, + content: Rect, + docks: &[Rect], + scale: f32, + style: crate::prefs::NavigatorStyle, + corner: egui::Vec2, + show_navigation_bar: bool, + ) -> Self { + Self::build(viewport, content, docks, scale, style, corner, show_navigation_bar, true) + } + + #[allow(clippy::too_many_arguments)] + fn build( + viewport: Rect, + content: Rect, + docks: &[Rect], + scale: f32, + style: crate::prefs::NavigatorStyle, + corner: egui::Vec2, + show_navigation_bar: bool, + fit_in_content: bool, ) -> Self { let scale = if scale.is_finite() && scale > 0.0 { scale } else { 1.0 }; let mut obstacles: Vec<_> = docks.iter().take(14).copied().filter(|r| r.is_finite()).map(|r| r.expand(4.0)).collect(); @@ -83,7 +110,7 @@ impl Layout { }; // 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 = super::viewport::axis_view_size(style); + let cube_size = if fit_in_content { 110.0 } else { super::viewport::axis_view_size(style) }; let mut axis_view = if available.width() >= cube_size && available.bottom() - top >= cube_size { Rect::from_min_size(pos2(available.right() - cube_size, top), vec2(cube_size, cube_size)) } else { @@ -112,12 +139,25 @@ impl Layout { obstacles.push(control); } } - let drawable = free_rect(viewport, &obstacles).shrink(16.0 / scale); + let drawable = free_rect(if fit_in_content { content } else { viewport }, &obstacles).shrink(16.0 / scale); Self { viewport, drawable, content, axis_view, navigation, confirm } } } -pub(crate) fn fit_bounds(mut cam: Camera, bounds: &Aabb3, layout: &Layout, perspective: bool) -> Option { +pub(crate) fn fit_bounds(cam: Camera, bounds: &Aabb3, layout: &Layout, perspective: bool) -> Option { + fit_with_fov(cam, bounds, layout, if perspective { 0.6 } else { 0.0 }) +} + +/// Product cameras keep the authored lens while framing the free canvas. +pub(crate) fn fit_product_bounds(cam: Camera, bounds: &Aabb3, layout: &Layout) -> Option { + fit_with_fov(cam, bounds, layout, cam.fov) +} + +fn fit_with_fov(mut cam: Camera, bounds: &Aabb3, layout: &Layout, fov: f64) -> Option { + let perspective = fov > 0.0; + if !fov.is_finite() || !(0.0..std::f64::consts::PI).contains(&fov) { + return None; + } if bounds.is_empty() || !bounds.min.is_finite() || !bounds.max.is_finite() @@ -129,7 +169,7 @@ pub(crate) fn fit_bounds(mut cam: Camera, bounds: &Aabb3, layout: &Layout, persp return None; } let original_fov = cam.fov; - cam.fov = if perspective { 0.6 } else { 0.0 }; + cam.fov = fov; let (r, u, b) = cam.basis(); let centre = bounds.center(); let mut hx: f64 = 0.0; @@ -150,7 +190,7 @@ pub(crate) fn fit_bounds(mut cam: Camera, bounds: &Aabb3, layout: &Layout, persp let h = f64::from(layout.viewport.height()); let hh = (hx * h / f64::from(layout.drawable.width())).max(hy * h / f64::from(layout.drawable.height())).max(0.5); let offset = layout.drawable.center() - layout.viewport.center(); - let tangent = if perspective { (0.3_f64).tan() } else { 0.4 }; + let tangent = if perspective { (fov * 0.5).tan() } else { 0.4 }; cam.distance = hh / tangent + if perspective { depth } else { 0.0 }; // Offset the target so the model projects into the free rectangle in the original viewport. // Perspective needs a bounded correction because corners have different depths. diff --git a/crates/ui-egui/src/workspace.rs b/crates/ui-egui/src/workspace.rs index e8ae6cdaa..d253662e2 100644 --- a/crates/ui-egui/src/workspace.rs +++ b/crates/ui-egui/src/workspace.rs @@ -4,6 +4,15 @@ use solidcraft_engine::CommandSpec; use solidcraft_engine::doc::FeatureKind; +pub const RENDER_TABS: &[&str] = &["RENDER"]; + +pub fn render_tab(tab: &str) -> bool { + RENDER_TABS.contains(&tab) +} +pub fn tab_label(tab: &str) -> &str { + tab.strip_prefix("RENDER ").unwrap_or(tab) +} + pub const TABS: &[&str] = &["MODEL", "SURFACE", "ASSEMBLE", "INSERT", "INSPECT", "MANAGE", "VIEW"]; /// Reading order of the compact, three-column constraint gallery. Icons come from each spec. @@ -278,25 +287,12 @@ pub const SECTIONS: &[Section] = &[ Section { tab: "WELDMENTS", panel: "SKETCH", promoted: 1, ids: &["sketch.create"] }, Section { tab: "WELDMENTS", panel: "CREATE", promoted: 1, ids: &["frame.member"] }, Section { tab: "WELDMENTS", panel: "CONFIGURE", promoted: 2, ids: CONFIGURE }, - // One Render tab with task-ordered groups; only implemented registry commands. - // The shared ribbon owns pins, search, section menus and responsive overflow. +]; + +// Migration data only: Render commands remain registered, but have no live ribbon sections. +const LEGACY_RENDER_SECTIONS: &[Section] = &[ Section { - tab: "RENDER", - panel: "SCENE", - promoted: 2, - ids: &[ - "render.preset.resolve", - "render.settings.get", - "render.scene", - "render.preset.apply", - "render.settings.set", - "render.shot.duplicate", - "render.shot.rename", - "render.shot.remove", - ], - }, - Section { - tab: "RENDER", + tab: "RENDER APPEARANCE", panel: "APPEARANCE", promoted: 3, ids: &[ @@ -306,44 +302,63 @@ pub const SECTIONS: &[Section] = &[ "render.library.surface.prepare", "render.library.surface.unbind", "render.library.physical.prepare", + "appearance.paint", + "appearance.pick_up", + "appearance.replace", ], }, - Section { tab: "RENDER", panel: "LIGHTING", promoted: 2, ids: &["render.library.studio.prepare", "render.library.studio.apply"] }, Section { - tab: "RENDER", - panel: "ENVIRONMENT", - promoted: 2, - ids: &[ - "render.library.environment.apply", - "render.stage.backdrop", - "render.stage.ground", - "render.stage.clear", - "render.hdr.inspect", - "render.settings.capture_hdr", - ], - }, - Section { tab: "RENDER", panel: "CAMERA", promoted: 2, ids: &["render.camera.get", "render.camera.fit", "render.settings.apply"] }, - Section { - tab: "RENDER", - panel: "IMAGE", + tab: "RENDER SCENE", + panel: "STUDIO", promoted: 3, ids: &[ - "render.start", - "render.preflight", - "render.effects.describe", - "render.cancel", - "render.export", - "render.result.regrade", - "render.quality.prepare", - "render.status", - "render.backends", + "render.preset.resolve", + "render.library.studio.prepare", + "render.library.studio.apply", + "render.preset.apply", + "render.library.environment.apply", ], }, + Section { tab: "RENDER SCENE", panel: "LIGHTS", promoted: 1, ids: &["render.lights.solo"] }, + Section { + tab: "RENDER SCENE", + panel: "STAGE", + promoted: 2, + ids: &["render.stage.ground", "render.stage.backdrop", "render.stage.clear", "render.hdr.inspect", "render.settings.capture_hdr"], + }, + Section { + tab: "RENDER CAMERA", + panel: "SHOTS", + promoted: 3, + ids: &["render.settings.get", "render.settings.set", "view.shots_strip", "render.shot.duplicate", "render.shot.rename", "render.shot.remove"], + }, + Section { tab: "RENDER CAMERA", panel: "VIEW", promoted: 2, ids: &["render.settings.apply", "render.scene"] }, + Section { tab: "RENDER CAMERA", panel: "LENS", promoted: 1, ids: &["render.camera.get", "render.camera.set"] }, + Section { tab: "RENDER CAMERA", panel: "FRAME", promoted: 1, ids: &["render.camera.fit"] }, + Section { tab: "RENDER", panel: "IMAGE", promoted: 2, ids: &["render.quality.prepare", "render.effects.describe"] }, + Section { tab: "RENDER", panel: "RENDER", promoted: 2, ids: &["render.start", "render.preflight", "render.cancel"] }, + Section { + tab: "RENDER", + panel: "RESULT", + promoted: 2, + ids: &["render.export", "render.result.regrade", "render.compare", "render.status", "render.backends"], + }, + Section { tab: "RENDER", panel: "BATCH", promoted: 1, ids: &["render.batch"] }, ]; /// Compact source labels for painted big buttons only. Menus, search and tooltips /// retain the engine label. Route these through `tr_label`, like other UI labels. pub const RIBBON_LABELS: &[(&str, &str)] = &[ + ("view.shots_strip", "Strip"), + ("appearance.paint", "Paint"), + ("appearance.pick_up", "Pick Up"), + ("appearance.replace", "Replace"), + ("render.batch", "All Shots"), + ("render.cancel", "Cancel"), + ("render.export", "Export Image"), + ("render.result.regrade", "Regrade"), + ("render.quality.prepare", "Quality"), + ("render.settings.set", "Save Shot"), ("render.aging.describe", "Aging"), ("render.effects.describe", "Effects"), ("render.camera.fit", "Frame"), @@ -356,6 +371,7 @@ pub const RIBBON_LABELS: &[(&str, &str)] = &[ ("render.library.studio.apply", "Edit Lights"), ("render.library.environment.apply", "HDR Library"), ("render.stage.backdrop", "Backgrounds"), + ("render.stage.ground", "Ground"), ("render.settings.apply", "Saved Camera"), ("render.preflight", "Check"), ("appearance.assign", "Appearance"), @@ -444,8 +460,8 @@ pub const PLACEMENTS: &[(&str, &str, &str, &str)] = &[ ("PLASTIC", "CREATE", "MODEL", "CREATE"), ("PLASTIC", "SETUP", "MANAGE", "RULES"), ("MESH", "MODIFY", "INSERT", "FILES"), - ("RENDER", "SCENE", "RENDER", "SCENE"), - ("RENDER", "IMAGE", "RENDER", "IMAGE"), + ("RENDER", "SCENE", "RENDER CAMERA", "SHOTS"), + ("RENDER", "IMAGE", "RENDER", "RENDER"), ]; pub fn panels(tab: &str) -> Vec<&'static str> { @@ -453,6 +469,13 @@ pub fn panels(tab: &str) -> Vec<&'static str> { } pub fn destination(c: &CommandSpec) -> Option<(&'static str, &'static str)> { + if c.id.starts_with("render.") || c.tab.starts_with("RENDER") || c.id == "view.shots_strip" { + return None; + } + legacy_render_destination(c).filter(|(tab, _)| !tab.starts_with("RENDER")) +} + +pub(crate) fn legacy_render_destination(c: &CommandSpec) -> Option<(&'static str, &'static str)> { // A few shared commands have a canonical home that differs from their first occurrence. let primary = match c.id { "sheet.manage_rules" => Some(("MANAGE", "RULES")), @@ -462,7 +485,7 @@ pub fn destination(c: &CommandSpec) -> Option<(&'static str, &'static str)> { _ => None, }; primary - .or_else(|| SECTIONS.iter().find(|s| s.ids.contains(&c.id)).map(|s| (s.tab, s.panel))) + .or_else(|| SECTIONS.iter().chain(LEGACY_RENDER_SECTIONS).find(|s| s.ids.contains(&c.id)).map(|s| (s.tab, s.panel))) .or_else(|| PLACEMENTS.iter().find(|(t, p, ..)| *t == c.tab && *p == c.panel).map(|(_, _, t, p)| (*t, *p))) } @@ -555,7 +578,7 @@ pub fn frame_body(app: &crate::SolveApp) -> Option { pub fn visible_tabs(app: &crate::SolveApp) -> Vec<&'static str> { if crate::render_workspace::active(app) { - return vec!["RENDER"]; + return Vec::new(); } let mut tabs = TABS.to_vec(); if app.session.active_sketch.is_some() { @@ -623,7 +646,7 @@ pub fn select_command_tab(app: &mut crate::SolveApp, id: &str) { return; } if let Some((tab, _)) = destination(c) { - if tab == "RENDER" { + if render_tab(tab) && !crate::render_workspace::active(app) { return; } // The Render workspace owns its entry/exit lifecycle. if visible_tabs(app).contains(&tab) { @@ -740,7 +763,7 @@ mod tests { fn every_placed_command_is_reachable_and_every_layout_id_exists() { let specs = solidcraft_engine::command_specs(); let lists: Vec<_> = SECTIONS.iter().map(|s| (s, layout(s.tab, s.panel, &specs).unwrap())).collect(); - for c in specs.iter().filter(|c| !c.tab.is_empty()) { + for c in specs.iter().filter(|c| !c.tab.is_empty() && !c.tab.starts_with("RENDER")) { assert!(lists.iter().any(|(_, (cmds, _))| cmds.iter().any(|x| x.id == c.id)), "lost toolbar command {} ({}/{})", c.id, c.tab, c.panel); } for (s, (cmds, n)) in lists { diff --git a/crates/ui-egui/tests/scenarios/render_workspace_shell.json b/crates/ui-egui/tests/scenarios/render_workspace_shell.json new file mode 100644 index 000000000..eca0a8576 --- /dev/null +++ b/crates/ui-egui/tests/scenarios/render_workspace_shell.json @@ -0,0 +1,21 @@ +[ + {"note":"Render stages replace the ribbon, retain the Inspector and Shots preference, and never start a job on navigation."}, + {"call":"ui.resize","params":{"width":1440,"height":1000}}, + {"call":"engine.execute","params":{"command":"solid.box","params":{"length":20,"width":15,"height":10}}}, + {"call":"ui.workspace","params":{"workspace":"render"}}, + {"expect":{"shown_handles":["render:stage:look","render:stage:light","render:stage:frame","render:stage:output","render:stage:render.start","render:stage:render.cancel","ribbon:search","render:shots:hide","render:inspector:grip","render:browser:grip"],"hidden_handles":["tab:RENDER","tab:RENDER APPEARANCE","ribbon:section:RENDER:IMAGE"],"errors":0}}, + {"click":{"handle":"render:stage:look"}}, + {"click":{"handle":"render:stage:light"}}, + {"click":{"handle":"render:stage:frame"}}, + {"click":{"handle":"render:stage:output"}}, + {"expect":{"disjoint":["render:browser:header","render:browser-library"]}}, + {"expect":{"disjoint":["render:inspector:header","render:page:output"]}}, + {"click":{"handle":"render:shots:hide"}}, + {"expect":{"shown_handles":["render:shots:show"],"hidden_handles":["render:shots:hide"]}}, + {"call":"ui.workspace","params":{"workspace":"design"}}, + {"expect":{"shown_handles":["tab:MODEL"],"hidden_handles":["render:shots:show","render:stage:look"]}}, + {"call":"ui.workspace","params":{"workspace":"render"}}, + {"click":{"handle":"render:shots:show"}}, + {"call":"ui.set","params":{"layout":"docked"}}, + {"expect":{"shown_handles":["render:shots:hide","render:stage:output","render:page:output"],"hidden_handles":["tab:RENDER"],"errors":0}} +] diff --git a/crates/ui-egui/tests/scenarios/ribbon_docked.json b/crates/ui-egui/tests/scenarios/ribbon_docked.json index 488ff2835..b66832510 100644 --- a/crates/ui-egui/tests/scenarios/ribbon_docked.json +++ b/crates/ui-egui/tests/scenarios/ribbon_docked.json @@ -3,7 +3,7 @@ {"expect":{"shown_handles":["ribbon:workspace","ribbon:search","ribbon:section:MODEL:CREATE","tab:MODEL"],"spans":{"inner":"ribbon:workspace","outer":"toolbar","axis":"y","tol":1}}}, {"click":{"handle":"ribbon:workspace"}}, {"call":"ui.menuPick","params":{"item":"ui.workspace.render"}}, - {"expect":{"shown_handles":["tab:RENDER","ribbon:search","ribbon:workspace"]}}, + {"expect":{"shown_handles":["render:stage:look","render:stage:light","render:stage:frame","render:stage:output","ribbon:search","ribbon:workspace"]}}, {"click":{"handle":"ribbon:workspace"}}, {"call":"ui.menuPick","params":{"item":"ui.workspace.design"}}, {"click":{"handle":"ribbon:section:MODEL:CREATE"}}, diff --git a/docs/render-workspace.md b/docs/render-workspace.md index 65d952241..42b8d366e 100644 --- a/docs/render-workspace.md +++ b/docs/render-workspace.md @@ -14,6 +14,34 @@ The current integrated GPU renderer shows a separate product scene. Return to De restores its camera, projection preference and existing viewport drawing policy. The live product preview remains independent of the selected image method. +## Stage bar and floating docks + +Render has no ribbon. A shared 88 pt two-row stage bar sits 8 pt to the right of +the 104 × 88 pt workspace card, with matching top and bottom edges. The icon sits +above the Render label and Workspace caption. The header is 36 pt; the remaining +52 pt contains the tools, centred vertically below a 1 pt divider. Numbered **Look**, **Light**, **Frame** and **Output** chips +run `view.render_stage {stage: look|light|frame|output}`. The selection belongs to the +open document tab's view state; it is not saved in the design. Opening a stage never +applies or saves settings or starts an image job. It focuses the existing Inspector +page, while every Inspector page and registered Render command remains reachable. +The headless command validates and echoes the request without changing the document. + +Render, Cancel and the shared command search (S) occupy the top row. The former Pick +HUD, icon-text Body/Face/Component segments, Paint/Pick Up actions and direct-light +preview information chip occupy Look's second row with 8 pt side padding. Picking and changing the +light coordinate frame remain disabled with their reason in this checkout. Frame +uses the existing explicit camera command for projection; Output shows the current +size/format and directs edits to the Output Inspector. No completion ticks are inferred. + +The Browser and Inspector float in both shell layouts, share top and bottom edges, +and clear the bar and Shots strip by 8 pt. Their default outer widths are 266 pt and 305 pt, with the shared resize bounds. +The 48 pt Shots strip has an 8 pt gap from the docks. The 110 pt compass uses the +free canvas beside the Inspector and the navigation bar keeps its shared navigation handler. Narrow +rows scroll horizontally; docks shrink together or disappear if no usable space +remains. The Shots strip's independent `view.shots_strip` preference is unchanged. +The current model/library Browser can reveal model bodies for Look; scene-specific +Lights, Shots and Output expansion awaits the scene Browser change. + ## Image methods and controls **CPU raster** produces the existing preview PNG with approximate transparency. diff --git a/docs/ui-kit.md b/docs/ui-kit.md index 0dec37fc5..be1f7db61 100644 --- a/docs/ui-kit.md +++ b/docs/ui-kit.md @@ -4,6 +4,28 @@ preferences, manager cards, prompts, context menus and the sketch palette. Import through `crate::ui_kit::{...}`. Most controls are crate-visible; the container API is public so platform apps use the same hosts. +## Stage bars + +`StageBar` composes two clipped, horizontally scrollable rows inside the shell's +shared floating `Container` (`Surface::Chrome`). Its 36 pt first row contains numbered +stage chips with the current workspace accent, shared primary/normal buttons and +the existing command-search editor. The second row fills the remaining card height. +The feature supplies labels, enabled reasons and command dispatch; the kit owns +chip geometry, row spacing, typography and colour. Stage selection is navigation; +the kit never invents completion badges. The shared compact workspace card is 104 × 88 pt; its icon, label and caption are +centred vertically. The stage bar is 88 pt high with an 8 pt gap from that card. +Its 36 pt header and 52 pt tools band share a 1 pt divider. Tools use 8 pt side +padding, icon-text segments, icon-label actions and an information chip, all with +`theme::Tokens` colours in both themes. Render retains its Inspector controls +outside the bar. + +`Panel::workspace` gives paired floating docks the same bounded vertical span and +limits each dock to half the available width with an 8 pt gap. Content clips inside +the allocated host, so a small window cannot grow a dock into the stage bar or Shots +strip. Docks without usable space are omitted. Render's default outer widths are 266 pt +for Browser and 305 pt for Inspector, retaining the shared minimum/maximum resize +rules. Its compass is 110 pt; the 48 pt Shots strip clears the docks by 8 pt. + ## Composition and rules - Every outer host uses `ui_kit::Container` with a semantic `Surface`. The shell @@ -25,6 +47,14 @@ preferences, manager cards, prompts, context menus and the sketch palette. Impor expression, hinted expression, plain text and dropdown controls. They preserve row order, labels, focus IDs and completion; callers keep Enter/change ownership and explicit dropdown IDs. `count_row` composes `row` with `count_field` for pattern quantities. +- `Panel::workspace` owns grip-based left/right placement and bounded width resizing for + floating workspace cards, including in Compact ribbon layouts. It reuses the 40 pt + Panel/Window header and padded body, with no second top inset below the ribbon. + Persistent workspace cards omit the close action. `Panel::bottom_strip` + uses `Container::bottom_strip_rect`, the same placement as Design History. + `Container::navigation_card` supplies the shared Navigation surface for anchored HUDs. + Register measured card rectangles and reserved edges with `shell::register_panel` so + fitting and pointer shielding agree. Feature modules provide content, never outer chrome. - `Panel` owns bounded windows, feature/palette composition, scrolling bodies, pinned actions, compute status and keyboard routing. `wide()` uses three card widths. `feature_frame` and `palette_frame` retain docked/floating surfaces. From 882737ff947e5c102cf626a58313e325e530975c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 19:52:35 +0000 Subject: [PATCH 081/102] Regenerate generated files and fold pending files [skip ci] --- assets/locales/ar.json | 54 + assets/locales/de.json | 54 + assets/locales/en.json | 54 + assets/locales/es.json | 1 + assets/locales/fr.json | 1 + assets/locales/he.json | 54 + assets/locales/ja.json | 54 + assets/locales/ko.json | 52 + .../locales/pending/gpu-memory-lowered.json | 23 - .../pending/history-origin-bodies.json | 979 ------------------ .../pending/render-stage-proportions.json | 26 - assets/locales/pending/render-stage-ui.json | 426 -------- .../sketch-radius-diameter-toggle.json | 11 - assets/locales/uk.json | 977 ++++++++++++++++- assets/locales/vi.json | 54 + assets/locales/zh.json | 54 + docs/features.md | 9 + 17 files changed, 1417 insertions(+), 1466 deletions(-) delete mode 100644 assets/locales/pending/gpu-memory-lowered.json delete mode 100644 assets/locales/pending/history-origin-bodies.json delete mode 100644 assets/locales/pending/render-stage-proportions.json delete mode 100644 assets/locales/pending/render-stage-ui.json delete mode 100644 assets/locales/pending/sketch-radius-diameter-toggle.json diff --git a/assets/locales/ar.json b/assets/locales/ar.json index c5b61b474..699553a34 100644 --- a/assets/locales/ar.json +++ b/assets/locales/ar.json @@ -432,6 +432,7 @@ "Remove this point": "إزالة هذه النقطة", "Rename Feature": "إعادة تسمية الميزة", "Rename Folder": "إعادة تسمية المجلد", + "Render Stage": "مرحلة التصيير", "Reopen designs": "إعادة فتح التصاميم", "Reopen the designs that were open when SolidCraft was last closed": "إعادة فتح التصاميم التي كانت مفتوحة عند آخر إغلاق لـ SolidCraft", "Replace existing library file": "استبدال ملف المكتبة الموجود", @@ -687,6 +688,9 @@ "cmd.appearance_assign": "المظهر", "cmd.appearance_library": "مكتبة المظاهر", "cmd.appearance_list": "قائمة المظاهر", + "cmd.appearance_paint": "تلوين المظهر", + "cmd.appearance_pick_up": "التقاط المظهر", + "cmd.appearance_replace": "استبدال المظهر", "cmd.assembly_bom": "قائمة المواد", "cmd.body_rename": "إعادة تسمية الجسم", "cmd.browser_collapse_all": "طي الكل", @@ -888,9 +892,11 @@ "cmd.plastic_snap_fit": "وصلة كبس", "cmd.render_aging_describe": "تقادم السطح بالطبقات", "cmd.render_backends": "محركات التصيير", + "cmd.render_batch": "تصيير كل اللقطات", "cmd.render_camera_fit": "تأطير موضوع التصيير", "cmd.render_camera_get": "فحص كاميرا التصيير", "cmd.render_cancel": "إلغاء التصيير", + "cmd.render_compare": "مقارنة الصور", "cmd.render_effects_describe": "تأثيرات العدسة والتأثيرات الإبداعية", "cmd.render_export": "تصدير صورة التصيير", "cmd.render_hdr_inspect": "فحص مصدر HDR", @@ -906,6 +912,7 @@ "cmd.render_library_surface_prepare": "تجهيز خرائط سطح مُعدّة", "cmd.render_library_surface_unbind": "إزالة ربط السطح", "cmd.render_library_targets": "البحث عن أهداف مكتبة التصيير", + "cmd.render_lights_solo": "عزل الضوء", "cmd.render_optics_bind": "حفظ الربط البصري", "cmd.render_optics_unbind": "إزالة الربط البصري", "cmd.render_preflight": "فحص طلب التصيير", @@ -1017,6 +1024,7 @@ "cmd.sketch_spline_fit_point": "منحنى شريحي بنقاط ملاءمة", "cmd.sketch_spline_insert_point": "إضافة نقطة إلى المنحنى الشريحي", "cmd.sketch_spun_profile": "مقطع دوراني", + "cmd.sketch_toggle_diameter": "تبديل نصف القطر / القطر", "cmd.sketch_toggle_driven": "تبديل البُعد المُشتق", "cmd.sketch_transform": "تحويل", "cmd.sketch_trim_path": "قص على طول مسار", @@ -1082,6 +1090,7 @@ "cmd.view_rename": "إعادة تسمية عرض مسمّى", "cmd.view_right": "العرض الأيمن", "cmd.view_save": "عرض مسمّى جديد", + "cmd.view_shots_strip": "شريط اللقطات", "cmd.view_spin": "تدوير مستمر", "cmd.view_tool": "أداة التنقل", "cmd.view_top": "العرض العلوي", @@ -1639,6 +1648,7 @@ "render.aging_target_search": "تصفية أسماء الأجسام", "render.aging_upward": "ترسّب على الأسطح المتجهة للأعلى", "render.all_controls_help": "فحص مكثف لكل عناصر التحكم الحالية. صفحات الأقسام توفر تحريرًا مركّزًا دون تغيير الطلب الأساسي.", + "render.all_shots_label": "كل اللقطات", "render.appearance_physics_separate": "المظهر المرئي لا يعيّن الكثافة ولا البيانات الحرارية ولا أي خصائص هندسية أخرى.", "render.availability_native": "تركيب أصلي؛ راجعه قبل التطبيق", "render.availability_projection": "إسقاط مدعوم؛ راجع النطاق وما أُغفل", @@ -1793,10 +1803,13 @@ "render.effects_reset_lens": "إعادة ضبط تأثيرات العدسة", "render.effects_seed": "بذرة النمط", "render.export_display": "تصدير: PNG للعرض", + "render.export_image_label": "تصدير الصورة", "render.export_linear": "تصدير: EXR خطي خام", "render.exr_pending": "يستطيع GPU الاحتفاظ بـ EXR خطي خام. الضغط والصور متعددة الطبقات وتمريرات التصيير المساعدة غير متاحة بعد.", "render.film_grain": "حبيبات فوتوغرافية", "render.fit": "ملاءمة المنتج", + "render.fixed_camera": "الكاميرا", + "render.fixed_world": "العالم", "render.flare_ghosts": "حلقات الوهج الشبحية لكل مصدر", "render.flare_halo": "هالة الوهج", "render.flare_streak": "خط ضوئي بأسلوب أنامورفي", @@ -1823,6 +1836,12 @@ "render.hdr_primaries_srgb": "الألوان الأساسية: sRGB/D65", "render.hdr_primaries_undeclared": "لا يصرّح المصدر بالألوان الأساسية؛ راجع متطلبات الألوان لدى المُصيّر.", "render.hdr_resource_missing": "مورد HDR المحفوظ مفقود من هذا التصميم.", + "render.heading_batch": "الدفعة", + "render.heading_frame": "الإطار", + "render.heading_lens": "العدسة", + "render.heading_results": "النتائج", + "render.heading_shots": "اللقطات", + "render.hide_shots_label": "إخفاء شريط اللقطات", "render.image_advanced": "عناصر تحكم GPU المتقدمة", "render.image_cancelled": "أُلغي التصيير", "render.image_cancelling": "جارٍ الإلغاء", @@ -1854,6 +1873,7 @@ "render.image_width": "العرض", "render.include_rig_cards": "تضمين البطاقات والأعلام السلبية", "render.inspect_scene": "تحديث ملخص المشهد الملتقط", + "render.inspector": "المفتش", "render.keep_editing": "متابعة التحرير", "render.layer_down": "نقل للأسفل", "render.layer_enabled": "الطبقة مفعّلة", @@ -1922,6 +1942,8 @@ "render.library_unfavorite": "إزالة من المفضلة", "render.library_uniform_ack": "استخدام التقريب الموحّد دون تأثيرات مكانية أو متقدمة", "render.library_usable": "إسقاطات قابلة للتنفيذ", + "render.light_anchor_pending": "تغيير نظام إحداثيات الضوء غير مدعوم بعد.", + "render.lights_fixed_to": "الأضواء مثبّتة على", "render.linear_help": "يحتفظ بنسخة أصلية RGBA بفاصلة عائمة 32 بت قبل إزالة التشويش والتعريض وتخطيط الدرجات والمرشحات والخلفية. sRGB/D65 خطي؛ مضروب مسبقًا في التغطية. تُقبل الذاكرة الإضافية صراحةً. بدون ضغط أو تمريرات إضافية.", "render.linear_retain": "الاحتفاظ بـ EXR خطي خام", "render.linear_unavailable": "الإطار المكتمل المختار ليس له EXR محفوظ. فعّل الاحتفاظ قبل التصيير؛ لا يستطيع PNG أقدم استعادة الإشعاع الخام.", @@ -2007,6 +2029,7 @@ "render.output_over_budget": "الصورة المطلوبة تتجاوز نطاق الموارد المختار. اختر حجمًا أو ملفًا متوافقًا صراحةً؛ لا يحدث تخفيض تلقائي.", "render.output_ratio_refused": "البُعد المرتبط يتجاوز حد الحجم لهذه الطريقة. يُحتفظ بالحجم السابق؛ ألغِ قفل النسبة أو اختر قيمة أصغر.", "render.output_swap_orientation": "تبديل العرض والارتفاع", + "render.output_tools_inspector": "عدّل الحجم والصيغة في مفتش المخرجات.", "render.page_aging": "التقادم والتلوث", "render.page_all": "كل عناصر التحكم", "render.page_appearance": "المظهر", @@ -2018,6 +2041,7 @@ "render.page_lighting": "الإضاءة", "render.page_output": "الإخراج", "render.page_scene": "المشهد", + "render.paint_label": "تلوين", "render.passive_stage": "الأرضية والمنصة السلبية", "render.passive_stage_help": "الألواح السلبية المحدودة تخص الصور المُصيّرة فقط. لا تضيف أجسام CAD ولا كتلة. الموضع ثابت بعد التطبيق؛ وتقاطع حدود المنتج يُرفض. لا يوفر CPU إضاءة ارتداد منتشرة.", "render.perspective": "كاميرا منظورية", @@ -2033,6 +2057,10 @@ "render.physical_prepare_plan": "تجهيز خطة الإنشاء (دون تطبيق)", "render.physical_separate": "المظهر ليس تعريفًا للمادة. هذه مراجع موثقة المصدر، لا خصائص فعلية معتمدة. تبقى الكتلة والمواد الهندسية والبصريات الحالية دون تغيير.", "render.physical_unknown": "لم يثبت أي مرشح رقمي. يجب تحديد الدرجة أو التركيبة أو البنية؛ وغير المعروف لا يعني صفرًا.", + "render.pick_component": "مكوّن", + "render.pick_label": "التقاط", + "render.pick_up_label": "التقاط المظهر", + "render.pick_waiting": "اختيار المنتج غير مدعوم بعد.", "render.post_contrast": "التباين", "render.post_gain_b": "كسب الأزرق", "render.post_gain_g": "كسب الأخضر", @@ -2045,6 +2073,7 @@ "render.preview": "المعاينة المدمجة", "render.preview_help": "تظليل نقطي وشفافية ممزوجة. الانكسار وHDRI والتصيير النهائي غير متاحة بعد.", "render.preview_image_settings_help": "تحافظ المعاينة الحية على إضاءة استوديو ثابتة. يُطبّق التعريض وإضاءة الصورة على مهمة الصورة عند «فحص» أو «بدء».", + "render.preview_lighting_help": "المعاينة الحية تعرض الضوء المباشر فقط وبلا ظلال.", "render.preview_retry": "إعادة محاولة المعاينة الحية", "render.preview_unavailable_help": "المعاينة الحية غير متاحة. تبقى الإعدادات المحفوظة وعناصر التحكم في مهمة الصورة متاحة. غيّر المشهد أو أعد المحاولة صراحةً؛ لا يُعاد بناء المشهد المرفوض في كل إطار.", "render.preview_upload": "حمولة رؤوس المعاينة الحية", @@ -2058,8 +2087,10 @@ "render.radial_distortion": "تشوه شعاعي", "render.regrade_action": "إعادة تدريج النسخة الخام (دون إزالة تشويش)", "render.regrade_help": "ينشئ PNG منفصلًا من النسخة الخام المكتملة المختارة باستخدام عناصر التحكم هذه في العرض. لا يتتبع أشعة، ولا يغيّر الحجم أو الكاميرا أو الأضواء الملتقطة، ولا يستبدل EXR. لا يُعاد تطبيق إزالة التشويش: النسخ الخام لا تحتفظ بأدلتها. يبقى الناتج المشتق قابلًا للتصدير بعناصر التحكم نفسها في المهمة.", + "render.regrade_label": "إعادة تدرّج", "render.reload_settings": "إعادة تحميل الإعدادات المحفوظة", "render.replace_ground": "تأكيد استبدال المنصة الحالية", + "render.replace_label": "استبدال", "render.replace_saved_surface": "استبدال ربط محفوظ موجود لهذا الهدف", "render.restore_camera": "استعادة الكاميرا المحفوظة", "render.result_actual_help": "بكسل صورة واحد لكل بكسل عرض.", @@ -2105,6 +2136,7 @@ "render.sampling_title": "العيّنات التكيّفية وعيّنات النفاذ", "render.save_continue": "الحفظ والمتابعة", "render.save_setup": "حفظ الإعداد", + "render.save_shot": "حفظ اللقطة", "render.saved_maps_runtime_conflict": "لا يمكن خلط روابط الأسطح المحفوظة مع تجاوزات بصرية مؤقتة أو HDR غير محفوظ. احفظ HDR أو أزل المدخلات المؤقتة صراحةً.", "render.saved_surface_remove": "إزالة الربط المحفوظ", "render.saved_surfaces": "روابط الأسطح المحفوظة", @@ -2124,6 +2156,9 @@ "render.setup_runtime_unsupported": "لا يمكن حفظ هذه المهمة الكاملة بعد: فيها خرائط أو روابط لأجسام المشهد. أزل تلك المدخلات المؤقتة قبل حفظ إعداد قابل للنقل.", "render.setup_save_missing": "تعذّر العثور على إعداد التصيير المحفوظ بعد اكتمال الأمر.", "render.sharpening": "زيادة حدة التفاصيل", + "render.shell_tab_appearance": "مظهر التصيير", + "render.shell_tab_camera": "كاميرا التصيير", + "render.shell_tab_scene": "مشهد التصيير", "render.shot_duplicate": "تكرار اللقطة المحفوظة", "render.shot_manager": "اللقطات المحفوظة", "render.shot_new_name": "اسم اللقطة الجديد", @@ -2132,11 +2167,19 @@ "render.shot_remove_title": "إزالة اللقطة المحفوظة؟", "render.shot_rename": "إعادة تسمية اللقطة المحفوظة", "render.shot_saved_only": "احفظ المسودة الحالية أولًا. التكرار وإعادة التسمية يحافظان على الخيارات المحفوظة ومراجع الموارد بالضبط.", + "render.show_shots_label": "إظهار شريط اللقطات", "render.sky_ground": "الأرض · RGB خطي", "render.sky_horizon": "الأفق · RGB خطي", "render.sky_zenith": "السمت · RGB خطي", "render.soft_focus": "تركيز ناعم", + "render.stage_frame": "الإطار", + "render.stage_light": "الضوء", + "render.stage_look": "المظهر", + "render.stage_orthographic": "إسقاط متعامد", + "render.stage_output": "المخرجات", "render.stage_panel_count": "الألواح المحفوظة", + "render.stage_preview_note": "معاينة مدمجة · ضوء مباشر", + "render.strip_label": "الشريط", "render.studio_add_area": "إضافة ضوء مساحي", "render.studio_ambient": "إشعاع البيئة الثابت", "render.studio_ambient_rgb": "إشعاع البيئة الثابت (RGB خطي)", @@ -2193,6 +2236,12 @@ "render.volume_max": "الحدود القصوى · mm العالم", "render.volume_min": "الحدود الدنيا · mm العالم", "render.volume_title": "حجم متجانس محدود", + "render.wait_batch": "غير مدعوم بعد: قائمة تصيير اللقطات المحفوظة", + "render.wait_compare": "غير مدعوم بعد: مقارنة الصور المحتفظ بها", + "render.wait_paint": "غير مدعوم بعد: اختيار المنتج وتلوين المظهر", + "render.wait_pick_up": "غير مدعوم بعد: اختيار المنتج وأخذ عينة من المظهر", + "render.wait_replace": "غير مدعوم بعد: استبدال كل استخدامات المظهر", + "render.wait_solo": "غير مدعوم بعد: ظهور الأضواء وعزلها", "sample.bracket.about": "شفة أساسية مع حواف مثنية وثنية حافة وفق قاعدة 2 mm", "sample.bracket.name": "حامل من صفائح معدنية", "sample.enclosure.about": "صندوق مجوّف بشفة ونتوءات للبراغي ومسند ووصلة كبس", @@ -2305,7 +2354,11 @@ "toolbar.render_camera": "الكاميرا", "toolbar.render_environment": "البيئة", "toolbar.render_lighting": "الإضاءة", + "toolbar.render_lights": "الأضواء", + "toolbar.render_result": "النتيجة", "toolbar.render_scene": "المشهد", + "toolbar.render_stage": "المرحلة", + "toolbar.render_studio": "الاستوديو", "trace.points": "{count} نقطة على طول المسار", "trace.stopped_by_contact": "ينتهي عند العيّنة {sample}: سيخترق {a} الجسم {b}", "trace.stopped_by_loop": "ينتهي عند العيّنة {sample}: لا يمكن للحلقة عبر {joint} أن تنغلق أكثر", @@ -2848,6 +2901,7 @@ "ui.fully_constrained": "مقيّد بالكامل", "ui.function": "دالة", "ui.general": "عام", + "ui.gpu_memory_lowered": "نفدت ذاكرة بطاقة الرسومات: يُرسم العرض بجودة أقل.", "ui.graphics": "الرسوميات", "ui.graphics_custom": "مخصص", "ui.graphics_performance": "الأداء", diff --git a/assets/locales/de.json b/assets/locales/de.json index feb8a21ac..cc54f7854 100644 --- a/assets/locales/de.json +++ b/assets/locales/de.json @@ -426,6 +426,7 @@ "Remove this point": "Diesen Punkt entfernen", "Rename Feature": "Merkmal umbenennen", "Rename Folder": "Ordner umbenennen", + "Render Stage": "Renderphase", "Replace existing library file": "Vorhandene Bibliotheksdatei ersetzen", "Report a bug — review a screenshot and open a GitHub draft": "Fehler melden — Screenshot prüfen und einen GitHub-Entwurf öffnen", "Report text copied. Paste it into GitHub and submit your report there.": "Berichtstext kopiert. Fügen Sie ihn auf GitHub ein und reichen Sie den Bericht dort ein.", @@ -647,6 +648,9 @@ "cmd.appearance_assign": "Erscheinungsbild", "cmd.appearance_library": "Erscheinungsbild-Bibliothek", "cmd.appearance_list": "Erscheinungsbilder auflisten", + "cmd.appearance_paint": "Aussehen aufmalen", + "cmd.appearance_pick_up": "Aussehen aufnehmen", + "cmd.appearance_replace": "Erscheinungsbild ersetzen", "cmd.assembly_bom": "Stückliste", "cmd.body_rename": "Körper umbenennen", "cmd.browser_group": "Neue Gruppe", @@ -836,9 +840,11 @@ "cmd.plastic_rules": "Kunststoffregeln auflisten", "cmd.plastic_snap_fit": "Rastverbindung", "cmd.render_backends": "Render-Backends", + "cmd.render_batch": "Alle Aufnahmen rendern", "cmd.render_camera_fit": "Renderobjekt einpassen", "cmd.render_camera_get": "Renderkamera prüfen", "cmd.render_cancel": "Rendering abbrechen", + "cmd.render_compare": "Bilder vergleichen", "cmd.render_export": "PNG exportieren", "cmd.render_hdr_inspect": "HDR-Quelle untersuchen", "cmd.render_library_appearance_apply": "Opakes Bibliotheksaussehen anwenden", @@ -852,6 +858,7 @@ "cmd.render_library_surface_prepare": "Erstellte Oberflächenmaps vorbereiten", "cmd.render_library_surface_unbind": "Remove Surface Binding", "cmd.render_library_targets": "Ziele für Render-Ressourcen suchen", + "cmd.render_lights_solo": "Licht allein anzeigen", "cmd.render_preflight": "Renderanfrage prüfen", "cmd.render_result_pin": "Angezeigtes Render-Ergebnis behalten", "cmd.render_scene": "Renderszene prüfen", @@ -950,6 +957,7 @@ "cmd.sketch_spline_fit_point": "Spline mit Fitpunkten", "cmd.sketch_spline_insert_point": "Splinepunkt hinzufügen", "cmd.sketch_spun_profile": "Gedrehtes Profil", + "cmd.sketch_toggle_diameter": "Radius / Durchmesser umschalten", "cmd.sketch_toggle_driven": "Abhängiges Maß umschalten", "cmd.sketch_transform": "Transformieren", "cmd.sketch_trim_path": "Entlang Pfad trimmen", @@ -1004,6 +1012,7 @@ "cmd.view_normal_to": "Senkrecht zur Auswahl", "cmd.view_rename": "Benannte Ansicht umbenennen", "cmd.view_save": "Neue benannte Ansicht", + "cmd.view_shots_strip": "Aufnahmenleiste", "color.copy": "Klicken, um Farbwerte zu kopieren", "color.edit": "Klicken, um Farbe zu bearbeiten", "color.gamma": "Farbwerte im Gammaraum 0-255 anzeigen", @@ -1265,6 +1274,7 @@ "recovery.min_ago": "vor {count} Min.", "recovery.never_saved": "nie gespeichert", "render.add_ground": "Add fitted ground to setup", + "render.all_shots_label": "Alle Aufnahmen", "render.background": "Szenenhintergrund", "render.bloom_enable": "Darstellungs-Bloom", "render.bloom_help": "Kreativer Ausgabeglanz aus linearen Glanzlichtern mit drei normierten Durchläufen. Radius in Ausgabepixeln; Addition vor sRGB. Keine Linsen-, Volumen- oder Konvergenzsimulation. Das rohe EXR bleibt unverändert.", @@ -1286,8 +1296,17 @@ "render.cpu_budget_studio": "Studio (große Bilder)", "render.cpu_budget_triangles": "Dreiecksobergrenze", "render.cpu_budget_workstation": "Workstation (komplexe Szenen)", + "render.export_image_label": "Bild exportieren", "render.exr_pending": "Die GPU kann rohe lineare EXR-Dateien behalten. Kompression, mehrschichtige Bilder und zusätzliche Renderpässe bleiben nicht verfügbar.", "render.fit": "Produkt einpassen", + "render.fixed_camera": "Kamera", + "render.fixed_world": "Welt", + "render.heading_batch": "Stapel", + "render.heading_frame": "Bildrahmen", + "render.heading_lens": "Objektiv", + "render.heading_results": "Ergebnisse", + "render.heading_shots": "Aufnahmen", + "render.hide_shots_label": "Aufnahmenleiste ausblenden", "render.image_cancelled": "Rendering abgebrochen", "render.image_cancelling": "Wird abgebrochen", "render.image_completed": "Bild bereit zum Export", @@ -1311,6 +1330,7 @@ "render.image_use_largest": "Größte Größe mit diesem Seitenverhältnis verwenden:", "render.image_width": "Breite", "render.include_rig_cards": "Include passive cards and flags", + "render.inspector": "Inspektor", "render.library_applied": "Ressourcenvariante angewendet. Vollständigen Renderauftrag vor dem Start prüfen.", "render.library_apply_hdr": "Mit dieser HDR-Umgebung speichern", "render.library_apply_maps": "Erstellte GPU-Oberflächenmaps verwenden", @@ -1346,6 +1366,8 @@ "render.library_target": "Zielkörper", "render.library_title": "Render-Ressourcenbibliothek", "render.library_uniform_ack": "Einheitliche Näherung ohne räumliche oder erweiterte Effekte verwenden", + "render.light_anchor_pending": "Das Koordinatensystem der Lichter kann noch nicht geändert werden.", + "render.lights_fixed_to": "Lichter gebunden an", "render.material_color_replace": "Basismap ersetzt Körperfarbe", "render.material_limits": "Höchstens 128 Körperüberschreibungen, 32 getrennte Glaskörper, 64 Beschichtungen und 128 Texturbindungen. Identische Maps teilen Speicher; Geräte- und Gesamtspeichergrenzen bleiben aktiv.", "render.material_metallic_map": "Metallanteil-Map (linear)", @@ -1355,6 +1377,8 @@ "render.opaque_image_summary": "Vorschau-PNG · opakes PBR · Transparenz durch Blending", "render.opaque_preview_help": "Opakes PBR und einfache Farben; Transparenz durch Blending. Brechung, HDRI und finales Rendering sind noch nicht verfügbar.", "render.output_format_status": "PNG enthält das exakte fertige Anzeigebild. Optionales GPU-EXR bewahrt rohe lineare FLOAT32-Strahldichte vor Filtern. Export ersetzt nie durch Vorschaucache oder anderen Auftrag.", + "render.output_tools_inspector": "Größe und Format im Ausgabe-Inspektor bearbeiten.", + "render.paint_label": "Aufmalen", "render.passive_stage": "Render-only stage", "render.passive_stage_help": "Finite passive panels belong only to rendered images. They do not add CAD bodies or mass. Placement is fixed after applying; intersecting product bounds refuse. CPU does not provide diffuse bounce lighting.", "render.perspective": "Perspektivische Kamera", @@ -1367,9 +1391,16 @@ "render.physical_prepare_plan": "Prepare creation plan (does not apply)", "render.physical_separate": "Appearance is not material identification. These are sourced references, not certified effective properties. Existing mass, engineering materials and optics are unchanged.", "render.physical_unknown": "No numerical candidate is established. Grade, formulation or construction must be specified; unknown is not zero.", + "render.pick_component": "Komponente", + "render.pick_label": "Auswahl", + "render.pick_up_label": "Aufnehmen", + "render.pick_waiting": "Die Produktauswahl wird noch nicht unterstützt.", "render.preview": "Integrierte Vorschau", "render.preview_help": "Rasterdarstellung mit gemischter Transparenz. Brechung, HDRI und finales Rendering sind noch nicht verfügbar.", + "render.preview_lighting_help": "Die Live-Vorschau zeigt nur direktes Licht und keine Schatten.", + "render.regrade_label": "Neu abstimmen", "render.reload_settings": "Gespeicherte Einstellungen laden", + "render.replace_label": "Ersetzen", "render.replace_saved_surface": "Replace an existing saved binding for this target", "render.restore_camera": "Gespeicherte Kamera laden", "render.result_reduced_display": "Anzeigevorschau auf die Geräte-/Cachegrenze reduziert. PNG und Export behalten die volle Auflösung; native 100%-Ansicht ist hier nicht verfügbar.", @@ -1396,15 +1427,33 @@ "render.ribbon_studios_help": "Implementierte Studios durchsuchen und Ersetzungen vor dem Anwenden prüfen. Konzepte bleiben gekennzeichnet.", "render.ribbon_surface_maps": "Oberflächen", "render.save_setup": "Setup speichern", + "render.save_shot": "Aufnahme speichern", "render.saved_maps_runtime_conflict": "Saved surface bindings cannot be mixed with temporary optical overrides or an unsaved HDR. Save the HDR or remove the temporary inputs explicitly.", "render.saved_surface_remove": "Remove saved binding", "render.saved_surfaces": "Saved surface bindings", "render.saved_surfaces_help": "Pinned built-in maps follow the selected occurrence in local millimeters. A replaced or missing target is an error, never an automatic reassignment.", "render.setup_name": "Name des Setups", + "render.shell_tab_appearance": "Aussehen", + "render.shell_tab_camera": "Kamera", + "render.shell_tab_scene": "SZENE", + "render.show_shots_label": "Aufnahmenleiste einblenden", + "render.stage_frame": "Bildausschnitt", + "render.stage_light": "Licht", + "render.stage_look": "Aussehen", + "render.stage_orthographic": "Orthografisch", + "render.stage_output": "Ausgabe", "render.stage_panel_count": "Saved panels", + "render.stage_preview_note": "Integrierte Vorschau · direktes Licht", + "render.strip_label": "Leiste", "render.unavailable_preview": "Dieses Setup verlangt ein nicht verfügbares Vorschauprofil.", "render.unsaved": "Ungespeicherte Vorschauänderungen", "render.use_preview": "Integrierte Vorschau verwenden", + "render.wait_batch": "Noch nicht unterstützt: Renderwarteschlange gespeicherter Aufnahmen", + "render.wait_compare": "Noch nicht unterstützt: Vergleich gespeicherter Bilder", + "render.wait_paint": "Noch nicht unterstützt: Produktauswahl und Auftragen von Erscheinungsbildern", + "render.wait_pick_up": "Noch nicht unterstützt: Produktauswahl und Übernehmen von Erscheinungsbildern", + "render.wait_replace": "Noch nicht unterstützt: Ersetzen aller Verwendungen eines Erscheinungsbilds", + "render.wait_solo": "Noch nicht unterstützt: Lichtsichtbarkeit und Solo-Steuerung", "sample.bracket.about": "Grundflansch mit Kantenflanschen und einer Umkantung nach einer 2-mm-Blechregel", "sample.bracket.name": "Blechwinkel", "sample.enclosure.about": "Ausgehöhlter Block mit Lippe, Schraubenerhöhungen, Auflage und Rastverbindung", @@ -1496,7 +1545,11 @@ "toolbar.render_camera": "KAMERA", "toolbar.render_environment": "UMGEBUNG", "toolbar.render_lighting": "BELEUCHTUNG", + "toolbar.render_lights": "LICHTER", + "toolbar.render_result": "ERGEBNIS", "toolbar.render_scene": "SZENE", + "toolbar.render_stage": "BÜHNE", + "toolbar.render_studio": "STUDIO", "trace.points": "{count} Punkte entlang der Bahn", "trace.stopped_by_contact": "Endet bei Probe {sample}: {a} würde {b} durchdringen", "trace.stopped_by_loop": "Endet bei Probe {sample}: die Schleife über {joint} lässt sich nicht weiter schließen", @@ -1984,6 +2037,7 @@ "ui.fully_constrained": "Vollständig bestimmt", "ui.function": "Funktion", "ui.general": "Allgemein", + "ui.gpu_memory_lowered": "Die Grafikkarte hat keinen Speicher mehr frei: Die Ansicht wird in geringerer Qualität gezeichnet.", "ui.graphics": "Grafik", "ui.graphics_custom": "Benutzerdefiniert", "ui.graphics_performance": "Leistung", diff --git a/assets/locales/en.json b/assets/locales/en.json index 41e670889..97f75f5f0 100644 --- a/assets/locales/en.json +++ b/assets/locales/en.json @@ -432,6 +432,7 @@ "Remove this point": "Remove this point", "Rename Feature": "Rename Feature", "Rename Folder": "Rename Folder", + "Render Stage": "Render Stage", "Reopen designs": "Reopen designs", "Reopen the designs that were open when SolidCraft was last closed": "Reopen the designs that were open when SolidCraft was last closed", "Replace existing library file": "Replace existing library file", @@ -687,6 +688,9 @@ "cmd.appearance_assign": "Appearance", "cmd.appearance_library": "Appearance Library", "cmd.appearance_list": "List Appearances", + "cmd.appearance_paint": "Paint Appearance", + "cmd.appearance_pick_up": "Pick Up Appearance", + "cmd.appearance_replace": "Replace Appearance", "cmd.assembly_bom": "Bill of Materials", "cmd.body_rename": "Rename Body", "cmd.browser_collapse_all": "Collapse All", @@ -888,9 +892,11 @@ "cmd.plastic_snap_fit": "Snap Fit", "cmd.render_aging_describe": "Layered Surface Aging", "cmd.render_backends": "Render Backends", + "cmd.render_batch": "Render All Shots", "cmd.render_camera_fit": "Frame Render Subject", "cmd.render_camera_get": "Inspect Render Camera", "cmd.render_cancel": "Cancel Render", + "cmd.render_compare": "Compare Images", "cmd.render_effects_describe": "Lens and Creative Effects", "cmd.render_export": "Export Render Image", "cmd.render_hdr_inspect": "Inspect HDR Source", @@ -906,6 +912,7 @@ "cmd.render_library_surface_prepare": "Prepare Authored Surface Maps", "cmd.render_library_surface_unbind": "Remove Surface Binding", "cmd.render_library_targets": "Find Render Library Targets", + "cmd.render_lights_solo": "Solo Light", "cmd.render_optics_bind": "Save Optical Binding", "cmd.render_optics_unbind": "Remove Optical Binding", "cmd.render_preflight": "Check Render Request", @@ -1017,6 +1024,7 @@ "cmd.sketch_spline_fit_point": "Fit Point Spline", "cmd.sketch_spline_insert_point": "Add Spline Point", "cmd.sketch_spun_profile": "Spun Profile", + "cmd.sketch_toggle_diameter": "Toggle Radius / Diameter", "cmd.sketch_toggle_driven": "Toggle Driven Dimension", "cmd.sketch_transform": "Transform", "cmd.sketch_trim_path": "Trim Along Path", @@ -1082,6 +1090,7 @@ "cmd.view_rename": "Rename Named View", "cmd.view_right": "Right View", "cmd.view_save": "New Named View", + "cmd.view_shots_strip": "Shots Strip", "cmd.view_spin": "Continuous orbit", "cmd.view_tool": "Navigation tool", "cmd.view_top": "Top View", @@ -1639,6 +1648,7 @@ "render.aging_target_search": "Filter body names", "render.aging_upward": "Upward-facing deposition", "render.all_controls_help": "Dense inspection of all current controls. Section pages provide focused editing without changing the underlying request.", + "render.all_shots_label": "All Shots", "render.appearance_physics_separate": "Visual appearance does not assign density, thermal data or other engineering properties.", "render.availability_native": "Native composition; review before applying", "render.availability_projection": "Supported projection; see scope and omissions", @@ -1793,10 +1803,13 @@ "render.effects_reset_lens": "Reset lens effects", "render.effects_seed": "Pattern seed", "render.export_display": "Export: display PNG", + "render.export_image_label": "Export Image", "render.export_linear": "Export: raw linear EXR", "render.exr_pending": "GPU can retain raw linear EXR. Compression, multilayer images and auxiliary render passes remain unavailable.", "render.film_grain": "Photographic grain", "render.fit": "Fit Product", + "render.fixed_camera": "Camera", + "render.fixed_world": "World", "render.flare_ghosts": "Ghost rings per source", "render.flare_halo": "Flare halo", "render.flare_streak": "Anamorphic-style streak", @@ -1823,6 +1836,12 @@ "render.hdr_primaries_srgb": "Color primaries: sRGB/D65", "render.hdr_primaries_undeclared": "The source does not declare primaries; review the renderer color requirements.", "render.hdr_resource_missing": "This design is missing the saved HDR resource.", + "render.heading_batch": "BATCH", + "render.heading_frame": "FRAME", + "render.heading_lens": "LENS", + "render.heading_results": "RESULTS", + "render.heading_shots": "SHOTS", + "render.hide_shots_label": "Hide Shots strip", "render.image_advanced": "Advanced GPU controls", "render.image_cancelled": "Render cancelled", "render.image_cancelling": "Cancelling", @@ -1854,6 +1873,7 @@ "render.image_width": "Width", "render.include_rig_cards": "Include passive cards and flags", "render.inspect_scene": "Refresh captured scene summary", + "render.inspector": "Inspector", "render.keep_editing": "Keep editing", "render.layer_down": "Move down", "render.layer_enabled": "Layer enabled", @@ -1922,6 +1942,8 @@ "render.library_unfavorite": "Remove favorite", "render.library_uniform_ack": "Use the uniform approximation without spatial or advanced effects", "render.library_usable": "Executable projections", + "render.light_anchor_pending": "Changing the light coordinate frame is not supported yet.", + "render.lights_fixed_to": "Lights fixed to", "render.linear_help": "Keeps a 32-bit float RGBA master before denoising, exposure, tone mapping, filters and backdrop. Linear sRGB/D65; coverage-premultiplied. Additional memory is admitted explicitly. No compression or extra passes.", "render.linear_retain": "Retain raw linear EXR", "render.linear_unavailable": "The selected completed frame has no retained EXR. Enable retention before rendering; an older PNG cannot recover raw radiance.", @@ -2007,6 +2029,7 @@ "render.output_over_budget": "The requested image exceeds the selected resource envelope. Choose a compatible size or profile explicitly; no automatic downgrade occurs.", "render.output_ratio_refused": "The linked dimension exceeds this method’s size limit. The previous size is retained; unlock the ratio or choose a smaller value.", "render.output_swap_orientation": "Swap width and height", + "render.output_tools_inspector": "Edit size and format in the Output inspector.", "render.page_aging": "Aging & contamination", "render.page_all": "All controls", "render.page_appearance": "Appearance", @@ -2018,6 +2041,7 @@ "render.page_lighting": "Lighting", "render.page_output": "Output", "render.page_scene": "Scene", + "render.paint_label": "Paint", "render.passive_stage": "Ground and passive stage", "render.passive_stage_help": "Finite passive panels belong only to rendered images. They do not add CAD bodies or mass. Placement is fixed after applying; intersecting product bounds refuse. CPU does not provide diffuse bounce lighting.", "render.perspective": "Perspective camera", @@ -2033,6 +2057,10 @@ "render.physical_prepare_plan": "Prepare creation plan (does not apply)", "render.physical_separate": "Appearance is not material identification. These are sourced references, not certified effective properties. Existing mass, engineering materials and optics are unchanged.", "render.physical_unknown": "No numerical candidate is established. Grade, formulation or construction must be specified; unknown is not zero.", + "render.pick_component": "Component", + "render.pick_label": "Pick", + "render.pick_up_label": "Pick Up", + "render.pick_waiting": "Product picking is not supported yet.", "render.post_contrast": "Contrast", "render.post_gain_b": "Blue gain", "render.post_gain_g": "Green gain", @@ -2045,6 +2073,7 @@ "render.preview": "Integrated preview", "render.preview_help": "Raster shading and blended transparency. Refraction, HDRI and final rendering are not available yet.", "render.preview_image_settings_help": "Live Preview keeps fixed studio lighting. Exposure and image lighting apply to the image job when you Check or Start.", + "render.preview_lighting_help": "The live preview shows direct light only and no shadows.", "render.preview_retry": "Retry live preview", "render.preview_unavailable_help": "The live preview is unavailable. Saved setups and image-job controls remain accessible. Change the scene or explicitly retry; a refused scene is not rebuilt on every frame.", "render.preview_upload": "Live-preview vertex payload", @@ -2058,8 +2087,10 @@ "render.radial_distortion": "Radial distortion", "render.regrade_action": "Regrade raw master (no denoising)", "render.regrade_help": "Creates a separate PNG from the selected completed raw master, using these presentation controls. Does not trace rays, change the captured size/camera/lights, or overwrite the EXR. Denoising is not reapplied: raw masters do not retain its guides. The derivative remains exportable through the same job controls.", + "render.regrade_label": "Regrade", "render.reload_settings": "Reload Saved Settings", "render.replace_ground": "Confirm replacement of existing stage", + "render.replace_label": "Replace", "render.replace_saved_surface": "Replace an existing saved binding for this target", "render.restore_camera": "Restore Saved Camera", "render.result_actual_help": "One image pixel per display pixel.", @@ -2105,6 +2136,7 @@ "render.sampling_title": "Adaptive and transmission sampling", "render.save_continue": "Save and continue", "render.save_setup": "Save Setup", + "render.save_shot": "Save Shot", "render.saved_maps_runtime_conflict": "Saved surface bindings cannot be mixed with temporary optical overrides or an unsaved HDR. Save the HDR or remove the temporary inputs explicitly.", "render.saved_surface_remove": "Remove saved binding", "render.saved_surfaces": "Saved surface bindings", @@ -2124,6 +2156,9 @@ "render.setup_runtime_unsupported": "This full job cannot be saved yet: it contains maps or scene-body bindings. Remove those temporary inputs before saving a portable setup.", "render.setup_save_missing": "The saved render configuration could not be found after the command completed.", "render.sharpening": "Detail sharpening", + "render.shell_tab_appearance": "RENDER APPEARANCE", + "render.shell_tab_camera": "RENDER CAMERA", + "render.shell_tab_scene": "RENDER SCENE", "render.shot_duplicate": "Duplicate saved shot", "render.shot_manager": "Saved shots", "render.shot_new_name": "New shot name", @@ -2132,11 +2167,19 @@ "render.shot_remove_title": "Remove saved shot?", "render.shot_rename": "Rename saved shot", "render.shot_saved_only": "Save the current draft first. Duplicate and rename preserve exact saved options and resource references.", + "render.show_shots_label": "Show Shots strip", "render.sky_ground": "Ground · linear RGB", "render.sky_horizon": "Horizon · linear RGB", "render.sky_zenith": "Zenith · linear RGB", "render.soft_focus": "Soft focus", + "render.stage_frame": "Frame", + "render.stage_light": "Light", + "render.stage_look": "Look", + "render.stage_orthographic": "Orthographic", + "render.stage_output": "Output", "render.stage_panel_count": "Saved panels", + "render.stage_preview_note": "Integrated preview · direct light", + "render.strip_label": "Strip", "render.studio_add_area": "Add area light", "render.studio_ambient": "Constant environment radiance", "render.studio_ambient_rgb": "Constant environment radiance (linear RGB)", @@ -2193,6 +2236,12 @@ "render.volume_max": "Maximum bounds · world mm", "render.volume_min": "Minimum bounds · world mm", "render.volume_title": "Bounded homogeneous volume", + "render.wait_batch": "not supported yet: the saved-shot render queue", + "render.wait_compare": "not supported yet: retained image comparison", + "render.wait_paint": "not supported yet: product picking and appearance painting", + "render.wait_pick_up": "not supported yet: product picking and appearance sampling", + "render.wait_replace": "not supported yet: replacing all uses of an appearance", + "render.wait_solo": "not supported yet: light visibility and solo controls", "sample.bracket.about": "Base flange with edge flanges and a hem on a 2 mm rule", "sample.bracket.name": "Sheet Metal Bracket", "sample.enclosure.about": "Shelled box with a lip, screw bosses, a rest and a snap fit", @@ -2305,7 +2354,11 @@ "toolbar.render_camera": "CAMERA", "toolbar.render_environment": "ENVIRONMENT", "toolbar.render_lighting": "LIGHTING", + "toolbar.render_lights": "LIGHTS", + "toolbar.render_result": "RESULT", "toolbar.render_scene": "SCENE", + "toolbar.render_stage": "STAGE", + "toolbar.render_studio": "STUDIO", "trace.points": "{count} points along the path", "trace.stopped_by_contact": "Ends at sample {sample}: {a} would pass through {b}", "trace.stopped_by_loop": "Ends at sample {sample}: the loop through {joint} can't close any further", @@ -2848,6 +2901,7 @@ "ui.fully_constrained": "Fully constrained", "ui.function": "Function", "ui.general": "General", + "ui.gpu_memory_lowered": "The graphics card is out of memory: the view is drawn at a lower quality.", "ui.graphics": "Graphics", "ui.graphics_custom": "Custom", "ui.graphics_performance": "Performance", diff --git a/assets/locales/es.json b/assets/locales/es.json index 2c2b4b0c7..f6677c6de 100644 --- a/assets/locales/es.json +++ b/assets/locales/es.json @@ -759,6 +759,7 @@ "cmd.sketch_spline_control_point_5": "Spline por puntos de control (grado 5)", "cmd.sketch_spline_fit_point": "Spline por puntos de ajuste", "cmd.sketch_spun_profile": "Perfil de revolución", + "cmd.sketch_toggle_diameter": "Alternar radio / diámetro", "cmd.sketch_toggle_driven": "Alternar cota de referencia", "cmd.sketch_trim_path": "Recortar a lo largo de la trayectoria", "cmd.solid_align": "Alinear", diff --git a/assets/locales/fr.json b/assets/locales/fr.json index 8070e0f0c..f1bc7e283 100644 --- a/assets/locales/fr.json +++ b/assets/locales/fr.json @@ -994,6 +994,7 @@ "cmd.sketch_spline_control_point_5": "Spline par points de contrôle (degré 5)", "cmd.sketch_spline_fit_point": "Spline par points", "cmd.sketch_spun_profile": "Profil de révolution", + "cmd.sketch_toggle_diameter": "Basculer rayon / diamètre", "cmd.sketch_toggle_driven": "Basculer en cote pilotée", "cmd.sketch_trim_path": "Ajuster le long du chemin", "cmd.solid_align": "Aligner", diff --git a/assets/locales/he.json b/assets/locales/he.json index a2aa673aa..8809f2ede 100644 --- a/assets/locales/he.json +++ b/assets/locales/he.json @@ -432,6 +432,7 @@ "Remove this point": "הסרת נקודה זו", "Rename Feature": "שינוי שם פיצ'ר", "Rename Folder": "שינוי שם תיקייה", + "Render Stage": "שלב הרינדור", "Reopen designs": "פתיחה מחדש של תכנים", "Reopen the designs that were open when SolidCraft was last closed": "פתיחה מחדש של התכנים שהיו פתוחים כש־SolidCraft נסגרה בפעם האחרונה", "Replace existing library file": "החלפת קובץ הספרייה הקיים", @@ -687,6 +688,9 @@ "cmd.appearance_assign": "מראה", "cmd.appearance_library": "ספריית מראים", "cmd.appearance_list": "רשימת מראים", + "cmd.appearance_paint": "צביעת מראה", + "cmd.appearance_pick_up": "בחירת מראה", + "cmd.appearance_replace": "החלפת מראה", "cmd.assembly_bom": "רשימת חלקים", "cmd.body_rename": "שינוי שם גוף", "cmd.browser_collapse_all": "כיווץ הכול", @@ -888,9 +892,11 @@ "cmd.plastic_snap_fit": "חיבור הצמדה", "cmd.render_aging_describe": "הזדקנות משטח בשכבות", "cmd.render_backends": "מנועי הדמיה", + "cmd.render_batch": "רינדור כל הצילומים", "cmd.render_camera_fit": "מסגור נושא ההדמיה", "cmd.render_camera_get": "בדיקת מצלמת ההדמיה", "cmd.render_cancel": "ביטול הדמיה", + "cmd.render_compare": "השוואת תמונות", "cmd.render_effects_describe": "אפקטי עדשה ואפקטים יצירתיים", "cmd.render_export": "ייצוא תמונת הדמיה", "cmd.render_hdr_inspect": "בדיקת מקור HDR", @@ -906,6 +912,7 @@ "cmd.render_library_surface_prepare": "הכנת מפות משטח מעוצבות", "cmd.render_library_surface_unbind": "הסרת קישור משטח", "cmd.render_library_targets": "חיפוש יעדים לספריית ההדמיה", + "cmd.render_lights_solo": "בידוד אור", "cmd.render_optics_bind": "שמירת קישור אופטי", "cmd.render_optics_unbind": "הסרת קישור אופטי", "cmd.render_preflight": "בדיקת בקשת הדמיה", @@ -1017,6 +1024,7 @@ "cmd.sketch_spline_fit_point": "ספליין נקודות התאמה", "cmd.sketch_spline_insert_point": "הוספת נקודה לספליין", "cmd.sketch_spun_profile": "פרופיל סיבובי", + "cmd.sketch_toggle_diameter": "מעבר בין רדיוס לקוטר", "cmd.sketch_toggle_driven": "מעבר בין מידה מונעת למניעה", "cmd.sketch_transform": "התמרה", "cmd.sketch_trim_path": "גיזום לאורך מסלול", @@ -1082,6 +1090,7 @@ "cmd.view_rename": "שינוי שם תצוגה שמורה", "cmd.view_right": "תצוגה ימנית", "cmd.view_save": "תצוגה שמורה חדשה", + "cmd.view_shots_strip": "סרגל צילומים", "cmd.view_spin": "סיבוב מבט רציף", "cmd.view_tool": "כלי ניווט", "cmd.view_top": "תצוגה עליונה", @@ -1639,6 +1648,7 @@ "render.aging_target_search": "סינון שמות גופים", "render.aging_upward": "שקיעה על משטחים הפונים מעלה", "render.all_controls_help": "בדיקה צפופה של כל הפקדים הנוכחיים. דפי המקטעים מאפשרים עריכה ממוקדת בלי לשנות את הבקשה עצמה.", + "render.all_shots_label": "כל הצילומים", "render.appearance_physics_separate": "המראה החזותי אינו מקצה צפיפות, נתונים תרמיים או תכונות הנדסיות אחרות.", "render.availability_native": "קומפוזיציה מקורית; יש לסקור לפני ההחלה", "render.availability_projection": "השלכה נתמכת; ראו היקף והשמטות", @@ -1793,10 +1803,13 @@ "render.effects_reset_lens": "איפוס אפקטי העדשה", "render.effects_seed": "זרע הדוגמה", "render.export_display": "ייצוא: PNG לתצוגה", + "render.export_image_label": "ייצוא תמונה", "render.export_linear": "ייצוא: EXR ליניארי גולמי", "render.exr_pending": "GPU יכול לשמור EXR ליניארי גולמי. דחיסה, תמונות רב־שכבתיות ומעברי הדמיה נלווים עדיין אינם זמינים.", "render.film_grain": "גרעיניות צילומית", "render.fit": "התאמת המוצר לתצוגה", + "render.fixed_camera": "מצלמה", + "render.fixed_world": "עולם", "render.flare_ghosts": "טבעות רפאים לכל מקור", "render.flare_halo": "הילת בוהק", "render.flare_streak": "פס בסגנון אנמורפי", @@ -1823,6 +1836,12 @@ "render.hdr_primaries_srgb": "צבעי יסוד: sRGB/D65", "render.hdr_primaries_undeclared": "המקור אינו מצהיר על צבעי יסוד; יש לעיין בדרישות הצבע של מנוע ההדמיה.", "render.hdr_resource_missing": "בתכן הזה חסר משאב ה־HDR השמור.", + "render.heading_batch": "אצווה", + "render.heading_frame": "מסגרת", + "render.heading_lens": "עדשה", + "render.heading_results": "תוצאות", + "render.heading_shots": "צילומים", + "render.hide_shots_label": "הסתר את סרגל הצילומים", "render.image_advanced": "פקדי GPU מתקדמים", "render.image_cancelled": "ההדמיה בוטלה", "render.image_cancelling": "מבטל", @@ -1854,6 +1873,7 @@ "render.image_width": "רוחב", "render.include_rig_cards": "הכללת כרטיסים ודגלים סבילים", "render.inspect_scene": "רענון סיכום הסצנה שנלכדה", + "render.inspector": "מפקח", "render.keep_editing": "המשך עריכה", "render.layer_down": "הזזה למטה", "render.layer_enabled": "השכבה מופעלת", @@ -1922,6 +1942,8 @@ "render.library_unfavorite": "הסרה מהמועדפים", "render.library_uniform_ack": "שימוש בקירוב האחיד ללא אפקטים מרחביים או מתקדמים", "render.library_usable": "השלכות ניתנות להרצה", + "render.light_anchor_pending": "שינוי מערכת הצירים של האור אינו נתמך עדיין.", + "render.lights_fixed_to": "האורות מקובעים אל", "render.linear_help": "שומר מאסטר RGBA בנקודה צפה של 32 סיביות לפני הסרת רעש, חשיפה, מיפוי גוונים, מסננים ורקע. sRGB/D65 ליניארי; מוכפל מראש בכיסוי. זיכרון נוסף מאושר במפורש. ללא דחיסה או מעברים נוספים.", "render.linear_retain": "שמירת EXR ליניארי גולמי", "render.linear_unavailable": "לפריים הגמור שנבחר אין EXR שמור. יש להפעיל שמירה לפני ההדמיה; PNG ישן אינו יכול לשחזר קרינה גולמית.", @@ -2007,6 +2029,7 @@ "render.output_over_budget": "התמונה המבוקשת חורגת ממעטפת המשאבים שנבחרה. יש לבחור במפורש גודל או פרופיל מתאימים; אין הורדה אוטומטית.", "render.output_ratio_refused": "הממד המקושר חורג ממגבלת הגודל של השיטה הזאת. הגודל הקודם נשמר; יש לבטל את נעילת היחס או לבחור ערך קטן יותר.", "render.output_swap_orientation": "החלפת רוחב וגובה", + "render.output_tools_inspector": "ערוך גודל ופורמט במפקח הפלט.", "render.page_aging": "הזדקנות וזיהום", "render.page_all": "כל הפקדים", "render.page_appearance": "מראה", @@ -2018,6 +2041,7 @@ "render.page_lighting": "תאורה", "render.page_output": "פלט", "render.page_scene": "סצנה", + "render.paint_label": "צביעה", "render.passive_stage": "קרקע ובמה סבילה", "render.passive_stage_help": "לוחות סבילים סופיים שייכים לתמונות מודמות בלבד. הם אינם מוסיפים גופי CAD או מסה. המיקום קבוע אחרי ההחלה; חיתוך עם גבולות המוצר נדחה. CPU אינו מספק תאורת החזרה מפוזרת.", "render.perspective": "מצלמה פרספקטיבית", @@ -2033,6 +2057,10 @@ "render.physical_prepare_plan": "הכנת תוכנית יצירה (ללא החלה)", "render.physical_separate": "מראה אינו זיהוי חומר. אלה ייחוסים מתועדי מקור, לא תכונות אפקטיביות מאושרות. המסה, החומרים ההנדסיים והאופטיקה הקיימים אינם משתנים.", "render.physical_unknown": "לא נקבע מועמד מספרי. יש לציין דרגה, הרכב או מבנה; לא ידוע אינו אפס.", + "render.pick_component": "רכיב", + "render.pick_label": "בחירה", + "render.pick_up_label": "בחירת מראה", + "render.pick_waiting": "בחירת מוצר אינה נתמכת עדיין.", "render.post_contrast": "ניגודיות", "render.post_gain_b": "הגבר כחול", "render.post_gain_g": "הגבר ירוק", @@ -2045,6 +2073,7 @@ "render.preview": "תצוגה מקדימה מובנית", "render.preview_help": "הצללת רסטר ושקיפות ממוזגת. שבירת אור, HDRI והדמיה סופית עדיין אינם זמינים.", "render.preview_image_settings_help": "התצוגה המקדימה החיה שומרת על תאורת סטודיו קבועה. החשיפה ותאורת התמונה חלות על משימת התמונה בעת בדיקה או התחלה.", + "render.preview_lighting_help": "התצוגה המקדימה החיה מציגה אור ישיר בלבד וללא צללים.", "render.preview_retry": "ניסיון חוזר של התצוגה המקדימה החיה", "render.preview_unavailable_help": "התצוגה המקדימה החיה אינה זמינה. ההגדרות השמורות ופקדי משימת התמונה נשארים זמינים. יש לשנות את הסצנה או לנסות שוב במפורש; סצנה שנדחתה אינה נבנית מחדש בכל פריים.", "render.preview_upload": "מטען הקודקודים של התצוגה המקדימה החיה", @@ -2058,8 +2087,10 @@ "render.radial_distortion": "עיוות רדיאלי", "render.regrade_action": "תיקון צבע מחדש למאסטר הגולמי (ללא הסרת רעש)", "render.regrade_help": "יוצר PNG נפרד מהמאסטר הגולמי הגמור שנבחר, באמצעות פקדי התצוגה האלה. אינו עוקב אחר קרניים, אינו משנה את הגודל, המצלמה או האורות שנלכדו ואינו דורס את ה־EXR. הסרת רעש אינה מוחלת שוב: מאסטרים גולמיים אינם שומרים את המדריכים שלה. התוצר הנגזר נשאר ניתן לייצוא באותם פקדי משימה.", + "render.regrade_label": "כיול מחדש", "render.reload_settings": "טעינה מחדש של ההגדרות השמורות", "render.replace_ground": "אישור החלפת הבמה הקיימת", + "render.replace_label": "החלפה", "render.replace_saved_surface": "החלפת קישור שמור קיים ליעד הזה", "render.restore_camera": "שחזור המצלמה השמורה", "render.result_actual_help": "פיקסל תמונה אחד לכל פיקסל תצוגה.", @@ -2105,6 +2136,7 @@ "render.sampling_title": "דגימה אדפטיבית ודגימת העברה", "render.save_continue": "שמירה והמשך", "render.save_setup": "שמירת ההגדרה", + "render.save_shot": "שמור צילום", "render.saved_maps_runtime_conflict": "אי אפשר לשלב קישורי משטח שמורים עם דריסות אופטיות זמניות או עם HDR שלא נשמר. יש לשמור את ה־HDR או להסיר את הקלטים הזמניים במפורש.", "render.saved_surface_remove": "הסרת הקישור השמור", "render.saved_surfaces": "קישורי משטח שמורים", @@ -2124,6 +2156,9 @@ "render.setup_runtime_unsupported": "עדיין אי אפשר לשמור את המשימה המלאה הזאת: יש בה מפות או קישורים לגופי סצנה. יש להסיר את הקלטים הזמניים האלה לפני שמירת הגדרה ניידת.", "render.setup_save_missing": "תצורת ההדמיה השמורה לא נמצאה אחרי שהפקודה הסתיימה.", "render.sharpening": "חידוד פרטים", + "render.shell_tab_appearance": "מראה רינדור", + "render.shell_tab_camera": "מצלמת רינדור", + "render.shell_tab_scene": "סצנת רינדור", "render.shot_duplicate": "שכפול הצילום השמור", "render.shot_manager": "צילומים שמורים", "render.shot_new_name": "שם הצילום החדש", @@ -2132,11 +2167,19 @@ "render.shot_remove_title": "להסיר את הצילום השמור?", "render.shot_rename": "שינוי שם הצילום השמור", "render.shot_saved_only": "יש לשמור קודם את הטיוטה הנוכחית. שכפול ושינוי שם שומרים על האפשרויות השמורות ועל הפניות המשאבים במדויק.", + "render.show_shots_label": "הצג את סרגל הצילומים", "render.sky_ground": "קרקע · RGB ליניארי", "render.sky_horizon": "אופק · RGB ליניארי", "render.sky_zenith": "זנית · RGB ליניארי", "render.soft_focus": "מיקוד רך", + "render.stage_frame": "מסגרת", + "render.stage_light": "אור", + "render.stage_look": "מראה", + "render.stage_orthographic": "אורתוגרפי", + "render.stage_output": "פלט", "render.stage_panel_count": "לוחות שמורים", + "render.stage_preview_note": "תצוגה מקדימה משולבת · אור ישיר", + "render.strip_label": "סרגל", "render.studio_add_area": "הוספת אור שטח", "render.studio_ambient": "קרינת סביבה קבועה", "render.studio_ambient_rgb": "קרינת סביבה קבועה (RGB ליניארי)", @@ -2193,6 +2236,12 @@ "render.volume_max": "גבולות מרביים · mm בעולם", "render.volume_min": "גבולות מזעריים · mm בעולם", "render.volume_title": "נפח הומוגני תחום", + "render.wait_batch": "לא נתמך עדיין: תור רינדור של צילומים שמורים", + "render.wait_compare": "לא נתמך עדיין: השוואת תמונות שנשמרו", + "render.wait_paint": "לא נתמך עדיין: בחירת מוצר וצביעת מראה", + "render.wait_pick_up": "לא נתמך עדיין: בחירת מוצר ודגימת מראה", + "render.wait_replace": "לא נתמך עדיין: החלפת כל השימושים במראה", + "render.wait_solo": "לא נתמך עדיין: נראות אורות ובידוד", "sample.bracket.about": "אוגן בסיס עם אוגני קצה וקיפול חוזר, לפי כלל של 2 mm", "sample.bracket.name": "תושבת פח", "sample.enclosure.about": "קופסה עם קליפה, שפה, בליטות לברגים, משען ותפס הצמדה", @@ -2305,7 +2354,11 @@ "toolbar.render_camera": "מצלמה", "toolbar.render_environment": "סביבה", "toolbar.render_lighting": "תאורה", + "toolbar.render_lights": "אורות", + "toolbar.render_result": "תוצאה", "toolbar.render_scene": "סצנה", + "toolbar.render_stage": "שלב", + "toolbar.render_studio": "סטודיו", "trace.points": "{count} נקודות לאורך המסלול", "trace.stopped_by_contact": "מסתיים בדגימה {sample}: {a} היה עובר דרך {b}", "trace.stopped_by_loop": "מסתיים בדגימה {sample}: הלולאה דרך {joint} לא יכולה להיסגר יותר", @@ -2848,6 +2901,7 @@ "ui.fully_constrained": "מאולצת במלואה", "ui.function": "פונקציה", "ui.general": "כללי", + "ui.gpu_memory_lowered": "הזיכרון של כרטיס המסך אזל: התצוגה מוצגת באיכות נמוכה יותר.", "ui.graphics": "גרפיקה", "ui.graphics_custom": "מותאם אישית", "ui.graphics_performance": "ביצועים", diff --git a/assets/locales/ja.json b/assets/locales/ja.json index b8413e59d..2be770a31 100644 --- a/assets/locales/ja.json +++ b/assets/locales/ja.json @@ -432,6 +432,7 @@ "Remove this point": "この点を削除", "Rename Feature": "フィーチャーの名前を変更", "Rename Folder": "フォルダーの名前を変更", + "Render Stage": "レンダリング段階", "Reopen designs": "デザインを再度開く", "Reopen the designs that were open when SolidCraft was last closed": "前回 SolidCraft を閉じたときに開いていたデザインを再度開く", "Replace existing library file": "既存のライブラリファイルを置き換える", @@ -687,6 +688,9 @@ "cmd.appearance_assign": "外観", "cmd.appearance_library": "外観ライブラリ", "cmd.appearance_list": "外観を一覧表示", + "cmd.appearance_paint": "外観をペイント", + "cmd.appearance_pick_up": "外観を取得", + "cmd.appearance_replace": "外観を置換", "cmd.assembly_bom": "部品表", "cmd.body_rename": "ボディの名前を変更", "cmd.browser_collapse_all": "すべて折りたたむ", @@ -888,9 +892,11 @@ "cmd.plastic_snap_fit": "スナップ フィット", "cmd.render_aging_describe": "レイヤー式表面エイジング", "cmd.render_backends": "レンダリング バックエンド", + "cmd.render_batch": "すべてのショットをレンダリング", "cmd.render_camera_fit": "レンダー対象をフレームに合わせる", "cmd.render_camera_get": "レンダーカメラを確認", "cmd.render_cancel": "レンダリングをキャンセル", + "cmd.render_compare": "画像を比較", "cmd.render_effects_describe": "レンズとクリエイティブ効果", "cmd.render_export": "PNGをエクスポート", "cmd.render_hdr_inspect": "HDRソースを調査", @@ -906,6 +912,7 @@ "cmd.render_library_surface_prepare": "作成済みサーフェスマップを準備", "cmd.render_library_surface_unbind": "Remove Surface Binding", "cmd.render_library_targets": "レンダリングリソースの対象を検索", + "cmd.render_lights_solo": "ライトを単独表示", "cmd.render_optics_bind": "光学割り当てを保存", "cmd.render_optics_unbind": "光学割り当てを削除", "cmd.render_preflight": "レンダリング要求を確認", @@ -1017,6 +1024,7 @@ "cmd.sketch_spline_fit_point": "通過点スプライン", "cmd.sketch_spline_insert_point": "スプライン点を追加", "cmd.sketch_spun_profile": "回転プロファイル", + "cmd.sketch_toggle_diameter": "半径 / 直径の切り替え", "cmd.sketch_toggle_driven": "従動寸法の切り替え", "cmd.sketch_transform": "変形", "cmd.sketch_trim_path": "パスに沿ってトリム", @@ -1082,6 +1090,7 @@ "cmd.view_rename": "名前付きビューの名前を変更", "cmd.view_right": "右側面ビュー", "cmd.view_save": "新規名前付きビュー", + "cmd.view_shots_strip": "ショットストリップ", "cmd.view_spin": "連続オービット", "cmd.view_tool": "ナビゲーションツール", "cmd.view_top": "上面ビュー", @@ -1639,6 +1648,7 @@ "render.aging_target_search": "ボディ名を絞り込む", "render.aging_upward": "上向き面への堆積", "render.all_controls_help": "現在の全コントロールをまとめて表示します。各ページでは同じ要求を保ちながら項目別に編集できます。", + "render.all_shots_label": "すべてのショット", "render.appearance_physics_separate": "外観の設定では、密度、熱特性などの工学的な物性値は割り当てられません。", "render.availability_native": "ネイティブ構成。適用前に確認してください", "render.availability_projection": "対応する部分適用。範囲と省略項目を確認してください", @@ -1793,10 +1803,13 @@ "render.effects_reset_lens": "レンズ効果をリセット", "render.effects_seed": "パターンシード", "render.export_display": "書き出し:表示PNG", + "render.export_image_label": "画像を書き出す", "render.export_linear": "書き出し:生の線形EXR", "render.exr_pending": "GPUでは線形EXRを保持できます。圧縮、複数レイヤー、補助パスは未実装です。", "render.film_grain": "写真粒子", "render.fit": "製品を画面に合わせる", + "render.fixed_camera": "カメラ", + "render.fixed_world": "ワールド", "render.flare_ghosts": "光源ごとのゴースト環", "render.flare_halo": "フレアのハロー", "render.flare_streak": "アナモルフィック風の筋", @@ -1823,6 +1836,12 @@ "render.hdr_primaries_srgb": "原色:sRGB/D65", "render.hdr_primaries_undeclared": "原色が宣言されていません。レンダラーの色要件を確認してください。", "render.hdr_resource_missing": "保存されたHDRリソースがこのデザインにありません。", + "render.heading_batch": "バッチ", + "render.heading_frame": "フレーム", + "render.heading_lens": "レンズ", + "render.heading_results": "結果", + "render.heading_shots": "ショット", + "render.hide_shots_label": "ショットストリップを非表示", "render.image_advanced": "GPU 詳細設定", "render.image_cancelled": "レンダリングをキャンセルしました", "render.image_cancelling": "キャンセル中", @@ -1854,6 +1873,7 @@ "render.image_width": "幅", "render.include_rig_cards": "Include passive cards and flags", "render.inspect_scene": "記録するシーンの概要を更新", + "render.inspector": "インスペクター", "render.keep_editing": "編集を続ける", "render.layer_down": "下へ", "render.layer_enabled": "層を有効にする", @@ -1922,6 +1942,8 @@ "render.library_unfavorite": "お気に入りから削除", "render.library_uniform_ack": "空間変化や高度な効果のない均一近似を使用", "render.library_usable": "実行可能な部分適用", + "render.light_anchor_pending": "ライトの座標系の変更はまだサポートされていません。", + "render.lights_fixed_to": "ライトの固定先", "render.linear_help": "ノイズ除去、露出、トーンマッピング、フィルター、背景処理より前の32ビット浮動小数点RGBAを保持します。線形sRGB/D65で、被覆率を乗算した値です。追加メモリを明示的に見積もります。圧縮や追加パスはありません。", "render.linear_retain": "生の線形EXRを保持", "render.linear_unavailable": "選択した完了画像にEXRは保持されていません。レンダー前に保持を有効にしてください。古いPNGから生の放射輝度は復元できません。", @@ -2007,6 +2029,7 @@ "render.output_over_budget": "要求画像が選択したリソース枠を超えています。対応するサイズかプロファイルを明示的に選択してください。自動的な品質低下は行いません。", "render.output_ratio_refused": "連動する寸法が方式の上限を超えます。以前のサイズを維持します。縦横比固定を解除するか、小さい値を選択してください。", "render.output_swap_orientation": "幅と高さを交換", + "render.output_tools_inspector": "サイズと形式は出力インスペクターで編集してください。", "render.page_aging": "エイジング・付着物", "render.page_all": "全コントロール", "render.page_appearance": "外観", @@ -2018,6 +2041,7 @@ "render.page_lighting": "照明", "render.page_output": "出力", "render.page_scene": "シーン", + "render.paint_label": "ペイント", "render.passive_stage": "Render-only stage", "render.passive_stage_help": "Finite passive panels belong only to rendered images. They do not add CAD bodies or mass. Placement is fixed after applying; intersecting product bounds refuse. CPU does not provide diffuse bounce lighting.", "render.perspective": "透視投影カメラ", @@ -2033,6 +2057,10 @@ "render.physical_prepare_plan": "Prepare creation plan (does not apply)", "render.physical_separate": "Appearance is not material identification. These are sourced references, not certified effective properties. Existing mass, engineering materials and optics are unchanged.", "render.physical_unknown": "No numerical candidate is established. Grade, formulation or construction must be specified; unknown is not zero.", + "render.pick_component": "コンポーネント", + "render.pick_label": "選択", + "render.pick_up_label": "取得", + "render.pick_waiting": "製品の選択はまだサポートされていません。", "render.post_contrast": "コントラスト", "render.post_gain_b": "青ゲイン", "render.post_gain_g": "緑ゲイン", @@ -2045,6 +2073,7 @@ "render.preview": "統合プレビュー", "render.preview_help": "ラスタシェーディングとブレンド透明度を使用します。屈折、HDRI、最終レンダリングはまだ利用できません。", "render.preview_image_settings_help": "ライブプレビューは固定のスタジオ照明を使用します。画像の露出と照明は、確認または開始時に画像ジョブへ適用されます。", + "render.preview_lighting_help": "ライブプレビューは直接光のみを表示し、影は表示しません。", "render.preview_retry": "ライブプレビューを再試行", "render.preview_unavailable_help": "ライブプレビューは利用できません。保存設定と画像ジョブの操作は使用できます。シーンを変更するか明示的に再試行してください。拒否されたシーンを毎フレーム再構築しません。", "render.preview_upload": "ライブプレビューの頂点データ量", @@ -2058,8 +2087,10 @@ "render.radial_distortion": "放射状歪み", "render.regrade_action": "生マスターを再調整(ノイズ除去なし)", "render.regrade_help": "選択した完了済み生マスターから、この表示設定で別の PNG を作成します。光線追跡、撮影サイズ・カメラ・照明の変更、EXR の上書きは行いません。ガイドを保持しないためノイズ除去は再適用しません。通常のジョブ操作で書き出せます。", + "render.regrade_label": "再グレーディング", "render.reload_settings": "保存した設定を再読み込み", "render.replace_ground": "既存ステージの置換を確認", + "render.replace_label": "置換", "render.replace_saved_surface": "Replace an existing saved binding for this target", "render.restore_camera": "保存したカメラを復元", "render.result_actual_help": "画像の1ピクセルを画面の1ピクセルで表示します。", @@ -2105,6 +2136,7 @@ "render.sampling_title": "適応・透過サンプリング", "render.save_continue": "保存して続行", "render.save_setup": "セットアップを保存", + "render.save_shot": "ショットを保存", "render.saved_maps_runtime_conflict": "Saved surface bindings cannot be mixed with temporary optical overrides or an unsaved HDR. Save the HDR or remove the temporary inputs explicitly.", "render.saved_surface_remove": "Remove saved binding", "render.saved_surfaces": "Saved surface bindings", @@ -2124,6 +2156,9 @@ "render.setup_runtime_unsupported": "このジョブにはマップまたはシーンのボディへの割り当てが含まれるため、全体を保存できません。移植可能な設定を保存する前に、一時入力を削除してください。", "render.setup_save_missing": "コマンド完了後に保存済みレンダリング設定を見つけられませんでした。", "render.sharpening": "ディテールのシャープ化", + "render.shell_tab_appearance": "外観", + "render.shell_tab_camera": "カメラ", + "render.shell_tab_scene": "シーン", "render.shot_duplicate": "保存済みショットを複製", "render.shot_manager": "保存済みショット", "render.shot_new_name": "新しいショット名", @@ -2132,11 +2167,19 @@ "render.shot_remove_title": "保存済みショットを削除しますか?", "render.shot_rename": "保存済みショットの名前を変更", "render.shot_saved_only": "先に現在の下書きを保存してください。複製と名前変更では正確な保存オプションとリソース参照を保持します。", + "render.show_shots_label": "ショットストリップを表示", "render.sky_ground": "地面・線形RGB", "render.sky_horizon": "地平線・線形RGB", "render.sky_zenith": "天頂・線形RGB", "render.soft_focus": "ソフトフォーカス", + "render.stage_frame": "構図", + "render.stage_light": "照明", + "render.stage_look": "外観", + "render.stage_orthographic": "平行投影", + "render.stage_output": "出力", "render.stage_panel_count": "Saved panels", + "render.stage_preview_note": "統合プレビュー · 直接光", + "render.strip_label": "ストリップ", "render.studio_add_area": "エリアライトを追加", "render.studio_ambient": "一定の環境放射輝度", "render.studio_ambient_rgb": "一定の環境放射輝度(リニアRGB)", @@ -2193,6 +2236,12 @@ "render.volume_max": "最大境界 · ワールド mm", "render.volume_min": "最小境界 · ワールド mm", "render.volume_title": "有限の均一ボリューム", + "render.wait_batch": "未対応: 保存ショットのレンダーキュー", + "render.wait_compare": "未対応: 保持された画像の比較", + "render.wait_paint": "未対応: 製品の選択と外観のペイント", + "render.wait_pick_up": "未対応: 製品の選択と外観の採取", + "render.wait_replace": "未対応: 外観のすべての使用箇所の置換", + "render.wait_solo": "未対応: ライトの表示とソロ操作", "sample.bracket.about": "2 mm の板金ルールによるベース フランジ、エッジ フランジ、ヘミング", "sample.bracket.name": "板金ブラケット", "sample.enclosure.about": "リップ、ねじボス、レスト、スナップ フィットを備えたシェル化した直方体", @@ -2305,7 +2354,11 @@ "toolbar.render_camera": "カメラ", "toolbar.render_environment": "環境", "toolbar.render_lighting": "照明", + "toolbar.render_lights": "ライト", + "toolbar.render_result": "結果", "toolbar.render_scene": "シーン", + "toolbar.render_stage": "ステージ", + "toolbar.render_studio": "スタジオ", "trace.points": "経路上の {count} 点", "trace.stopped_by_contact": "サンプル {sample} で終了: {a} が {b} を通り抜けてしまいます", "trace.stopped_by_loop": "サンプル {sample} で終了: {joint} を通るループはこれ以上閉じられません", @@ -2848,6 +2901,7 @@ "ui.fully_constrained": "完全拘束", "ui.function": "関数", "ui.general": "一般", + "ui.gpu_memory_lowered": "グラフィックカードのメモリが不足しています。ビューは低い画質で描画されます。", "ui.graphics": "グラフィックス", "ui.graphics_custom": "カスタム", "ui.graphics_performance": "パフォーマンス", diff --git a/assets/locales/ko.json b/assets/locales/ko.json index acc3a023b..3e5a11679 100644 --- a/assets/locales/ko.json +++ b/assets/locales/ko.json @@ -373,6 +373,7 @@ "Remove this point": "이 점 제거", "Rename Feature": "피처 이름 바꾸기", "Rename Folder": "폴더 이름 바꾸기", + "Render Stage": "렌더링 단계", "Replace existing library file": "기존 라이브러리 파일 바꾸기", "Report a bug — review a screenshot and open a GitHub draft": "버그 신고 — 스크린샷을 검토하고 GitHub 초안 열기", "Report text copied. Paste it into GitHub and submit your report there.": "보고서 텍스트를 복사했습니다. GitHub에 붙여넣고 그곳에서 보고서를 제출하세요.", @@ -598,6 +599,9 @@ "cmd.appearance_assign": "외관", "cmd.appearance_library": "외관 라이브러리", "cmd.appearance_list": "외관 목록", + "cmd.appearance_paint": "모양 칠하기", + "cmd.appearance_pick_up": "모양 가져오기", + "cmd.appearance_replace": "모양 바꾸기", "cmd.assembly_bom": "자재 명세서", "cmd.body_rename": "바디 이름 변경", "cmd.browser_group": "새 그룹", @@ -783,9 +787,11 @@ "cmd.plastic_rules": "플라스틱 규칙 목록", "cmd.plastic_snap_fit": "스냅핏", "cmd.render_backends": "렌더링 백엔드", + "cmd.render_batch": "모든 샷 렌더링", "cmd.render_camera_fit": "렌더 대상 화면 맞춤", "cmd.render_camera_get": "렌더 카메라 확인", "cmd.render_cancel": "렌더링 취소", + "cmd.render_compare": "이미지 비교", "cmd.render_export": "PNG 내보내기", "cmd.render_hdr_inspect": "HDR 소스 검사", "cmd.render_library_appearance_apply": "라이브러리 불투명 외관 적용", @@ -799,6 +805,7 @@ "cmd.render_library_surface_prepare": "제작된 표면 맵 준비", "cmd.render_library_surface_unbind": "Remove Surface Binding", "cmd.render_library_targets": "렌더 리소스 대상 찾기", + "cmd.render_lights_solo": "광원 단독 표시", "cmd.render_preflight": "렌더 요청 확인", "cmd.render_result_pin": "표시된 렌더 결과 유지", "cmd.render_scene": "렌더링 장면 검사", @@ -950,6 +957,7 @@ "cmd.view_normal_to": "선택 항목에 수직", "cmd.view_rename": "이름 있는 보기 이름 변경", "cmd.view_save": "새 이름 있는 보기", + "cmd.view_shots_strip": "샷 스트립", "color.copy": "클릭하여 색상 값 복사", "color.edit": "클릭하여 색상 편집", "color.gamma": "색상 값을 0-255 감마 공간으로 표시 중", @@ -1338,6 +1346,7 @@ "recovery.min_ago": "{count}분 전", "recovery.never_saved": "저장된 적 없음", "render.add_ground": "Add fitted ground to setup", + "render.all_shots_label": "모든 샷", "render.background": "장면 배경", "render.bloom_enable": "표시 블룸", "render.bloom_help": "양의 선형 하이라이트를 세 번의 정규화 필터로 확산하는 출력 전용 효과입니다. 반경은 출력 픽셀 단위이며 sRGB 전에 더합니다. 렌즈·볼륨·수렴 개선이 아니며 원본 EXR은 변하지 않습니다.", @@ -1357,8 +1366,17 @@ "render.cpu_budget_studio": "스튜디오 (큰 이미지)", "render.cpu_budget_triangles": "삼각형 수 상한", "render.cpu_budget_workstation": "워크스테이션 (대규모 장면)", + "render.export_image_label": "이미지 내보내기", "render.exr_pending": "GPU는 원본 선형 EXR을 보존할 수 있습니다. 압축, 다중 레이어 이미지 및 보조 렌더 패스는 아직 사용할 수 없습니다.", "render.fit": "제품에 맞추기", + "render.fixed_camera": "카메라", + "render.fixed_world": "월드", + "render.heading_batch": "일괄 처리", + "render.heading_frame": "프레임", + "render.heading_lens": "렌즈", + "render.heading_results": "결과", + "render.heading_shots": "샷", + "render.hide_shots_label": "샷 스트립 숨기기", "render.image_cancelled": "렌더링 취소됨", "render.image_cancelling": "취소 중", "render.image_completed": "이미지 내보내기 준비됨", @@ -1382,6 +1400,7 @@ "render.image_use_largest": "이 비율에서 가장 큰 크기 사용:", "render.image_width": "너비", "render.include_rig_cards": "Include passive cards and flags", + "render.inspector": "속성 검사기", "render.library_applied": "리소스 변환을 적용했습니다. 시작 전에 전체 렌더 요청을 확인하세요.", "render.library_apply_hdr": "이 HDR 환경과 함께 저장", "render.library_apply_maps": "제작된 GPU 표면 맵 사용", @@ -1417,6 +1436,8 @@ "render.library_target": "대상 바디", "render.library_title": "렌더 리소스 라이브러리", "render.library_uniform_ack": "공간 변화나 고급 효과 없는 균일 근사 사용", + "render.light_anchor_pending": "조명 좌표계 변경은 아직 지원되지 않습니다.", + "render.lights_fixed_to": "조명 고정 기준", "render.material_color_replace": "기본 맵으로 바디 색상 교체", "render.material_limits": "최대 128개 바디 설정, 분리된 유리 32개, 코팅 64개, 텍스처 연결 128개. 같은 맵은 메모리를 공유하며 실제 장치 및 전체 메모리 제한은 유지됩니다.", "render.material_metallic_map": "금속성 맵 (선형)", @@ -1426,6 +1447,8 @@ "render.opaque_image_summary": "미리보기 PNG · 불투명 PBR · 블렌딩 투명도", "render.opaque_preview_help": "불투명 PBR 및 단색 표시, 블렌딩 투명도를 지원합니다. 굴절, HDRI 및 최종 렌더링은 아직 지원하지 않습니다.", "render.output_format_status": "PNG는 완료된 표시 이미지 그대로입니다. 선택적 GPU EXR은 표시 필터 전 선형 FLOAT32 방사 휘도를 보존합니다. 미리보기 캐시나 다른 작업으로 바꾸어 내보내지 않습니다.", + "render.output_tools_inspector": "출력 검사기에서 크기와 형식을 편집하세요.", + "render.paint_label": "칠하기", "render.passive_stage": "Render-only stage", "render.passive_stage_help": "Finite passive panels belong only to rendered images. They do not add CAD bodies or mass. Placement is fixed after applying; intersecting product bounds refuse. CPU does not provide diffuse bounce lighting.", "render.perspective": "원근 카메라", @@ -1438,9 +1461,16 @@ "render.physical_prepare_plan": "Prepare creation plan (does not apply)", "render.physical_separate": "Appearance is not material identification. These are sourced references, not certified effective properties. Existing mass, engineering materials and optics are unchanged.", "render.physical_unknown": "No numerical candidate is established. Grade, formulation or construction must be specified; unknown is not zero.", + "render.pick_component": "구성요소", + "render.pick_label": "선택", + "render.pick_up_label": "가져오기", + "render.pick_waiting": "제품 선택은 아직 지원되지 않습니다.", "render.preview": "통합 미리보기", "render.preview_help": "래스터 셰이딩과 블렌딩 투명도를 사용합니다. 굴절, HDRI 및 최종 렌더링은 아직 지원하지 않습니다.", + "render.preview_lighting_help": "실시간 미리 보기에는 직접 조명만 표시되며 그림자는 표시되지 않습니다.", + "render.regrade_label": "색상 재조정", "render.reload_settings": "저장된 설정 다시 불러오기", + "render.replace_label": "바꾸기", "render.replace_saved_surface": "Replace an existing saved binding for this target", "render.restore_camera": "저장된 카메라 복원", "render.result_reduced_display": "표시 미리보기를 뷰포트 장치 또는 캐시 제한에 맞춰 축소했습니다. 보관된 PNG와 내보내기는 전체 해상도를 유지합니다. 이 축소 보기에서는 원본 100% 검사가 불가능합니다.", @@ -1467,15 +1497,33 @@ "render.ribbon_studios_help": "구현된 스튜디오를 찾아보고 적용 전에 교체 항목을 검토합니다. 개념 장면은 구분됩니다.", "render.ribbon_surface_maps": "표면 맵", "render.save_setup": "설정 저장", + "render.save_shot": "샷 저장", "render.saved_maps_runtime_conflict": "Saved surface bindings cannot be mixed with temporary optical overrides or an unsaved HDR. Save the HDR or remove the temporary inputs explicitly.", "render.saved_surface_remove": "Remove saved binding", "render.saved_surfaces": "Saved surface bindings", "render.saved_surfaces_help": "Pinned built-in maps follow the selected occurrence in local millimeters. A replaced or missing target is an error, never an automatic reassignment.", "render.setup_name": "설정 이름", + "render.shell_tab_appearance": "모양", + "render.shell_tab_camera": "카메라", + "render.shell_tab_scene": "장면", + "render.show_shots_label": "샷 스트립 표시", + "render.stage_frame": "구도", + "render.stage_light": "조명", + "render.stage_look": "외관", + "render.stage_orthographic": "직교 투영", + "render.stage_output": "출력", "render.stage_panel_count": "Saved panels", + "render.stage_preview_note": "통합 미리 보기 · 직접광", + "render.strip_label": "스트립", "render.unavailable_preview": "이 설정은 사용할 수 없는 미리보기 프로필을 요청합니다.", "render.unsaved": "저장하지 않은 미리보기 변경 사항", "render.use_preview": "통합 미리보기 사용", + "render.wait_batch": "아직 지원되지 않음: 저장된 샷 렌더 대기열", + "render.wait_compare": "아직 지원되지 않음: 보관된 이미지 비교", + "render.wait_paint": "아직 지원되지 않음: 제품 선택 및 모양 페인팅", + "render.wait_pick_up": "아직 지원되지 않음: 제품 선택 및 모양 샘플링", + "render.wait_replace": "아직 지원되지 않음: 모양이 사용된 모든 곳 바꾸기", + "render.wait_solo": "아직 지원되지 않음: 조명 표시 및 단독 표시 제어", "sample.bracket.about": "2 mm 판금 규칙을 적용한 베이스 플랜지, 에지 플랜지, 헴", "sample.bracket.name": "판금 브래킷", "sample.enclosure.about": "리프, 나사 보스, 레스트, 스냅핏이 있는 쉘 처리된 박스", @@ -1565,7 +1613,11 @@ "toolbar.render_camera": "카메라", "toolbar.render_environment": "환경", "toolbar.render_lighting": "조명", + "toolbar.render_lights": "조명", + "toolbar.render_result": "결과", "toolbar.render_scene": "장면", + "toolbar.render_stage": "스테이지", + "toolbar.render_studio": "스튜디오", "trace.points": "경로를 따라 {count}개 점", "trace.stopped_by_contact": "샘플 {sample}에서 끝남: {a}이(가) {b}을(를) 통과합니다", "trace.stopped_by_loop": "샘플 {sample}에서 끝남: {joint}을(를) 지나는 루프를 더 이상 닫을 수 없습니다", diff --git a/assets/locales/pending/gpu-memory-lowered.json b/assets/locales/pending/gpu-memory-lowered.json deleted file mode 100644 index 1c445c660..000000000 --- a/assets/locales/pending/gpu-memory-lowered.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "en": { - "ui.gpu_memory_lowered": "The graphics card is out of memory: the view is drawn at a lower quality." - }, - "ar": { - "ui.gpu_memory_lowered": "نفدت ذاكرة بطاقة الرسومات: يُرسم العرض بجودة أقل." - }, - "de": { - "ui.gpu_memory_lowered": "Die Grafikkarte hat keinen Speicher mehr frei: Die Ansicht wird in geringerer Qualität gezeichnet." - }, - "he": { - "ui.gpu_memory_lowered": "הזיכרון של כרטיס המסך אזל: התצוגה מוצגת באיכות נמוכה יותר." - }, - "ja": { - "ui.gpu_memory_lowered": "グラフィックカードのメモリが不足しています。ビューは低い画質で描画されます。" - }, - "vi": { - "ui.gpu_memory_lowered": "Card đồ họa đã hết bộ nhớ: khung nhìn được vẽ với chất lượng thấp hơn." - }, - "zh": { - "ui.gpu_memory_lowered": "显卡内存不足:视图以较低画质绘制。" - } -} diff --git a/assets/locales/pending/history-origin-bodies.json b/assets/locales/pending/history-origin-bodies.json deleted file mode 100644 index f50b8fed9..000000000 --- a/assets/locales/pending/history-origin-bodies.json +++ /dev/null @@ -1,979 +0,0 @@ -{ - "uk": { - "A Single hole snaps to the middle of its face and to the centres of its round edges": "Одинарний отвір прив'язується до центру грані та до центрів круглих ребер", - "A placed Single hole has a handle to drag it, and picking its face again moves the hole there instead of taking it out": "Розміщений одинарний отвір має маркер для перетягування; повторне вибрання грані переміщує отвір туди замість видалення", - "A short title for the problem (optional)": "Короткий заголовок проблеми (необов'язково)", - "Add bend": "Додати згин", - "All Lines": "Усі лінії", - "Anchor": "Прив'язка", - "Angle Display": "Відображення кута", - "Another bend on the far edge of the last flange": "Ще один згин на дальньому ребрі останнього фланця", - "Bar": "Смуга", - "Bend": "Згин", - "Bottom Left": "Нижній лівий", - "Bottom Middle": "Нижній по центру", - "Bottom Right": "Нижній правий", - "Centroid": "Центроїд", - "Channel": "Швелер", - "Circle center": "Центр кола", - "Copies the definition only. Assign it from Physical Material when ready.": "Копіює лише визначення. Призначте з «Фізичного матеріалу», коли буде готово.", - "Corner radius": "Радіус кута", - "Create Hole": "Створити отвір", - "Current plane": "Поточна площина", - "Drag to move the boss across the model. It snaps to sketch points on the face.": "Перетягніть, щоб перемістити виступ по моделі. Він прив'язується до точок ескізу на грані.", - "Drag to move the hole; click to remove it": "Перетягніть для переміщення отвору; клацніть для видалення", - "Drag to move the rest across the model. It snaps to sketch points on the face.": "Перетягніть, щоб перемістити підпірку по моделі. Вона прив'язується до точок ескізу на грані.", - "Drag to move the snap fit across the model. It snaps to sketch points on the face.": "Перетягніть, щоб перемістити защіпку по моделі. Вона прив'язується до точок ескізу на грані.", - "Drag to point the catch in another direction.": "Перетягніть, щоб змінити напрямок зачеплення.", - "Drag to turn the rest in 5° steps. Hold Alt or Ctrl to turn it freely.": "Перетягніть, щоб повернути підпірку з кроком 5°. Утримуйте Alt або Ctrl для вільного повороту.", - "Exported by SolidWorks, which usually saves Y up": "Експортовано з SolidWorks, який зазвичай зберігає з віссю Y вгору", - "Face center": "Центр грані", - "Flange thickness": "Товщина фланця", - "Flanges": "Фланці", - "Full thread depth": "Повна глибина різьби", - "Further Bends": "Додаткові згини", - "Halo under sketch curves": "Орбіта під кривими ескізу", - "Height From": "Висота від", - "I-Beam": "Двотавр", - "Import material into design": "Імпортувати матеріал у проєкт", - "Included": "Включено", - "Inner Sharp": "Гострий внутрішній", - "L-Angle": "Кутник", - "Left Middle": "Лівий по центру", - "Lines": "Lines", - "M5, M5x0.5, 1/4-20 UNC": "M5, M5x0.5, 1/4-20 UNC", - "Material Outside": "Material Outside", - "Material copied. Existing body assignments are unchanged.": "Material copied. Existing body assignments are unchanged.", - "Move holes by clicking or dragging": "Move holes by clicking or dragging", - "Name on import": "Name on import", - "No matching physical materials.": "No matching physical materials.", - "Not saved yet": "Not saved yet", - "Open bodies (no volume)": "Open bodies (no volume)", - "Open surface — no volume": "Open surface — no volume", - "Other way": "Other way", - "Outer Sharp": "Гострий зовнішній", - "Outer radius": "Outer radius", - "Physical material definitions": "Physical material definitions", - "Rectangular Tube": "Rectangular Tube", - "Remove this bend": "Remove this bend", - "Reopen designs": "Reopen designs", - "Reopen the designs that were open when SolidCraft was last closed": "Reopen the designs that were open when SolidCraft was last closed", - "Right Middle": "Правий по центру", - "Root radius": "Root radius", - "Round Bar": "Round Bar", - "Round Tube": "Round Tube", - "Same way": "Same way", - "Section (optional)": "Section (optional)", - "Show ghost": "Show ghost", - "Snap to face and edge centres": "Snap to face and edge centres", - "Tangent": "Tangent", - "Tangent to Edge": "Tangent to Edge", - "Thread depth": "Thread depth", - "Thread diameter": "Thread diameter", - "Toe radius": "Toe radius", - "Top Left": "Верхній лівий", - "Top Middle": "Верхній по центру", - "Top Right": "Верхній правий", - "Web thickness": "Web thickness", - "ai.connected_toast": "SolidCraft is now available in {clients}. Restart them to use it (Settings > Assistant).", - "ai.prefs.allow_control": "Let AI agents connect (control channel / MCP)", - "ai.prefs.allow_control_note": "Opens a control channel on this computer only (127.0.0.1, port 27878 or the next free one). A program that connects must also show a secret token that only your user account can read, made fresh at every start. Takes effect the next time SolidCraft starts. Off: nothing listens unless you start SolidCraft with --control.", - "ai.prefs.connect_apps": "Make SolidCraft available to AI apps on this computer", - "ai.prefs.connect_apps_note": "When SolidCraft starts, adds it as an MCP server to the AI apps found on this computer (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), so an agent can use it without any setup. Only the solidcraft entry is added or its path refreshed; an entry you changed is left alone, and the file is backed up first. Off: the entries it added are removed. Help > Connect AI assistants… does this by hand.", - "cmd.browser_collapse_all": "Collapse All", - "cmd.browser_expand_all": "Expand All", - "cmd.component_copies": "Find Identical Copies", - "cmd.component_copy_bodies": "Paste Bodies", - "cmd.component_cycle_color": "Cycle Component Color", - "cmd.component_extract": "Extract to File", - "cmd.component_replace_with_link": "Replace with Link", - "cmd.document_revision": "Design Revision", - "cmd.file_send_to_slicer": "Send to Slicer", - "cmd.inspect_colored_components": "Enable Component Colors", - "cmd.inspect_colored_components_disable": "Disable Component Colors", - "cmd.inspect_parameter_sweep": "Parameter Sweep", - "cmd.motion_trace_edit": "Edit Motion Trace", - "cmd.occurrence_drag": "Drag Occurrence", - "cmd.occurrence_reparent": "Move to Component", - "cmd.render_aging_describe": "Layered Surface Aging", - "cmd.render_camera_fit": "Frame Render Subject", - "cmd.render_camera_get": "Inspect Render Camera", - "cmd.render_effects_describe": "Lens and Creative Effects", - "cmd.render_hdr_inspect": "Inspect HDR Source", - "cmd.render_library_appearance_apply": "Apply Library Opaque Appearance", - "cmd.render_library_describe": "Inspect Render Library Resource", - "cmd.render_library_environment_apply": "Apply Built-in HDR Environment", - "cmd.render_library_list": "Browse Render Library", - "cmd.render_library_physical_prepare": "Prepare Physical Reference", - "cmd.render_library_preview": "Inspect Original Surface Map", - "cmd.render_library_studio_apply": "Apply Authored Studio Lights", - "cmd.render_library_studio_prepare": "Prepare Authored Studio Lights", - "cmd.render_library_surface_bind": "Save Surface Binding", - "cmd.render_library_surface_prepare": "Prepare Authored Surface Maps", - "cmd.render_library_surface_unbind": "Remove Surface Binding", - "cmd.render_library_targets": "Find Render Library Targets", - "cmd.render_optics_bind": "Save Optical Binding", - "cmd.render_optics_unbind": "Remove Optical Binding", - "cmd.render_preset_apply": "Apply Native Studio", - "cmd.render_preset_resolve": "Review Native Studio", - "cmd.render_quality_prepare": "Review Fixed Sampling Budget", - "cmd.render_result_pin": "Retain Displayed Render Result", - "cmd.render_result_regrade": "Regrade Linear Master", - "cmd.render_settings_capture_hdr": "Save Render Settings with HDR", - "cmd.render_shot_duplicate": "Duplicate Render Shot", - "cmd.render_shot_remove": "Remove Render Shot", - "cmd.render_shot_rename": "Rename Render Shot", - "cmd.render_stage_backdrop": "Save Physical Render Background", - "cmd.render_stage_clear": "Remove Render Stage", - "cmd.render_stage_ground": "Save Render Ground", - "cmd.sheet_path_flange": "Path Flange", - "cmd.sketch_arc3d": "3D Arc", - "cmd.sketch_cancel": "Cancel Sketch", - "cmd.sketch_drawing_bounds": "Drawing Size", - "cmd.sketch_transform": "Transform", - "cmd.view_back": "Back View", - "cmd.view_bottom": "Bottom View", - "cmd.view_fit": "Fit", - "cmd.view_front": "Front View", - "cmd.view_grid": "Grid", - "cmd.view_ground_shadow": "Ground shadow", - "cmd.view_home": "Home view", - "cmd.view_isometric": "Isometric View", - "cmd.view_left": "Left View", - "cmd.view_navigation_bar": "Navigation bar", - "cmd.view_right": "Right View", - "cmd.view_spin": "Continuous orbit", - "cmd.view_tool": "Navigation tool", - "cmd.view_top": "Top View", - "cmd.view_visual_style": "Visual style", - "diagnostic.empty_boolean_component": "there is no body to cut or intersect in component '{component}'; the tool may overlap '{body}' in component '{other}' — activate that component or pick the body as a target", - "document.changed_on_disk": "{name} changed on disk", - "document.changed_on_disk_detail": "{name} was changed by another program or computer since you opened or last saved it. Overwrite replaces those changes with yours; Save a Copy keeps both.", - "document.copy_name": "{name} copy", - "document.open_anyway": "Open Anyway", - "document.open_elsewhere": "{name} is already open", - "document.open_elsewhere_detail": "{name} is open in SolidCraft {app} on {who}, opened {when}. If you both save, one of you loses work. Open it read-only to look at it without saving over it.", - "document.open_read_only": "Open Read-Only", - "document.opened_read_only": "Opened read-only: Save asks for a new file", - "document.overwrite": "Overwrite", - "document.read_only_save": "This design was opened read-only: save it as a new file", - "document.save_copy": "Save a Copy…", - "file.open.drawing_filter": "Designs, CAD files, meshes and drawings", - "file_load.link_item": "{name} ({done} of {total})", - "file_load.updating_links": "Updating links", - "from the profile": "from the profile", - "help.connect_note": "Restart each assistant to load the SolidCraft server. Each file was backed up as .bak before it changed.", - "help.connect_title": "Connect AI assistants", - "help.solid.combine": "Joins bodies, cuts them out of a target body, or keeps only the volume they share, and can keep the tool bodies. Use it to merge parts, to cut one shape with another or to find where two bodies overlap.", - "help.solid.loft": "Blends a smooth solid between two or more sketch profiles, or from a profile to a point. Use it for transitions, funnels, handles and any shape that changes section along its length.", - "help.solid.mirror": "Makes a mirrored copy of the selected bodies or features across a plane, and can merge it with the original. Use it for symmetric parts, so that you model one half and get both.", - "help.solid.pattern.circular": "Repeats the selected objects around an axis, for the count and total angle you set. Use it for bolt circles, spokes, fins and teeth.", - "help.solid.pattern.rectangular": "Repeats the selected objects in one or two directions with the count and spacing you set. Use it for rows and grids of holes, ribs, pins or feet.", - "help.solid.sweep": "Drags a sketch profile along a path to make a solid. Use it for pipes, rails, handles and any part of constant section that follows a curve.", - "hole_presets.confirm_delete": "Confirm delete", - "hole_presets.delete": "Delete", - "hole_presets.delete_prompt": "Delete this personal preset? Existing holes are unchanged.", - "hole_presets.full": "The personal library already contains 64 presets.", - "hole_presets.invalid_name": "Enter a short name without line breaks or control characters.", - "hole_presets.invalid_parameters": "Complete the hole parameters using valid expressions of reasonable length.", - "hole_presets.missing": "The selected preset is no longer available.", - "hole_presets.name": "Preset name", - "hole_presets.name_exists": "A preset with this name already exists. Use a different name.", - "hole_presets.name_hint": "A unique name", - "hole_presets.overwrite": "Save changes to selected preset", - "hole_presets.preset": "Preset", - "hole_presets.recall": "Recall", - "hole_presets.rename": "Rename", - "hole_presets.save": "Save new", - "hole_presets.scope": "Saved in your profile for all projects.", - "hole_presets.select": "Select a preset", - "hole_presets.title": "Personal presets", - "hole_presets.unsupported_options": "This preset uses thread options that this version cannot recall.", - "hole_presets.unsupported_overwrite": "This preset contains options that cannot be overwritten safely.", - "joint.rigid_group_one_component": "These {count} bodies are all in one component (or in the design itself): use {command} first.", - "joint.rigid_group_select_components": "Select two or more components.", - "material.editor.add_property": "Add property", - "material.editor.add_source": "Add source", - "material.editor.assigned_density": "Assigned density", - "material.editor.axes": "Material axes", - "material.editor.axes_numeric": "1 / 2 / 3", - "material.editor.axes_wood": "L / R / T", - "material.editor.copy_name": "Copy of {name}", - "material.editor.density_range": "Assigned density must be above 0 and at most 1000 g/cm³.", - "material.editor.designation": "Designation", - "material.editor.duplicate": "Duplicate", - "material.editor.engineering_card": "Engineering property card", - "material.editor.family": "Material family", - "material.editor.glass": "Glass", - "material.editor.illustrative": "Illustrative", - "material.editor.invalid_property": "Unsupported property type.", - "material.editor.isotropic": "Isotropic", - "material.editor.measurement": "Measurement", - "material.editor.metal": "Metal", - "material.editor.moisture": "Moisture, dry basis", - "material.editor.name_required": "Enter a name with 1–128 characters.", - "material.editor.no_draft": "No material draft is open.", - "material.editor.number_required": "Enter a finite numeric value.", - "material.editor.orthotropic": "Orthotropic", - "material.editor.other": "Other", - "material.editor.polymer": "Polymer", - "material.editor.preserved_appearance": "Preserved appearance", - "material.editor.public_reference": "Public reference", - "material.editor.reference": "Reference", - "material.editor.save_or_discard": "Save or discard the material draft before assigning a material.", - "material.editor.saved": "Material saved. Body assignments are unchanged.", - "material.editor.scope": "Save stores this material without assigning it to bodies. Blank properties and conditions remain unknown. Card density does not change assigned density or mass.", - "material.editor.source_id": "Source ID", - "material.editor.source_kind": "Source type", - "material.editor.source_title": "Source title", - "material.editor.sources": "Sources", - "material.editor.stale": "This material changed while the draft was open. Discard and reopen it before saving.", - "material.editor.state": "Material state", - "material.editor.strain_rate": "Strain rate", - "material.editor.symmetry": "Elastic symmetry", - "material.editor.temperature": "Temperature", - "material.editor.unknown_card": "Engineering properties are unknown. Save may keep only the assigned density and existing appearance.", - "material.editor.user_supplied": "User supplied", - "material.editor.wood": "Wood", - "nav.free_orbit.snap_help": "Mouse and 3D mouse rotate through both poles and preserve roll. Hold Shift during an orbit drag to snap the view direction and roll.", - "nav.perspective.sketch": "Sketch editing uses orthographic view. Finish the sketch to switch perspective.", - "network.allow_once": "Allow once", - "network.always_allow": "Always allow this server", - "network.prompt_detail": "This design links to a file on network location {host}. Opening it connects to that computer and may send your Windows sign-in to it. Only allow servers you trust.", - "network.prompt_title": "Network location", - "perf.click_for_details": "Click for details: frame-time graph, histogram and what the GPU drew", - "perf.draw_calls": "Draw calls", - "perf.line_segments": "Line segments", - "perf.low_1": "1% low", - "perf.renderer": "Renderer", - "perf.scene_build": "Scene build", - "perf.triangles": "Triangles", - "perf.ui_time": "UI time", - "perf.viewport": "Viewport", - "perf.worst": "worst", - "pick the path": "pick the path", - "prefs.anti_aliasing_amd_dx12": "Anti-aliasing uses 1× because the startup check drew nothing with multisampling and passed at 1×. You can choose another setting above; restart to apply it if the check passes.", - "prefs.dialog_buttons": "Dialog buttons", - "prefs.graphics_card": "Graphics card", - "prefs.graphics_card_auto": "Automatic", - "prefs.graphics_card_missing": "The saved graphics card is unavailable; Automatic is used.", - "prefs.graphics_card_restart": "Takes effect after restarting SolidCraft. WGPU_ADAPTER_NAME overrides this choice.", - "prefs.history_sketches": "Sketches", - "prefs.history_sketches_in_order": "In order", - "prefs.history_sketches_note": "With Sketches set to Under their feature, the History at the left lists each sketch one level in, under the first feature built from it, whenever it is wide enough for names. The timeline at the bottom always keeps the creation order.", - "prefs.history_sketches_under_feature": "Under their feature", - "prefs.network_host_remove": "Remove", - "prefs.network_locations": "Allow network locations in designs", - "prefs.network_locations_note": "Off: a design's linked files on another computer (\\\\server\\share) are opened only from the servers listed here, or after you allow one when asked.", - "prefs.network_locations_section": "Network locations", - "prefs.placement": "Placement", - "prefs.prefer_free_sketch_points": "Prefer movable sketch points when points overlap", - "prefs.sketch_exit_view": "When a sketch ends", - "prefs.sketch_exit_view.keep": "Keep the current view", - "prefs.sketch_exit_view.previous": "Return to the previous view", - "prefs.sketch_exit_view.unless_rotated": "Return unless rotated", - "prefs.sketch_exit_view_note": "Where the view goes after Finish Sketch, Cancel or a double Esc.", - "prefs.top": "Top", - "prefs.view_confirm_corner": "OK and Cancel in the view's corner", - "prefs.view_confirm_corner_note": "While a dialog or a sketch is open, a check and a cross at the top right of the view do what the dialog's OK and Cancel do, or finish and cancel the sketch. The view navigator moves down below them.", - "render.adaptive_absolute": "Absolute RGB error floor", - "render.adaptive_coverage": "Coverage error target", - "render.adaptive_enable": "Allocate samples with independent pilots", - "render.adaptive_help": "GPU only. Independent pilot samples are discarded, then allocate 16 or more production samples per pixel up to Samples per pixel. RGB and coverage variance guide allocation; rare paths may be missed and capped pixels may remain noisy. The final report counts actual work. No certified noise or time guarantee.", - "render.adaptive_minimum": "Minimum production samples", - "render.adaptive_pending": "GPU independent-pilot adaptive allocation and conditional Fresnel strata are available. Certified convergence, rare-event guarantees and CPU adaptive transport remain unavailable.", - "render.adaptive_pilots": "Pilot samples per pixel", - "render.adaptive_relative": "Relative RGB error target", - "render.add_ground": "Add fitted ground to setup", - "render.advanced_material_scope": "One finite homogeneous GPU medium is available under explicit limits. Density grids, nested glass/volume combinations, subsurface surfaces, displacement, spectral transport and unbound advanced material concepts remain unavailable.", - "render.aging_add": "Add aging layer", - "render.aging_airborne": "Airborne dust / participating medium", - "render.aging_airborne_help": "Airborne dust is a separate finite homogeneous scattering volume. It changes transport and raw EXR, not the surface-aging stack. Existing volume/glass/denoising restrictions remain explicit; no atmosphere is added automatically.", - "render.aging_all_bodies": "All eligible opaque bodies", - "render.aging_chips": "Chipped paint", - "render.aging_class_any": "All opaque material classes", - "render.aging_class_dielectric": "Nonmetallic surfaces only", - "render.aging_class_metal": "Metallic surfaces only", - "render.aging_color": "Layer colour · sRGB", - "render.aging_coverage": "Coverage", - "render.aging_dust": "Deposited dust", - "render.aging_empty": "No aging layers: the original surfaces remain unchanged.", - "render.aging_fading": "Faded coating", - "render.aging_grime": "Grime & staining", - "render.aging_help": "Combine up to eight optical layers, in order. Rust and patina are authored appearances, not age/corrosion simulations. Scale is in world millimetres. No geometry, mass or engineering property is changed; glass and passive stages are excluded.", - "render.aging_metallic": "Layer metallic fraction", - "render.aging_origin": "Field origin · world mm", - "render.aging_patina": "Copper-green patina", - "render.aging_refresh_targets": "Inspect current bodies", - "render.aging_roughness": "Layer roughness", - "render.aging_rust": "Oxidized iron / rust", - "render.aging_scale": "Pattern scale", - "render.aging_scratches": "Fine scratches", - "render.aging_target": "Target & coordinates", - "render.aging_target_help": "A named target must still match its captured index and name. Global masks are world-anchored; they do not follow moving parts. This is neither cavity detection nor true edge wear. Filter the list to reach additional bodies.", - "render.aging_target_search": "Filter body names", - "render.aging_upward": "Upward-facing deposition", - "render.all_controls_help": "Dense inspection of all current controls. Section pages provide focused editing without changing the underlying request.", - "render.appearance_physics_separate": "Visual appearance does not assign density, thermal data or other engineering properties.", - "render.availability_native": "Native composition; review before applying", - "render.availability_projection": "Supported projection; see scope and omissions", - "render.availability_reference": "Reference data; not an automatic assignment", - "render.backdrop_alpha_conflict": "Choose this backdrop or transparent PNG output; the renderer will not silently ignore either setting.", - "render.backdrop_enable": "Use camera-only gradient backdrop", - "render.backdrop_first": "Start / center color", - "render.backdrop_help": "This screen-space backdrop does not illuminate, cast shadows, reflect or represent terrain. It is excluded from raw EXR. Geometry, lights and the HDR environment stay independent.", - "render.backdrop_horizontal": "Horizontal gradient", - "render.backdrop_radial": "Radial gradient", - "render.backdrop_radius": "Radius", - "render.backdrop_second": "End / edge color", - "render.backdrop_vertical": "Vertical gradient", - "render.backdrop_x": "Center X", - "render.backdrop_y": "Center Y", - "render.background_camera_section": "Camera background · PNG presentation", - "render.background_completed_frozen": "The displayed result is a frozen completed image. Editing a background does not repaint that result automatically. Use Regrade for camera-only changes, or Render for a new physical stage.", - "render.background_hdr_separate": "The current HDR resources illuminate and reflect on surfaces; they are not automatically displayed as a panorama behind the subject. Changing a gradient does not rotate or recolour the lighting.", - "render.background_lighting_section": "HDR illumination · separate from camera background", - "render.background_no_alpha_override": "A camera background is not added to transparent output silently. Raw-master regrading uses captured coverage and does not reapply denoising; the source EXR remains unchanged.", - "render.background_not_light": "Background color is presentation, not an additional lighting source.", - "render.background_regrade": "Apply to retained raw master", - "render.background_stage_occlusion": "This shot includes physical stage geometry. A large floor or wall can fill the frame and hide a camera-only background. Clear or resize the stage deliberately, or change its physical reflectance. Regrading cannot remove captured geometry.", - "render.background_workflow": "Choose the background you intend: a camera-only colour/gradient, a physical stage that receives light, or HDR illumination. They are independent. Live Preview is a modelling view; render a new image or regrade a retained master to see camera finishing.", - "render.base_appearance": "Editable body appearance", - "render.base_apply": "Apply body appearance", - "render.base_apply_help": "One undoable visual assignment to the reviewed exact body. Existing face-specific looks and engineering materials remain separate.", - "render.base_color": "Base color · sRGB", - "render.base_metallic": "Metallic fraction", - "render.base_opaque_only": "This editor preserves opaque body semantics. Use the explicit glass controls for optical transmission.", - "render.bloom_enable": "Display bloom", - "render.bloom_help": "Creative output-only glow from positive linear highlights, spread with three normalized box passes. Radius is in output pixels. Added in linear display light before sRGB; not a lens, volumetric effect or convergence improvement. The raw EXR is unchanged.", - "render.bloom_opaque": "Bloom requires opaque output. Transparent PNG is refused, not silently flattened.", - "render.bloom_radius": "Bloom radius", - "render.bloom_strength": "Bloom strength", - "render.bloom_threshold": "Linear highlight threshold", - "render.browse_capabilities": "Inspect complete capability catalog", - "render.browse_environments": "Browse original HDR environments", - "render.browse_native_scenes": "Browse native studios", - "render.browse_physical": "Inspect physical references", - "render.browse_quality": "Inspect quality specifications", - "render.browse_rigs": "Browse authored light rigs", - "render.browse_scene_specs": "Browse advanced scene specifications", - "render.browse_surfaces": "Browse authored surfaces", - "render.browser_library": "Library", - "render.browser_model": "Model", - "render.camera_distance": "Eye-to-target distance", - "render.camera_exact_help": "World millimeters; angles are displayed in degrees and saved as radians. Navigation uses the same camera as the viewport.", - "render.camera_fov": "Vertical field of view", - "render.camera_pitch": "Camera pitch", - "render.camera_roll": "Roll", - "render.camera_set": "Set Render Camera", - "render.camera_target": "Target position · mm", - "render.camera_yaw": "Yaw", - "render.chromatic_offset": "Chromatic edge offset", - "render.clear_stage": "Remove saved stage", - "render.copy_request": "Copy JSON", - "render.cpu_aa_help": "Spatial samples: more samples improve edges and increase render time.", - "render.cpu_area_add": "Add rectangular CPU light", - "render.cpu_area_editor": "CPU rectangular lights", - "render.cpu_area_editor_help": "Full side vectors in millimeters; U cross V points towards the emitting side. This differs from GPU half-edge vectors.", - "render.cpu_area_full_u": "Full U side · mm", - "render.cpu_area_full_v": "Full V side · mm", - "render.cpu_area_samples": "Area-light samples", - "render.cpu_binding_confirm": "Confirm this body", - "render.cpu_binding_stale": "The scene changed. Confirm this reflection target again before rendering.", - "render.cpu_body_choose": "Choose a body", - "render.cpu_body_filter": "Filter bodies by name", - "render.cpu_body_filter_more": "Refine the filter to see more bodies.", - "render.cpu_body_missing": "A reflection target is missing, hidden, ambiguous or has a name longer than 128 bytes. Choose it again.", - "render.cpu_budget": "CPU resource profile", - "render.cpu_budget_bodies": "Body ceiling", - "render.cpu_budget_compact": "Compact (legacy limits)", - "render.cpu_budget_details": "Resource limits", - "render.cpu_budget_help": "Choose larger limits explicitly. Resolution and samples are never reduced automatically.", - "render.cpu_budget_memory": "Job memory ceiling", - "render.cpu_budget_not_guarantee": "These are admission ceilings, not a RAM reservation or a speed guarantee. Geometry, film and retained previews share the memory budget; rendering remains cancellable.", - "render.cpu_budget_resize": "The draft exceeds this CPU profile or its camera-sample budget. Accept smaller dimensions explicitly or select a larger profile.", - "render.cpu_budget_studio": "Studio (large images)", - "render.cpu_budget_triangles": "Triangle ceiling", - "render.cpu_budget_workstation": "Workstation (heavy scenes)", - "render.cpu_captured_hdr": "HDR captured for this image", - "render.cpu_check_capture_help": "Check and Start verify the same file digest or use the embedded HDR. Each image keeps its captured source.", - "render.cpu_check_changed": "The controls or model changed after this check. Check again before rendering.", - "render.cpu_constant_help": "Constant radiance is visible to reflected or transmitted rays. It does not provide direct diffuse lighting.", - "render.cpu_custom_directions": "Replace preset with custom directional lights", - "render.cpu_direction": "Direction toward light (X, Y, Z)", - "render.cpu_directional": "Directional light", - "render.cpu_directional_add": "Add directional light", - "render.cpu_environment": "CPU environment", - "render.cpu_environment_background": "The image background stays separate from environment lighting.", - "render.cpu_environment_bounds": "CPU intensity must be 0–64, HDR rotation finite within ±1,000,000 radians, and HDR samples 1, 4, 16 or 64.", - "render.cpu_environment_constant": "Constant secondary-ray environment", - "render.cpu_environment_none": "No CPU environment", - "render.cpu_environment_samples": "HDR lighting samples", - "render.cpu_exposure_help": "CPU exposure must be between −16 and 16 EV. A GPU exposure outside that range is retained until you change it.", - "render.cpu_fixed": "Single image", - "render.cpu_hdr_help": "Radiance .hdr, 2:1 panorama, up to 2048 × 1024 and 16 MiB. CPU requires explicit sRGB/D65 primaries in the file; unspecified primaries and EXR are refused.", - "render.cpu_hdr_reflection_help": "HDR rough reflections require fully metallic body and face surfaces. Check reports unsupported combinations.", - "render.cpu_key_rim": "Key and rim", - "render.cpu_last_check": "Last CPU check", - "render.cpu_light_help": "Up to eight directional lights. An empty custom list turns them off; selecting a preset restores its lights. Colors are linear RGB and intensity is relative, not watts.", - "render.cpu_light_intensity": "Relative intensity (0–64)", - "render.cpu_light_minimum": "Minimum distance for attenuation", - "render.cpu_light_position": "World position (X, Y, Z)", - "render.cpu_light_reference": "Reference distance for intensity", - "render.cpu_light_remove": "Remove light", - "render.cpu_lighting": "Lighting preset", - "render.cpu_lights": "CPU lights", - "render.cpu_linear_color": "Linear color (R, G, B)", - "render.cpu_neutral": "Neutral", - "render.cpu_opaque_required": "CPU ray tracing needs an opaque background. Clear Transparent background to continue.", - "render.cpu_options_pending": "This CPU panel cannot edit emission, surface effects, glass or anisotropy yet. Clear those API options before using it.", - "render.cpu_point": "Point light", - "render.cpu_point_add": "Add point light", - "render.cpu_point_help": "Up to eight point lights, added to the selected directional lighting. Distances are in mm; the minimum must not exceed the reference distance.", - "render.cpu_primary_samples": "Edge samples per pixel", - "render.cpu_progressive": "CPU progressive", - "render.cpu_progressive_help": "Accumulate the existing CPU integrator in passes of one primary sample. Selected reflections require one sample; area lights, dielectrics and anisotropy require Single image.", - "render.cpu_progressive_limits": "At most 1,048,576 pixels and 16,777,216 pixel × sample evaluations. Changing samples never resizes the image automatically.", - "render.cpu_progressive_seed": "CPU sampling seed", - "render.cpu_progressive_spp": "samples per pixel", - "render.cpu_reflection_add": "Add rough reflection", - "render.cpu_reflection_depth": "Reflection depth (1–8)", - "render.cpu_reflection_empty": "No bodies selected: scene reflections are off.", - "render.cpu_reflection_help": "Choose bodies and set Off, Mirror or Rough. Rough uses the assigned surface roughness. More samples and bounces increase time; this is bounded specular transport, not global illumination.", - "render.cpu_reflection_limit": "Up to 64 reflected bodies are supported.", - "render.cpu_reflection_mirror": "Mirror", - "render.cpu_reflection_off": "Off", - "render.cpu_reflection_rough": "Rough", - "render.cpu_reflection_samples": "Reflection samples (1–64)", - "render.cpu_reflections": "CPU reflections", - "render.cpu_runtime_help": "Numeric light and environment settings are saved with the setup. Body reflections and HDR files remain temporary. Existing area-light and spot-cone values are retained.", - "render.cpu_sampling_mode": "CPU sampling mode", - "render.cpu_shadows": "Cast shadows", - "render.cpu_summary": "CPU ray tracing · reflections · HDR · directional and point lights", - "render.cpu_warm_cool": "Warm and cool", - "render.diag_bodies": "Visible bodies", - "render.diag_job_details": "Captured job details", - "render.diag_last_check": "Last preflight", - "render.diag_memory": "Logical admission estimate", - "render.diag_not_implemented": "Explicit capability boundaries", - "render.diag_preflight_details": "Preflight details", - "render.diag_request": "Exact current request", - "render.diag_triangles": "Triangles", - "render.discard_continue": "Discard draft and continue", - "render.draft_confirm_help": "The current render draft has unapplied edits. Save them before switching, discard them explicitly, or keep editing.", - "render.draft_confirm_title": "Preserve edited render settings", - "render.effects_gpu_only": "These effects require GPU path tracing. Changing the page never switches the renderer automatically.", - "render.effects_help": "Combine ordered colour looks and image-space lens effects. Rendering and raw-master regrading use the same saved settings. Raw EXR stays unchanged. These are original artistic controls, not calibrated lens or branded-film emulations.", - "render.effects_reset_lens": "Reset lens effects", - "render.effects_seed": "Pattern seed", - "render.export_display": "Export: display PNG", - "render.export_linear": "Export: raw linear EXR", - "render.exr_pending": "GPU can retain raw linear EXR. Compression, multilayer images and auxiliary render passes remain unavailable.", - "render.film_grain": "Photographic grain", - "render.flare_ghosts": "Ghost rings per source", - "render.flare_halo": "Flare halo", - "render.flare_streak": "Anamorphic-style streak", - "render.flare_strength": "Highlight flare strength", - "render.flare_threshold": "Scene-linear flare threshold", - "render.gpu_depth": "Maximum path depth", - "render.gpu_options_help": "Samples, depth, seed and exposure are saved with this setup. Only the active image method is saved.", - "render.gpu_path_failed": "GPU path tracer unavailable", - "render.gpu_path_first_setup": "The first setup on this GPU can take several minutes; SolidCraft stays usable meanwhile. Later starts reuse the compiled shaders where the driver keeps them.", - "render.gpu_path_preparing": "GPU path tracer: compiling shaders…", - "render.gpu_seed": "Random seed", - "render.gpu_unavailable": "GPU path tracing is not ready on this device.", - "render.ground_apply": "Fit and save ground", - "render.ground_gap": "Explicit clearance gap", - "render.ground_linear_rgb": "Diffuse reflectance · linear RGB", - "render.ground_margin": "Ground extent margin", - "render.hdr_details": "HDR source details", - "render.hdr_embedded": "HDR saved inside this design", - "render.hdr_embedded_help": "Rendering uses the bytes included in the design; the original file is no longer needed.", - "render.hdr_file_captured": "HDR file checked. Save will embed these bytes; if the file changes, check it again explicitly.", - "render.hdr_inspect": "Check HDR file", - "render.hdr_inspect_required": "Select and check an HDR file before saving or rendering.", - "render.hdr_primaries_declared": "The source declares its color primaries.", - "render.hdr_primaries_srgb": "Color primaries: sRGB/D65", - "render.hdr_primaries_undeclared": "The source does not declare primaries; review the renderer color requirements.", - "render.hdr_resource_missing": "This design is missing the saved HDR resource.", - "render.image_advanced": "Advanced GPU controls", - "render.image_exposure": "Exposure", - "render.image_host_missing": "No image host is installed.", - "render.image_method": "Image method", - "render.image_progressive": "Progressive rendering", - "render.image_samples": "Samples per pixel", - "render.image_scene_stale": "Finish the modelling gesture or refresh the scene before checking or starting an image.", - "render.include_rig_cards": "Include passive cards and flags", - "render.inspect_scene": "Refresh captured scene summary", - "render.keep_editing": "Keep editing", - "render.layer_down": "Move down", - "render.layer_enabled": "Layer enabled", - "render.layer_remove": "Remove layer", - "render.layer_strength": "Layer strength", - "render.layer_up": "Move up", - "render.lens_effects_help": "Flare uses up to four separated bright sources in the actual linear image. Ghosts, halo, streaks, chromatic offsets and radial distortion are artistic image-space approximations. Spatial effects need opaque output; outside samples extend the image edge. Grain is deterministic. No physics, EXR or geometry is altered.", - "render.lens_effects_title": "Lens-inspired & photographic", - "render.library_all": "Catalog", - "render.library_all_states": "All availability states", - "render.library_applied": "Resource projection applied. Check the complete render request before starting.", - "render.library_apply_hdr": "Save with this HDR environment", - "render.library_apply_maps": "Use authored GPU surface maps", - "render.library_apply_studio": "Save authored studio projection", - "render.library_apply_uniform": "Apply uniform opaque appearance", - "render.library_authored_help": "Original authored resources are illustrative, not measured engineering data. Each action applies only its stated projection.", - "render.library_blocked": "Blocked / requires calibration", - "render.library_capabilities": "Capability specifications", - "render.library_center": "Rig center", - "render.library_clear_search": "Clear", - "render.library_details": "Specification and provenance", - "render.library_emitters_only_ack": "Use emitters only; omit the documented passive cards", - "render.library_empty": "No matching resources. Try a different query or availability filter.", - "render.library_environment_concepts": "Environment concepts", - "render.library_extent": "Subject extent", - "render.library_favorite": "Add favorite", - "render.library_favorites": "Favorites", - "render.library_hdr": "Built-in HDR environments", - "render.library_hdr_help": "Embeds the original HDR in the saved setup. The authored longitude origin is converted explicitly; no external file is needed after saving.", - "render.library_inspect_only": "Select to inspect; nothing is applied automatically. Favorites and recent history belong to this open document session.", - "render.library_light_concepts": "Lighting concepts", - "render.library_maps_help": "Built-in maps can be saved with pinned sources and local occurrence mapping. Temporary optical overrides remain a separate mode.", - "render.library_material_concepts": "Material concepts", - "render.library_native_scenes": "Native studios", - "render.library_next": "Next page", - "render.library_omitted": "Not included", - "render.library_physical_profiles": "Physical reference profiles", - "render.library_previous": "Previous page", - "render.library_quality_concepts": "Quality specifications", - "render.library_recent": "Recent", - "render.library_replace_environment": "Replace the existing environment explicitly", - "render.library_replace_studio": "Replace saved lighting, environment and stage", - "render.library_results": "Matching resources", - "render.library_rig_help": "Fit once at an explicit center and physical extent. Complete rigs include passive cards; calibration blockers still refuse. Conservative emitter/card clearance is checked before saving.", - "render.library_rigs": "Authored lighting rigs", - "render.library_save_maps": "Save maps to this setup", - "render.library_scene_bounds": "Use captured scene bounds", - "render.library_scenes": "Scene specifications", - "render.library_search": "Search library", - "render.library_select_hint": "Choose a resource in the Library to inspect its supported actions and limitations.", - "render.library_selene": "SELENE opaque appearances", - "render.library_selene_shots": "SELENE shot specifications", - "render.library_short_blocked": "Unavailable", - "render.library_short_native": "Native composition", - "render.library_short_projection": "Supported projection", - "render.library_short_reference": "Reference only", - "render.library_short_specification": "Specification only", - "render.library_source_preview": "Load source-map preview", - "render.library_source_preview_help": "Authored base-color source map. This is not a rendered or measured material preview.", - "render.library_specification_only": "Specification only: not a complete executable preset. Required effects, resources and subject roles still need explicit implementation and binding.", - "render.library_specs": "Specifications only", - "render.library_status": "Availability", - "render.library_surfaces": "Authored PBR surfaces", - "render.library_target": "Target body", - "render.library_title": "Render resource library", - "render.library_unfavorite": "Remove favorite", - "render.library_uniform_ack": "Use the uniform approximation without spatial or advanced effects", - "render.library_usable": "Executable projections", - "render.linear_help": "Keeps a 32-bit float RGBA master before denoising, exposure, tone mapping, filters and backdrop. Linear sRGB/D65; coverage-premultiplied. Additional memory is admitted explicitly. No compression or extra passes.", - "render.linear_retain": "Retain raw linear EXR", - "render.linear_unavailable": "The selected completed frame has no retained EXR. Enable retention before rendering; an older PNG cannot recover raw radiance.", - "render.look_add": "Add colour look", - "render.look_bleach": "Bleach-bypass-inspired", - "render.look_cool": "Cool", - "render.look_cyanotype": "Cyanotype-inspired", - "render.look_faded": "Faded print", - "render.look_mono": "Monochrome", - "render.look_sepia": "Sepia", - "render.look_strength": "Look strength", - "render.look_teal_orange": "Teal / orange", - "render.look_title": "Creative look stack", - "render.look_warm": "Warm", - "render.mapping_scale": "Physical repeat multiplier", - "render.material_absorption": "Absorption R · G · B (per mm)", - "render.material_add": "Add or edit this body", - "render.material_assignments": "Body assignments", - "render.material_binding_enable": "Include this body override", - "render.material_box": "Axis-aligned box", - "render.material_browse": "Choose image…", - "render.material_certification": "Closed glass uses geometric distance. Topology, orientation, overlap and optical boundaries are checked during GPU preparation; Check only admits the request.", - "render.material_choose_body": "Choose a scene body", - "render.material_closed": "Closed solid mesh", - "render.material_coat": "Clear coat over the base material", - "render.material_coat_enable": "Enable clear coat", - "render.material_coat_help": "Illustrative dielectric coating over the existing opaque appearance. Zero weight leaves the base unchanged.", - "render.material_color_map": "Base color image (sRGB)", - "render.material_color_replace": "Base map replaces body color", - "render.material_custom": "Custom illustrative optics", - "render.material_enable": "Use these GPU material overrides", - "render.material_filter": "Filter scene bodies…", - "render.material_filter_help": "Up to 128 matching bodies are shown. Refine the filter for large scenes.", - "render.material_glass": "Glass and optical absorption", - "render.material_glass_enable": "Use physical glass on this body", - "render.material_glass_exclusive": "Glass cannot share a body with clear coat or runtime maps in this renderer.", - "render.material_glass_help": "Original illustrative recipes. Swatches show transmittance, not a rendered preview. Absorption is −ln(linear transmittance) / reference distance; alpha is unchanged.", - "render.material_gpu_required": "These active material overrides require GPU path tracing. Select GPU or disable the overrides before Check or Start.", - "render.material_ior": "Index of refraction (IOR)", - "render.material_limits": "At most 128 body overrides, 32 disjoint glass bodies, 64 coats and 128 texture bindings. Identical maps share storage; actual device and total memory limits still apply.", - "render.material_map_invalid": "Map paths must be bounded local paths; normal strength must be finite and between 0 and 1.", - "render.material_map_required": "Choose a color image or a normal image before using maps.", - "render.material_maps": "Planar color and normal maps", - "render.material_maps_enable": "Enable maps for this opaque body", - "render.material_maps_help": "PNG/JPEG up to 1024×1024; 16 MiB encoded total. U and V are orthogonal world-mm repeat vectors (maximum 128 repeats). Color is sRGB; normal data uses OpenGL +Y. Files are captured at Check/Start.", - "render.material_metallic_map": "Metallic map (linear)", - "render.material_normal_map": "Normal image (OpenGL, +Y)", - "render.material_normal_strength": "Normal strength (0–1)", - "render.material_origin": "Mapping origin X · Y · Z (mm)", - "render.material_refresh": "Refresh scene bodies", - "render.material_refresh_needed": "Scene changed. Refresh the body list before adding a target.", - "render.material_remove": "Remove this assignment", - "render.material_repeat_u": "One U repeat X · Y · Z (mm)", - "render.material_repeat_v": "One V repeat X · Y · Z (mm)", - "render.material_revalidate": "Revalidate this body", - "render.material_revalidate_needed": "This assignment belongs to an earlier scene revision. Revalidate its exact body identity before rendering.", - "render.material_roughness": "Coat roughness (0.045–1)", - "render.material_roughness_map": "Roughness map (linear)", - "render.material_shadow": "Transmit straight shadow rays", - "render.material_target_missing": "The body ordinal and name no longer match. Remove this assignment and explicitly choose the intended body again.", - "render.material_thickness": "Thin-sheet thickness (mm)", - "render.material_thin": "Thin sheet", - "render.material_title": "GPU image materials", - "render.material_transient": "Temporary optical overrides for this document tab. They are not saved in the design, render setup or material library.", - "render.material_v_up": "Texture V points upward in the image", - "render.material_weight": "Coat weight (0–1)", - "render.method_cpu": "CPU ray tracing", - "render.method_gpu": "GPU path tracing", - "render.method_limit_raster": "Raster uses the fixed opaque studio preview. Select an explicit raytracing method for supported optical controls.", - "render.method_raster": "CPU raster", - "render.nested_enable": "Certified nested dielectrics", - "render.nested_help": "Up to 16 containing layers; every parent must be convex and every child strictly inside it. Intersections, touching surfaces, thin sheets and straight-shadow transmission refuse. Camera-inside state follows the certified hierarchy. Does not create a liquid surface or merge touching CAD boundaries.", - "render.optics_remove": "Remove saved optics", - "render.optics_replace": "Replace this target’s saved optics explicitly", - "render.optics_save": "Save these optics to the setup", - "render.optics_saved": "Saved optical targets", - "render.optics_saved_help": "Exact definition, feature and occurrence identity survives offline reopen. Missing/replaced/hidden targets refuse; engineering materials are unchanged. Save or discard numeric edits before removing a saved target.", - "render.output_format_status": "PNG is the exact completed display image. Optional GPU EXR retains raw scene-linear FLOAT32 radiance before display filters. Export never substitutes the preview cache or a different job.", - "render.output_lock_ratio": "Lock aspect ratio", - "render.output_over_budget": "The requested image exceeds the selected resource envelope. Choose a compatible size or profile explicitly; no automatic downgrade occurs.", - "render.output_ratio_refused": "The linked dimension exceeds this method’s size limit. The previous size is retained; unlock the ratio or choose a smaller value.", - "render.output_swap_orientation": "Swap width and height", - "render.page_aging": "Aging & contamination", - "render.page_all": "All controls", - "render.page_appearance": "Appearance", - "render.page_background": "Backgrounds", - "render.page_camera": "Camera", - "render.page_diagnostics": "Diagnostics", - "render.page_effects": "Lens & finishing effects", - "render.page_environment": "Environment", - "render.page_lighting": "Lighting", - "render.page_output": "Output", - "render.page_scene": "Scene", - "render.passive_stage": "Ground and passive stage", - "render.passive_stage_help": "Finite passive panels belong only to rendered images. They do not add CAD bodies or mass. Placement is fixed after applying; intersecting product bounds refuse. CPU does not provide diffuse bounce lighting.", - "render.physical_acknowledge": "I understand this partial reference needs grade, condition and source review", - "render.physical_associations": "Physical candidates and roles", - "render.physical_background_help": "Real passive floor and wall, separate from the camera backdrop. Cyclorama uses 24 polygonal strips; it is not an infinite or analytically smooth surface. Replaces the saved stage only with your consent.", - "render.physical_copy_plan": "Copy plan with sources and omissions", - "render.physical_cyclorama": "Fit polygonal cyclorama", - "render.physical_floor_wall": "Fit physical floor and wall", - "render.physical_material_name": "Proposed reference material name", - "render.physical_omissions": "Properties not representable in the native card", - "render.physical_plan_only": "Read-only plan prepared. No material was created or assigned. Keep its extended profile and omissions when reviewing the native card.", - "render.physical_prepare_plan": "Prepare creation plan (does not apply)", - "render.physical_separate": "Appearance is not material identification. These are sourced references, not certified effective properties. Existing mass, engineering materials and optics are unchanged.", - "render.physical_unknown": "No numerical candidate is established. Grade, formulation or construction must be specified; unknown is not zero.", - "render.post_contrast": "Contrast", - "render.post_gain_b": "Blue gain", - "render.post_gain_g": "Green gain", - "render.post_gain_r": "Red gain", - "render.post_help": "Creative presentation only. RGB gains precede tone mapping; contrast, saturation and vignette follow in display-linear light. Start Render creates new transport samples. Regrade uses the selected retained raw master without denoising or new rays.", - "render.post_reset": "Reset presentation filters", - "render.post_saturation": "Saturation", - "render.post_title": "Presentation filters", - "render.post_vignette": "Vignette", - "render.preview_image_settings_help": "Live Preview keeps fixed studio lighting. Exposure and image lighting apply to the image job when you Check or Start.", - "render.preview_retry": "Retry live preview", - "render.preview_unavailable_help": "The live preview is unavailable. Saved setups and image-job controls remain accessible. Change the scene or explicitly retry; a refused scene is not rebuilt on every frame.", - "render.preview_upload": "Live-preview vertex payload", - "render.preview_upload_help": "Exact preview vertex bytes, not total GPU or process memory. Geometry is not simplified. Image jobs use their own admission and lighting.", - "render.progressive_image_summary": "Preview PNG · PBR and glass · progressive samples", - "render.quality_ack": "Acknowledge the fixed-budget projection and omissions", - "render.quality_apply": "Use this fixed sampling budget", - "render.quality_projection_help": "Q presets include future requirements. This action projects only a supported fixed-sample PNG budget and explicitly omits adaptive stopping, raw linear output and independent transmission limits.", - "render.quality_review": "Review sampling budget", - "render.queue_pending": "There is no automatic production queue or animation renderer in this UI. Completed still images remain separately exportable.", - "render.radial_distortion": "Radial distortion", - "render.regrade_action": "Regrade raw master (no denoising)", - "render.regrade_help": "Creates a separate PNG from the selected completed raw master, using these presentation controls. Does not trace rays, change the captured size/camera/lights, or overwrite the EXR. Denoising is not reapplied: raw masters do not retain its guides. The derivative remains exportable through the same job controls.", - "render.replace_ground": "Confirm replacement of existing stage", - "render.replace_saved_surface": "Replace an existing saved binding for this target", - "render.result_actual_help": "One image pixel per display pixel.", - "render.result_capture": "Captured revision", - "render.result_current": "The captured model revision is current.", - "render.result_empty": "No completed image yet. Check the settings, then start a render.", - "render.result_fit": "Fit Image", - "render.result_job": "Job", - "render.result_navigation": "Pan and zoom use Navigation preferences. Space + drag pans.", - "render.result_open": "Open the completed image in the main canvas.", - "render.result_preview": "Live Preview", - "render.result_provisional": "Provisional CPU image", - "render.result_provisional_help": "This checkpoint is not exportable. Export keeps the last completed result; cancellation returns to that result.", - "render.result_reduced_display": "Display preview reduced to the viewport device/cache limit. The retained PNG and export keep full resolution; native 100% inspection is unavailable for this reduced view.", - "render.result_retained": "Showing the last completed image; a newer render has not replaced it.", - "render.result_sequence": "Checkpoint", - "render.result_title": "Render Result", - "render.review_stale": "This review is stale. Resolve or check again before applying.", - "render.ribbon_aging": "Aging", - "render.ribbon_backgrounds": "Backgrounds", - "render.ribbon_check": "Check", - "render.ribbon_check_help": "Validate the exact current draft that Render will submit. No renderer fallback, silent resize or resource replacement.", - "render.ribbon_edit_lights": "Edit Lights", - "render.ribbon_effects": "Effects", - "render.ribbon_environment_help": "HDR illumination, camera-only backgrounds and physical stage surfaces are separate controls with explicit replacement consent.", - "render.ribbon_finish_dialog": "Finish the current file or confirmation dialog first.", - "render.ribbon_frame": "Frame", - "render.ribbon_hdr_library": "HDR Library", - "render.ribbon_job_active": "A render is already running; cancel it explicitly before starting another.", - "render.ribbon_light_rigs": "Light Rigs", - "render.ribbon_lights_help": "Inspect authored rigs or edit supported lights without replacing the current setup until you explicitly apply the change.", - "render.ribbon_materials": "Materials", - "render.ribbon_materials_help": "Open the shared appearance inspector and original surface library. Optical edits never silently change engineering properties.", - "render.ribbon_no_active_job": "There is no active render to cancel.", - "render.ribbon_no_result": "Complete a render before exporting its exact image.", - "render.ribbon_no_saved_camera": "Save a shot before restoring its camera.", - "render.ribbon_saved_camera": "Saved Camera", - "render.ribbon_shots": "Shots", - "render.ribbon_studios": "Studios", - "render.ribbon_studios_help": "Browse implemented studio compositions and review their replacements before applying. Concept-only scenes remain labelled.", - "render.ribbon_surface_maps": "Surface Maps", - "render.sampling_title": "Adaptive and transmission sampling", - "render.save_continue": "Save and continue", - "render.saved_maps_runtime_conflict": "Saved surface bindings cannot be mixed with temporary optical overrides or an unsaved HDR. Save the HDR or remove the temporary inputs explicitly.", - "render.saved_surface_remove": "Remove saved binding", - "render.saved_surfaces": "Saved surface bindings", - "render.saved_surfaces_help": "Pinned built-in maps follow the selected occurrence in local millimeters. A replaced or missing target is an error, never an automatic reassignment.", - "render.scene_apply": "Apply reviewed studio", - "render.scene_consent": "Confirm lighting, environment, exposure and stage replacement", - "render.scene_preserved_fields": "Camera, sampling, dimensions, optical bindings, CAD geometry and engineering materials are preserved.", - "render.scene_preserves_design": "Compose lighting and a passive stage for the visible subject. Geometry, engineering materials and the camera remain separate.", - "render.scene_replaces": "Replaces", - "render.scene_review": "Resolve and review", - "render.scene_review_help": "Review the complete native composition before applying. Unbound advanced SCENE specifications are not substituted.", - "render.scene_scope_details": "Composition scope", - "render.setup_legacy_environment": "This older setup uses legacy environment rotation or intensity. Those values are retained; convert them explicitly before saving a full image job.", - "render.setup_numeric_help": "Save records the active image method and all its numeric settings. Reload or choosing another setup replaces this draft; restore the camera separately.", - "render.setup_offline_help": "You can edit and save this method without its renderer. Check and Start require an available host.", - "render.setup_runtime_unsupported": "This full job cannot be saved yet: it contains maps or scene-body bindings. Remove those temporary inputs before saving a portable setup.", - "render.setup_save_missing": "The saved render configuration could not be found after the command completed.", - "render.sharpening": "Detail sharpening", - "render.shot_duplicate": "Duplicate saved shot", - "render.shot_manager": "Saved shots", - "render.shot_new_name": "New shot name", - "render.shot_remove": "Remove saved shot", - "render.shot_remove_help": "Remove only this saved setup. Source geometry and completed images are preserved; the action can be undone.", - "render.shot_remove_title": "Remove saved shot?", - "render.shot_rename": "Rename saved shot", - "render.shot_saved_only": "Save the current draft first. Duplicate and rename preserve exact saved options and resource references.", - "render.sky_ground": "Ground · linear RGB", - "render.sky_horizon": "Horizon · linear RGB", - "render.sky_zenith": "Zenith · linear RGB", - "render.soft_focus": "Soft focus", - "render.stage_panel_count": "Saved panels", - "render.studio_add_area": "Add area light", - "render.studio_ambient": "Constant environment radiance", - "render.studio_ambient_rgb": "Constant environment radiance (linear RGB)", - "render.studio_aperture": "Aperture radius", - "render.studio_area": "Area light", - "render.studio_area_help": "Up to four one-sided rectangles. Orthogonal half-edges U and V define size; U × V faces the lit side. Coordinates are world-space millimetres.", - "render.studio_center": "Center X, Y, Z (mm)", - "render.studio_denoise": "Reduce noise in the finished image", - "render.studio_denoise_help": "Final edge-aware filter; fine detail can soften. Glass and sharp specular surfaces bypass the filter.", - "render.studio_direction": "Direction toward sun (X, Y, Z)", - "render.studio_environment": "Environment", - "render.studio_environment_bounds": "Environment rotation must be finite within ±1,000,000 radians and intensity between 0 and 100.", - "render.studio_environment_none": "No environment map", - "render.studio_focus": "Axial focus distance", - "render.studio_half_u": "Half-edge U (mm)", - "render.studio_half_v": "Half-edge V (mm)", - "render.studio_hdr": "Radiance HDR file", - "render.studio_hdr_browse": "Choose HDR…", - "render.studio_hdr_help": "Radiance .hdr, 2:1 panorama, up to 2048 × 1024. EXR is unavailable. The color assumption applies only when primaries are unspecified.", - "render.studio_hdr_required": "Choose a local .hdr file.", - "render.studio_hdr_srgb": "Interpret unspecified primaries as linear sRGB", - "render.studio_intensity": "Environment intensity", - "render.studio_lens": "Depth of field", - "render.studio_lens_perspective": "Depth of field requires a perspective camera.", - "render.studio_lighting": "Studio lighting", - "render.studio_lighting_enable": "Use custom studio lighting", - "render.studio_needs_review": "Review method and settings", - "render.studio_radiance": "Linear RGB radiance", - "render.studio_ready": "Ready to check", - "render.studio_remove_area": "Remove area light", - "render.studio_rotation": "Environment rotation", - "render.studio_runtime_help": "Numeric studio settings and checked HDR sources can be saved with the setup. Body optical/material overrides remain temporary and do not change saved appearances.", - "render.studio_saved": "Saved setup / current camera", - "render.studio_sky": "Artistic sky", - "render.studio_sky_help": "Original sky gradient for lighting; not a calibrated atmospheric model.", - "render.studio_sun": "Sun", - "render.studio_sun_radius": "Angular radius", - "render.studio_title": "Render studio", - "render.studio_tone_map": "Tone mapping", - "render.subsurface_enable": "Interior scattering random walk", - "render.subsurface_help": "Closed dielectric only. Scattering and RGB absorption are separate per-mm coefficients. Paths scatter inside actual geometry, then refract or reflect at the boundary. Disable straight shadow transmission, surface denoising and exterior volume; use one Fresnel stratum. Not a diffusion shader, density grid or measured material. Dense media may need more samples and path depth.", - "render.subsurface_rate": "Scattering collision rate", - "render.transmission_scope": "GPU glass supports certified disjoint media. Unrestricted nested media and a noise-free transmission estimator are not provided.", - "render.transmission_strata": "Conditional Fresnel strata", - "render.transmission_strata_help": "1 preserves the original stream. 2 or 4 subpaths stratify the first glass reflection/transmission choice with unchanged Snell and absorption laws. More paths cost more work; this is not denoising, nested-media support or a promise of faster rendering.", - "render.volume_albedo": "Scattering albedo · linear RGB", - "render.volume_anisotropy": "Phase mean cosine", - "render.volume_enable": "Enable participating medium", - "render.volume_extinction": "Extinction coefficient", - "render.volume_help": "GPU transport inside one finite box, with Beer attenuation and HG scattering on camera and indirect paths. Uses explicit studio/HDR/sky lighting, including shadow attenuation. Positive phase cosine scatters forward. Glass boundaries and surface denoising must be disabled explicitly. Zero extinction leaves transport unchanged. Not a physical lunar atmosphere, density grid, volume emission, spectral transport or certified material property.", - "render.volume_max": "Maximum bounds · world mm", - "render.volume_min": "Minimum bounds · world mm", - "render.volume_title": "Bounded homogeneous volume", - "section.off_hint": "No plane picked: OK turns the section off.", - "set by the sketch's lines": "set by the sketch's lines", - "settings.frame_rate_details_note": "Adds a graph of the last frames' times with the triangles drawn over it, a histogram of frame times and what the GPU drew. Click the frame rate in the view to show or hide them.", - "settings.reference_geometry_through_bodies": "Show reference geometry through bodies", - "settings.reference_geometry_through_bodies_help": "Draw inactive sketch contours and datum planes over shaded bodies", - "settings.window_system_details": "Details", - "settings.window_system_note_now": "Applies after a restart. Now: {now}.", - "settings.window_system_wayland_limited": "Some features are limited on native Wayland.", - "sheet.no_body": "there is no sheet metal body: start one with Flange > Base, or turn a plate into sheet metal with Convert to Sheet Metal (pick its large flat face)", - "sketch_panel.plane_angle": "{plane}, turned by {angle}", - "sketch_panel.plane_fixed": "A fixed plane", - "sketch_panel.plane_flipped": "{plane}, from its other side", - "sketch_panel.plane_offset": "{plane}, offset by {distance}", - "sketch_panel.plane_origin": "The {plane} plane", - "thread.direction": "Thread direction", - "thread.left_hand": "Left-hand", - "thread.right_hand": "Right-hand", - "timeline.delete_after_marker_one": "Delete 1 Feature After History Marker", - "timeline.delete_after_marker_other": "Delete {count} Features After History Marker", - "timeline.delete_folders_tip": "Keep their features and nested folders in the history", - "timeline.delete_many": "Delete {count} Selected Features", - "timeline.feature_error": "Error: {message}", - "timeline.feature_hint": "Double-click to edit · drag to reorder · right-click for more", - "timeline.feature_warning": "Warning: {message}", - "toolbar.render_appearance": "APPEARANCE", - "toolbar.render_camera": "CAMERA", - "toolbar.render_environment": "ENVIRONMENT", - "toolbar.render_lighting": "LIGHTING", - "ui.agent_chat_attach_selection": "Attach selection", - "ui.agent_chat_attach_selection_tip": "Send what is selected in the model (faces, edges, features, bodies) with the message, so the agent knows what you mean", - "ui.agent_chat_changes_n": "{n} changes", - "ui.agent_chat_choose_model": "Choose a model", - "ui.agent_chat_ctx_bodies": "Bodies", - "ui.agent_chat_ctx_elements": "Elements", - "ui.agent_chat_ctx_features": "Features", - "ui.agent_chat_ctx_more": "+{n} more", - "ui.agent_chat_ctx_other": "Other", - "ui.agent_chat_login_found": "login found", - "ui.agent_chat_model_no_tools": "{model} can't use SolidCraft's tools, so it can only chat. Pick a model with tool support.", - "ui.agent_chat_no_tool_call": "The model didn't use SolidCraft's tools, so the design wasn't changed. Choose a model that supports tool calling; see Local models in the agent chat guide.", - "ui.agent_chat_pick_context": "Pick context", - "ui.agent_chat_pick_context_tip": "Choose faces, edges, features and bodies in the model for the agent to look at, then press OK", - "ui.agent_chat_provider_models": "{count} models", - "ui.agent_chat_provider_other": "Other", - "ui.agent_chat_provider_tip": "The provider whose models the next list shows.", - "ui.agent_chat_turn_unlimited": "Unlimited", - "ui.ai_add_anthropic": "Anthropic-compatible API", - "ui.ai_add_endpoint": "API endpoint", - "ui.ai_kind": "Kind", - "ui.ai_protocol": "Protocol", - "ui.ai_request_timed_out": "The model took longer than {seconds} s. You can raise the request timeout for this endpoint in Preferences › Assistant.", - "ui.ai_request_timeout": "Request timeout", - "ui.ai_request_timeout_hint": "How long one model request to this endpoint may take, from 30 s to an hour. Raise it for a slow local model.", - "ui.ai_test_answered": "Reached: {model} answered", - "ui.ai_test_anthropic_tip": "Sends a short message to the endpoint", - "ui.ai_tool_arguments": "Arguments", - "ui.ai_tool_details": "Details", - "ui.ai_tool_result": "Result", - "ui.ai_tool_sum_bodies_one": "{count} body", - "ui.ai_tool_sum_bodies_other": "{count} bodies", - "ui.ai_tool_sum_by": "by {value}", - "ui.ai_tool_sum_edges_one": "{count} edge", - "ui.ai_tool_sum_edges_other": "{count} edges", - "ui.ai_tool_sum_faces_one": "{count} face", - "ui.ai_tool_sum_faces_other": "{count} faces", - "ui.ai_tool_sum_features_one": "{count} feature", - "ui.ai_tool_sum_features_other": "{count} features", - "ui.ai_tool_sum_measured": "Measured {what}", - "ui.ai_tool_sum_more": "{steps}, and {count} more", - "ui.ai_tool_sum_radius": "r {value}", - "ui.ai_tool_sum_saved": "Saved {file}", - "ui.ai_tool_sum_screenshot": "Screenshot", - "ui.ai_tool_sum_then": "{first}, then {next}", - "ui.cosmetic_thread_markings": "Cosmetic thread markings", - "ui.cosmetic_thread_markings_help": "Show schematic markings on threaded cylindrical walls. Changes only the display, never the design or exports.", - "ui.extract_component": "Extract to File…", - "ui.extract_design_changed": "The design changed while choosing a file. Start Extract to File again.", - "ui.extract_done": "The component is now its own design, linked here.", - "ui.extrude_auto_to_object": "Extrude to a picked target", - "ui.extrude_auto_to_object_tip": "In Extrude, with a profile picked, picking a face, vertex or parallel plane off its plane switches the extent to To Object", - "ui.frame_rate_details": "Frame rate details", - "ui.hide_origin_by_default": "Hide origin by default", - "ui.hide_origin_note": "New designs start with the Origin folder hidden. A design keeps its own Origin setting once you show or hide it.", - "ui.history_sketch_listed_under": "Listed under {feature}", - "ui.horizontal_constraint": "Horizontal Constraint", - "ui.link_copies": "Link Identical Copies", - "ui.link_copies_keep": "Keep", - "ui.link_copies_link": "Link", - "ui.link_copies_text": "These components build the same bodies as {name}. Make them placements of its link?", - "ui.nav_bridge": "Navigate with a device app on this computer", - "ui.nav_bridge_connected": "Connected", - "ui.nav_bridge_port": "Port", - "ui.nav_bridge_tip": "A 3D input device's own program (for example a homemade 3D mouse's driver) moves the view over a local connection, so the mouse pointer stays yours. SolidCraft connects to it on this port on this computer only.", - "ui.nav_bridge_waiting": "Waiting for the device app", - "ui.open_linked_design": "Open Linked Design", - "ui.perforate_margin_default": "from the diameter", - "ui.perforate_pitch": "Pitch", - "ui.perforate_square": "Square", - "ui.perforate_staggered": "Staggered (60°)", - "ui.perforate_title": "PERFORATE", - "ui.placement_handles": "Placement handles", - "ui.placement_handles_tip": "Handles on the preview of a Rest, Boss or Snap Fit: drag the marker to move it across the model, turn it by its ring", - "ui.plugins_none": "No plugins match this search.", - "ui.plugins_search": "Search plugins", - "ui.reference_1": "Reference 1", - "ui.reference_2": "Reference 2", - "ui.reference_distance": "Reference distance", - "ui.replace_with_link_done": "The copies are now placements of the linked design.", - "ui.save_mesh_no_slicer_open": "No slicer found: choose Custom… and pick your slicer program", - "ui.send_to_slicer_unavailable": "Send to Slicer needs the desktop app: a browser can't start a program", - "ui.sent_to_slicer_copy": "Sent to {slicer} as {file}, because the first file is still open there", - "ui.shortcut_capture_add_key": "Add one ordinary key. Escape cancels.", - "ui.shortcut_capture_hint": "Click a binding, then press modifiers and one key. Add modifiers within one second; release all keys to confirm. Escape cancels.", - "ui.shortcut_capture_press": "Press modifiers and one key. Escape cancels.", - "ui.shortcut_capture_release": "Release all keys to confirm. Escape cancels.", - "ui.shortcut_capture_settling": "Confirming shortcut… Escape cancels.", - "ui.shortcut_cycles_modes": "Pressing a tool's shortcut again switches its mode", - "ui.shortcut_cycles_modes_tip": "Before the first point, pressing a sketch tool's shortcut again steps through its creation modes. Off: it starts the tool again.", - "ui.shortcut_multiple_keys": "Use modifiers and only one other key. Click the binding to try again.", - "ui.slicer_lost": "{slicer} was started but can't be found again to send it the file. The file is saved at {path}: open it from there.", - "ui.slicer_no_file": "{slicer} is ready, but there is no file to send to it.", - "ui.slicer_no_response": "{slicer} didn't respond in time. The file is already saved at {path}: send it again once the slicer has started.", - "ui.slicer_resend_hint": "Sending again replaces the file the slicer has open.", - "ui.slicer_single_instance": "Open files in a slicer that is already running", - "ui.slicer_single_instance_tip": "PrusaSlicer, SuperSlicer and Cura load the file in the window that is open instead of starting another. Other slicers are started as they are. PrusaSlicer 3.0 always does this: its launcher can't take a file any other way.", - "ui.slicer_starting": "Starting {slicer}…", - "ui.slicer_still_starting": "Still waiting for {slicer} to start. Nothing else was sent.", - "ui.slicer_stl_fallback": "The 3MF could not be written, so this is an STL.", - "ui.step_values": "Step values with the arrow keys and the wheel", - "ui.step_values_tip": "In a value field you are typing in, Up/Down change a plain number by 1 (Shift: 10, Alt: 0.1), and so does the mouse wheel over the field. Expressions are left as typed.", - "ui.turn_up_axis": "Turn Up Axis", - "ui.vertical_constraint": "Vertical Constraint", - "ui.viewport_theme_follow": "Follow theme", - "ui.window_system": "Window system", - "ui.window_system_auto": "Automatic", - "ui.window_system_wayland": "Wayland", - "ui.window_system_x11": "X11", - "update.prefs_web": "Reload the page to get the latest web app. If the network is unavailable or the update cannot finish downloading in time, the saved version opens instead; a download in progress continues for the next reload.", - "view.auto_ortho_faces": "Perspective while orbiting, ortho on faces", - "web.files.insert_drawings_hint": "CAD files, meshes, DXF or SVG into the open design", - "web.files.insert_stored_drawings_hint": "Into the open design (CAD files, meshes, DXF, SVG)", - "web.open_full": "Open in SolidCraft", - "web.open_link": "Open linked design?", - "web.open_link_confirm": "There are unsaved changes. Open the linked design in a new tab?", - "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ choose · Enter applies what you typed · Esc dismiss" - } -} diff --git a/assets/locales/pending/render-stage-proportions.json b/assets/locales/pending/render-stage-proportions.json deleted file mode 100644 index ce9d7a39d..000000000 --- a/assets/locales/pending/render-stage-proportions.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "en": { - "render.stage_preview_note": "Integrated preview · direct light" - }, - "de": { - "render.stage_preview_note": "Integrierte Vorschau · direktes Licht" - }, - "ja": { - "render.stage_preview_note": "統合プレビュー · 直接光" - }, - "zh": { - "render.stage_preview_note": "集成预览 · 直接光照" - }, - "ko": { - "render.stage_preview_note": "통합 미리 보기 · 직접광" - }, - "ar": { - "render.stage_preview_note": "معاينة مدمجة · ضوء مباشر" - }, - "he": { - "render.stage_preview_note": "תצוגה מקדימה משולבת · אור ישיר" - }, - "vi": { - "render.stage_preview_note": "Xem trước tích hợp · ánh sáng trực tiếp" - } -} diff --git a/assets/locales/pending/render-stage-ui.json b/assets/locales/pending/render-stage-ui.json deleted file mode 100644 index a0c355c09..000000000 --- a/assets/locales/pending/render-stage-ui.json +++ /dev/null @@ -1,426 +0,0 @@ -{ - "en": { - "Render Stage": "Render Stage", - "cmd.appearance_paint": "Paint Appearance", - "cmd.appearance_pick_up": "Pick Up Appearance", - "cmd.appearance_replace": "Replace Appearance", - "cmd.render_batch": "Render All Shots", - "cmd.render_compare": "Compare Images", - "cmd.render_lights_solo": "Solo Light", - "cmd.view_shots_strip": "Shots Strip", - "render.all_shots_label": "All Shots", - "render.export_image_label": "Export Image", - "render.fixed_camera": "Camera", - "render.fixed_world": "World", - "render.heading_batch": "BATCH", - "render.heading_frame": "FRAME", - "render.heading_lens": "LENS", - "render.heading_results": "RESULTS", - "render.heading_shots": "SHOTS", - "render.hide_shots_label": "Hide Shots strip", - "render.inspector": "Inspector", - "render.light_anchor_pending": "Changing the light coordinate frame is not supported yet.", - "render.lights_fixed_to": "Lights fixed to", - "render.output_tools_inspector": "Edit size and format in the Output inspector.", - "render.paint_label": "Paint", - "render.pick_component": "Component", - "render.pick_label": "Pick", - "render.pick_up_label": "Pick Up", - "render.pick_waiting": "Product picking is not supported yet.", - "render.preview_lighting_help": "The live preview shows direct light only and no shadows.", - "render.regrade_label": "Regrade", - "render.replace_label": "Replace", - "render.save_shot": "Save Shot", - "render.shell_tab_appearance": "RENDER APPEARANCE", - "render.shell_tab_camera": "RENDER CAMERA", - "render.shell_tab_scene": "RENDER SCENE", - "render.show_shots_label": "Show Shots strip", - "render.stage_frame": "Frame", - "render.stage_light": "Light", - "render.stage_look": "Look", - "render.stage_orthographic": "Orthographic", - "render.stage_output": "Output", - "render.strip_label": "Strip", - "render.wait_batch": "not supported yet: the saved-shot render queue", - "render.wait_compare": "not supported yet: retained image comparison", - "render.wait_paint": "not supported yet: product picking and appearance painting", - "render.wait_pick_up": "not supported yet: product picking and appearance sampling", - "render.wait_replace": "not supported yet: replacing all uses of an appearance", - "render.wait_solo": "not supported yet: light visibility and solo controls", - "toolbar.render_lights": "LIGHTS", - "toolbar.render_result": "RESULT", - "toolbar.render_stage": "STAGE", - "toolbar.render_studio": "STUDIO" - }, - "de": { - "Render Stage": "Renderphase", - "cmd.appearance_paint": "Aussehen aufmalen", - "cmd.appearance_pick_up": "Aussehen aufnehmen", - "cmd.appearance_replace": "Erscheinungsbild ersetzen", - "cmd.render_batch": "Alle Aufnahmen rendern", - "cmd.render_compare": "Bilder vergleichen", - "cmd.render_lights_solo": "Licht allein anzeigen", - "cmd.view_shots_strip": "Aufnahmenleiste", - "render.all_shots_label": "Alle Aufnahmen", - "render.export_image_label": "Bild exportieren", - "render.fixed_camera": "Kamera", - "render.fixed_world": "Welt", - "render.heading_batch": "Stapel", - "render.heading_frame": "Bildrahmen", - "render.heading_lens": "Objektiv", - "render.heading_results": "Ergebnisse", - "render.heading_shots": "Aufnahmen", - "render.hide_shots_label": "Aufnahmenleiste ausblenden", - "render.inspector": "Inspektor", - "render.light_anchor_pending": "Das Koordinatensystem der Lichter kann noch nicht geändert werden.", - "render.lights_fixed_to": "Lichter gebunden an", - "render.output_tools_inspector": "Größe und Format im Ausgabe-Inspektor bearbeiten.", - "render.paint_label": "Aufmalen", - "render.pick_component": "Komponente", - "render.pick_label": "Auswahl", - "render.pick_up_label": "Aufnehmen", - "render.pick_waiting": "Die Produktauswahl wird noch nicht unterstützt.", - "render.preview_lighting_help": "Die Live-Vorschau zeigt nur direktes Licht und keine Schatten.", - "render.regrade_label": "Neu abstimmen", - "render.replace_label": "Ersetzen", - "render.save_shot": "Aufnahme speichern", - "render.shell_tab_appearance": "Aussehen", - "render.shell_tab_camera": "Kamera", - "render.shell_tab_scene": "SZENE", - "render.show_shots_label": "Aufnahmenleiste einblenden", - "render.stage_frame": "Bildausschnitt", - "render.stage_light": "Licht", - "render.stage_look": "Aussehen", - "render.stage_orthographic": "Orthografisch", - "render.stage_output": "Ausgabe", - "render.strip_label": "Leiste", - "render.wait_batch": "Noch nicht unterstützt: Renderwarteschlange gespeicherter Aufnahmen", - "render.wait_compare": "Noch nicht unterstützt: Vergleich gespeicherter Bilder", - "render.wait_paint": "Noch nicht unterstützt: Produktauswahl und Auftragen von Erscheinungsbildern", - "render.wait_pick_up": "Noch nicht unterstützt: Produktauswahl und Übernehmen von Erscheinungsbildern", - "render.wait_replace": "Noch nicht unterstützt: Ersetzen aller Verwendungen eines Erscheinungsbilds", - "render.wait_solo": "Noch nicht unterstützt: Lichtsichtbarkeit und Solo-Steuerung", - "toolbar.render_lights": "LICHTER", - "toolbar.render_result": "ERGEBNIS", - "toolbar.render_stage": "BÜHNE", - "toolbar.render_studio": "STUDIO" - }, - "ja": { - "Render Stage": "レンダリング段階", - "cmd.appearance_paint": "外観をペイント", - "cmd.appearance_pick_up": "外観を取得", - "cmd.appearance_replace": "外観を置換", - "cmd.render_batch": "すべてのショットをレンダリング", - "cmd.render_compare": "画像を比較", - "cmd.render_lights_solo": "ライトを単独表示", - "cmd.view_shots_strip": "ショットストリップ", - "render.all_shots_label": "すべてのショット", - "render.export_image_label": "画像を書き出す", - "render.fixed_camera": "カメラ", - "render.fixed_world": "ワールド", - "render.heading_batch": "バッチ", - "render.heading_frame": "フレーム", - "render.heading_lens": "レンズ", - "render.heading_results": "結果", - "render.heading_shots": "ショット", - "render.hide_shots_label": "ショットストリップを非表示", - "render.inspector": "インスペクター", - "render.light_anchor_pending": "ライトの座標系の変更はまだサポートされていません。", - "render.lights_fixed_to": "ライトの固定先", - "render.output_tools_inspector": "サイズと形式は出力インスペクターで編集してください。", - "render.paint_label": "ペイント", - "render.pick_component": "コンポーネント", - "render.pick_label": "選択", - "render.pick_up_label": "取得", - "render.pick_waiting": "製品の選択はまだサポートされていません。", - "render.preview_lighting_help": "ライブプレビューは直接光のみを表示し、影は表示しません。", - "render.regrade_label": "再グレーディング", - "render.replace_label": "置換", - "render.save_shot": "ショットを保存", - "render.shell_tab_appearance": "外観", - "render.shell_tab_camera": "カメラ", - "render.shell_tab_scene": "シーン", - "render.show_shots_label": "ショットストリップを表示", - "render.stage_frame": "構図", - "render.stage_light": "照明", - "render.stage_look": "外観", - "render.stage_orthographic": "平行投影", - "render.stage_output": "出力", - "render.strip_label": "ストリップ", - "render.wait_batch": "未対応: 保存ショットのレンダーキュー", - "render.wait_compare": "未対応: 保持された画像の比較", - "render.wait_paint": "未対応: 製品の選択と外観のペイント", - "render.wait_pick_up": "未対応: 製品の選択と外観の採取", - "render.wait_replace": "未対応: 外観のすべての使用箇所の置換", - "render.wait_solo": "未対応: ライトの表示とソロ操作", - "toolbar.render_lights": "ライト", - "toolbar.render_result": "結果", - "toolbar.render_stage": "ステージ", - "toolbar.render_studio": "スタジオ" - }, - "zh": { - "Render Stage": "渲染阶段", - "cmd.appearance_paint": "涂抹外观", - "cmd.appearance_pick_up": "拾取外观", - "cmd.appearance_replace": "替换外观", - "cmd.render_batch": "渲染所有镜头", - "cmd.render_compare": "比较图像", - "cmd.render_lights_solo": "单独显示灯光", - "cmd.view_shots_strip": "镜头条", - "render.all_shots_label": "所有镜头", - "render.export_image_label": "导出图像", - "render.fixed_camera": "相机", - "render.fixed_world": "世界", - "render.heading_batch": "批量", - "render.heading_frame": "取景框", - "render.heading_lens": "镜头设置", - "render.heading_results": "结果", - "render.heading_shots": "镜头", - "render.hide_shots_label": "隐藏镜头条", - "render.inspector": "检查器", - "render.light_anchor_pending": "暂不支持更改灯光坐标系。", - "render.lights_fixed_to": "灯光固定到", - "render.output_tools_inspector": "请在输出检查器中编辑尺寸和格式。", - "render.paint_label": "涂抹", - "render.pick_component": "组件", - "render.pick_label": "拾取", - "render.pick_up_label": "拾取", - "render.pick_waiting": "暂不支持产品拾取。", - "render.preview_lighting_help": "实时预览仅显示直接光照,不显示阴影。", - "render.regrade_label": "重新调色", - "render.replace_label": "替换", - "render.save_shot": "保存镜头", - "render.shell_tab_appearance": "外观", - "render.shell_tab_camera": "相机", - "render.shell_tab_scene": "场景", - "render.show_shots_label": "显示镜头条", - "render.stage_frame": "构图", - "render.stage_light": "照明", - "render.stage_look": "外观", - "render.stage_orthographic": "正交投影", - "render.stage_output": "输出", - "render.strip_label": "镜头条", - "render.wait_batch": "暂不支持:已保存镜头渲染队列", - "render.wait_compare": "暂不支持:保留图像比较", - "render.wait_paint": "暂不支持:产品拾取和外观涂绘", - "render.wait_pick_up": "暂不支持:产品拾取和外观采样", - "render.wait_replace": "暂不支持:替换外观的所有使用处", - "render.wait_solo": "暂不支持:灯光可见性和独显控制", - "toolbar.render_lights": "灯光", - "toolbar.render_result": "结果", - "toolbar.render_stage": "舞台", - "toolbar.render_studio": "工作室" - }, - "ko": { - "Render Stage": "렌더링 단계", - "cmd.appearance_paint": "모양 칠하기", - "cmd.appearance_pick_up": "모양 가져오기", - "cmd.appearance_replace": "모양 바꾸기", - "cmd.render_batch": "모든 샷 렌더링", - "cmd.render_compare": "이미지 비교", - "cmd.render_lights_solo": "광원 단독 표시", - "cmd.view_shots_strip": "샷 스트립", - "render.all_shots_label": "모든 샷", - "render.export_image_label": "이미지 내보내기", - "render.fixed_camera": "카메라", - "render.fixed_world": "월드", - "render.heading_batch": "일괄 처리", - "render.heading_frame": "프레임", - "render.heading_lens": "렌즈", - "render.heading_results": "결과", - "render.heading_shots": "샷", - "render.hide_shots_label": "샷 스트립 숨기기", - "render.inspector": "속성 검사기", - "render.light_anchor_pending": "조명 좌표계 변경은 아직 지원되지 않습니다.", - "render.lights_fixed_to": "조명 고정 기준", - "render.output_tools_inspector": "출력 검사기에서 크기와 형식을 편집하세요.", - "render.paint_label": "칠하기", - "render.pick_component": "구성요소", - "render.pick_label": "선택", - "render.pick_up_label": "가져오기", - "render.pick_waiting": "제품 선택은 아직 지원되지 않습니다.", - "render.preview_lighting_help": "실시간 미리 보기에는 직접 조명만 표시되며 그림자는 표시되지 않습니다.", - "render.regrade_label": "색상 재조정", - "render.replace_label": "바꾸기", - "render.save_shot": "샷 저장", - "render.shell_tab_appearance": "모양", - "render.shell_tab_camera": "카메라", - "render.shell_tab_scene": "장면", - "render.show_shots_label": "샷 스트립 표시", - "render.stage_frame": "구도", - "render.stage_light": "조명", - "render.stage_look": "외관", - "render.stage_orthographic": "직교 투영", - "render.stage_output": "출력", - "render.strip_label": "스트립", - "render.wait_batch": "아직 지원되지 않음: 저장된 샷 렌더 대기열", - "render.wait_compare": "아직 지원되지 않음: 보관된 이미지 비교", - "render.wait_paint": "아직 지원되지 않음: 제품 선택 및 모양 페인팅", - "render.wait_pick_up": "아직 지원되지 않음: 제품 선택 및 모양 샘플링", - "render.wait_replace": "아직 지원되지 않음: 모양이 사용된 모든 곳 바꾸기", - "render.wait_solo": "아직 지원되지 않음: 조명 표시 및 단독 표시 제어", - "toolbar.render_lights": "조명", - "toolbar.render_result": "결과", - "toolbar.render_stage": "스테이지", - "toolbar.render_studio": "스튜디오" - }, - "ar": { - "Render Stage": "مرحلة التصيير", - "cmd.appearance_paint": "تلوين المظهر", - "cmd.appearance_pick_up": "التقاط المظهر", - "cmd.appearance_replace": "استبدال المظهر", - "cmd.render_batch": "تصيير كل اللقطات", - "cmd.render_compare": "مقارنة الصور", - "cmd.render_lights_solo": "عزل الضوء", - "cmd.view_shots_strip": "شريط اللقطات", - "render.all_shots_label": "كل اللقطات", - "render.export_image_label": "تصدير الصورة", - "render.fixed_camera": "الكاميرا", - "render.fixed_world": "العالم", - "render.heading_batch": "الدفعة", - "render.heading_frame": "الإطار", - "render.heading_lens": "العدسة", - "render.heading_results": "النتائج", - "render.heading_shots": "اللقطات", - "render.hide_shots_label": "إخفاء شريط اللقطات", - "render.inspector": "المفتش", - "render.light_anchor_pending": "تغيير نظام إحداثيات الضوء غير مدعوم بعد.", - "render.lights_fixed_to": "الأضواء مثبّتة على", - "render.output_tools_inspector": "عدّل الحجم والصيغة في مفتش المخرجات.", - "render.paint_label": "تلوين", - "render.pick_component": "مكوّن", - "render.pick_label": "التقاط", - "render.pick_up_label": "التقاط المظهر", - "render.pick_waiting": "اختيار المنتج غير مدعوم بعد.", - "render.preview_lighting_help": "المعاينة الحية تعرض الضوء المباشر فقط وبلا ظلال.", - "render.regrade_label": "إعادة تدرّج", - "render.replace_label": "استبدال", - "render.save_shot": "حفظ اللقطة", - "render.shell_tab_appearance": "مظهر التصيير", - "render.shell_tab_camera": "كاميرا التصيير", - "render.shell_tab_scene": "مشهد التصيير", - "render.show_shots_label": "إظهار شريط اللقطات", - "render.stage_frame": "الإطار", - "render.stage_light": "الضوء", - "render.stage_look": "المظهر", - "render.stage_orthographic": "إسقاط متعامد", - "render.stage_output": "المخرجات", - "render.strip_label": "الشريط", - "render.wait_batch": "غير مدعوم بعد: قائمة تصيير اللقطات المحفوظة", - "render.wait_compare": "غير مدعوم بعد: مقارنة الصور المحتفظ بها", - "render.wait_paint": "غير مدعوم بعد: اختيار المنتج وتلوين المظهر", - "render.wait_pick_up": "غير مدعوم بعد: اختيار المنتج وأخذ عينة من المظهر", - "render.wait_replace": "غير مدعوم بعد: استبدال كل استخدامات المظهر", - "render.wait_solo": "غير مدعوم بعد: ظهور الأضواء وعزلها", - "toolbar.render_lights": "الأضواء", - "toolbar.render_result": "النتيجة", - "toolbar.render_stage": "المرحلة", - "toolbar.render_studio": "الاستوديو" - }, - "he": { - "Render Stage": "שלב הרינדור", - "cmd.appearance_paint": "צביעת מראה", - "cmd.appearance_pick_up": "בחירת מראה", - "cmd.appearance_replace": "החלפת מראה", - "cmd.render_batch": "רינדור כל הצילומים", - "cmd.render_compare": "השוואת תמונות", - "cmd.render_lights_solo": "בידוד אור", - "cmd.view_shots_strip": "סרגל צילומים", - "render.all_shots_label": "כל הצילומים", - "render.export_image_label": "ייצוא תמונה", - "render.fixed_camera": "מצלמה", - "render.fixed_world": "עולם", - "render.heading_batch": "אצווה", - "render.heading_frame": "מסגרת", - "render.heading_lens": "עדשה", - "render.heading_results": "תוצאות", - "render.heading_shots": "צילומים", - "render.hide_shots_label": "הסתר את סרגל הצילומים", - "render.inspector": "מפקח", - "render.light_anchor_pending": "שינוי מערכת הצירים של האור אינו נתמך עדיין.", - "render.lights_fixed_to": "האורות מקובעים אל", - "render.output_tools_inspector": "ערוך גודל ופורמט במפקח הפלט.", - "render.paint_label": "צביעה", - "render.pick_component": "רכיב", - "render.pick_label": "בחירה", - "render.pick_up_label": "בחירת מראה", - "render.pick_waiting": "בחירת מוצר אינה נתמכת עדיין.", - "render.preview_lighting_help": "התצוגה המקדימה החיה מציגה אור ישיר בלבד וללא צללים.", - "render.regrade_label": "כיול מחדש", - "render.replace_label": "החלפה", - "render.save_shot": "שמור צילום", - "render.shell_tab_appearance": "מראה רינדור", - "render.shell_tab_camera": "מצלמת רינדור", - "render.shell_tab_scene": "סצנת רינדור", - "render.show_shots_label": "הצג את סרגל הצילומים", - "render.stage_frame": "מסגרת", - "render.stage_light": "אור", - "render.stage_look": "מראה", - "render.stage_orthographic": "אורתוגרפי", - "render.stage_output": "פלט", - "render.strip_label": "סרגל", - "render.wait_batch": "לא נתמך עדיין: תור רינדור של צילומים שמורים", - "render.wait_compare": "לא נתמך עדיין: השוואת תמונות שנשמרו", - "render.wait_paint": "לא נתמך עדיין: בחירת מוצר וצביעת מראה", - "render.wait_pick_up": "לא נתמך עדיין: בחירת מוצר ודגימת מראה", - "render.wait_replace": "לא נתמך עדיין: החלפת כל השימושים במראה", - "render.wait_solo": "לא נתמך עדיין: נראות אורות ובידוד", - "toolbar.render_lights": "אורות", - "toolbar.render_result": "תוצאה", - "toolbar.render_stage": "שלב", - "toolbar.render_studio": "סטודיו" - }, - "vi": { - "Render Stage": "Giai đoạn kết xuất", - "cmd.appearance_paint": "Tô diện mạo", - "cmd.appearance_pick_up": "Lấy diện mạo", - "cmd.appearance_replace": "Thay diện mạo", - "cmd.render_batch": "Kết xuất mọi cảnh chụp", - "cmd.render_compare": "So sánh ảnh", - "cmd.render_lights_solo": "Chỉ hiện một đèn", - "cmd.view_shots_strip": "Dải cảnh chụp", - "render.all_shots_label": "Mọi cảnh chụp", - "render.export_image_label": "Xuất ảnh", - "render.fixed_camera": "Máy ảnh", - "render.fixed_world": "Thế giới", - "render.heading_batch": "LÔ", - "render.heading_frame": "KHUNG", - "render.heading_lens": "ỐNG KÍNH", - "render.heading_results": "KẾT QUẢ", - "render.heading_shots": "CẢNH CHỤP", - "render.hide_shots_label": "Ẩn dải cảnh chụp", - "render.inspector": "Bảng thuộc tính", - "render.light_anchor_pending": "Chưa hỗ trợ đổi hệ tọa độ của đèn.", - "render.lights_fixed_to": "Đèn gắn cố định với", - "render.output_tools_inspector": "Chỉnh kích thước và định dạng trong bảng thuộc tính Đầu ra.", - "render.paint_label": "Tô", - "render.pick_component": "Thành phần", - "render.pick_label": "Chọn", - "render.pick_up_label": "Lấy", - "render.pick_waiting": "Chưa hỗ trợ chọn sản phẩm.", - "render.preview_lighting_help": "Bản xem trước trực tiếp chỉ hiện ánh sáng trực tiếp và không có bóng đổ.", - "render.regrade_label": "Chỉnh lại màu", - "render.replace_label": "Thay", - "render.save_shot": "Lưu cảnh chụp", - "render.shell_tab_appearance": "DIỆN MẠO KẾT XUẤT", - "render.shell_tab_camera": "MÁY ẢNH KẾT XUẤT", - "render.shell_tab_scene": "CẢNH KẾT XUẤT", - "render.show_shots_label": "Hiện dải cảnh chụp", - "render.stage_frame": "Khung", - "render.stage_light": "Ánh sáng", - "render.stage_look": "Giao diện", - "render.stage_orthographic": "Trực giao", - "render.stage_output": "Đầu ra", - "render.strip_label": "Dải", - "render.wait_batch": "chưa hỗ trợ: hàng đợi kết xuất cảnh chụp đã lưu", - "render.wait_compare": "chưa hỗ trợ: so sánh ảnh được giữ lại", - "render.wait_paint": "chưa hỗ trợ: chọn sản phẩm và tô diện mạo", - "render.wait_pick_up": "chưa hỗ trợ: chọn sản phẩm và lấy mẫu diện mạo", - "render.wait_replace": "chưa hỗ trợ: thay mọi chỗ dùng một diện mạo", - "render.wait_solo": "chưa hỗ trợ: hiển thị và chỉ hiện một đèn", - "toolbar.render_lights": "ĐÈN", - "toolbar.render_result": "KẾT QUẢ", - "toolbar.render_stage": "GIAI ĐOẠN", - "toolbar.render_studio": "XƯỞNG" - } -} diff --git a/assets/locales/pending/sketch-radius-diameter-toggle.json b/assets/locales/pending/sketch-radius-diameter-toggle.json deleted file mode 100644 index 19418540a..000000000 --- a/assets/locales/pending/sketch-radius-diameter-toggle.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "en": { "cmd.sketch_toggle_diameter": "Toggle Radius / Diameter" }, - "ar": { "cmd.sketch_toggle_diameter": "تبديل نصف القطر / القطر" }, - "de": { "cmd.sketch_toggle_diameter": "Radius / Durchmesser umschalten" }, - "es": { "cmd.sketch_toggle_diameter": "Alternar radio / diámetro" }, - "fr": { "cmd.sketch_toggle_diameter": "Basculer rayon / diamètre" }, - "he": { "cmd.sketch_toggle_diameter": "מעבר בין רדיוס לקוטר" }, - "ja": { "cmd.sketch_toggle_diameter": "半径 / 直径の切り替え" }, - "vi": { "cmd.sketch_toggle_diameter": "Chuyển đổi bán kính / đường kính" }, - "zh": { "cmd.sketch_toggle_diameter": "切换半径 / 直径" } -} diff --git a/assets/locales/uk.json b/assets/locales/uk.json index 420950b50..946c5ccd4 100644 --- a/assets/locales/uk.json +++ b/assets/locales/uk.json @@ -5,7 +5,10 @@ "2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Додайте знімок екрана: скопіюйте й вставте його або збережіть і завантажте PNG.", "2D": "2D", "3. Click Submit new issue on GitHub to send your report.": "3. Натисніть Submit new issue на GitHub, щоб надіслати звіт.", + "A Single hole snaps to the middle of its face and to the centres of its round edges": "Одинарний отвір прив'язується до центру грані та до центрів круглих ребер", "A new configuration, a copy of the active one": "Нова конфігурація, копія активної", + "A placed Single hole has a handle to drag it, and picking its face again moves the hole there instead of taking it out": "Розміщений одинарний отвір має маркер для перетягування; повторне вибрання грані переміщує отвір туди замість видалення", + "A short title for the problem (optional)": "Короткий заголовок проблеми (необов'язково)", "ARRANGE": "РОЗТАШУВАННЯ", "About SolidCraft": "Про SolidCraft", "Acceleration": "Прискорення", @@ -19,19 +22,24 @@ "Add Mid Radius": "Додати середній радіус", "Add Row": "Додати рядок", "Add a tool": "Додати інструмент", + "Add bend": "Додати згин", "Add condition": "Додати умову", "Add or edit rule": "Додати або змінити правило", "Add to New Folder": "Додати до нової теки", "Advanced": "Додатково", "Against": "Проти", "Alignment": "Вирівнювання", + "All Lines": "Усі лінії", "All Sketch Points": "Усі точки ескізу", "All components": "Усі компоненти", "All open designs": "Усі відкриті проєкти", "Allowed expressions, separated by semicolons": "Дозволені вирази, розділені крапками з комою", "Also deletes": "Також видаляє", + "Anchor": "Прив'язка", "Angle 2": "Кут 2", + "Angle Display": "Відображення кута", "Animate": "Анімувати", + "Another bend on the far edge of the last flange": "Ще один згин на дальньому ребрі останнього фланця", "App/system information and command settings are included. Review private details before sharing.": "Додано відомості про програму й систему та налаштування команд. Перегляньте приватні дані перед поширенням.", "Appearance name": "Назва вигляду", "Applied Radius": "Застосований радіус", @@ -47,6 +55,8 @@ "BLEND SURFACE": "ПОВЕРХНЯ ПЕРЕХОДУ", "BOUNDARY SURFACE": "ПОВЕРХНЯ ЗА МЕЖАМИ", "BROWSER": "БРАУЗЕР", + "Bar": "Смуга", + "Bend": "Згин", "Bend Edges": "Ребра згину", "Bend Line Position": "Положення лінії згину", "Bend Position": "Положення згину", @@ -59,6 +69,9 @@ "Body (last if none)": "Тіло (останнє, якщо не вибрано)", "Body to split": "Тіло для розділення", "Body, or faces to take out": "Тіло або грані для вилучення", + "Bottom Left": "Нижній лівий", + "Bottom Middle": "Нижній по центру", + "Bottom Right": "Нижній правий", "Boundary": "Межа", "Bounding box": "Обмежувальна рамка", "CHECK": "ПЕРЕВІРКА", @@ -78,12 +91,15 @@ "Center Y": "Центр Y", "Center of mass": "Центр мас", "Centre to centre": "Від центра до центра", + "Centroid": "Центроїд", "Chamfer Type": "Тип фаски", + "Channel": "Швелер", "Check collisions": "Перевіряти зіткнення", "Checked": "Перевірено", "Choose Variable radius or Spline in Type.": "Виберіть у полі «Тип» значення «Variable radius» або «Spline».", "Choose a new plane. Sketch geometry and dimensions stay unchanged in its two-dimensional coordinates.": "Виберіть нову площину. Геометрія та розміри ескізу залишаються незмінними у своїх двовимірних координатах.", "Choose…": "Вибрати…", + "Circle center": "Центр кола", "Circular": "Круговий", "Circumference": "Довжина кола", "Clockwise": "За годинниковою стрілкою", @@ -106,6 +122,7 @@ "Continue on GitHub": "Продовжити на GitHub", "Continuity": "Неперервність", "Control Radius": "Керівний радіус", + "Copies the definition only. Assign it from Physical Material when ready.": "Копіює лише визначення. Призначте з «Фізичного матеріалу», коли буде готово.", "Copy Error Message": "Копіювати повідомлення про помилку", "Copy Warning Message": "Копіювати попереджувальне повідомлення", "Copy all licences": "Копіювати всі ліцензії", @@ -114,16 +131,19 @@ "Copy screenshot": "Копіювати знімок екрана", "Corner Relief": "Полегшення кута", "Corner Relief Shape": "Форма полегшення кута", + "Corner radius": "Радіус кута", "Counterbore depth": "Глибина циліндричного розширення", "Counterbore Ø": "Ø циліндричного розширення", "Countersink angle": "Кут зенкування", "Countersink Ø": "Ø зенкування", + "Create Hole": "Створити отвір", "Create Issue — review draft": "Створити повідомлення про проблему — перегляд чернетки", "Create Issue…": "Створити повідомлення про проблему…", "Cross curves": "Поперечні криві", "Cube": "Куб", "Current orthographic view (1:1 mm)": "Поточний ортографічний вид (1:1 mm)", "Current perspective view": "Поточний перспективний вид", + "Current plane": "Поточна площина", "Curv. Comb": "Гребінь кривини", "Curvature (G2)": "Кривина (G2)", "Curvature change (G3)": "Зміна кривини (G3)", @@ -153,6 +173,12 @@ "Don't ask again": "Більше не питати", "Double-click to rename": "Двічі клацніть, щоб перейменувати", "Double-clicking the middle button in the view: Home (the home view, framing what is shown), Fit (frame what is shown, keeping the orientation) or nothing": "Подвійне клацання середньою кнопкою у виді: головний (головний вид, що охоплює показане), вписування (охопити показане, зберігаючи орієнтацію) або нічого", + "Drag to move the boss across the model. It snaps to sketch points on the face.": "Перетягніть, щоб перемістити виступ по моделі. Він прив'язується до точок ескізу на грані.", + "Drag to move the hole; click to remove it": "Перетягніть для переміщення отвору; клацніть для видалення", + "Drag to move the rest across the model. It snaps to sketch points on the face.": "Перетягніть, щоб перемістити підпірку по моделі. Вона прив'язується до точок ескізу на грані.", + "Drag to move the snap fit across the model. It snaps to sketch points on the face.": "Перетягніть, щоб перемістити защіпку по моделі. Вона прив'язується до точок ескізу на грані.", + "Drag to point the catch in another direction.": "Перетягніть, щоб змінити напрямок зачеплення.", + "Drag to turn the rest in 5° steps. Hold Alt or Ctrl to turn it freely.": "Перетягніть, щоб повернути підпірку з кроком 5°. Утримуйте Alt або Ctrl для вільного повороту.", "Drive Joint": "Керувати з'єднанням", "Duration": "Тривалість", "Edges": "Ребра", @@ -177,6 +203,7 @@ "Export JSON…": "Експорт JSON…", "Export design library...": "Експортувати бібліотеку проєкту...", "Export hidden edges as dashed lines": "Експортувати приховані ребра як штрихові лінії", + "Exported by SolidWorks, which usually saves Y up": "Експортовано з SolidWorks, який зазвичай зберігає з віссю Y вгору", "Expression": "Вираз", "Extend to meet": "Подовжити до перетину", "Extents": "Межі", @@ -185,6 +212,7 @@ "Face": "Грань", "Face Appearance": "Вигляд грані", "Face attachment lost": "Втрачено прив'язку до грані", + "Face center": "Центр грані", "Faces": "Грані", "Faces / edges / vertices": "Грані / ребра / вершини", "Faces to split": "Грані для розділення", @@ -200,6 +228,8 @@ "First plane": "Перша площина", "Fit and G2 corners require Constant radius.": "Для підгонки та кутів G2 потрібен тип «Constant radius».", "Fixed Face": "Фіксована грань", + "Flange thickness": "Товщина фланця", + "Flanges": "Фланці", "Flat Pattern": "Розгортка", "Flat size": "Розмір розгортки", "Follow camera (Look At sketches)": "Стежити за камерою (ескізи наведення)", @@ -209,11 +239,15 @@ "From Bodies": "З тіл", "From edges": "Початкові ребра", "Full Length": "Повна довжина", + "Full thread depth": "Повна глибина різьби", + "Further Bends": "Додаткові згини", "G2 corners require a constant radius and Exact fit. G2 corner construction is not supported yet.": "Кути G2 потребують постійного радіуса та підгонки «Exact». Побудова кутів G2 ще не підтримується.", "Gap": "Зазор", "Grid": "Сітка", "HISTORY": "ІСТОРІЯ", + "Halo under sketch curves": "Орбіта під кривими ескізу", "Height": "Висота", + "Height From": "Висота від", "Hidden edges": "Приховані ребра", "History layout": "Розташування історії", "History names": "Назви в історії", @@ -222,11 +256,15 @@ "Holes (edges on them)": "Отвори (ребра на них)", "Home view": "Головний вид", "Horiz./Vert.": "Гориз./верт.", + "I-Beam": "Двотавр", "IMAGES": "ЗОБРАЖЕННЯ", + "Import material into design": "Імпортувати матеріал у проєкт", "Import…": "Імпорт…", "In This Design": "У цьому проєкті", "In place (surfaces)": "На місці (поверхні)", "In plane": "У площині", + "Included": "Включено", + "Inner Sharp": "Гострий внутрішній", "Inside": "Усередину", "Instant": "Миттєво", "Interface font": "Шрифт інтерфейсу", @@ -242,10 +280,12 @@ "Keep of the other surface": "Залишити від іншої поверхні", "Key a joint's value at this step": "Вставити ключовий кадр зі значенням з'єднання на цьому кроці", "Keys": "Ключові кадри", + "L-Angle": "Кутник", "LIBRARY": "БІБЛІОТЕКА", "LINKS": "ПОСИЛАННЯ", "Later": "Пізніше", "Leave it": "Залишити як є", + "Left Middle": "Лівий по центру", "Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Застаріла прив'язка до грані. Повторна прив'язка до перевіреної грані створює точну прив'язку.", "Length": "Довжина", "Length units": "Одиниці довжини", @@ -255,11 +295,13 @@ "Limits": "Межі", "Line Spacing": "Міжрядковий інтервал", "Line Type": "Тип лінії", + "Lines": "Lines", "Listing the installed fonts…": "Пошук встановлених шрифтів…", "Load library": "Завантажити бібліотеку", "Local library": "Локальна бібліотека", "Loop": "Контур", "M5 or M5x0.5": "M5 або M5x0.5", + "M5, M5x0.5, 1/4-20 UNC": "M5, M5x0.5, 1/4-20 UNC", "MANAGE": "КЕРУВАННЯ", "MATERIALS": "МАТЕРІАЛИ", "MODEL": "МОДЕЛЬ", @@ -269,6 +311,8 @@ "Mass Center": "Центр мас", "Matched restrictions check the final values.": "Обмеження, умови яких виконано, перевіряють кінцеві значення.", "Material": "Матеріал", + "Material Outside": "Material Outside", + "Material copied. Existing body assignments are unchanged.": "Material copied. Existing body assignments are unchanged.", "Max": "Макс.", "Maximum": "Максимум", "Mesh body": "Тіло сітки", @@ -288,9 +332,11 @@ "Move Type": "Тип переміщення", "Move down": "Перемістити вниз", "Move earlier": "Перемістити раніше", + "Move holes by clicking or dragging": "Move holes by clicking or dragging", "Move later": "Перемістити пізніше", "Move up": "Перемістити вгору", "Name": "Назва", + "Name on import": "Name on import", "Nearest": "Найближчі", "New": "Створити", "New Comp.": "Новий комп.", @@ -300,18 +346,22 @@ "No crash reports.": "Немає звітів про збої.", "No matching appearance presets.": "Немає відповідних наборів вигляду.", "No matching appearances": "Немає відповідних виглядів", + "No matching physical materials.": "No matching physical materials.", "No visible bodies or sketches to export.": "Немає видимих тіл або ескізів для експорту.", "Nominal diameter": "Номінальний діаметр", "None": "Немає", "Not available yet": "Ще недоступно", + "Not saved yet": "Not saved yet", "Notch": "Виріз", "OUTPUT": "ВИВЕДЕННЯ", "Of": "Ступінь вільності", "On your computer": "На цьому комп'ютері", "Opacity": "Непрозорість", "Open GitHub draft": "Відкрити чернетку GitHub", + "Open bodies (no volume)": "Open bodies (no volume)", "Open library...": "Відкрити бібліотеку...", "Open local libraries in the desktop app. You can export this design's library here.": "Відкривайте локальні бібліотеки в настільному застосунку. Тут можна експортувати бібліотеку цього проєкту.", + "Open surface — no volume": "Open surface — no volume", "Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "Параметричний 3D-CAD з відкритим вихідним кодом на Rust. Ліцензовано за MIT OR Apache-2.0.", "Opens your browser and copies the report text for you to paste into GitHub.": "Відкриває браузер і копіює текст звіту, щоб ви вставили його на GitHub.", "Opens your browser. Review and submit your report on GitHub.": "Відкриває браузер. Перегляньте й надішліть звіт на GitHub.", @@ -319,6 +369,9 @@ "Orbit (right drag)": "Обертання (перетягування правою кнопкою)", "Other side": "Інший бік", "Other surface (mutual trim)": "Інша поверхня (взаємне обрізання)", + "Other way": "Other way", + "Outer Sharp": "Гострий зовнішній", + "Outer radius": "Outer radius", "Outside": "Назовні", "Overall length": "Загальна довжина", "Param. Graph": "Граф парам.", @@ -328,6 +381,7 @@ "Path": "Траєкторія", "Pattern": "Масив", "Per Edge": "На кожне ребро", + "Physical material definitions": "Physical material definitions", "Pick the tool bodies": "Виберіть тіла інструмента", "Picked": "Вибрано", "Picked point": "Вибрана точка", @@ -361,6 +415,7 @@ "Recover": "Відновити", "Recover unsaved design?": "Відновити незбережений проєкт?", "Rectangular": "Прямокутний", + "Rectangular Tube": "Rectangular Tube", "Reference face": "Опорна грань", "Remove Tools": "Прибрати інструменти", "Remove condition": "Прибрати умову", @@ -371,9 +426,12 @@ "Remove screenshot": "Прибрати знімок екрана", "Remove the column": "Прибрати стовпець", "Remove the track": "Прибрати доріжку", + "Remove this bend": "Remove this bend", "Remove this point": "Прибрати цю точку", "Rename Feature": "Перейменувати операцію", "Rename Folder": "Перейменувати теку", + "Reopen designs": "Reopen designs", + "Reopen the designs that were open when SolidCraft was last closed": "Reopen the designs that were open when SolidCraft was last closed", "Replace existing library file": "Замінити наявний файл бібліотеки", "Report a bug — review a screenshot and open a GitHub draft": "Повідомити про помилку — переглянути знімок екрана й відкрити чернетку GitHub", "Report text copied. Paste it into GitHub and submit your report there.": "Текст звіту скопійовано. Вставте його на GitHub і надішліть звіт там.", @@ -398,16 +456,21 @@ "Rib Offset": "Зсув ребра", "Rib Thickness": "Товщина ребра", "Ribs": "Ребра", + "Right Middle": "Правий по центру", "Rim Edge": "Крайове ребро", "Ring of tools on the right button": "Кільце інструментів на правій кнопці", "Roll Back Here": "Відкотити сюди", "Roll History Marker Here": "Перемістити маркер історії сюди", + "Root radius": "Root radius", "Round": "Круглий", + "Round Bar": "Round Bar", + "Round Tube": "Round Tube", "Rule": "Правило", "Rule name": "Назва правила", "Rules run from top to bottom. Matched drives change effective values.": "Правила виконуються згори вниз. Керівні правила, умови яких виконано, змінюють дійсні значення.", "SECTION": "ПЕРЕРІЗ", "SURFACE QUALITY": "ЯКІСТЬ ПОВЕРХНІ", + "Same way": "Same way", "Save Rule": "Зберегти правило", "Save View": "Зберегти вид", "Save screenshot…": "Зберегти знімок екрана…", @@ -421,6 +484,7 @@ "Search this library": "Пошук у цій бібліотеці", "Second plane": "Друга площина", "Section": "Переріз", + "Section (optional)": "Section (optional)", "Section position": "Положення перерізу", "Sections (one sketch each)": "Перерізи (по одному ескізу)", "Select Other": "Вибрати інше", @@ -435,6 +499,7 @@ "Shape": "Форма", "Sheet Rules": "Правила листа", "Show Agent Cursor": "Показати курсор агента", + "Show ghost": "Show ghost", "Show in folder": "Показати в теці", "Show the pointer an AI agent moves (#35)": "Показувати вказівник, яким рухає ШІ-агент (#35)", "Show tool at cursor": "Показувати інструмент біля курсора", @@ -447,6 +512,7 @@ "Sketch plane has no body-face attachment.": "Площина ескізу не має прив'язки до грані тіла.", "Sketch points": "Точки ескізу", "Slot width": "Ширина паза", + "Snap to face and edge centres": "Snap to face and edge centres", "SolidCraft closed before these designs were saved. Their last autosave can be opened.": "SolidCraft закрився до того, як ці проєкти було збережено. Можна відкрити їхнє останнє автозбереження.", "Specialise": "Спеціалізувати", "Speed": "Швидкість", @@ -473,9 +539,11 @@ "Surface, or faces to turn over": "Поверхня або грані, щоб обернути нормаль", "Swap Ends": "Поміняти кінці місцями", "TRIM": "ОБРІЗАННЯ", + "Tangent": "Tangent", "Tangent (G1)": "Дотик (G1)", "Tangent Chain": "Дотичний ланцюг", "Tangent chain": "Дотичний ланцюг", + "Tangent to Edge": "Tangent to Edge", "Tap drill diameter": "Діаметр свердла під різьбу", "Target": "Цільова грань або площина", "Target Body": "Цільове тіло", @@ -493,14 +561,20 @@ "This child is shared. Position changes apply to every copy of its parent.": "Цей дочірній об'єкт спільний. Зміни положення застосовуються до кожної копії батьківського.", "This face cannot provide a durable attachment. Choose another face or explicitly use a fixed plane.": "Ця грань не може забезпечити надійну прив'язку. Виберіть іншу грань або явно використайте фіксовану площину.", "This image is not attached to GitHub yet. Copy or save it, then attach it on GitHub.": "Це зображення ще не додано до GitHub. Скопіюйте або збережіть його, а потім додайте на GitHub.", + "Thread depth": "Thread depth", + "Thread diameter": "Thread diameter", "To": "До", "To Offset": "До зсуву", "To edges": "Кінцеві ребра", + "Toe radius": "Toe radius", "Tolerance": "Допуск", "Too close": "Занадто близько", "Tool Bodies": "Тіла інструмента", "Tools": "Інструменти", "Tools, clockwise from the top": "Інструменти за годинниковою стрілкою згори", + "Top Left": "Верхній лівий", + "Top Middle": "Верхній по центру", + "Top Right": "Верхній правий", "Trimming tool (plane, face or curves)": "Інструмент обрізання (площина, грань або криві)", "Turn off section analysis before exporting the view.": "Вимкніть аналіз перерізу перед експортом виду.", "Type": "Тип", @@ -525,6 +599,7 @@ "Wall": "Стінка", "Wall Location": "Розташування стінки", "Wall Thickness": "Товщина стінки", + "Web thickness": "Web thickness", "What did you do just before the problem? A short list is enough": "Що ви робили безпосередньо перед проблемою? Короткого переліку достатньо", "What did you expect to see?": "Що ви очікували побачити?", "What happened?": "Що сталося?", @@ -546,8 +621,13 @@ "Z angle": "Кут Z", "Z distance": "Відстань Z", "Zebra": "Зебра", + "ai.connected_toast": "SolidCraft is now available in {clients}. Restart them to use it (Settings > Assistant).", + "ai.prefs.allow_control": "Let AI agents connect (control channel / MCP)", + "ai.prefs.allow_control_note": "Opens a control channel on this computer only (127.0.0.1, port 27878 or the next free one). A program that connects must also show a secret token that only your user account can read, made fresh at every start. Takes effect the next time SolidCraft starts. Off: nothing listens unless you start SolidCraft with --control.", "ai.prefs.availability": "Керування асистентом", "ai.prefs.background_commands": "Виконувати команди агента у фоновому режимі", + "ai.prefs.connect_apps": "Make SolidCraft available to AI apps on this computer", + "ai.prefs.connect_apps_note": "When SolidCraft starts, adds it as an MCP server to the AI apps found on this computer (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), so an agent can use it without any setup. Only the solidcraft entry is added or its path refreshed; an entry you changed is left alone, and the file is backed up first. Off: the entries it added are removed. Help > Connect AI assistants… does this by hand.", "ai.prefs.follow_camera": "Повертати камеру до ескізів", "ai.prefs.follow_camera_off": "Автоматичне стеження камери вимкнено.", "ai.prefs.follow_camera_on": "Камера повертається до ескізів, які створює агент.", @@ -601,6 +681,8 @@ "cmd.appearance_list": "Список виглядів", "cmd.assembly_bom": "Специфікація матеріалів", "cmd.body_rename": "Перейменувати тіло", + "cmd.browser_collapse_all": "Collapse All", + "cmd.browser_expand_all": "Expand All", "cmd.browser_group": "Нова група", "cmd.browser_move": "Перемістити елементи браузера", "cmd.browser_order": "Упорядкувати елементи браузера", @@ -616,8 +698,12 @@ "cmd.component_activate": "Активувати компонент", "cmd.component_break_link": "Розірвати зв'язок", "cmd.component_capture_position": "Зафіксувати положення", + "cmd.component_copies": "Find Identical Copies", + "cmd.component_copy_bodies": "Paste Bodies", "cmd.component_create": "Новий компонент", + "cmd.component_cycle_color": "Cycle Component Color", "cmd.component_delete": "Видалити компонент", + "cmd.component_extract": "Extract to File", "cmd.component_from_bodies": "Створити компоненти з тіл", "cmd.component_insert_design": "Вставити проєкт", "cmd.component_links": "Список зв'язків", @@ -630,6 +716,7 @@ "cmd.component_properties": "Фізичні властивості компонента", "cmd.component_relink": "Переприв'язати джерело", "cmd.component_rename": "Перейменувати компонент", + "cmd.component_replace_with_link": "Replace with Link", "cmd.component_revert_position": "Відновити положення", "cmd.component_unlock": "Розблокувати вміст", "cmd.component_update_links": "Оновити зв'язки", @@ -676,6 +763,7 @@ "cmd.document_metadata": "Властивості проєкту", "cmd.document_metadata_remove": "Видалити властивість проєкту", "cmd.document_metadata_set": "Змінити властивості проєкту", + "cmd.document_revision": "Design Revision", "cmd.document_units": "Змінити одиниці проєкту", "cmd.edit_checkpoint": "Контрольна точка", "cmd.edit_restore_checkpoint": "Відновити контрольну точку", @@ -692,6 +780,7 @@ "cmd.file_insert_step": "Вставити STEP", "cmd.file_open_in_easyprint": "Відкрити в EasyPrint", "cmd.file_save_mesh": "Зберегти як сітку", + "cmd.file_send_to_slicer": "Send to Slicer", "cmd.file_slicers": "Встановлені слайсери", "cmd.frame_member": "Елемент рами", "cmd.frame_profile_insert": "Вставити профіль", @@ -700,6 +789,8 @@ "cmd.inspect_accessibility": "Аналіз доступності", "cmd.inspect_center_of_mass": "Центр мас", "cmd.inspect_clearance": "Зазор", + "cmd.inspect_colored_components": "Enable Component Colors", + "cmd.inspect_colored_components_disable": "Disable Component Colors", "cmd.inspect_compare": "Порівняти тіла", "cmd.inspect_continuity": "Аналіз неперервності", "cmd.inspect_curvature_comb": "Аналіз гребеня кривизни", @@ -709,6 +800,7 @@ "cmd.inspect_interference": "Перевірка перетинів", "cmd.inspect_isocurve": "Аналіз ізокривих", "cmd.inspect_minimum_radius": "Аналіз мінімального радіуса", + "cmd.inspect_parameter_sweep": "Parameter Sweep", "cmd.inspect_silhouette": "Силует", "cmd.inspect_zebra": "Зебра-аналіз", "cmd.joint_as_built": "З'єднання за поточним положенням", @@ -753,11 +845,14 @@ "cmd.motion_plot": "Графік дослідження руху", "cmd.motion_study": "Дослідження руху", "cmd.motion_trace": "Траєкторія руху", + "cmd.motion_trace_edit": "Edit Motion Trace", "cmd.motion_trace_keep": "Зберегти траєкторію руху", "cmd.occurrence_copy": "Вставити (екземпляр)", + "cmd.occurrence_drag": "Drag Occurrence", "cmd.occurrence_ground": "Закріпити", "cmd.occurrence_move": "Перемістити екземпляр", "cmd.occurrence_properties": "Фізичні властивості екземпляра", + "cmd.occurrence_reparent": "Move to Component", "cmd.parameters_add": "Додати користувацький параметр", "cmd.parameters_change": "Змінити параметри", "cmd.parameters_comment": "Коментувати параметр", @@ -782,14 +877,45 @@ "cmd.plastic_rest": "Упор", "cmd.plastic_rules": "Список правил пластику", "cmd.plastic_snap_fit": "Клацкове з'єднання", + "cmd.render_aging_describe": "Layered Surface Aging", "cmd.render_backends": "Рендер-бекенди", + "cmd.render_camera_fit": "Frame Render Subject", + "cmd.render_camera_get": "Inspect Render Camera", "cmd.render_cancel": "Скасувати рендеринг", + "cmd.render_effects_describe": "Lens and Creative Effects", "cmd.render_export": "Експортувати зображення рендерингу", + "cmd.render_hdr_inspect": "Inspect HDR Source", + "cmd.render_library_appearance_apply": "Apply Library Opaque Appearance", + "cmd.render_library_describe": "Inspect Render Library Resource", + "cmd.render_library_environment_apply": "Apply Built-in HDR Environment", + "cmd.render_library_list": "Browse Render Library", + "cmd.render_library_physical_prepare": "Prepare Physical Reference", + "cmd.render_library_preview": "Inspect Original Surface Map", + "cmd.render_library_studio_apply": "Apply Authored Studio Lights", + "cmd.render_library_studio_prepare": "Prepare Authored Studio Lights", + "cmd.render_library_surface_bind": "Save Surface Binding", + "cmd.render_library_surface_prepare": "Prepare Authored Surface Maps", + "cmd.render_library_surface_unbind": "Remove Surface Binding", + "cmd.render_library_targets": "Find Render Library Targets", + "cmd.render_optics_bind": "Save Optical Binding", + "cmd.render_optics_unbind": "Remove Optical Binding", "cmd.render_preflight": "Перевірити запит на рендеринг", + "cmd.render_preset_apply": "Apply Native Studio", + "cmd.render_preset_resolve": "Review Native Studio", + "cmd.render_quality_prepare": "Review Fixed Sampling Budget", + "cmd.render_result_pin": "Retain Displayed Render Result", + "cmd.render_result_regrade": "Regrade Linear Master", "cmd.render_scene": "Переглянути сцену рендерингу", "cmd.render_settings_apply": "Застосувати камеру рендерингу", + "cmd.render_settings_capture_hdr": "Save Render Settings with HDR", "cmd.render_settings_get": "Налаштування рендерингу", "cmd.render_settings_set": "Зберегти налаштування рендерингу", + "cmd.render_shot_duplicate": "Duplicate Render Shot", + "cmd.render_shot_remove": "Remove Render Shot", + "cmd.render_shot_rename": "Rename Render Shot", + "cmd.render_stage_backdrop": "Save Physical Render Background", + "cmd.render_stage_clear": "Remove Render Stage", + "cmd.render_stage_ground": "Save Render Ground", "cmd.render_start": "Рендеринг зображення", "cmd.render_status": "Перебіг рендерингу", "cmd.select_clear": "Зняти виділення", @@ -801,10 +927,12 @@ "cmd.sheet_fold": "Зігнути", "cmd.sheet_hem": "Загин", "cmd.sheet_manage_rules": "Правила листового металу", + "cmd.sheet_path_flange": "Path Flange", "cmd.sheet_perforate": "Перфорація", "cmd.sheet_refold": "Зігнути назад", "cmd.sheet_rules": "Список правил листового металу", "cmd.sheet_unfold": "Розгорнути", + "cmd.sketch_arc3d": "3D Arc", "cmd.sketch_arc_center_point": "Дуга за центром", "cmd.sketch_arc_tangent": "Дотична дуга", "cmd.sketch_arc_three_point": "Дуга за трьома точками", @@ -812,6 +940,7 @@ "cmd.sketch_auto_constrain_from_datum": "Автообмеження від базової геометрії", "cmd.sketch_auto_project": "Автопроєкція ребер на опору", "cmd.sketch_blend_curve": "Сполучна крива", + "cmd.sketch_cancel": "Cancel Sketch", "cmd.sketch_chain": "Ланцюг", "cmd.sketch_chamfer_distance_angle": "Фаска за відстанню та кутом", "cmd.sketch_chamfer_equal_distance": "Фаска з рівними відстанями", @@ -832,6 +961,7 @@ "cmd.sketch_drag": "Перетягнути геометрію ескізу", "cmd.sketch_drag_end": "Завершити перетягування", "cmd.sketch_draw_dimensioned": "Накреслити елементи ескізу з розмірами", + "cmd.sketch_drawing_bounds": "Drawing Size", "cmd.sketch_edit": "Редагувати ескіз", "cmd.sketch_edit_text": "Редагувати текст", "cmd.sketch_export_dxf": "Зберегти як DXF", @@ -878,6 +1008,7 @@ "cmd.sketch_spline_fit_point": "Сплайн за точками проходження", "cmd.sketch_spun_profile": "Профіль обертання", "cmd.sketch_toggle_driven": "Перемкнути ведений розмір", + "cmd.sketch_transform": "Transform", "cmd.sketch_trim_path": "Обрізати вздовж шляху", "cmd.solid_align": "Вирівняти", "cmd.solid_boundary_fill": "Заповнення за межами", @@ -923,13 +1054,28 @@ "cmd.timeline_suppress": "Придушити операцію", "cmd.view_ambient_occlusion": "Окружне затінення", "cmd.view_apply": "Відновити іменований вид", + "cmd.view_back": "Back View", + "cmd.view_bottom": "Bottom View", "cmd.view_delete": "Видалити іменований вид", + "cmd.view_fit": "Fit", + "cmd.view_front": "Front View", "cmd.view_graphics_preset": "Набір графіки", + "cmd.view_grid": "Grid", + "cmd.view_ground_shadow": "Ground shadow", + "cmd.view_home": "Home view", + "cmd.view_isometric": "Isometric View", + "cmd.view_left": "Left View", "cmd.view_list": "Список іменованих видів", "cmd.view_navigate": "Навігація видом", + "cmd.view_navigation_bar": "Navigation bar", "cmd.view_normal_to": "Перпендикулярно до виділення", "cmd.view_rename": "Перейменувати іменований вид", + "cmd.view_right": "Right View", "cmd.view_save": "Новий іменований вид", + "cmd.view_spin": "Continuous orbit", + "cmd.view_tool": "Navigation tool", + "cmd.view_top": "Top View", + "cmd.view_visual_style": "Visual style", "color.copy": "Клацніть, щоб скопіювати значення кольору", "color.edit": "Клацніть, щоб змінити колір", "color.gamma": "Значення кольору в гамма-просторі 0-255", @@ -970,6 +1116,7 @@ "crash.report": "Повідомити…", "crash.unclean_explanation": "Виявлено під час наступного запуску; точний час завершення не записано. Вимкнення системи або примусова зупинка також можуть спричинити некоректне завершення.", "delete.and_more": "… і ще {count}", + "diagnostic.empty_boolean_component": "there is no body to cut or intersect in component '{component}'; the tool may overlap '{body}' in component '{other}' — activate that component or pick the body as a target", "dialog.bodies_count": "Тіл: {count}", "dialog.clearance_invalid": "зазор має бути довжиною 0 або більше", "dialog.compute": "Обчислити", @@ -985,7 +1132,18 @@ "dialog.selection_guidance": "Виберіть вхідні дані, щоб змінити їх. Клацніть вибрані об'єкти, щоб прибрати їх; натискання з Ctrl/Cmd також перемикає їх. Перегляньте попередній перегляд, а потім натисніть OK.", "dialog.selection_step": "Крок {step} з {total}: виберіть {input}", "dialog.step": "Крок", + "document.changed_on_disk": "{name} changed on disk", + "document.changed_on_disk_detail": "{name} was changed by another program or computer since you opened or last saved it. Overwrite replaces those changes with yours; Save a Copy keeps both.", + "document.copy_name": "{name} copy", + "document.open_anyway": "Open Anyway", + "document.open_elsewhere": "{name} is already open", + "document.open_elsewhere_detail": "{name} is open in SolidCraft {app} on {who}, opened {when}. If you both save, one of you loses work. Open it read-only to look at it without saving over it.", + "document.open_read_only": "Open Read-Only", + "document.opened_read_only": "Opened read-only: Save asks for a new file", + "document.overwrite": "Overwrite", + "document.read_only_save": "This design was opened read-only: save it as a new file", "document.save_changes": "Зберегти зміни в {name}?", + "document.save_copy": "Save a Copy…", "document.unsaved_changes": "У {name} є незбережені зміни. Якщо не зберегти, вони будуть втрачені.", "drive.stopped_by_contact": "Зупинка на {value}: {a} пройшло б крізь {b}", "drive.stopped_by_loop": "Зупинка на {value}: контур через {joint} далі не замикається", @@ -1002,9 +1160,11 @@ "dxf.progress.write": "Запис DXF (5/5)", "dxf.tolerance": "Допуск кривої", "dxf.tolerance_help": "Лише видимі тіла та показані ескізи. Криві подаються відрізками. Менший допуск дає точніші криві, але потребує більше часу й пам'яті.", + "file.open.drawing_filter": "Designs, CAD files, meshes and drawings", "file_load.built": "Побудовано: {built} із {total} елементів.", "file_load.converting": "Перетворення тіла {done} із {total}", "file_load.inserting": "Вставлення геометрії", + "file_load.link_item": "{name} ({done} of {total})", "file_load.opening": "Відкриття проєкту", "file_load.preparing_thumbnail": "Підготовка мініатюри...", "file_load.preparing_view": "Підготовка виду...", @@ -1014,24 +1174,54 @@ "file_load.rebuilding": "Перебудова елемента {done} із {total}", "file_load.recovering": "Відновлення проєкту", "file_load.stopping": "Очікування зупинки попередньої операції...", + "file_load.updating_links": "Updating links", "file_load.waiting": "Очікування файлової операції", "fits the face, e.g. M8": "відповідає грані, напр. M8", + "from the profile": "from the profile", "from the rule": "з правила", "help.apache": "Ліцензія Apache 2.0", "help.attributions": "Відомості про авторство (ATTRIBUTION.md)", "help.build": "Версія {version} · коміт {commit} · зібрано {date}", + "help.connect_note": "Restart each assistant to load the SolidCraft server. Each file was backed up as .bak before it changed.", + "help.connect_title": "Connect AI assistants", "help.font_details": "Інтерфейс використовує вбудовані шрифти egui (Ubuntu Light і Hack під ліцензіями Ubuntu Font Licence та MIT/Bitstream Vera; Noto Emoji та шрифт піктограм емодзі під ліцензіями OFL і MIT). Для тексту ескізів використовується Liberation Sans (SIL OFL 1.1). Необов’язковий пакет шрифтів The Crafting Apps, craft-fonts (BIZ UDPGothic, Shippori Mincho, BIZ UDMincho, Noto Sans CJK SC, Noto Sans Arabic; SIL OFL 1.1), не входить до збірок SolidCraft.", "help.fonts": "Шрифти", "help.licences": "Ліцензії", "help.mit": "Ліцензія MIT", "help.notice": "NOTICE", "help.solid.chamfer": "Зрізає вибрані ребра плоским скосом на заданій відстані. Використовуйте, щоб притупити гострі ребра або полегшити вставляння штифта чи гвинта.", + "help.solid.combine": "Joins bodies, cuts them out of a target body, or keeps only the volume they share, and can keep the tool bodies. Use it to merge parts, to cut one shape with another or to find where two bodies overlap.", "help.solid.extrude": "Витягує профіль ескізу в 3D на задану відстань, додаючи або видаляючи матеріал. Використовуйте, щоб перетворити плоский контур на брусок, бобишку або кишеню.", "help.solid.fillet": "Закруглює вибрані ребра плавним круговим переходом заданого радіуса. Використовуйте, щоб пом'якшити гострі ребра для міцності, зручності чи вигляду.", "help.solid.hole": "Просвердлює круглий отвір заданого діаметра в обраній точці на грані. Використовуйте для отворів під гвинти, штифтів та інших простих круглих отворів.", + "help.solid.loft": "Blends a smooth solid between two or more sketch profiles, or from a profile to a point. Use it for transitions, funnels, handles and any shape that changes section along its length.", + "help.solid.mirror": "Makes a mirrored copy of the selected bodies or features across a plane, and can merge it with the original. Use it for symmetric parts, so that you model one half and get both.", + "help.solid.pattern.circular": "Repeats the selected objects around an axis, for the count and total angle you set. Use it for bolt circles, spokes, fins and teeth.", + "help.solid.pattern.rectangular": "Repeats the selected objects in one or two directions with the count and spacing you set. Use it for rows and grids of holes, ribs, pins or feet.", "help.solid.revolve": "Обертає профіль ескізу навколо осі, утворюючи кругле тіло. Використовуйте для валів, ручок, чаш та будь-яких деталей, круглих навколо осьової лінії.", "help.solid.shell": "Робить тіло порожнистим, залишаючи стінки заданої товщини, і може відкривати вибрані грані. Використовуйте для коробок, кришок та інших тонкостінних деталей.", + "help.solid.sweep": "Drags a sketch profile along a path to make a solid. Use it for pipes, rails, handles and any part of constant section that follows a curve.", "help.third_party": "Ліцензії сторонніх компонентів", + "hole_presets.confirm_delete": "Confirm delete", + "hole_presets.delete": "Delete", + "hole_presets.delete_prompt": "Delete this personal preset? Existing holes are unchanged.", + "hole_presets.full": "The personal library already contains 64 presets.", + "hole_presets.invalid_name": "Enter a short name without line breaks or control characters.", + "hole_presets.invalid_parameters": "Complete the hole parameters using valid expressions of reasonable length.", + "hole_presets.missing": "The selected preset is no longer available.", + "hole_presets.name": "Preset name", + "hole_presets.name_exists": "A preset with this name already exists. Use a different name.", + "hole_presets.name_hint": "A unique name", + "hole_presets.overwrite": "Save changes to selected preset", + "hole_presets.preset": "Preset", + "hole_presets.recall": "Recall", + "hole_presets.rename": "Rename", + "hole_presets.save": "Save new", + "hole_presets.scope": "Saved in your profile for all projects.", + "hole_presets.select": "Select a preset", + "hole_presets.title": "Personal presets", + "hole_presets.unsupported_options": "This preset uses thread options that this version cannot recall.", + "hole_presets.unsupported_overwrite": "This preset contains options that cannot be overwritten safely.", "home.back": "Назад до {name}", "home.crashes": "Звіти про збої", "home.design_workspace": "Проєктування", @@ -1107,6 +1297,8 @@ "joint.from_bodies_hint": "Кожне вибране тіло переходить у власний новий компонент і лишається на місці.", "joint.one_body": "Обидва вибори на {body}. Виберіть другий на іншій деталі.", "joint.one_component": "Ці деталі - тіла одного компонента: {bodies}. З'єднання рухає один компонент відносно іншого, тому кожній деталі потрібен власний компонент.", + "joint.rigid_group_one_component": "These {count} bodies are all in one component (or in the design itself): use {command} first.", + "joint.rigid_group_select_components": "Select two or more components.", "keymap.command_id": "ID команди", "keymap.empty": "Немає відповідних команд", "keymap.use_anyway": "Усе одно використовувати тут {key}", @@ -1117,6 +1309,49 @@ "manage.material_hint": "Виберіть тіла та їхній фізичний матеріал.", "manage.parameters_hint": "Змініть вирази й одиниці. Зміни застосовуються після натискання Enter або виходу з поля.", "manage.rules_hint": "Виберіть правило для редагування або створіть нове. Підтвердьте, щоб зберегти правило.", + "material.editor.add_property": "Add property", + "material.editor.add_source": "Add source", + "material.editor.assigned_density": "Assigned density", + "material.editor.axes": "Material axes", + "material.editor.axes_numeric": "1 / 2 / 3", + "material.editor.axes_wood": "L / R / T", + "material.editor.copy_name": "Copy of {name}", + "material.editor.density_range": "Assigned density must be above 0 and at most 1000 g/cm³.", + "material.editor.designation": "Designation", + "material.editor.duplicate": "Duplicate", + "material.editor.engineering_card": "Engineering property card", + "material.editor.family": "Material family", + "material.editor.glass": "Glass", + "material.editor.illustrative": "Illustrative", + "material.editor.invalid_property": "Unsupported property type.", + "material.editor.isotropic": "Isotropic", + "material.editor.measurement": "Measurement", + "material.editor.metal": "Metal", + "material.editor.moisture": "Moisture, dry basis", + "material.editor.name_required": "Enter a name with 1–128 characters.", + "material.editor.no_draft": "No material draft is open.", + "material.editor.number_required": "Enter a finite numeric value.", + "material.editor.orthotropic": "Orthotropic", + "material.editor.other": "Other", + "material.editor.polymer": "Polymer", + "material.editor.preserved_appearance": "Preserved appearance", + "material.editor.public_reference": "Public reference", + "material.editor.reference": "Reference", + "material.editor.save_or_discard": "Save or discard the material draft before assigning a material.", + "material.editor.saved": "Material saved. Body assignments are unchanged.", + "material.editor.scope": "Save stores this material without assigning it to bodies. Blank properties and conditions remain unknown. Card density does not change assigned density or mass.", + "material.editor.source_id": "Source ID", + "material.editor.source_kind": "Source type", + "material.editor.source_title": "Source title", + "material.editor.sources": "Sources", + "material.editor.stale": "This material changed while the draft was open. Discard and reopen it before saving.", + "material.editor.state": "Material state", + "material.editor.strain_rate": "Strain rate", + "material.editor.symmetry": "Elastic symmetry", + "material.editor.temperature": "Temperature", + "material.editor.unknown_card": "Engineering properties are unknown. Save may keep only the assigned density and existing appearance.", + "material.editor.user_supplied": "User supplied", + "material.editor.wood": "Wood", "measure.at": "У точці", "measure.item": "Елемент {number}", "messages.ago_h": "{n} год тому", @@ -1145,9 +1380,11 @@ "nav.blender.help": "Середня обертає, Shift+середня панорамує, Ctrl+середня масштабує; права не рухає камеру", "nav.free_orbit.help": "Миша та 3D-миша обертають через обидва полюси й зберігають крен. Прив'язування до осей через Shift вимкнено.", "nav.free_orbit.label": "Вільне обертання", + "nav.free_orbit.snap_help": "Mouse and 3D mouse rotate through both poles and preserve roll. Hold Shift during an orbit drag to snap the view direction and roll.", "nav.fusion.help": "Середня панорамує, Shift+середня обертає, права обертає", "nav.inventor.help": "Середня панорамує, Shift+середня обертає, Ctrl+середня масштабує, права обертає", "nav.openscad.help": "Ліва обертає по порожньому місцю, Shift+ліва виділяє рамкою, геометрію ескізу перетягують для редагування; права або середня панорамує, Shift+права або Shift+середня масштабує", + "nav.perspective.sketch": "Sketch editing uses orthographic view. Finish the sketch to switch perspective.", "nav.solidworks.help": "Середня обертає, Ctrl+середня панорамує, Shift+середня масштабує, права обертає", "nav.tinkercad.help": "Права обертає, середня або Shift+права панорамує", "nav.touchpad.help": "Утримуйте Shift і рухайте вказівник, щоб панорамувати; утримуйте Alt/Option і рухайте, щоб обертати. Кнопка миші не потрібна. Вертикальна прокрутка масштабує.", @@ -1157,6 +1394,10 @@ "nav.touchpad.scroll": "Трекпад використовує вертикальну прокрутку для масштабування. Ваше налаштування панорамування двома пальцями зберігається для інших наборів.", "nav.touchpad.zoom": "Масштаб (вертикальна прокрутка або стискання)", "needs two joints": "потрібні два з'єднання", + "network.allow_once": "Allow once", + "network.always_allow": "Always allow this server", + "network.prompt_detail": "This design links to a file on network location {host}. Opening it connects to that computer and may send your Windows sign-in to it. Only allow servers you trust.", + "network.prompt_title": "Network location", "new configuration": "нова конфігурація", "new parameter": "новий параметр", "no hole": "без отвору", @@ -1170,10 +1411,22 @@ "pattern.direction_1": "Напрямок 1", "pattern.direction_2": "Напрямок 2", "pattern.flip_direction": "Змінити напрямок", + "perf.click_for_details": "Click for details: frame-time graph, histogram and what the GPU drew", + "perf.draw_calls": "Draw calls", + "perf.line_segments": "Line segments", + "perf.low_1": "1% low", + "perf.renderer": "Renderer", + "perf.scene_build": "Scene build", + "perf.triangles": "Triangles", + "perf.ui_time": "UI time", + "perf.viewport": "Viewport", + "perf.worst": "worst", "pick a hole to seat it, or OK places it at the origin": "виберіть отвір для посадки, або OK розмістить його в початку координат", "pick one or two vertices, edges or faces": "виберіть одну-дві вершини, ребра або грані", + "pick the path": "pick the path", "prefs.add_item": "Додати елемент", "prefs.alt_frees_manipulators": "Alt / Option також дає вільне перетягування стрілок маніпулятора", + "prefs.anti_aliasing_amd_dx12": "Anti-aliasing uses 1× because the startup check drew nothing with multisampling and passed at 1×. You can choose another setting above; restart to apply it if the check passes.", "prefs.anti_aliasing_note": "Згладжує нерівні краї.", "prefs.applies_on_restart": "Застосовується після перезапуску", "prefs.assistant": "Асистент", @@ -1202,6 +1455,7 @@ "prefs.design": "Типові параметри проєкту", "prefs.design_note": "З чого починаються нові проєкти. Відкриті проєкти зберігають власні параметри.", "prefs.devices": "3D-миша", + "prefs.dialog_buttons": "Dialog buttons", "prefs.display": "Відображення", "prefs.edges": "Ребра та затінення", "prefs.extend": "Розширення", @@ -1217,9 +1471,17 @@ "prefs.gesture_pan": "Панорамування", "prefs.gesture_zoom": "Масштаб", "prefs.graphics": "Графіка", + "prefs.graphics_card": "Graphics card", + "prefs.graphics_card_auto": "Automatic", + "prefs.graphics_card_missing": "The saved graphics card is unavailable; Automatic is used.", + "prefs.graphics_card_restart": "Takes effect after restarting SolidCraft. WGPU_ADAPTER_NAME overrides this choice.", "prefs.graphics_note": "Обміняйте швидкість на плавність. Кожен варіант показує свій ефект на зразку.", "prefs.graphics_presets_note": "Набори задають наведені нижче параметри разом.", "prefs.history": "Історія", + "prefs.history_sketches": "Sketches", + "prefs.history_sketches_in_order": "In order", + "prefs.history_sketches_note": "With Sketches set to Under their feature, the History at the left lists each sketch one level in, under the first feature built from it, whenever it is wide enough for names. The timeline at the bottom always keeps the creation order.", + "prefs.history_sketches_under_feature": "Under their feature", "prefs.hold_stop_snapping": "Утримуйте, щоб вимкнути прив'язування", "prefs.icons_only": "Лише піктограми", "prefs.imported_file": "Імпортований файл", @@ -1242,12 +1504,18 @@ "prefs.mouse_mapping": "Призначення кнопок миші", "prefs.navigation": "Навігація", "prefs.navigation_note": "Як миша, трекпад і 3D-миша рухають вид.", + "prefs.network_host_remove": "Remove", + "prefs.network_locations": "Allow network locations in designs", + "prefs.network_locations_note": "Off: a design's linked files on another computer (\\\\server\\share) are opened only from the servers listed here, or after you allow one when asked.", + "prefs.network_locations_section": "Network locations", "prefs.not_on_gpu": "не на цьому GPU", "prefs.on": "Увімкнено", "prefs.opaque": "Непрозорий", "prefs.orbit_snap": "Утримуйте Shift під час обертання, щоб прив'язатися до осі.", "prefs.orientation": "Орієнтація", "prefs.overall_speed": "Загальна швидкість", + "prefs.placement": "Placement", + "prefs.prefer_free_sketch_points": "Prefer movable sketch points when points overlap", "prefs.preview_choices": "Перегляд ваших виборів", "prefs.quality_default": "типово", "prefs.quality_fastest": "найшвидше", @@ -1265,6 +1533,11 @@ "prefs.shift_add_ctrl_toggle": "Shift лише додає; Ctrl / Cmd перемикає", "prefs.shift_add_note": "Увімкнено: Shift додає, Ctrl / Cmd перемикає. Вимкнено (типово): обидва перемикають.", "prefs.shortcuts": "Комбінації клавіш", + "prefs.sketch_exit_view": "When a sketch ends", + "prefs.sketch_exit_view.keep": "Keep the current view", + "prefs.sketch_exit_view.previous": "Return to the previous view", + "prefs.sketch_exit_view.unless_rotated": "Return unless rotated", + "prefs.sketch_exit_view_note": "Where the view goes after Finish Sketch, Cancel or a double Esc.", "prefs.sketch_selection": "Ескіз і вибір", "prefs.sketch_selection_heading": "Ескіз і вибір", "prefs.sketch_selection_note": "Як ескізи прив'язуються й як клацання вибирають.", @@ -1285,12 +1558,15 @@ "prefs.timeline_quarter_hour": "−15", "prefs.toggle_item": "Додати або прибрати елемент", "prefs.toolbar": "Панель інструментів", + "prefs.top": "Top", "prefs.translucent": "Напівпрозорий", "prefs.under_browser": "Під браузером", "prefs.under_cursor": "Під курсором", "prefs.units_precision": "Одиниці й точність", "prefs.updates": "Оновлення", "prefs.view": "Поведінка виду", + "prefs.view_confirm_corner": "OK and Cancel in the view's corner", + "prefs.view_confirm_corner_note": "While a dialog or a sketch is open, a check and a cross at the top right of the view do what the dialog's OK and Cancel do, or finish and cancel the sketch. The view navigator moves down below them.", "prefs.viewport": "Вікно перегляду", "prefs.wheel": "Колесо", "prefs.wheel_trackpad": "Колесо й трекпад", @@ -1303,21 +1579,248 @@ "recovery.just_now": "щойно", "recovery.min_ago": "{count} хв тому", "recovery.never_saved": "ніколи не зберігалося", + "render.adaptive_absolute": "Absolute RGB error floor", + "render.adaptive_coverage": "Coverage error target", + "render.adaptive_enable": "Allocate samples with independent pilots", + "render.adaptive_help": "GPU only. Independent pilot samples are discarded, then allocate 16 or more production samples per pixel up to Samples per pixel. RGB and coverage variance guide allocation; rare paths may be missed and capped pixels may remain noisy. The final report counts actual work. No certified noise or time guarantee.", + "render.adaptive_minimum": "Minimum production samples", + "render.adaptive_pending": "GPU independent-pilot adaptive allocation and conditional Fresnel strata are available. Certified convergence, rare-event guarantees and CPU adaptive transport remain unavailable.", + "render.adaptive_pilots": "Pilot samples per pixel", + "render.adaptive_relative": "Relative RGB error target", + "render.add_ground": "Add fitted ground to setup", + "render.advanced_material_scope": "One finite homogeneous GPU medium is available under explicit limits. Density grids, nested glass/volume combinations, subsurface surfaces, displacement, spectral transport and unbound advanced material concepts remain unavailable.", + "render.aging_add": "Add aging layer", + "render.aging_airborne": "Airborne dust / participating medium", + "render.aging_airborne_help": "Airborne dust is a separate finite homogeneous scattering volume. It changes transport and raw EXR, not the surface-aging stack. Existing volume/glass/denoising restrictions remain explicit; no atmosphere is added automatically.", + "render.aging_all_bodies": "All eligible opaque bodies", + "render.aging_chips": "Chipped paint", + "render.aging_class_any": "All opaque material classes", + "render.aging_class_dielectric": "Nonmetallic surfaces only", + "render.aging_class_metal": "Metallic surfaces only", + "render.aging_color": "Layer colour · sRGB", + "render.aging_coverage": "Coverage", + "render.aging_dust": "Deposited dust", + "render.aging_empty": "No aging layers: the original surfaces remain unchanged.", + "render.aging_fading": "Faded coating", + "render.aging_grime": "Grime & staining", + "render.aging_help": "Combine up to eight optical layers, in order. Rust and patina are authored appearances, not age/corrosion simulations. Scale is in world millimetres. No geometry, mass or engineering property is changed; glass and passive stages are excluded.", + "render.aging_metallic": "Layer metallic fraction", + "render.aging_origin": "Field origin · world mm", + "render.aging_patina": "Copper-green patina", + "render.aging_refresh_targets": "Inspect current bodies", + "render.aging_roughness": "Layer roughness", + "render.aging_rust": "Oxidized iron / rust", + "render.aging_scale": "Pattern scale", + "render.aging_scratches": "Fine scratches", + "render.aging_target": "Target & coordinates", + "render.aging_target_help": "A named target must still match its captured index and name. Global masks are world-anchored; they do not follow moving parts. This is neither cavity detection nor true edge wear. Filter the list to reach additional bodies.", + "render.aging_target_search": "Filter body names", + "render.aging_upward": "Upward-facing deposition", + "render.all_controls_help": "Dense inspection of all current controls. Section pages provide focused editing without changing the underlying request.", + "render.appearance_physics_separate": "Visual appearance does not assign density, thermal data or other engineering properties.", + "render.availability_native": "Native composition; review before applying", + "render.availability_projection": "Supported projection; see scope and omissions", + "render.availability_reference": "Reference data; not an automatic assignment", + "render.backdrop_alpha_conflict": "Choose this backdrop or transparent PNG output; the renderer will not silently ignore either setting.", + "render.backdrop_enable": "Use camera-only gradient backdrop", + "render.backdrop_first": "Start / center color", + "render.backdrop_help": "This screen-space backdrop does not illuminate, cast shadows, reflect or represent terrain. It is excluded from raw EXR. Geometry, lights and the HDR environment stay independent.", + "render.backdrop_horizontal": "Horizontal gradient", + "render.backdrop_radial": "Radial gradient", + "render.backdrop_radius": "Radius", + "render.backdrop_second": "End / edge color", + "render.backdrop_vertical": "Vertical gradient", + "render.backdrop_x": "Center X", + "render.backdrop_y": "Center Y", "render.background": "Фон сцени", + "render.background_camera_section": "Camera background · PNG presentation", + "render.background_completed_frozen": "The displayed result is a frozen completed image. Editing a background does not repaint that result automatically. Use Regrade for camera-only changes, or Render for a new physical stage.", + "render.background_hdr_separate": "The current HDR resources illuminate and reflect on surfaces; they are not automatically displayed as a panorama behind the subject. Changing a gradient does not rotate or recolour the lighting.", + "render.background_lighting_section": "HDR illumination · separate from camera background", + "render.background_no_alpha_override": "A camera background is not added to transparent output silently. Raw-master regrading uses captured coverage and does not reapply denoising; the source EXR remains unchanged.", + "render.background_not_light": "Background color is presentation, not an additional lighting source.", + "render.background_regrade": "Apply to retained raw master", + "render.background_stage_occlusion": "This shot includes physical stage geometry. A large floor or wall can fill the frame and hide a camera-only background. Clear or resize the stage deliberately, or change its physical reflectance. Regrading cannot remove captured geometry.", + "render.background_workflow": "Choose the background you intend: a camera-only colour/gradient, a physical stage that receives light, or HDR illumination. They are independent. Live Preview is a modelling view; render a new image or regrade a retained master to see camera finishing.", + "render.base_appearance": "Editable body appearance", + "render.base_apply": "Apply body appearance", + "render.base_apply_help": "One undoable visual assignment to the reviewed exact body. Existing face-specific looks and engineering materials remain separate.", + "render.base_color": "Base color · sRGB", + "render.base_metallic": "Metallic fraction", + "render.base_opaque_only": "This editor preserves opaque body semantics. Use the explicit glass controls for optical transmission.", + "render.bloom_enable": "Display bloom", + "render.bloom_help": "Creative output-only glow from positive linear highlights, spread with three normalized box passes. Radius is in output pixels. Added in linear display light before sRGB; not a lens, volumetric effect or convergence improvement. The raw EXR is unchanged.", + "render.bloom_opaque": "Bloom requires opaque output. Transparent PNG is refused, not silently flattened.", + "render.bloom_radius": "Bloom radius", + "render.bloom_strength": "Bloom strength", + "render.bloom_threshold": "Linear highlight threshold", + "render.browse_capabilities": "Inspect complete capability catalog", + "render.browse_environments": "Browse original HDR environments", + "render.browse_native_scenes": "Browse native studios", + "render.browse_physical": "Inspect physical references", + "render.browse_quality": "Inspect quality specifications", + "render.browse_rigs": "Browse authored light rigs", + "render.browse_scene_specs": "Browse advanced scene specifications", + "render.browse_surfaces": "Browse authored surfaces", + "render.browser_library": "Library", + "render.browser_model": "Model", + "render.camera_distance": "Eye-to-target distance", + "render.camera_exact_help": "World millimeters; angles are displayed in degrees and saved as radians. Navigation uses the same camera as the viewport.", + "render.camera_fov": "Vertical field of view", + "render.camera_pitch": "Camera pitch", + "render.camera_roll": "Roll", + "render.camera_set": "Set Render Camera", + "render.camera_target": "Target position · mm", + "render.camera_yaw": "Yaw", + "render.chromatic_offset": "Chromatic edge offset", + "render.clear_stage": "Remove saved stage", + "render.copy_request": "Copy JSON", + "render.cpu_aa_help": "Spatial samples: more samples improve edges and increase render time.", + "render.cpu_area_add": "Add rectangular CPU light", + "render.cpu_area_editor": "CPU rectangular lights", + "render.cpu_area_editor_help": "Full side vectors in millimeters; U cross V points towards the emitting side. This differs from GPU half-edge vectors.", + "render.cpu_area_full_u": "Full U side · mm", + "render.cpu_area_full_v": "Full V side · mm", + "render.cpu_area_samples": "Area-light samples", + "render.cpu_binding_confirm": "Confirm this body", + "render.cpu_binding_stale": "The scene changed. Confirm this reflection target again before rendering.", + "render.cpu_body_choose": "Choose a body", + "render.cpu_body_filter": "Filter bodies by name", + "render.cpu_body_filter_more": "Refine the filter to see more bodies.", + "render.cpu_body_missing": "A reflection target is missing, hidden, ambiguous or has a name longer than 128 bytes. Choose it again.", + "render.cpu_budget": "CPU resource profile", + "render.cpu_budget_bodies": "Body ceiling", + "render.cpu_budget_compact": "Compact (legacy limits)", + "render.cpu_budget_details": "Resource limits", + "render.cpu_budget_help": "Choose larger limits explicitly. Resolution and samples are never reduced automatically.", + "render.cpu_budget_memory": "Job memory ceiling", + "render.cpu_budget_not_guarantee": "These are admission ceilings, not a RAM reservation or a speed guarantee. Geometry, film and retained previews share the memory budget; rendering remains cancellable.", + "render.cpu_budget_resize": "The draft exceeds this CPU profile or its camera-sample budget. Accept smaller dimensions explicitly or select a larger profile.", + "render.cpu_budget_studio": "Studio (large images)", + "render.cpu_budget_triangles": "Triangle ceiling", + "render.cpu_budget_workstation": "Workstation (heavy scenes)", + "render.cpu_captured_hdr": "HDR captured for this image", + "render.cpu_check_capture_help": "Check and Start verify the same file digest or use the embedded HDR. Each image keeps its captured source.", + "render.cpu_check_changed": "The controls or model changed after this check. Check again before rendering.", + "render.cpu_constant_help": "Constant radiance is visible to reflected or transmitted rays. It does not provide direct diffuse lighting.", + "render.cpu_custom_directions": "Replace preset with custom directional lights", + "render.cpu_direction": "Direction toward light (X, Y, Z)", + "render.cpu_directional": "Directional light", + "render.cpu_directional_add": "Add directional light", + "render.cpu_environment": "CPU environment", + "render.cpu_environment_background": "The image background stays separate from environment lighting.", + "render.cpu_environment_bounds": "CPU intensity must be 0–64, HDR rotation finite within ±1,000,000 radians, and HDR samples 1, 4, 16 or 64.", + "render.cpu_environment_constant": "Constant secondary-ray environment", + "render.cpu_environment_none": "No CPU environment", + "render.cpu_environment_samples": "HDR lighting samples", + "render.cpu_exposure_help": "CPU exposure must be between −16 and 16 EV. A GPU exposure outside that range is retained until you change it.", + "render.cpu_fixed": "Single image", + "render.cpu_hdr_help": "Radiance .hdr, 2:1 panorama, up to 2048 × 1024 and 16 MiB. CPU requires explicit sRGB/D65 primaries in the file; unspecified primaries and EXR are refused.", + "render.cpu_hdr_reflection_help": "HDR rough reflections require fully metallic body and face surfaces. Check reports unsupported combinations.", + "render.cpu_key_rim": "Key and rim", + "render.cpu_last_check": "Last CPU check", + "render.cpu_light_help": "Up to eight directional lights. An empty custom list turns them off; selecting a preset restores its lights. Colors are linear RGB and intensity is relative, not watts.", + "render.cpu_light_intensity": "Relative intensity (0–64)", + "render.cpu_light_minimum": "Minimum distance for attenuation", + "render.cpu_light_position": "World position (X, Y, Z)", + "render.cpu_light_reference": "Reference distance for intensity", + "render.cpu_light_remove": "Remove light", + "render.cpu_lighting": "Lighting preset", + "render.cpu_lights": "CPU lights", + "render.cpu_linear_color": "Linear color (R, G, B)", + "render.cpu_neutral": "Neutral", + "render.cpu_opaque_required": "CPU ray tracing needs an opaque background. Clear Transparent background to continue.", + "render.cpu_options_pending": "This CPU panel cannot edit emission, surface effects, glass or anisotropy yet. Clear those API options before using it.", + "render.cpu_point": "Point light", + "render.cpu_point_add": "Add point light", + "render.cpu_point_help": "Up to eight point lights, added to the selected directional lighting. Distances are in mm; the minimum must not exceed the reference distance.", + "render.cpu_primary_samples": "Edge samples per pixel", + "render.cpu_progressive": "CPU progressive", + "render.cpu_progressive_help": "Accumulate the existing CPU integrator in passes of one primary sample. Selected reflections require one sample; area lights, dielectrics and anisotropy require Single image.", + "render.cpu_progressive_limits": "At most 1,048,576 pixels and 16,777,216 pixel × sample evaluations. Changing samples never resizes the image automatically.", + "render.cpu_progressive_seed": "CPU sampling seed", + "render.cpu_progressive_spp": "samples per pixel", + "render.cpu_reflection_add": "Add rough reflection", + "render.cpu_reflection_depth": "Reflection depth (1–8)", + "render.cpu_reflection_empty": "No bodies selected: scene reflections are off.", + "render.cpu_reflection_help": "Choose bodies and set Off, Mirror or Rough. Rough uses the assigned surface roughness. More samples and bounces increase time; this is bounded specular transport, not global illumination.", + "render.cpu_reflection_limit": "Up to 64 reflected bodies are supported.", + "render.cpu_reflection_mirror": "Mirror", + "render.cpu_reflection_off": "Off", + "render.cpu_reflection_rough": "Rough", + "render.cpu_reflection_samples": "Reflection samples (1–64)", + "render.cpu_reflections": "CPU reflections", + "render.cpu_runtime_help": "Numeric light and environment settings are saved with the setup. Body reflections and HDR files remain temporary. Existing area-light and spot-cone values are retained.", + "render.cpu_sampling_mode": "CPU sampling mode", + "render.cpu_shadows": "Cast shadows", + "render.cpu_summary": "CPU ray tracing · reflections · HDR · directional and point lights", + "render.cpu_warm_cool": "Warm and cool", + "render.diag_bodies": "Visible bodies", + "render.diag_job_details": "Captured job details", + "render.diag_last_check": "Last preflight", + "render.diag_memory": "Logical admission estimate", + "render.diag_not_implemented": "Explicit capability boundaries", + "render.diag_preflight_details": "Preflight details", + "render.diag_request": "Exact current request", + "render.diag_triangles": "Triangles", + "render.discard_continue": "Discard draft and continue", + "render.draft_confirm_help": "The current render draft has unapplied edits. Save them before switching, discard them explicitly, or keep editing.", + "render.draft_confirm_title": "Preserve edited render settings", + "render.effects_gpu_only": "These effects require GPU path tracing. Changing the page never switches the renderer automatically.", + "render.effects_help": "Combine ordered colour looks and image-space lens effects. Rendering and raw-master regrading use the same saved settings. Raw EXR stays unchanged. These are original artistic controls, not calibrated lens or branded-film emulations.", + "render.effects_reset_lens": "Reset lens effects", + "render.effects_seed": "Pattern seed", + "render.export_display": "Export: display PNG", + "render.export_linear": "Export: raw linear EXR", + "render.exr_pending": "GPU can retain raw linear EXR. Compression, multilayer images and auxiliary render passes remain unavailable.", + "render.film_grain": "Photographic grain", "render.fit": "Вписати виріб", + "render.flare_ghosts": "Ghost rings per source", + "render.flare_halo": "Flare halo", + "render.flare_streak": "Anamorphic-style streak", + "render.flare_strength": "Highlight flare strength", + "render.flare_threshold": "Scene-linear flare threshold", + "render.gpu_depth": "Maximum path depth", + "render.gpu_options_help": "Samples, depth, seed and exposure are saved with this setup. Only the active image method is saved.", + "render.gpu_path_failed": "GPU path tracer unavailable", + "render.gpu_path_first_setup": "The first setup on this GPU can take several minutes; SolidCraft stays usable meanwhile. Later starts reuse the compiled shaders where the driver keeps them.", + "render.gpu_path_preparing": "GPU path tracer: compiling shaders…", + "render.gpu_seed": "Random seed", + "render.gpu_unavailable": "GPU path tracing is not ready on this device.", + "render.ground_apply": "Fit and save ground", + "render.ground_gap": "Explicit clearance gap", + "render.ground_linear_rgb": "Diffuse reflectance · linear RGB", + "render.ground_margin": "Ground extent margin", + "render.hdr_details": "HDR source details", + "render.hdr_embedded": "HDR saved inside this design", + "render.hdr_embedded_help": "Rendering uses the bytes included in the design; the original file is no longer needed.", + "render.hdr_file_captured": "HDR file checked. Save will embed these bytes; if the file changes, check it again explicitly.", + "render.hdr_inspect": "Check HDR file", + "render.hdr_inspect_required": "Select and check an HDR file before saving or rendering.", + "render.hdr_primaries_declared": "The source declares its color primaries.", + "render.hdr_primaries_srgb": "Color primaries: sRGB/D65", + "render.hdr_primaries_undeclared": "The source does not declare primaries; review the renderer color requirements.", + "render.hdr_resource_missing": "This design is missing the saved HDR resource.", + "render.image_advanced": "Advanced GPU controls", "render.image_cancelled": "Рендеринг скасовано", "render.image_cancelling": "Скасування", "render.image_completed": "Зображення готове до експорту", "render.image_encoding": "Кодування PNG", "render.image_export": "Експортувати PNG", + "render.image_exposure": "Exposure", "render.image_failed": "Рендеринг не вдався", "render.image_height": "Висота", "render.image_help": "Попереднє зображення на CPU · PNG · наближена прозорість", + "render.image_host_missing": "No image host is installed.", + "render.image_method": "Image method", "render.image_overwrite": "Замінити наявний файл", "render.image_preparing": "Підготовка зображення", + "render.image_progressive": "Progressive rendering", "render.image_queued": "Очікує рендерингу", "render.image_reduce": "Спробуйте менше зображення або простішу сцену.", "render.image_running": "Рендеринг зображення", + "render.image_samples": "Samples per pixel", + "render.image_scene_stale": "Finish the modelling gesture or refresh the scene before checking or starting an image.", "render.image_stale": "Це зображення використовує сцену, зафіксовану до подальших змін.", "render.image_start": "Почати рендеринг", "render.image_supported": "Запит на рендеринг підтримується; чергу та пул пам'яті буде перевірено ще раз під час запуску.", @@ -1327,20 +1830,347 @@ "render.image_unknown": "Стан рендерингу недоступний", "render.image_use_largest": "Використати найбільший розмір за такого співвідношення сторін:", "render.image_width": "Ширина", + "render.include_rig_cards": "Include passive cards and flags", + "render.inspect_scene": "Refresh captured scene summary", + "render.keep_editing": "Keep editing", + "render.layer_down": "Move down", + "render.layer_enabled": "Layer enabled", + "render.layer_remove": "Remove layer", + "render.layer_strength": "Layer strength", + "render.layer_up": "Move up", + "render.lens_effects_help": "Flare uses up to four separated bright sources in the actual linear image. Ghosts, halo, streaks, chromatic offsets and radial distortion are artistic image-space approximations. Spatial effects need opaque output; outside samples extend the image edge. Grain is deterministic. No physics, EXR or geometry is altered.", + "render.lens_effects_title": "Lens-inspired & photographic", + "render.library_all": "Catalog", + "render.library_all_states": "All availability states", + "render.library_applied": "Resource projection applied. Check the complete render request before starting.", + "render.library_apply_hdr": "Save with this HDR environment", + "render.library_apply_maps": "Use authored GPU surface maps", + "render.library_apply_studio": "Save authored studio projection", + "render.library_apply_uniform": "Apply uniform opaque appearance", + "render.library_authored_help": "Original authored resources are illustrative, not measured engineering data. Each action applies only its stated projection.", + "render.library_blocked": "Blocked / requires calibration", + "render.library_capabilities": "Capability specifications", + "render.library_center": "Rig center", + "render.library_clear_search": "Clear", + "render.library_details": "Specification and provenance", + "render.library_emitters_only_ack": "Use emitters only; omit the documented passive cards", + "render.library_empty": "No matching resources. Try a different query or availability filter.", + "render.library_environment_concepts": "Environment concepts", + "render.library_extent": "Subject extent", + "render.library_favorite": "Add favorite", + "render.library_favorites": "Favorites", + "render.library_hdr": "Built-in HDR environments", + "render.library_hdr_help": "Embeds the original HDR in the saved setup. The authored longitude origin is converted explicitly; no external file is needed after saving.", + "render.library_inspect_only": "Select to inspect; nothing is applied automatically. Favorites and recent history belong to this open document session.", + "render.library_light_concepts": "Lighting concepts", + "render.library_maps_help": "Built-in maps can be saved with pinned sources and local occurrence mapping. Temporary optical overrides remain a separate mode.", + "render.library_material_concepts": "Material concepts", + "render.library_native_scenes": "Native studios", + "render.library_next": "Next page", + "render.library_omitted": "Not included", + "render.library_physical_profiles": "Physical reference profiles", + "render.library_previous": "Previous page", + "render.library_quality_concepts": "Quality specifications", + "render.library_recent": "Recent", + "render.library_replace_environment": "Replace the existing environment explicitly", + "render.library_replace_studio": "Replace saved lighting, environment and stage", + "render.library_results": "Matching resources", + "render.library_rig_help": "Fit once at an explicit center and physical extent. Complete rigs include passive cards; calibration blockers still refuse. Conservative emitter/card clearance is checked before saving.", + "render.library_rigs": "Authored lighting rigs", + "render.library_save_maps": "Save maps to this setup", + "render.library_scene_bounds": "Use captured scene bounds", + "render.library_scenes": "Scene specifications", + "render.library_search": "Search library", + "render.library_select_hint": "Choose a resource in the Library to inspect its supported actions and limitations.", + "render.library_selene": "SELENE opaque appearances", + "render.library_selene_shots": "SELENE shot specifications", + "render.library_short_blocked": "Unavailable", + "render.library_short_native": "Native composition", + "render.library_short_projection": "Supported projection", + "render.library_short_reference": "Reference only", + "render.library_short_specification": "Specification only", + "render.library_source_preview": "Load source-map preview", + "render.library_source_preview_help": "Authored base-color source map. This is not a rendered or measured material preview.", + "render.library_specification_only": "Specification only: not a complete executable preset. Required effects, resources and subject roles still need explicit implementation and binding.", + "render.library_specs": "Specifications only", + "render.library_status": "Availability", + "render.library_surfaces": "Authored PBR surfaces", + "render.library_target": "Target body", + "render.library_title": "Render resource library", + "render.library_unfavorite": "Remove favorite", + "render.library_uniform_ack": "Use the uniform approximation without spatial or advanced effects", + "render.library_usable": "Executable projections", + "render.linear_help": "Keeps a 32-bit float RGBA master before denoising, exposure, tone mapping, filters and backdrop. Linear sRGB/D65; coverage-premultiplied. Additional memory is admitted explicitly. No compression or extra passes.", + "render.linear_retain": "Retain raw linear EXR", + "render.linear_unavailable": "The selected completed frame has no retained EXR. Enable retention before rendering; an older PNG cannot recover raw radiance.", + "render.look_add": "Add colour look", + "render.look_bleach": "Bleach-bypass-inspired", + "render.look_cool": "Cool", + "render.look_cyanotype": "Cyanotype-inspired", + "render.look_faded": "Faded print", + "render.look_mono": "Monochrome", + "render.look_sepia": "Sepia", + "render.look_strength": "Look strength", + "render.look_teal_orange": "Teal / orange", + "render.look_title": "Creative look stack", + "render.look_warm": "Warm", + "render.mapping_scale": "Physical repeat multiplier", + "render.material_absorption": "Absorption R · G · B (per mm)", + "render.material_add": "Add or edit this body", + "render.material_assignments": "Body assignments", + "render.material_binding_enable": "Include this body override", + "render.material_box": "Axis-aligned box", + "render.material_browse": "Choose image…", + "render.material_certification": "Closed glass uses geometric distance. Topology, orientation, overlap and optical boundaries are checked during GPU preparation; Check only admits the request.", + "render.material_choose_body": "Choose a scene body", + "render.material_closed": "Closed solid mesh", + "render.material_coat": "Clear coat over the base material", + "render.material_coat_enable": "Enable clear coat", + "render.material_coat_help": "Illustrative dielectric coating over the existing opaque appearance. Zero weight leaves the base unchanged.", + "render.material_color_map": "Base color image (sRGB)", + "render.material_color_replace": "Base map replaces body color", + "render.material_custom": "Custom illustrative optics", + "render.material_enable": "Use these GPU material overrides", + "render.material_filter": "Filter scene bodies…", + "render.material_filter_help": "Up to 128 matching bodies are shown. Refine the filter for large scenes.", + "render.material_glass": "Glass and optical absorption", + "render.material_glass_enable": "Use physical glass on this body", + "render.material_glass_exclusive": "Glass cannot share a body with clear coat or runtime maps in this renderer.", + "render.material_glass_help": "Original illustrative recipes. Swatches show transmittance, not a rendered preview. Absorption is −ln(linear transmittance) / reference distance; alpha is unchanged.", + "render.material_gpu_required": "These active material overrides require GPU path tracing. Select GPU or disable the overrides before Check or Start.", + "render.material_ior": "Index of refraction (IOR)", + "render.material_limits": "At most 128 body overrides, 32 disjoint glass bodies, 64 coats and 128 texture bindings. Identical maps share storage; actual device and total memory limits still apply.", + "render.material_map_invalid": "Map paths must be bounded local paths; normal strength must be finite and between 0 and 1.", + "render.material_map_required": "Choose a color image or a normal image before using maps.", + "render.material_maps": "Planar color and normal maps", + "render.material_maps_enable": "Enable maps for this opaque body", + "render.material_maps_help": "PNG/JPEG up to 1024×1024; 16 MiB encoded total. U and V are orthogonal world-mm repeat vectors (maximum 128 repeats). Color is sRGB; normal data uses OpenGL +Y. Files are captured at Check/Start.", + "render.material_metallic_map": "Metallic map (linear)", + "render.material_normal_map": "Normal image (OpenGL, +Y)", + "render.material_normal_strength": "Normal strength (0–1)", + "render.material_origin": "Mapping origin X · Y · Z (mm)", + "render.material_refresh": "Refresh scene bodies", + "render.material_refresh_needed": "Scene changed. Refresh the body list before adding a target.", + "render.material_remove": "Remove this assignment", + "render.material_repeat_u": "One U repeat X · Y · Z (mm)", + "render.material_repeat_v": "One V repeat X · Y · Z (mm)", + "render.material_revalidate": "Revalidate this body", + "render.material_revalidate_needed": "This assignment belongs to an earlier scene revision. Revalidate its exact body identity before rendering.", + "render.material_roughness": "Coat roughness (0.045–1)", + "render.material_roughness_map": "Roughness map (linear)", + "render.material_shadow": "Transmit straight shadow rays", + "render.material_target_missing": "The body ordinal and name no longer match. Remove this assignment and explicitly choose the intended body again.", + "render.material_thickness": "Thin-sheet thickness (mm)", + "render.material_thin": "Thin sheet", + "render.material_title": "GPU image materials", + "render.material_transient": "Temporary optical overrides for this document tab. They are not saved in the design, render setup or material library.", + "render.material_v_up": "Texture V points upward in the image", + "render.material_weight": "Coat weight (0–1)", + "render.method_cpu": "CPU ray tracing", + "render.method_gpu": "GPU path tracing", + "render.method_limit_raster": "Raster uses the fixed opaque studio preview. Select an explicit raytracing method for supported optical controls.", + "render.method_raster": "CPU raster", "render.navigation_help": "Камера рухається так само, як у режимі проєктування (Налаштування › Навігація). «Зберегти налаштування» фіксує поточну камеру.", + "render.nested_enable": "Certified nested dielectrics", + "render.nested_help": "Up to 16 containing layers; every parent must be convex and every child strictly inside it. Intersections, touching surfaces, thin sheets and straight-shadow transmission refuse. Camera-inside state follows the certified hierarchy. Does not create a liquid surface or merge touching CAD boundaries.", "render.opaque_image_summary": "Попередній PNG · непрозорий PBR · змішана прозорість", "render.opaque_preview_help": "Непрозорий PBR і прості кольори; змішана прозорість. Заломлення, HDRI та фінальний рендеринг поки недоступні.", + "render.optics_remove": "Remove saved optics", + "render.optics_replace": "Replace this target’s saved optics explicitly", + "render.optics_save": "Save these optics to the setup", + "render.optics_saved": "Saved optical targets", + "render.optics_saved_help": "Exact definition, feature and occurrence identity survives offline reopen. Missing/replaced/hidden targets refuse; engineering materials are unchanged. Save or discard numeric edits before removing a saved target.", + "render.output_format_status": "PNG is the exact completed display image. Optional GPU EXR retains raw scene-linear FLOAT32 radiance before display filters. Export never substitutes the preview cache or a different job.", + "render.output_lock_ratio": "Lock aspect ratio", + "render.output_over_budget": "The requested image exceeds the selected resource envelope. Choose a compatible size or profile explicitly; no automatic downgrade occurs.", + "render.output_ratio_refused": "The linked dimension exceeds this method’s size limit. The previous size is retained; unlock the ratio or choose a smaller value.", + "render.output_swap_orientation": "Swap width and height", + "render.page_aging": "Aging & contamination", + "render.page_all": "All controls", + "render.page_appearance": "Appearance", + "render.page_background": "Backgrounds", + "render.page_camera": "Camera", + "render.page_diagnostics": "Diagnostics", + "render.page_effects": "Lens & finishing effects", + "render.page_environment": "Environment", + "render.page_lighting": "Lighting", + "render.page_output": "Output", + "render.page_scene": "Scene", + "render.passive_stage": "Ground and passive stage", + "render.passive_stage_help": "Finite passive panels belong only to rendered images. They do not add CAD bodies or mass. Placement is fixed after applying; intersecting product bounds refuse. CPU does not provide diffuse bounce lighting.", "render.perspective": "Перспективна камера", + "render.physical_acknowledge": "I understand this partial reference needs grade, condition and source review", + "render.physical_associations": "Physical candidates and roles", + "render.physical_background_help": "Real passive floor and wall, separate from the camera backdrop. Cyclorama uses 24 polygonal strips; it is not an infinite or analytically smooth surface. Replaces the saved stage only with your consent.", + "render.physical_copy_plan": "Copy plan with sources and omissions", + "render.physical_cyclorama": "Fit polygonal cyclorama", + "render.physical_floor_wall": "Fit physical floor and wall", + "render.physical_material_name": "Proposed reference material name", + "render.physical_omissions": "Properties not representable in the native card", + "render.physical_plan_only": "Read-only plan prepared. No material was created or assigned. Keep its extended profile and omissions when reviewing the native card.", + "render.physical_prepare_plan": "Prepare creation plan (does not apply)", + "render.physical_separate": "Appearance is not material identification. These are sourced references, not certified effective properties. Existing mass, engineering materials and optics are unchanged.", + "render.physical_unknown": "No numerical candidate is established. Grade, formulation or construction must be specified; unknown is not zero.", + "render.post_contrast": "Contrast", + "render.post_gain_b": "Blue gain", + "render.post_gain_g": "Green gain", + "render.post_gain_r": "Red gain", + "render.post_help": "Creative presentation only. RGB gains precede tone mapping; contrast, saturation and vignette follow in display-linear light. Start Render creates new transport samples. Regrade uses the selected retained raw master without denoising or new rays.", + "render.post_reset": "Reset presentation filters", + "render.post_saturation": "Saturation", + "render.post_title": "Presentation filters", + "render.post_vignette": "Vignette", "render.preview": "Вбудований попередній перегляд", "render.preview_help": "Растрове затінення та змішана прозорість. Заломлення, HDRI та фінальний рендеринг поки недоступні.", + "render.preview_image_settings_help": "Live Preview keeps fixed studio lighting. Exposure and image lighting apply to the image job when you Check or Start.", + "render.preview_retry": "Retry live preview", + "render.preview_unavailable_help": "The live preview is unavailable. Saved setups and image-job controls remain accessible. Change the scene or explicitly retry; a refused scene is not rebuilt on every frame.", + "render.preview_upload": "Live-preview vertex payload", + "render.preview_upload_help": "Exact preview vertex bytes, not total GPU or process memory. Geometry is not simplified. Image jobs use their own admission and lighting.", + "render.progressive_image_summary": "Preview PNG · PBR and glass · progressive samples", + "render.quality_ack": "Acknowledge the fixed-budget projection and omissions", + "render.quality_apply": "Use this fixed sampling budget", + "render.quality_projection_help": "Q presets include future requirements. This action projects only a supported fixed-sample PNG budget and explicitly omits adaptive stopping, raw linear output and independent transmission limits.", + "render.quality_review": "Review sampling budget", + "render.queue_pending": "There is no automatic production queue or animation renderer in this UI. Completed still images remain separately exportable.", + "render.radial_distortion": "Radial distortion", + "render.regrade_action": "Regrade raw master (no denoising)", + "render.regrade_help": "Creates a separate PNG from the selected completed raw master, using these presentation controls. Does not trace rays, change the captured size/camera/lights, or overwrite the EXR. Denoising is not reapplied: raw masters do not retain its guides. The derivative remains exportable through the same job controls.", "render.reload_settings": "Перезавантажити збережені налаштування", + "render.replace_ground": "Confirm replacement of existing stage", + "render.replace_saved_surface": "Replace an existing saved binding for this target", "render.restore_camera": "Відновити збережену камеру", + "render.result_actual_help": "One image pixel per display pixel.", + "render.result_capture": "Captured revision", + "render.result_current": "The captured model revision is current.", + "render.result_empty": "No completed image yet. Check the settings, then start a render.", + "render.result_fit": "Fit Image", + "render.result_job": "Job", + "render.result_navigation": "Pan and zoom use Navigation preferences. Space + drag pans.", + "render.result_open": "Open the completed image in the main canvas.", + "render.result_preview": "Live Preview", + "render.result_provisional": "Provisional CPU image", + "render.result_provisional_help": "This checkpoint is not exportable. Export keeps the last completed result; cancellation returns to that result.", + "render.result_reduced_display": "Display preview reduced to the viewport device/cache limit. The retained PNG and export keep full resolution; native 100% inspection is unavailable for this reduced view.", + "render.result_retained": "Showing the last completed image; a newer render has not replaced it.", + "render.result_sequence": "Checkpoint", + "render.result_title": "Render Result", "render.return_design": "Повернутися до проєктування", + "render.review_stale": "This review is stale. Resolve or check again before applying.", + "render.ribbon_aging": "Aging", + "render.ribbon_backgrounds": "Backgrounds", + "render.ribbon_check": "Check", + "render.ribbon_check_help": "Validate the exact current draft that Render will submit. No renderer fallback, silent resize or resource replacement.", + "render.ribbon_edit_lights": "Edit Lights", + "render.ribbon_effects": "Effects", + "render.ribbon_environment_help": "HDR illumination, camera-only backgrounds and physical stage surfaces are separate controls with explicit replacement consent.", + "render.ribbon_finish_dialog": "Finish the current file or confirmation dialog first.", + "render.ribbon_frame": "Frame", + "render.ribbon_hdr_library": "HDR Library", + "render.ribbon_job_active": "A render is already running; cancel it explicitly before starting another.", + "render.ribbon_light_rigs": "Light Rigs", + "render.ribbon_lights_help": "Inspect authored rigs or edit supported lights without replacing the current setup until you explicitly apply the change.", + "render.ribbon_materials": "Materials", + "render.ribbon_materials_help": "Open the shared appearance inspector and original surface library. Optical edits never silently change engineering properties.", + "render.ribbon_no_active_job": "There is no active render to cancel.", + "render.ribbon_no_result": "Complete a render before exporting its exact image.", + "render.ribbon_no_saved_camera": "Save a shot before restoring its camera.", + "render.ribbon_saved_camera": "Saved Camera", + "render.ribbon_shots": "Shots", + "render.ribbon_studios": "Studios", + "render.ribbon_studios_help": "Browse implemented studio compositions and review their replacements before applying. Concept-only scenes remain labelled.", + "render.ribbon_surface_maps": "Surface Maps", + "render.sampling_title": "Adaptive and transmission sampling", + "render.save_continue": "Save and continue", "render.save_setup": "Зберегти налаштування", + "render.saved_maps_runtime_conflict": "Saved surface bindings cannot be mixed with temporary optical overrides or an unsaved HDR. Save the HDR or remove the temporary inputs explicitly.", + "render.saved_surface_remove": "Remove saved binding", + "render.saved_surfaces": "Saved surface bindings", + "render.saved_surfaces_help": "Pinned built-in maps follow the selected occurrence in local millimeters. A replaced or missing target is an error, never an automatic reassignment.", + "render.scene_apply": "Apply reviewed studio", + "render.scene_consent": "Confirm lighting, environment, exposure and stage replacement", + "render.scene_preserved_fields": "Camera, sampling, dimensions, optical bindings, CAD geometry and engineering materials are preserved.", + "render.scene_preserves_design": "Compose lighting and a passive stage for the visible subject. Geometry, engineering materials and the camera remain separate.", + "render.scene_replaces": "Replaces", + "render.scene_review": "Resolve and review", + "render.scene_review_help": "Review the complete native composition before applying. Unbound advanced SCENE specifications are not substituted.", + "render.scene_scope_details": "Composition scope", + "render.setup_legacy_environment": "This older setup uses legacy environment rotation or intensity. Those values are retained; convert them explicitly before saving a full image job.", "render.setup_name": "Назва налаштування", + "render.setup_numeric_help": "Save records the active image method and all its numeric settings. Reload or choosing another setup replaces this draft; restore the camera separately.", + "render.setup_offline_help": "You can edit and save this method without its renderer. Check and Start require an available host.", + "render.setup_runtime_unsupported": "This full job cannot be saved yet: it contains maps or scene-body bindings. Remove those temporary inputs before saving a portable setup.", + "render.setup_save_missing": "The saved render configuration could not be found after the command completed.", + "render.sharpening": "Detail sharpening", + "render.shot_duplicate": "Duplicate saved shot", + "render.shot_manager": "Saved shots", + "render.shot_new_name": "New shot name", + "render.shot_remove": "Remove saved shot", + "render.shot_remove_help": "Remove only this saved setup. Source geometry and completed images are preserved; the action can be undone.", + "render.shot_remove_title": "Remove saved shot?", + "render.shot_rename": "Rename saved shot", + "render.shot_saved_only": "Save the current draft first. Duplicate and rename preserve exact saved options and resource references.", + "render.sky_ground": "Ground · linear RGB", + "render.sky_horizon": "Horizon · linear RGB", + "render.sky_zenith": "Zenith · linear RGB", + "render.soft_focus": "Soft focus", + "render.stage_panel_count": "Saved panels", + "render.studio_add_area": "Add area light", + "render.studio_ambient": "Constant environment radiance", + "render.studio_ambient_rgb": "Constant environment radiance (linear RGB)", + "render.studio_aperture": "Aperture radius", + "render.studio_area": "Area light", + "render.studio_area_help": "Up to four one-sided rectangles. Orthogonal half-edges U and V define size; U × V faces the lit side. Coordinates are world-space millimetres.", + "render.studio_center": "Center X, Y, Z (mm)", + "render.studio_denoise": "Reduce noise in the finished image", + "render.studio_denoise_help": "Final edge-aware filter; fine detail can soften. Glass and sharp specular surfaces bypass the filter.", + "render.studio_direction": "Direction toward sun (X, Y, Z)", + "render.studio_environment": "Environment", + "render.studio_environment_bounds": "Environment rotation must be finite within ±1,000,000 radians and intensity between 0 and 100.", + "render.studio_environment_none": "No environment map", + "render.studio_focus": "Axial focus distance", + "render.studio_half_u": "Half-edge U (mm)", + "render.studio_half_v": "Half-edge V (mm)", + "render.studio_hdr": "Radiance HDR file", + "render.studio_hdr_browse": "Choose HDR…", + "render.studio_hdr_help": "Radiance .hdr, 2:1 panorama, up to 2048 × 1024. EXR is unavailable. The color assumption applies only when primaries are unspecified.", + "render.studio_hdr_required": "Choose a local .hdr file.", + "render.studio_hdr_srgb": "Interpret unspecified primaries as linear sRGB", + "render.studio_intensity": "Environment intensity", + "render.studio_lens": "Depth of field", + "render.studio_lens_perspective": "Depth of field requires a perspective camera.", + "render.studio_lighting": "Studio lighting", + "render.studio_lighting_enable": "Use custom studio lighting", + "render.studio_needs_review": "Review method and settings", + "render.studio_radiance": "Linear RGB radiance", + "render.studio_ready": "Ready to check", + "render.studio_remove_area": "Remove area light", + "render.studio_rotation": "Environment rotation", + "render.studio_runtime_help": "Numeric studio settings and checked HDR sources can be saved with the setup. Body optical/material overrides remain temporary and do not change saved appearances.", + "render.studio_saved": "Saved setup / current camera", + "render.studio_sky": "Artistic sky", + "render.studio_sky_help": "Original sky gradient for lighting; not a calibrated atmospheric model.", + "render.studio_sun": "Sun", + "render.studio_sun_radius": "Angular radius", + "render.studio_title": "Render studio", + "render.studio_tone_map": "Tone mapping", + "render.subsurface_enable": "Interior scattering random walk", + "render.subsurface_help": "Closed dielectric only. Scattering and RGB absorption are separate per-mm coefficients. Paths scatter inside actual geometry, then refract or reflect at the boundary. Disable straight shadow transmission, surface denoising and exterior volume; use one Fresnel stratum. Not a diffusion shader, density grid or measured material. Dense media may need more samples and path depth.", + "render.subsurface_rate": "Scattering collision rate", + "render.transmission_scope": "GPU glass supports certified disjoint media. Unrestricted nested media and a noise-free transmission estimator are not provided.", + "render.transmission_strata": "Conditional Fresnel strata", + "render.transmission_strata_help": "1 preserves the original stream. 2 or 4 subpaths stratify the first glass reflection/transmission choice with unchanged Snell and absorption laws. More paths cost more work; this is not denoising, nested-media support or a promise of faster rendering.", "render.unavailable_preview": "Це налаштування вимагає недоступного профілю попереднього перегляду.", "render.unsaved": "Незбережені зміни попереднього перегляду", "render.use_preview": "Використати вбудований попередній перегляд", + "render.volume_albedo": "Scattering albedo · linear RGB", + "render.volume_anisotropy": "Phase mean cosine", + "render.volume_enable": "Enable participating medium", + "render.volume_extinction": "Extinction coefficient", + "render.volume_help": "GPU transport inside one finite box, with Beer attenuation and HG scattering on camera and indirect paths. Uses explicit studio/HDR/sky lighting, including shadow attenuation. Positive phase cosine scatters forward. Glass boundaries and surface denoising must be disabled explicitly. Zero extinction leaves transport unchanged. Not a physical lunar atmosphere, density grid, volume emission, spectral transport or certified material property.", + "render.volume_max": "Maximum bounds · world mm", + "render.volume_min": "Minimum bounds · world mm", + "render.volume_title": "Bounded homogeneous volume", "sample.bracket.about": "Основна полиця з кромковими полицями та загином за правилом 2 mm", "sample.bracket.name": "Кронштейн з листового металу", "sample.enclosure.about": "Оболонковий корпус із буртиком, бобишками під гвинти, упором і клацковим з'єднанням", @@ -1366,16 +2196,25 @@ "search.suggest": "Ви мали на увазі {label}?", "search.try": "Введіть назву команди, елемент цього проєкту або параметр. Щоб виконати команду зі значеннями, введіть її id та об'єкт JSON: {example}", "search.valid": "Дійсне", + "section.off_hint": "No plane picked: OK turns the section off.", + "set by the sketch's lines": "set by the sketch's lines", "settings.display_quality_note": "Дрібніші рівні малюють криві грані й ребра плавнішими, але тріангуляція триває довше. Змінюється лише вікно перегляду, ніколи не проєкт чи експорт.", + "settings.frame_rate_details_note": "Adds a graph of the last frames' times with the triangles drawn over it, a histogram of frame times and what the GPU drew. Click the frame rate in the view to show or hide them.", "settings.frame_rate_note": "Показує кадри за секунду в правому нижньому куті виду.", "settings.measure_axis_distances": "Відстані X/Y/Z", "settings.measure_axis_distances_help": "Показувати розміри вздовж світових осей разом із загальною відстанню, поки відкрите вікно вимірювання.", "settings.msaa_applies_on_restart": "Згладжування застосується під час наступного запуску SolidCraft", "settings.msaa_reset": "{setting}: {requested}× не підтримується цим графічним пристроєм; тепер це {reset}× (підтримується: {supported}).", "settings.msaa_unsupported": "Не підтримується цим графічним пристроєм", + "settings.reference_geometry_through_bodies": "Show reference geometry through bodies", + "settings.reference_geometry_through_bodies_help": "Draw inactive sketch contours and datum planes over shaded bodies", "settings.reset_intro": "Ці налаштування не працюють на цьому комп'ютері й не давали б SolidCraft запуститися, тому їх змінено:", "settings.reset_title": "Налаштування було змінено", "settings.supersampling_note": "Малює вид у вищій роздільності й потім зменшує його: плавніші ребра, лінії та сітка на екранах до 4K. Це коштує часу GPU: приблизно 2,25× пікселів за 1,5× і 4× за 2×.", + "settings.window_system_details": "Details", + "settings.window_system_note_now": "Applies after a restart. Now: {now}.", + "settings.window_system_wayland_limited": "Some features are limited on native Wayland.", + "sheet.no_body": "there is no sheet metal body: start one with Flange > Base, or turn a plate into sheet metal with Convert to Sheet Metal (pick its large flat face)", "shortcut.json_error": "параметри мають бути у форматі JSON: {error}", "shortcut.no_command": "команду `{id}` не знайдено; текст перед JSON має бути ID команди", "shortcut.pin": "Закріпити вгорі поля S", @@ -1391,6 +2230,11 @@ "sketch_panel.author": "Початкове розміщення: {path}", "sketch_panel.dimension_hint": "Введіть значення або вираз, потім натисніть OK.", "sketch_panel.move_hint": "Введіть відстані та кут, потім натисніть OK.", + "sketch_panel.plane_angle": "{plane}, turned by {angle}", + "sketch_panel.plane_fixed": "A fixed plane", + "sketch_panel.plane_flipped": "{plane}, from its other side", + "sketch_panel.plane_offset": "{plane}, offset by {distance}", + "sketch_panel.plane_origin": "The {plane} plane", "sketch_panel.redefine_title": "{command}: {name}", "sketch_panel.sheet_attachment": "Прив’язано до плоскої грані листового тіла; слідує за цією панеллю під час зміни листа.", "sketch_panel.text_hint": "Змініть текст і його розміщення, потім натисніть OK.", @@ -1410,8 +2254,18 @@ "the parts library is not available": "бібліотека деталей недоступна", "thread.automatic_size": "Автоматичний розмір", "thread.designation": "Позначення", + "thread.direction": "Thread direction", "thread.iso_metric": "Метрична ISO", + "thread.left_hand": "Left-hand", + "thread.right_hand": "Right-hand", "thread.select_size": "Вибрати розмір", + "timeline.delete_after_marker_one": "Delete 1 Feature After History Marker", + "timeline.delete_after_marker_other": "Delete {count} Features After History Marker", + "timeline.delete_folders_tip": "Keep their features and nested folders in the history", + "timeline.delete_many": "Delete {count} Selected Features", + "timeline.feature_error": "Error: {message}", + "timeline.feature_hint": "Double-click to edit · drag to reorder · right-click for more", + "timeline.feature_warning": "Warning: {message}", "timeline.group": "Нова тека операцій", "timeline.move_many": "Перемістити елементи часового ланцюжка", "timeline.move_to_group": "Перемістити операції до теки", @@ -1423,6 +2277,10 @@ "toolbar.customize_note": "Вкладка {tab}. Позначте команду, щоб додати її кнопку на панель інструментів. Також можна перетягнути рядок зі спадного меню панелі на панель інструментів, перетягнути кнопку за межі панелі для видалення або скористатися значком закріплення в рядку спадного меню.", "toolbar.image": "ЗОБРАЖЕННЯ", "toolbar.render": "РЕНДЕР", + "toolbar.render_appearance": "APPEARANCE", + "toolbar.render_camera": "CAMERA", + "toolbar.render_environment": "ENVIRONMENT", + "toolbar.render_lighting": "LIGHTING", "toolbar.render_scene": "СЦЕНА", "trace.points": "{count} точок на траєкторії", "trace.stopped_by_contact": "Закінчується на відліку {sample}: {a} пройшов би крізь {b}", @@ -1541,6 +2399,8 @@ "ui.agent_chat_allowed": "Дозволено", "ui.agent_chat_answered": "Відповідь: {option}", "ui.agent_chat_approval": "Дозволити агенту це зробити?", + "ui.agent_chat_attach_selection": "Attach selection", + "ui.agent_chat_attach_selection_tip": "Send what is selected in the model (faces, edges, features, bodies) with the message, so the agent knows what you mean", "ui.agent_chat_attach_view": "Прикріпити вид", "ui.agent_chat_attach_view_tip": "Надіслати знімок поточного виду разом із повідомленням", "ui.agent_chat_attachable": "Зображення, текст і CAD-файли", @@ -1553,11 +2413,18 @@ "ui.agent_chat_auth_title": "Вхід до агента", "ui.agent_chat_cancel": "Скасувати", "ui.agent_chat_changes": "Зміни: {n}, один крок скасування", + "ui.agent_chat_changes_n": "{n} changes", "ui.agent_chat_changes_of": "{n}/{limit} змін", + "ui.agent_chat_choose_model": "Choose a model", "ui.agent_chat_close": "Закрити", "ui.agent_chat_command": "Команда агента", "ui.agent_chat_connect": "Під'єднатися", "ui.agent_chat_copy": "Копіювати", + "ui.agent_chat_ctx_bodies": "Bodies", + "ui.agent_chat_ctx_elements": "Elements", + "ui.agent_chat_ctx_features": "Features", + "ui.agent_chat_ctx_more": "+{n} more", + "ui.agent_chat_ctx_other": "Other", "ui.agent_chat_custom_hint": "Будь-яка програма, що підтримує Agent Client Protocol через stdin і stdout. Оболонка її не запускає.", "ui.agent_chat_denied": "Відхилено", "ui.agent_chat_deny": "Відхилити", @@ -1595,10 +2462,12 @@ "ui.agent_chat_key_in_env": "ключ задано", "ui.agent_chat_left": "Ліворуч", "ui.agent_chat_limit": "Агент досяг межі {limit} змін на одне повідомлення. Надішліть інше повідомлення, щоб дозволити йому продовжити.", + "ui.agent_chat_login_found": "login found", "ui.agent_chat_minimize": "Згорнути до смужки", "ui.agent_chat_mode_all": "Усе", "ui.agent_chat_mode_ask": "Запит", "ui.agent_chat_mode_edits": "Зміни", + "ui.agent_chat_model_no_tools": "{model} can't use SolidCraft's tools, so it can only chat. Pick a model with tool support.", "ui.agent_chat_model_tip": "Модель, яку використовує агент. Ваш вибір запам'ятовується для цього агента.", "ui.agent_chat_new": "Новий чат", "ui.agent_chat_new_confirm": "Почати новий чат? Поточний буде очищено.", @@ -1607,6 +2476,7 @@ "ui.agent_chat_no_control": "Кінцева точка чату з агентом не запустилася, тож агент не може дістатися до проєкту.", "ui.agent_chat_no_images": "Цей агент не приймає зображень", "ui.agent_chat_no_picture": "У буфері обміну немає зображення", + "ui.agent_chat_no_tool_call": "The model didn't use SolidCraft's tools, so the design wasn't changed. Choose a model that supports tool calling; see Local models in the agent chat guide.", "ui.agent_chat_none_found": "Агента для програмування не знайдено. Установіть один із цих, а потім натисніть «Оновити»:", "ui.agent_chat_none_found_short": "Агента не знайдено", "ui.agent_chat_not_installed": "Не встановлено", @@ -1616,12 +2486,17 @@ "ui.agent_chat_paste_picture": "Вставити зображення", "ui.agent_chat_permission": "Агент просить виконати: {title}", "ui.agent_chat_pick": "Агент", + "ui.agent_chat_pick_context": "Pick context", + "ui.agent_chat_pick_context_tip": "Choose faces, edges, features and bodies in the model for the agent to look at, then press OK", "ui.agent_chat_placeholder": "Попросіть агента змінити проєкт…", "ui.agent_chat_placeholder_busy": "Поставте повідомлення в чергу, доки агент завершить (Ctrl+Enter: надіслати зараз)", "ui.agent_chat_pop_out": "Відкрити у власному вікні, яке можна перемістити на інший екран", "ui.agent_chat_previous_picture": "Попереднє зображення", "ui.agent_chat_privacy": "Нічого нікуди не надсилається, крім агента, який ви запускаєте, під вашим власним обліковим записом.", "ui.agent_chat_privacy_note": "Чат сам нічого нікуди не надсилає: агент, який ви запускаєте, спілкується з власним сервісом під вашим обліковим записом. SolidCraft ніколи не бачить і не зберігає ключ чи пароль.", + "ui.agent_chat_provider_models": "{count} models", + "ui.agent_chat_provider_other": "Other", + "ui.agent_chat_provider_tip": "The provider whose models the next list shows.", "ui.agent_chat_queue": "У чергу", "ui.agent_chat_queue_full": "Забагато повідомлень в очікуванні: приберіть одне або зачекайте на агента.", "ui.agent_chat_queued": "У черзі", @@ -1650,6 +2525,7 @@ "ui.agent_chat_stop_tip": "Зупинити агента й усе, що він запустив", "ui.agent_chat_stop_turn_tip": "Зупинити агента (Esc). Повідомлення в черзі залишаються в черзі.", "ui.agent_chat_turn_limit": "Змін на повідомлення", + "ui.agent_chat_turn_unlimited": "Unlimited", "ui.agent_chat_undo_changes": "Скасувати ці зміни", "ui.agent_chat_undo_label": "Чат з агентом: {message}", "ui.agent_chat_undone": "(скасовано)", @@ -1662,8 +2538,10 @@ "ui.ai_add": "Додати", "ui.ai_add_agent": "Додати агента…", "ui.ai_add_agent_title": "Додати агента", + "ui.ai_add_anthropic": "Anthropic-compatible API", "ui.ai_add_api": "API, сумісний з OpenAI", "ui.ai_add_custom": "Власна команда", + "ui.ai_add_endpoint": "API endpoint", "ui.ai_add_installed": "Встановлений агент", "ui.ai_add_installed_note": "Ваш власний запис для встановленого агента, наприклад з іншими аргументами. Встановлені агенти перелічуються окремо.", "ui.ai_added": "додано", @@ -1693,6 +2571,7 @@ "ui.ai_key_needs_https": "Ключ надсилається лише через HTTPS або на цей комп'ютер.", "ui.ai_key_note": "Зберігається в системному сховищі ключів, ніколи в налаштуваннях SolidCraft. Залиште порожнім для локального сервера.", "ui.ai_keychain_error": "Системне сховище ключів відмовило: {error}", + "ui.ai_kind": "Kind", "ui.ai_mode_all": "Дозволяти все", "ui.ai_mode_all_note": "Ніщо не запитує заздалегідь. Звіти про збої залишаються поза межами, а обмеження тек залишаються чинними.", "ui.ai_mode_all_warning": "Агент може зберігати, перезаписувати, експортувати й замінювати ваш проєкт без запиту. Використовуйте це лише з агентом, якому довіряєте, і на збережених проєктах.", @@ -1714,7 +2593,11 @@ "ui.ai_panel": "Панель", "ui.ai_permissions": "Дозволи", "ui.ai_preset": "Набір", + "ui.ai_protocol": "Protocol", "ui.ai_remove": "Видалити", + "ui.ai_request_timed_out": "The model took longer than {seconds} s. You can raise the request timeout for this endpoint in Preferences › Assistant.", + "ui.ai_request_timeout": "Request timeout", + "ui.ai_request_timeout_hint": "How long one model request to this endpoint may take, from 30 s to an hour. Raise it for a slow local model.", "ui.ai_reset": "Скинути", "ui.ai_settings": "Налаштування ШІ…", "ui.ai_show_features": "Показувати функції ШІ", @@ -1723,13 +2606,33 @@ "ui.ai_test": "Перевірити", "ui.ai_test_acp_ok": "Відповідає: {agent}", "ui.ai_test_acp_tip": "Ненадовго запускає агента й запитує сесію; потім завершує його", + "ui.ai_test_answered": "Reached: {model} answered", + "ui.ai_test_anthropic_tip": "Sends a short message to the endpoint", "ui.ai_test_api_tip": "Запитує в кінцевої точки її моделі", "ui.ai_test_no_model": "Досягнуто: {count} моделей, але не {model}", "ui.ai_test_ok": "Досягнуто: {count} моделей", "ui.ai_testing": "Перевірка…", + "ui.ai_tool_arguments": "Arguments", + "ui.ai_tool_details": "Details", "ui.ai_tool_done": "готово", "ui.ai_tool_failed": "не вдалося", + "ui.ai_tool_result": "Result", "ui.ai_tool_running": "виконується", + "ui.ai_tool_sum_bodies_one": "{count} body", + "ui.ai_tool_sum_bodies_other": "{count} bodies", + "ui.ai_tool_sum_by": "by {value}", + "ui.ai_tool_sum_edges_one": "{count} edge", + "ui.ai_tool_sum_edges_other": "{count} edges", + "ui.ai_tool_sum_faces_one": "{count} face", + "ui.ai_tool_sum_faces_other": "{count} faces", + "ui.ai_tool_sum_features_one": "{count} feature", + "ui.ai_tool_sum_features_other": "{count} features", + "ui.ai_tool_sum_measured": "Measured {what}", + "ui.ai_tool_sum_more": "{steps}, and {count} more", + "ui.ai_tool_sum_radius": "r {value}", + "ui.ai_tool_sum_saved": "Saved {file}", + "ui.ai_tool_sum_screenshot": "Screenshot", + "ui.ai_tool_sum_then": "{first}, then {next}", "ui.ai_tool_unfold": "Клацніть, щоб показати, що він повернув", "ui.ai_tool_waiting": "очікування", "ui.ai_toolbar_button": "Показувати кнопку на панелі інструментів", @@ -1821,6 +2724,8 @@ "ui.copy": "Копіювати", "ui.corner": "Кут", "ui.corners": "Кути", + "ui.cosmetic_thread_markings": "Cosmetic thread markings", + "ui.cosmetic_thread_markings_help": "Show schematic markings on threaded cylindrical walls. Changes only the display, never the design or exports.", "ui.counterbore": "Циліндричне розширення", "ui.countersink": "Зенкування", "ui.create": "Створити", @@ -1887,7 +2792,12 @@ "ui.export_keymap_tip": "Клавіші, обрані в полі S і панель інструментів як файл", "ui.extend": "Подовжити", "ui.extent_type": "Тип меж", + "ui.extract_component": "Extract to File…", + "ui.extract_design_changed": "The design changed while choosing a file. Start Extract to File again.", + "ui.extract_done": "The component is now its own design, linked here.", "ui.extrude": "Видавлювання", + "ui.extrude_auto_to_object": "Extrude to a picked target", + "ui.extrude_auto_to_object_tip": "In Extrude, with a profile picked, picking a face, vertex or parallel plane off its plane switches the extent to To Object", "ui.factor": "Коефіцієнт", "ui.feature_history": "Історія операцій", "ui.feature_options": "Параметри операції", @@ -1906,6 +2816,7 @@ "ui.flip": "Перевернути", "ui.format": "Формат", "ui.frame_rate": "Частота кадрів", + "ui.frame_rate_details": "Frame rate details", "ui.front": "Спереду", "ui.fully_constrained": "Повністю визначений", "ui.function": "Функція", @@ -1996,6 +2907,8 @@ "ui.hideOrigin": "Приховати початок координат", "ui.hidePlanes": "Приховати площини", "ui.hideProfile": "Приховати профіль", + "ui.hide_origin_by_default": "Hide origin by default", + "ui.hide_origin_note": "New designs start with the Origin folder hidden. A design keeps its own Origin setting once you show or hide it.", "ui.history_back": "На один крок назад", "ui.history_below_browser": "Під браузером", "ui.history_edge_hint": "двічі клацніть край", @@ -2007,6 +2920,7 @@ "ui.history_names": "Назви", "ui.history_play": "Відтворити до кінця", "ui.history_show_names": "Показати назви", + "ui.history_sketch_listed_under": "Listed under {feature}", "ui.history_title": "Історія", "ui.history_toggle_names": "Показувати або приховувати назви елементів", "ui.hole": "Отвір", @@ -2014,6 +2928,7 @@ "ui.hole_type": "Тип отвору", "ui.home": "Головна", "ui.homeView": "Головний вид", + "ui.horizontal_constraint": "Horizontal Constraint", "ui.horizontal_vertical": "Горизонталь/вертикаль", "ui.import_ellipsis": "Імпорт…", "ui.infinite": "Нескінченна", @@ -2030,6 +2945,10 @@ "ui.length_decimals": "Знаки після коми для довжин", "ui.light": "Світла", "ui.line": "Пряма", + "ui.link_copies": "Link Identical Copies", + "ui.link_copies_keep": "Keep", + "ui.link_copies_link": "Link", + "ui.link_copies_text": "These components build the same bodies as {name}. Make them placements of its link?", "ui.lock": "Заблокувати", "ui.loft": "Лофт", "ui.look_at": "Наведення", @@ -2068,6 +2987,11 @@ "ui.move": "Перемістити", "ui.multiple": "Кілька", "ui.named_views": "Іменовані види", + "ui.nav_bridge": "Navigate with a device app on this computer", + "ui.nav_bridge_connected": "Connected", + "ui.nav_bridge_port": "Port", + "ui.nav_bridge_tip": "A 3D input device's own program (for example a homemade 3D mouse's driver) moves the view over a local connection, so the mouse pointer stays yours. SolidCraft connects to it on this port on this computer only.", + "ui.nav_bridge_waiting": "Waiting for the device app", "ui.navigation": "Навігація", "ui.needs_design": "{command}: спершу відкрийте проєкт", "ui.newSketchGroup": "Нова група ескізів", @@ -2086,6 +3010,7 @@ "ui.one_side": "Один бік", "ui.open": "Відкрити", "ui.open_ends_tip": "Нічого не торкається", + "ui.open_linked_design": "Open Linked Design", "ui.open_preferences": "Відкрити налаштування", "ui.open_recent": "Відкрити недавні", "ui.operation": "Операція", @@ -2105,18 +3030,27 @@ "ui.paste": "Вставити", "ui.path": "Траєкторія", "ui.pattern_on_path": "Масив на траєкторії", + "ui.perforate_margin_default": "from the diameter", + "ui.perforate_pitch": "Pitch", + "ui.perforate_square": "Square", + "ui.perforate_staggered": "Staggered (60°)", + "ui.perforate_title": "PERFORATE", "ui.perpendicular": "Перпендикулярність", "ui.perspective_view": "Перспективний вид", "ui.pinToShortcuts": "Закріпити в комбінаціях клавіш", "ui.pinToToolbar": "Закріпити на панелі інструментів", "ui.pipe": "Труба", "ui.placement": "Розміщення", + "ui.placement_handles": "Placement handles", + "ui.placement_handles_tip": "Handles on the preview of a Rest, Boss or Snap Fit: drag the marker to move it across the model, turn it by its ring", "ui.plane": "Площина", "ui.plane_at_angle": "Площина під кутом", "ui.plugins": "Плагіни", "ui.plugins_desktop": "Плагіни доступні в настільному застосунку.", "ui.plugins_empty": "Плагінів не встановлено.", + "ui.plugins_none": "No plugins match this search.", "ui.plugins_note": "Кожен плагін — це папка в {path} з файлом plugin.json. SolidCraft читає цей файл і не виконує жодного коду з папки. Вимкнення плагіна залишає його встановленим.", + "ui.plugins_search": "Search plugins", "ui.plugins_skipped": "Не вдалося прочитати папок: {count}.", "ui.plugins_version": "{version}", "ui.point": "Точка", @@ -2144,6 +3078,9 @@ "ui.rectangle": "Прямокутник", "ui.rectangular_pattern": "Прямокутний масив", "ui.redo": "Повторити", + "ui.reference_1": "Reference 1", + "ui.reference_2": "Reference 2", + "ui.reference_distance": "Reference distance", "ui.relink_design_changed": "Збірка змінилася під час вибору джерела. Почніть «Переприв'язати джерело» знову.", "ui.relink_done": "Джерело переприв'язано для всіх екземплярів.", "ui.relink_not_linked": "Цей компонент не пов'язаний із проєктом-джерелом.", @@ -2154,6 +3091,7 @@ "ui.render": "Візуалізувати", "ui.renderer": "Рендерер", "ui.repeat": "Повторити", + "ui.replace_with_link_done": "The copies are now placements of the linked design.", "ui.report_a_bug": "Повідомити про помилку", "ui.reset": "Скинути", "ui.reset_all": "Скинути все", @@ -2171,6 +3109,7 @@ "ui.right": "Справа", "ui.save": "Зберегти", "ui.save_as": "Зберегти як", + "ui.save_mesh_no_slicer_open": "No slicer found: choose Custom… and pick your slicer program", "ui.save_mesh_pick_bodies": "Виберіть тіла для збереження", "ui.saved_to": "Збережено {path}", "ui.sbox_pin": "Закріпити вгорі поля S", @@ -2186,9 +3125,19 @@ "ui.selection_shift_add_only": "Shift+клацання додає без вилучення", "ui.selection_shift_add_only_tip": "Увімк.: Shift додає елементи, Ctrl/Cmd перемикає. Вимк. (типово): Shift і Ctrl/Cmd обидва перемикають.", "ui.send": "Надіслати", + "ui.send_to_slicer_unavailable": "Send to Slicer needs the desktop app: a browser can't start a program", "ui.sent_to_slicer": "Надіслано в {slicer}", + "ui.sent_to_slicer_copy": "Sent to {slicer} as {file}, because the first file is still open there", "ui.sheet_gap": "Проміжок", "ui.shell": "Оболонка", + "ui.shortcut_capture_add_key": "Add one ordinary key. Escape cancels.", + "ui.shortcut_capture_hint": "Click a binding, then press modifiers and one key. Add modifiers within one second; release all keys to confirm. Escape cancels.", + "ui.shortcut_capture_press": "Press modifiers and one key. Escape cancels.", + "ui.shortcut_capture_release": "Release all keys to confirm. Escape cancels.", + "ui.shortcut_capture_settling": "Confirming shortcut… Escape cancels.", + "ui.shortcut_cycles_modes": "Pressing a tool's shortcut again switches its mode", + "ui.shortcut_cycles_modes_tip": "Before the first point, pressing a sketch tool's shortcut again steps through its creation modes. Off: it starts the tool again.", + "ui.shortcut_multiple_keys": "Use modifiers and only one other key. Click the binding to try again.", "ui.show": "Показати", "ui.showAll": "Показати все", "ui.showAllBodies": "Показати всі тіла", @@ -2213,6 +3162,15 @@ "ui.slice": "Розріз", "ui.slicer": "Слайсер", "ui.slicer_delete_tip": "{program}\nНатисніть Delete, щоб прибрати його зі списку", + "ui.slicer_lost": "{slicer} was started but can't be found again to send it the file. The file is saved at {path}: open it from there.", + "ui.slicer_no_file": "{slicer} is ready, but there is no file to send to it.", + "ui.slicer_no_response": "{slicer} didn't respond in time. The file is already saved at {path}: send it again once the slicer has started.", + "ui.slicer_resend_hint": "Sending again replaces the file the slicer has open.", + "ui.slicer_single_instance": "Open files in a slicer that is already running", + "ui.slicer_single_instance_tip": "PrusaSlicer, SuperSlicer and Cura load the file in the window that is open instead of starting another. Other slicers are started as they are. PrusaSlicer 3.0 always does this: its launcher can't take a file any other way.", + "ui.slicer_starting": "Starting {slicer}…", + "ui.slicer_still_starting": "Still waiting for {slicer} to start. Nothing else was sent.", + "ui.slicer_stl_fallback": "The 3MF could not be written, so this is an STL.", "ui.slot": "Паз", "ui.smooth": "Плавний", "ui.smooth_wheel_zoom": "Плавне масштабування колесом", @@ -2228,6 +3186,8 @@ "ui.start": "Початок", "ui.start_over": "Почати спочатку", "ui.start_page": "Початкова сторінка", + "ui.step_values": "Step values with the arrow keys and the wheel", + "ui.step_values_tip": "In a value field you are typing in, Up/Down change a plain number by 1 (Shift: 10, Alt: 0.1), and so does the mouse wheel over the field. Expressions are left as typed.", "ui.stretch": "Розтягнути", "ui.supersampling": "Наддискретизація (SSAA)", "ui.supersampling_adaptive": "Лише коли вид нерухомий", @@ -2262,6 +3222,7 @@ "ui.total_angle": "Загальний кут", "ui.trackpad_pan_tip": "Жести трекпада виконують панорамування (вимкнено: масштабують, як колесо); колесо миші масштабує, бічне колесо панорамує вбік, стискання завжди масштабує", "ui.trim": "Обрізати", + "ui.turn_up_axis": "Turn Up Axis", "ui.twist": "Закручування", "ui.two_finger_scroll_pans": "Прокрутка двома пальцями виконує панорамування", "ui.two_sides": "Два боки", @@ -2278,11 +3239,17 @@ "ui.up_axis_note": "Яка вісь спрямована вгору у видах (вид осі, головний, наведення). Проєкти не змінюються.", "ui.updateToCurrentView": "Оновити до поточного виду", "ui.upload": "Завантажити", + "ui.vertical_constraint": "Vertical Constraint", "ui.view_centre": "Центр виду", + "ui.viewport_theme_follow": "Follow theme", "ui.visual_shaded_hidden_edges": "Затінений із прихованими ребрами", "ui.visual_shaded_with_edges": "Затінений із ребрами", "ui.visual_style": "Стиль відображення", "ui.visual_wireframe": "Каркас", + "ui.window_system": "Window system", + "ui.window_system_auto": "Automatic", + "ui.window_system_wayland": "Wayland", + "ui.window_system_x11": "X11", "ui.workspace": "робоча область", "ui.workspace_animation_description": "Рознесені вигляди, дослідження руху та розкадрування", "ui.workspace_available": "Доступно", @@ -2328,6 +3295,7 @@ "update.prefs_flatpak": "Flatpak оновлює цю копію ({version}): виконайте {command} або скористайтеся центром програм. SolidCraft не перевіряє.", "update.prefs_label": "Оновлення", "update.prefs_note": "Це SolidCraft {version} ({kind}). Перевірка запитує в GitHub останній випуск і більше нічого не надсилає.", + "update.prefs_web": "Reload the page to get the latest web app. If the network is unavailable or the update cannot finish downloading in time, the saved version opens instead; a download in progress continues for the next reload.", "update.release_page": "Відкрити сторінку випуску", "update.restart": "Перезапустити зараз", "update.restart_later": "Пізніше", @@ -2338,5 +3306,12 @@ "update.up_to_date": "SolidCraft оновлено.", "update.update_now": "Оновити зараз", "update.you_have": "У вас версія {version}.", - "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ вибрати · Enter / Tab доповнити · Esc закрити" + "view.auto_ortho_faces": "Perspective while orbiting, ortho on faces", + "web.files.insert_drawings_hint": "CAD files, meshes, DXF or SVG into the open design", + "web.files.insert_stored_drawings_hint": "Into the open design (CAD files, meshes, DXF, SVG)", + "web.open_full": "Open in SolidCraft", + "web.open_link": "Open linked design?", + "web.open_link_confirm": "There are unsaved changes. Open the linked design in a new tab?", + "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ вибрати · Enter / Tab доповнити · Esc закрити", + "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ choose · Enter applies what you typed · Esc dismiss" } diff --git a/assets/locales/vi.json b/assets/locales/vi.json index 139ebb9b2..0fa3ea7d4 100644 --- a/assets/locales/vi.json +++ b/assets/locales/vi.json @@ -432,6 +432,7 @@ "Remove this point": "Xóa điểm này", "Rename Feature": "Đổi tên tính năng", "Rename Folder": "Đổi tên thư mục", + "Render Stage": "Giai đoạn kết xuất", "Reopen designs": "Mở lại thiết kế", "Reopen the designs that were open when SolidCraft was last closed": "Mở lại các thiết kế đã mở khi đóng SolidCraft lần trước", "Replace existing library file": "Thay thế tệp thư viện hiện có", @@ -687,6 +688,9 @@ "cmd.appearance_assign": "Vẻ ngoài / Màu sắc", "cmd.appearance_library": "Thư viện màu sắc bề mặt", "cmd.appearance_list": "Danh sách màu sắc bề mặt", + "cmd.appearance_paint": "Tô diện mạo", + "cmd.appearance_pick_up": "Lấy diện mạo", + "cmd.appearance_replace": "Thay diện mạo", "cmd.assembly_bom": "Bảng kê vật tư (BOM)", "cmd.body_rename": "Đổi tên thân khối", "cmd.browser_collapse_all": "Thu gọn tất cả", @@ -888,9 +892,11 @@ "cmd.plastic_snap_fit": "Khớp gài bấm (Snap Fit)", "cmd.render_aging_describe": "Lão hóa bề mặt phân lớp", "cmd.render_backends": "Kết xuất hình ảnh Sauends", + "cmd.render_batch": "Kết xuất mọi cảnh chụp", "cmd.render_camera_fit": "Căn khung hình chủ thể kết xuất", "cmd.render_camera_get": "Kiểm tra camera kết xuất", "cmd.render_cancel": "Hủy bỏ Kết xuất hình ảnh", + "cmd.render_compare": "So sánh ảnh", "cmd.render_effects_describe": "Hiệu ứng ống kính và sáng tạo", "cmd.render_export": "Xuất hình ảnh kết xuất", "cmd.render_hdr_inspect": "Kiểm tra tệp nguồn HDR", @@ -906,6 +912,7 @@ "cmd.render_library_surface_prepare": "Chuẩn bị bản đồ bề mặt đã tạo", "cmd.render_library_surface_unbind": "Xóa liên kết bề mặt", "cmd.render_library_targets": "Tìm mục tiêu trong thư viện kết xuất", + "cmd.render_lights_solo": "Chỉ hiện một đèn", "cmd.render_optics_bind": "Lưu liên kết quang học", "cmd.render_optics_unbind": "Xóa liên kết quang học", "cmd.render_preflight": "Kiểm tra yêu cầu kết xuất", @@ -1017,6 +1024,7 @@ "cmd.sketch_spline_fit_point": "Đường cong Spline qua các điểm", "cmd.sketch_spline_insert_point": "Thêm điểm vào đường cong Spline", "cmd.sketch_spun_profile": "Biên dạng xoay tròn (Spun Profile)", + "cmd.sketch_toggle_diameter": "Chuyển đổi bán kính / đường kính", "cmd.sketch_toggle_driven": "Chuyển đổi kích thước tham chiếu (Driven Dimension)", "cmd.sketch_transform": "Biến đổi", "cmd.sketch_trim_path": "Cắt xén dọc theo đường dẫn", @@ -1082,6 +1090,7 @@ "cmd.view_rename": "Đổi tên góc nhìn đã lưu", "cmd.view_right": "Góc nhìn bên phải", "cmd.view_save": "Tạo góc nhìn đã lưu mới", + "cmd.view_shots_strip": "Dải cảnh chụp", "cmd.view_spin": "Xoay quỹ đạo liên tục", "cmd.view_tool": "Công cụ điều hướng", "cmd.view_top": "Góc nhìn từ trên", @@ -1639,6 +1648,7 @@ "render.aging_target_search": "Lọc tên khối", "render.aging_upward": "Lắng đọng trên bề mặt hướng lên", "render.all_controls_help": "Xem chi tiết toàn bộ các điều khiển hiện tại. Các trang chuyên mục cho phép chỉnh sửa tập trung mà không làm thay đổi yêu cầu cơ bản bên dưới.", + "render.all_shots_label": "Mọi cảnh chụp", "render.appearance_physics_separate": "Diện mạo thị giác không gán khối lượng riêng, dữ liệu nhiệt hay các đặc tính kỹ thuật khác.", "render.availability_native": "Tổ hợp gốc; hãy xem xét trước khi áp dụng", "render.availability_projection": "Chiếu một phần được hỗ trợ; xem phạm vi và các mục lược bỏ", @@ -1793,10 +1803,13 @@ "render.effects_reset_lens": "Đặt lại hiệu ứng ống kính", "render.effects_seed": "Hạt giống hoa văn", "render.export_display": "Xuất: ảnh PNG hiển thị", + "render.export_image_label": "Xuất ảnh", "render.export_linear": "Xuất: ảnh EXR tuyến tính thô", "render.exr_pending": "GPU có thể giữ lại tệp EXR tuyến tính thô. Tính năng nén, ảnh nhiều lớp và các kênh kết xuất phụ trợ vẫn chưa được triển khai.", "render.film_grain": "Hạt nhiễu nhiếp ảnh (Film Grain)", "render.fit": "Thu phóng vừa sản phẩm", + "render.fixed_camera": "Máy ảnh", + "render.fixed_world": "Thế giới", "render.flare_ghosts": "Vòng bóng ma trên mỗi nguồn sáng", "render.flare_halo": "Vầng hào quang lóe sáng", "render.flare_streak": "Vệt sáng phong cách biến dạng (Anamorphic)", @@ -1823,6 +1836,12 @@ "render.hdr_primaries_srgb": "Màu cơ bản: sRGB/D65", "render.hdr_primaries_undeclared": "Tệp nguồn không khai báo màu cơ bản; hãy xem lại yêu cầu màu sắc của bộ kết xuất.", "render.hdr_resource_missing": "Thiết kế này thiếu tài nguyên HDR đã lưu.", + "render.heading_batch": "LÔ", + "render.heading_frame": "KHUNG", + "render.heading_lens": "ỐNG KÍNH", + "render.heading_results": "KẾT QUẢ", + "render.heading_shots": "CẢNH CHỤP", + "render.hide_shots_label": "Ẩn dải cảnh chụp", "render.image_advanced": "Điều khiển GPU nâng cao", "render.image_cancelled": "Đã hủy kết xuất hình ảnh", "render.image_cancelling": "Đang hủy…", @@ -1854,6 +1873,7 @@ "render.image_width": "Bề rộng", "render.include_rig_cards": "Bao gồm tấm hắt sáng và tấm chắn sáng thụ động", "render.inspect_scene": "Làm mới tóm tắt cảnh đã ghi nhận", + "render.inspector": "Bảng thuộc tính", "render.keep_editing": "Tiếp tục chỉnh sửa", "render.layer_down": "Chuyển xuống", "render.layer_enabled": "Bật lớp này", @@ -1922,6 +1942,8 @@ "render.library_unfavorite": "Bỏ yêu thích", "render.library_uniform_ack": "Sử dụng xấp xỉ đồng nhất không có hiệu ứng không gian hoặc nâng cao", "render.library_usable": "Phép chiếu có thể thực thi", + "render.light_anchor_pending": "Chưa hỗ trợ đổi hệ tọa độ của đèn.", + "render.lights_fixed_to": "Đèn gắn cố định với", "render.linear_help": "Giữ lại bản gốc RGBA số thực 32-bit trước khi khử nhiễu, phơi sáng, ánh xạ sắc điệu, lọc và phông nền. Tuyến tính sRGB/D65; nhân trước với độ phủ. Bộ nhớ bổ sung được tiếp nhận rõ ràng. Không nén hay thêm kênh phụ.", "render.linear_retain": "Giữ lại tệp EXR tuyến tính thô", "render.linear_unavailable": "Khung hình đã hoàn thành được chọn không giữ lại EXR. Hãy bật tính năng lưu giữ trước khi kết xuất; ảnh PNG cũ không thể khôi phục lại suất bức xạ thô.", @@ -2007,6 +2029,7 @@ "render.output_over_budget": "Hình ảnh yêu cầu vượt quá giới hạn tài nguyên đã chọn. Hãy chủ động chọn kích thước hoặc cấu hình tương thích; không tự động hạ cấp chất lượng.", "render.output_ratio_refused": "Kích thước liên kết vượt quá giới hạn của phương thức này. Kích thước cũ được giữ lại; hãy mở khóa tỷ lệ hoặc chọn giá trị nhỏ hơn.", "render.output_swap_orientation": "Hoán đổi chiều rộng và chiều cao", + "render.output_tools_inspector": "Chỉnh kích thước và định dạng trong bảng thuộc tính Đầu ra.", "render.page_aging": "Lão hóa và bám bẩn", "render.page_all": "Tất cả điều khiển", "render.page_appearance": "Diện mạo", @@ -2018,6 +2041,7 @@ "render.page_lighting": "Chiếu sáng", "render.page_output": "Đầu ra", "render.page_scene": "Khung cảnh", + "render.paint_label": "Tô", "render.passive_stage": "Mặt sàn và sân khấu thụ động", "render.passive_stage_help": "Các tấm thụ động hữu hạn chỉ thuộc về hình ảnh kết xuất. Chúng không thêm khối CAD hay khối lượng. Vị trí được cố định sau khi áp dụng; giao cắt với ranh giới sản phẩm sẽ bị từ chối. CPU không cung cấp ánh sáng nảy khuếch tán.", "render.perspective": "Camera phối cảnh", @@ -2033,6 +2057,10 @@ "render.physical_prepare_plan": "Chuẩn bị kế hoạch tạo (không áp dụng)", "render.physical_separate": "Diện mạo không phải là định danh vật liệu. Đây là các tham chiếu có nguồn gốc, không phải đặc tính hiệu dụng được chứng nhận. Khối lượng, vật liệu kỹ thuật và quang học hiện có giữ nguyên.", "render.physical_unknown": "Chưa xác định ứng viên số học. Phải chỉ định mác, công thức hoặc cấu tạo; chưa rõ không có nghĩa là bằng 0.", + "render.pick_component": "Thành phần", + "render.pick_label": "Chọn", + "render.pick_up_label": "Lấy", + "render.pick_waiting": "Chưa hỗ trợ chọn sản phẩm.", "render.post_contrast": "Độ tương phản", "render.post_gain_b": "Khuếch đại xanh lam (Blue)", "render.post_gain_g": "Khuếch đại xanh lục (Green)", @@ -2045,6 +2073,7 @@ "render.preview": "Xem trước tích hợp", "render.preview_help": "Đổ bóng raster và trộn độ trong suốt. Khúc xạ, HDRI và kết xuất cuối cùng hiện chưa khả dụng.", "render.preview_image_settings_help": "Xem trước trực tiếp giữ nguyên ánh sáng studio cố định. Độ phơi sáng và ánh sáng hình ảnh sẽ áp dụng cho tác vụ khi bạn Kiểm tra hoặc Bắt đầu.", + "render.preview_lighting_help": "Bản xem trước trực tiếp chỉ hiện ánh sáng trực tiếp và không có bóng đổ.", "render.preview_retry": "Thử lại xem trước trực tiếp", "render.preview_unavailable_help": "Bản xem trước trực tiếp không khả dụng. Các thiết lập đã lưu và điều khiển tác vụ ảnh vẫn có thể truy cập. Hãy thay đổi cảnh hoặc thử lại; cảnh bị từ chối sẽ không được dựng lại trên mỗi khung hình.", "render.preview_upload": "Dung lượng đỉnh xem trước trực tiếp", @@ -2058,8 +2087,10 @@ "render.radial_distortion": "Độ méo hướng tâm", "render.regrade_action": "Chỉnh màu lại bản gốc thô (không khử nhiễu)", "render.regrade_help": "Tạo một ảnh PNG riêng biệt từ bản gốc thô đã hoàn thành được chọn, sử dụng các điều khiển trình chiếu này. Không dò lại tia, không đổi kích thước/camera/ánh sáng đã ghi nhận, và không ghi đè tệp EXR. Bộ khử nhiễu không áp dụng lại do bản gốc thô không giữ dữ liệu dẫn hướng. Bản phái sinh vẫn có thể xuất qua cùng điều khiển tác vụ.", + "render.regrade_label": "Chỉnh lại màu", "render.reload_settings": "Tải lại cài đặt đã lưu", "render.replace_ground": "Xác nhận thay thế sân khấu hiện có", + "render.replace_label": "Thay", "render.replace_saved_surface": "Thay thế liên kết đã lưu hiện có cho mục tiêu này", "render.restore_camera": "Khôi phục camera đã lưu", "render.result_actual_help": "Một pixel hình ảnh tương ứng một pixel màn hình hiển thị.", @@ -2105,6 +2136,7 @@ "render.sampling_title": "Lấy mẫu thích ứng và truyền dẫn", "render.save_continue": "Lưu và tiếp tục", "render.save_setup": "Lưu thiết lập", + "render.save_shot": "Lưu cảnh chụp", "render.saved_maps_runtime_conflict": "Liên kết bề mặt đã lưu không thể kết hợp với ghi đè quang học tạm thời hoặc tệp HDR chưa lưu. Hãy lưu HDR hoặc chủ động xóa các đầu vào tạm thời.", "render.saved_surface_remove": "Xóa liên kết đã lưu", "render.saved_surfaces": "Liên kết bề mặt đã lưu", @@ -2124,6 +2156,9 @@ "render.setup_runtime_unsupported": "Toàn bộ tác vụ này chưa thể lưu: nó chứa bản đồ hoặc liên kết khối trong cảnh. Hãy xóa các đầu vào tạm thời đó trước khi lưu thiết lập di động.", "render.setup_save_missing": "Không tìm thấy cấu hình kết xuất đã lưu sau khi lệnh hoàn tất.", "render.sharpening": "Làm sắc nét chi tiết", + "render.shell_tab_appearance": "DIỆN MẠO KẾT XUẤT", + "render.shell_tab_camera": "MÁY ẢNH KẾT XUẤT", + "render.shell_tab_scene": "CẢNH KẾT XUẤT", "render.shot_duplicate": "Nhân bản khung hình đã lưu", "render.shot_manager": "Khung hình đã lưu", "render.shot_new_name": "Tên khung hình mới", @@ -2132,11 +2167,19 @@ "render.shot_remove_title": "Xóa khung hình đã lưu?", "render.shot_rename": "Đổi tên khung hình đã lưu", "render.shot_saved_only": "Hãy lưu bản nháp hiện tại trước. Nhân bản và đổi tên sẽ giữ nguyên các tùy chọn đã lưu và tham chiếu tài nguyên chính xác.", + "render.show_shots_label": "Hiện dải cảnh chụp", "render.sky_ground": "Mặt đất · RGB tuyến tính", "render.sky_horizon": "Đường chân trời · RGB tuyến tính", "render.sky_zenith": "Thiên đỉnh · RGB tuyến tính", "render.soft_focus": "Lấy nét mềm (Soft focus)", + "render.stage_frame": "Khung", + "render.stage_light": "Ánh sáng", + "render.stage_look": "Giao diện", + "render.stage_orthographic": "Trực giao", + "render.stage_output": "Đầu ra", "render.stage_panel_count": "Các tấm panel đã lưu", + "render.stage_preview_note": "Xem trước tích hợp · ánh sáng trực tiếp", + "render.strip_label": "Dải", "render.studio_add_area": "Thêm nguồn sáng vùng", "render.studio_ambient": "Suất bức xạ môi trường không đổi", "render.studio_ambient_rgb": "Suất bức xạ môi trường không đổi (RGB tuyến tính)", @@ -2193,6 +2236,12 @@ "render.volume_max": "Ranh giới tối đa · mm thế giới", "render.volume_min": "Ranh giới tối thiểu · mm thế giới", "render.volume_title": "Thể tích đồng nhất có giới hạn", + "render.wait_batch": "chưa hỗ trợ: hàng đợi kết xuất cảnh chụp đã lưu", + "render.wait_compare": "chưa hỗ trợ: so sánh ảnh được giữ lại", + "render.wait_paint": "chưa hỗ trợ: chọn sản phẩm và tô diện mạo", + "render.wait_pick_up": "chưa hỗ trợ: chọn sản phẩm và lấy mẫu diện mạo", + "render.wait_replace": "chưa hỗ trợ: thay mọi chỗ dùng một diện mạo", + "render.wait_solo": "chưa hỗ trợ: hiển thị và chỉ hiện một đèn", "sample.bracket.about": "Mép chấn đáy với các mép chấn cạnh và đường viền gấp cuộn theo quy tắc 2 mm", "sample.bracket.name": "Giá đỡ kim loại tấm", "sample.enclosure.about": "Hộp làm mỏng vỏ có gờ chắn, vấu bắt vít, gờ đỡ và khớp gài bấm", @@ -2305,7 +2354,11 @@ "toolbar.render_camera": "CAMERA", "toolbar.render_environment": "MÔI TRƯỜNG", "toolbar.render_lighting": "CHIẾU SÁNG", + "toolbar.render_lights": "ĐÈN", + "toolbar.render_result": "KẾT QUẢ", "toolbar.render_scene": "BỐI CẢNH", + "toolbar.render_stage": "GIAI ĐOẠN", + "toolbar.render_studio": "XƯỞNG", "trace.points": "{count} điểm dọc theo đường dẫn", "trace.stopped_by_contact": "Kết thúc tại mẫu {sample}: {a} sẽ xuyên qua {b}", "trace.stopped_by_loop": "Kết thúc tại mẫu {sample}: vòng lặp qua {joint} không thể khép kín thêm được nữa", @@ -2848,6 +2901,7 @@ "ui.fully_constrained": "Ràng buộc hoàn toàn", "ui.function": "Hàm", "ui.general": "Chung", + "ui.gpu_memory_lowered": "Card đồ họa đã hết bộ nhớ: khung nhìn được vẽ với chất lượng thấp hơn.", "ui.graphics": "Đồ họa", "ui.graphics_custom": "Tùy biến", "ui.graphics_performance": "Hiệu năng", diff --git a/assets/locales/zh.json b/assets/locales/zh.json index 78e89fdc8..041fbc45c 100644 --- a/assets/locales/zh.json +++ b/assets/locales/zh.json @@ -432,6 +432,7 @@ "Remove this point": "移除此点", "Rename Feature": "重命名特征", "Rename Folder": "重命名文件夹", + "Render Stage": "渲染阶段", "Reopen designs": "重新打开设计", "Reopen the designs that were open when SolidCraft was last closed": "重新打开上次关闭 SolidCraft 时打开的设计", "Replace existing library file": "替换现有库文件", @@ -687,6 +688,9 @@ "cmd.appearance_assign": "外观", "cmd.appearance_library": "外观库", "cmd.appearance_list": "列出外观", + "cmd.appearance_paint": "涂抹外观", + "cmd.appearance_pick_up": "拾取外观", + "cmd.appearance_replace": "替换外观", "cmd.assembly_bom": "物料清单", "cmd.body_rename": "重命名实体", "cmd.browser_collapse_all": "全部折叠", @@ -888,9 +892,11 @@ "cmd.plastic_snap_fit": "卡扣", "cmd.render_aging_describe": "分层表面老化", "cmd.render_backends": "渲染后端", + "cmd.render_batch": "渲染所有镜头", "cmd.render_camera_fit": "为渲染主体取景", "cmd.render_camera_get": "检查渲染相机", "cmd.render_cancel": "取消渲染", + "cmd.render_compare": "比较图像", "cmd.render_effects_describe": "镜头与创意效果", "cmd.render_export": "导出 PNG", "cmd.render_hdr_inspect": "检查 HDR 源", @@ -906,6 +912,7 @@ "cmd.render_library_surface_prepare": "准备已制作的表面贴图", "cmd.render_library_surface_unbind": "移除表面绑定", "cmd.render_library_targets": "查找渲染库目标", + "cmd.render_lights_solo": "单独显示灯光", "cmd.render_optics_bind": "保存光学绑定", "cmd.render_optics_unbind": "移除光学绑定", "cmd.render_preflight": "检查渲染请求", @@ -1017,6 +1024,7 @@ "cmd.sketch_spline_fit_point": "拟合点样条曲线", "cmd.sketch_spline_insert_point": "添加样条曲线点", "cmd.sketch_spun_profile": "旋转轮廓", + "cmd.sketch_toggle_diameter": "切换半径 / 直径", "cmd.sketch_toggle_driven": "切换被驱动尺寸", "cmd.sketch_transform": "变换", "cmd.sketch_trim_path": "沿路径修剪", @@ -1082,6 +1090,7 @@ "cmd.view_rename": "重命名命名视图", "cmd.view_right": "右视图", "cmd.view_save": "新建命名视图", + "cmd.view_shots_strip": "镜头条", "cmd.view_spin": "连续环绕", "cmd.view_tool": "导航工具", "cmd.view_top": "俯视图", @@ -1639,6 +1648,7 @@ "render.aging_target_search": "筛选实体名称", "render.aging_upward": "向上表面沉积", "render.all_controls_help": "集中显示当前所有控件;各分页可针对相应任务编辑,不改变底层请求。", + "render.all_shots_label": "所有镜头", "render.appearance_physics_separate": "视觉外观不会分配密度、热学数据或其他工程属性。", "render.availability_native": "原生组合;应用前请审阅", "render.availability_projection": "支持的部分映射;请查看范围和省略项", @@ -1793,10 +1803,13 @@ "render.effects_reset_lens": "重置镜头效果", "render.effects_seed": "图案种子", "render.export_display": "导出:显示 PNG", + "render.export_image_label": "导出图像", "render.export_linear": "导出:原始线性 EXR", "render.exr_pending": "GPU 可保留线性 EXR;压缩、多层和辅助通道仍未实现。", "render.film_grain": "摄影颗粒", "render.fit": "适配产品视图", + "render.fixed_camera": "相机", + "render.fixed_world": "世界", "render.flare_ghosts": "每光源鬼影环数", "render.flare_halo": "耀斑光晕", "render.flare_streak": "变形镜头风格光条", @@ -1823,6 +1836,12 @@ "render.hdr_primaries_srgb": "颜色原色:sRGB/D65", "render.hdr_primaries_undeclared": "源文件未声明原色;请查看渲染器的颜色要求。", "render.hdr_resource_missing": "此设计缺少已保存的HDR资源。", + "render.heading_batch": "批量", + "render.heading_frame": "取景框", + "render.heading_lens": "镜头设置", + "render.heading_results": "结果", + "render.heading_shots": "镜头", + "render.hide_shots_label": "隐藏镜头条", "render.image_advanced": "GPU 高级设置", "render.image_cancelled": "渲染已取消", "render.image_cancelling": "正在取消", @@ -1854,6 +1873,7 @@ "render.image_width": "宽度", "render.include_rig_cards": "包含被动反光板和遮光板", "render.inspect_scene": "刷新捕获的场景摘要", + "render.inspector": "检查器", "render.keep_editing": "继续编辑", "render.layer_down": "下移", "render.layer_enabled": "启用此层", @@ -1922,6 +1942,8 @@ "render.library_unfavorite": "移除收藏", "render.library_uniform_ack": "使用不含空间或高级效果的均匀近似", "render.library_usable": "可执行映射", + "render.light_anchor_pending": "暂不支持更改灯光坐标系。", + "render.lights_fixed_to": "灯光固定到", "render.linear_help": "保留降噪、曝光、色调映射、滤镜和背景处理前的 32 位浮点 RGBA。线性 sRGB/D65,预乘覆盖率。额外内存经明确准入检查;无压缩或额外通道。", "render.linear_retain": "保留原始线性 EXR", "render.linear_unavailable": "所选已完成图像没有保留 EXR。请在渲染前启用保留;旧 PNG 无法恢复原始辐亮度。", @@ -2007,6 +2029,7 @@ "render.output_over_budget": "请求图像超出所选资源范围;请明确选择兼容尺寸或配置,不会自动降级。", "render.output_ratio_refused": "关联尺寸超出此方式的上限;保留原尺寸。请解锁宽高比或选择较小值。", "render.output_swap_orientation": "交换宽度和高度", + "render.output_tools_inspector": "请在输出检查器中编辑尺寸和格式。", "render.page_aging": "老化与沉积", "render.page_all": "全部控件", "render.page_appearance": "外观", @@ -2018,6 +2041,7 @@ "render.page_lighting": "照明", "render.page_output": "输出", "render.page_scene": "场景", + "render.paint_label": "涂抹", "render.passive_stage": "地面和被动舞台", "render.passive_stage_help": "有限的被动面板仅属于渲染图像,不增加 CAD 实体或质量。应用后位置固定,与主体边界相交时会拒绝。CPU 不提供漫反射间接照明。", "render.perspective": "透视相机", @@ -2033,6 +2057,10 @@ "render.physical_prepare_plan": "准备创建计划(不应用)", "render.physical_separate": "外观不等于材料识别。这些是有来源的参考,不是经认证的等效属性。现有质量、工程材料和光学设置保持不变。", "render.physical_unknown": "尚未确定数值候选资料。必须指定牌号、配方或构造;未知不等于零。", + "render.pick_component": "组件", + "render.pick_label": "拾取", + "render.pick_up_label": "拾取", + "render.pick_waiting": "暂不支持产品拾取。", "render.post_contrast": "对比度", "render.post_gain_b": "蓝色增益", "render.post_gain_g": "绿色增益", @@ -2045,6 +2073,7 @@ "render.preview": "集成预览", "render.preview_help": "光栅着色和混合透明度。暂不支持折射、HDRI 和最终渲染。", "render.preview_image_settings_help": "实时预览使用固定工作室照明。曝光和图像照明在检查或开始时应用于图像任务。", + "render.preview_lighting_help": "实时预览仅显示直接光照,不显示阴影。", "render.preview_retry": "重试实时预览", "render.preview_unavailable_help": "实时预览不可用,但已保存设置和图像任务控件仍可访问。请修改场景或明确重试;被拒绝的场景不会每帧重建。", "render.preview_upload": "实时预览顶点数据量", @@ -2058,8 +2087,10 @@ "render.radial_distortion": "径向畸变", "render.regrade_action": "重新调整原始母版(不降噪)", "render.regrade_help": "根据所选已完成原始母版和这些显示设置创建独立 PNG。不追踪光线,不改变已捕获的尺寸、相机或灯光,也不覆盖 EXR。原始母版不保留降噪辅助数据,因此不重新降噪。可通过相同任务控件导出派生结果。", + "render.regrade_label": "重新调色", "render.reload_settings": "重新加载已保存设置", "render.replace_ground": "确认替换现有舞台", + "render.replace_label": "替换", "render.replace_saved_surface": "替换此目标已有的保存绑定", "render.restore_camera": "恢复已保存相机", "render.result_actual_help": "一个图像像素对应一个屏幕像素。", @@ -2105,6 +2136,7 @@ "render.sampling_title": "自适应与透射采样", "render.save_continue": "保存并继续", "render.save_setup": "保存设置", + "render.save_shot": "保存镜头", "render.saved_maps_runtime_conflict": "已保存表面绑定不能与临时光学覆盖或未保存 HDR 混用。请明确保存 HDR 或移除临时输入。", "render.saved_surface_remove": "移除已保存绑定", "render.saved_surfaces": "已保存表面绑定", @@ -2124,6 +2156,9 @@ "render.setup_runtime_unsupported": "此完整任务暂时无法保存:其中包含贴图或场景实体绑定。保存可移植设置前,请移除这些临时输入。", "render.setup_save_missing": "命令完成后未找到保存的渲染设置。", "render.sharpening": "细节锐化", + "render.shell_tab_appearance": "外观", + "render.shell_tab_camera": "相机", + "render.shell_tab_scene": "场景", "render.shot_duplicate": "复制已保存镜头", "render.shot_manager": "已保存镜头", "render.shot_new_name": "新镜头名称", @@ -2132,11 +2167,19 @@ "render.shot_remove_title": "删除已保存镜头?", "render.shot_rename": "重命名已保存镜头", "render.shot_saved_only": "请先保存当前草稿;复制和重命名会保留精确的保存选项与资源引用。", + "render.show_shots_label": "显示镜头条", "render.sky_ground": "地面 · 线性 RGB", "render.sky_horizon": "地平线 · 线性 RGB", "render.sky_zenith": "天顶 · 线性 RGB", "render.soft_focus": "柔焦", + "render.stage_frame": "构图", + "render.stage_light": "照明", + "render.stage_look": "外观", + "render.stage_orthographic": "正交投影", + "render.stage_output": "输出", "render.stage_panel_count": "已保存面板", + "render.stage_preview_note": "集成预览 · 直接光照", + "render.strip_label": "镜头条", "render.studio_add_area": "添加面光源", "render.studio_ambient": "恒定环境辐亮度", "render.studio_ambient_rgb": "恒定环境辐亮度(线性RGB)", @@ -2193,6 +2236,12 @@ "render.volume_max": "最大边界 · 世界坐标 mm", "render.volume_min": "最小边界 · 世界坐标 mm", "render.volume_title": "有界均匀体积", + "render.wait_batch": "暂不支持:已保存镜头渲染队列", + "render.wait_compare": "暂不支持:保留图像比较", + "render.wait_paint": "暂不支持:产品拾取和外观涂绘", + "render.wait_pick_up": "暂不支持:产品拾取和外观采样", + "render.wait_replace": "暂不支持:替换外观的所有使用处", + "render.wait_solo": "暂不支持:灯光可见性和独显控制", "sample.bracket.about": "基于 2 mm 钣金规则的基础法兰、边线法兰和卷边", "sample.bracket.name": "钣金支架", "sample.enclosure.about": "带凸缘、螺钉凸台、垫块和卡扣的抽壳长方体", @@ -2305,7 +2354,11 @@ "toolbar.render_camera": "相机", "toolbar.render_environment": "环境", "toolbar.render_lighting": "照明", + "toolbar.render_lights": "灯光", + "toolbar.render_result": "结果", "toolbar.render_scene": "场景", + "toolbar.render_stage": "舞台", + "toolbar.render_studio": "工作室", "trace.points": "路径上的 {count} 个点", "trace.stopped_by_contact": "在采样 {sample} 处结束:{a} 会穿过 {b}", "trace.stopped_by_loop": "在采样 {sample} 处结束:经过 {joint} 的环路无法再闭合", @@ -2848,6 +2901,7 @@ "ui.fully_constrained": "完全约束", "ui.function": "函数", "ui.general": "常规", + "ui.gpu_memory_lowered": "显卡内存不足:视图以较低画质绘制。", "ui.graphics": "图形", "ui.graphics_custom": "自定义", "ui.graphics_performance": "性能", diff --git a/docs/features.md b/docs/features.md index def9f238d..01979bfd6 100644 --- a/docs/features.md +++ b/docs/features.md @@ -113,6 +113,7 @@ SolidCraft's commands by area, generated by `cargo xtask features` from the comm | 3D Spline | `sketch.spline3d` | – | | Spun Profile | `sketch.spun_profile` | SKETCH › CREATE | | Text | `sketch.text` | SKETCH › CREATE | +| Toggle Radius / Diameter | `sketch.toggle_diameter` | – | | Toggle Driven Dimension | `sketch.toggle_driven` | – | | Transform (G) | `sketch.transform` | SKETCH › MODIFY | | Trim (T) | `sketch.trim` | SKETCH › MODIFY | @@ -394,6 +395,9 @@ SolidCraft's commands by area, generated by `cargo xtask features` from the comm | Appearance (A) | `appearance.assign` | SOLID › MODIFY | | Appearance Library | `appearance.library` | – | | List Appearances | `appearance.list` | – | +| Paint Appearance *(planned: [#5493](https://github.com/bherbruck/solidcraft/issues/5493))* | `appearance.paint` | RENDER APPEARANCE › APPEARANCE | +| Pick Up Appearance *(planned: [#5493](https://github.com/bherbruck/solidcraft/issues/5493))* | `appearance.pick_up` | RENDER APPEARANCE › APPEARANCE | +| Replace Appearance *(planned: [#5493](https://github.com/bherbruck/solidcraft/issues/5493))* | `appearance.replace` | RENDER APPEARANCE › APPEARANCE | ## `assembly.*` @@ -595,10 +599,12 @@ SolidCraft's commands by area, generated by `cargo xtask features` from the comm |---|---|---| | Layered Surface Aging | `render.aging.describe` | – | | Render Backends | `render.backends` | – | +| Render All Shots *(planned: [#5493](https://github.com/bherbruck/solidcraft/issues/5493))* | `render.batch` | RENDER › BATCH | | Frame Render Subject | `render.camera.fit` | – | | Inspect Render Camera | `render.camera.get` | – | | Set Render Camera | `render.camera.set` | – | | Cancel Render | `render.cancel` | – | +| Compare Images *(planned: [#5493](https://github.com/bherbruck/solidcraft/issues/5493))* | `render.compare` | RENDER › RESULT | | Lens and Creative Effects | `render.effects.describe` | – | | Export Render Image | `render.export` | – | | Inspect HDR Source | `render.hdr.inspect` | – | @@ -614,6 +620,7 @@ SolidCraft's commands by area, generated by `cargo xtask features` from the comm | Prepare Authored Surface Maps | `render.library.surface.prepare` | – | | Remove Surface Binding | `render.library.surface.unbind` | – | | Find Render Library Targets | `render.library.targets` | – | +| Solo Light *(planned: [#5493](https://github.com/bherbruck/solidcraft/issues/5493))* | `render.lights.solo` | RENDER SCENE › LIGHTS | | Save Optical Binding | `render.optics.bind` | – | | Remove Optical Binding | `render.optics.unbind` | – | | Check Render Request | `render.preflight` | – | @@ -674,8 +681,10 @@ SolidCraft's commands by area, generated by `cargo xtask features` from the comm | Normal to Selection | `view.normal_to` | – | | Perspective view | `view.perspective` | – | | Rename Named View | `view.rename` | – | +| Render Stage | `view.render_stage` | – | | Right View (Ctrl+4) | `view.right` | – | | New Named View | `view.save` | – | +| Shots Strip | `view.shots_strip` | RENDER CAMERA › SHOTS | | Continuous orbit | `view.spin` | – | | Navigation tool | `view.tool` | – | | Top View (Ctrl+5) | `view.top` | – | From 74d1db902e1b3f080e16b28fe2d7d8eea1f0feea Mon Sep 17 00:00:00 2001 From: Dahak Builds Date: Tue, 27 Oct 2026 19:22:49 +0000 Subject: [PATCH 082/102] Turkish locale: complete tr.json catalog (#6240) (#7668) * claim: #6240 * i18n(tr): complete the Turkish catalog with 1280 missing messages --------- Co-authored-by: Dahak Builds --- assets/locales/tr.json | 1282 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 1281 insertions(+), 1 deletion(-) diff --git a/assets/locales/tr.json b/assets/locales/tr.json index 06c015ff4..66808a562 100644 --- a/assets/locales/tr.json +++ b/assets/locales/tr.json @@ -5,7 +5,10 @@ "2. Attach your screenshot: copy and paste it, or save and upload the PNG.": "2. Ekran görüntüsünü ekleyin: kopyalayıp yapıştırın veya PNG olarak kaydedip yükleyin.", "2D": "2D", "3. Click Submit new issue on GitHub to send your report.": "3. Raporu göndermek için GitHub'da Submit new issue düğmesine tıklayın.", + "A Single hole snaps to the middle of its face and to the centres of its round edges": "Tek Delik, yüzün ortasına ve yuvarlak kenarlarının merkezlerine yapışır", "A new configuration, a copy of the active one": "Etkin konfigürasyonun kopyası olan yeni bir konfigürasyon", + "A placed Single hole has a handle to drag it, and picking its face again moves the hole there instead of taking it out": "Yerleştirilmiş bir Tek Delik, sürüklemek için bir tutamağa sahiptir; yüzünü yeniden seçmek deliği dışarı almak yerine oraya taşır", + "A short title for the problem (optional)": "Sorun için kısa bir başlık (isteğe bağlı)", "ARRANGE": "DÜZENLE", "About SolidCraft": "SolidCraft hakkında", "Acceleration": "İvme", @@ -14,23 +17,34 @@ "Active": "Etkin", "Active rule": "Etkin kural", "Add": "Ekle", + "Add Column": "Sütun Ekle", "Add Key": "Tuş ekle", "Add Mid Radius": "Ara yarıçap ekle", "Add Row": "Satır ekle", + "Add a tool": "Araç ekle", + "Add bend": "Büküm ekle", "Add condition": "Koşul ekle", "Add or edit rule": "Kural ekle veya düzenle", + "Add to New Folder": "Yeni Klasöre Ekle", + "Advanced": "Gelişmiş", "Against": "Karşı", "Alignment": "Hizalama", + "All Lines": "Tüm Çizgiler", "All Sketch Points": "Tüm eskiz noktaları", "All components": "Tüm bileşenler", "All open designs": "Tüm açık tasarımlar", "Allowed expressions, separated by semicolons": "Noktalı virgülle ayrılmış izin verilen ifadeler", "Also deletes": "Bunları da siler", + "Anchor": "Çapa", "Angle 2": "Açı 2", + "Angle Display": "Açı görünümü", "Animate": "Canlandır", + "Another bend on the far edge of the last flange": "Son flanşın uzak kenarında bir büküm daha", + "App/system information and command settings are included. Review private details before sharing.": "Uygulama/sistem bilgileri ve komut ayarları eklenir. Paylaşmadan önce gizli ayrıntıları gözden geçirin.", "Appearance name": "Görünüm adı", "Applied Radius": "Uygulanan yarıçap", "Apply To": "Uygulama hedefi", + "Apply library appearance": "Kitaplık görünümünü uygula", "Apply to selection": "Seçime uygula", "Apply your appearance first. Exports assigned appearances and materials created in this design.": "Önce görünümünüzü uygulayın. Atanan görünümleri ve bu tasarımda oluşturulan malzemeleri dışa aktarır.", "Arc length": "Yay uzunluğu", @@ -41,13 +55,23 @@ "BLEND SURFACE": "GEÇİŞ YÜZEYİ", "BOUNDARY SURFACE": "SINIR YÜZEYİ", "BROWSER": "TARAYICI", + "Bar": "Çubuk", + "Bend": "Büküm", + "Bend Edges": "Büküm kenarları", "Bend Line Position": "Büküm çizgisi konumu", "Bend Position": "Büküm konumu", "Bend Radius": "Büküm yarıçapı", "Bend Table": "Büküm tablosu", "Bends": "Bükümler", "Bodies": "Gövdeler", + "Bodies (optional)": "Gövdeler (isteğe bağlı)", "Body": "Gövde", + "Body (last if none)": "Gövde (seçilmezse sonuncusu)", + "Body to split": "Bölünecek gövde", + "Body, or faces to take out": "Gövde veya çıkarılacak yüzler", + "Bottom Left": "Sol alt", + "Bottom Middle": "Alt orta", + "Bottom Right": "Sağ alt", "Boundary": "Sınır", "Bounding box": "Sınırlayıcı kutu", "CHECK": "DENETLE", @@ -59,32 +83,46 @@ "CSV or JSON: updates existing parameters, adds new ones": "CSV veya JSON: mevcut parametreleri günceller, yenilerini ekler", "Capture All Positions": "Tüm konumları yakala", "Capture Pos.": "Konumu yakala", + "Catch Depth": "Tutucu derinliği", "Catch Direction": "Yakalama yönü", + "Catch Length": "Tutucu uzunluğu", "Cells": "Hücreler", "Center X": "Merkez X", "Center Y": "Merkez Y", "Center of mass": "Kütle merkezi", "Centre to centre": "Merkezden merkeze", + "Centroid": "Ağırlık merkezi", "Chamfer Type": "Pah türü", + "Channel": "U profil", "Check collisions": "Çarpışmaları kontrol et", "Checked": "Kontrol edildi", + "Choose Variable radius or Spline in Type.": "Tür olarak Değişken yarıçap veya Splin seçin.", "Choose a new plane. Sketch geometry and dimensions stay unchanged in its two-dimensional coordinates.": "Yeni bir düzlem seçin. Eskiz geometrisi ve ölçüler, iki boyutlu koordinatlarında değişmeden kalır.", "Choose…": "Seç…", + "Circle center": "Daire merkezi", "Circular": "Dairesel", "Circumference": "Çevre", "Clockwise": "Saat yönünde", "Close draft": "Taslağı kapat", + "Collapse": "Daralt", "Collisions": "Çarpışmalar", "Colour": "Renk", + "Command": "Komut", "Comment": "Yorum", + "Component 1": "Bileşen 1", + "Component 2": "Bileşen 2", "Component1": "Bileşen1", + "Components": "Bileşenler", "Config Table": "Yapılandırma tablosu", "Configuration": "Konfigürasyon", "Configuration rules": "Konfigürasyon kuralları", "Contact": "Temas", "Contact Sets": "Temas kümeleri", "Contact sets": "Temas kümeleri", + "Continue on GitHub": "GitHub'da devam et", "Continuity": "Süreklilik", + "Control Radius": "Kontrol yarıçapı", + "Copies the definition only. Assign it from Physical Material when ready.": "Yalnızca tanımı kopyalar. Hazır olduğunda Fiziksel Malzeme'den atayın.", "Copy Error Message": "Hata mesajını kopyala", "Copy Warning Message": "Uyarı mesajını kopyala", "Copy all licences": "Tüm lisansları kopyala", @@ -93,32 +131,54 @@ "Copy screenshot": "Ekran görüntüsünü kopyala", "Corner Relief": "Köşe boşluğu", "Corner Relief Shape": "Köşe boşaltma şekli", + "Corner radius": "Köşe yarıçapı", "Counterbore depth": "Düz havşa derinliği", + "Counterbore Ø": "Yiv Ø", "Countersink angle": "Konik havşa açısı", + "Countersink Ø": "Havşa Ø", + "Create Hole": "Delik Oluştur", "Create Issue — review draft": "Sorun oluştur — taslağı gözden geçirin", + "Create Issue…": "Sorun Oluştur…", "Cross curves": "Çapraz eğriler", "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", "Curv. Comb": "Eğrilik taragı", "Curvature (G2)": "Eğrilik (G2)", "Curvature change (G3)": "Eğrilik değişimi (G3)", + "Custom": "Özel", "Customize Toolbar": "Araç çubuğunu özelleştir", + "Customize…": "Özelleştir…", + "Cylindrical face": "Silindirik yüz", "Delete": "Sil", + "Delete Selected Features…": "Seçili Özellikleri Sil…", + "Delete Selected Folders": "Seçili Klasörleri Sil", "Delete all": "Tümünü sil", "Delete rule": "Kuralı sil", "Delete the row": "Satırı sil", "Delete the set": "Kümeyi sil", "Density": "Yoğunluk", "Dependents": "Bağımlılar", + "Describe the problem you saw": "Gördüğünüz sorunu açıklayın", + "Describe what happened before continuing.": "Devam etmeden önce ne olduğunu açıklayın.", "Designs you open or save appear here.": "Açtığınız veya kaydettiğiniz tasarımlar burada görünür.", "Determined by To Object. Choose Angle to edit the angular extent.": "Nesneye kadar seçeneğiyle belirlenir. Açısal kapsamı düzenlemek için Açı seçeneğini seçin.", + "Diameter": "Çap", "Direction": "Yön", "Discard": "At", + "Distance": "Mesafe", + "Distance 1": "Mesafe 1", "Do not export hidden edges": "Gizli kenarları dışa aktarma", "Don't ask again": "Bir daha sorma", "Double-click to rename": "Yeniden adlandırmak için çift tıklayın", "Double-clicking the middle button in the view: Home (the home view, framing what is shown), Fit (frame what is shown, keeping the orientation) or nothing": "Görünümde orta tuşla çift tıklama: Başlangıç (gösterileni çerçeveleyen başlangıç görünümü), Sığdır (yönü koruyarak gösterileni çerçeveler) veya hiçbir şey", + "Drag to move the boss across the model. It snaps to sketch points on the face.": "Kabarığı model üzerinde hareket ettirmek için sürükleyin. Yüzdeki eskiz noktalarına yapışır.", + "Drag to move the hole; click to remove it": "Deliği hareket ettirmek için sürükleyin; kaldırmak için tıklayın", + "Drag to move the rest across the model. It snaps to sketch points on the face.": "Dayamayı model üzerinde hareket ettirmek için sürükleyin. Yüzdeki eskiz noktalarına yapışır.", + "Drag to move the snap fit across the model. It snaps to sketch points on the face.": "Kilit geçmeyi model üzerinde hareket ettirmek için sürükleyin. Yüzdeki eskiz noktalarına yapışır.", + "Drag to point the catch in another direction.": "Tutucuyu başka bir yöne çevirmek için sürükleyin.", + "Drag to turn the rest in 5° steps. Hold Alt or Ctrl to turn it freely.": "Dayamayı 5° adımlarla çevirmek için sürükleyin. Serbestçe çevirmek için Alt veya Ctrl tuşunu basılı tutun.", "Drive Joint": "Bağlantıyı tahrik et", "Duration": "Süre", "Edges": "Kenarlar", @@ -126,80 +186,122 @@ "Edit Profile Sketch": "Profil eskizini düzenle", "Enable rule": "Kuralı etkinleştir", "Enabled": "Etkin", + "End Radius": "Bitiş yarıçapı", "End bulge": "Bitiş şişkinliği", "End continuity": "Bitiş sürekliliği", + "Expand": "Genişlet", + "Expected result (optional)": "Beklenen sonuç (isteğe bağlı)", "Explode": "Patlat", "Explode Text": "Metni parçala", "Export Animation…": "Animasyonu dışa aktar…", + "Export Bend Table…": "Büküm Tablosunu Dışa Aktar…", "Export CSV…": "CSV dışa aktar…", "Export Current View as DXF": "Geçerli görünümü DXF olarak dışa aktar", "Export Current View as DXF…": "Geçerli görünümü DXF olarak dışa aktar…", "Export DXF": "DXF'i dışa aktar", "Export DXF…": "DXF'i dışa aktar…", "Export JSON…": "JSON dışa aktar…", + "Export design library...": "Tasarım kitaplığını dışa aktar...", "Export hidden edges as dashed lines": "Gizli kenarları kesikli çizgi olarak dışa aktar", + "Exported by SolidWorks, which usually saves Y up": "Genellikle Y ekseni yukarı olacak şekilde kaydeden SolidWorks tarafından dışa aktarıldı", "Expression": "İfade", "Extend to meet": "Buluşana kadar uzat", "Extents": "Kapsamlar", "FILES": "DOSYALAR", "FLAT": "AÇINIM", "Face": "Yüz", + "Face Appearance": "Yüz görünümü", "Face attachment lost": "Yüze bağlama kayboldu", + "Face center": "Yüz merkezi", "Faces": "Yüzler", "Faces / edges / vertices": "Yüzler / kenarlar / köşe noktaları", + "Faces to split": "Bölünecek yüzler", "Fastener": "Bağlantı elemanı", "Favorites": "Sık kullanılanlar", "Favourite": "Favori", "Feature": "Özellik", "Files from many CAD programs have Y up, so they open lying on their back here (Z up).": "Birçok CAD programının dosyalarında Y yukarıyı gösterir; bu yüzden burada (Z yukarı) sırtüstü yatar hâlde açılırlar.", "Filter": "Filtre", + "Filter…": "Filtrele…", "Find in Browser": "Tarayıcıda bul", "Finish": "Bitir", + "First plane": "Birinci düzlem", + "Fit and G2 corners require Constant radius.": "Uyum ve G2 köşeler Sabit yarıçap gerektirir.", + "Fixed Face": "Sabit yüz", + "Flange thickness": "Flanş kalınlığı", + "Flanges": "Flanşlar", "Flat Pattern": "Açınım", "Flat size": "Açınım boyutu", "Follow camera (Look At sketches)": "Kamera takibi (eskizlerde Bak)", "Follow the camera (Look At sketches)": "Kamera takibi (eskizlerde Bak)", "Font": "Yazı tipi", + "From": "Şuradan", "From Bodies": "Gövdelerden", "From edges": "Başlangıç kenarları", "Full Length": "Tam uzunluk", + "Full thread depth": "Tam diş derinliği", + "Further Bends": "Ek bükümler", + "G2 corners require a constant radius and Exact fit. G2 corner construction is not supported yet.": "G2 köşeler sabit yarıçap ve Tam oturum gerektirir. G2 köşe inşası henüz desteklenmiyor.", "Gap": "Boşluk", "Grid": "Izgara", "HISTORY": "GEÇMİŞ", + "Halo under sketch curves": "Eskiz eğrilerinin altında hale", "Height": "Yükseklik", + "Height From": "Yükseklik başlangıcı", "Hidden edges": "Gizli kenarlar", "History layout": "Geçmiş düzeni", + "History names": "Geçmiş adları", + "Hole (optional)": "Delik (isteğe bağlı)", "Holes": "Delikler", "Holes (edges on them)": "Delikler (kenarları)", "Home view": "Başlangıç görünümü", "Horiz./Vert.": "Yatay/Dikey", + "I-Beam": "I profil", "IMAGES": "GÖRSELLER", + "Import material into design": "Malzemeyi tasarıma aktar", "Import…": "İçe aktar…", "In This Design": "Bu tasarımda", "In place (surfaces)": "Yerinde (yüzeyler)", "In plane": "Düzlemde", + "Included": "Dahil", + "Inner Sharp": "İç keskin", "Inside": "İç", + "Instant": "Anlık", + "Interface font": "Arayüz yazı tipi", "Interferes": "Girişim var", + "Invert": "Ters çevir", "Isocurve": "İzoeğri", "Issue title": "Sorun başlığı", + "Items": "Öğeler", "JOINTS": "MAFSALLAR", "Joint Origin1": "Bağlantı orijini1", "Keep (points on it)": "Koru (üzerindeki noktalar)", "Keep Tools": "Araçları koru", "Keep of the other surface": "Diğer yüzeyden korunacak", + "Key a joint's value at this step": "Eklemin değerini bu adımda anahtar kare olarak kaydet", + "Keys": "Anahtar kareler", + "L-Angle": "L profil", "LIBRARY": "KİTAPLIK", "LINKS": "BAĞLANTILAR", "Later": "Daha sonra", "Leave it": "Olduğu gibi bırak", + "Left Middle": "Sol orta", "Legacy face attachment. Rebinding to a certified face creates an exact attachment.": "Eski tip yüz bağlaması. Doğrulanmış bir yüze yeniden bağlamak tam bir bağlama oluşturur.", "Length": "Uzunluk", "Length units": "Uzunluk birimleri", "Letter Spacing": "Harf aralığı", "Library": "Kitaplık", "Library file": "Kitaplık dosyası", + "Limits": "Sınırlar", "Line Spacing": "Satır aralığı", + "Line Type": "Çizgi türü", + "Lines": "Çizgiler", + "Listing the installed fonts…": "Yüklü yazı tipleri listeleniyor…", + "Load library": "Kitaplık yükle", "Local library": "Yerel kitaplık", "Loop": "Döngü", + "M5 or M5x0.5": "M5 veya M5x0.5", + "M5, M5x0.5, 1/4-20 UNC": "M5, M5x0.5, 1/4-20 UNC", "MANAGE": "YÖNET", "MATERIALS": "MALZEMELER", "MODEL": "MODEL", @@ -209,22 +311,32 @@ "Mass Center": "Kütle merkezi", "Matched restrictions check the final values.": "Koşulları sağlanan kısıtlamalar son değerleri denetler.", "Material": "Malzeme", + "Material Outside": "Malzeme dışarıda", + "Material copied. Existing body assignments are unchanged.": "Malzeme kopyalandı. Mevcut gövde atamaları değişmedi.", "Max": "Maks", + "Maximum": "Maksimum", + "Mesh body": "Ağ gövdesi", "Mid Radius": "Ara yarıçap", "Middle double-click": "Orta tuşla çift tıklama", "Min": "Min", + "Minimum": "Minimum", + "Mirror Plane": "Ayna düzlemi", "Mitre": "Gönye", "Model Parameters": "Model parametreleri", "Modeled": "Modellenmiş", "More toolbar panels": "Diğer araç çubuğu panelleri", "Motion": "Hareket", + "Mouse gestures": "Fare jestleri", + "Mouse gestures only work with the SolidWorks mouse mode (the wheel orbits, Ctrl + wheel pans).": "Fare jestleri yalnızca SolidWorks fare moduyla çalışır (tekerlek döndürür, Ctrl + tekerlek kaydırır).", "Move / Copy": "Taşı / Kopyala", "Move Type": "Taşıma türü", "Move down": "Aşağı taşı", "Move earlier": "Öne al", + "Move holes by clicking or dragging": "Delikleri tıklayarak veya sürükleyerek taşıyın", "Move later": "Sonraya al", "Move up": "Yukarı taşı", "Name": "Ad", + "Name on import": "İçe aktarımda ad", "Nearest": "En yakın", "New": "Yeni", "New Comp.": "Yeni bileşen", @@ -234,17 +346,32 @@ "No crash reports.": "Çökme raporu yok.", "No matching appearance presets.": "Eşleşen görünüm ön ayarı yok.", "No matching appearances": "Eşleşen görünüm yok", + "No matching physical materials.": "Eşleşen fiziksel malzeme yok.", + "No visible bodies or sketches to export.": "Dışa aktarılacak görünen gövde veya eskiz yok.", + "Nominal diameter": "Nominal çap", "None": "Hiçbiri", "Not available yet": "Henüz kullanılamıyor", + "Not saved yet": "Henüz kaydedilmedi", "Notch": "Çentik", "OUTPUT": "ÇIKTI", + "Of": "Hareket derecesi", + "On your computer": "Bilgisayarınızda", "Opacity": "Opaklık", "Open GitHub draft": "GitHub taslağını aç", + "Open bodies (no volume)": "Açık gövdeler (hacim yok)", + "Open library...": "Kitaplık aç...", "Open local libraries in the desktop app. You can export this design's library here.": "Yerel kitaplıkları masaüstü uygulamasında açın. Bu tasarımın kitaplığını buradan dışa aktarabilirsiniz.", + "Open surface — no volume": "Açık yüzey — hacim yok", "Open-source parametric 3D CAD in Rust. Licensed MIT OR Apache-2.0.": "Rust ile yazılmış açık kaynaklı parametrik 3D CAD. Lisans: MIT OR Apache-2.0.", + "Opens your browser and copies the report text for you to paste into GitHub.": "Tarayıcınızı açar ve raporu GitHub'a yapıştırmanız için rapor metnini panoya kopyalar.", + "Opens your browser. Review and submit your report on GitHub.": "Tarayıcınızı açar. Raporunuzu GitHub'da gözden geçirip gönderin.", "Operator": "İşleç", + "Orbit (right drag)": "Döndürme (sağ sürükleme)", "Other side": "Diğer taraf", "Other surface (mutual trim)": "Diğer yüzey (karşılıklı kırpma)", + "Other way": "Ters yön", + "Outer Sharp": "Dış keskin", + "Outer radius": "Dış yarıçap", "Outside": "Dış", "Overall length": "Toplam uzunluk", "Param. Graph": "Parametre grafiği", @@ -254,11 +381,15 @@ "Path": "Yol", "Pattern": "Dizi", "Per Edge": "Kenar başına", + "Physical material definitions": "Fiziksel malzeme tanımları", "Pick the tool bodies": "Araç gövdelerini seçin", "Picked": "Seçilenler", "Picked point": "Seçilen nokta", + "Pitch": "Adım", + "Pivot": "Dönme noktası", "Place at the origin instead": "Bunun yerine orijine yerleştir", "Plastic Rules": "Plastik kuralları", + "Play the joint's motion in the view": "Eklemin hareketini görünümde oynat", "Playback": "Oynatma", "Plot": "Grafik", "Position": "Konum", @@ -266,35 +397,51 @@ "Position (G0)": "Konum (G0)", "Position along the edge, 0 at the start end, 1 at the other": "Kenar boyunca konum: başlangıç ucunda 0, diğer uçta 1", "Preferences › Design turns the offer back on": "Tercihler › Tasarım teklifi yeniden açar", + "Preview": "Önizleme", "Preview Row": "Satırı önizle", "Preview leaves the current design unchanged.": "Önizleme geçerli tasarımı değiştirmez.", + "Profile / Edges": "Profil / Kenarlar", + "Profiles or curves": "Profiller veya eğriler", "Profiles/Curves": "Profiller/Eğriler", "Quantity": "Adet", "RECENT": "SON KULLANILANLAR", "REFERENCE": "REFERANS", "RULED SURFACE": "REGLE YÜZEY", "RULES": "KURALLAR", + "Radius": "Yarıçap", "Radius Fit": "Yarıçap uydurma", "Ratio": "Oran", "Reattach selected face": "Seçili yüze yeniden bağla", "Recover": "Kurtar", "Recover unsaved design?": "Kaydedilmemiş tasarım kurtarılsın mı?", "Rectangular": "Dikdörtgen", + "Rectangular Tube": "Dikdörtgen boru", "Reference face": "Referans yüzü", "Remove Tools": "Araçları kaldır", + "Remove condition": "Koşulu kaldır", + "Remove from Folder": "Klasörden Kaldır", "Remove from list": "Listeden kaldır", "Remove override": "Geçersiz kılmayı kaldır", "Remove private design details or paths before sharing.": "Paylaşmadan önce özel tasarım ayrıntılarını veya dosya yollarını kaldırın.", "Remove screenshot": "Ekran görüntüsünü kaldır", "Remove the column": "Sütunu kaldır", "Remove the track": "İzi kaldır", + "Remove this bend": "Bu bükümü kaldır", "Remove this point": "Bu noktayı kaldır", + "Rename Feature": "Özelliği Yeniden Adlandır", + "Rename Folder": "Klasörü Yeniden Adlandır", + "Reopen designs": "Tasarımları yeniden aç", + "Reopen the designs that were open when SolidCraft was last closed": "SolidCraft son kapatıldığında açık olan tasarımları yeniden aç", + "Replace existing library file": "Mevcut kitaplık dosyasının üzerine yaz", "Report a bug — review a screenshot and open a GitHub draft": "Hata bildir — ekran görüntüsünü kontrol edin ve bir GitHub taslağı açın", + "Report text copied. Paste it into GitHub and submit your report there.": "Rapor metni kopyalandı. GitHub'a yapıştırın ve raporunuzu orada gönderin.", + "Reports are public. A GitHub account is required.": "Raporlar herkese açıktır. Bir GitHub hesabı gerekir.", "Reset Toolbar": "Araç çubuğunu sıfırla", "Resize Part": "Parçayı yeniden boyutlandır", "Restore View": "Görünümü geri yükle", "Restore outer boundary": "Dış sınırı geri yükle", "Restore the inherited component or physical material appearance": "Bileşenden veya fiziksel malzemeden devralınan görünümü geri yükle", + "Restore this studio's tools": "Bu stüdyonun araçlarını geri yükle", "Result": "Sonuç", "Retake screenshot": "Ekran görüntüsünü yeniden al", "Reverse": "Ters çevir", @@ -304,34 +451,55 @@ "Revert Pos.": "Konumu geri al", "Revert Position": "Konumu geri al", "Review the report and screenshot before opening GitHub.": "GitHub'ı açmadan önce raporu ve ekran görüntüsünü gözden geçirin.", + "Review your report on GitHub and click Submit new issue to publish it.": "Raporunuzu GitHub'da gözden geçirin ve yayımlamak için Submit new issue'ya tıklayın.", + "Rib Length": "Nervür uzunluğu", + "Rib Offset": "Nervür ofseti", + "Rib Thickness": "Nervür kalınlığı", + "Ribs": "Nervürler", + "Right Middle": "Sağ orta", "Rim Edge": "Ağız kenarı", + "Ring of tools on the right button": "Sağ tuşta halka araç menüsü", + "Roll Back Here": "Buraya Geri Sar", "Roll History Marker Here": "Geçmiş işaretçisini buraya taşı", + "Root radius": "Kök yarıçapı", "Round": "Yuvarlak", + "Round Bar": "Yuvarlak çubuk", + "Round Tube": "Yuvarlak boru", "Rule": "Kural", "Rule name": "Kural adı", "Rules run from top to bottom. Matched drives change effective values.": "Kurallar yukarıdan aşağıya çalışır. Koşulları sağlanan sürücü kurallar etkin değerleri değiştirir.", "SECTION": "KESİT", "SURFACE QUALITY": "YÜZEY KALİTESİ", + "Same way": "Aynı yön", "Save Rule": "Kuralı kaydet", "Save View": "Görünümü kaydet", + "Save screenshot…": "Ekran görüntüsünü kaydet…", "Save the study as an animated GIF, seen as the viewport shows it": "Etüdü görünüm alanında göründüğü gibi animasyonlu GIF olarak kaydet", "Saved preview. Geometry is being checked before editing.": "Kaydedilmiş önizleme. Düzenlemeden önce geometri kontrol ediliyor.", "Scale factor": "Ölçek faktörü", "Scene": "Sahne", + "Screenshot (optional)": "Ekran görüntüsü (isteğe bağlı)", "Search": "Ara", "Search commands": "Komutlarda ara", "Search this library": "Bu kitaplıkta ara", + "Second plane": "İkinci düzlem", "Section": "Kesit", + "Section (optional)": "Kesit (isteğe bağlı)", "Section position": "Kesit konumu", + "Sections (one sketch each)": "Kesitler (her biri bir eskiz)", + "Select Other": "Başka Seç", "Select Other: hold the left button still on the model (or right-click › Select Other…) to list everything under the cursor; click again on the same spot to select the next thing there. Double-click the middle button to go Home (Preferences › Navigation).": "Diğerini seç: İmlecin altındaki her şeyi listelemek için sol tuşu model üzerinde hareket ettirmeden basılı tutun (veya sağ tık › Diğerini seç…); oradaki bir sonraki öğeyi seçmek için aynı noktaya tekrar tıklayın. Başlangıç görünümüne dönmek için orta tuşla çift tıklayın (Ayarlar › Gezinme).", "Select bodies (a face picks its body)": "Gövdeleri seçin (bir yüz kendi gövdesini seçer)", "Select bodies or faces instead": "Bunun yerine gövde veya yüz seçin", + "Select edges": "Kenarları seç", "Selection filter": "Seçim filtresi", "Semantic faces share their appearance across instances.": "Anlamsal yüzler görünümlerini örnekler arasında paylaşır.", "Send your report on GitHub": "Raporunuzu GitHub üzerinden gönderin", + "Shaded": "Gölgeli", "Shape": "Şekil", "Sheet Rules": "Sac kuralları", "Show Agent Cursor": "Ajan imlecini göster", + "Show ghost": "Hayaleti göster", "Show in folder": "Klasörde göster", "Show the pointer an AI agent moves (#35)": "Bir AI ajanının hareket ettirdiği imleci göster (#35)", "Show tool at cursor": "Aracı imlecin yanında göster", @@ -344,9 +512,11 @@ "Sketch plane has no body-face attachment.": "Eskiz düzleminin bir gövde yüzüne bağlaması yok.", "Sketch points": "Eskiz noktaları", "Slot width": "Yuva genişliği", + "Snap to face and edge centres": "Yüz ve kenar merkezlerine yapış", "SolidCraft closed before these designs were saved. Their last autosave can be opened.": "SolidCraft bu tasarımlar kaydedilmeden önce kapandı. Son otomatik kayıtları açılabilir.", "Specialise": "Özelleştir", "Speed": "Hız", + "Splitting tool": "Bölme aracı", "Square": "Kare", "Stand it up": "Dik çevir", "Stand it up: a quarter turn about X, as one Move feature you can undo.": "Dik çevir: X etrafında çeyrek tur; geri alınabilen tek bir Taşı özelliği olarak eklenir.", @@ -356,17 +526,29 @@ "Start continuity": "Başlangıç sürekliliği", "Step": "Adım", "Steps": "Adımlar", + "Steps to reproduce (optional)": "Yineleme adımları (isteğe bağlı)", "Stitch the kept pieces": "Korunan parçaları dik", "Stitch to both bodies": "Her iki gövdeye dik", + "Studio": "Stüdyo", "Study": "Etüt", "Style": "Stil", + "Summary": "Özet", + "Suppress": "Bastır", "Suppressed": "Bastırılmış", "Surface": "Yüzey", + "Surface, or faces to turn over": "Yüzey veya çevrilecek yüzler", "Swap Ends": "Uçları değiştir", "TRIM": "KIRP", + "Tangent": "Teğet", "Tangent (G1)": "Teğet (G1)", "Tangent Chain": "Teğet zincir", + "Tangent chain": "Teğet zinciri", + "Tangent to Edge": "Kenara teğet", + "Tap drill diameter": "Kılavuz matkap çapı", + "Target": "Hedef", + "Target Body": "Hedef gövde", "Tear": "Yırtık", + "Technical details": "Teknik ayrıntılar", "The dashed sketch is a saved plane guide. Select a new face to repair the attachment.": "Kesikli eskiz, kaydedilmiş bir düzlem kılavuzudur. Bağlamayı onarmak için yeni bir yüz seçin.", "The saved author occurrence is missing. Select a valid author placement before rebinding.": "Kaydedilmiş kaynak örnek eksik. Yeniden bağlamadan önce geçerli bir kaynak yerleşimi seçin.", "Then": "Sonra", @@ -378,24 +560,38 @@ "This child is shared. Deleting it removes it from every copy of its parent.": "Bu alt öğe paylaşılıyor. Silindiğinde üst öğesinin tüm kopyalarından kaldırılır.", "This child is shared. Position changes apply to every copy of its parent.": "Bu alt öğe paylaşılıyor. Konum değişiklikleri üst öğesinin tüm kopyalarına uygulanır.", "This face cannot provide a durable attachment. Choose another face or explicitly use a fixed plane.": "Bu yüz kalıcı bir bağlama sağlayamaz. Başka bir yüz seçin veya açıkça sabit bir düzlem kullanın.", + "This image is not attached to GitHub yet. Copy or save it, then attach it on GitHub.": "Bu görüntü henüz GitHub'a eklenmedi. Kopyalayın veya kaydedin, ardından GitHub'a ekleyin.", + "Thread depth": "Diş derinliği", + "Thread diameter": "Diş çapı", + "To": "Şuraya", "To Offset": "Ofsete kadar", "To edges": "Bitiş kenarları", + "Toe radius": "Ayak yarıçapı", "Tolerance": "Tolerans", "Too close": "Çok yakın", + "Tool Bodies": "Araç gövdeleri", + "Tools": "Araçlar", + "Tools, clockwise from the top": "Araçlar, üstten saat yönünde", + "Top Left": "Sol üst", + "Top Middle": "Üst orta", + "Top Right": "Sağ üst", "Trimming tool (plane, face or curves)": "Kırpma aracı (düzlem, yüz veya eğriler)", "Turn off section analysis before exporting the view.": "Görünümü dışa aktarmadan önce kesit analizini kapatın.", "Type": "Tür", "UNTRIM": "KIRPMAYI KALDIR", "Unit": "Birim", + "Unsuppress": "Bastırmayı kaldır", "Updating the preview": "Önizleme güncelleniyor", "Use active author placement": "Etkin kaynak yerleşimini kullan", "Use fixed plane": "Sabit düzlem kullan", "Use saved fixed plane": "Kaydedilmiş sabit düzlemi kullan", "Use selected face as fixed plane": "Seçili yüzü sabit düzlem olarak kullan", + "Use the SolidWorks mouse mode": "SolidWorks fare modunu kullan", "User Parameters": "Kullanıcı parametreleri", "VIEW": "GÖRÜNÜM", "VIEWS": "GÖRÜNÜMLER", "Value": "Değer", + "Variable Radius": "Değişken yarıçap", "Velocity": "Hız", "Vertices": "Köşe noktaları", "View navigator": "Görünüm gezgini", @@ -403,16 +599,56 @@ "Wall": "Cidar", "Wall Location": "Cidar konumu", "Wall Thickness": "Et kalınlığı", + "Web thickness": "Ağ kalınlığı", + "What did you do just before the problem? A short list is enough": "Sorundan hemen önce ne yaptınız? Kısa bir liste yeterlidir", + "What did you expect to see?": "Ne görmeyi beklemiştiniz?", + "What happened?": "Ne oldu?", "When": "Eğer", "Width": "Genişlik", "Will fail": "Başarısız olacak", + "With gestures on, the right button no longer orbits the view: hold it and move to open the ring, then touch a tool's zone. A plain right-click still opens the menu.": "Jestler açıkken sağ tuş görünümü döndürmez: halkayı açmak için basılı tutup hareket ettirin, ardından bir aracın bölgesine dokunun. Basit bir sağ tıklama menüyü yine açar.", + "X": "X", + "X Angle": "X açısı", "X angle": "X açısı", "X distance": "X mesafesi", + "Y": "Y", + "Y Angle": "Y açısı", "Y angle": "Y açısı", "Y distance": "Y mesafesi", + "Z": "Z", + "Z Angle": "Z açısı", + "Z Distance": "Z mesafesi", "Z angle": "Z açısı", "Z distance": "Z mesafesi", "Zebra": "Zebra", + "ai.connected_toast": "SolidCraft artık {clients} içinde kullanılabilir. Kullanmak için yeniden başlatın (Ayarlar > Asistan).", + "ai.prefs.allow_control": "AI ajanlarının bağlanmasına izin ver (denetim kanalı / MCP)", + "ai.prefs.allow_control_note": "Yalnızca bu bilgisayarda bir denetim kanalı açar (127.0.0.1, port 27878 veya sonraki boş port). Bağlanan bir program, ayrıca yalnızca kullanıcı hesabınızın okuyabildiği, her açılışta yeniden üretilen gizli bir belirteç göstermelidir. SolidCraft bir sonraki açılışında etkili olur. Kapalı: SolidCraft'ı --control ile başlatmadıkça hiçbir şey dinlemez.", + "ai.prefs.availability": "Asistan kontrolleri", + "ai.prefs.background_commands": "Ajan komutlarını arka planda çalıştır", + "ai.prefs.connect_apps": "SolidCraft'ı bu bilgisayardaki AI uygulamalarına aç", + "ai.prefs.connect_apps_note": "SolidCraft başladığında, bu bilgisayarda bulduğu AI uygulamalarına (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code) onu bir MCP sunucusu olarak ekler; böylece bir ajan kurulum yapmadan kullanabilir. Yalnızca solidcraft girdisi eklenir veya yolu yenilenir; değiştirdiğiniz bir girdiye dokunulmaz ve dosya önce yedeklenir. Kapalı: eklediği girdiler kaldırılır. Yardım > AI asistanlarını bağla… bunu elle yapar.", + "ai.prefs.follow_camera": "Kamerayı eskizlere çevir", + "ai.prefs.follow_camera_off": "Otomatik kamera takibi kapalı.", + "ai.prefs.follow_camera_on": "Kamera, ajanın oluşturduğu eskizleri görecek şekilde döner.", + "ai.prefs.intro": "Ajanlar, izinler ve çalışlarının nasıl göründüğü.", + "ai.prefs.make_default": "Varsayılan olarak kullan", + "ai.prefs.no_agents": "Henüz ajan yok. Ajan ekleyin veya yüklü ajanları bulmak için yenileyin.", + "ai.prefs.no_saved_approvals": "Kaydedilmiş onay yok.", + "ai.prefs.override_all_warning": "Bu ajan, sormadan tasarımı kaydedebilir, üzerine yazabilir, dışa aktarabilir veya değiştirebilir.", + "ai.prefs.permission_all": "Her şeye izin ver", + "ai.prefs.permission_all_summary": "Kullanılabilir SolidCraft araçları sormadan çalışır.", + "ai.prefs.permission_ask": "Değişikliklerden önce sor", + "ai.prefs.permission_ask_summary": "Her tasarım değişikliğini ve dosya eylemini onaylayın.", + "ai.prefs.permission_edits": "Model düzenlemelerine izin ver", + "ai.prefs.permission_edits_summary": "Model düzenlemeleri çalışır; dosya ve yıkıcı eylemler yine sorar.", + "ai.prefs.permission_scope": "Yalnızca SolidCraft araçları için. Ajanın kabuk ve dosya düzenlemeleri kendi izinlerini kullanır.", + "ai.prefs.pointer_preview_hidden": "İmleç gizli", + "ai.prefs.pointer_preview_speed": "Ajan imleci · {speed}", + "ai.prefs.pointer_speed": "Hareket hızı", + "ai.prefs.privacy_note": "Söyleşiyi yalnızca seçtiğiniz ajan veya uç nokta alır. Uç nokta anahtarları sistem anahtarlığınızda saklanır.", + "ai.prefs.show_pointer": "Ajan imlecini göster", + "ai.prefs.turn_limit_hint": "Asistanın bir mesaj için yapabileceği tasarım değiştiren en fazla komut çağrısı.", "angle, height": "açı, yükseklik", "appearance.dielectric_ior": "Dielektrik kırılma indisi", "appearance.metallic": "Metaliklik", @@ -445,6 +681,8 @@ "cmd.appearance_list": "Görünümleri listele", "cmd.assembly_bom": "Malzeme listesi", "cmd.body_rename": "Gövdeyi yeniden adlandır", + "cmd.browser_collapse_all": "Tümünü Daralt", + "cmd.browser_expand_all": "Tümünü Genişlet", "cmd.browser_group": "Yeni grup", "cmd.browser_move": "Tarayıcı öğelerini taşı", "cmd.browser_order": "Tarayıcı öğelerini sırala", @@ -460,8 +698,12 @@ "cmd.component_activate": "Bileşeni etkinleştir", "cmd.component_break_link": "Bağı kopar", "cmd.component_capture_position": "Konumu yakala", + "cmd.component_copies": "Aynı Kopyaları Bul", + "cmd.component_copy_bodies": "Gövdeleri Yapıştır", "cmd.component_create": "Yeni bileşen", + "cmd.component_cycle_color": "Bileşen Rengini Değiştir", "cmd.component_delete": "Bileşeni sil", + "cmd.component_extract": "Dosyaya Çıkar", "cmd.component_from_bodies": "Gövdelerden bileşen oluştur", "cmd.component_insert_design": "Tasarım ekle", "cmd.component_links": "Bağları listele", @@ -474,6 +716,7 @@ "cmd.component_properties": "Bileşenin fiziksel özellikleri", "cmd.component_relink": "Kaynağı yeniden bağla", "cmd.component_rename": "Bileşeni yeniden adlandır", + "cmd.component_replace_with_link": "Bağlantıyla Değiştir", "cmd.component_revert_position": "Konumu geri al", "cmd.component_unlock": "İçeriğin kilidini aç", "cmd.component_update_links": "Bağları güncelle", @@ -520,6 +763,7 @@ "cmd.document_metadata": "Tasarım özellikleri", "cmd.document_metadata_remove": "Tasarım özelliğini kaldır", "cmd.document_metadata_set": "Tasarım özelliklerini değiştir", + "cmd.document_revision": "Tasarım Revizyonu", "cmd.document_units": "Tasarımın birimlerini değiştir", "cmd.edit_checkpoint": "Kontrol noktası", "cmd.edit_restore_checkpoint": "Kontrol noktasını geri yükle", @@ -536,6 +780,7 @@ "cmd.file_insert_step": "STEP ekle", "cmd.file_open_in_easyprint": "EasyPrint ile aç", "cmd.file_save_mesh": "Ağ olarak kaydet", + "cmd.file_send_to_slicer": "Dilimleyiciye Gönder", "cmd.file_slicers": "Yüklü dilimleyiciler", "cmd.frame_member": "Çerçeve Elemanı", "cmd.frame_profile_insert": "Profil Ekle", @@ -544,6 +789,8 @@ "cmd.inspect_accessibility": "Erişilebilirlik analizi", "cmd.inspect_center_of_mass": "Kütle merkezi", "cmd.inspect_clearance": "Açıklık", + "cmd.inspect_colored_components": "Bileşen Renklerini Etkinleştir", + "cmd.inspect_colored_components_disable": "Bileşen Renklerini Devre Dışı Bırak", "cmd.inspect_compare": "Gövdeleri karşılaştır", "cmd.inspect_continuity": "Süreklilik kontrolü", "cmd.inspect_curvature_comb": "Eğrilik tarağı analizi", @@ -553,6 +800,7 @@ "cmd.inspect_interference": "Girişim", "cmd.inspect_isocurve": "İzoeğri analizi", "cmd.inspect_minimum_radius": "Minimum yarıçap analizi", + "cmd.inspect_parameter_sweep": "Parametre Taraması", "cmd.inspect_silhouette": "Siluet", "cmd.inspect_zebra": "Zebra analizi", "cmd.joint_as_built": "Yerinde bağlantı", @@ -597,11 +845,14 @@ "cmd.motion_plot": "Hareket etüdü grafiği", "cmd.motion_study": "Hareket etüdü", "cmd.motion_trace": "Hareket izi", + "cmd.motion_trace_edit": "Hareket İzini Düzenle", "cmd.motion_trace_keep": "Hareket izini koru", "cmd.occurrence_copy": "Yapıştır (örnek)", + "cmd.occurrence_drag": "Tekrarı Taşı", "cmd.occurrence_ground": "Sabitle", "cmd.occurrence_move": "Örneği taşı", "cmd.occurrence_properties": "Örneğin fiziksel özellikleri", + "cmd.occurrence_reparent": "Bileşene Taşı", "cmd.parameters_add": "Kullanıcı parametresi ekle", "cmd.parameters_change": "Parametreleri değiştir", "cmd.parameters_comment": "Parametreye yorum ekle", @@ -626,14 +877,45 @@ "cmd.plastic_rest": "Dayanak", "cmd.plastic_rules": "Plastik kurallarını listele", "cmd.plastic_snap_fit": "Geçmeli bağlantı", + "cmd.render_aging_describe": "Katmanlı Yüzey Yaşlanması", "cmd.render_backends": "Render arka uçları", + "cmd.render_camera_fit": "Render Konusunu Çerçevele", + "cmd.render_camera_get": "Render Kamerasını İncele", "cmd.render_cancel": "Render'ı iptal et", + "cmd.render_effects_describe": "Mercek ve Yaratıcı Efektler", "cmd.render_export": "PNG dışa aktar", + "cmd.render_hdr_inspect": "HDR Kaynağını İncele", + "cmd.render_library_appearance_apply": "Kitaplık Opak Görünümünü Uygula", + "cmd.render_library_describe": "Render Kitaplık Kaynağını İncele", + "cmd.render_library_environment_apply": "Yerleşik HDR Ortamını Uygula", + "cmd.render_library_list": "Render Kitaplığına Göz At", + "cmd.render_library_physical_prepare": "Fiziksel Referansı Hazırla", + "cmd.render_library_preview": "Orijinal Yüzey Haritasını İncele", + "cmd.render_library_studio_apply": "Oluşturulmuş Stüdyo Işıklarını Uygula", + "cmd.render_library_studio_prepare": "Oluşturulmuş Stüdyo Işıklarını Hazırla", + "cmd.render_library_surface_bind": "Yüzey Bağlamını Kaydet", + "cmd.render_library_surface_prepare": "Oluşturulmuş Yüzey Haritalarını Hazırla", + "cmd.render_library_surface_unbind": "Yüzey Bağlamını Kaldır", + "cmd.render_library_targets": "Render Kitaplık Hedeflerini Bul", + "cmd.render_optics_bind": "Optik Bağlamı Kaydet", + "cmd.render_optics_unbind": "Optik Bağlamı Kaldır", "cmd.render_preflight": "Render isteğini kontrol et", + "cmd.render_preset_apply": "Yerli Stüdyoyu Uygula", + "cmd.render_preset_resolve": "Yerli Stüdyoyu İncele", + "cmd.render_quality_prepare": "Sabit Örnekleme Bütçesini İncele", + "cmd.render_result_pin": "Görüntülenen Render Sonucunu Sakla", + "cmd.render_result_regrade": "Doğrusal Ana Görüntüyü Yeniden Derecelendir", "cmd.render_scene": "Render sahnesini incele", "cmd.render_settings_apply": "Render kamerasını uygula", + "cmd.render_settings_capture_hdr": "Render Ayarlarını HDR ile Kaydet", "cmd.render_settings_get": "Render ayarları", "cmd.render_settings_set": "Render ayarlarını kaydet", + "cmd.render_shot_duplicate": "Render Çekimini Çoğalt", + "cmd.render_shot_remove": "Render Çekimini Kaldır", + "cmd.render_shot_rename": "Render Çekimini Yeniden Adlandır", + "cmd.render_stage_backdrop": "Fiziksel Render Arka Planını Kaydet", + "cmd.render_stage_clear": "Render Sahnesini Kaldır", + "cmd.render_stage_ground": "Render Zeminini Kaydet", "cmd.render_start": "Resmi render et", "cmd.render_status": "Render ilerlemesi", "cmd.select_clear": "Seçimi temizle", @@ -645,10 +927,12 @@ "cmd.sheet_fold": "Katla", "cmd.sheet_hem": "Kenet", "cmd.sheet_manage_rules": "Sac metal kuralları", + "cmd.sheet_path_flange": "Yol Flanşı", "cmd.sheet_perforate": "Perfore et", "cmd.sheet_refold": "Yeniden katla", "cmd.sheet_rules": "Sac metal kurallarını listele", "cmd.sheet_unfold": "Katlamayı aç", + "cmd.sketch_arc3d": "3B Yay", "cmd.sketch_arc_center_point": "Merkez noktalı yay", "cmd.sketch_arc_tangent": "Teğet yay", "cmd.sketch_arc_three_point": "3 noktalı yay", @@ -656,6 +940,7 @@ "cmd.sketch_auto_constrain_from_datum": "Referanstan otomatik kısıtlama", "cmd.sketch_auto_project": "Kenarları referansa otomatik yansıt", "cmd.sketch_blend_curve": "Geçiş eğrisi", + "cmd.sketch_cancel": "Eskizi İptal Et", "cmd.sketch_chain": "Zincir", "cmd.sketch_chamfer_distance_angle": "Mesafe ve açıyla pah", "cmd.sketch_chamfer_equal_distance": "Eşit mesafeli pah", @@ -676,6 +961,7 @@ "cmd.sketch_drag": "Eskiz geometrisini sürükle", "cmd.sketch_drag_end": "Eskiz sürüklemeyi bitir", "cmd.sketch_draw_dimensioned": "Eskiz geometrisini ölçülerle çiz", + "cmd.sketch_drawing_bounds": "Çizim Boyutu", "cmd.sketch_edit": "Eskizi düzenle", "cmd.sketch_edit_text": "Metni düzenle", "cmd.sketch_export_dxf": "DXF olarak kaydet", @@ -722,6 +1008,7 @@ "cmd.sketch_spline_fit_point": "Uydurma noktalı spline", "cmd.sketch_spun_profile": "Döndürülmüş profil", "cmd.sketch_toggle_driven": "Türetilmiş ölçüyü aç/kapat", + "cmd.sketch_transform": "Dönüşüm", "cmd.sketch_trim_path": "Yol boyunca buda", "cmd.solid_align": "Hizala", "cmd.solid_boundary_fill": "Sınır dolgusu", @@ -767,12 +1054,28 @@ "cmd.timeline_suppress": "Özelliği bastır", "cmd.view_ambient_occlusion": "Ortam tıkanması", "cmd.view_apply": "Adlandırılmış görünümü geri yükle", + "cmd.view_back": "Arka Görünüm", + "cmd.view_bottom": "Alt Görünüm", "cmd.view_delete": "Adlandırılmış görünümü sil", + "cmd.view_fit": "Sığdır", + "cmd.view_front": "Ön Görünüm", "cmd.view_graphics_preset": "Grafik ön ayarı", + "cmd.view_grid": "Izgara", + "cmd.view_ground_shadow": "Zemin gölgesi", + "cmd.view_home": "Ana görünüm", + "cmd.view_isometric": "İzometrik Görünüm", + "cmd.view_left": "Sol Görünüm", "cmd.view_list": "Adlandırılmış görünümleri listele", "cmd.view_navigate": "Görünümde gezin", + "cmd.view_navigation_bar": "Gezinme çubuğu", + "cmd.view_normal_to": "Seçime Dik", "cmd.view_rename": "Adlandırılmış görünümü yeniden adlandır", + "cmd.view_right": "Sağ Görünüm", "cmd.view_save": "Yeni adlandırılmış görünüm", + "cmd.view_spin": "Sürekli döndürme", + "cmd.view_tool": "Gezinme aracı", + "cmd.view_top": "Üst Görünüm", + "cmd.view_visual_style": "Görsel stil", "color.copy": "Renk değerlerini kopyalamak için tıklayın", "color.edit": "Rengi düzenlemek için tıklayın", "color.gamma": "Renk değerleri 0-255 gama uzayında gösteriliyor", @@ -813,6 +1116,7 @@ "crash.report": "Bildir…", "crash.unclean_explanation": "Sonraki bir açılışta tespit edildi; tam çıkış zamanı kaydedilmedi. Sistemin kapanması veya zorla durdurulması da temiz olmayan çıkışa neden olabilir.", "delete.and_more": "… ve {count} tane daha", + "diagnostic.empty_boolean_component": "'{component}' bileşeninde kesilecek veya kesişim alınacak gövde yok; araç '{other}' bileşenindeki '{body}' ile örtüşüyor olabilir — o bileşeni etkinleştirin veya gövdeyi hedef olarak seçin", "dialog.bodies_count": "{count} gövde", "dialog.clearance_invalid": "açıklık 0 veya daha büyük bir uzunluk olmalıdır", "dialog.compute": "Hesapla", @@ -828,7 +1132,18 @@ "dialog.selection_guidance": "Değiştirmek için bir girdi seçin. Kaldırmak için seçili nesnelere tıklayın; Ctrl/Cmd+tıklama ile de seçime ekleyip çıkarabilirsiniz. Önizlemeyi kontrol edin ve ardından OK'e basın.", "dialog.selection_step": "{step}/{total}: {input} seçin", "dialog.step": "Adım", + "document.changed_on_disk": "{name} diskte değişti", + "document.changed_on_disk_detail": "{name}, siz açtıktan veya en son kaydettikten sonra başka bir program ya da bilgisayar tarafından değiştirildi. Üzerine yazma, o değişiklikleri sizinkilerle değiştirir; Bir Kopya Kaydet ikisini de korur.", + "document.copy_name": "{name} kopya", + "document.open_anyway": "Yine de Aç", + "document.open_elsewhere": "{name} zaten açık", + "document.open_elsewhere_detail": "{name}, {who} konumundaki SolidCraft {app} içinde açık, {when} açılmış. İkiniz de kaydederseniz biri emeğini kaybeder. Üzerine kaydetmeden bakmak için salt okunur açın.", + "document.open_read_only": "Salt Okunur Aç", + "document.opened_read_only": "Salt okunur açıldı: Kaydet yeni bir dosya ister", + "document.overwrite": "Üzerine Yaz", + "document.read_only_save": "Bu tasarım salt okunur açıldı: yeni bir dosya olarak kaydedin", "document.save_changes": "{name} içindeki değişiklikler kaydedilsin mi?", + "document.save_copy": "Bir Kopya Kaydet…", "document.unsaved_changes": "{name} kaydedilmemiş değişiklikler içeriyor. Kaydetmezseniz bunlar kaybolur.", "drive.stopped_by_contact": "{value} değerinde durdu: {a} ile {b} iç içe geçerdi", "drive.stopped_by_loop": "{value} değerinde durdu: {joint} üzerinden geçen döngü daha fazla kapatılamıyor", @@ -845,9 +1160,11 @@ "dxf.progress.write": "DXF yazılıyor (5/5)", "dxf.tolerance": "Eğri toleransı", "dxf.tolerance_help": "Yalnızca görünür gövdeler. Eğriler düz parçalarla gösterilir. Daha küçük tolerans daha ince eğriler verir ve daha çok zaman ve bellek kullanır.", + "file.open.drawing_filter": "Tasarımlar, CAD dosyaları, ağlar ve çizimler", "file_load.built": "Şu ana kadar oluşturulan: {built} / {total} özellik.", "file_load.converting": "Katı {done} / {total} dönüştürülüyor", "file_load.inserting": "Geometri ekleniyor", + "file_load.link_item": "{name} ({done} / {total})", "file_load.opening": "Tasarım açılıyor", "file_load.preparing_thumbnail": "Küçük resim hazırlanıyor...", "file_load.preparing_view": "Görünüm hazırlanıyor...", @@ -857,18 +1174,54 @@ "file_load.rebuilding": "Özellik {done} / {total} yeniden oluşturuluyor", "file_load.recovering": "Tasarım kurtarılıyor", "file_load.stopping": "Önceki işlemin durması bekleniyor...", + "file_load.updating_links": "Bağlantılar güncelleniyor", "file_load.waiting": "Dosya işlemi bekleniyor", "fits the face, e.g. M8": "yüze uyar, ör. M8", + "from the profile": "profilden", "from the rule": "kuraldan", "help.apache": "Apache lisansı 2.0", "help.attributions": "Atıflar (ATTRIBUTION.md)", "help.build": "Sürüm {version} · commit {commit} · derleme tarihi {date}", + "help.connect_note": "SolidCraft sunucusunu yüklemek için her asistanı yeniden başlatın. Değişmeden önce her dosya .bak olarak yedeklendi.", + "help.connect_title": "AI asistanlarını bağla", "help.font_details": "Arayüz, egui'nin yerleşik yazı tiplerini kullanır (Ubuntu Font Licence ve MIT/Bitstream Vera lisansları altında Ubuntu Light ve Hack; OFL ve MIT altında Noto Emoji ve emoji simge yazı tipi). Eskiz metni Liberation Sans (SIL OFL 1.1) kullanır. The Crafting Apps'in isteğe bağlı yazı tipi paketi craft-fonts (BIZ UDPGothic, Shippori Mincho, BIZ UDMincho, Noto Sans CJK SC, Noto Sans Arabic; SIL OFL 1.1), SolidCraft derlemelerine dahil değildir.", "help.fonts": "Yazı tipleri", "help.licences": "Lisanslar", "help.mit": "MIT lisansı", "help.notice": "NOTICE", + "help.solid.chamfer": "Seçili kenarları, belirlediğiniz mesafede düz bir pahla keser. Keskin kenarları kırmak veya bir pim ya da vidanın girişini kolaylaştırmak için kullanın.", + "help.solid.combine": "Gövdeleri birleştirir, bir hedef gövdeden çıkarır veya yalnızca paylaştıkları hacmi tutar ve araç gövdelerini tutabilir. Parçaları kaynaştırmak, bir şekli diğeriyle kesmek veya iki gövdenin örtüştüğü yeri bulmak için kullanın.", + "help.solid.extrude": "Bir eskiz profilini, malzeme ekleyerek veya kaldırarak bir mesafe boyunca 3B'ye taşır. Düz bir konturu blok, kabarıklık veya cep haline getirmek için kullanın.", + "help.solid.fillet": "Seçili kenarları, belirlediğiniz yarıçapta pürüzsüz dairesel bir uyumla yuvarlatır. Keskin kenarları sağlamlık, konfor veya görünüm için yumuşatmak amacıyla kullanın.", + "help.solid.hole": "Bir yüzeyde seçtiğiniz noktada, belirlediğiniz çapta yuvarlak bir delik deler. Vida boşlukları, pimleri ve diğer basit yuvarlak açıklıklar için kullanın.", + "help.solid.loft": "İki veya daha fazla eskiz profili arasında, ya da bir profille bir nokta arasında pürüzsüz bir katı karıştırır. Geçişler, huniler, saplar ve uzunluğu boyunca kesiti değişen şekiller için kullanın.", + "help.solid.mirror": "Seçili gövdelerin veya özelliklerin bir düzlem boyunca ayna görüntüsünü kopyasını oluşturur ve orijinalle birleştirebilir. Simetrik parçalar için kullanın; yarısını modelleyip ikisini de alın.", + "help.solid.pattern.circular": "Seçili nesneleri, belirlediğiniz adet ve toplam açı boyunca bir eksen etrafında yineler. Cıvata daireleri, jant kolları, kanatçıklar ve dişler için kullanın.", + "help.solid.pattern.rectangular": "Seçili nesneleri, belirlediğiniz adet ve aralıkla bir veya iki yönde yineler. Delik, nervür, pim veya ayak dizileri ve ızgaraları için kullanın.", + "help.solid.revolve": "Bir eskiz profilini bir eksen etrafında döndürerek yuvarlak bir katı oluşturur. Miller, topuzlar, kaseler ve bir merkez çizgisi etrafında yuvarlak olan parçalar için kullanın.", + "help.solid.shell": "Bir katıyı içini oyarak boşaltır, belirlediğiniz kalınlıkta duvarlar bırakır ve seçtiğiniz yüzleri açabilir. Kutular, kapaklar ve diğer ince cidarlı parçalar için kullanın.", + "help.solid.sweep": "Bir eskiz profilini bir yol boyunca sürükleyerek katı oluşturur. Borular, raylar, saplar ve bir eğriyi izleyen sabit kesitli parçalar için kullanın.", "help.third_party": "Üçüncü taraf lisansları", + "hole_presets.confirm_delete": "Silmeyi onayla", + "hole_presets.delete": "Sil", + "hole_presets.delete_prompt": "Bu kişisel ön ayar silinsin mi? Mevcut delikler değişmez.", + "hole_presets.full": "Kişisel kitaplık zaten 64 ön ayar içeriyor.", + "hole_presets.invalid_name": "Satır sonu veya kontrol karakteri içermeyen kısa bir ad girin.", + "hole_presets.invalid_parameters": "Delik parametrelerini, makul uzunlukta geçerli ifadelerle tamamlayın.", + "hole_presets.missing": "Seçilen ön ayar artık kullanılamıyor.", + "hole_presets.name": "Ön ayar adı", + "hole_presets.name_exists": "Bu adta bir ön ayar zaten var. Farklı bir ad kullanın.", + "hole_presets.name_hint": "Benzersiz bir ad", + "hole_presets.overwrite": "Değişiklikleri seçili ön ayara kaydet", + "hole_presets.preset": "Ön ayar", + "hole_presets.recall": "Geri çağır", + "hole_presets.rename": "Yeniden adlandır", + "hole_presets.save": "Yeni kaydet", + "hole_presets.scope": "Tüm projeler için profilinize kaydedilir.", + "hole_presets.select": "Bir ön ayar seçin", + "hole_presets.title": "Kişisel ön ayarlar", + "hole_presets.unsupported_options": "Bu ön ayar, bu sürümün geri çağıramadığı diş seçenekleri kullanıyor.", + "hole_presets.unsupported_overwrite": "Bu ön ayar, güvenle üzerine yazılamayacak seçenekler içeriyor.", "home.back": "{name} tasarımına dön", "home.crashes": "Çökme raporları", "home.design_workspace": "Tasarım", @@ -944,6 +1297,8 @@ "joint.from_bodies_hint": "Seçilen her gövde kendi yeni bileşenine konur ve bulunduğu yerde kalır.", "joint.one_body": "Her iki seçim de {body} üzerinde. İkincisini başka bir parçada seçin.", "joint.one_component": "Bu parçalar tek bir bileşenin gövdeleridir: {bodies}. Bir bağlantı bir bileşeni diğerine göre hareket ettirir, bu nedenle her parçanın kendi bileşeni olması gerekir.", + "joint.rigid_group_one_component": "Bu {count} gövdenin tümü tek bir bileşende (veya tasarımın kendisinde): önce {command} kullanın.", + "joint.rigid_group_select_components": "İki veya daha fazla bileşen seçin.", "keymap.command_id": "Komut kimliği", "keymap.empty": "Eşleşen komut yok", "keymap.use_anyway": "Yine de burada {key} kullan", @@ -954,6 +1309,49 @@ "manage.material_hint": "Gövdeleri seçin ve fiziksel malzemelerini belirleyin.", "manage.parameters_hint": "İfadeleri ve birimleri düzenleyin. Değişiklikler Enter'a basıldığında veya alandan çıkıldığında uygulanır.", "manage.rules_hint": "Düzenlemek için bir kural seçin veya yeni bir kural oluşturun. Kuralı kaydetmek için onaylayın.", + "material.editor.add_property": "Özellik ekle", + "material.editor.add_source": "Kaynak ekle", + "material.editor.assigned_density": "Atanan yoğunluk", + "material.editor.axes": "Malzeme eksenleri", + "material.editor.axes_numeric": "1 / 2 / 3", + "material.editor.axes_wood": "L / R / T", + "material.editor.copy_name": "{name} kopyası", + "material.editor.density_range": "Atanan yoğunluk 0'dan büyük ve en çok 1000 g/cm³ olmalıdır.", + "material.editor.designation": "Tanım", + "material.editor.duplicate": "Çoğalt", + "material.editor.engineering_card": "Mühendislik özelliği kartı", + "material.editor.family": "Malzeme ailesi", + "material.editor.glass": "Cam", + "material.editor.illustrative": "Örnekleyici", + "material.editor.invalid_property": "Desteklenmeyen özellik türü.", + "material.editor.isotropic": "İzotropik", + "material.editor.measurement": "Ölçüm", + "material.editor.metal": "Metal", + "material.editor.moisture": "Nem, kuru bazda", + "material.editor.name_required": "1-128 karakterlik bir ad girin.", + "material.editor.no_draft": "Açık bir malzeme taslağı yok.", + "material.editor.number_required": "Sonlu bir sayısal değer girin.", + "material.editor.orthotropic": "Ortotropik", + "material.editor.other": "Diğer", + "material.editor.polymer": "Polimer", + "material.editor.preserved_appearance": "Korunan görünüm", + "material.editor.public_reference": "Herkese açık referans", + "material.editor.reference": "Referans", + "material.editor.save_or_discard": "Malzeme atamadan önce malzeme taslağını kaydedin veya atın.", + "material.editor.saved": "Malzeme kaydedildi. Gövde atamaları değişmedi.", + "material.editor.scope": "Kaydetme, bu malzemeyi gövdelere atamadan saklar. Boş özellikler ve koşullar bilinmez kalır. Kart yoğunluğu, atanan yoğunluğu veya kütleyi değiştirmez.", + "material.editor.source_id": "Kaynak kimliği", + "material.editor.source_kind": "Kaynak türü", + "material.editor.source_title": "Kaynak başlığı", + "material.editor.sources": "Kaynaklar", + "material.editor.stale": "Taslak açıkken malzeme değişti. Kaydetmeden önce atıp yeniden açın.", + "material.editor.state": "Malzeme durumu", + "material.editor.strain_rate": "Birim şekil değiştirme hızı", + "material.editor.symmetry": "Elastik simetri", + "material.editor.temperature": "Sıcaklık", + "material.editor.unknown_card": "Mühendislik özellikleri bilinmiyor. Kaydetme yalnızca atanan yoğunluğu ve mevcut görünümü koruyabilir.", + "material.editor.user_supplied": "Kullanıcı tarafından sağlanan", + "material.editor.wood": "Ahşap", "measure.at": "Konum", "measure.item": "Öğe {number}", "messages.ago_h": "{n} sa. önce", @@ -978,6 +1376,17 @@ "motion.to_end": "Sona git", "motion.to_start": "Başa git", "motion.track_name": "İz {number}", + "nav.alias.help": "Shift+Alt+sol sürükleme döndürür, Shift+Alt+orta kaydırır, Shift+Alt+sağ yakınlaştırır; orta sürükleme ayrıca kaydırır, sağ sürükleme döndürür", + "nav.blender.help": "Orta sürükleme döndürür, Shift+orta kaydırır, Ctrl+orta yakınlaştırır; sağ sürükleme kameraya dokunmaz", + "nav.free_orbit.help": "Fare ve 3B fare, her iki kutuptan geçerek döndürür ve yuvarlanmayı korur. Shift eksen hizalama devre dışı.", + "nav.free_orbit.label": "Serbest döndürme", + "nav.free_orbit.snap_help": "Fare ve 3B fare, her iki kutuptan geçerek döndürür ve yuvarlanmayı korur. Görünüm yönünü ve yuvarlanmayı hizalamak için döndürme sürüklemesi sırasında Shift tuşunu basılı tutun.", + "nav.fusion.help": "Orta sürükleme kaydırır, Shift+orta döndürür, sağ sürükleme döndürür", + "nav.inventor.help": "Orta sürükleme kaydırır, Shift+orta döndürür, Ctrl+orta yakınlaştırır, sağ sürükleme döndürür", + "nav.openscad.help": "Boşlukta sol sürükleme döndürür, Shift+sol sürükleme kutu seçimi yapar, eskiz geometrisi sürükleyerek düzenlenir; sağ veya orta sürükleme kaydırır, Shift+sağ veya Shift+orta sürükleme yakınlaştırır", + "nav.perspective.sketch": "Eskiz düzenleme dik görünüm kullanır. Perspektife geçmek için eskizi bitirin.", + "nav.solidworks.help": "Orta sürükleme döndürür, Ctrl+orta kaydırır, Shift+orta yakınlaştırır, sağ sürükleme döndürür", + "nav.tinkercad.help": "Sağ sürükleme döndürür, orta veya Shift+sağ sürükleme kaydırır", "nav.touchpad.help": "Kaydırmak için Shift tuşunu basılı tutun ve imleci hareket ettirin; Alt/Option ile döndürün. Fare tuşu gerekmez. Dikey kaydırma yakınlaştırır.", "nav.touchpad.label": "Dokunmatik yüzey", "nav.touchpad.orbit": "Döndür (Alt/Option tuşunu basılı tutup hareket ettirin; fare tuşu olmadan)", @@ -985,6 +1394,10 @@ "nav.touchpad.scroll": "Dokunmatik yüzey yakınlaştırmak için dikey kaydırmayı kullanır. İki parmakla kaydırma diğer ön ayarlar için kayıtlı kalır.", "nav.touchpad.zoom": "Yakınlaştır (dikey kaydırın veya parmaklarınızı açıp kapatın)", "needs two joints": "iki bağlantı gerektirir", + "network.allow_once": "Bir kez izin ver", + "network.always_allow": "Bu sunucuya her zaman izin ver", + "network.prompt_detail": "Bu tasarım, {host} ağ konumundaki bir dosyaya bağlanıyor. Açmak o bilgisayara bağlanır ve Windows oturum açma bilgilerinizi gönderebilir. Yalnızca güvendiğiniz sunuculara izin verin.", + "network.prompt_title": "Ağ konumu", "new configuration": "yeni konfigürasyon", "new parameter": "yeni parametre", "no hole": "delik yok", @@ -998,10 +1411,169 @@ "pattern.direction_1": "Yön 1", "pattern.direction_2": "Yön 2", "pattern.flip_direction": "Yönü ters çevir", + "perf.click_for_details": "Ayrıntılar için tıklayın: kare süresi grafiği, histogram ve GPU'nun çizdikleri", + "perf.draw_calls": "Çizim çağrıları", + "perf.line_segments": "Çizgi parçaları", + "perf.low_1": "%1 düşük", + "perf.renderer": "İşleyici", + "perf.scene_build": "Sahne kurulumu", + "perf.triangles": "Üçgenler", + "perf.ui_time": "Arayüz süresi", + "perf.viewport": "Görünüm alanı", + "perf.worst": "en kötü", "pick a hole to seat it, or OK places it at the origin": "yerleştirmek için bir delik seçin veya OK ile orijine yerleştirin", "pick one or two vertices, edges or faces": "bir veya iki köşe noktası, kenar ya da yüz seçin", + "pick the path": "yolu seçin", + "prefs.add_item": "Öğeyi ekle", + "prefs.alt_frees_manipulators": "Alt / Option, tutamaç oklarını da serbest bırakır", + "prefs.anti_aliasing_amd_dx12": "Başlangıç testi çoklu örneklemeyle hiçbir şey çizmediği ve 1× ile geçtiği için kenar yumuşatma 1× kullanıyor. Yukarıdan başka bir ayar seçebilirsiniz; test geçerse uygulamak için yeniden başlatın.", + "prefs.anti_aliasing_note": "Pürüzlü kenarları yumuşatır.", + "prefs.applies_on_restart": "Yeniden başlatınca uygulanır", + "prefs.assistant": "Asistan", + "prefs.axes": "Eksenler", + "prefs.axis": "Eksen", + "prefs.bottom": "Alt", + "prefs.browser": "Tarayıcı", + "prefs.built_in": "Yerleşik", + "prefs.button_left": "Sol sürükleme", + "prefs.button_middle": "Orta sürükleme", + "prefs.button_right": "Sağ sürükleme", + "prefs.choose_font": "Yazı tipi dosyası seçin…", + "prefs.click": "Tıklama", + "prefs.contact_shading": "Yumuşak temas gölgelemesi", + "prefs.contact_shading_note": "Parçaların yaklaştığı yerlerde yumuşak gölgeleme.", + "prefs.context_menu": "Bağlam menüsü", + "prefs.context_menu_ring": "Bağlam menüsü · radyal menü için basılı tutun", "prefs.cpu": "CPU (yazılım)", + "prefs.crash_reports": "Çökme raporlarını aç…", + "prefs.crash_reports_note": "Raporlar, sorunu yineleyen tasarım ve komutlarla birlikte bu bilgisayarda saklanır.", + "prefs.ctrl_cmd": "Ctrl / Cmd", + "prefs.curved_surfaces": "Eğri yüzeyler", + "prefs.curves": "Eğri yüzeyler", + "prefs.dead_zone_note": "Taramalı bant ölü bölgedir: içindeki hareket yok sayılır.", + "prefs.default": "varsayılan", + "prefs.design": "Tasarım varsayılanları", + "prefs.design_note": "Yeni tasarımların neyle başladığı. Açık tasarımlar kendi ayarlarını korur.", + "prefs.devices": "3B fare", + "prefs.dialog_buttons": "Diyalog düğmeleri", + "prefs.display": "Görüntü", + "prefs.edges": "Kenarlar ve gölgeleme", + "prefs.extend": "Uzat", + "prefs.extra_navigation": "Boşlukta Ctrl+sol sürükleme döndürür; kaydırmak için Space tuşunu basılı tutun.", + "prefs.follows_os": "İşletim sistemini izler", + "prefs.font": "Yazı tipi", + "prefs.font_fallback": "Seçilen yazı tipinde bulunmayan glifler yerleşik yazı tipine düşer, böylece hiçbir etiket boş kutu göstermez.", + "prefs.font_sample": "The quick brown fox · Ø12.50 mm · 45.0° · 0123456789", + "prefs.font_unreadable": "Seçilen yazı tipi okunamadı.", + "prefs.general": "Genel", + "prefs.general_note": "Dil, kaydetme ve güncellemeler.", + "prefs.gesture_orbit": "Döndürme", + "prefs.gesture_pan": "Kaydırma", + "prefs.gesture_zoom": "Yakınlaştırma", + "prefs.graphics": "Grafik", + "prefs.graphics_card": "Ekran kartı", + "prefs.graphics_card_auto": "Otomatik", + "prefs.graphics_card_missing": "Kaydedilen ekran kartı kullanılamıyor; Otomatik kullanılıyor.", + "prefs.graphics_card_restart": "SolidCraft'ı yeniden başlattıktan sonra etkili olur. WGPU_ADAPTER_NAME bu seçimi geçersiz kılar.", + "prefs.graphics_note": "Hızdan ödün verip pürüzsüzlük kazanın. Her seçenek, etkisini bir örnek üzerinde gösterir.", + "prefs.graphics_presets_note": "Ön ayarlar aşağıdaki seçimleri birlikte belirler.", + "prefs.history": "Geçmiş", + "prefs.history_origin_bodies": "Başlangıç ve gövdeleri üstte göster", + "prefs.history_origin_bodies_note": "Soldaki veya tarayıcının altındaki Geçmiş, etkin bileşenin Gövdeler klasörü ve Başlangıç ile başlar; gözleri ve menüleri tarayıcıdaki gibidir. Alttaki Geçmiş değişmez.", + "prefs.history_sketches": "Eskizler", + "prefs.history_sketches_in_order": "Sırayla", + "prefs.history_sketches_note": "Eskizler, Özelliklerinin altında ayarlıyken, soldaki Geçmiş, adlar için yeterince geniş olduğunda her eskizi, kendisinden oluşturulan ilk özelliğin altında bir seviye içeride listeler. Alttaki zaman çizelgesi her zaman oluşturma sırasını korur.", + "prefs.history_sketches_under_feature": "Özelliklerinin altında", + "prefs.hold_stop_snapping": "Yapışmayı durdurmak için basılı tutun", + "prefs.icons_only": "Yalnızca simgeler", + "prefs.imported_file": "İçe aktarılan dosya", + "prefs.input": "Girdi", + "prefs.interface": "Arayüz", + "prefs.interface_language": "Arayüz dili", + "prefs.interface_note": "SolidCraft'ın nasıl göründüğü ve parçalarının nerede durduğu.", + "prefs.interval_minutes": "{n} dk", + "prefs.labels": "Etiketler", + "prefs.layout": "Düzen", + "prefs.layout_note": "Sıkışık, panelleri pencere kenarlarına yerleştirir. Tarayıcı yarı saydamlığı Yüzen düzende kullanılabilir. Asistan tarafını Asistan sayfasından değiştirin.", + "prefs.left": "Sol", + "prefs.left_click": "Sol tıklama", + "prefs.live_input": "Canlı girdi", + "prefs.live_preview": "Canlı önizleme", + "prefs.minutes": "dakika", "prefs.minutes_suffix": " min", + "prefs.mouse": "Fare ve trackpad", + "prefs.mouse_heading": "Fare", + "prefs.mouse_mapping": "Fare eşlemesi", + "prefs.navigation": "Gezinme", + "prefs.navigation_note": "Farenin, trackpad'in ve 3B farenin görünümü nasıl hareket ettirdiği.", + "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.", + "prefs.network_locations_section": "Ağ konumları", + "prefs.not_on_gpu": "bu GPU'da değil", + "prefs.on": "Açık", + "prefs.opaque": "Opak", + "prefs.orbit_snap": "Bir eksene hizalamak için döndürme sırasında Shift tuşunu basılı tutun.", + "prefs.orientation": "Yönelim", + "prefs.overall_speed": "Genel hız", + "prefs.placement": "Yerleşim", + "prefs.prefer_free_sketch_points": "Noktalar örtüştüğünde hareketli eskiz noktalarını tercih et", + "prefs.preview_choices": "Seçimlerinizin önizlemesi", + "prefs.quality_default": "varsayılan", + "prefs.quality_fastest": "en hızlı", + "prefs.quality_slowest": "en yavaş", + "prefs.quality_smoother": "daha pürüzsüz", + "prefs.reports_saved": "{n} kayıtlı", + "prefs.right_click": "Sağ tıklama", + "prefs.saving": "Otomatik kayıt ve kurtarma", + "prefs.scale_note": "Pencerede ayrıca Ctrl + / Ctrl −. Düğmeler %100'de 28 px.", + "prefs.scale_text": "Ölçek ve metin", + "prefs.select": "Seçim", + "prefs.select_one_item": "Bir öğe seçin", + "prefs.selecting": "Seçme", + "prefs.shift": "Shift", + "prefs.shift_add_ctrl_toggle": "Shift yalnızca ekler; Ctrl / Cmd değiştirir", + "prefs.shift_add_note": "Açık: Shift ekler, Ctrl / Cmd değiştirir. Kapalı (varsayılan): ikisi de değiştirir.", + "prefs.shortcuts": "Kısayollar", + "prefs.sketch_exit_view": "Bir eskiz bittiğinde", + "prefs.sketch_exit_view.keep": "Geçerli görünümü koru", + "prefs.sketch_exit_view.previous": "Önceki görünüme dön", + "prefs.sketch_exit_view.unless_rotated": "Döndürülmediyse dön", + "prefs.sketch_exit_view_note": "Eskizi Bitir, İptal veya çift Esc sonrası görünümün nereye gittiği.", + "prefs.sketch_selection": "Eskiz ve seçim", + "prefs.sketch_selection_heading": "Eskiz ve seçim", + "prefs.sketch_selection_note": "Eskizlerin nasıl yapıştığı ve tıklamaların nasıl seçtiği.", + "prefs.sketching": "Eskiz", + "prefs.snap_drawing_note": "Bir eskiz noktası çizerken veya sürüklerken.", + "prefs.source": "Kaynak", + "prefs.speed": "Hız", + "prefs.stand_up_note": "Bir STEP veya IGES dosyası Z yukarı açıldığında, X etrafında çeyrek tur öner.", + "prefs.status_done": "Tamam", + "prefs.status_error": "Hata", + "prefs.status_selected": "Seçildi", + "prefs.status_warning": "Uyarı", + "prefs.supersampling_brief": "Görünümü daha büyük çizip aşağı süzer: çok net, ama daha ağır.", + "prefs.tab_accent_note": "Vurgu rengi etkin sekmeyi izler", + "prefs.theme_file": "tema dosyası", + "prefs.timeline_half_hour": "−30 dk", + "prefs.timeline_now": "şimdi", + "prefs.timeline_quarter_hour": "−15", + "prefs.toggle_item": "Öğeyi ekleyin veya yeniden çıkarın", + "prefs.toolbar": "Araç çubuğu", + "prefs.top": "Üst", + "prefs.translucent": "Yarı saydam", + "prefs.under_browser": "Tarayıcının altında", + "prefs.under_cursor": "İmlecin altında", + "prefs.units_precision": "Birimler ve hassasiyet", + "prefs.updates": "Güncellemeler", + "prefs.view": "Görünüm davranışı", + "prefs.view_confirm_corner": "Görünümün köşesinde Tamam ve İptal", + "prefs.view_confirm_corner_note": "Bir diyalog veya eskiz açıkken, görünümün sağ üstündeki bir onay işareti ve çarpı işareti, diyalogun Tamam ve İptal düğmelerinin ya da eskizi bitirip iptal etmenin işini yapar. Görünüm yönlendiricileri bunların altına iner.", + "prefs.viewport": "Görünüm alanı", + "prefs.wheel": "Tekerlek", + "prefs.wheel_trackpad": "Tekerlek ve trackpad", + "prefs.workspace": "Çalışma alanı", + "prefs.zoom_toward_cursor": "Yakınlaştırma, imlece doğru", "properties.title": "Özellikler: {name}", "recovery.days_ago": "{count} gün önce", "recovery.detail": "{file} · {features} özellik · otomatik kaydedilen: {when}", @@ -1009,21 +1581,248 @@ "recovery.just_now": "az önce", "recovery.min_ago": "{count} dk. önce", "recovery.never_saved": "hiç kaydedilmedi", + "render.adaptive_absolute": "Mutlak RGB hata tabanı", + "render.adaptive_coverage": "Kapsama hatası hedefi", + "render.adaptive_enable": "Örnekleri bağımsız pilotlarla dağıt", + "render.adaptive_help": "Yalnızca GPU. Bağımsız pilot örnekler atılır, ardından piksel başına Örneklere kadar 16 veya daha fazla üretim örneği dağıtılır. RGB ve kapsama varyansı dağılımı yönlendirir; nadir yollar kaçırılabilir ve sınırlandırılmış pikseller gürültülü kalabilir. Nihai rapor gerçek işlemi sayar. Sertifikalı gürültü veya süre garantisi yoktur.", + "render.adaptive_minimum": "En az üretim örneği", + "render.adaptive_pending": "GPU bağımsız-pilot adaptif dağılım ve koşullu Fresnel tabakaları kullanılabilir. Sertifikalı yakınsama, nadir olay garantileri ve CPU adaptif taşınımı kullanılamamaya devam ediyor.", + "render.adaptive_pilots": "Piksel başına pilot örnek", + "render.adaptive_relative": "Göreceli RGB hata hedefi", + "render.add_ground": "Kurulumu zemine sığdır", + "render.advanced_material_scope": "Açık sınırlar altında tek bir sonlu homojen GPU ortamı kullanılabilir. Yoğunluk ızgaraları, iç içe cam/hacim kombinasyonları, yüzeyaltı yüzeyleri, yer değiştirme, spektral taşınım ve bağlı olmayan gelişmiş malzeme kavramları kullanılamamaya devam ediyor.", + "render.aging_add": "Yaşlanma katmanı ekle", + "render.aging_airborne": "Havadan toz / katılımcı ortam", + "render.aging_airborne_help": "Havadan toz, ayrı bir sonlu homojen saçılma hacmidir. Yüzey yaşlanma yığınıni değil, taşınımı ve ham EXR'ı değiştirir. Mevcut hacim/cam/giderme kısıtlamaları açıkça geçerlidir; otomatik atmosfer eklenmez.", + "render.aging_all_bodies": "Uygun tüm opak gövdeler", + "render.aging_chips": "Çatlak boya", + "render.aging_class_any": "Tüm opak malzeme sınıfları", + "render.aging_class_dielectric": "Yalnızca metalik olmayan yüzeyler", + "render.aging_class_metal": "Yalnızca metalik yüzeyler", + "render.aging_color": "Katman rengi · sRGB", + "render.aging_coverage": "Kapsama", + "render.aging_dust": "Birikmiş toz", + "render.aging_empty": "Yaşlanma katmanı yok: orijinal yüzeyler değişmeden kalır.", + "render.aging_fading": "Solmuş kaplama", + "render.aging_grime": "Kir ve lekelenme", + "render.aging_help": "Sırayla en fazla sekiz optik katman birleştirin. Pas ve patina oluşturulmuş görünümlerdir, yaş/korozyon simülasyonu değildir. Ölçek dünya milimetresidir. Geometri, kütle veya mühendislik özelliği değiştirilmez; cam ve pasif aşamalar hariçtir.", + "render.aging_metallic": "Katman metalik oranı", + "render.aging_origin": "Alan başlangıcı · dünya mm", + "render.aging_patina": "Bakır yeşili patina", + "render.aging_refresh_targets": "Geçerli gövdeleri incele", + "render.aging_roughness": "Katman pürüzlülüğü", + "render.aging_rust": "Oksitlenmiş demir / pas", + "render.aging_scale": "Desen ölçeği", + "render.aging_scratches": "İnce çizikler", + "render.aging_target": "Hedef ve koordinatlar", + "render.aging_target_help": "Adlı bir hedef, yine de yakalanan dizini ve adıyla eşleşmelidir. Küresel maskeler dünyaya sabittir; hareket eden parçaları izlemez. Bu ne boşluk tespiti ne de gerçek kenar aşınmasıdır. Ek gövdeleri görmek için listeyi filtreleyin.", + "render.aging_target_search": "Gövde adlarını filtrele", + "render.aging_upward": "Yukarı bakan birikim", + "render.all_controls_help": "Tüm geçerli kontrollerin yoğun incelemesi. Bölüm sayfaları, temel isteği değiştirmeden odaklı düzenleme sağlar.", + "render.appearance_physics_separate": "Görsel görünüm yoğunluk, termal veri veya diğer mühendislik özelliklerini atamaz.", + "render.availability_native": "Yerli kompozisyon; uygulamadan önce inceleyin", + "render.availability_projection": "Desteklenen yansıtma; kapsama ve atlamalara bakın", + "render.availability_reference": "Referans verisi; otomatik atama değildir", + "render.backdrop_alpha_conflict": "Bu arka planı veya saydam PNG çıktısını seçin; işleyici ikisini de sessizce yok saymaz.", + "render.backdrop_enable": "Yalnızca kameraya özel degrade arka plan kullan", + "render.backdrop_first": "Başlangıç / merkez rengi", + "render.backdrop_help": "Bu ekran-uzayı arka planı aydınlatmaz, gölge düşürmez, yansıtmaz ve arazi temsil etmez. Ham EXR'a dahil edilmez. Geometri, ışıklar ve HDR ortamı bağımsız kalır.", + "render.backdrop_horizontal": "Yatay degrade", + "render.backdrop_radial": "Radyal degrade", + "render.backdrop_radius": "Yarıçap", + "render.backdrop_second": "Bitiş / kenar rengi", + "render.backdrop_vertical": "Düşey degrade", + "render.backdrop_x": "Merkez X", + "render.backdrop_y": "Merkez Y", "render.background": "Sahne arka planı", + "render.background_camera_section": "Kamera arka planı · PNG sunumu", + "render.background_completed_frozen": "Görüntülenen sonuç dondurulmuş tamamlanmış bir görüntüdür. Arka planı düzenlemek bu sonucu otomatik olarak yeniden çizmez. Yalnızca kamera değişiklikleri için Yeniden Derecelendir'i, yeni bir fiziksel sahne için Render'ı kullanın.", + "render.background_hdr_separate": "Geçerli HDR kaynakları yüzeyleri aydınlatır ve yansıtır; otomatik olarak konunun arkasına panorama olarak görüntülenmez. Bir degrade değiştirmek ışıklandırmayı döndürmez veya renklendirmez.", + "render.background_lighting_section": "HDR aydınlatma · kamera arka planından ayrı", + "render.background_no_alpha_override": "Kamera arka planı saydam çıktıya sessizce eklenmez. Ham ana görüntü yeniden derecelendirmesi yakalanan kapsamayı kullanır ve gidermeyi yeniden uygulamaz; kaynak EXR değişmeden kalır.", + "render.background_not_light": "Arka plan rengi bir sunumdur, ek bir ışık kaynağı değildir.", + "render.background_regrade": "Saklanan ham ana görüntüye uygula", + "render.background_stage_occlusion": "Bu çekim fiziksel sahne geometrisi içeriyor. Büyük bir zemin veya duvar kareyi doldurup yalnızca kameraya özel arka planı gizleyebilir. Sahneyi bilinçli olarak temizleyin veya boyutlandırın ya da fiziksel yansıtıcılığını değiştirin. Yeniden derecelendirme yakalanan geometriyi kaldıramaz.", + "render.background_workflow": "Amaçladığınız arka planı seçin: yalnızca kameraya özel renk/degrade, ışık alan fiziksel sahne veya HDR aydınlatma. Bunlar bağımsızdır. Canlı Önizleme bir modelleme görünümüdür; kamera sonlandırmasını görmek için yeni bir görüntü render edin veya saklanan bir ana görüntüyü yeniden derecelendirin.", + "render.base_appearance": "Düzenlenebilir gövde görünümü", + "render.base_apply": "Gövde görünümünü uygula", + "render.base_apply_help": "İncelenen tam gövdeye tek bir geri alınabilir görsel atama. Yüze özel mevcut görünümler ve mühendislik malzemeleri ayrı kalır.", + "render.base_color": "Temel renk · sRGB", + "render.base_metallic": "Metalik oranı", + "render.base_opaque_only": "Bu düzenleyici opak gövde anlamlarını korur. Optik geçiş için açık cam kontrollerini kullanın.", + "render.bloom_enable": "Ekran bloom'u", + "render.bloom_help": "Üç normalize kutu geçişiyle yayılan, pozitif doğrusal vurgulardan çıkan yalnızca çıktıya özel parlama. Yarıçap çıktı pikselidir. sRGB öncesi doğrusal görüntü ışığına eklenir; mercek, hacimsel efekt veya yakınsama iyileştirmesi değildir. Ham EXR değişmez.", + "render.bloom_opaque": "Bloom opak çıktı gerektirir. Saydam PNG reddedilir, sessizce düzleştirilmez.", + "render.bloom_radius": "Bloom yarıçapı", + "render.bloom_strength": "Bloom şiddeti", + "render.bloom_threshold": "Doğrusal vurgu eşiği", + "render.browse_capabilities": "Tam yetenek kataloğunu incele", + "render.browse_environments": "Orijinal HDR ortamlarına göz at", + "render.browse_native_scenes": "Yerli stüdyolara göz at", + "render.browse_physical": "Fiziksel referansları incele", + "render.browse_quality": "Kalite özelliklerini incele", + "render.browse_rigs": "Oluşturulmuş ışık düzeneklerine göz at", + "render.browse_scene_specs": "Gelişmiş sahne özelliklerine göz at", + "render.browse_surfaces": "Oluşturulmuş yüzeylere göz at", + "render.browser_library": "Kitaplık", + "render.browser_model": "Model", + "render.camera_distance": "Göz-hedef mesafesi", + "render.camera_exact_help": "Dünya milimetresi; açılar derece olarak gösterilir ve radyan olarak kaydedilir. Gezinme, görünüm alanıyla aynı kamerayı kullanır.", + "render.camera_fov": "Düşey görüş alanı", + "render.camera_pitch": "Kamera yatıklığı", + "render.camera_roll": "Yuvarlanma", + "render.camera_set": "Render Kamerasını Ayarla", + "render.camera_target": "Hedef konumu · mm", + "render.camera_yaw": "Sapma", + "render.chromatic_offset": "Kromatik kenar kayması", + "render.clear_stage": "Kaydedilmiş sahneyi kaldır", + "render.copy_request": "JSON kopyala", + "render.cpu_aa_help": "Uzamsal örnekler: daha fazla örnek kenarları iyileştirir ve render süresini artırır.", + "render.cpu_area_add": "Dikdörtgen CPU ışığı ekle", + "render.cpu_area_editor": "CPU dikdörtgen ışıkları", + "render.cpu_area_editor_help": "Milimetre cinsinden tam kenar vektörleri; U çarpı V ışık veren tarafa bakar. Bu, GPU kenar-yarısı vektörlerinden farklıdır.", + "render.cpu_area_full_u": "Tam U kenarı · mm", + "render.cpu_area_full_v": "Tam V kenarı · mm", + "render.cpu_area_samples": "Alan ışığı örnekleri", + "render.cpu_binding_confirm": "Bu gövdeyi onayla", + "render.cpu_binding_stale": "Sahne değişti. Render'dan önce bu yansıma hedefini yeniden onaylayın.", + "render.cpu_body_choose": "Bir gövde seçin", + "render.cpu_body_filter": "Gövdeleri ada göre filtrele", + "render.cpu_body_filter_more": "Daha fazla gövde görmek için filtreyi daraltın.", + "render.cpu_body_missing": "Bir yansıma hedefi eksik, gizli, belirsiz veya adı 128 bayttan uzun. Yeniden seçin.", + "render.cpu_budget": "CPU kaynak profili", + "render.cpu_budget_bodies": "Gövde üst sınırı", + "render.cpu_budget_compact": "Sıkışık (eski sınırlar)", + "render.cpu_budget_details": "Kaynak sınırları", + "render.cpu_budget_help": "Daha büyük sınırları açıkça seçin. Çözünürlük ve örnekler asla otomatik azaltılmaz.", + "render.cpu_budget_memory": "İş bellek üst sınırı", + "render.cpu_budget_not_guarantee": "Bunlar kabul üst sınırlarıdır, RAM ayırma veya hız garantisi değildir. Geometri, film ve saklanan önizlemeler bellek bütçesini paylaşır; render iptal edilebilir kalır.", + "render.cpu_budget_resize": "Taslak, bu CPU profilini veya kamera-örnek bütçesini aşıyor. Daha küçük boyutları açıkça kabul edin veya daha büyük bir profil seçin.", + "render.cpu_budget_studio": "Stüdyo (büyük görüntüler)", + "render.cpu_budget_triangles": "Üçgen üst sınırı", + "render.cpu_budget_workstation": "İş istasyonu (ağır sahneler)", + "render.cpu_captured_hdr": "Bu görüntü için yakalanan HDR", + "render.cpu_check_capture_help": "Kontrol ve Başlat aynı dosya özetini doğrular veya gömülü HDR'ı kullanır. Her görüntü yakaladığı kaynağı tutar.", + "render.cpu_check_changed": "Kontrolden sonra kontroller veya model değişti. Render'dan önce yeniden kontrol edin.", + "render.cpu_constant_help": "Sabit ışıma, yansıyan veya geçen ışınlar tarafından görülür. Doğrudan dağınık aydınlatma sağlamaz.", + "render.cpu_custom_directions": "Ön ayarı özel yönlü ışıklarla değiştir", + "render.cpu_direction": "Işığa doğru yön (X, Y, Z)", + "render.cpu_directional": "Yönlü ışık", + "render.cpu_directional_add": "Yönlü ışık ekle", + "render.cpu_environment": "CPU ortamı", + "render.cpu_environment_background": "Görüntü arka planı, ortam aydınlatmasından ayrı kalır.", + "render.cpu_environment_bounds": "CPU şiddeti 0-64 olmalı, HDR dönüşü ±1.000.000 radyan içinde sonlu olmalı ve HDR örnekleri 1, 4, 16 veya 64 olmalıdır.", + "render.cpu_environment_constant": "Sabit ikincil ışın ortamı", + "render.cpu_environment_none": "CPU ortamı yok", + "render.cpu_environment_samples": "HDR aydınlatma örnekleri", + "render.cpu_exposure_help": "CPU pozlaması −16 ile 16 EV arasında olmalıdır. Bu aralığın dışındaki bir GPU pozlaması, siz değiştirene kadar korunur.", + "render.cpu_fixed": "Tek görüntü", + "render.cpu_hdr_help": "Radiance .hdr, 2:1 panorama, en çok 2048 × 1024 ve 16 MiB. CPU, dosyada açıkça belirtilmiş sRGB/D65 renk alanı gerektirir; belirtilmemiş renk alanları ve EXR reddedilir.", + "render.cpu_hdr_reflection_help": "HDR pürüzlü yansımalar, tamamen metalik gövde ve yüzey yüzeyleri gerektirir. Kontrol, desteklenmeyen kombinasyonları bildirir.", + "render.cpu_key_rim": "Ana ve kontur ışığı", + "render.cpu_last_check": "Son CPU kontrolü", + "render.cpu_light_help": "En fazla sekiz yönlü ışık. Boş özel liste onları kapatır; bir ön ayar seçmek ışıklarını geri getirir. Renkler doğrusal RGB'dir ve şiddet görecelidir, watt değildir.", + "render.cpu_light_intensity": "Göreceli şiddet (0-64)", + "render.cpu_light_minimum": "Zayıflama için en az mesafe", + "render.cpu_light_position": "Dünya konumu (X, Y, Z)", + "render.cpu_light_reference": "Şiddet için referans mesafe", + "render.cpu_light_remove": "Işığı kaldır", + "render.cpu_lighting": "Aydınlatma ön ayarı", + "render.cpu_lights": "CPU ışıkları", + "render.cpu_linear_color": "Doğrusal renk (R, G, B)", + "render.cpu_neutral": "Nötr", + "render.cpu_opaque_required": "CPU ışın izleme opak arka plan ister. Devam etmek için Saydam arka planı temizleyin.", + "render.cpu_options_pending": "Bu CPU paneli henüz ışımayı, yüzey efektlerini, camı veya anizotropiyi düzenleyemez. Kullanmadan önce o API seçeneklerini temizleyin.", + "render.cpu_point": "Nokta ışık", + "render.cpu_point_add": "Nokta ışık ekle", + "render.cpu_point_help": "Seçili yönlü aydınlatmaya eklenen en fazla sekiz nokta ışık. Mesafeler mm cinsindendir; en az mesafe referans mesafeyi aşmamalıdır.", + "render.cpu_primary_samples": "Piksel başına kenar örneği", + "render.cpu_progressive": "CPU artımlı", + "render.cpu_progressive_help": "Mevcut CPU tümleştiricisini tek birincil örnekli geçişlerde biriktirin. Seçili yansımalar tek örnek gerektirir; alan ışıkları, dielektrikler ve anizotropi Tek görüntü gerektirir.", + "render.cpu_progressive_limits": "En fazla 1.048.576 piksel ve 16.777.216 piksel × örnek değerlendirmesi. Örnekleri değiştirmek görüntüyü asla otomatik yeniden boyutlandırmaz.", + "render.cpu_progressive_seed": "CPU örnekleme tohumu", + "render.cpu_progressive_spp": "piksel başına örnek", + "render.cpu_reflection_add": "Pürüzlü yansıma ekle", + "render.cpu_reflection_depth": "Yansıma derinliği (1-8)", + "render.cpu_reflection_empty": "Gövde seçilmedi: sahne yansımaları kapalı.", + "render.cpu_reflection_help": "Gövdeleri seçin ve Kapalı, Ayna veya Pürüzlü ayarlayın. Pürüzlü, atanan yüzey pürüzlülüğünü kullanır. Daha fazla örnek ve sekme süreyi artırır; bu sınırlı speküler taşınımdır, küresel aydınlatma değildir.", + "render.cpu_reflection_limit": "En fazla 64 yansıyan gövde desteklenir.", + "render.cpu_reflection_mirror": "Ayna", + "render.cpu_reflection_off": "Kapalı", + "render.cpu_reflection_rough": "Pürüzlü", + "render.cpu_reflection_samples": "Yansıma örnekleri (1-64)", + "render.cpu_reflections": "CPU yansımaları", + "render.cpu_runtime_help": "Sayısal ışık ve ortam ayarları kurulumla kaydedilir. Gövde yansımaları ve HDR dosyaları geçici kalır. Mevcut alan ışığı ve spot koni değerleri korunur.", + "render.cpu_sampling_mode": "CPU örnekleme kipi", + "render.cpu_shadows": "Gölge düşürsün", + "render.cpu_summary": "CPU ışın izleme · yansımalar · HDR · yönlü ve nokta ışıklar", + "render.cpu_warm_cool": "Sıcak ve soğuk", + "render.diag_bodies": "Görünen gövdeler", + "render.diag_job_details": "Yakalanan iş ayrıntıları", + "render.diag_last_check": "Son ön kontrol", + "render.diag_memory": "Mantıksal kabul tahmini", + "render.diag_not_implemented": "Açık yetenek sınırları", + "render.diag_preflight_details": "Ön kontrol ayrıntıları", + "render.diag_request": "Geçerli tam istek", + "render.diag_triangles": "Üçgenler", + "render.discard_continue": "Taslağı at ve devam et", + "render.draft_confirm_help": "Geçerli render taslağında uygulanmamış düzenlemeler var. Değiştirmeden önce kaydedin, açıkça atın veya düzenlemeye devam edin.", + "render.draft_confirm_title": "Düzenlenmiş render ayarlarını koru", + "render.effects_gpu_only": "Bu efektler GPU yol izleme gerektirir. Sayfa değiştirmek işleyiciyi asla otomatik değiştirmez.", + "render.effects_help": "Sıralı renk görünümlerini ve görüntü-uzayı mercek efektlerini birleştirin. Render ve ham ana görüntü yeniden derecelendirme aynı kayıtlı ayarları kullanır. Ham EXR değişmeden kalır. Bunlar orijinal sanatsal kontrollerdir, kalibre mercek veya marka film emülasyonları değildir.", + "render.effects_reset_lens": "Mercek efektlerini sıfırla", + "render.effects_seed": "Desen tohumu", + "render.export_display": "Dışa aktar: görüntü PNG", + "render.export_linear": "Dışa aktar: ham doğrusal EXR", + "render.exr_pending": "GPU ham doğrusal EXR'ı saklayabilir. Sıkıştırma, çok katmanlı görüntüler ve yardımcı render geçişleri kullanılamamaya devam ediyor.", + "render.film_grain": "Fotoğrafik gren", "render.fit": "Ürünü sığdır", + "render.flare_ghosts": "Kaynak başına hayalet halka", + "render.flare_halo": "Flare halesi", + "render.flare_streak": "Anamorfik tarzı çizgi", + "render.flare_strength": "Vurgu flare şiddeti", + "render.flare_threshold": "Sahne-doğrusal flare eşiği", + "render.gpu_depth": "En fazla yol derinliği", + "render.gpu_options_help": "Örnekler, derinlik, tohum ve pozlama bu kurulumla kaydedilir. Yalnızca etkin görüntü yöntemi kaydedilir.", + "render.gpu_path_failed": "GPU yol izleyici kullanılamıyor", + "render.gpu_path_first_setup": "Bu GPU'daki ilk kurulum birkaç dakika sürebilir; bu sırada SolidCraft kullanılabilir kalır. Sonraki açılışlar, sürücü onları tuttuğu yerde derlenmiş shader'ları yeniden kullanır.", + "render.gpu_path_preparing": "GPU yol izleyici: shader'lar derleniyor…", + "render.gpu_seed": "Rastgele tohum", + "render.gpu_unavailable": "GPU yol izleme bu cihazda hazır değil.", + "render.ground_apply": "Zemini sığdır ve kaydet", + "render.ground_gap": "Açık boşluk payı", + "render.ground_linear_rgb": "Dağınık yansıtıcılık · doğrusal RGB", + "render.ground_margin": "Zemin genişliği payı", + "render.hdr_details": "HDR kaynak ayrıntıları", + "render.hdr_embedded": "Bu tasarımın içine kaydedilmiş HDR", + "render.hdr_embedded_help": "Render, tasarıma dahil edilen baytları kullanır; orijinal dosya artık gerekmez.", + "render.hdr_file_captured": "HDR dosyası kontrol edildi. Kaydetme bu baytları gömer; dosya değişirse açıkça yeniden kontrol edin.", + "render.hdr_inspect": "HDR dosyasını kontrol et", + "render.hdr_inspect_required": "Kaydetmeden veya render'a başlamadan önce bir HDR dosyası seçin ve kontrol edin.", + "render.hdr_primaries_declared": "Kaynak renk alanını beyan ediyor.", + "render.hdr_primaries_srgb": "Renk alanı: sRGB/D65", + "render.hdr_primaries_undeclared": "Kaynak renk alanını beyan etmiyor; işleyici renk gereksinimlerini inceleyin.", + "render.hdr_resource_missing": "Bu tasarımda kaydedilen HDR kaynağı eksik.", + "render.image_advanced": "Gelişmiş GPU kontrolleri", "render.image_cancelled": "Render iptal edildi", "render.image_cancelling": "İptal ediliyor", "render.image_completed": "Resim dışa aktarmaya hazır", "render.image_encoding": "PNG kodlanıyor", "render.image_export": "PNG dışa aktar", + "render.image_exposure": "Pozlama", "render.image_failed": "Render başarısız", "render.image_height": "Yükseklik", "render.image_help": "CPU önizleme resmi · PNG · yaklaşık saydamlık", + "render.image_host_missing": "Yüklü bir görüntü ana makinesi yok.", + "render.image_method": "Görüntü yöntemi", "render.image_overwrite": "Mevcut dosyanın üzerine yaz", "render.image_preparing": "Resim hazırlanıyor", + "render.image_progressive": "Artımlı render", "render.image_queued": "Render için sırada bekliyor", "render.image_reduce": "Daha küçük bir resim veya daha basit bir sahne deneyin.", "render.image_running": "Resim render ediliyor", + "render.image_samples": "Piksel başına örnek", + "render.image_scene_stale": "Bir görüntüyü kontrol etmeden veya başlatmadan önce modelleme hareketini bitirin veya sahneyi yenileyin.", "render.image_stale": "Bu resim, sonraki değişikliklerden önceki sahneyi kullanıyor.", "render.image_start": "Render'ı başlat", "render.image_supported": "Render isteği destekleniyor; kuyruk ve bellek, başlatılırken yeniden kontrol edilir.", @@ -1033,20 +1832,347 @@ "render.image_unknown": "Render durumu kullanılamıyor", "render.image_use_largest": "Bu en-boy oranıyla en büyük boyutu kullan:", "render.image_width": "Genişlik", + "render.include_rig_cards": "Pasif kartları ve bayrakları dahil et", + "render.inspect_scene": "Yakalanan sahne özetini yenile", + "render.keep_editing": "Düzenlemeye devam et", + "render.layer_down": "Aşağı taşı", + "render.layer_enabled": "Katman etkin", + "render.layer_remove": "Katmanı kaldır", + "render.layer_strength": "Katman şiddeti", + "render.layer_up": "Yukarı taşı", + "render.lens_effects_help": "Flare, gerçek doğrusal görüntüdeki en fazla dört ayrık parlak kaynağı kullanır. Hayaletler, hale, çizgiler, kromatik kaymalar ve radyal bozulma sanatsal görüntü-uzayı yaklaşımlarıdır. Uzamsal efektler opak çıktı ister; örnek dışındaki alan görüntü kenarını uzatır. Gren deterministiktir. Fizik, EXR veya geometri değiştirilmez.", + "render.lens_effects_title": "Mercek esinli ve fotoğrafik", + "render.library_all": "Katalog", + "render.library_all_states": "Tüm kullanılabilirlik durumları", + "render.library_applied": "Kaynak yansıtması uygulandı. Başlamadan önce tam render isteğini kontrol edin.", + "render.library_apply_hdr": "Bu HDR ortamıyla kaydet", + "render.library_apply_maps": "Oluşturulmuş GPU yüzey haritalarını kullan", + "render.library_apply_studio": "Oluşturulmuş stüdyo yansıtmasını kaydet", + "render.library_apply_uniform": "Tek biçimli opak görünüm uygula", + "render.library_authored_help": "Orijinal oluşturulmuş kaynaklar örnekleyicidir, ölçülmüş mühendislik verisi değildir. Her eylem yalnızca belirttiği yansıtmayı uygular.", + "render.library_blocked": "Engelli / kalibrasyon gerekir", + "render.library_capabilities": "Yetenek özellikleri", + "render.library_center": "Düzenek merkezi", + "render.library_clear_search": "Temizle", + "render.library_details": "Özellik ve kaynak geçmişi", + "render.library_emitters_only_ack": "Yalnızca ışık verenleri kullan; belgelenmiş pasif kartları atla", + "render.library_empty": "Eşleşen kaynak yok. Farklı bir sorgu veya kullanılabilirlik filtresi deneyin.", + "render.library_environment_concepts": "Ortam kavramları", + "render.library_extent": "Konu genişliği", + "render.library_favorite": "Sık kullanılanlara ekle", + "render.library_favorites": "Sık kullanılanlar", + "render.library_hdr": "Yerleşik HDR ortamları", + "render.library_hdr_help": "Orijinal HDR'ı kaydedilen kurulumun içine gömer. Oluşturulmuş boylam başlangıcı açıkça dönüştürülür; kaydetmeden sonra harici dosya gerekmez.", + "render.library_inspect_only": "İncelemek için seçin; hiçbir şey otomatik uygulanmaz. Sık kullanılanlar ve son geçmiş, bu açık belge oturumuna aittir.", + "render.library_light_concepts": "Aydınlatma kavramları", + "render.library_maps_help": "Yerleşik haritalar, sabitlenmiş kaynaklar ve yerel tekrar eşlemesiyle kaydedilebilir. Geçici optik geçersiz kılmalar ayrı bir kip olarak kalır.", + "render.library_material_concepts": "Malzeme kavramları", + "render.library_native_scenes": "Yerli stüdyolar", + "render.library_next": "Sonraki sayfa", + "render.library_omitted": "Dahil edilmedi", + "render.library_physical_profiles": "Fiziksel referans profilleri", + "render.library_previous": "Önceki sayfa", + "render.library_quality_concepts": "Kalite özellikleri", + "render.library_recent": "Son kullanılanlar", + "render.library_replace_environment": "Mevcut ortamı açıkça değiştir", + "render.library_replace_studio": "Kaydedilmiş aydınlatma, ortam ve sahneyi değiştir", + "render.library_results": "Eşleşen kaynaklar", + "render.library_rig_help": "Açık bir merkezde ve fiziksel genişlikte bir kez sığdırın. Tam düzenekler pasif kartları içerir; kalibrasyon engelleri yine reddeder. Kaydetmeden önce muhafazakar ışık/pasif kart boşluğu kontrol edilir.", + "render.library_rigs": "Oluşturulmuş ışık düzenekleri", + "render.library_save_maps": "Haritaları bu kuruluma kaydet", + "render.library_scene_bounds": "Yakalanan sahne sınırlarını kullan", + "render.library_scenes": "Sahne özellikleri", + "render.library_search": "Kitaplıkta ara", + "render.library_select_hint": "Desteklenen eylemlerini ve sınırlamalarını incelemek için Kitaplıkta bir kaynak seçin.", + "render.library_selene": "SELENE opak görünümleri", + "render.library_selene_shots": "SELENE çekim özellikleri", + "render.library_short_blocked": "Kullanılamıyor", + "render.library_short_native": "Yerli kompozisyon", + "render.library_short_projection": "Desteklenen yansıtma", + "render.library_short_reference": "Yalnızca referans", + "render.library_short_specification": "Yalnızca özellik", + "render.library_source_preview": "Kaynak haritası önizlemesini yükle", + "render.library_source_preview_help": "Oluşturulmuş temel renk kaynak haritası. Bu, render edilmiş veya ölçülmüş bir malzeme önizlemesi değildir.", + "render.library_specification_only": "Yalnızca özellik: tam çalıştırılabilir bir ön ayar değil. Gereken efektler, kaynaklar ve konu rolleri hâlâ açıkça uygulama ve bağlama gerektirir.", + "render.library_specs": "Yalnızca özellikler", + "render.library_status": "Kullanılabilirlik", + "render.library_surfaces": "Oluşturulmuş PBR yüzeyleri", + "render.library_target": "Hedef gövde", + "render.library_title": "Render kaynak kitaplığı", + "render.library_unfavorite": "Sık kullanılanlardan kaldır", + "render.library_uniform_ack": "Uzamsal veya gelişmiş efektler olmadan tek biçimli yaklaşımı kullan", + "render.library_usable": "Çalıştırılabilir yansıtmalar", + "render.linear_help": "Giderme, pozlama, ton eşleme, filtreler ve arka plandan önce 32 bit float RGBA ana görüntüyü saklar. Doğrusal sRGB/D65; kapsama ile ön çarpımlı. Ek bellek açıkça kabul edilir. Sıkıştırma veya ek geçiş yoktur.", + "render.linear_retain": "Ham doğrusal EXR'ı sakla", + "render.linear_unavailable": "Seçilen tamamlanmış karede saklanmış EXR yok. Render'dan önce saklamayı etkinleştirin; eski bir PNG ham ışınımı geri getiremez.", + "render.look_add": "Renk görünümü ekle", + "render.look_bleach": "Bleach-bypass esinli", + "render.look_cool": "Soğuk", + "render.look_cyanotype": "Siyanotip esinli", + "render.look_faded": "Solmuş baskı", + "render.look_mono": "Tek renk", + "render.look_sepia": "Sepya", + "render.look_strength": "Görünüm şiddeti", + "render.look_teal_orange": "Turkuaz / turuncu", + "render.look_title": "Yaratıcı görünüm yığını", + "render.look_warm": "Sıcak", + "render.mapping_scale": "Fiziksel tekrar çarpanı", + "render.material_absorption": "Soğurma R · G · B (mm başına)", + "render.material_add": "Bu gövdeyi ekle veya düzenle", + "render.material_assignments": "Gövde atamaları", + "render.material_binding_enable": "Bu gövde geçersiz kılmayı dahil et", + "render.material_box": "Eksen hizalı kutu", + "render.material_browse": "Görüntü seçin…", + "render.material_certification": "Kapalı cam geometrik mesafe kullanır. Topoloji, yönelim, örtüşme ve optik sınırlar GPU hazırlığında kontrol edilir; Kontrol yalnızca isteği kabul eder.", + "render.material_choose_body": "Bir sahne gövdesi seçin", + "render.material_closed": "Kapalı katı ağ", + "render.material_coat": "Temel malzemenin üzerinde şeffaf kat", + "render.material_coat_enable": "Şeffaf katmanı etkinleştir", + "render.material_coat_help": "Mevcut opak görünümün üzerinde örnekleyici dielektrik kaplama. Sıfır ağırlık temeli değiştirmez.", + "render.material_color_map": "Temel renk görüntüsü (sRGB)", + "render.material_color_replace": "Temel harita gövde renginin yerini alır", + "render.material_custom": "Özel örnekleyici optikler", + "render.material_enable": "Bu GPU malzeme geçersiz kılmalarını kullan", + "render.material_filter": "Sahne gövdelerini filtrele…", + "render.material_filter_help": "En fazla 128 eşleşen gövde gösterilir. Büyük sahneler için filtreyi daraltın.", + "render.material_glass": "Cam ve optik soğurma", + "render.material_glass_enable": "Bu gövdede fiziksel cam kullan", + "render.material_glass_exclusive": "Cam, bu işleyicide bir gövdeyi şeffaf katman veya çalışma zamanı haritalarıyla paylaşamaz.", + "render.material_glass_help": "Orijinal örnekleyici tarifler. Numuneler geçirgenliği gösterir, render önizlemesi değildir. Soğurma = −ln(doğrusal geçirgenlik) / referans mesafe; alfa değişmez.", + "render.material_gpu_required": "Bu etkin malzeme geçersiz kılmaları GPU yol izleme gerektirir. Kontrol veya Başlat'tan önce GPU'yu seçin veya geçersiz kılmaları devre dışı bırakın.", + "render.material_ior": "Kırılma indisi (IOR)", + "render.material_limits": "En fazla 128 gövde geçersiz kılma, 32 ayrık cam gövde, 64 katman ve 128 doku bağı. Özdeş haritalar depolamayı paylaşır; gerçek cihaz ve toplam bellek sınırları yine geçerlidir.", + "render.material_map_invalid": "Harita yolları sınırlı yerel yollar olmalıdır; normal şiddeti sonlu ve 0 ile 1 arasında olmalıdır.", + "render.material_map_required": "Haritaları kullanmadan önce bir renk görüntüsü veya normal görüntüsü seçin.", + "render.material_maps": "Düzlemsel renk ve normal haritaları", + "render.material_maps_enable": "Bu opak gövde için haritaları etkinleştir", + "render.material_maps_help": "PNG/JPEG en çok 1024×1024; toplam 16 MiB kodlanmış. U ve V, dik dünya-mm tekrar vektörleridir (en fazla 128 tekrar). Renk sRGB'dir; normal verisi OpenGL +Y kullanır. Dosyalar Kontrol/Başlat'ta yakalanır.", + "render.material_metallic_map": "Metalik haritası (doğrusal)", + "render.material_normal_map": "Normal görüntüsü (OpenGL, +Y)", + "render.material_normal_strength": "Normal şiddeti (0-1)", + "render.material_origin": "Eşleme başlangıcı X · Y · Z (mm)", + "render.material_refresh": "Sahne gövdelerini yenile", + "render.material_refresh_needed": "Sahne değişti. Hedef eklemeden önce gövde listesini yenileyin.", + "render.material_remove": "Bu atamayı kaldır", + "render.material_repeat_u": "Bir U tekrarı X · Y · Z (mm)", + "render.material_repeat_v": "Bir V tekrarı X · Y · Z (mm)", + "render.material_revalidate": "Bu gövdeyi yeniden doğrula", + "render.material_revalidate_needed": "Bu atama, önceki bir sahne revizyonuna ait. Render'dan önce tam gövde kimliğini yeniden doğrulayın.", + "render.material_roughness": "Katman pürüzlülüğü (0.045-1)", + "render.material_roughness_map": "Pürüzlülük haritası (doğrusal)", + "render.material_shadow": "Düz gölge ışınlarını geçir", + "render.material_target_missing": "Gövde sırası ve adı artık eşleşmiyor. Bu atamayı kaldırın ve amaçlanan gövdeyi açıkça yeniden seçin.", + "render.material_thickness": "İnci levha kalınlığı (mm)", + "render.material_thin": "İnce levha", + "render.material_title": "GPU görüntü malzemeleri", + "render.material_transient": "Bu belge sekmesi için geçici optik geçersiz kılmalar. Tasarımda, render kurulumunda veya malzeme kitaplığında kaydedilmezler.", + "render.material_v_up": "Doku V görüntüde yukarıyı gösterir", + "render.material_weight": "Katman ağırlığı (0-1)", + "render.method_cpu": "CPU ışın izleme", + "render.method_gpu": "GPU yol izleme", + "render.method_limit_raster": "Raster, sabit opak stüdyo önizlemesini kullanır. Desteklenen optik kontroller için açık bir ışın izleme yöntemi seçin.", + "render.method_raster": "CPU raster", "render.navigation_help": "Kamera, tasarım modundaki gibi hareket eder (Ayarlar › Gezinme). Kurulumu kaydettiğinizde geçerli kamera kaydedilir.", + "render.nested_enable": "Sertifikalı iç içe dielektrikler", + "render.nested_help": "En fazla 16 kapsayan katman; her üst katman dışbükey ve her alt katman onun içinde sıkıca bulunmalıdır. Kesişimler, temas eden yüzeyler, ince levhalar ve düz gölge geçişi reddedilir. Kamera-içinde durumu sertifikalı hiyerarşiyi izler. Sıvı yüzeyi oluşturmaz veya temas eden CAD sınırlarını birleştirmez.", "render.opaque_image_summary": "Önizleme PNG · opak PBR · harmanlanmış saydamlık", "render.opaque_preview_help": "Opak PBR ve düz renkler; saydamlık harmanlanarak gösterilir. Kırılma, HDRI ve son render henüz kullanılamıyor.", + "render.optics_remove": "Kaydedilmiş optikleri kaldır", + "render.optics_replace": "Bu hedefin kaydedilmiş optiklerini açıkça değiştir", + "render.optics_save": "Bu optikleri kuruluma kaydet", + "render.optics_saved": "Kaydedilmiş optik hedefler", + "render.optics_saved_help": "Tam tanım, özellik ve tekrar kimliği çevrimdışı yeniden açılmada korunur. Eksik/değiştirilmiş/gizli hedefler reddedilir; mühendislik malzemeleri değişmez. Kaydedilmiş bir hedefi kaldırmadan önce sayısal düzenlemeleri kaydedin veya atın.", + "render.output_format_status": "PNG, tamamlanmış tam görüntü görüntüsüdür. İsteğe bağlı GPU EXR, görüntü filtrelerinden önce ham sahne-doğrusal FLOAT32 ışınımını saklar. Dışa aktarma, önizleme önbelleğini veya başka bir işi asla ikame etmez.", + "render.output_lock_ratio": "En-boy oranını kilitle", + "render.output_over_budget": "İstenen görüntü, seçilen kaynak sınırını aşıyor. Uygun bir boyut veya profil açıkça seçin; otomatik düşürme yapılmaz.", + "render.output_ratio_refused": "Bağlı boyut, bu yöntemin boyut sınırını aşıyor. Önceki boyut korunur; oranı kilitten çıkarın veya daha küçük bir değer seçin.", + "render.output_swap_orientation": "Genişlik ve yüksekliği değiştir", + "render.page_aging": "Yaşlanma ve kirlenme", + "render.page_all": "Tüm kontroller", + "render.page_appearance": "Görünüm", + "render.page_background": "Arka planlar", + "render.page_camera": "Kamera", + "render.page_diagnostics": "Tanılama", + "render.page_effects": "Mercek ve sonlandırma efektleri", + "render.page_environment": "Ortam", + "render.page_lighting": "Aydınlatma", + "render.page_output": "Çıktı", + "render.page_scene": "Sahne", + "render.passive_stage": "Zemin ve pasif sahne", + "render.passive_stage_help": "Sonlu pasif paneller yalnızca render görüntülerine aittir. CAD gövdesi veya kütle eklemezler. Uygulamadan sonra yerleşim sabittir; ürün sınırlarıyla kesişen reddedilir. CPU dağınık sekme aydınlatması sağlamaz.", "render.perspective": "Perspektif kamera", + "render.physical_acknowledge": "Bu kısmi referansın kademe, durum ve kaynak incelemesi gerektirdiğini anlıyorum", + "render.physical_associations": "Fiziksel adaylar ve roller", + "render.physical_background_help": "Kamera arka planından ayrı, gerçek pasif zemin ve duvar. Siklorama 24 çokgen şerit kullanır; sonsuz veya analitik pürüzsüz bir yüzey değildir. Kaydedilmiş sahneyi yalnızca onayınızla değiştirir.", + "render.physical_copy_plan": "Kaynakları ve atlamaları olan planı kopyala", + "render.physical_cyclorama": "Çokgen sikloramayı sığdır", + "render.physical_floor_wall": "Fiziksel zemin ve duvarı sığdır", + "render.physical_material_name": "Önerilen referans malzeme adı", + "render.physical_omissions": "Yerli kartta temsil edilemeyen özellikler", + "render.physical_plan_only": "Yalnızca salt okunur plan hazırlandı. Malzeme oluşturulmadı veya atanmadı. Yerli kartı incelerken genişletilmiş profilini ve atlamalarını koruyun.", + "render.physical_prepare_plan": "Oluşturma planını hazırla (uygulamaz)", + "render.physical_separate": "Görünüm, malzeme kimliği değildir. Bunlar kaynaklı referanslardır, sertifikalı etkin özellikler değildir. Mevcut kütle, mühendislik malzemeleri ve optikler değişmez.", + "render.physical_unknown": "Sayısal aday belirlenmemiş. Kademe, formülasyon veya yapı belirtilmelidir; bilinmez, sıfır değildir.", + "render.post_contrast": "Kontrast", + "render.post_gain_b": "Mavi kazancı", + "render.post_gain_g": "Yeşil kazancı", + "render.post_gain_r": "Kırmızı kazancı", + "render.post_help": "Yalnızca yaratıcı sunum. RGB kazançları ton eşlemesinden önce gelir; kontrast, doygunluk ve vinyet görüntü-doğrusal ışığında ardından gelir. Render'ı Başlat yeni taşınım örnekleri oluşturur. Yeniden Derecelendir, giderme veya yeni ışın olmadan seçilen saklanan ham ana görüntüyü kullanır.", + "render.post_reset": "Sunum filtrelerini sıfırla", + "render.post_saturation": "Doygunluk", + "render.post_title": "Sunum filtreleri", + "render.post_vignette": "Vinyet", "render.preview": "Yerleşik önizleme", "render.preview_help": "Harmanlanmış saydamlıkla raster görüntü. Kırılma, HDRI ve son render henüz kullanılamıyor.", + "render.preview_image_settings_help": "Canlı Önizleme, sabit stüdyo aydınlatmasını korur. Pozlama ve görüntü aydınlatması, Kontrol veya Başlat sırasında görüntü işine uygulanır.", + "render.preview_retry": "Canlı önizlemeyi yeniden dene", + "render.preview_unavailable_help": "Canlı önizleme kullanılamıyor. Kaydedilmiş kurulumlar ve görüntü işi kontrolleri erişilebilir kalır. Sahneyi değiştirin veya açıkça yeniden deneyin; reddedilen sahne her karede yeniden kurulmaz.", + "render.preview_upload": "Canlı önizleme tepe noktası yükü", + "render.preview_upload_help": "Tam önizleme tepe noktası baytları, toplam GPU veya işlem belleği değil. Geometri sadeleştirilmez. Görüntü işleri kendi kabul ve aydınlatmalarını kullanır.", + "render.progressive_image_summary": "Önizleme PNG · PBR ve cam · artımlı örnekler", + "render.quality_ack": "Sabit bütçeli yansıtma ve atlamaları onayla", + "render.quality_apply": "Bu sabit örnekleme bütçesini kullan", + "render.quality_projection_help": "Q ön ayarları gelecekteki gereksinimleri içerir. Bu eylem yalnızca desteklenen sabit örnekli bir PNG bütçesini yansıtır ve uyarlanabilir durdurma, ham doğrusal çıktı ile bağımsız geçiş sınırlarını açıkça atlar.", + "render.quality_review": "Örnekleme bütçesini incele", + "render.queue_pending": "Bu arayüzde otomatik bir üretim kuyruğu veya animasyon işleyici yoktur. Tamamlanmış durağan görüntüler ayrı ayrı dışa aktarılabilir kalır.", + "render.radial_distortion": "Radyal bozulma", + "render.regrade_action": "Ham ana görüntüyü yeniden derecelendir (giderme yok)", + "render.regrade_help": "Bu sunum kontrollerini kullanarak seçilen tamamlanmış ham ana görüntüden ayrı bir PNG oluşturur. Işın izlemez, yakalanan boyutu/kamerayı/ışıkları değiştirmez veya EXR'ın üzerine yazmaz. Giderme yeniden uygulanmaz: ham ana görüntüler onun kılavuzlarını saklamaz. Türev, aynı iş kontrollerinden dışa aktarılabilir kalır.", "render.reload_settings": "Kaydedilmiş ayarları yükle", + "render.replace_ground": "Mevcut sahnenin değiştirilmesini onayla", + "render.replace_saved_surface": "Bu hedef için mevcut kaydedilmiş bağlamın yerini al", "render.restore_camera": "Kaydedilmiş kamerayı yükle", + "render.result_actual_help": "Ekran pikseli başına bir görüntü pikseli.", + "render.result_capture": "Yakalanan revizyon", + "render.result_current": "Yakalanan model revizyonu güncel.", + "render.result_empty": "Henüz tamamlanmış görüntü yok. Ayarları kontrol edin, ardından render'ı başlatın.", + "render.result_fit": "Görüntüyü Sığdır", + "render.result_job": "İş", + "render.result_navigation": "Kaydırma ve yakınlaştırma, Gezinme tercihlerini kullanır. Space + sürükleme kaydırır.", + "render.result_open": "Tamamlanmış görüntüyü ana tuvalde aç.", + "render.result_preview": "Canlı Önizleme", + "render.result_provisional": "Geçici CPU görüntüsü", + "render.result_provisional_help": "Bu kontrol noktası dışa aktarılabilir değildir. Dışa aktarma en son tamamlanan sonucu tutar; iptal o sonuca döner.", + "render.result_reduced_display": "Görüntü önizlemesi, görünüm alanı cihaz/önbellek sınırına indirgendi. Saklanan PNG ve dışa aktarma tam çözünürlüğü korur; bu indirgenmiş görünüm için yerli %100 inceleme kullanılamaz.", + "render.result_retained": "En son tamamlanan görüntü gösteriliyor; daha yeni bir render onu değiştirmedi.", + "render.result_sequence": "Kontrol noktası", + "render.result_title": "Render Sonucu", "render.return_design": "Tasarıma dön", + "render.review_stale": "Bu inceleme bayat. Uygulamadan önce çözün veya yeniden kontrol edin.", + "render.ribbon_aging": "Yaşlanma", + "render.ribbon_backgrounds": "Arka planlar", + "render.ribbon_check": "Kontrol", + "render.ribbon_check_help": "Render'ın göndereceği tam geçerli taslağı doğrula. İşleyici yedeği, sessiz yeniden boyutlandırma veya kaynak değişimi yok.", + "render.ribbon_edit_lights": "Işıkları Düzenle", + "render.ribbon_effects": "Efektler", + "render.ribbon_environment_help": "HDR aydınlatma, yalnızca kameraya özel arka planlar ve fiziksel sahne yüzeyleri, açık değiştirme onayı olan ayrı kontrollerdir.", + "render.ribbon_finish_dialog": "Önce geçerli dosya veya onay diyaloğunu bitirin.", + "render.ribbon_frame": "Çerçevele", + "render.ribbon_hdr_library": "HDR Kitaplığı", + "render.ribbon_job_active": "Zaten bir render çalışıyor; başkasını başlatmadan önce açıkça iptal edin.", + "render.ribbon_light_rigs": "Işık Düzenekleri", + "render.ribbon_lights_help": "Değişikliği açıkça uygulamayana kadar mevcut kurulumu değiştirmeden oluşturulmuş düzenekleri inceleyin veya desteklenen ışıkları düzenleyin.", + "render.ribbon_materials": "Malzemeler", + "render.ribbon_materials_help": "Paylaşılan görünüm denetleyicisini ve orijinal yüzey kitaplığını açın. Optik düzenlemeler mühendislik özelliklerini asla sessizce değiştirmez.", + "render.ribbon_no_active_job": "İptal edilecek etkin bir render yok.", + "render.ribbon_no_result": "Tam görüntüsünü dışa aktarmadan önce bir render'ı tamamlayın.", + "render.ribbon_no_saved_camera": "Kamerayı geri yüklemeden önce bir çekim kaydedin.", + "render.ribbon_saved_camera": "Kaydedilmiş Kamera", + "render.ribbon_shots": "Çekimler", + "render.ribbon_studios": "Stüdyolar", + "render.ribbon_studios_help": "Uygulanmış stüdyo kompozisyonlarına göz atın ve uygulamadan önce değiştireceklerini inceleyin. Yalnızca kavram sahneler etiketli kalır.", + "render.ribbon_surface_maps": "Yüzey Haritaları", + "render.sampling_title": "Uyarlanabilir ve geçiş örnekleme", + "render.save_continue": "Kaydet ve devam et", "render.save_setup": "Kurulumu kaydet", + "render.saved_maps_runtime_conflict": "Kaydedilmiş yüzey bağlamları, geçici optik geçersiz kılmalar veya kaydedilmemiş HDR ile karıştırılamaz. HDR'ı kaydedin veya geçici girdileri açıkça kaldırın.", + "render.saved_surface_remove": "Kaydedilmiş bağlamı kaldır", + "render.saved_surfaces": "Kaydedilmiş yüzey bağlamları", + "render.saved_surfaces_help": "Sabitlenmiş yerleşik haritalar, yerel milimetrelerde seçilen tekrarı izler. Değiştirilmiş veya eksik hedef bir hatadır, asla otomatik yeniden atama değildir.", + "render.scene_apply": "İncelenen stüdyoyu uygula", + "render.scene_consent": "Aydınlatma, ortam, pozlama ve sahne değiştirmeyi onayla", + "render.scene_preserved_fields": "Kamera, örnekleme, boyutlar, optik bağlamlar, CAD geometrisi ve mühendislik malzemeleri korunur.", + "render.scene_preserves_design": "Görünen konu için aydınlatma ve pasif bir sahne oluşturun. Geometri, mühendislik malzemeleri ve kamera ayrı kalır.", + "render.scene_replaces": "Şunların yerini alır", + "render.scene_review": "Çöz ve incele", + "render.scene_review_help": "Uygulamadan önce tam yerli kompozisyonu inceleyin. Bağlanmamış gelişmiş SCENE özellikleri ikame edilmez.", + "render.scene_scope_details": "Kompozisyon kapsama alanı", + "render.setup_legacy_environment": "Bu eski kurulum, eski ortam dönüşü veya şiddeti kullanıyor. O değerler korunur; tam bir görüntü işi kaydetmeden önce onları açıkça dönüştürün.", "render.setup_name": "Kurulumun adı", + "render.setup_numeric_help": "Kaydetme, etkin görüntü yöntemini ve tüm sayısal ayarlarını kaydeder. Yeniden yükleme veya başka bir kurulum seçme bu taslağın yerini alır; kamerayı ayrı geri yükleyin.", + "render.setup_offline_help": "Bu yöntemi işleyicisi olmadan düzenleyip kaydedebilirsiniz. Kontrol ve Başlat, kullanılabilir bir ana makine gerektirir.", + "render.setup_runtime_unsupported": "Bu tam iş henüz kaydedilemez: haritalar veya sahne-gövde bağlamları içeriyor. Taşınabilir bir kurulum kaydetmeden önce o geçici girdileri kaldırın.", + "render.setup_save_missing": "Komut tamamlandıktan sonra kaydedilmiş render yapılandırması bulunamadı.", + "render.sharpening": "Detay keskinleştirme", + "render.shot_duplicate": "Kaydedilmiş çekimi çoğalt", + "render.shot_manager": "Kaydedilmiş çekimler", + "render.shot_new_name": "Yeni çekim adı", + "render.shot_remove": "Kaydedilmiş çekimi kaldır", + "render.shot_remove_help": "Yalnızca bu kaydedilmiş kurulumu kaldır. Kaynak geometri ve tamamlanmış görüntüler korunur; eylem geri alınabilir.", + "render.shot_remove_title": "Kaydedilmiş çekim kaldırılsın mı?", + "render.shot_rename": "Kaydedilmiş çekimi yeniden adlandır", + "render.shot_saved_only": "Önce geçerli taslağı kaydedin. Çoğalt ve yeniden adlandır, tam kaydedilmiş seçenekleri ve kaynak referanslarını korur.", + "render.sky_ground": "Zemin · doğrusal RGB", + "render.sky_horizon": "Ufuk · doğrusal RGB", + "render.sky_zenith": "Tepe · doğrusal RGB", + "render.soft_focus": "Yumuşak odak", + "render.stage_panel_count": "Kaydedilmiş paneller", + "render.studio_add_area": "Alan ışığı ekle", + "render.studio_ambient": "Sabit ortam ışınımı", + "render.studio_ambient_rgb": "Sabit ortam ışınımı (doğrusal RGB)", + "render.studio_aperture": "Diyafram yarıçapı", + "render.studio_area": "Alan ışığı", + "render.studio_area_help": "En fazla dört tek yüzlü dikdörtgen. Dik kenar-yarıları U ve V boyutu tanımlar; U × V aydınlatılan tarafa bakar. Koordinatlar dünya-uzayı milimetresidir.", + "render.studio_center": "Merkez X, Y, Z (mm)", + "render.studio_denoise": "Bitmiş görüntüdeki gürültüyü azalt", + "render.studio_denoise_help": "Son kenar-duyarlı filtre; ince detay yumuşayabilir. Cam ve keskin speküler yüzeyler filtreleri atlar.", + "render.studio_direction": "Güneşe doğru yön (X, Y, Z)", + "render.studio_environment": "Ortam", + "render.studio_environment_bounds": "Ortam dönüşü ±1.000.000 radyan içinde sonlu ve şiddet 0 ile 100 arasında olmalıdır.", + "render.studio_environment_none": "Ortam haritası yok", + "render.studio_focus": "Eksenel odak mesafesi", + "render.studio_half_u": "Kenar-yarısı U (mm)", + "render.studio_half_v": "Kenar-yarısı V (mm)", + "render.studio_hdr": "Radiance HDR dosyası", + "render.studio_hdr_browse": "HDR seçin…", + "render.studio_hdr_help": "Radiance .hdr, 2:1 panorama, en çok 2048 × 1024. EXR kullanılamaz. Renk varsayımı yalnızca renk alanı belirtilmemişse geçerlidir.", + "render.studio_hdr_required": "Yerel bir .hdr dosyası seçin.", + "render.studio_hdr_srgb": "Belirtilmemiş renk alanlarını doğrusal sRGB olarak yorumla", + "render.studio_intensity": "Ortam şiddeti", + "render.studio_lens": "Alan derinliği", + "render.studio_lens_perspective": "Alan derinliği perspektif kamera gerektirir.", + "render.studio_lighting": "Stüdyo aydınlatması", + "render.studio_lighting_enable": "Özel stüdyo aydınlatması kullan", + "render.studio_needs_review": "Yöntemi ve ayarları incele", + "render.studio_radiance": "Doğrusal RGB ışınım", + "render.studio_ready": "Kontrol için hazır", + "render.studio_remove_area": "Alan ışığını kaldır", + "render.studio_rotation": "Ortam dönüşü", + "render.studio_runtime_help": "Sayısal stüdyo ayarları ve kontrol edilmiş HDR kaynakları kurulumla kaydedilebilir. Gövde optik/malzeme geçersiz kılmaları geçici kalır ve kaydedilmiş görünümleri değiştirmez.", + "render.studio_saved": "Kaydedilmiş kurulum / geçerli kamera", + "render.studio_sky": "Sanatsal gökyüzü", + "render.studio_sky_help": "Aydınlatma için orijinal gökyüzü degrade; kalibre edilmiş atmosfer modeli değildir.", + "render.studio_sun": "Güneş", + "render.studio_sun_radius": "Açısal yarıçap", + "render.studio_title": "Render stüdyosu", + "render.studio_tone_map": "Ton eşleme", + "render.subsurface_enable": "İç saçılma rastgele yürüyüşü", + "render.subsurface_help": "Yalnızca kapalı dielektrik. Saçılma ve RGB soğurma, mm başına ayrı katsayılardır. Yollar gerçek geometrinin içinde saçılır, ardından sınırdan kırılır veya yansır. Düz gölge geçişini, yüzey gidermeyi ve dış hacmi devre dışı bırakın; tek bir Fresnel tabakası kullanın. Difüzyon shader, yoğunluk ızgarası veya ölçülmüş malzeme değildir. Yoğun ortamlar daha fazla örnek ve yol derinliği gerektirebilir.", + "render.subsurface_rate": "Saçılma çarpışma oranı", + "render.transmission_scope": "GPU cam, sertifikalı ayrık ortamları destekler. Kısıtlamasız iç içe ortamlar ve gürültüsüz bir geçiş tahminleyicisi sağlanmaz.", + "render.transmission_strata": "Koşullu Fresnel tabakaları", + "render.transmission_strata_help": "1, orijinal akışı korur. 2 veya 4 alt yol, Snell ve soğurma yasaları değişmeden ilk cam yansıma/geçiş seçimini tabakalara ayırır. Daha fazla yol daha fazla iş demektir; bu giderme, iç içe ortam desteği veya daha hızlı render sözü değildir.", "render.unavailable_preview": "Bu kurulum, kullanılamayan bir önizleme profili gerektiriyor.", "render.unsaved": "Kaydedilmemiş önizleme değişiklikleri", "render.use_preview": "Yerleşik önizlemeyi kullan", + "render.volume_albedo": "Saçılma albedosu · doğrusal RGB", + "render.volume_anisotropy": "Faz kosinüs ortalaması", + "render.volume_enable": "Katılımcı ortamı etkinleştir", + "render.volume_extinction": "Sönümleme katsayısı", + "render.volume_help": "Kamera ve dolaylı yollarda Beer zayıflaması ve HG saçılmasıyla tek bir sonlu kutunun içinde GPU taşınımı. Gölge zayıflaması dahil açık stüdyo/HDR/gökyüzü aydınlatmasını kullanır. Pozitif faz kosinüsü ileri doğru saçır. Cam sınırları ve yüzey giderme açıkça devre dışı bırakılmalıdır. Sıfır sönümleme taşınımı değiştirmez. Fiziksel ay atmosferi, yoğunluk ızgarası, hacim ışınımı, spektral taşınım veya sertifikalı malzeme özelliği değildir.", + "render.volume_max": "En fazla sınırlar · dünya mm", + "render.volume_min": "En az sınırlar · dünya mm", + "render.volume_title": "Sınırlı homojen hacim", "sample.bracket.about": "2 mm sac metal kuralına göre kenar flanşları ve bir kenet içeren taban flanşı", "sample.bracket.name": "Sac metal köşebent", "sample.enclosure.about": "Dudak, vida göbekleri, dayanak ve geçmeli bağlantı içeren, içi boşaltılmış blok", @@ -1072,16 +2198,25 @@ "search.suggest": "{label} mi demek istediniz?", "search.try": "Bir komut adı, bu tasarımdaki bir özellik veya bir parametre yazın. Bir komutu değerlerle çalıştırmak için kimliğini ve bir JSON nesnesi yazın: {example}", "search.valid": "Geçerli", + "section.off_hint": "Düzlem seçilmedi: Tamam kesiti kapatır.", + "set by the sketch's lines": "eskizin çizgileriyle belirlenir", "settings.display_quality_note": "Daha ince seviyeler eğri yüzeyleri ve kenarları daha pürüzsüz gösterir, ancak ağ oluşturma daha uzun sürer. Yalnızca görünüm değişir; tasarım ve dışa aktarımlar asla değişmez.", + "settings.frame_rate_details_note": "Son karelerin sürelerinin grafiğini üzerine çizilen üçgenlerle, bir kare süresi histogramını ve GPU'nun çizdiklerini ekler. Göstermek veya gizlemek için görünümdeki kare hızına tıklayın.", "settings.frame_rate_note": "Görünümün sağ alt köşesinde saniyedeki kare sayısını gösterir.", "settings.measure_axis_distances": "X/Y/Z mesafelerini göster", "settings.measure_axis_distances_help": "Ölç açıkken toplam mesafenin yanında dünya ekseni bileşen ölçülerini gösterir.", "settings.msaa_applies_on_restart": "Kenar yumuşatma, SolidCraft bir sonraki başlatıldığında uygulanır", "settings.msaa_reset": "{setting}: {requested}× bu grafik aygıtı tarafından desteklenmiyor; {reset}× olarak ayarlandı (desteklenen: {supported}).", "settings.msaa_unsupported": "Bu grafik aygıtı tarafından desteklenmiyor", + "settings.reference_geometry_through_bodies": "Referans geometriyi gövdelerin içinden göster", + "settings.reference_geometry_through_bodies_help": "Etkin olmayan eskiz konturlarını ve düzlem referanslarını gölgeli gövdelerin üzerinde çiz", "settings.reset_intro": "Bu ayarlar bu bilgisayarda çalışmadığı ve SolidCraft'ın başlamasını engelleyeceği için değiştirildi:", "settings.reset_title": "Ayarlar değiştirildi", "settings.supersampling_note": "Görünümü daha yüksek çözünürlükte çizer ve küçültür: 4K altındaki ekranlarda kenarlar, çizgiler ve ızgaralar daha pürüzsüz görünür. GPU süresi gerektirir: 1,5× ayarında yaklaşık 2,25 kat, 2× ayarında 4 kat daha fazla piksel işlenir.", + "settings.window_system_details": "Ayrıntılar", + "settings.window_system_note_now": "Yeniden başlattıktan sonra uygulanır. Şimdi: {now}.", + "settings.window_system_wayland_limited": "Bazı özellikler yerli Wayland'da sınırlıdır.", + "sheet.no_body": "sac metal gövde yok: Flanş > Taban ile bir tane başlatın veya bir plakayı Sac Metale Dönüştür ile sac metale çevirin (büyük düz yüzünü seçin)", "shortcut.json_error": "parametreler JSON biçiminde olmalıdır: {error}", "shortcut.no_command": "`{id}` komutu yok; JSON'dan önceki metin bir komut kimliği olmalıdır", "shortcut.pin": "S kutusunun üstüne sabitle", @@ -1097,6 +2232,11 @@ "sketch_panel.author": "Yazar yerleşimi: {path}", "sketch_panel.dimension_hint": "Bir değer veya ifade girip Tamam’a basın.", "sketch_panel.move_hint": "Uzaklıkları ve bir açı girip Tamam’a basın.", + "sketch_panel.plane_angle": "{plane}, {angle} döndürülmüş", + "sketch_panel.plane_fixed": "Sabit bir düzlem", + "sketch_panel.plane_flipped": "{plane}, diğer tarafından", + "sketch_panel.plane_offset": "{plane}, {distance} ötelenmiş", + "sketch_panel.plane_origin": "{plane} düzlemi", "sketch_panel.redefine_title": "{command}: {name}", "sketch_panel.sheet_attachment": "Sac gövdenin düz bir yüzüne bağlıdır; sac değiştiğinde bu paneli izler.", "sketch_panel.text_hint": "Metni ve yerleşimini düzenleyip Tamam’a basın.", @@ -1116,8 +2256,18 @@ "the parts library is not available": "parça kitaplığı kullanılamıyor", "thread.automatic_size": "Otomatik boyut", "thread.designation": "Tanım", + "thread.direction": "Diş yönü", "thread.iso_metric": "ISO metrik", + "thread.left_hand": "Sol el", + "thread.right_hand": "Sağ el", "thread.select_size": "Boyut seç", + "timeline.delete_after_marker_one": "Geçmiş İşaretçisinden Sonra 1 Özelliği Sil", + "timeline.delete_after_marker_other": "Geçmiş İşaretçisinden Sonra {count} Özelliği Sil", + "timeline.delete_folders_tip": "Özelliklerini ve iç içe klasörlerini geçmişte tut", + "timeline.delete_many": "{count} Seçili Özelliği Sil", + "timeline.feature_error": "Hata: {message}", + "timeline.feature_hint": "Düzenlemek için çift tıklayın · sıralamak için sürükleyin · daha fazlası için sağ tıklayın", + "timeline.feature_warning": "Uyarı: {message}", "timeline.group": "Yeni özellik klasörü oluştur", "timeline.move_many": "Zaman çizelgesi öğelerini taşı", "timeline.move_to_group": "Özellikleri klasöre taşı", @@ -1129,6 +2279,10 @@ "toolbar.customize_note": "{tab} sekmesi. Bir komuta araç çubuğu düğmesi eklemek için komutu işaretleyin. Ayrıca panelin açılır menüsündeki bir satırı araç çubuğuna sürükleyebilir, bir düğmeyi kaldırmak için araç çubuğunun dışına sürükleyebilir veya açılır menü satırındaki raptiyeyi kullanabilirsiniz.", "toolbar.image": "RESİM", "toolbar.render": "RENDER", + "toolbar.render_appearance": "GÖRÜNÜM", + "toolbar.render_camera": "KAMERA", + "toolbar.render_environment": "ORTAM", + "toolbar.render_lighting": "AYDINLATMA", "toolbar.render_scene": "SAHNE", "trace.points": "Yol boyunca {count} nokta", "trace.stopped_by_contact": "Örnek {sample} noktasında biter: {a}, {b} içinden geçecek", @@ -1247,6 +2401,8 @@ "ui.agent_chat_allowed": "İzin verildi", "ui.agent_chat_answered": "Yanıt: {option}", "ui.agent_chat_approval": "Ajanın bunu yapmasına izin verilsin mi?", + "ui.agent_chat_attach_selection": "Seçimi ekle", + "ui.agent_chat_attach_selection_tip": "Modelde seçili olanı (yüzler, kenarlar, özellikler, gövdeler) mesajla birlikte gönderin; ajan ne kastettiğinizi bilsin", "ui.agent_chat_attach_view": "Görünümü ekle", "ui.agent_chat_attach_view_tip": "Geçerli görünümün bir resmini mesajla birlikte gönder", "ui.agent_chat_attachable": "Görseller, PDF'ler, metin ve CAD dosyaları", @@ -1259,11 +2415,18 @@ "ui.agent_chat_auth_title": "Ajan için oturum aç", "ui.agent_chat_cancel": "İptal", "ui.agent_chat_changes": "{n} değişiklik, tek geri alma adımı", + "ui.agent_chat_changes_n": "{n} değişiklik", "ui.agent_chat_changes_of": "{n}/{limit} değişiklik", + "ui.agent_chat_choose_model": "Bir model seçin", "ui.agent_chat_close": "Kapat", "ui.agent_chat_command": "Ajan komutu", "ui.agent_chat_connect": "Bağlan", "ui.agent_chat_copy": "Kopyala", + "ui.agent_chat_ctx_bodies": "Gövdeler", + "ui.agent_chat_ctx_elements": "Öğeler", + "ui.agent_chat_ctx_features": "Özellikler", + "ui.agent_chat_ctx_more": "+{n} daha", + "ui.agent_chat_ctx_other": "Diğer", "ui.agent_chat_custom_hint": "stdin ve stdout üzerinden Agent Client Protocol'ü kullanan herhangi bir program. Kabuk (shell) olmadan çalıştırılır.", "ui.agent_chat_denied": "Reddedildi", "ui.agent_chat_deny": "Reddet", @@ -1301,10 +2464,12 @@ "ui.agent_chat_key_in_env": "anahtar ayarlı", "ui.agent_chat_left": "Sol", "ui.agent_chat_limit": "Ajan, bir mesaj için {limit} değişiklik sınırına ulaştı. Devam etmesi için başka bir mesaj gönderin.", + "ui.agent_chat_login_found": "oturum bulundu", "ui.agent_chat_minimize": "Bir çubuğa küçült", "ui.agent_chat_mode_all": "Tümü", "ui.agent_chat_mode_ask": "Sor", "ui.agent_chat_mode_edits": "Düzenle", + "ui.agent_chat_model_no_tools": "{model}, SolidCraft'ın araçlarını kullanamaz, bu yüzden yalnızca sohbet edebilir. Araç destekli bir model seçin.", "ui.agent_chat_model_tip": "Ajanın kullandığı model. Seçiminiz bu ajan için hatırlanır.", "ui.agent_chat_new": "Yeni sohbet", "ui.agent_chat_new_confirm": "Yeni bir sohbet başlatılsın mı? Geçerli sohbet temizlenir.", @@ -1313,6 +2478,7 @@ "ui.agent_chat_no_control": "Ajan sohbetinin uç noktası başlatılmadı, bu yüzden ajan tasarıma erişemiyor.", "ui.agent_chat_no_images": "Bu ajan resim kabul etmiyor", "ui.agent_chat_no_picture": "Panoda görsel yok", + "ui.agent_chat_no_tool_call": "Model SolidCraft'ın araçlarını kullanmadı, bu yüzden tasarım değişmedi. Araç çağırmayı destekleyen bir model seçin; ajan sohbeti rehberindeki Yerel modellere bakın.", "ui.agent_chat_none_found": "Kodlama ajanı bulunamadı. Bunlardan birini yükleyin ve ardından Yenile'ye tıklayın:", "ui.agent_chat_none_found_short": "Ajan bulunamadı", "ui.agent_chat_not_installed": "Yüklü değil", @@ -1322,12 +2488,17 @@ "ui.agent_chat_paste_picture": "Görsel yapıştır", "ui.agent_chat_permission": "Ajan şunu çalıştırmak istiyor: {title}", "ui.agent_chat_pick": "Ajan", + "ui.agent_chat_pick_context": "Bağlam seçin", + "ui.agent_chat_pick_context_tip": "Ajanın incelemesi için modelde yüzler, kenarlar, özellikler ve gövdeler seçin, ardından Tamam'a basın", "ui.agent_chat_placeholder": "Ajandan tasarımı değiştirmesini isteyin…", "ui.agent_chat_placeholder_busy": "Ajan bitince gönderilmek üzere ileti sıraya alın (Ctrl+Enter: şimdi gönder)", "ui.agent_chat_pop_out": "Başka bir ekrana taşıyabileceğiniz ayrı bir pencerede aç", "ui.agent_chat_previous_picture": "Önceki resim", "ui.agent_chat_privacy": "Kendi hesabınızla çalıştırdığınız ajan dışında hiçbir yere bir şey gitmez.", "ui.agent_chat_privacy_note": "Sohbet kendi başına hiçbir yere bir şey göndermez: Başlattığınız ajan, sizin hesabınızla kendi hizmetine bağlanır. SolidCraft hiçbir anahtarı veya parolayı görmez ve kaydetmez.", + "ui.agent_chat_provider_models": "{count} model", + "ui.agent_chat_provider_other": "Diğer", + "ui.agent_chat_provider_tip": "Sonraki listenin modellerini göstereceği sağlayıcı.", "ui.agent_chat_queue": "Sıraya al", "ui.agent_chat_queue_full": "Çok fazla ileti bekliyor: birini kaldırın veya ajanı bekleyin.", "ui.agent_chat_queued": "Sırada", @@ -1356,6 +2527,7 @@ "ui.agent_chat_stop_tip": "Ajanı ve başlattığı her şeyi durdur", "ui.agent_chat_stop_turn_tip": "Ajanı durdur (Esc). Sıradaki iletiler sırada kalır.", "ui.agent_chat_turn_limit": "Mesaj başına değişiklik", + "ui.agent_chat_turn_unlimited": "Sınırsız", "ui.agent_chat_undo_changes": "Bu değişiklikleri geri al", "ui.agent_chat_undo_label": "Ajan sohbeti: {message}", "ui.agent_chat_undone": "(geri alındı)", @@ -1363,11 +2535,15 @@ "ui.agent_chat_waiting": "Yanıtınız bekleniyor", "ui.agent_cursor": "Ajan imleci", "ui.agent_cursor_speed": "Ajan imleci hızı", + "ui.agent_off_thread": "Ajanlar komut çalıştırırken pencereyi yanıt verir tut", + "ui.agent_off_thread_note": "Ajanın yavaş komutları (AI panelinden veya bir MCP istemcisinden) pencerenin yanında hesaplanır: görünümü döndürmeye ve incelemeye devam edebilir, birini görünümdeki rozetten durdurabilirsiniz. Kapalı: her biri pencerenin thread'inde çalışır ve pencere onu bekler.", "ui.ai_add": "Ekle", "ui.ai_add_agent": "Ajan ekle…", "ui.ai_add_agent_title": "Ajan ekle", + "ui.ai_add_anthropic": "Anthropic uyumlu API", "ui.ai_add_api": "OpenAI uyumlu API", "ui.ai_add_custom": "Özel komut", + "ui.ai_add_endpoint": "API uç noktası", "ui.ai_add_installed": "Yüklü ajan", "ui.ai_add_installed_note": "Yüklü bir ajan için ayrı bir giriş (örneğin farklı argümanlarla). Yüklü ajanlar kendiliğinden görünür.", "ui.ai_added": "eklendi", @@ -1397,6 +2573,7 @@ "ui.ai_key_needs_https": "Anahtar yalnızca HTTPS üzerinden veya bu bilgisayara gönderilir.", "ui.ai_key_note": "SolidCraft ayarlarında değil, sistem anahtar zincirinde saklanır. Yerel bir sunucu için boş bırakın.", "ui.ai_keychain_error": "Sistem anahtar zinciri reddetti: {error}", + "ui.ai_kind": "Tür", "ui.ai_mode_all": "Her şeye izin ver", "ui.ai_mode_all_note": "Hiçbir işlem için önceden onay istenmez. Çökme raporlarına yine erişilemez ve klasör sınırları geçerliliğini korur.", "ui.ai_mode_all_warning": "Ajan tasarımınızı sormadan kaydedebilir, üzerine yazabilir, dışa aktarabilir ve değiştirebilir. Bunu yalnızca güvendiğiniz bir ajanla ve kaydedilmiş tasarımlarla kullanın.", @@ -1418,7 +2595,11 @@ "ui.ai_panel": "Panel", "ui.ai_permissions": "İzinler", "ui.ai_preset": "Şablon", + "ui.ai_protocol": "Protokol", "ui.ai_remove": "Kaldır", + "ui.ai_request_timed_out": "Model {seconds} sn'den uzun sürdü. Bu uç nokta için istek zaman aşımını Tercihler › Asistan altında yükseltebilirsiniz.", + "ui.ai_request_timeout": "İstek zaman aşımı", + "ui.ai_request_timeout_hint": "Bu uç noktaya tek bir model isteğinin 30 sn ile bir saat arasında ne kadar sürebileceği. Yavaş bir yerel model için yükseltin.", "ui.ai_reset": "Sıfırla", "ui.ai_settings": "AI ayarları…", "ui.ai_show_features": "AI özelliklerini göster", @@ -1427,13 +2608,33 @@ "ui.ai_test": "Test et", "ui.ai_test_acp_ok": "{agent} yanıt veriyor", "ui.ai_test_acp_tip": "Ajanı kısa süreliğine başlatır ve bir oturum ister; ardından tekrar kapatır", + "ui.ai_test_answered": "Erişildi: {model} yanıtladı", + "ui.ai_test_anthropic_tip": "Uç noktaya kısa bir mesaj gönderir", "ui.ai_test_api_tip": "Uç noktadan model listesini ister", "ui.ai_test_no_model": "Uç noktaya ulaşıldı, {count} model bulundu ancak {model} aralarında yok", "ui.ai_test_ok": "Uç noktaya ulaşıldı, {count} model bulundu", "ui.ai_testing": "Test ediliyor…", + "ui.ai_tool_arguments": "Argümanlar", + "ui.ai_tool_details": "Ayrıntılar", "ui.ai_tool_done": "tamamlandı", "ui.ai_tool_failed": "başarısız", + "ui.ai_tool_result": "Sonuç", "ui.ai_tool_running": "çalışıyor", + "ui.ai_tool_sum_bodies_one": "{count} gövde", + "ui.ai_tool_sum_bodies_other": "{count} gövde", + "ui.ai_tool_sum_by": "{value} kadar", + "ui.ai_tool_sum_edges_one": "{count} kenar", + "ui.ai_tool_sum_edges_other": "{count} kenar", + "ui.ai_tool_sum_faces_one": "{count} yüz", + "ui.ai_tool_sum_faces_other": "{count} yüz", + "ui.ai_tool_sum_features_one": "{count} özellik", + "ui.ai_tool_sum_features_other": "{count} özellik", + "ui.ai_tool_sum_measured": "Ölçülen {what}", + "ui.ai_tool_sum_more": "{steps}, ve {count} daha", + "ui.ai_tool_sum_radius": "r {value}", + "ui.ai_tool_sum_saved": "{file} kaydedildi", + "ui.ai_tool_sum_screenshot": "Ekran görüntüsü", + "ui.ai_tool_sum_then": "{first}, ardından {next}", "ui.ai_tool_unfold": "Sonucu göstermek için tıklayın", "ui.ai_tool_waiting": "bekliyor", "ui.ai_toolbar_button": "Araç çubuğunda düğmeyi göster", @@ -1525,6 +2726,8 @@ "ui.copy": "Kopyala", "ui.corner": "Köşe", "ui.corners": "Köşeler", + "ui.cosmetic_thread_markings": "Kozmetik diş işaretleri", + "ui.cosmetic_thread_markings_help": "Dişli silindirik duvarlarda şematik işaretler gösterir. Yalnızca görüntüyü değiştirir, tasarımı veya dışa aktarımları asla değiştirmez.", "ui.counterbore": "Düz havşa", "ui.countersink": "Konik havşa", "ui.create": "Oluştur", @@ -1591,7 +2794,12 @@ "ui.export_keymap_tip": "Tuşları, S kutusu favorilerini ve araç çubuğunu dosya olarak dışa aktarır", "ui.extend": "Uzat", "ui.extent_type": "Kapsam türü", + "ui.extract_component": "Dosyaya Çıkar…", + "ui.extract_design_changed": "Dosya seçilirken tasarım değişti. Dosyaya Çıkar işlemini yeniden başlatın.", + "ui.extract_done": "Bileşen artık kendi tasarımı, burada bağlantılı.", "ui.extrude": "Ekstrüzyon", + "ui.extrude_auto_to_object": "Seçilen hedefe ekstrüzyon", + "ui.extrude_auto_to_object_tip": "Extrüzyon'da, bir profil seçiliyken, düzleminin dışındaki bir yüzü, köşeyi veya paralel düzlemi seçmek uzantıyı Nesneye Kadar olarak değiştirir", "ui.factor": "Faktör", "ui.feature_history": "Özellik geçmişi", "ui.feature_options": "Özellik seçenekleri", @@ -1610,6 +2818,7 @@ "ui.flip": "Ters çevir", "ui.format": "Biçim", "ui.frame_rate": "Kare hızı", + "ui.frame_rate_details": "Kare hızı ayrıntıları", "ui.front": "Ön", "ui.fully_constrained": "Tam kısıtlı", "ui.function": "Fonksiyon", @@ -1700,17 +2909,28 @@ "ui.hideOrigin": "Orijini gizle", "ui.hidePlanes": "Düzlemleri gizle", "ui.hideProfile": "Profili gizle", + "ui.hide_origin_by_default": "Başlangıcı varsayılan olarak gizle", + "ui.hide_origin_note": "Yeni tasarımlar Başlangıç klasörü gizli başlar. Bir tasarım, gösterip gizledikten sonra kendi Başlangıç ayarını korur.", "ui.history_back": "Bir adım geri git", "ui.history_below_browser": "Tarayıcının altında", + "ui.history_edge_hint": "kenara çift tıklayın", "ui.history_first": "Başlangıca git", "ui.history_forward": "Bir adım ileri git", + "ui.history_hide_names": "Adları gizle", "ui.history_last": "Sona git", + "ui.history_marker_tip": "Geçmiş işaretçisi: modeli geri sarmak için sürükleyin; yeni özellikler buraya eklenir", + "ui.history_names": "Adlar", + "ui.history_play": "Sona kadar oynat", + "ui.history_show_names": "Adları göster", + "ui.history_sketch_listed_under": "{feature} altında listelenir", "ui.history_title": "Geçmiş", + "ui.history_toggle_names": "Özellik adlarını göster veya gizle", "ui.hole": "Delik", "ui.hole_tap_type": "Diş türü", "ui.hole_type": "Delik türü", "ui.home": "Başlangıç", "ui.homeView": "Başlangıç görünümü", + "ui.horizontal_constraint": "Yatay Kısıtlama", "ui.horizontal_vertical": "Yatay/Dikey", "ui.import_ellipsis": "İçe aktar…", "ui.infinite": "Sonsuz", @@ -1727,6 +2947,10 @@ "ui.length_decimals": "Uzunluk ondalık basamakları", "ui.light": "Açık", "ui.line": "Çizgi", + "ui.link_copies": "Aynı Kopyaları Bağla", + "ui.link_copies_keep": "Tut", + "ui.link_copies_link": "Bağla", + "ui.link_copies_text": "Bu bileşenler {name} ile aynı gövdeleri üretiyor. Onların yerleşimleri yapılsın mı?", "ui.lock": "Kilitle", "ui.loft": "Loft", "ui.look_at": "Bak", @@ -1765,6 +2989,11 @@ "ui.move": "Taşı", "ui.multiple": "Çoklu", "ui.named_views": "Adlandırılmış görünümler", + "ui.nav_bridge": "Bu bilgisayardaki bir cihaz uygulamasıyla gezin", + "ui.nav_bridge_connected": "Bağlı", + "ui.nav_bridge_port": "Port", + "ui.nav_bridge_tip": "Bir 3B giriş cihazının kendi programı (örneğin ev yapımı bir 3B farenin sürücüsü), görünümü yerel bir bağlantı üzerinden hareket ettirir, böylece fare imleci sizde kalır. SolidCraft, yalnızca bu bilgisayarda ve bu portta ona bağlanır.", + "ui.nav_bridge_waiting": "Cihaz uygulaması bekleniyor", "ui.navigation": "Gezinme", "ui.needs_design": "{command}: Önce bir tasarım açın", "ui.newSketchGroup": "Yeni eskiz grubu", @@ -1783,6 +3012,7 @@ "ui.one_side": "Tek taraflı", "ui.open": "Aç", "ui.open_ends_tip": "Hiçbir şeye değmiyor", + "ui.open_linked_design": "Bağlı Tasarımı Aç", "ui.open_preferences": "Ayarları aç", "ui.open_recent": "Son kullanılanlar", "ui.operation": "İşlem", @@ -1802,18 +3032,27 @@ "ui.paste": "Yapıştır", "ui.path": "Yol", "ui.pattern_on_path": "Yol üzerinde desen", + "ui.perforate_margin_default": "çaptan", + "ui.perforate_pitch": "Adım", + "ui.perforate_square": "Kare", + "ui.perforate_staggered": "Kerterizli (60°)", + "ui.perforate_title": "PERFORE", "ui.perpendicular": "Dik", "ui.perspective_view": "Perspektif görünüm", "ui.pinToShortcuts": "Kısayollara sabitle", "ui.pinToToolbar": "Araç çubuğuna sabitle", "ui.pipe": "Boru", "ui.placement": "Yerleşim", + "ui.placement_handles": "Yerleşim tutamaçları", + "ui.placement_handles_tip": "Bir Dayama, Kabarıklık veya Kilit Geçme önizlemesindeki tutamaçlar: işaretçiyi model üzerinde hareket ettirmek için sürükleyin, halkasıyla döndürün", "ui.plane": "Düzlem", "ui.plane_at_angle": "Açılı düzlem", "ui.plugins": "Eklentiler", "ui.plugins_desktop": "Eklentiler masaüstü uygulamasında kullanılabilir.", "ui.plugins_empty": "Kurulu eklenti yok.", + "ui.plugins_none": "Bu aramayla eşleşen eklenti yok.", "ui.plugins_note": "Her eklenti, {path} içinde plugin.json içeren bir klasördür. SolidCraft bu dosyayı okur ve klasördeki hiçbir kodu çalıştırmaz. Bir eklentiyi kapatmak onu kurulu tutar.", + "ui.plugins_search": "Eklentilerde ara", "ui.plugins_skipped": "{count} klasör okunamadı.", "ui.plugins_version": "{version}", "ui.point": "Nokta", @@ -1841,6 +3080,9 @@ "ui.rectangle": "Dikdörtgen", "ui.rectangular_pattern": "Dikdörtgen desen", "ui.redo": "Yinele", + "ui.reference_1": "Referans 1", + "ui.reference_2": "Referans 2", + "ui.reference_distance": "Referans mesafe", "ui.relink_design_changed": "Kaynak seçilirken montaj değişti. Kaynağı yeniden bağla komutunu yeniden başlatın.", "ui.relink_done": "Kaynak tüm örnekler için yeniden bağlandı.", "ui.relink_not_linked": "Bu bileşen bir kaynak tasarıma bağlı değil.", @@ -1851,6 +3093,7 @@ "ui.render": "Render", "ui.renderer": "Çizim motoru", "ui.repeat": "Tekrarla", + "ui.replace_with_link_done": "Kopyalar artık bağlı tasarımın yerleşimleri.", "ui.report_a_bug": "Hata bildir", "ui.reset": "Sıfırla", "ui.reset_all": "Tümünü sıfırla", @@ -1868,6 +3111,7 @@ "ui.right": "Sağ", "ui.save": "Kaydet", "ui.save_as": "Farklı kaydet", + "ui.save_mesh_no_slicer_open": "Dilimleyici bulunamadı: Özel… seçin ve dilimleyici programınızı gösterin", "ui.save_mesh_pick_bodies": "Kaydedilecek gövdeleri seçin", "ui.saved_to": "{path} konumuna kaydedildi", "ui.sbox_pin": "S kutusunun en üstüne sabitle", @@ -1883,9 +3127,19 @@ "ui.selection_shift_add_only": "Shift+tıklama kaldırmadan ekler", "ui.selection_shift_add_only_tip": "Açık: Shift öğe ekler, Ctrl/Cmd açıp kapatır. Kapalı (varsayılan): Shift ve Ctrl/Cmd ikisi de açıp kapatır.", "ui.send": "Gönder", + "ui.send_to_slicer_unavailable": "Dilimleyiciye Gönder masaüstü uygulaması ister: tarayıcı bir program başlatamaz", "ui.sent_to_slicer": "{slicer} uygulamasına gönderildi", + "ui.sent_to_slicer_copy": "İlk dosya orada hâlâ açık olduğundan {slicer} programına {file} olarak gönderildi", "ui.sheet_gap": "Boşluk", "ui.shell": "Kabuk", + "ui.shortcut_capture_add_key": "Sıradan bir tuş ekleyin. Esc iptal eder.", + "ui.shortcut_capture_hint": "Bir atamaya tıklayın, ardından değiştiriciler ve bir tuşa basın. Değiştiricileri bir saniye içinde ekleyin; onaylamak için tüm tuşları bırakın. Esc iptal eder.", + "ui.shortcut_capture_press": "Değiştiriciler ve bir tuşa basın. Esc iptal eder.", + "ui.shortcut_capture_release": "Onaylamak için tüm tuşları bırakın. Esc iptal eder.", + "ui.shortcut_capture_settling": "Kısayol onaylanıyor… Esc iptal eder.", + "ui.shortcut_cycles_modes": "Bir aracın kısayoluna yeniden basmak kipi değiştirir", + "ui.shortcut_cycles_modes_tip": "İlk noktadan önce, bir eskiz aracının kısayoluna yeniden basmak oluşturma kiplerinde ilerler. Kapalı: aracı yeniden başlatır.", + "ui.shortcut_multiple_keys": "Değiştiriciler ve yalnızca bir başka tuş kullanın. Yeniden denemek için atamaya tıklayın.", "ui.show": "Göster", "ui.showAll": "Tümünü göster", "ui.showAllBodies": "Tüm gövdeleri göster", @@ -1910,6 +3164,15 @@ "ui.slice": "Dilim", "ui.slicer": "Dilimleyici", "ui.slicer_delete_tip": "{program}\nDelete tuşuyla listeden kaldır", + "ui.slicer_lost": "{slicer} başlatıldı ama dosyayı göndermek için yeniden bulunamıyor. Dosya {path} konumunda kayıtlı: oradan açın.", + "ui.slicer_no_file": "{slicer} hazır ama gönderilecek dosya yok.", + "ui.slicer_no_response": "{slicer} zamanında yanıt vermedi. Dosya zaten {path} konumunda kayıtlı: dilimleyici başladıktan sonra yeniden gönderin.", + "ui.slicer_resend_hint": "Yeniden gönderme, dilimleyicinin açık tuttuğu dosyanın yerini alır.", + "ui.slicer_single_instance": "Dosyaları zaten çalışan bir dilimleyicide aç", + "ui.slicer_single_instance_tip": "PrusaSlicer, SuperSlicer ve Cura dosyayı başkasını başlatmak yerine açık pencerede yükler. Diğer dilimleyiciler oldukları gibi başlatılır. PrusaSlicer 3.0 bunu her zaman yapar: başlatıcısı bir dosyayı başka türlü alamaz.", + "ui.slicer_starting": "{slicer} başlatılıyor…", + "ui.slicer_still_starting": "{slicer} başlamayı bekliyor. Başka bir şey gönderilmedi.", + "ui.slicer_stl_fallback": "3MF yazılamadı, bu yüzden bu bir STL.", "ui.slot": "Yuva", "ui.smooth": "Pürüzsüz", "ui.smooth_wheel_zoom": "Yumuşak tekerlek yakınlaştırması", @@ -1925,6 +3188,8 @@ "ui.start": "Başlangıç", "ui.start_over": "Baştan başla", "ui.start_page": "Başlangıç sayfası", + "ui.step_values": "Ok tuşları ve tekerlekle adım değerleri", + "ui.step_values_tip": "Yazdığınız bir değer alanında, Yukarı/Aşağı düz bir sayıyı 1 ile değiştirir (Shift: 10, Alt: 0.1); alanın üzerindeki fare tekerleği de aynısını yapar. İfadeler yazıldıkları gibi bırakılır.", "ui.stretch": "Esnet", "ui.supersampling": "Süper örnekleme (SSAA)", "ui.supersampling_adaptive": "Yalnızca görünüm hareketsizken", @@ -1959,6 +3224,7 @@ "ui.total_angle": "Toplam açı", "ui.trackpad_pan_tip": "Dokunmatik yüzey hareketleri görünümü kaydırır (kapalı: tekerlek gibi yakınlaştırır); fare tekerleği yakınlaştırır, başparmak tekerleği yana kaydırır, iki parmakla sıkıştırma her zaman yakınlaştırır", "ui.trim": "Kırp", + "ui.turn_up_axis": "Yukarı Ekseni Çevir", "ui.twist": "Burulma", "ui.two_finger_scroll_pans": "İki parmakla kaydırma görünümü kaydırır", "ui.two_sides": "İki taraflı", @@ -1975,11 +3241,17 @@ "ui.up_axis_note": "Görünümlerde (eksen görünümü, Başlangıç, Bak) hangi eksenin yukarıyı gösterdiğini belirler. Tasarımlar değişmez.", "ui.updateToCurrentView": "Geçerli görünüme güncelle", "ui.upload": "Yükle", + "ui.vertical_constraint": "Düşey Kısıtlama", "ui.view_centre": "Görünüm merkezi", + "ui.viewport_theme_follow": "Temayı izle", "ui.visual_shaded_hidden_edges": "Gizli kenarlarla gölgeli", "ui.visual_shaded_with_edges": "Kenarlarla gölgeli", "ui.visual_style": "Görsel stil", "ui.visual_wireframe": "Tel kafes", + "ui.window_system": "Pencere sistemi", + "ui.window_system_auto": "Otomatik", + "ui.window_system_wayland": "Wayland", + "ui.window_system_x11": "X11", "ui.workspace": "Çalışma alanı", "ui.workspace_animation_description": "Patlatılmış görünümler, hareket çalışmaları ve hikâye panoları", "ui.workspace_available": "Kullanılabilir", @@ -2025,6 +3297,7 @@ "update.prefs_flatpak": "Bu kurulum ({version}) Flatpak tarafından güncellenir: {command} komutunu çalıştırın veya yazılım yöneticisini kullanın. SolidCraft kendisi denetlemez.", "update.prefs_label": "Güncellemeler", "update.prefs_note": "Bu, SolidCraft {version} ({kind}). Denetim, GitHub'a en yeni sürümü sorar ve başka hiçbir şey göndermez.", + "update.prefs_web": "En yeni web uygulamasını almak için sayfayı yeniden yükleyin. Ağ kullanılamazsa veya güncelleme indirmesi zamanında bitiremezse bunun yerine kaydedilmiş sürüm açılır; süren bir indirme bir sonraki yeniden yükleme için devam eder.", "update.release_page": "Sürüm sayfasını aç", "update.restart": "Şimdi yeniden başlat", "update.restart_later": "Daha sonra", @@ -2035,5 +3308,12 @@ "update.up_to_date": "SolidCraft güncel.", "update.update_now": "Şimdi güncelle", "update.you_have": "Yüklü sürüm: {version}.", - "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ seç · Enter / Tab tamamla · Esc kapat" + "view.auto_ortho_faces": "Döndürürken perspektif, yüzlerde dik", + "web.files.insert_drawings_hint": "CAD dosyaları, ağlar, DXF veya SVG'yi açık tasarıma", + "web.files.insert_stored_drawings_hint": "Açık tasarıma (CAD dosyaları, ağlar, DXF, SVG)", + "web.open_full": "SolidCraft'ta aç", + "web.open_link": "Bağlı tasarım açılsın mı?", + "web.open_link_confirm": "Kaydedilmemiş değişiklikler var. Bağlı tasarım yeni bir sekmede açılsın mı?", + "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ seç · Enter / Tab tamamla · Esc kapat", + "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ seçin · Enter yazdığınızı uygular · Esc kapatır" } From 7b03439ddab563111d969d1d32e0fb576b0d970f Mon Sep 17 00:00:00 2001 From: Daniel Dimitrov <79789122+danieldimitrov86@users.noreply.github.com> Date: Tue, 27 Oct 2026 19:28:14 +0000 Subject: [PATCH 083/102] Navigation: Free orbit can turn around the vertical axis (#6964) (#6965) * Navigation: Free orbit can turn around the vertical axis (#6964) A new option under Free orbit, Turn around the vertical axis, makes mouse drags a turntable without the pole limit: sideways turns about the world's up axis (reversed upside down so the model follows the cursor), up/down tilts over the top. Off by default; free orbit without it is unchanged. Co-Authored-By: Claude Opus 5.5 * i18n: Japanese and Chinese for the vertical-axis orbit option (#6964) Co-Authored-By: Claude Opus 5.5 * i18n: Arabic, Hebrew, Vietnamese, German and Korean for the vertical-axis orbit option (#6964) Main now treats ar, he and vi as complete catalogs, so the merge queue's every_complete_catalog_carries_every_english_message failed on the two new ids. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UhpMr6L9PR8SJXjM6MbQrD --------- Co-authored-by: Claude Opus 5.5 Co-authored-by: danieldimitrov86 --- .../locales/pending/free-orbit-upright.json | 34 ++++++++++++ crates/render/src/camera.rs | 13 +++++ crates/ui-egui/src/navigation.rs | 53 +++++++++++++++++-- crates/ui-egui/src/prefs.rs | 3 ++ crates/ui-egui/src/prefs/navigation.rs | 5 ++ docs/book/src/guide/ui-tour.md | 4 +- 6 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 assets/locales/pending/free-orbit-upright.json diff --git a/assets/locales/pending/free-orbit-upright.json b/assets/locales/pending/free-orbit-upright.json new file mode 100644 index 000000000..505a2b2f2 --- /dev/null +++ b/assets/locales/pending/free-orbit-upright.json @@ -0,0 +1,34 @@ +{ + "en": { + "nav.free_orbit_upright.label": "Turn around the vertical axis", + "nav.free_orbit_upright.help": "Sideways mouse drags spin the model around the world's vertical axis; up and down drags tilt over the top without a limit." + }, + "ar": { + "nav.free_orbit_upright.label": "الدوران حول المحور الرأسي", + "nav.free_orbit_upright.help": "سحب الفأرة جانبيًا يدوّر النموذج حول المحور الرأسي للعالم؛ والسحب لأعلى ولأسفل يميله فوق القمة دون حد." + }, + "de": { + "nav.free_orbit_upright.label": "Um die senkrechte Achse drehen", + "nav.free_orbit_upright.help": "Seitliches Ziehen mit der Maus dreht das Modell um die senkrechte Achse der Welt; Ziehen nach oben und unten neigt es ohne Begrenzung über den Pol hinweg." + }, + "he": { + "nav.free_orbit_upright.label": "סיבוב סביב הציר האנכי", + "nav.free_orbit_upright.help": "גרירת העכבר הצידה מסובבת את המודל סביב הציר האנכי של העולם; גרירה למעלה ולמטה מטה אותו מעבר לקודקוד ללא הגבלה." + }, + "ja": { + "nav.free_orbit_upright.label": "垂直軸を中心に回転", + "nav.free_orbit_upright.help": "マウスを左右にドラッグするとワールドの垂直軸を中心にモデルが回転し、上下にドラッグすると制限なく真上を越えて傾きます。" + }, + "ko": { + "nav.free_orbit_upright.label": "수직 축을 중심으로 회전", + "nav.free_orbit_upright.help": "마우스를 좌우로 드래그하면 모델이 월드의 수직 축을 중심으로 회전하고, 위아래로 드래그하면 제한 없이 극점을 넘어 기울어집니다." + }, + "vi": { + "nav.free_orbit_upright.label": "Xoay quanh trục thẳng đứng", + "nav.free_orbit_upright.help": "Kéo chuột sang ngang sẽ xoay mô hình quanh trục thẳng đứng của không gian; kéo lên và xuống sẽ nghiêng qua đỉnh mà không bị giới hạn." + }, + "zh": { + "nav.free_orbit_upright.label": "绕竖直轴旋转", + "nav.free_orbit_upright.help": "左右拖动鼠标时模型绕世界竖直轴旋转;上下拖动可不受限制地越过顶部倾斜。" + } +} diff --git a/crates/render/src/camera.rs b/crates/render/src/camera.rs index d61a321ed..881e45c74 100644 --- a/crates/render/src/camera.rs +++ b/crates/render/src/camera.rs @@ -442,6 +442,19 @@ impl Camera { self.roll = roll; } } + /// Orbit by pixel deltas like [`Camera::orbit`], without its pole limit: sideways turns + /// about the world's up axis and up/down tilts about the screen's right, on over the top. + /// Upside down (past a pole) sideways turns the other way, so the model still follows the + /// cursor. + pub fn orbit_unlimited(&mut self, dx: f64, dy: f64) { + if !self.is_valid() || !dx.is_finite() || !dy.is_finite() { + return; + } + let upright = self.basis().1.dot(self.up_dir()) >= 0.0; + let turn = if upright { dx } else { -dx } * 0.008; + self.yaw = (self.yaw + turn) % std::f64::consts::TAU; + self.rotate_in_view(Vec3::new(-dy * 0.008, 0.0, 0.0)); + } pub fn set_view(&mut self, v: StandardView) { let lim = std::f64::consts::FRAC_PI_2 - 1e-6; let (y, p) = v.angles(); diff --git a/crates/ui-egui/src/navigation.rs b/crates/ui-egui/src/navigation.rs index b271acba7..14a694a9a 100644 --- a/crates/ui-egui/src/navigation.rs +++ b/crates/ui-egui/src/navigation.rs @@ -976,10 +976,12 @@ pub(crate) fn orbit_about(app: &mut SolveApp, _rect: egui::Rect, dx: f64, dy: f6 } fn orbit_camera(app: &mut SolveApp, dx: f64, dy: f64) { - if app.preferences.free_orbit { - app.cam.rotate_in_view(Vec3::new(-dy * 0.008, -dx * 0.008, 0.0)); - } else { + if !app.preferences.free_orbit { app.cam.orbit(dx, dy); + } else if app.preferences.free_orbit_upright { + app.cam.orbit_unlimited(dx, dy); + } else { + app.cam.rotate_in_view(Vec3::new(-dy * 0.008, -dx * 0.008, 0.0)); } } @@ -1373,6 +1375,51 @@ mod tests { } } + /// Free orbit turning around the vertical axis: sideways drags keep the elevation and the + /// world's up axis on screen (no tumbling), and up/down drags go on over the top; past it, + /// sideways still turns about the vertical axis, the model following the cursor. + #[test] + fn free_orbit_upright_turns_about_the_vertical_axis_past_the_pole() { + use super::*; + for up in [solidcraft_engine::render::UpAxis::Z, solidcraft_engine::render::UpAxis::Y] { + let mut h = crate::scenario::Harness::new(); + h.app.preferences.free_orbit = true; + h.app.preferences.free_orbit_upright = true; + h.app.cam = Camera { yaw: 0.2, pitch: 0.6, up, ..Default::default() }; + let rect = Rect::from_min_size(Pos2::ZERO, vec2(800.0, 600.0)); + let height = |c: &Camera| c.back().dot(c.up_dir()); + let before = h.app.cam; + for _ in 0..50 { + orbit_drag(&mut h.app, rect, 7.0, 0.0, None, false, false); + assert!((height(&h.app.cam) - height(&before)).abs() < 1e-9, "{up:?}: {:?}", h.app.cam); + assert!(h.app.cam.basis().0.dot(h.app.cam.up_dir()).abs() < 1e-9, "{up:?}: the horizon stays level"); + } + assert!((h.app.cam.yaw - (before.yaw + 350.0 * 0.008)).rem_euclid(std::f64::consts::TAU) < 1e-9); + // Up over the top: 2 rad of tilt from 0.6 rad elevation passes straight down. + h.app.cam = Camera { yaw: 0.0, pitch: 0.6, up, ..Default::default() }; + for _ in 0..100 { + orbit_drag(&mut h.app, rect, 0.0, 2.5, None, false, false); + } + let past = h.app.cam; + assert!((height(&past) - 2.6_f64.sin()).abs() < 1e-9, "{up:?}: {past:?}"); + assert!(past.basis().1.dot(past.up_dir()) < 0.0, "{up:?}: upside down past the pole"); + orbit_drag(&mut h.app, rect, 10.0, 0.0, None, false, false); + assert!((height(&h.app.cam) - height(&past)).abs() < 1e-9); + // Upright and upside down alike, a drag to the right moves the near side right. + let near = |c: &Camera| c.target + (c.back() - c.up_dir() * height(c)) * 10.0; + assert!(h.app.cam.frame_coords(near(&past)).x > 0.5, "{up:?}: {:?}", h.app.cam); + h.app.cam = before; + orbit_drag(&mut h.app, rect, 10.0, 0.0, None, false, false); + assert!(h.app.cam.frame_coords(near(&before)).x > 0.5, "{up:?}: {:?}", h.app.cam); + } + // Without the option, free orbit still turns about the screen's axes. + let mut h = crate::scenario::Harness::new(); + h.app.preferences.free_orbit = true; + h.app.cam = Camera { yaw: 0.0, pitch: 0.6, ..Default::default() }; + orbit_drag(&mut h.app, Rect::from_min_size(Pos2::ZERO, vec2(800.0, 600.0)), 50.0, 0.0, None, false, false); + assert!((h.app.cam.back().z - 0.6_f64.sin()).abs() > 1e-3); + } + #[test] fn solidworks_mouse_orbit_passes_the_pole_and_shift_snaps() { use serde_json::json; diff --git a/crates/ui-egui/src/prefs.rs b/crates/ui-egui/src/prefs.rs index cb8cd1050..74c11d614 100644 --- a/crates/ui-egui/src/prefs.rs +++ b/crates/ui-egui/src/prefs.rs @@ -514,6 +514,9 @@ preference_settings! { /// Opt in to rotation through both poles with roll, without the Shift axis-snap spring. /// Independent of mouse bindings; false also preserves existing saved presets' behavior. free_orbit: bool = false, PAGE_NAVIGATION => check_tr("nav.free_orbit.label"); + /// With free orbit, mouse drags turn sideways about the world's up axis (a turntable without + /// the pole limit) instead of the screen's. + free_orbit_upright: bool = false, PAGE_NAVIGATION => check_tr("nav.free_orbit_upright.label"); /// View orientation widget: original signed axes (default) or compact cube. navigator_style: NavigatorStyle = NavigatorStyle::default(), PAGE_NAVIGATION; /// Show the radial ring and enable hold/flick gestures for viewport context menus. diff --git a/crates/ui-egui/src/prefs/navigation.rs b/crates/ui-egui/src/prefs/navigation.rs index 5bef4f5e0..4f948b81f 100644 --- a/crates/ui-egui/src/prefs/navigation.rs +++ b/crates/ui-egui/src/prefs/navigation.rs @@ -71,6 +71,11 @@ pub(super) fn show(app: &mut SolveApp, ui: &mut egui::Ui, t: &Tokens) { crate::scenario::publish_target("prefs:free_orbit", free_orbit.rect); if app.preferences.free_orbit { ui_kit::text(ui, crate::i18n::tr("nav.free_orbit.snap_help"), ui_kit::Text::Hint("free_orbit")); + let upright = setting::free_orbit_upright(app, ui); + crate::scenario::publish_target("prefs:free_orbit_upright", upright.rect); + if app.preferences.free_orbit_upright { + ui_kit::text(ui, crate::i18n::tr("nav.free_orbit_upright.help"), ui_kit::Text::Hint("free_orbit_upright")); + } } let help = if app.preferences.nav == TOUCHPAD_NAV { app.tr("nav.touchpad.help").to_owned() diff --git a/docs/book/src/guide/ui-tour.md b/docs/book/src/guide/ui-tour.md index f6a8e9722..c216e356f 100644 --- a/docs/book/src/guide/ui-tour.md +++ b/docs/book/src/guide/ui-tour.md @@ -44,7 +44,9 @@ Enable **Preferences → Navigation → Free orbit** to rotate the mouse and 3D mouse continuously through both poles, preserving roll. During an orbit drag, Shift snaps the view direction and the picture rotation to the nearest quarter turn; releasing Shift resumes the unsnapped rotation. - Free orbit defaults to off for every mouse + Under it, **Turn around the vertical axis** makes sideways mouse drags spin the model around the + world's vertical axis instead of the screen's, while up and down drags still tilt over the top + without a limit. Both default to off for every mouse preset. With SolidWorks navigation, right-click a planar face and choose **Normal to Selection** to use Look At (also Ctrl+8); repeat to flip the side, preserving scale and projection. From 98abb249c4478f1aa47689cd9958a4dd3723d0d1 Mon Sep 17 00:00:00 2001 From: tr1pp4 <38721264+tr1pp4@users.noreply.github.com> Date: Tue, 27 Oct 2026 19:28:22 +0000 Subject: [PATCH 084/102] Cylinder: place by distances from reference edges, like Hole (#6380) (#6381) * claim: #6380 * Cylinder: place by distances from reference edges, like Hole (#6380) A Cylinder standing on a flat face can take up to two straight edges of that face as references, each with the distance of its base centre from the edge's line, measured in the face's plane, as a Single hole does (#37). `solid.cylinder` takes them as `references: [{edge, distance}]` with a numeric `base`; the edges are found again by their persistent names, else their points, so the cylinder follows them when the part changes, and each distance is a parameter (an input of Inspect Feature). A cylinder without references stays at its base, as before. In the Cylinder window, started on a picked face, Reference 1 and 2 take the edges, each with its Distance measured from the pick, so it works with the mouse alone; the canvas shows each distance with a box to type it in, and Edit Feature picks the edges again. Co-Authored-By: Claude Opus 5.5 * Cylinder: Edit Feature shows each reference edge input once (#6380) A face selected when Edit Feature opened the window had already added the reference inputs; the edit added them a second time. Co-Authored-By: Claude Opus 5.5 * Cylinder references: the measured-once cost test's cylinder has none (#6380) Co-Authored-By: Claude Opus 5.5 * Cylinder: pick the face it stands on in its window, then the edges (#6380) The Cylinder window took its place only from a face selected before it opened, so started first it stood at the origin and offered no reference edges. It now has a Face input before Reference 1 and 2, as the Hole window does: start Cylinder, click the face, click the edges, OK. Co-Authored-By: Claude Opus 5.5 * Glossary: reference edge, and "Reference" among the words with more than one meaning (#6380) Co-Authored-By: Claude Opus 5.5 * Cylinder edge references: the Cone dialog (#6250) gets the references field too The Cone primitive landed on main after this branch began; its dialog initialisers lacked the `refs` field the Primitive kind gained here. The dense form check for Cylinder fills only its fields: its face and reference edges place it, which the reference tests cover. Co-Authored-By: Claude Opus 5.5 * Cylinder: declare references in its contract; reference-placed cylinders are not placement-independent Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 Co-authored-by: bherbruck --- crates/doc/src/document.rs | 5 + crates/doc/src/eval.rs | 24 ++- crates/doc/src/eval_cost_tests.rs | 2 + crates/doc/src/feature_walk_tests/fixtures.rs | 8 + .../src/feature_walk_tests/golden_exprs.txt | 7 + .../feature_walk_tests/golden_geometry.txt | 3 + .../src/feature_walk_tests/golden_refs.txt | 1 + .../pending/cylinder-reference-edges.rs | 5 + crates/doc/src/hole_reference.rs | 8 + crates/doc/src/placement_reuse.rs | 4 +- crates/doc/src/tests.rs | 1 + crates/engine/src/cmd/edit.rs | 7 + crates/engine/src/cmd/features.rs | 56 ++++-- crates/engine/src/hole_reference_tests.rs | 120 ++++++++++++- crates/engine/src/large_assembly_tests.rs | 1 + crates/engine/src/schema/features.rs | 6 + crates/engine/src/schema/features_tests.rs | 2 +- crates/io/src/lib.rs | 1 + crates/ui-egui/src/canvas.rs | 7 + crates/ui-egui/src/dialogs.rs | 57 +++++- crates/ui-egui/src/dialogs_all_tests.rs | 3 + crates/ui-egui/src/dialogs_dense.rs | 11 +- crates/ui-egui/src/hole_refs.rs | 162 ++++++++++++------ crates/ui-egui/src/hole_refs_ui_tests.rs | 89 ++++++++++ docs/book/src/guide/features.md | 9 +- docs/book/src/reference/glossary.md | 19 ++ skills/solidcraft-modeling/reference.md | 2 +- 27 files changed, 523 insertions(+), 97 deletions(-) create mode 100644 crates/doc/src/format/pending/cylinder-reference-edges.rs diff --git a/crates/doc/src/document.rs b/crates/doc/src/document.rs index 1a9fcd0d8..bf6266ad5 100644 --- a/crates/doc/src/document.rs +++ b/crates/doc/src/document.rs @@ -693,6 +693,11 @@ pub enum FeatureKind { height: Expr, #[serde(default)] operation: Operation, + /// Up to two straight edges of the face it stands on (#6380), as a Single hole's + /// references: the base centre sits at each one's distance from its edge, in the face's + /// plane, and follows the edges when the part changes. `base` keeps where it was placed. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + references: Vec, }, Sphere { #[serde(with = "point_expr")] diff --git a/crates/doc/src/eval.rs b/crates/doc/src/eval.rs index 159390769..fab66f79c 100644 --- a/crates/doc/src/eval.rs +++ b/crates/doc/src/eval.rs @@ -4457,17 +4457,24 @@ fn single_hole_position( Ok(ss.plane.to_world(p.pos)) } -/// A hole's reference edges (#37); none for any other feature. +/// A hole's (#37) or a cylinder's (#6380) reference edges; none for any other feature. fn hole_references(f: &Feature) -> &[crate::HoleReference] { match &f.kind { - FeatureKind::Hole { references, .. } => references, + FeatureKind::Hole { references, .. } | FeatureKind::Cylinder { references, .. } => references, _ => &[], } } -/// Where a Single hole with reference edges (#37) is drilled: at its distances from the edges' -/// lines, in the plane of the face at `at` (on the surface), the edges found by their names, else -/// their points. A hole without reference edges stays at `at`. +/// Where a cylinder stands: its base, or with reference edges (#6380) at their distances in the +/// plane of the flat face at its base, square to its axis. +fn cylinder_base(vals: &BTreeMap, st: &ModelState, f: &Feature, base: &crate::PointExpr, axis: Vec3) -> Result { + let at = point(vals, base)?; + with_references(vals, st, f, at, -axis) +} + +/// Where a Single hole (or a cylinder) with reference edges (#37) is placed: at its distances +/// from the edges' lines, in the plane of the face at `at` (on the surface), the edges found by +/// their names, else their points. A feature without reference edges stays at `at`. fn with_references(vals: &BTreeMap, st: &ModelState, f: &Feature, at: Vec3, dir: Vec3) -> Result { let references = hole_references(f); if references.is_empty() { @@ -5774,7 +5781,7 @@ fn feature_tools_with_constructor( Ok(vec![crate::lineage::box_tool(kernel::box_solid(corner, corner + s)?)]) } FeatureKind::Cylinder { base, axis, radius, height, .. } => Ok(vec![crate::lineage::cylinder_tool(kernel::cylinder( - point(vals, base)?, + cylinder_base(vals, st, f, base, axis.0)?, axis.0, val(vals, radius, Kind::Length)?, val(vals, height, Kind::Length)?, @@ -7676,8 +7683,9 @@ fn eval_feature(doc: &Document, vals: &BTreeMap, f: &Feature, st: } apply_traced(doc, st, f, tools, *operation, &[]) } - FeatureKind::Cylinder { base, axis, radius, height, operation } => { - let (base, radius, height) = (point(vals, base)?, val(vals, radius, Kind::Length)?, val(vals, height, Kind::Length)?); + FeatureKind::Cylinder { base, axis, radius, height, operation, .. } => { + let base = cylinder_base(vals, st, f, base, axis.0)?; + let (radius, height) = (val(vals, radius, Kind::Length)?, val(vals, height, Kind::Length)?); let b = kernel::cylinder(base, axis.0, radius, height)?; let b = if matches!(operation, Operation::NewBody | Operation::Join) { b.with_cylinder_certificate(f.id)? } else { b }; let prism = more::PrimitivePrism::Cylinder { base, axis: axis.0, radius, height }; diff --git a/crates/doc/src/eval_cost_tests.rs b/crates/doc/src/eval_cost_tests.rs index d4a82fe4b..c2af067f9 100644 --- a/crates/doc/src/eval_cost_tests.rs +++ b/crates/doc/src/eval_cost_tests.rs @@ -59,6 +59,7 @@ fn joint_face_measurements_are_shared_across_motion_samples_and_snap_kinds() { radius: "2".into(), height: "10".into(), operation: Operation::NewBody, + references: Vec::new(), }, None, ) @@ -433,6 +434,7 @@ fn a_body_is_measured_once_while_it_stays_the_same() { radius: "2".into(), height: "10".into(), operation: Operation::NewBody, + references: Vec::new(), }; doc.add_feature(kind, None).unwrap(); }; diff --git a/crates/doc/src/feature_walk_tests/fixtures.rs b/crates/doc/src/feature_walk_tests/fixtures.rs index 3d52ce028..27037f33e 100644 --- a/crates/doc/src/feature_walk_tests/fixtures.rs +++ b/crates/doc/src/feature_walk_tests/fixtures.rs @@ -56,6 +56,11 @@ pub(super) fn fixtures() -> Vec<(&'static str, Value)> { ), ("box", json!({"type": "box", "corner": ["box.x", "box.y", "box.z"], "length": "box.length", "width": "box.width", "height": "box.height"})), ("cylinder", json!({"type": "cylinder", "base": ["cyl.x", "cyl.y", "cyl.z"], "radius": "cyl.radius", "height": "cyl.height"})), + ( + "cylinder_references", + json!({"type": "cylinder", "base": o, "radius": "cyl.radius", "height": "cyl.height", + "references": [{"edge": o, "distance": "cyl.reference1"}, {"edge": o, "distance": "cyl.reference2"}]}), + ), ("sphere", json!({"type": "sphere", "center": ["sph.x", "sph.y", "sph.z"], "radius": "sph.radius"})), ("torus", json!({"type": "torus", "center": ["tor.x", "tor.y", "tor.z"], "major": "tor.major", "minor": "tor.minor"})), ( @@ -286,6 +291,9 @@ pub(super) fn with_points(name: &str, mut v: Value) -> Value { "surface_revolve" => json!({"axis": line}), "hole_simple" => json!({"points": null, "to": p(4.0)}), "hole_drilled" | "hole_counterbore" | "hole_countersink" => json!({"to": p(4.0)}), + "cylinder_references" => { + json!({"references": [{"edge": p(11.0), "distance": "cyl.reference1"}, {"edge": p(12.0), "distance": "cyl.reference2"}]}) + } "hole_references" => { json!({"references": [{"edge": p(11.0), "distance": "hole.reference1"}, {"edge": p(12.0), "distance": "hole.reference2"}]}) } diff --git a/crates/doc/src/feature_walk_tests/golden_exprs.txt b/crates/doc/src/feature_walk_tests/golden_exprs.txt index 43da6a37f..fc766b6a5 100644 --- a/crates/doc/src/feature_walk_tests/golden_exprs.txt +++ b/crates/doc/src/feature_walk_tests/golden_exprs.txt @@ -73,6 +73,13 @@ cylinder Radius = cyl.radius (Length) Height = cyl.height (Length) expressions: cyl.radius, cyl.height, cyl.x, cyl.y, cyl.z +cylinder_references + inputs: + Radius = cyl.radius (Length) + Height = cyl.height (Length) + Reference distance = cyl.reference1 (Length) + Reference distance = cyl.reference2 (Length) + expressions: cyl.radius, cyl.height, cyl.reference1, cyl.reference2, 0, 0, 0 sphere inputs: Radius = sph.radius (Length) diff --git a/crates/doc/src/feature_walk_tests/golden_geometry.txt b/crates/doc/src/feature_walk_tests/golden_geometry.txt index 30add0647..ce58eadb2 100644 --- a/crates/doc/src/feature_walk_tests/golden_geometry.txt +++ b/crates/doc/src/feature_walk_tests/golden_geometry.txt @@ -30,6 +30,9 @@ box cylinder moves: axis[0], axis[2], base[0], base[1], base[2] placement: cyl.x, cyl.y, cyl.z +cylinder_references + moves: axis[0], axis[2], base[0], base[1], base[2], references[0].edge[0], references[0].edge[1], references[0].edge[2], references[1].edge[0], references[1].edge[1], references[1].edge[2] + placement: 0, 0, 0 sphere moves: center[0], center[1], center[2] placement: sph.x, sph.y, sph.z diff --git a/crates/doc/src/feature_walk_tests/golden_refs.txt b/crates/doc/src/feature_walk_tests/golden_refs.txt index 48bc04e7f..303007b9d 100644 --- a/crates/doc/src/feature_walk_tests/golden_refs.txt +++ b/crates/doc/src/feature_walk_tests/golden_refs.txt @@ -29,6 +29,7 @@ chamfer remap_bodies: body box cylinder +cylinder_references sphere torus cone diff --git a/crates/doc/src/format/pending/cylinder-reference-edges.rs b/crates/doc/src/format/pending/cylinder-reference-edges.rs new file mode 100644 index 000000000..de0756ad4 --- /dev/null +++ b/crates/doc/src/format/pending/cylinder-reference-edges.rs @@ -0,0 +1,5 @@ +//! A Cylinder can be placed by distances from up to two straight edges of the face it stands on +//! (`references`: each `{"edge": [x, y, z], "distance": "…"}`, the edges' persistent names in the +//! feature's `edge_names`, #6380), as a Single hole is: its base centre sits where those +//! distances hold, measured in the face's plane, and follows the edges when the part changes. +//! Older designs need no transformation: a cylinder without `references` stays at its `base`. diff --git a/crates/doc/src/hole_reference.rs b/crates/doc/src/hole_reference.rs index 187a1971f..9241104f1 100644 --- a/crates/doc/src/hole_reference.rs +++ b/crates/doc/src/hole_reference.rs @@ -152,6 +152,14 @@ pub fn reference_edge_names(st: &ModelState, at: Vec3, edges: &[Vec3]) -> Vec Vec { + let [x, y, z] = base.clone().map(|c| c.parse::().unwrap_or(0.0)); + let edges: Vec = references.iter().map(|r| r.edge.0).collect(); + reference_edge_names(st, Vec3::new(x, y, z), &edges) +} + /// The (non-mesh) body whose surface is nearest `p`. fn body_at(st: &ModelState, p: Vec3) -> Option<&ModelBody> { st.bodies diff --git a/crates/doc/src/placement_reuse.rs b/crates/doc/src/placement_reuse.rs index 865451ca3..af5a3f10e 100644 --- a/crates/doc/src/placement_reuse.rs +++ b/crates/doc/src/placement_reuse.rs @@ -70,8 +70,10 @@ pub(super) fn local_geometry(f: &Feature, components: &std::collections::HashMap return false; } match &f.kind { + // A cylinder placed by reference edges follows the body it stands on. + FeatureKind::Cylinder { references, .. } if !references.is_empty() => false, FeatureKind::Box { corner: _, length: _, width: _, height: _, operation: Operation::NewBody } - | FeatureKind::Cylinder { base: _, axis: _, radius: _, height: _, operation: Operation::NewBody } + | FeatureKind::Cylinder { base: _, axis: _, radius: _, height: _, operation: Operation::NewBody, references: _ } | FeatureKind::Sphere { center: _, radius: _, operation: Operation::NewBody } | FeatureKind::Torus { center: _, major: _, minor: _, operation: Operation::NewBody } | FeatureKind::Import { file: _, step: _, components: _, skip: _ } diff --git a/crates/doc/src/tests.rs b/crates/doc/src/tests.rs index 9f338af0c..556179d96 100644 --- a/crates/doc/src/tests.rs +++ b/crates/doc/src/tests.rs @@ -436,6 +436,7 @@ fn primitives_and_combine() { radius: "2".into(), height: "20".into(), operation: Operation::NewBody, + references: Vec::new(), }, None, ) diff --git a/crates/engine/src/cmd/edit.rs b/crates/engine/src/cmd/edit.rs index 43eafdc34..518e6944f 100644 --- a/crates/engine/src/cmd/edit.rs +++ b/crates/engine/src/cmd/edit.rs @@ -1143,6 +1143,13 @@ fn edit_feature(s: &mut Session, p: &Value) -> Result { nf.edge_names = solidcraft_doc::hole_reference::reference_edge_names(&s.model.state_before(id), position.0, &edges(a)); } } + // New reference edges for a cylinder (#6380): likewise. + if let (FeatureKind::Cylinder { references: a, base, .. }, FeatureKind::Cylinder { references: b, .. }) = (&nf.kind, &f.kind) { + let edges = |r: &[solidcraft_doc::HoleReference]| r.iter().map(|x| x.edge.0).collect::>(); + if edges(a) != edges(b) { + nf.edge_names = solidcraft_doc::hole_reference::cylinder_edge_names(&s.model.state_before(id), base, a); + } + } // New bend edges for a conversion: the names of the body's edges there now. if let (FeatureKind::SheetConvert { bends: a, body, .. }, FeatureKind::SheetConvert { bends: b, body: was, .. }) = (&nf.kind, &f.kind) && (a != b || body != was) diff --git a/crates/engine/src/cmd/features.rs b/crates/engine/src/cmd/features.rs index 7ff7c1e15..dd52429e1 100644 --- a/crates/engine/src/cmd/features.rs +++ b/crates/engine/src/cmd/features.rs @@ -55,7 +55,7 @@ pub static COMMANDS: &[CommandSpec] = &[ .icon("cylinder") .contract(&CYLINDER_CONTRACT) .output(output_schema_for::) - .params("radius | diameter, height: expr; base?: [x,y,z] (centre of the bottom: numbers in mm or length expressions; default: the origin); axis?: X|Y|Z|[x,y,z] (default Z); operation?, targets?: [body], name?, body_name?"), + .params("radius | diameter, height: expr; base?: [x,y,z] (centre of the bottom: numbers in mm or length expressions; default: the origin); axis?: X|Y|Z|[x,y,z] (default Z); references?: [{edge: [x,y,z] on a straight edge of the face it stands on, distance: expr}] (at most two, as solid.hole's: the base centre goes that far from each edge's line, in the face's plane, and follows the edges; with a numeric base only); operation?, targets?: [body], name?, body_name?"), CommandSpec::new("solid.sphere", "Sphere", crate::checked!("solid.sphere", prim_sphere)) .at("SOLID", "CREATE") .icon("sphere") @@ -680,6 +680,10 @@ fn add_feature_in(s: &mut Session, p: &Value, kind: FeatureKind, world: bool) -> let edges: Vec = references.iter().map(|r| r.edge.0).collect(); (Vec::new(), solidcraft_doc::hole_reference::reference_edge_names(&s.model.state(), position.0, &edges)) } + // A cylinder's reference edges (#6380) are edges of the body it stands on. + FeatureKind::Cylinder { base, references, .. } if !references.is_empty() => { + (Vec::new(), solidcraft_doc::hole_reference::cylinder_edge_names(&s.model.state(), base, references)) + } // A conversion's bend edges are edges of the body it converts. FeatureKind::SheetConvert { body, bends, .. } if !bends.is_empty() => { (Vec::new(), solidcraft_doc::sheet::bend_edge_names(&s.model.state(), body, &solidcraft_doc::plain(bends))) @@ -1392,7 +1396,19 @@ fn prim_cylinder(s: &mut Session, p: &Value) -> Result { check_expr(s, &height, Kind::Length, cmd, "height")?; let base = point_param(s, p, "base", cmd)?.unwrap_or_else(|| point_expr(Vec3::ZERO)); let axis = axis_dir_param(p, cmd)?; - add_feature(s, p, FeatureKind::Cylinder { base, axis: Dir(axis), radius, height, operation: operation(p, cmd)? }) + // Reference edges (#6380), as a Single hole's: the base centre sits at these distances from + // straight edges of the face it stands on, and `base` keeps where those put it. + let references = hole_reference_params(s, p, cmd)?; + let base = if references.is_empty() { + base + } else { + let at = p + .get("base") + .and_then(vec3) + .ok_or_else(|| bad(cmd, "`references` place a cylinder by its `base` given as numbers, not length expressions"))?; + point_expr(referenced_centre(s, cmd, &references, at, -axis)?) + }; + add_feature(s, p, FeatureKind::Cylinder { base, axis: Dir(axis), radius, height, operation: operation(p, cmd)?, references }) } fn prim_sphere(s: &mut Session, p: &Value) -> Result { @@ -2506,22 +2522,7 @@ fn hole(s: &mut Session, p: &Value) -> Result { }; // Placed by its reference edges: drilled where their distances put it, which `position` // then keeps. The edges must be straight edges at the given points, and cross. - let position = if references.is_empty() { - position - } else { - let st = s.model.state(); - let mut distances = Vec::with_capacity(references.len()); - for r in &references { - distances.push(s.doc.eval(&r.distance, Kind::Length).map_err(|e| bad(cmd, format!("`references`: {e}")))?); - } - let edges: Vec<(Vec3, Option<&str>)> = references.iter().map(|r| (r.edge.0, None)).collect(); - let frame = solidcraft_doc::hole_reference::reference_frame(&st, position, direction, &edges, true).map_err(|e| bad(cmd, e.to_string()))?; - let centre = frame.place(position, &distances).map_err(|e| bad(cmd, e.to_string()))?; - if !solidcraft_doc::hole_reference::on_reference_face(&st, &frame, centre) { - return Err(bad(cmd, "the reference distances put the hole's centre off its face")); - } - centre - }; + let position = if references.is_empty() { position } else { referenced_centre(s, cmd, &references, position, direction)? }; // The diameter: given, or a metric-estimate/Unified-table tap drill, or an ISO 273 // clearance hole for a bolt size (close, normal or loose fit). let diameter = match (expr(p, "diameter"), &thread, str_(p, "clearance")) { @@ -2606,6 +2607,25 @@ fn hole(s: &mut Session, p: &Value) -> Result { ) } +/// Where reference edges (#37) put a hole's (or a cylinder's) centre picked at `at` on a flat +/// face, `dir` into it: at their distances from the edges, which must be straight edges at the +/// given points, and cross. +fn referenced_centre(s: &Session, cmd: &str, references: &[solidcraft_doc::HoleReference], at: Vec3, dir: Vec3) -> Result { + let st = s.model.state(); + let mut distances = Vec::with_capacity(references.len()); + for r in references { + distances.push(s.doc.eval(&r.distance, Kind::Length).map_err(|e| bad(cmd, format!("`references`: {e}")))?); + } + let edges: Vec<(Vec3, Option<&str>)> = references.iter().map(|r| (r.edge.0, None)).collect(); + let frame = solidcraft_doc::hole_reference::reference_frame(&st, at, dir, &edges, true).map_err(|e| bad(cmd, e.to_string()))?; + let centre = frame.place(at, &distances).map_err(|e| bad(cmd, e.to_string()))?; + if !solidcraft_doc::hole_reference::on_reference_face(&st, &frame, centre) { + let what = if cmd == "solid.cylinder" { "cylinder's base" } else { "hole's centre" }; + return Err(bad(cmd, format!("the reference distances put the {what} off its face"))); + } + Ok(centre) +} + /// A hole's reference edges (#37): `references: [{edge: [x, y, z], distance: expr}]`, at most /// two, each distance a length. fn hole_reference_params(s: &Session, p: &Value, cmd: &str) -> Result> { diff --git a/crates/engine/src/hole_reference_tests.rs b/crates/engine/src/hole_reference_tests.rs index da8ac53a6..48d437e72 100644 --- a/crates/engine/src/hole_reference_tests.rs +++ b/crates/engine/src/hole_reference_tests.rs @@ -1,7 +1,7 @@ //! A Single hole placed by distances from reference edges (#37): the centre sits at the typed //! distances from straight edges of its face, measured in the face's plane, follows the edges //! when the part changes (also after the design is saved and reopened), and a bad reference is -//! refused with an error. +//! refused with an error. A cylinder takes the same references for its base (#6380). use std::f64::consts::PI; @@ -165,3 +165,121 @@ fn hostile_references_never_panic() { } assert!(panicked.is_empty(), "solid.hole panicked:\n{}", panicked.join("\n")); } + +/// The last feature's base and reference edges. +fn cylinder(s: &Session) -> (solidcraft_doc::PointExpr, Vec) { + match &s.doc.features.last().map(|f| &f.kind) { + Some(FeatureKind::Cylinder { base, references, .. }) => (base.clone(), references.clone()), + other => panic!("the last feature is not a cylinder: {other:?}"), + } +} + +/// A Ø6 × 5 cylinder joined onto the plate's top (z = 10), picked at (30, 25), with these +/// references. +fn standing(references: Value) -> Value { + json!({"base": [30, 25, 10], "axis": [0, 0, 1], "radius": 3, "height": 5, "operation": "join", "name": "C", "references": references}) +} + +/// The cylinder (Ø6, from z = 10 to 15) stands about (x, y): solid on its axis and up to 2 mm +/// from it, empty 4 mm from it in every direction. +fn pin_at(s: &Session, x: f64, y: f64) { + let at = Vec3::new(x, y, 12.5); + for k in 0..8 { + let a = PI / 4.0 * f64::from(k); + let p = |r: f64| at + Vec3::new(a.cos(), a.sin(), 0.0) * r; + assert!(solid_at(s, p(0.0)) && solid_at(s, p(2.0)), "the cylinder about ({x}, {y}) is solid {a} rad from +x"); + assert!(!solid_at(s, p(4.0)), "beside the cylinder about ({x}, {y}) is empty {a} rad from +x"); + } +} + +#[test] +fn a_cylinder_follows_its_edges_when_the_plate_changes() { + let mut s = plate(); + // 10 mm from the far edge (x = len), 12 mm from the front edge (y = 0). + let refs = json!([{"edge": [50, 20, 10], "distance": 10}, {"edge": [25, 0, 10], "distance": "12 mm"}]); + run(&mut s, "solid.cylinder", standing(refs.clone())); + let (base, references) = cylinder(&s); + assert_eq!(base.map(|c| c.to_string()), ["40", "12", "10"].map(String::from), "the base keeps where the distances put it"); + assert_eq!(references.len(), 2); + pin_at(&s, 40.0, 12.0); + let f = s.doc.find_feature("C").unwrap(); + let id = f.id; + assert_eq!(f.edge_names.len(), 2, "each reference edge keeps its persistent name"); + // The distances are inputs (Inspect Feature lists them) and parameters. + let inspected = run(&mut s, "timeline.inspect", json!({"feature": "C"})); + let labels: Vec<&str> = inspected["inputs"].as_array().unwrap().iter().filter_map(|i| i["label"].as_str()).collect(); + assert_eq!(labels.iter().filter(|l| **l == "Reference distance").count(), 2, "{labels:?}"); + // The plate grows: the cylinder stays 10 mm from its far edge. + run(&mut s, "parameters.change", json!({"name": "len", "expression": "80 mm"})); + assert!(s.model.result(id).is_some_and(|r| r.error.is_none()), "{:?}", s.model.result(id).map(|r| &r.error)); + pin_at(&s, 70.0, 12.0); + assert!(!solid_at(&s, Vec3::new(40.0, 12.0, 12.5)), "nothing stands at the old spot"); + // A distance changed as a parameter moves it. + let d = s.doc.find_feature("C").unwrap().param_names.last().cloned().unwrap(); + run(&mut s, "parameters.change", json!({"name": d, "expression": "20 mm"})); + pin_at(&s, 70.0, 20.0); + // Undo and redo. + run(&mut s, "edit.undo", json!({})); + pin_at(&s, 70.0, 12.0); + run(&mut s, "edit.redo", json!({})); + pin_at(&s, 70.0, 20.0); + // Saved and reopened, it keeps its references and its place. + let mut t = Session::new(solidcraft_doc::Document::from_json(&s.doc.to_json()).unwrap()); + t.refresh(); + pin_at(&t, 70.0, 20.0); + assert_eq!(cylinder(&t).1, cylinder(&s).1); + run(&mut t, "parameters.change", json!({"name": "len", "expression": "60 mm"})); + pin_at(&t, 50.0, 20.0); +} + +#[test] +fn a_cylinder_without_references_stays_at_its_base() { + let mut s = plate(); + run(&mut s, "solid.cylinder", standing(json!([]))); + assert!(cylinder(&s).1.is_empty()); + assert!(!s.doc.to_json().contains("references"), "a cylinder without references is saved as before"); + pin_at(&s, 30.0, 25.0); + run(&mut s, "parameters.change", json!({"name": "len", "expression": "80 mm"})); + pin_at(&s, 30.0, 25.0); + // One reference: it moves square to that edge and keeps its place along it. + run(&mut s, "edit.undo", json!({})); + run(&mut s, "edit.undo", json!({})); + run(&mut s, "solid.cylinder", standing(json!([{"edge": [0, 20, 10], "distance": 10}]))); + pin_at(&s, 10.0, 25.0); +} + +#[test] +fn a_bad_cylinder_reference_is_refused() { + let mut s = plate(); + let before = s.doc.features.len(); + let edge = |p: [f64; 3], d: Value| json!({"edge": p, "distance": d}); + for (refs, why) in [ + (json!([edge([25.0, 30.0, 10.0], json!(5))]), "no edge"), + (json!([edge([0.0, 20.0, 10.0], json!(5)), edge([50.0, 20.0, 10.0], json!(5))]), "parallel"), + (json!([edge([0.0, 20.0, 10.0], json!(5)), edge([25.0, 0.0, 10.0], json!(5)), edge([50.0, 20.0, 10.0], json!(5))]), "at most 2"), + (json!([edge([0.0, 20.0, 10.0], json!("-5 mm"))]), "0 or more"), + (json!([edge([0.0, 20.0, 10.0], json!(500))]), "off its face"), + (json!([edge([0.0, 20.0, 10.0], json!("5 deg"))]), "references"), + ] { + match s.execute("solid.cylinder", &standing(refs.clone())) { + Err(EngineError::Internal(..)) | Ok(_) => panic!("{refs} is refused"), + Err(e) => assert!(e.to_string().contains(why), "{refs}: {e}"), + } + assert_eq!(s.doc.features.len(), before, "{refs} adds nothing"); + } + let p = json!({"base": ["30 mm", "25 mm", "10 mm"], "radius": 3, "height": 5, "references": [edge([0.0, 20.0, 10.0], json!(5))]}); + assert!(s.execute("solid.cylinder", &p).is_err(), "not with a base given as expressions"); + let values = crate::tests::hostile_values(); + let mut panicked = Vec::new(); + for v in &values { + for refs in [v.clone(), json!([v]), json!([{"edge": v, "distance": 5}]), json!([{"edge": [0, 20, 10], "distance": v}])] { + for base in [json!([30, 25, 10]), json!([1e300, 0, 10]), v.clone()] { + let p = json!({"base": base, "radius": 3, "height": 5, "references": refs}); + if let Err(EngineError::Internal(id, msg)) = s.execute("solid.cylinder", &p) { + panicked.push(format!("{id} {p}: {msg}")); + } + } + } + } + assert!(panicked.is_empty(), "solid.cylinder panicked:\n{}", panicked.join("\n")); +} diff --git a/crates/engine/src/large_assembly_tests.rs b/crates/engine/src/large_assembly_tests.rs index 3fc50e339..cf256f5ce 100644 --- a/crates/engine/src/large_assembly_tests.rs +++ b/crates/engine/src/large_assembly_tests.rs @@ -38,6 +38,7 @@ fn generated_assembly(parts: usize) -> Document { radius: mm(1.5), height: mm(4.0 + k as f64), operation: Operation::NewBody, + references: Vec::new(), }; made.push((i, doc.add_feature(pin, Some(&format!("Pin {i}.{k}"))).unwrap())); } diff --git a/crates/engine/src/schema/features.rs b/crates/engine/src/schema/features.rs index 78a04f321..7ca08762b 100644 --- a/crates/engine/src/schema/features.rs +++ b/crates/engine/src/schema/features.rs @@ -189,6 +189,12 @@ pub struct CylinderParams { #[serde(default, deserialize_with = "present", skip_serializing_if = "Option::is_none")] #[schemars(with = "AxisDir")] pub axis: Option, + /// Up to two straight edges of the face it stands on, each `{edge: [x, y, z], distance: expr}` + /// (as `solid.hole`'s): the base centre goes that far from each edge's line, in the face's + /// plane, and follows the edges. With a numeric `base` only. + #[serde(default)] + #[schemars(with = "Option>")] + pub references: Option, /// How the cylinder combines with existing bodies. Default: new. #[serde(default)] pub operation: Option, diff --git a/crates/engine/src/schema/features_tests.rs b/crates/engine/src/schema/features_tests.rs index e3e1679bb..05d5255d4 100644 --- a/crates/engine/src/schema/features_tests.rs +++ b/crates/engine/src/schema/features_tests.rs @@ -49,7 +49,7 @@ fn schemas_and_the_key_check_agree() { ); assert_keys( input_schema_for::(), - &["axis", "base", "body_name", "body_names", "diameter", "height", "name", "operation", "participants", "radius", "targets"], + &["axis", "base", "body_name", "body_names", "diameter", "height", "name", "operation", "participants", "radius", "references", "targets"], ); assert_keys( input_schema_for::(), diff --git a/crates/io/src/lib.rs b/crates/io/src/lib.rs index a4abc38a4..fa0c98622 100644 --- a/crates/io/src/lib.rs +++ b/crates/io/src/lib.rs @@ -1059,6 +1059,7 @@ mod tests { radius: "6".into(), height: "15".into(), operation: Operation::NewBody, + references: Vec::new(), }, None, ) diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs index 1dec97603..4172878fd 100644 --- a/crates/ui-egui/src/canvas.rs +++ b/crates/ui-egui/src/canvas.rs @@ -361,6 +361,13 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui, painter: &egui::Painter, proj app.dialog = Some(d); return; } + // A cylinder's values are typed in its window; its distances from its reference edges + // (#6380) are shown and typed on the canvas, as a hole's. + if matches!(d.kind, Kind::Primitive { cmd: "solid.cylinder", .. }) { + crate::hole_refs::canvas(app, ui, painter, proj, &mut d); + app.dialog = Some(d); + return; + } if let Some((base, dir)) = anchor(app, &d) && let Some(bs) = proj.to_screen(base) { diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 0cf0bdc37..dc01b723c 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -329,6 +329,8 @@ crate::dialog_descriptor::dialog_descriptors! { /// face is planar. `None` keeps the command's own placement (the origin, or the edited /// feature's). at: Option<(Vec3, Option)>, + /// A Cylinder's reference edge distances on that face (`hole_refs`, #6380). + refs: Box, }, Combine { operation: usize, @@ -932,6 +934,7 @@ impl Dialog { fields: vec![("length", length_default(s, "20")), ("width", length_default(s, "20")), ("height", length_default(s, "20"))], operation: 0, at: None, + refs: Default::default(), }, crate::primitive_placement::inputs("solid.box"), ), @@ -941,11 +944,18 @@ impl Dialog { fields: vec![("diameter", length_default(s, "20")), ("height", length_default(s, "20"))], operation: 0, at: None, + refs: Default::default(), }, - vec![], + crate::hole_refs::cylinder_inputs(), ), "solid.sphere" => Dialog::new( - Kind::Primitive { cmd: "solid.sphere", fields: vec![("diameter", length_default(s, "20"))], operation: 0, at: None }, + Kind::Primitive { + cmd: "solid.sphere", + fields: vec![("diameter", length_default(s, "20"))], + operation: 0, + at: None, + refs: Default::default(), + }, vec![], ), "solid.torus" => Dialog::new( @@ -954,6 +964,7 @@ impl Dialog { fields: vec![("major", length_default(s, "20")), ("minor", length_default(s, "5"))], operation: 0, at: None, + refs: Default::default(), }, vec![], ), @@ -967,6 +978,7 @@ impl Dialog { ], operation: 0, at: None, + refs: Default::default(), }, vec![], ), @@ -981,6 +993,7 @@ impl Dialog { ], operation: 0, at: None, + refs: Default::default(), }, vec![SelInput::new("Profile", PROFILES, false)], ), @@ -4474,7 +4487,7 @@ fn dialog_commands(app: &SolveApp, d: &Dialog) -> Result, S } return Ok(out); } - Kind::Primitive { cmd, fields, operation, at } => { + Kind::Primitive { cmd, fields, operation, at, .. } => { let mut p = serde_json::Map::new(); for (k, v) in fields { p.insert((*k).into(), json!(v)); @@ -4497,6 +4510,11 @@ fn dialog_commands(app: &SolveApp, d: &Dialog) -> Result, S if let Some(n) = normal { p.insert("axis".into(), pt(n)); } + // Reference edges (#6380) place the base by its distances from them. + let references = crate::hole_refs::params(d); + if !references.is_empty() { + p.insert("references".into(), json!(references)); + } } _ => { p.insert("center".into(), pt(point)); @@ -5467,26 +5485,50 @@ pub fn for_feature(app: &SolveApp, id: u64, marker: Option) -> Option { + FeatureKind::Cylinder { base, axis, radius, height, operation, references } => { let mut d = start("solid.cylinder")?; d.kind = Kind::Primitive { cmd: "solid.cylinder", fields: vec![("radius", stored_length(s, radius)), ("height", stored_length(s, height))], operation: op_index(operation), at: None, + refs: Default::default(), }; d.extra.insert("base".into(), pt_expr(base)); d.extra.insert("axis".into(), pt3(axis.0)); + // Standing on a flat face (a base of numbers there, square to it): placed there, so it + // can take reference edges of that face (#6380), with its own picked again. Not the + // picks a selection made when the window opened. + d.inputs = crate::hole_refs::cylinder_inputs(); + let [x, y, z] = base.clone().map(|c| c.parse::().ok()); + if let (Some(x), Some(y), Some(z)) = (x, y, z) + && let Some(face @ Sel::Face { .. }) = face_sel(s, Vec3::new(x, y, z)) + && let Sel::Face { body, index, .. } = &face + && planar_face(s, body, *index).is_some_and(|(_, n)| n.dot(axis.0) > 1.0 - 1e-9) + && let Kind::Primitive { at, .. } = &mut d.kind + { + *at = Some((Vec3::new(x, y, z), Some(axis.0))); + if let Some(inp) = d.inputs.first_mut() { + inp.items = vec![face]; + } + crate::hole_refs::restore(s, &mut d, references, &f.edge_names); + } d } FeatureKind::Sphere { center, radius, operation } => { let mut d = start("solid.sphere")?; - d.kind = - Kind::Primitive { cmd: "solid.sphere", fields: vec![("radius", stored_length(s, radius))], operation: op_index(operation), at: None }; + d.kind = Kind::Primitive { + cmd: "solid.sphere", + fields: vec![("radius", stored_length(s, radius))], + operation: op_index(operation), + at: None, + refs: Default::default(), + }; d.extra.insert("center".into(), pt_expr(center)); d } @@ -5497,6 +5539,7 @@ pub fn for_feature(app: &SolveApp, id: u64, marker: Option) -> Option) -> Option) -> Option Dialog { if command == "solid.coil" { continue; // an empty Profile input keeps the primitive section, which this form checks } + if command == "solid.cylinder" { + continue; // its face and reference edges place it (cylinder reference tests); this form checks its fields + } if matches!(input.label, "Rail" | "Second Rail" | "Pass through" | "Direction" | "Roller (optional)" | "Tip (optional)") { continue; } diff --git a/crates/ui-egui/src/dialogs_dense.rs b/crates/ui-egui/src/dialogs_dense.rs index 708b7c345..b26ddbcbe 100644 --- a/crates/ui-egui/src/dialogs_dense.rs +++ b/crates/ui-egui/src/dialogs_dense.rs @@ -184,8 +184,8 @@ pub(super) fn rows(app: &mut SolveApp, ctx: &egui::Context, d: &mut Dialog, ui: ui_kit::text(ui, tr(key), ui_kit::Text::Hint("manage")); } placement_row(d, ui, &app.session); - if matches!(&d.kind, Kind::Hole { opts, .. } if !opts.multiple) { - // Each reference edge with its distance (#37). + if crate::hole_refs::takes(d) { + // Each reference edge with its distance (#37, #6380). enter |= crate::hole_refs::input_rows(d, ui, &app.session); } else { input_rows(d, ui, &app.session); @@ -793,7 +793,7 @@ fn additional_rows(app: &mut SolveApp, d: &mut Dialog, ui: &mut egui::Ui) -> boo enter |= crate::dialogs_move::rows(ui, k); extra_options(ui, "move_options", &mut d.extra, &[("Create Copy", "copy")]); } - Kind::Primitive { cmd, fields, operation, at } => { + Kind::Primitive { cmd, fields, operation, at, .. } => { let from_sketch = *cmd == "solid.coil" && d.inputs.first().is_some_and(|i| i.accept & selection::PROFILES != 0 && !i.items.is_empty()); for (k, v) in fields.iter_mut() { if from_sketch && (*k == "diameter" || *k == "section_size") { @@ -811,7 +811,10 @@ fn additional_rows(app: &mut SolveApp, d: &mut Dialog, ui: &mut egui::Ui) -> boo form_row(ui, "Position", |ui| { ui.horizontal(|ui| { ui.label(format!("{:.2}, {:.2}, {:.2}", p.x, p.y, p.z)); - if ui_kit::button(ui, "×", ui_kit::Button::Small).on_hover_text(tr("Place at the origin instead")).clicked() { + // A cylinder's place is its Face pick, cleared there. + if *cmd != "solid.cylinder" + && ui_kit::button(ui, "×", ui_kit::Button::Small).on_hover_text(tr("Place at the origin instead")).clicked() + { *at = None; } }); diff --git a/crates/ui-egui/src/hole_refs.rs b/crates/ui-egui/src/hole_refs.rs index fafe8d461..b2477da0b 100644 --- a/crates/ui-egui/src/hole_refs.rs +++ b/crates/ui-egui/src/hole_refs.rs @@ -5,7 +5,9 @@ //! there; moving the hole (another pick, or dragging its handle) measures the distances again. //! The canvas shows each distance as a dimension from its edge to the hole's centre. OK sends the //! edges and distances as `solid.hole`'s `references`, so the hole follows its edges when the -//! part changes; Edit Feature picks the edges again where they are now. +//! part changes; Edit Feature picks the edges again where they are now. A Cylinder takes the same +//! references for its base centre (#6380): its window picks the face it stands on (or takes the +//! one selected before it opened), then the edges. use egui::{Color32, Pos2, Stroke, vec2}; use serde_json::{Value, json}; @@ -17,7 +19,7 @@ use solidcraft_engine::{Sel, Session}; use crate::SolveApp; use crate::dialogs::{Dialog, Kind}; -use crate::selection::{EDGES, SelInput}; +use crate::selection::{EDGES, FACES, PLANAR_FACES, SelInput, VERTICES}; use crate::theme::Tokens; use crate::viewport::Proj; @@ -60,19 +62,75 @@ pub(crate) fn inputs() -> [SelInput; 2] { REFERENCES.map(|label| SelInput::new(label, EDGES, false)) } -/// Is `d` a Single hole's dialog? -fn single(d: &Dialog) -> bool { - matches!(&d.kind, Kind::Hole { opts, .. } if !opts.multiple) +/// The Cylinder window's inputs: where it stands (a face, or a vertex), then the reference edges. +pub(crate) fn cylinder_inputs() -> Vec { + let mut v = vec![SelInput::new("Face", PLANAR_FACES | FACES | VERTICES, false)]; + v.extend(inputs()); + v } -/// The hole's place: the first face pick (its index in the face input, and the point). -fn place(d: &Dialog) -> Option<(usize, Vec3)> { - d.inputs.first()?.items.iter().enumerate().find_map(|(i, x)| match x { - Sel::Face { point, .. } => Some((i, *point)), +/// Does `d` take reference edges: a Single hole's dialog, or a Cylinder's? +pub(crate) fn takes(d: &Dialog) -> bool { + match &d.kind { + Kind::Hole { opts, .. } => !opts.multiple, + Kind::Primitive { cmd, .. } => *cmd == "solid.cylinder", + _ => false, + } +} + +/// A Cylinder stands where its Face input is picked: on a planar face, along its normal (as it +/// stood when it is the place it already has); nowhere picked, at the origin. +fn cylinder_place(s: &Session, d: &mut Dialog) { + let picked = d.inputs.first().and_then(|i| i.items.first()).cloned(); + let Kind::Primitive { cmd: "solid.cylinder", at, .. } = &mut d.kind else { return }; + let to = match picked { + Some(Sel::Face { body, index, point }) => Some((point, crate::dialogs::planar_face(s, &body, index).map(|(_, n)| n))), + Some(Sel::Vertex { point, .. }) => Some((point, None)), + _ => None, + }; + if to.map(|(p, _)| p) != at.map(|(p, _)| p) { + *at = to; + } +} + +/// The dialog's reference distances and what they were worked out for. +fn refs(d: &Dialog) -> Option<&Refs> { + match &d.kind { + Kind::Hole { opts, .. } => Some(opts.refs.as_ref()), + Kind::Primitive { refs, .. } => Some(refs.as_ref()), + _ => None, + } +} + +fn refs_mut(d: &mut Dialog) -> Option<&mut Refs> { + match &mut d.kind { + Kind::Hole { opts, .. } => Some(opts.refs.as_mut()), + Kind::Primitive { refs, .. } => Some(refs.as_mut()), + _ => None, + } +} + +/// The place: the cylinder's base, else the hole's first face pick. +fn place(d: &Dialog) -> Option { + if let Kind::Primitive { at, .. } = &d.kind { + return at.map(|(p, _)| p); + } + d.inputs.first()?.items.iter().find_map(|x| match x { + Sel::Face { point, .. } => Some(*point), _ => None, }) } +/// Move the place (see [`place`]) to `p`: the face pick, and a cylinder's base with it. +fn set_place(d: &mut Dialog, p: Vec3) { + if let Kind::Primitive { at: Some((point, _)), .. } = &mut d.kind { + *point = p; + } + if let Some(Sel::Face { point, .. }) = d.inputs.first_mut().and_then(|inp| inp.items.iter_mut().find(|x| matches!(x, Sel::Face { .. }))) { + *point = p; + } +} + /// A point on each reference edge picked, by input. fn edges(d: &Dialog) -> [Option; 2] { REFERENCES.map(|label| { @@ -90,21 +148,24 @@ fn vec3(v: &Value) -> Option { (a.len() == 3).then(|| Some(Vec3::new(c(0)?, c(1)?, c(2)?))).flatten() } -/// The way the hole drills at `at`: as it was made (editing), else into the face there. +/// The way the hole drills at `at`: as it was made (editing), else into the face there. A +/// cylinder's: into the face it stands on, against its axis. fn direction(s: &Session, d: &Dialog, at: Vec3) -> Option { + if let Kind::Primitive { at: Some((_, normal)), .. } = &d.kind { + return normal.map(|n| -n); + } d.extra.get("direction").and_then(vec3).or_else(|| solidcraft_engine::doc::hole_direction_at(&s.world_state(), at)) } /// The face's frame at the place for the picked edges (and which reference inputs they are), found /// again only when the design, the place or the edges change. fn frame(s: &Session, d: &mut Dialog) -> Option<(ReferenceFrame, Vec)> { - let (_, at) = place(d)?; + let at = place(d)?; let edges = edges(d); if edges.iter().all(Option::is_none) { return None; } - let Kind::Hole { opts, .. } = &d.kind else { return None }; - if let Some(f) = &opts.refs.frame + if let Some(f) = &refs(d)?.frame && f.revision == s.revision && f.place == at && f.edges == edges @@ -116,8 +177,8 @@ fn frame(s: &Session, d: &mut Dialog) -> Option<(ReferenceFrame, Vec)> { let pts: Vec<(Vec3, Option<&str>)> = picked.iter().map(|(_, p)| (*p, None)).collect(); reference_frame(&s.world_state(), at, dir, &pts, true).ok().map(|f| (f, picked.iter().map(|(k, _)| *k).collect())) }); - if let Kind::Hole { opts, .. } = &mut d.kind { - opts.refs.frame = Some(Framed { revision: s.revision, place: at, edges, frame: found.clone() }); + if let Some(refs) = refs_mut(d) { + refs.frame = Some(Framed { revision: s.revision, place: at, edges, frame: found.clone() }); } found } @@ -126,19 +187,19 @@ fn frame(s: &Session, d: &mut Dialog) -> Option<(ReferenceFrame, Vec)> { /// typed distance moves the place there (when it stays on the face). Run before the dialog's /// commands are made. pub(crate) fn sync(s: &Session, d: &mut Dialog) { - if !single(d) { + if !takes(d) { return; } + cylinder_place(s, d); let edges = edges(d); - let Some((i, at)) = place(d) else { - if let Kind::Hole { opts, .. } = &mut d.kind { - opts.refs.seen = None; + let Some(at) = place(d) else { + if let Some(refs) = refs_mut(d) { + refs.seen = None; } return; }; let framed = frame(s, d); - let Kind::Hole { opts, .. } = &mut d.kind else { return }; - let refs = &mut opts.refs; + let Some(refs) = refs_mut(d) else { return }; let mut to = at; if let Some((f, picked)) = &framed { let same = refs.seen.as_ref().filter(|sn| sn.place == at && sn.edges == edges); @@ -170,15 +231,13 @@ pub(crate) fn sync(s: &Session, d: &mut Dialog) { } } refs.seen = Some(Seen { place: to, edges, distance: refs.distance.clone() }); - if to != at - && let Some(Sel::Face { point, .. }) = d.inputs.first_mut().and_then(|inp| inp.items.get_mut(i)) - { - *point = to; + if to != at { + set_place(d, to); } } -/// The Single hole's selection rows, each reference edge with its distance on the row below it -/// once it is picked. Whether Enter was pressed in a distance. +/// The Single hole's (or the Cylinder's) selection rows, each reference edge with its distance on +/// the row below it once it is picked. Whether Enter was pressed in a distance. pub(crate) fn input_rows(d: &mut Dialog, ui: &mut egui::Ui, s: &Session) -> bool { let mut enter = false; for i in 0..d.inputs.len() { @@ -186,8 +245,8 @@ pub(crate) fn input_rows(d: &mut Dialog, ui: &mut egui::Ui, s: &Session) -> bool let Some(k) = d.inputs.get(i).filter(|inp| !inp.items.is_empty()).and_then(|inp| REFERENCES.iter().position(|l| *l == inp.label)) else { continue; }; - if let Kind::Hole { opts, .. } = &mut d.kind - && let (Some(label), Some(value)) = (DISTANCES.get(k), opts.refs.distance.get_mut(k)) + if let Some(refs) = refs_mut(d) + && let (Some(label), Some(value)) = (DISTANCES.get(k), refs.distance.get_mut(k)) { enter |= crate::ui_kit::expr_row(ui, label, value); } @@ -198,24 +257,17 @@ pub(crate) fn input_rows(d: &mut Dialog, ui: &mut egui::Ui, s: &Session) -> bool /// The `references` OK sends: each picked edge (a point on it) with its distance. pub(crate) fn params(d: &Dialog) -> Vec { - let Kind::Hole { opts, .. } = &d.kind else { return Vec::new() }; - if opts.multiple { - return Vec::new(); - } - edges(d) - .iter() - .zip(&opts.refs.distance) - .filter_map(|(e, distance)| e.map(|p| json!({"edge": [p.x, p.y, p.z], "distance": distance.trim()}))) - .collect() + let Some(refs) = refs(d).filter(|_| takes(d)) else { return Vec::new() }; + edges(d).iter().zip(&refs.distance).filter_map(|(e, distance)| e.map(|p| json!({"edge": [p.x, p.y, p.z], "distance": distance.trim()}))).collect() } -/// Editing a hole with reference edges: the edges picked again where they are now, their -/// distances, and the place where those distances put the hole now. +/// Editing a hole (or a cylinder) with reference edges: the edges picked again where they are +/// now, their distances, and the place where those distances put it now. pub(crate) fn restore(s: &Session, d: &mut Dialog, references: &[HoleReference], names: &[String]) { if references.is_empty() { return; } - let Some((i, at)) = place(d) else { return }; + let Some(at) = place(d) else { return }; let st = s.world_state(); let edges: Vec<(Vec3, Option<&str>)> = references.iter().enumerate().map(|(k, r)| (r.edge.0, names.get(k).map(String::as_str))).collect(); let found = direction(s, d, at).and_then(|dir| reference_frame(&st, at, dir, &edges, false).ok()); @@ -233,8 +285,8 @@ pub(crate) fn restore(s: &Session, d: &mut Dialog, references: &[HoleReference], { inp.items = vec![sel]; } - if let Kind::Hole { opts, .. } = &mut d.kind - && let Some(slot) = opts.refs.distance.get_mut(k) + if let Some(refs) = refs_mut(d) + && let Some(slot) = refs.distance.get_mut(k) { *slot = r.distance.to_string(); } @@ -242,19 +294,17 @@ pub(crate) fn restore(s: &Session, d: &mut Dialog, references: &[HoleReference], // The hole where its distances put it now (the part may have changed since it was placed). let mut to = at; if let Some(f) = &found - && let Kind::Hole { opts, .. } = &d.kind + && let Some(refs) = refs(d) { - let values: Option> = opts.refs.distance.iter().take(f.lines.len()).map(|e| s.doc.eval(e, ValueKind::Length).ok()).collect(); + let values: Option> = refs.distance.iter().take(f.lines.len()).map(|e| s.doc.eval(e, ValueKind::Length).ok()).collect(); if let Some(c) = values.and_then(|v| f.place(at, &v).ok()).filter(|c| on_reference_face(&st, f, *c)) { to = c; } } - if let Some(Sel::Face { point, .. }) = d.inputs.first_mut().and_then(|inp| inp.items.get_mut(i)) { - *point = to; - } + set_place(d, to); let edges = self::edges(d); - if let Kind::Hole { opts, .. } = &mut d.kind { - opts.refs.seen = Some(Seen { place: to, edges, distance: opts.refs.distance.clone() }); + if let Some(refs) = refs_mut(d) { + refs.seen = Some(Seen { place: to, edges, distance: refs.distance.clone() }); } } @@ -273,10 +323,10 @@ fn nearest_edge(s: &Session, at: Vec3, p: Vec3) -> Option { /// box beside it to type the distance in. Whether a box took the keyboard (a newly picked edge's), /// which the dialog's main value then leaves to it. pub(crate) fn canvas(app: &SolveApp, ui: &mut egui::Ui, painter: &egui::Painter, proj: &Proj, d: &mut Dialog) -> bool { - if !single(d) { + if !takes(d) { return false; } - let Some((_, at)) = place(d) else { return false }; + let Some(at) = place(d) else { return false }; let Some((f, picked)) = frame(&app.session, d) else { return false }; let mut took = false; let t = Tokens::get(); @@ -291,13 +341,13 @@ pub(crate) fn canvas(app: &SolveApp, ui: &mut egui::Ui, painter: &egui::Painter, painter.line_segment([e0, e1], Stroke::new(1.2, t.dimension)); } dimension(painter, a, b, t.dimension); - let (Some(label), Kind::Hole { opts, .. }) = (DISTANCES.get(*k), &mut d.kind) else { continue }; - let focus = opts.refs.focus == Some(*k); + let (Some(label), Some(refs)) = (DISTANCES.get(*k), refs_mut(d)) else { continue }; + let focus = refs.focus == Some(*k); if focus { - opts.refs.focus = None; + refs.focus = None; took = true; } - let Some(value) = opts.refs.distance.get_mut(*k) else { continue }; + let Some(value) = refs.distance.get_mut(*k) else { continue }; let at = box_beyond(a, b); let r = crate::canvas::value_box_in( ui, diff --git a/crates/ui-egui/src/hole_refs_ui_tests.rs b/crates/ui-egui/src/hole_refs_ui_tests.rs index f65f691f8..bdc410305 100644 --- a/crates/ui-egui/src/hole_refs_ui_tests.rs +++ b/crates/ui-egui/src/hole_refs_ui_tests.rs @@ -2,6 +2,7 @@ //! face, pick two edges (each distance is measured from the pick), type the distances (one in //! the dialog, one in its box on the canvas), OK. The hole sits at those distances; Edit Feature //! picks the edges again with their distances, and moving the hole's place measures them again. +//! A Cylinder standing on a picked face takes reference edges the same way (#6380). use serde_json::json; use solidcraft_engine::Sel; @@ -160,3 +161,91 @@ fn a_number_typed_after_an_edge_pick_sets_its_distance() { let Some(Kind::Hole { diameter, .. }) = h.app.dialog.as_ref().map(|d| &d.kind) else { panic!("the hole dialog") }; assert_eq!(diameter, "5 mm", "the diameter is left as it was"); } + +/// The open Cylinder dialog's reference distances and where it stands. +fn cylinder_dialog(h: &Harness) -> ([String; 2], Vec3) { + match h.app.dialog.as_ref().map(|d| &d.kind) { + Some(Kind::Primitive { cmd: "solid.cylinder", refs, at: Some((p, _)), .. }) => (refs.distance.clone(), *p), + other => panic!("the cylinder dialog is open on a face: {other:?}"), + } +} + +/// With the mouse alone: pick the top face, start Cylinder, pick two edges (each distance +/// measured from the pick), OK. Typing a distance moves the base; Edit Feature picks the edges +/// again. +#[test] +fn a_cylinder_is_placed_by_its_distances_from_two_edges() { + let mut h = plate(); + let at = screen(&mut h, Vec3::new(30.0, 25.0, 10.0)); + h.step(&json!({"click": at})).unwrap(); + h.step(&json!({"start": "solid.cylinder"})).unwrap(); + h.frames(2); + let (_, picked) = cylinder_dialog(&h); + assert!(picked.dist(Vec3::new(30.0, 25.0, 10.0)) < 0.5, "it stands where the face was picked: {picked:?}"); + // Reference 1 takes the first edge picked, Reference 2 the next. + let left = screen(&mut h, Vec3::new(0.0, 20.0, 10.0)); + h.step(&json!({"click": left})).unwrap(); + let front = screen(&mut h, Vec3::new(25.0, 0.0, 10.0)); + h.step(&json!({"click": front})).unwrap(); + h.frames(2); + assert!(picked_edge(&h, "Reference 1").is_some_and(|p| p.x.abs() < 1e-6), "{:?}", picked_edge(&h, "Reference 1")); + assert!(picked_edge(&h, "Reference 2").is_some_and(|p| p.y.abs() < 1e-6), "{:?}", picked_edge(&h, "Reference 2")); + let (measured, _) = cylinder_dialog(&h); + let value = |s: &str| h.app.session.doc.eval(s, solidcraft_engine::doc::expr::Kind::Length).unwrap(); + assert!((value(&measured[0]) - picked.x).abs() < 1e-3 && (value(&measured[1]) - picked.y).abs() < 1e-3, "{measured:?} from {picked:?}"); + assert!(h.at(&json!({"handle": "canvas:Distance 1"})).is_ok() && h.at(&json!({"handle": "canvas:Distance 2"})).is_ok()); + h.step(&json!({"widget": "OK"})).unwrap(); + assert!(h.app.dialog.is_none(), "OK closed the dialog: {:?}", h.app.dialog.as_ref().map(|d| &d.error)); + let f = h.app.session.doc.features.last().unwrap().clone(); + let FeatureKind::Cylinder { references, .. } = &f.kind else { panic!("the last feature is a cylinder: {}", f.kind.type_name()) }; + assert_eq!(references.len(), 2); + assert_eq!(f.edge_names.len(), 2); + assert!(h.app.session.model.result(f.id).is_some_and(|r| r.error.is_none())); + + // Edit Feature (with the face selected): the edges again with their distances, each input + // once; a typed distance moves the base. + let top = crate::dialogs::face_sel(&h.app.session, Vec3::new(45.0, 35.0, 10.0)).unwrap(); + h.app.session.selection = vec![top]; + h.step(&json!({"call": "ui.editFeature", "params": {"feature": f.id}})).unwrap(); + h.frames(4); + let labels: Vec<&str> = h.app.dialog.as_ref().unwrap().inputs.iter().map(|i| i.label).collect(); + assert_eq!(labels, ["Face", "Reference 1", "Reference 2"]); + assert!(picked_edge(&h, "Reference 1").is_some_and(|p| p.x.abs() < 1e-6), "{:?}", picked_edge(&h, "Reference 1")); + assert!(picked_edge(&h, "Reference 2").is_some_and(|p| p.y.abs() < 1e-6), "{:?}", picked_edge(&h, "Reference 2")); + assert_eq!(cylinder_dialog(&h).0, measured); + type_into(&mut h, "dialog:Distance 1", "10 mm"); + type_into(&mut h, "canvas:Distance 2", "12 mm"); + assert!(cylinder_dialog(&h).1.dist(Vec3::new(10.0, 12.0, 10.0)) < 1e-6, "{:?}", cylinder_dialog(&h).1); + h.step(&json!({"widget": "OK"})).unwrap(); + assert!(h.app.dialog.is_none(), "{:?}", h.app.dialog.as_ref().map(|d| &d.error)); + assert!(solid_at(&h, Vec3::new(10.0, 12.0, 12.0)) && !solid_at(&h, Vec3::new(picked.x, picked.y, 12.0)), "the edit moved it to (10, 12)"); +} + +/// Started with nothing selected, the Cylinder stands at the origin until a face is clicked; +/// then its edges are picked, all with the mouse. +#[test] +fn a_cylinder_started_first_takes_its_face_then_its_edges() { + let mut h = plate(); + h.step(&json!({"start": "solid.cylinder"})).unwrap(); + h.frames(2); + let d = h.app.dialog.as_ref().unwrap(); + let labels: Vec<&str> = d.inputs.iter().map(|i| i.label).collect(); + assert_eq!(labels, ["Face", "Reference 1", "Reference 2"]); + assert!(matches!(d.kind, Kind::Primitive { at: None, .. }), "nothing picked: at the origin"); + let at = screen(&mut h, Vec3::new(30.0, 25.0, 10.0)); + h.step(&json!({"click": at})).unwrap(); + h.frames(2); + let (_, picked) = cylinder_dialog(&h); + assert!(picked.dist(Vec3::new(30.0, 25.0, 10.0)) < 0.5, "it stands where the face was clicked: {picked:?}"); + let left = screen(&mut h, Vec3::new(0.0, 20.0, 10.0)); + h.step(&json!({"click": left})).unwrap(); + let front = screen(&mut h, Vec3::new(25.0, 0.0, 10.0)); + h.step(&json!({"click": front})).unwrap(); + h.frames(2); + assert!(picked_edge(&h, "Reference 1").is_some() && picked_edge(&h, "Reference 2").is_some()); + h.step(&json!({"widget": "OK"})).unwrap(); + assert!(h.app.dialog.is_none(), "{:?}", h.app.dialog.as_ref().map(|d| &d.error)); + let f = h.app.session.doc.features.last().unwrap(); + let FeatureKind::Cylinder { references, .. } = &f.kind else { panic!("the last feature is a cylinder") }; + assert_eq!(references.len(), 2); +} diff --git a/docs/book/src/guide/features.md b/docs/book/src/guide/features.md index adecfcd96..d70c6fc44 100644 --- a/docs/book/src/guide/features.md +++ b/docs/book/src/guide/features.md @@ -114,6 +114,13 @@ measured in the face's plane. Moving the hole measures the distances again. The distances when the part changes: it follows its edges, and the distances are parameters like its diameter. +A **Cylinder** placed on a planar face takes reference edges the same way. Select the face, then +start **Cylinder**: it stands where you clicked, and the window has **Reference 1** and +**Reference 2**. Pick one or two straight edges of that face; each gets a **Distance**, measured +from where you clicked, which you can also type in the window or in its box on the canvas. The +cylinder's base centre then follows the edges when the part changes, and the distances are +parameters like its radius. Edit Feature picks the edges again. + A **Hole** with **Single** placement drills where you pick a planar face. A pick on or near a point of a shown sketch that lies on that face, such as a circle's centre, places the hole exactly at that point, as **Multiple** placement picks it; **Select Other** (press and hold) also @@ -271,7 +278,7 @@ still be added through `set`. The fields of the common features: | Fillet | `radius`, `edges` (a point on each edge), `body`, `style` | | Chamfer | `distance`, `distance2` or `angle`, `flip`, `edges`, `body` | | Box | `length`, `width`, `height`, `corner`, `operation` | -| Cylinder | `radius`, `height`, `base`, `axis`, `operation` | +| Cylinder | `radius`, `height`, `base`, `axis`, `operation`, `references` (an `edge` point and a `distance` each, as a hole's) | | Hole | `diameter`, `depth`, `position`, `direction`, `hole` (simple, drilled, counterbore, countersink), `thread`, `to`, `references` (an `edge` point and a `distance` each) | | Shell | `thickness`, `faces`, `direction`, `body`, `tangent_chain` | | Draft | `angle`, `faces`, `neutral`, `pull`, `body` | diff --git a/docs/book/src/reference/glossary.md b/docs/book/src/reference/glossary.md index 300cc2d09..211cb5803 100644 --- a/docs/book/src/reference/glossary.md +++ b/docs/book/src/reference/glossary.md @@ -258,6 +258,22 @@ The first instance is the original. - **Elsewhere:** instance, element, occurrence. - **For translators:** not an occurrence of a component. +### reference edge + +A straight edge of a flat face that a Single hole's centre or a cylinder's base centre keeps a +set distance from, measured in that face's plane. + +Up to two reference edges place one hole or cylinder. Each distance is a parameter, and the +feature follows its edges when the part changes. + +- **In SolidCraft:** the `references` parameter of `solid.hole` and `solid.cylinder` (each + `{edge, distance}`); the windows' Reference 1, Reference 2 and Distance 1, Distance 2 rows; the + "Reference distance" input (`ui.reference_1`, `ui.reference_2`, `ui.reference_distance`). +- **Don't use:** datum edge, anchor edge. +- **Elsewhere:** reference edge, edge offset, distance from edge. +- **For translators:** an edge of a body, not a construction axis or a reference plane; the + distance is a length, not a reference value for light or material. + ### rollback marker The marker in the timeline after which no feature is computed. @@ -351,6 +367,9 @@ share a catalogue entry. Each meaning below gets its own term and, in time, its | | the middle display quality | normal (quality) | `ui.display_quality_normal` | | Quantity | the number of pattern instances | count | the pattern dialogs' Quantity rows, `ui.quantity` | | | what the motion plot shows: value, velocity or acceleration | plotted quantity | the motion study's Quantity row, `motion.plot_quantity` | +| Reference | an edge a hole or cylinder keeps its distance from | *reference edge* | `references` of `solid.hole` and `solid.cylinder`, `ui.reference_1` | +| | the measured values a material is checked against | reference (material) | `material.editor.reference` | +| | the distance a light's intensity is given for | reference distance (light) | `render.cpu_light_reference` | Some translations show the clash today: Japanese and Chinese show a hole's flat bottom with the word for "unfold" or "plane", Chinese shows "Round" as "fillet", and Chinese and Russian show the diff --git a/skills/solidcraft-modeling/reference.md b/skills/solidcraft-modeling/reference.md index e533f9733..b2f877472 100644 --- a/skills/solidcraft-modeling/reference.md +++ b/skills/solidcraft-modeling/reference.md @@ -76,7 +76,7 @@ Distances are unsigned. Draw the geometry on the correct side first, and the dim |---|---|---| | `solid.extrude` | `distance` | `profiles` defaults to **every region**, with a region inside another as a hole in it: two concentric circles give a ring. Pick regions with `[{"point":[x,y]}]` or `[index]`. Other options: `operation` (new/join/cut/intersect/auto), `direction` (positive/negative/symmetric), `through_all: true`, `start_offset`. A cut that misses reports success. | | `solid.box` | `length`, `width`, `height` | `center:[x,y,z]` or `corner`. The quickest way to block out a part. `body_name` names the body it makes. With `operation:"cut"`, `targets:["Top"]` cuts only the bodies listed, so the cutter can pass through other bodies. | -| `solid.cylinder` | `radius` or `diameter`, `height` | `base` is the centre of the bottom (default origin), `axis` defaults to `Z`. Expressions work in `base`. Always pass `operation`. `body_name` and `targets` work as for `solid.box`. | +| `solid.cylinder` | `radius` or `diameter`, `height` | `base` is the centre of the bottom (default origin), `axis` defaults to `Z`. Expressions work in `base`. To tie a cylinder standing on a flat face to the part, give `base` as numbers on that face and add `references: [{edge:[x,y,z], distance}]` (up to two straight edges of the face, as for `solid.hole`): the base centre then sits at those distances from the edges and follows them. Always pass `operation`. `body_name` and `targets` work as for `solid.box`. | | `sketch.slot.overall` / `sketch.slot.center_to_center` | `p0`, `p1` (overall ends / arc centres), `width` | Ids and dof are in the "Ids" section above. | | `solid.fillet` / `solid.chamfer` | `edges:[[x,y,z]]`, `radius` / `distance` | The pick snaps to the **nearest** edge. A pick farther than 5% of the body's size from every edge is refused, so check that the face count changed. One pick takes the whole tangent chain: a rounded rim needs 1 point, not 8. | | `solid.shell` | `faces:[[x,y,z]]`, `thickness` | A point on each face to remove, or its name from `body_topology`. Fillet first, except an edge of a removed face or a fillet between curved faces (see Order in `SKILL.md`). Bodies with lofted or swept faces are refused (`offset: only bodies with planes, cylinders, cones, spheres and tori`): hollow a loft with a smaller loft and `operation: cut`. | From 5869f4c2470a18a0784fa70309b3ee25680c6bac Mon Sep 17 00:00:00 2001 From: Victor Santos Oliveira <56417388+Vittuu@users.noreply.github.com> Date: Tue, 27 Oct 2026 19:28:34 +0000 Subject: [PATCH 085/102] Windows: gate Unix-only slicer readiness states (#7696) (#7697) * claim: #7696 slicer readiness platform guards * fix(engine): gate platform-specific slicer readiness code --- crates/engine/src/slicers.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/crates/engine/src/slicers.rs b/crates/engine/src/slicers.rs index b456a2719..ef8f3e00c 100644 --- a/crates/engine/src/slicers.rs +++ b/crates/engine/src/slicers.rs @@ -929,6 +929,7 @@ impl Slicer { /// Whether this is a PrusaSlicer old enough that its `--single-instance-on-url` does not hand a /// file over, by the version read when it was detected. + #[cfg(not(target_arch = "wasm32"))] fn url_flag_swaps(&self) -> bool { self.target().on_url_swap_below.is_some_and(|below| self.prusa_major.is_some_and(|v| v < below)) } @@ -946,11 +947,12 @@ impl Slicer { } pub(crate) fn ready_via(&self, busctl: &str, limit: std::time::Duration) -> Option { - let rule = self.waits_for_ready()?; - match bus_list(busctl, limit) { - Bus::Names(list) => Some(has_bus_name(&list, rule.bus_prefix)), - Bus::Slow => Some(false), - Bus::Unknown => None, + match (self.waits_for_ready()?, bus_list(busctl, limit)) { + #[cfg(all(unix, not(target_arch = "wasm32")))] + (rule, Bus::Names(list)) => Some(has_bus_name(&list, rule.bus_prefix)), + #[cfg(all(unix, not(target_arch = "wasm32")))] + (_, Bus::Slow) => Some(false), + (_, Bus::Unknown) => None, } } } @@ -984,8 +986,10 @@ pub const PROBE_LIMIT: std::time::Duration = std::time::Duration::from_secs(2); #[derive(Debug, PartialEq, Eq)] enum Bus { /// The names, one line each. + #[cfg(all(unix, not(target_arch = "wasm32")))] Names(String), /// `busctl` did not answer in time: nothing is known yet, which is not the same as "not up". + #[cfg(all(unix, not(target_arch = "wasm32")))] Slow, /// `busctl` is missing, failed, or this is not a system that has it: it can't be told. Unknown, @@ -1048,11 +1052,13 @@ fn bus_list(program: &str, limit: std::time::Duration) -> Bus { } /// The first column of each line: the bus names. +#[cfg(any(test, all(unix, not(target_arch = "wasm32"))))] fn bus_names(list: &str) -> impl Iterator { list.lines().filter_map(|l| l.split_whitespace().next()) } /// Whether the list has a name that starts with `prefix`. +#[cfg(any(test, all(unix, not(target_arch = "wasm32"))))] fn has_bus_name(list: &str, prefix: &str) -> bool { bus_names(list).any(|n| n.starts_with(prefix)) } From 69e45b88e79a53b2e2610353606e6b00c4996761 Mon Sep 17 00:00:00 2001 From: Irakli Kourtis Date: Tue, 27 Oct 2026 19:32:16 +0000 Subject: [PATCH 086/102] docs: a disclaimer of warranty, liability, indemnity and harmful use (#3882) Claude-Session: https://claude.ai/code/session_013Bhtfdu3WDoF5dQjzzdcbq Co-authored-by: jyviko <2501648+jyviko@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- DISCLAIMER.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ README.md | 6 ++++++ 2 files changed, 50 insertions(+) create mode 100644 DISCLAIMER.md diff --git a/DISCLAIMER.md b/DISCLAIMER.md new file mode 100644 index 000000000..86937ad8c --- /dev/null +++ b/DISCLAIMER.md @@ -0,0 +1,44 @@ +# Disclaimer + +This disclaimer covers the software, models, data, documentation and every other file in this +repository and in the releases built from it (together, "the files"). + +## No warranty + +The files are provided "as is", without warranty of any kind, express or implied, including +warranties of accuracy, merchantability, fitness for a particular purpose and non-infringement. +Results produced with the files, such as geometry, meshes, analyses and simulations, can be +wrong. A qualified person must check them before anyone relies on them for a design, +manufacturing or safety decision. + +## No liability + +To the fullest extent permitted by law, Tangency Labs and the contributors are not liable for any +claim, damage, loss or other liability arising from the files or from their use, modification or +distribution, whether in contract, tort or otherwise. + +## No indemnity + +Neither Tangency Labs nor any contributor indemnifies, defends or holds harmless anyone who uses, +modifies or distributes the files, including against claims that the files infringe someone +else's rights. + +## Harmful or unlawful use + +Tangency Labs and the contributors do not authorise, endorse or accept any responsibility for use +of the files to harm people, animals, property or the environment, or for any unlawful use. +Whoever uses the files is solely responsible for how they use them, for what they make with them +and for complying with the laws that apply to them. Tangency Labs and the contributors must not be +named or held out as responsible for any such use. + +## No endorsement + +Using, modifying or distributing the files does not mean that Tangency Labs or any contributor +endorses you, your product or your results. Do not use the name of Tangency Labs or of a +contributor to suggest such an endorsement without written permission. + +## Relation to the licence + +This disclaimer adds to the warranty and liability terms of the licence the files are distributed +under. It does not restrict any right that licence grants; where the two differ, the licence +governs. diff --git a/README.md b/README.md index 4d53aa825..8c1ca69a3 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,12 @@ the clean-room and licence rules, and where help is wanted most. Open work is in SolidCraft's continuous integration runs on [Blacksmith](https://www.blacksmith.sh), which sponsors its CI minutes. +## Disclaimer + +The files in this repository are provided as is, without warranty, liability or indemnity, and +Tangency Labs and the contributors accept no responsibility for any harmful or unlawful use of +them: read [DISCLAIMER.md](DISCLAIMER.md). + ## Licence MIT OR Apache-2.0, at your option. Developed under the From 5bdb11bd56b5fd352bfe68d489185e817b241e53 Mon Sep 17 00:00:00 2001 From: Badger B <134829689+badgerisda@users.noreply.github.com> Date: Tue, 27 Oct 2026 19:34:36 +0000 Subject: [PATCH 087/102] Add German translations, batch 2 (#7237) (#7826) * Regenerate generated files and fold pending files [skip ci] * Add German translations, batch 2 (#7237) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- assets/locales/pending/de-batch-2.json | 134 +++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 assets/locales/pending/de-batch-2.json diff --git a/assets/locales/pending/de-batch-2.json b/assets/locales/pending/de-batch-2.json new file mode 100644 index 000000000..847b124e6 --- /dev/null +++ b/assets/locales/pending/de-batch-2.json @@ -0,0 +1,134 @@ +{ + "de": { + "ai.connected_toast": "SolidCraft ist jetzt in {clients} verfügbar. Starten Sie diese neu, um es zu nutzen (Einstellungen > Assistent).", + "ai.prefs.allow_control": "Verbindungen von KI-Agenten zulassen (Steuerkanal / MCP)", + "ai.prefs.allow_control_note": "Öffnet einen Steuerkanal nur auf diesem Computer (127.0.0.1, Port 27878 oder der nächste freie). Ein verbindendes Programm muss zusätzlich ein geheimes Token vorweisen, das nur Ihr Benutzerkonto lesen kann und bei jedem Start neu erzeugt wird. Wirkt ab dem nächsten Start von SolidCraft. Aus: Es wartet nichts auf Verbindungen, außer Sie starten SolidCraft mit --control.", + "ai.prefs.availability": "Assistenten-Steuerung", + "ai.prefs.background_commands": "Agentenbefehle im Hintergrund ausführen", + "ai.prefs.connect_apps": "SolidCraft für KI-Apps auf diesem Computer verfügbar machen", + "ai.prefs.connect_apps_note": "Trägt SolidCraft beim Start als MCP-Server in die auf diesem Computer gefundenen KI-Apps ein (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), damit ein Agent es ohne Einrichtung nutzen kann. Nur der Eintrag „solidcraft“ wird hinzugefügt oder sein Pfad aktualisiert; ein von Ihnen geänderter Eintrag bleibt unberührt, und die Datei wird vorher gesichert. Aus: Die hinzugefügten Einträge werden entfernt. Hilfe > KI-Assistenten verbinden… erledigt das von Hand.", + "ai.prefs.follow_camera": "Kamera zu Skizzen drehen", + "ai.prefs.follow_camera_off": "Die automatische Kameraführung ist aus.", + "ai.prefs.follow_camera_on": "Die Kamera dreht sich zu Skizzen, die der Agent erstellt.", + "ai.prefs.intro": "Agenten, Berechtigungen und wie ihre Arbeit angezeigt wird.", + "ai.prefs.make_default": "Standardmäßig verwenden", + "ai.prefs.no_agents": "Noch keine Agenten. Fügen Sie einen Agenten hinzu oder aktualisieren Sie, um installierte Agenten zu finden.", + "ai.prefs.no_saved_approvals": "Keine gespeicherten Freigaben.", + "ai.prefs.override_all_warning": "Dieser Agent darf das Design ohne Rückfrage speichern, überschreiben, exportieren oder ersetzen.", + "ai.prefs.permission_all": "Alles erlauben", + "ai.prefs.permission_all_summary": "Verfügbare SolidCraft-Werkzeuge werden ohne Rückfrage ausgeführt.", + "ai.prefs.permission_ask": "Vor Änderungen fragen", + "ai.prefs.permission_ask_summary": "Jede Designänderung und Dateiaktion bestätigen.", + "ai.prefs.permission_edits": "Modelländerungen erlauben", + "ai.prefs.permission_edits_summary": "Modelländerungen werden ohne Rückfrage ausgeführt; Datei- und destruktive Aktionen fragen weiterhin nach.", + "ai.prefs.permission_scope": "Gilt nur für SolidCraft-Werkzeuge. Shell und Dateiänderungen des Agenten unterliegen dessen eigenen Berechtigungen.", + "ai.prefs.pointer_preview_hidden": "Zeiger ausgeblendet", + "ai.prefs.pointer_preview_speed": "Agentenzeiger · {speed}", + "ai.prefs.pointer_speed": "Bewegungsgeschwindigkeit", + "ai.prefs.privacy_note": "Die Unterhaltung geht nur an den von Ihnen gewählten Agenten oder API-Endpunkt. API-Schlüssel werden im Schlüsselbund des Systems gespeichert.", + "ai.prefs.show_pointer": "Agentenzeiger anzeigen", + "ai.prefs.turn_limit_hint": "Höchstzahl designändernder Werkzeugaufrufe, die der Assistent für eine Nachricht ausführen darf.", + "cmd.browser_collapse_all": "Alles einklappen", + "cmd.browser_expand_all": "Alles ausklappen", + "cmd.component_cycle_color": "Komponentenfarbe wechseln", + "cmd.inspect_colored_components": "Komponentenfarben einschalten", + "cmd.inspect_colored_components_disable": "Komponentenfarben ausschalten", + "cmd.inspect_parameter_sweep": "Parametervariation", + "cmd.motion_trace_edit": "Bewegungsbahn bearbeiten", + "cmd.occurrence_drag": "Instanz ziehen", + "cmd.render_aging_describe": "Mehrschichtige Oberflächenalterung", + "cmd.render_effects_describe": "Objektiv- und Kreativeffekte", + "cmd.render_library_preview": "Originale Oberflächentextur anzeigen", + "cmd.render_optics_bind": "Optische Einstellungen zuweisen", + "cmd.render_optics_unbind": "Zuweisung optischer Einstellungen entfernen", + "cmd.render_preset_apply": "Studio-Voreinstellung anwenden", + "cmd.render_preset_resolve": "Studio-Voreinstellung überprüfen", + "cmd.render_quality_prepare": "Festes Sampling-Budget überprüfen", + "cmd.render_result_regrade": "Lineares Master-Rendering erneut farbkorrigieren", + "cmd.render_shot_duplicate": "Render-Aufnahme duplizieren", + "cmd.render_shot_remove": "Render-Aufnahme entfernen", + "cmd.render_shot_rename": "Render-Aufnahme umbenennen", + "cmd.sheet_path_flange": "Pfadflansch", + "cmd.sketch_cancel": "Skizze abbrechen", + "cmd.view_back": "Rückansicht", + "cmd.view_bottom": "Untersicht", + "cmd.view_front": "Vorderansicht", + "cmd.view_isometric": "Isometrische Ansicht", + "cmd.view_left": "Linke Seitenansicht", + "cmd.view_right": "Rechte Seitenansicht", + "cmd.view_top": "Draufsicht", + "diagnostic.empty_boolean_component": "In Komponente '{component}' gibt es keinen Körper zum Abziehen oder für eine Schnittmenge; das Werkzeug überschneidet sich eventuell mit '{body}' in Komponente '{other}' – aktivieren Sie diese Komponente oder wählen Sie den Körper als Ziel", + "document.changed_on_disk": "{name} wurde auf dem Datenträger geändert", + "document.changed_on_disk_detail": "{name} wurde seit dem Öffnen oder letzten Speichern von einem anderen Programm oder Computer geändert. „Überschreiben“ ersetzt diese Änderungen durch Ihre; „Kopie speichern“ behält beide.", + "document.copy_name": "{name} - Kopie", + "document.open_anyway": "Trotzdem öffnen", + "document.open_elsewhere": "{name} ist bereits geöffnet", + "document.open_elsewhere_detail": "{name} ist in SolidCraft {app} auf {who} geöffnet, seit {when}. Wenn Sie beide speichern, verliert einer von Ihnen Arbeit. Öffnen Sie die Datei schreibgeschützt, um sie anzusehen, ohne sie zu überschreiben.", + "document.open_read_only": "Schreibgeschützt öffnen", + "document.opened_read_only": "Schreibgeschützt geöffnet: Speichern fragt nach einer neuen Datei", + "document.overwrite": "Überschreiben", + "document.read_only_save": "Dieses Design wurde schreibgeschützt geöffnet: Speichern Sie es als neue Datei", + "document.save_copy": "Kopie speichern…", + "file.open.drawing_filter": "Designs, CAD-Dateien, Netze und Zeichnungen", + "file_load.link_item": "{name} ({done} von {total})", + "file_load.updating_links": "Verknüpfungen werden aktualisiert", + "from the profile": "aus dem Profil", + "help.connect_note": "Starten Sie jeden Assistenten neu, damit er den SolidCraft-Server lädt. Jede Datei wurde vor der Änderung als .bak gesichert.", + "help.connect_title": "KI-Assistenten verbinden", + "help.solid.chamfer": "Schneidet die gewählten Kanten mit einer ebenen Fase im eingestellten Abstand ab. Damit brechen Sie scharfe Kanten oder erleichtern das Einführen eines Stifts oder einer Schraube.", + "help.solid.combine": "Kombiniert Körper: vereinigt sie, zieht sie von einem Zielkörper ab oder behält nur das gemeinsame Volumen; die Werkzeugkörper können erhalten bleiben. Damit fügen Sie Teile zusammen, schneiden eine Form mit einer anderen aus oder finden, wo sich zwei Körper überschneiden.", + "help.solid.extrude": "Zieht ein Skizzenprofil über eine Strecke in die dritte Dimension und fügt dabei Material hinzu oder entfernt es. Damit machen Sie aus einer flachen Kontur einen Block, eine Erhebung oder eine Tasche.", + "help.solid.fillet": "Rundet die gewählten Kanten mit einem glatten Kreisübergang im eingestellten Radius ab. Damit entschärfen Sie scharfe Kanten für Festigkeit, Griffigkeit oder Optik.", + "help.solid.hole": "Bohrt an einem gewählten Punkt auf einer Fläche ein rundes Loch im eingestellten Durchmesser. Für Durchgangsbohrungen für Schrauben, Stifte und andere einfache runde Öffnungen.", + "help.solid.loft": "Erzeugt einen glatten Übergangskörper zwischen zwei oder mehr Skizzenprofilen oder von einem Profil zu einem Punkt. Für Übergänge, Trichter, Griffe und alle Formen, deren Querschnitt sich über die Länge ändert.", + "help.solid.mirror": "Erzeugt eine gespiegelte Kopie der gewählten Körper oder Features an einer Ebene und kann sie mit dem Original vereinigen. Für symmetrische Teile: Sie modellieren eine Hälfte und erhalten beide.", + "help.solid.pattern.circular": "Wiederholt die gewählten Objekte um eine Achse, mit der eingestellten Anzahl und dem Gesamtwinkel. Für Lochkreise, Speichen, Kühlrippen und Zähne.", + "help.solid.pattern.rectangular": "Wiederholt die gewählten Objekte in einer oder zwei Richtungen mit der eingestellten Anzahl und dem Abstand. Für Reihen und Raster von Bohrungen, Rippen, Stiften oder Füßen.", + "help.solid.revolve": "Dreht ein Skizzenprofil um eine Achse und erzeugt so einen runden Körper. Für Wellen, Knöpfe, Schalen und alle Teile, die um eine Mittellinie rund sind.", + "help.solid.shell": "Höhlt einen Körper aus, lässt Wände in der eingestellten Dicke stehen und kann gewählte Flächen öffnen. Für Kästen, Deckel und andere dünnwandige Teile.", + "help.solid.sweep": "Führt ein Skizzenprofil entlang eines Pfads und erzeugt so einen Körper. Für Rohre, Schienen, Griffe und alle Teile mit gleichbleibendem Querschnitt entlang einer Kurve.", + "joint.rigid_group_one_component": "Diese {count} Körper liegen alle in einer Komponente (oder direkt im Design): Verwenden Sie zuerst {command}.", + "joint.rigid_group_select_components": "Wählen Sie zwei oder mehr Komponenten aus.", + "material.editor.add_property": "Eigenschaft hinzufügen", + "material.editor.add_source": "Quelle hinzufügen", + "material.editor.assigned_density": "Zugewiesene Dichte", + "material.editor.axes": "Materialachsen", + "material.editor.copy_name": "Kopie von {name}", + "material.editor.density_range": "Die zugewiesene Dichte muss größer als 0 und höchstens 1000 g/cm³ sein.", + "material.editor.designation": "Bezeichnung", + "material.editor.duplicate": "Duplizieren", + "material.editor.engineering_card": "Technisches Datenblatt", + "material.editor.family": "Werkstoffgruppe", + "material.editor.glass": "Glas", + "material.editor.illustrative": "Beispielwerte", + "material.editor.invalid_property": "Nicht unterstützter Eigenschaftstyp.", + "material.editor.isotropic": "Isotrop", + "material.editor.measurement": "Messung", + "material.editor.metal": "Metall", + "material.editor.moisture": "Feuchte, bezogen auf Trockenmasse", + "material.editor.name_required": "Geben Sie einen Namen mit 1–128 Zeichen ein.", + "material.editor.no_draft": "Kein Materialentwurf geöffnet.", + "material.editor.number_required": "Geben Sie einen gültigen Zahlenwert ein.", + "material.editor.orthotropic": "Orthotrop", + "material.editor.other": "Sonstiges", + "material.editor.polymer": "Polymer", + "material.editor.preserved_appearance": "Beibehaltenes Erscheinungsbild", + "material.editor.public_reference": "Öffentliche Quelle", + "material.editor.reference": "Referenz", + "material.editor.save_or_discard": "Speichern oder verwerfen Sie den Materialentwurf, bevor Sie ein Material zuweisen.", + "material.editor.saved": "Material gespeichert. Körperzuweisungen bleiben unverändert.", + "material.editor.scope": "Speichern legt dieses Material ab, ohne es Körpern zuzuweisen. Leere Eigenschaften und Bedingungen bleiben unbekannt. Die Dichte im Datenblatt ändert weder die zugewiesene Dichte noch die Masse.", + "material.editor.source_id": "Quellen-ID", + "material.editor.source_kind": "Quellentyp", + "material.editor.source_title": "Quellentitel", + "material.editor.sources": "Quellen", + "material.editor.stale": "Dieses Material wurde geändert, während der Entwurf geöffnet war. Verwerfen und öffnen Sie es erneut, bevor Sie speichern.", + "material.editor.state": "Materialzustand", + "material.editor.strain_rate": "Dehnrate", + "material.editor.symmetry": "Elastische Symmetrie", + "material.editor.temperature": "Temperatur", + "material.editor.unknown_card": "Die technischen Eigenschaften sind unbekannt. Beim Speichern bleiben eventuell nur die zugewiesene Dichte und das vorhandene Erscheinungsbild erhalten.", + "material.editor.user_supplied": "Vom Benutzer angegeben", + "material.editor.wood": "Holz" + } +} From d1398e2c52a87da88eb01647c77704d279c44324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=B6pfl?= <44141543+Sebastion@users.noreply.github.com> Date: Tue, 27 Oct 2026 19:43:12 +0000 Subject: [PATCH 088/102] Evaluation: keep a sketch's frame bodies across evaluations that move nothing (#7814) A sketch on a face of a placed component is evaluated in that component's frame, so the evaluator moves (and meshes) the bodies placed differently into it. FrameBodies keeps those moved bodies, but every evaluate started a new generation and dropped what neither it nor the evaluation before it used. Evaluations that reuse every result never touch the cache, so two of them in a row emptied it: Delete refreshes the model three times (selection.delete's nested refresh, its own, then execute's), and the confirmation's dry run more, and an undo answered from the cache is another. The next edit of the sketch then moved and meshed every placed body again: in a design of ~3,500 imported bodies each sketch edit after a Delete took 46 s, 34-43 s of it tessellation. The generation now starts on the evaluation's first use of the cache, so an evaluation that moves nothing leaves it alone. It still holds at most two generations of moved bodies. Co-authored-by: Claude Opus 5.5 --- crates/doc/src/eval.rs | 22 +++++++++++++++++---- crates/doc/src/eval_cost_tests.rs | 33 +++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/crates/doc/src/eval.rs b/crates/doc/src/eval.rs index fab66f79c..85d7aa1c2 100644 --- a/crates/doc/src/eval.rs +++ b/crates/doc/src/eval.rs @@ -8306,26 +8306,39 @@ impl PlacedBodies { /// Bodies [`state_in_frame_at`] moved into a feature's frame, by source body and matrix: a /// sketch on a face of a turned component is evaluated in that component's frame, and without /// this every edit of it moved (and so meshed again) every body placed differently from it. -/// Held by the [`Model`] across evaluations; each `evaluate` starts a new generation, and an -/// entry neither it nor the evaluation before it used is dropped, so the cache holds only the -/// placements in use. +/// Held by the [`Model`] across evaluations; each `evaluate` that moves a body starts a new +/// generation, and an entry neither it nor the last such evaluation before it used is dropped, +/// so the cache holds only the placements in use. An evaluation that moves nothing (every +/// result reused, or taken from the cache: an undo, the refreshes a command makes after its +/// edit) leaves the generations alone: counting it, two of them in a row dropped every moved +/// body, and the next edit of the sketch moved and meshed them all again. #[derive(Debug, Default)] pub(crate) struct FrameBodies { now: PlacedBodies, before: PlacedBodies, + /// An evaluation began and has not used the cache yet: its first use starts the generation. + pending: bool, } impl FrameBodies { /// At most this many bodies are kept per generation. const CAP: usize = 4096; + /// An evaluation begins; its generation starts when it first moves a body. pub(crate) fn next_generation(&mut self) { - self.before = std::mem::take(&mut self.now); + self.pending = true; + } + + fn begin(&mut self) { + if std::mem::take(&mut self.pending) { + self.before = std::mem::take(&mut self.now); + } } /// The moved body for `b` under `m`, when a call in this or the previous generation moved /// the same body by the same matrix. fn reused(&mut self, b: &ModelBody, m: &crate::Mat) -> Option { + self.begin(); if let Some(placed) = self.now.reused(b, m) { return Some(placed.clone()); } @@ -8340,6 +8353,7 @@ impl FrameBodies { } fn keep(&mut self, b: &ModelBody, m: &crate::Mat, moved: &ModelBody) { + self.begin(); if self.now.by_source.len() < Self::CAP { self.now.by_source.insert(placed_key(b, m), (b.clone(), moved.clone())); } diff --git a/crates/doc/src/eval_cost_tests.rs b/crates/doc/src/eval_cost_tests.rs index c2af067f9..146b57416 100644 --- a/crates/doc/src/eval_cost_tests.rs +++ b/crates/doc/src/eval_cost_tests.rs @@ -226,8 +226,10 @@ fn a_sketch_on_a_face_still_sees_the_placed_bodies() { assert_eq!(work.digested, 0); } -#[test] -fn editing_a_sketch_on_a_turned_occurrence_reuses_its_frame_bodies() { +/// A sketch on a face of a plate placed turned (its own frame, so the plate is moved into it), +/// evaluated once: the design, its model, the plate's component, the sketch, its anchor and the +/// face picked. +fn sketch_on_a_turned_occurrence() -> (Document, Model, u64, u64, FaceAnchor, Plane) { use solidcraft_sketch::{LinkKind, LinkSource}; let mut doc = Document::new("turned face"); @@ -263,6 +265,12 @@ fn editing_a_sketch_on_a_turned_occurrence_reuses_its_frame_bodies() { let first = counted(|| model.evaluate(&doc)); assert!(first.moved > 0, "{first:?}"); assert!(model.result(id).unwrap().error.is_none(), "{:?}", model.result(id).unwrap().error); + (doc, model, comp, id, anchor, picked) +} + +#[test] +fn editing_a_sketch_on_a_turned_occurrence_reuses_its_frame_bodies() { + let (mut doc, model, comp, id, anchor, picked) = sketch_on_a_turned_occurrence(); let reopened = Model::adopt(&doc, &model.saved(&doc).unwrap()).unwrap(); for mut model in [model, reopened] { let before = state_in_face_anchor_frame(&doc, &model.state_before(id), &anchor, 0).unwrap().bodies.first().unwrap().mesh(); @@ -292,6 +300,27 @@ fn editing_a_sketch_on_a_turned_occurrence_reuses_its_frame_bodies() { } } +/// Evaluations between two edits of the sketch that move nothing (a delete refreshes the model +/// more than once, an undo can take its sketch from the cache) leave its frame bodies in place: +/// they once aged them out, and the next edit moved and meshed every placed body again, which +/// in a design of thousands of imported bodies took a minute per edit. +#[test] +fn evaluations_that_move_nothing_keep_the_frame_bodies() { + let (mut doc, mut model, _, id, _, _) = sketch_on_a_turned_occurrence(); + let edit = |doc: &mut Document, to: Vec2| doc.sketch_mut(id).unwrap().points.get_mut(1).unwrap().pos = to; + edit(&mut doc, Vec2::new(4., 5.)); + let work = counted(|| model.evaluate(&doc)); + assert_eq!(work.moved, 0, "{work:?}"); + for _ in 0..3 { + let work = counted(|| model.evaluate(&doc)); + assert_eq!((work.moved, model.last_recomputed), (0, 0), "{work:?}"); + } + edit(&mut doc, Vec2::new(6., 7.)); + let work = counted(|| model.evaluate(&doc)); + assert_eq!(model.last_recomputed, 1); + assert_eq!(work.moved, 0, "the edit after idle evaluations must reuse the moved plate: {work:?}"); +} + #[test] fn an_imported_file_is_fingerprinted_by_its_text() { let doc = placed_imports(2); From ebdc0bc07e72f0d95f4d61cfe570e05bfa69288e Mon Sep 17 00:00:00 2001 From: Dahak Builds Date: Tue, 27 Oct 2026 19:44:52 +0000 Subject: [PATCH 089/102] Assembly: deeply nested body selection no longer stalls the window (#7502) (#7694) * claim: #7502 * Assembly: name placed bodies from a per-design index, reveal the Browser from the body's path, evict cache entries singly (#7502) * Release the placement index before in-place document edits so pinning body names stays in place --------- Co-authored-by: Dahak Builds --- crates/engine/src/cmd/occurrence_tests.rs | 64 +++++++ crates/engine/src/lib.rs | 12 ++ crates/engine/src/occurrences.rs | 213 +++++++++++++++++++++- crates/ui-egui/src/browser.rs | 23 ++- 4 files changed, 300 insertions(+), 12 deletions(-) diff --git a/crates/engine/src/cmd/occurrence_tests.rs b/crates/engine/src/cmd/occurrence_tests.rs index 5b3c2df45..94d6bd928 100644 --- a/crates/engine/src/cmd/occurrence_tests.rs +++ b/crates/engine/src/cmd/occurrence_tests.rs @@ -1383,3 +1383,67 @@ fn a_body_seen_in_another_placement_copies_from_there() { let state = s.model.state(); assert_eq!(s.doc.model_body_component(state.body("Cube (2)").unwrap()), 0); } + +/// A nested assembly's body listing, and the indexed placement agreeing with the plain walk +/// (#7502: listing a subtree must cost the subtree, not the subtree times the design). +#[test] +fn occurrence_bodies_lists_a_nested_assembly() { + let mut s = Session::default(); + let (_outer, outer) = created(&mut s, "Outer"); + run(&mut s, "solid.box", json!({"length": 10, "width": 10, "height": 10, "body_name": "Shell"})); + let (_middle, middle) = created(&mut s, "Middle"); + run(&mut s, "solid.box", json!({"length": 2, "width": 2, "height": 2, "body_name": "Plate"})); + let (_inner, inner) = created(&mut s, "Inner"); + run(&mut s, "solid.box", json!({"length": 1, "width": 1, "height": 1, "body_name": "Pin"})); + let deep = [outer, middle, inner]; + let sorted = |v: Vec| { + let mut v = v; + v.sort(); + v + }; + assert_eq!(sorted(s.occurrence_bodies(&deep, true).unwrap()), ["Pin"]); + assert_eq!(sorted(s.occurrence_bodies(&[outer, middle], true).unwrap()), ["Pin", "Plate"]); + assert_eq!(sorted(s.occurrence_bodies(&[outer], true).unwrap()), ["Pin", "Plate", "Shell"]); + assert_eq!(sorted(s.occurrence_bodies(&[outer, middle], false).unwrap()), ["Plate"]); + // The indexed placement answers exactly what the plain walk does. + for path in [&deep[..], &[outer, middle][..], &[outer][..]] { + let (indexed, walked) = (s.occurrence_placement(path).unwrap(), s.occurrence_placement_walk(path).unwrap()); + assert_eq!(indexed.component, walked.component); + assert_eq!(indexed.name, walked.name); + assert_eq!(indexed.world, walked.world); + assert_eq!(indexed.bodies.len(), walked.bodies.len()); + for (a, b) in indexed.bodies.iter().zip(&walked.bodies) { + assert_eq!((a.source.as_str(), a.world.as_str()), (b.source.as_str(), b.world.as_str())); + } + } +} + +/// A burst of other paths retires single remembered answers instead of clearing the whole +/// cache, so the active occurrence's listing survives and needn't re-expand (#7502). +#[test] +fn occurrence_bodies_cache_retires_one_answer_when_full() { + let mut s = Session::default(); + let (_assembly, assembly) = created(&mut s, "Assembly"); + let (part, _) = created(&mut s, "Part"); + run(&mut s, "solid.box", json!({"length": 1, "width": 1, "height": 1, "body_name": "Part"})); + let mut copies = Vec::new(); + for i in 0..130 { + let o = run(&mut s, "occurrence.copy", json!({"component": part, "translate": [i as f64 * 10.0, 0.0, 0.0]}))["occurrence"].as_u64().unwrap(); + copies.push(o); + } + // The active listing (the whole assembly) is asked first and remembered. + let root = vec![assembly]; + assert_eq!(s.occurrence_bodies(&root, true).unwrap().len(), 131); + // Then a burst of per-copy queries: 260 more keys, over the cache's 256-entry limit. + for o in &copies { + let path = vec![assembly, *o]; + assert_eq!(s.occurrence_bodies(&path, false).unwrap().len(), 1); + assert_eq!(s.occurrence_bodies(&path, true).unwrap().len(), 1); + } + let guard = s.occurrence_bodies_cache.lock().unwrap(); + let cache = guard.as_ref().unwrap(); + assert!(cache.bodies.contains_key(&(root.clone(), true)), "the active listing survives a burst of other paths"); + assert!(cache.bodies.len() <= 256, "the cache stays bounded at its limit"); + drop(guard); + assert_eq!(s.occurrence_bodies(&root, true).unwrap().len(), 131); +} diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index 85600713b..4f7207088 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -386,6 +386,7 @@ pub struct Session { occurrence_visibility_cache: std::sync::Mutex>, removed_later_cache: std::sync::Mutex>, occurrence_bodies_cache: std::sync::Mutex>, + placement_index_cache: std::sync::Mutex>, /// Pairs `inspect.clearance` measured, by the bodies' geometry where they stood (shared with /// scratch copies): a body that did not change or move is not measured again. clearance_cache: std::sync::Arc>, @@ -575,6 +576,7 @@ impl Session { occurrence_visibility_cache: Default::default(), removed_later_cache: Default::default(), occurrence_bodies_cache: Default::default(), + placement_index_cache: Default::default(), clearance_cache: Default::default(), body_renames: Vec::new(), contact_meshes: Default::default(), @@ -721,6 +723,12 @@ impl Session { /// Mutable document (copy-on-write). pub fn doc_mut(&mut self) -> &mut Document { + // The placement index keeps the document alive with its answers; let it go before an + // in-place edit, so the edit stays in place (a shared handle would clone the document + // to a new address behind the crash journal's back, #7502) and no stale lookup outlives it. + if let Ok(mut index) = self.placement_index_cache.lock() { + *index = None; + } Arc::make_mut(&mut self.doc) } @@ -1106,6 +1114,9 @@ impl Session { } // Checked first: storing makes the document unique (a copy when the undo step shares it). if self.model.edited_sketches(&self.doc).next().is_some() { + if let Ok(mut index) = self.placement_index_cache.lock() { + *index = None; + } self.model.adopt_solved_sketches(Arc::make_mut(&mut self.doc)); } Ok(()) @@ -1357,6 +1368,7 @@ impl Session { occurrence_visibility_cache: Default::default(), removed_later_cache: Default::default(), occurrence_bodies_cache: Default::default(), + placement_index_cache: Default::default(), clearance_cache: self.clearance_cache.clone(), body_renames: self.body_renames.clone(), contact_meshes: self.contact_meshes.clone(), diff --git a/crates/engine/src/occurrences.rs b/crates/engine/src/occurrences.rs index a07b4a305..e63504777 100644 --- a/crates/engine/src/occurrences.rs +++ b/crates/engine/src/occurrences.rs @@ -39,12 +39,84 @@ pub(crate) struct OccurrenceBodiesCache { doc: std::sync::Arc, model: std::sync::Arc, pending_moves: std::collections::BTreeMap, - bodies: std::collections::HashMap<(Vec, bool), std::sync::Arc<[String]>>, + pub(crate) bodies: std::collections::HashMap<(Vec, bool), std::sync::Arc<[String]>>, } -/// How many placements' answers [`OccurrenceBodiesCache`] keeps before it starts again. +/// How many placements' answers [`OccurrenceBodiesCache`] keeps before retiring one for each +/// new one. const OCCURRENCE_BODIES_CACHED: usize = 256; +/// Placement identity for one document and evaluated model, worked out once per design: +/// occurrences by (parent, id), children per parent, bodies per component, and each placement +/// path already named. Listing a subtree then costs the subtree, not the subtree times the +/// design (#7502). Pending moves change a placement's matrices but never its component or its +/// bodies' names, so the index is keyed on the document and model alone. +pub(crate) struct PlacementIndex { + doc: std::sync::Arc, + state: std::sync::Arc, + /// The index into `doc.occurrences` of each (parent component, occurrence id). + by_parent_id: std::collections::HashMap<(u64, u64), usize>, + /// The occurrence ids of each parent component's children, in document order. + children: std::collections::HashMap>, + /// The source body names of each component. + bodies: std::collections::HashMap>, + /// The ids of the design's components. + components: std::collections::HashSet, + /// Each placement path already named: its bodies' world names. + placed: std::collections::HashMap, std::sync::Arc<[OccurrenceBody]>>, +} + +/// How many placement paths [`PlacementIndex`] names before it stops remembering more. +const PLACEMENT_PATHS_CACHED: usize = solidcraft_doc::MAX_PLACEMENTS; + +impl PlacementIndex { + fn new(doc: &std::sync::Arc, state: &std::sync::Arc) -> PlacementIndex { + let mut by_parent_id = std::collections::HashMap::with_capacity(doc.occurrences.len()); + let mut children: std::collections::HashMap> = std::collections::HashMap::new(); + for (i, o) in doc.occurrences.iter().enumerate() { + by_parent_id.insert((o.parent, o.id), i); + children.entry(o.parent).or_default().push(o.id); + } + let mut bodies: std::collections::HashMap> = std::collections::HashMap::new(); + for b in &state.bodies { + bodies.entry(doc.model_body_component(b)).or_default().push(b.name.clone()); + } + PlacementIndex { + doc: doc.clone(), + state: state.clone(), + by_parent_id, + children, + bodies, + components: doc.components.iter().map(|c| c.id).collect(), + placed: std::collections::HashMap::new(), + } + } + + fn matches(&self, session: &Session, model: &std::sync::Arc) -> bool { + std::sync::Arc::ptr_eq(&self.doc, &session.doc) && std::sync::Arc::ptr_eq(&self.state, model) + } + + /// The component's bodies named at `path`, remembered until the index is replaced. + fn bodies_at(&mut self, path: &[u64], component: u64) -> std::sync::Arc<[OccurrenceBody]> { + if let Some(bodies) = self.placed.get(path) { + return bodies.clone(); + } + let names = solidcraft_doc::WorldNames::new(&self.doc, &self.state); + let empty = Vec::new(); + let bodies: std::sync::Arc<[OccurrenceBody]> = self + .bodies + .get(&component) + .unwrap_or(&empty) + .iter() + .map(|source| OccurrenceBody { source: source.clone(), world: names.name(source, component, path) }) + .collect(); + if self.placed.len() < PLACEMENT_PATHS_CACHED { + self.placed.insert(path.to_vec(), bodies.clone()); + } + bodies + } +} + impl OccurrenceBodiesCache { fn matches(&self, session: &Session, model: &std::sync::Arc) -> bool { std::sync::Arc::ptr_eq(&self.doc, &session.doc) && std::sync::Arc::ptr_eq(&self.model, model) && self.pending_moves == session.pending_moves @@ -139,8 +211,72 @@ impl Session { } std::borrow::Cow::Owned(doc) } - /// Resolve only the supplied path, never an exponentially expanded assembly. + /// Resolve only the supplied path, never an exponentially expanded assembly. The placement + /// index answers from lookups; the plain walk stays as the fallback and the error reporter. pub fn occurrence_placement(&self, path: &[u64]) -> Result { + if path.is_empty() || path.len() > 64 { + return Err(invalid("occurrence path must contain 1..64 ids")); + } + if let Some(placement) = self.occurrence_placement_indexed(path) { + return Ok(placement); + } + self.occurrence_placement_walk(path) + } + + /// [`Self::occurrence_placement`] through [`PlacementIndex`]: the path walk multiplies + /// transforms as the plain walk does, but occurrences, components and body names are + /// lookups. `None` for any path the index can't answer, so the walk reports the exact error. + fn occurrence_placement_indexed(&self, path: &[u64]) -> Option { + let mut guard = self.placement_index()?; + let index = guard.as_mut()?; + let mut component = 0; + let mut world = IDENTITY; + let mut parent_world = IDENTITY; + let mut leaf = None; + for id in path { + let i = *index.by_parent_id.get(&(component, *id))?; + let o = &index.doc.occurrences[i]; + if !index.components.contains(&o.component) { + return None; + } + parent_world = world; + world = mat_mul(&world, self.pending_moves.get(id).unwrap_or(&o.transform)); + if world.iter().flatten().any(|x| !x.is_finite()) { + return None; + } + leaf = Some(i); + component = o.component; + } + let leaf = leaf?; + let bodies = index.bodies_at(path, component).to_vec(); + let leaf = &index.doc.occurrences[leaf]; + Some(OccurrencePlacement { + occurrence: leaf.id, + component, + path: path.to_vec(), + name: leaf.name.clone(), + world, + local: self.pending_moves.get(&leaf.id).copied().unwrap_or(leaf.transform), + parent_world, + grounded: leaf.grounded, + bodies, + }) + } + + /// The placement index for the current document and model, built on first use. + fn placement_index(&self) -> Option>> { + let model = self.model.state(); + let mut guard = self.placement_index_cache.lock().ok()?; + let index = guard.get_or_insert_with(|| PlacementIndex::new(&self.doc, &model)); + if !index.matches(self, &model) { + *index = PlacementIndex::new(&self.doc, &model); + } + Some(guard) + } + + /// The plain walk over `doc.occurrences`, kept as the fallback for paths the index can't + /// answer and as the reference the indexed answers are checked against (#7502). + pub(crate) fn occurrence_placement_walk(&self, path: &[u64]) -> Result { if path.is_empty() || path.len() > 64 { return Err(invalid("occurrence path must contain 1..64 ids")); } @@ -223,7 +359,7 @@ impl Session { } let bodies: std::sync::Arc<[String]> = self.expand_occurrence_bodies(path, descendants)?.into(); if let Ok(mut cache) = self.occurrence_bodies_cache.lock() { - if cache.as_ref().is_none_or(|c| !c.matches(self, &model) || c.bodies.len() >= OCCURRENCE_BODIES_CACHED) { + if cache.as_ref().is_none_or(|c| !c.matches(self, &model)) { *cache = Some(OccurrenceBodiesCache { doc: self.doc.clone(), model, @@ -232,6 +368,15 @@ impl Session { }); } if let Some(cache) = cache.as_mut() { + if !cache.bodies.contains_key(&key) && cache.bodies.len() >= OCCURRENCE_BODIES_CACHED { + // Retire one remembered answer, not the whole cache: a burst of other + // paths (a Browser reveal, a hover) no longer evicts the active + // occurrence's entry and forces a full re-expansion on the next + // highlight build (#7502). + if let Some(evict) = cache.bodies.keys().next().cloned() { + cache.bodies.remove(&evict); + } + } cache.bodies.insert(key, bodies.clone()); } } @@ -239,6 +384,9 @@ impl Session { } fn expand_occurrence_bodies(&self, path: &[u64], descendants: bool) -> Result> { + if let Some(out) = self.expand_occurrence_bodies_indexed(path, descendants) { + return Ok(out); + } let mut stack = vec![self.occurrence_placement(path)?]; let mut out = Vec::new(); let mut count = 0; @@ -255,6 +403,63 @@ impl Session { Ok(out) } + /// [`Self::expand_occurrence_bodies`] through [`PlacementIndex`]: children and bodies are + /// lookups and each path is named once, so a listing costs the subtree's size, not the + /// subtree times the design (#7502). `None` when the index can't answer (a lock miss, an + /// invalid path, a cycle or a design over the limits), so the walk reports the exact error. + fn expand_occurrence_bodies_indexed(&self, path: &[u64], descendants: bool) -> Option> { + if path.is_empty() { + return None; + } + let mut guard = self.placement_index()?; + let index = guard.as_mut()?; + let mut component = 0; + let mut world = IDENTITY; + for id in path { + let i = *index.by_parent_id.get(&(component, *id))?; + let o = &index.doc.occurrences[i]; + if !index.components.contains(&o.component) { + return None; + } + world = mat_mul(&world, self.pending_moves.get(id).unwrap_or(&o.transform)); + if world.iter().flatten().any(|x| !x.is_finite()) { + return None; + } + component = o.component; + } + let mut stack = vec![(path.to_vec(), component, world)]; + let mut out = Vec::new(); + let mut count = 0; + while let Some((path, component, world)) = stack.pop() { + count += 1; + let bodies = index.bodies_at(&path, component); + if count > 100_000 || out.len() + bodies.len() > 100_000 { + return None; + } + out.extend(bodies.iter().map(|b| b.world.clone())); + if descendants && path.len() < 64 { + for child in index.children.get(&component).into_iter().flatten() { + if path.contains(child) { + return None; + } + let i = *index.by_parent_id.get(&(component, *child))?; + let o = &index.doc.occurrences[i]; + if !index.components.contains(&o.component) { + return None; + } + let child_world = mat_mul(&world, self.pending_moves.get(child).unwrap_or(&o.transform)); + if child_world.iter().flatten().any(|x| !x.is_finite()) { + return None; + } + let mut next = path.clone(); + next.push(*child); + stack.push((next, o.component, child_world)); + } + } + } + Some(out) + } + /// The world names of the bodies `features` made (#5099), in every placement of their /// component, or only in `placement` (a component and the path of one of its placements). pub fn feature_bodies(&self, features: &[u64], placement: Option<(u64, &[u64])>) -> Vec { diff --git a/crates/ui-egui/src/browser.rs b/crates/ui-egui/src/browser.rs index f2fb8de10..a8720eb4a 100644 --- a/crates/ui-egui/src/browser.rs +++ b/crates/ui-egui/src/browser.rs @@ -731,9 +731,13 @@ pub(crate) fn reveal_pick(app: &mut SolveApp) { } } -/// Whether the body being revealed is in this placement or one below it: it opens. -fn reveals_in_occurrence(app: &SolveApp, path: &[u64]) -> bool { - app.tree.reveal.as_ref().is_some_and(|r| app.session.occurrence_bodies(path, true).is_ok_and(|bodies| bodies.contains(r))) +/// The placement path of the body being revealed, resolved once per model: a row opens when +/// the body's path runs through it, instead of every row expanding its subtree to test +/// containment (#7502). `None` when nothing is revealed or the body is a top-level design body. +fn reveal_path(app: &mut SolveApp) -> Option> { + let body = app.tree.reveal.clone()?; + prepare_model(app); + app.tree.model.as_mut()?.body_path(&app.session, &body) } pub(crate) fn is_open(app: &SolveApp, key: &str, default: bool) -> bool { @@ -1358,10 +1362,13 @@ fn component_rows_inner( root: &mut cache::Node, ) { let key = &root.key; - if let Some(body) = app.tree.reveal.as_ref() - && (cache.root_bodies.contains(body) || root.children.iter().any(|path| reveals_in_occurrence(app, path))) - { - app.tree.collapsed.remove(key); + let reveal = app.tree.reveal.clone(); + if let Some(body) = reveal.as_ref() { + let reveals = + cache.root_bodies.contains(body) || reveal_path(app).is_some_and(|rp| root.children.iter().any(|path| rp.starts_with(path.as_slice()))); + if reveals { + app.tree.collapsed.remove(key); + } } let open = is_open(app, key, true); let active = app.session.active_component == id; @@ -1497,7 +1504,7 @@ fn occurrence_rows_inner( placement: &mut cache::Node, ) { let key = &placement.key; - if reveals_in_occurrence(app, path) { + if reveal_path(app).is_some_and(|rp| rp.starts_with(path)) { app.tree.collapsed.remove(key); } let open = is_open(app, key, true); From e0e2c566e7f988e84c6ab9d1f1b1edf553903f31 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 20:01:40 +0000 Subject: [PATCH 090/102] Viewport: clear new resolve targets so AMD Direct3D 12 shows the scene (#6828) (#7399) * claim: #6828 * Viewport: clear new resolve targets so AMD Direct3D 12 shows the scene (#6828) With anti-aliasing above 1x the scene is drawn multisampled and resolved into textures that nothing but the resolve writes. wgpu counts the resolve as their first write and never clears them. Direct3D 12 requires a render target placed in reused memory to be cleared, discarded or copied over first, and some AMD Radeon drivers then show the uncleared texture as transparent, a flat colour or speckles: no grid, origin planes or bodies (#6828, #7157, #6613, #7052). Each new resolve texture (the frame's colour and the see-through sums) is now cleared once when it is made. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/gpu/src/view.rs | 88 +++++++++++++++++++++++++++++++++++++- crates/gpu/src/view/oit.rs | 7 +++ 2 files changed, 94 insertions(+), 1 deletion(-) diff --git a/crates/gpu/src/view.rs b/crates/gpu/src/view.rs index 2ae93b40f..701c81660 100644 --- a/crates/gpu/src/view.rs +++ b/crates/gpu/src/view.rs @@ -2055,6 +2055,9 @@ pub struct Renderer { /// The scene target's depth back to the far plane between the section's marking and push /// passes ([`Cut`]); stencil and colour untouched. section_reset: Option, + /// The new resolve textures [`clear_resolve_targets`] has cleared (tests count them). + #[cfg(test)] + resolve_clears: u32, } /// A triangle over the whole viewport at the far plane's depth (`FAR`), writing no colour: @@ -2851,6 +2854,8 @@ impl Renderer { ao: ao.join(), depth_reset, section_reset, + #[cfg(test)] + resolve_clears: 0, target: GpuTarget { oit: oit.is_some(), ..t }, window, max_texture: device.limits().max_texture_dimension_2d, @@ -3798,6 +3803,11 @@ impl Renderer { self.ss = None; match allocated(device, || self.supersampled(device, size)) { Ok(ss) => { + let _cleared = clear_resolve_targets(encoder, ss.resolve.as_ref()); + #[cfg(test)] + { + self.resolve_clears += _cleared; + } self.ss = Some(ss); drawn = Some((size, filtered)); break; @@ -3817,7 +3827,14 @@ impl Renderer { if see_through && self.oit_targets.as_ref().is_none_or(|t| t.size != size) { self.oit_targets = None; match self.oit.as_ref().map(|p| allocated(device, || p.targets(device, size, samples))) { - Some(Ok(targets)) => self.oit_targets = Some(targets), + Some(Ok(targets)) => { + let _cleared = clear_resolve_targets(encoder, targets.resolves()); + #[cfg(test)] + { + self.resolve_clears += _cleared; + } + self.oit_targets = Some(targets); + } Some(Err(e)) => { log::warn!("see-through surfaces are sorted: the GPU refused their {} × {} targets: {e}", size[0], size[1]); self.oit = None; @@ -3924,6 +3941,32 @@ impl Renderer { } } +/// Clear new textures that only a multisample resolve writes (the frame's resolved colour, the +/// see-through surfaces' resolved sums), once, before their first resolve; how many it cleared. +/// Direct3D 12 requires a render target placed in reused memory to be cleared, discarded or +/// copied over before anything else uses it. A resolve is none of these, but wgpu counts it as +/// the texture's first write and never clears it. Some AMD Radeon drivers then kept that memory's +/// old compression state, and the multisampled scene showed as nothing at all (no grid, origin +/// planes or bodies), a flat colour or speckles (#6828, #7157, #6613, #7052). At 1x the scene is +/// drawn into a texture its own pass clears, which is why 1x anti-aliasing showed it. +fn clear_resolve_targets<'a>(encoder: &mut wgpu::CommandEncoder, views: impl IntoIterator) -> u32 { + let mut cleared = 0; + for view in views { + encoder.begin_render_pass(&wgpu::RenderPassDescriptor { + label: Some("sc_resolve_clear"), + color_attachments: &[Some(wgpu::RenderPassColorAttachment { + view, + depth_slice: None, + resolve_target: None, + ops: wgpu::Operations { load: wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT), store: wgpu::StoreOp::Store }, + })], + ..Default::default() + }); + cleared += 1; + } + cleared +} + /// Which part of a frame [`Renderer::draw`] draws. #[derive(Clone, Copy, PartialEq, Eq, Debug)] enum Phase { @@ -4740,6 +4783,49 @@ mod glass_tests { } } + /// A multisampled scene is resolved into textures nothing else writes. Direct3D 12 needs such a + /// texture cleared before its first use, and on some AMD Radeon cards an uncleared one showed + /// the scene as nothing at all: no grid, origin planes or bodies (#6828, #7157). Each new + /// resolve texture is cleared once when it is made (not every frame), and the picture shows. + #[test] + fn new_resolve_targets_are_cleared_before_their_first_resolve() { + let Some((adapter, device, queue)) = crate::open_headless().ok() else { return }; + let depth = crate::depth_format(&device, true); + let format = wgpu::TextureFormat::Rgba8Unorm; + if ![format, depth].iter().all(|f| adapter.get_texture_format_features(*f).flags.sample_count_supported(4)) { + return; + } + let window = GpuTarget { format, depth: None, samples: 1, tess: false, oit: false }; + let mut r = Renderer::with_window_target(&device, GpuTarget { depth: Some(depth), samples: 4, ..window }, window, None); + let middle = |pixels: &[u8]| -> [i32; 4] { + let at = (32 * 64 + 32) * 4; + std::array::from_fn(|i| pixels.get(at + i).map_or(-1, |v| i32::from(*v))) + }; + let mut frame = test_frame(test_scene(), 1.0); + let shown = middle(&render_frame(&mut r, &device, &queue, &frame, false)); + assert!(shown[0] > 200 && shown[1] < 60, "the multisampled scene shows its red triangle: {shown:?}"); + assert_eq!(r.resolve_clears, 1, "the new frame's resolved colour is cleared first"); + frame.view_proj[3][0] += 0.25; + render_frame(&mut r, &device, &queue, &frame, false); + assert_eq!(r.resolve_clears, 1, "a frame of the same size keeps its textures and clears nothing"); + // Supersampled: a larger frame, so new textures, cleared again. + render_frame(&mut r, &device, &queue, &test_frame(test_scene(), 2.0), false); + assert_eq!(r.resolve_clears, 2, "the supersampled frame's new resolved colour is cleared first"); + // See-through surfaces: the order-independent transparency's resolved sums too. + if r.oit.is_some() { + // A new scene key, so the renderer takes the see-through scene instead of keeping its own. + let glass = Frame { key: 2, ..test_frame(two_layers([220, 40, 40, 128], [40, 40, 220, 128], true), 1.0) }; + render_frame(&mut r, &device, &queue, &glass, false); + assert!(r.model.see_through() && r.oit_targets.is_some(), "the see-through frame is drawn with order-independent transparency"); + assert_eq!(r.resolve_clears, 5, "the frame's colour and both see-through sums are cleared first"); + } + // One sample: the scene's own pass clears the texture it draws into, and nothing is resolved. + let mut single = Renderer::with_window_target(&device, GpuTarget { depth: Some(depth), samples: 1, ..window }, window, None); + render_frame(&mut single, &device, &queue, &test_frame(test_scene(), 1.0), false); + assert!(single.ss_ready, "the 1x scene is drawn offscreen too"); + assert_eq!(single.resolve_clears, 0, "at one sample no texture is resolved into"); + } + /// The Render workspace's preview once painted the modelling viewport's last frame instead of /// its own (#5119): after a frame with see-through surfaces, drawn offscreen for /// order-independent transparency, it stayed frozen on that frame whatever the camera did. diff --git a/crates/gpu/src/view/oit.rs b/crates/gpu/src/view/oit.rs index 27bd99a45..2406df9d2 100644 --- a/crates/gpu/src/view/oit.rs +++ b/crates/gpu/src/view/oit.rs @@ -56,6 +56,13 @@ pub(super) struct Targets { bind: wgpu::BindGroup, } +impl Targets { + /// The textures only the resolve writes (none at one sample), which a new frame clears first. + pub fn resolves(&self) -> impl Iterator { + self.accum_resolve.iter().chain(&self.reveal_resolve) + } +} + impl Pipelines { /// The pipelines for frames of `format` with `depth` and `samples`, using the viewport's /// shader `module` and uniform `layout`; `None` where the device cannot blend into a float From d2f0627421d36eddb94ce2f470f01170b64984a5 Mon Sep 17 00:00:00 2001 From: raykholo Date: Tue, 27 Oct 2026 20:08:12 +0000 Subject: [PATCH 091/102] Follow a theme file and reload it when it changes (#7573) (#7574) * claim: #7573 * Follow a theme file and reload it when it changes (#7573) * Translate the follow-a-theme-file strings --- apps/solidcraft/src/main.rs | 12 +- assets/locales/pending/theme-follow.json | 226 ++++++++++++++++++++++ crates/ui-egui/src/prefs.rs | 227 ++++++++++++++++++++++- crates/ui-egui/src/prefs/interface.rs | 4 + crates/ui-egui/src/theme_files.rs | 182 ++++++++++++++++++ docs/book/src/guide/ui-tour.md | 14 ++ docs/control-protocol.md | 2 +- 7 files changed, 659 insertions(+), 8 deletions(-) create mode 100644 assets/locales/pending/theme-follow.json diff --git a/apps/solidcraft/src/main.rs b/apps/solidcraft/src/main.rs index 74d835da5..4045f1f73 100644 --- a/apps/solidcraft/src/main.rs +++ b/apps/solidcraft/src/main.rs @@ -750,11 +750,14 @@ fn main() -> eframe::Result { let mut control_port: Option = solidcraft_engine::geom::env::var("CONTROL_PORT").and_then(|p| p.parse().ok()); let mut files = Vec::new(); let mut sample = false; + // `--theme-file PATH`: follow that theme file for this run without saving it (#7573). + let mut theme_file: Option = None; let mut args = std::env::args().skip(1); while let Some(a) = args.next() { match a.as_str() { "--control" => control_port = args.next().and_then(|p| p.parse().ok()), "--sample" => sample = true, + "--theme-file" => theme_file = args.next(), "--safe-mode" => safe_mode = true, "--version" | "-V" => { println!("solidcraft {}", env!("CARGO_PKG_VERSION")); @@ -774,7 +777,9 @@ fn main() -> eframe::Result { return Ok(()); } "--help" | "-h" => { - println!("usage: solidcraft [--control PORT] [--sample] [--crash-log] [--safe-mode] [design.solidcraft | part.step]"); + println!( + "usage: solidcraft [--control PORT] [--sample] [--theme-file THEME.json] [--crash-log] [--safe-mode] [design.solidcraft | part.step]" + ); return Ok(()); } _ => files.push(a), @@ -926,6 +931,11 @@ fn main() -> eframe::Result { if let Some(p) = cc.storage.and_then(|s| solidcraft_ui_egui::prefs::stored(|k| s.get_string(k))).filter(|_| !safe_mode) { app.load_prefs(&p); } + if let Some(path) = &theme_file + && let Err(e) = solidcraft_ui_egui::prefs::follow_theme_file_for_run(&mut app, path) + { + app.set_status(format!("--theme-file: {e}"), true); + } mark("app state and prefs"); let gpu = cc.wgpu_render_state.as_ref().map(|rs| LostWatch { lost: rs.device_lost.clone(), diff --git a/assets/locales/pending/theme-follow.json b/assets/locales/pending/theme-follow.json new file mode 100644 index 000000000..134e0d649 --- /dev/null +++ b/assets/locales/pending/theme-follow.json @@ -0,0 +1,226 @@ +{ + "en": { + "prefs.theme_follow": "Follow a theme file", + "prefs.theme_follow_error": "Not applied: {error}. The last good theme stays on.", + "prefs.theme_follow_launch": "Followed for this run only (--theme-file); reloaded whenever another tool rewrites it.", + "prefs.theme_follow_note": "Reloaded whenever another tool rewrites it. Choosing a theme stops following it.", + "prefs.theme_follow_off": "Off", + "prefs.theme_follow_stop": "Stop following" + }, + "ar": { + "prefs.theme_follow": "اتباع ملف سمة", + "prefs.theme_follow_error": "لم يُطبّق: {error}. تبقى آخر سمة سليمة مفعّلة.", + "prefs.theme_follow_launch": "يُتّبع لهذه الجلسة فقط (--theme-file)؛ يُعاد تحميله كلما أعادت أداة أخرى كتابته.", + "prefs.theme_follow_note": "يُعاد تحميله كلما أعادت أداة أخرى كتابته. اختيار سمة يوقف اتباعه.", + "prefs.theme_follow_off": "إيقاف", + "prefs.theme_follow_stop": "إيقاف الاتباع" + }, + "cs": { + "prefs.theme_follow": "Sledovat soubor motivu", + "prefs.theme_follow_error": "Nepoužito: {error}. Zůstává poslední funkční motiv.", + "prefs.theme_follow_launch": "Sledování jen pro toto spuštění (--theme-file); načte se znovu při každém přepsání jiným nástrojem.", + "prefs.theme_follow_note": "Načte se znovu při každém přepsání jiným nástrojem. Výběr motivu sledování ukončí.", + "prefs.theme_follow_off": "Vypnuto", + "prefs.theme_follow_stop": "Ukončit sledování" + }, + "da": { + "prefs.theme_follow": "Følg en temafil", + "prefs.theme_follow_error": "Ikke anvendt: {error}. Det seneste gyldige tema bevares.", + "prefs.theme_follow_launch": "Følges kun denne gang (--theme-file); genindlæses, når et andet værktøj overskriver filen.", + "prefs.theme_follow_note": "Genindlæses, når et andet værktøj overskriver filen. Valg af et tema stopper dette.", + "prefs.theme_follow_off": "Fra", + "prefs.theme_follow_stop": "Stop med at følge" + }, + "de": { + "prefs.theme_follow": "Einer Designdatei folgen", + "prefs.theme_follow_error": "Nicht angewendet: {error}. Das letzte gültige Design bleibt aktiv.", + "prefs.theme_follow_launch": "Nur für diesen Start (--theme-file); wird neu geladen, sobald ein anderes Werkzeug die Datei überschreibt.", + "prefs.theme_follow_note": "Wird neu geladen, sobald ein anderes Werkzeug die Datei überschreibt. Die Auswahl eines Designs beendet das Folgen.", + "prefs.theme_follow_off": "Aus", + "prefs.theme_follow_stop": "Nicht mehr folgen" + }, + "es": { + "prefs.theme_follow": "Seguir un archivo de tema", + "prefs.theme_follow_error": "No aplicado: {error}. Se mantiene el último tema válido.", + "prefs.theme_follow_launch": "Solo en esta sesión (--theme-file); se recarga cada vez que otra herramienta reescribe el archivo.", + "prefs.theme_follow_note": "Se recarga cada vez que otra herramienta reescribe el archivo. Elegir un tema deja de seguirlo.", + "prefs.theme_follow_off": "Desactivado", + "prefs.theme_follow_stop": "Dejar de seguir" + }, + "fr": { + "prefs.theme_follow": "Suivre un fichier de thème", + "prefs.theme_follow_error": "Non appliqué : {error}. Le dernier thème valide reste actif.", + "prefs.theme_follow_launch": "Suivi pour cette session uniquement (--theme-file) ; rechargé dès qu’un autre outil réécrit le fichier.", + "prefs.theme_follow_note": "Rechargé dès qu’un autre outil réécrit le fichier. Choisir un thème arrête le suivi.", + "prefs.theme_follow_off": "Désactivé", + "prefs.theme_follow_stop": "Arrêter le suivi" + }, + "gl": { + "prefs.theme_follow": "Seguir un ficheiro de tema", + "prefs.theme_follow_error": "Non aplicado: {error}. Mantense o último tema válido.", + "prefs.theme_follow_launch": "Só nesta sesión (--theme-file); vólvese cargar cando outra ferramenta reescribe o ficheiro.", + "prefs.theme_follow_note": "Vólvese cargar cando outra ferramenta reescribe o ficheiro. Escoller un tema detén o seguimento.", + "prefs.theme_follow_off": "Desactivado", + "prefs.theme_follow_stop": "Deixar de seguir" + }, + "he": { + "prefs.theme_follow": "מעקב אחר קובץ ערכת נושא", + "prefs.theme_follow_error": "לא הוחל: {error}. ערכת הנושא התקינה האחרונה נשארת פעילה.", + "prefs.theme_follow_launch": "מעקב להפעלה זו בלבד (--theme-file); נטען מחדש בכל פעם שכלי אחר משכתב את הקובץ.", + "prefs.theme_follow_note": "נטען מחדש בכל פעם שכלי אחר משכתב את הקובץ. בחירת ערכת נושא מפסיקה את המעקב.", + "prefs.theme_follow_off": "כבוי", + "prefs.theme_follow_stop": "הפסקת המעקב" + }, + "hu": { + "prefs.theme_follow": "Témafájl követése", + "prefs.theme_follow_error": "Nem alkalmazható: {error}. Az utolsó érvényes téma marad aktív.", + "prefs.theme_follow_launch": "Követés csak erre a futásra (--theme-file); újratöltés, ha más eszköz felülírja a fájlt.", + "prefs.theme_follow_note": "Újratöltés, ha más eszköz felülírja a fájlt. Téma választása leállítja a követést.", + "prefs.theme_follow_off": "Ki", + "prefs.theme_follow_stop": "Követés leállítása" + }, + "id": { + "prefs.theme_follow": "Ikuti file tema", + "prefs.theme_follow_error": "Tidak diterapkan: {error}. Tema valid terakhir tetap aktif.", + "prefs.theme_follow_launch": "Diikuti hanya untuk sesi ini (--theme-file); dimuat ulang setiap kali alat lain menulis ulang file.", + "prefs.theme_follow_note": "Dimuat ulang setiap kali alat lain menulis ulang file. Memilih tema menghentikan pengikutan.", + "prefs.theme_follow_off": "Nonaktif", + "prefs.theme_follow_stop": "Berhenti mengikuti" + }, + "it": { + "prefs.theme_follow": "Segui un file di tema", + "prefs.theme_follow_error": "Non applicato: {error}. Resta attivo l’ultimo tema valido.", + "prefs.theme_follow_launch": "Seguito solo per questa sessione (--theme-file); ricaricato quando un altro strumento riscrive il file.", + "prefs.theme_follow_note": "Ricaricato quando un altro strumento riscrive il file. Scegliere un tema interrompe il monitoraggio.", + "prefs.theme_follow_off": "Disattivato", + "prefs.theme_follow_stop": "Smetti di seguire" + }, + "ja": { + "prefs.theme_follow": "テーマファイルに従う", + "prefs.theme_follow_error": "適用できません: {error}。最後に正常に適用されたテーマを維持します。", + "prefs.theme_follow_launch": "今回の起動時のみ有効です (--theme-file)。別のツールがファイルを書き換えるたびに再読み込みします。", + "prefs.theme_follow_note": "別のツールがファイルを書き換えるたびに再読み込みします。テーマを選ぶと追従を停止します。", + "prefs.theme_follow_off": "オフ", + "prefs.theme_follow_stop": "追従を停止" + }, + "ko": { + "prefs.theme_follow": "테마 파일 따르기", + "prefs.theme_follow_error": "적용되지 않음: {error}. 마지막으로 적용된 정상 테마를 유지합니다.", + "prefs.theme_follow_launch": "이번 실행에만 적용됩니다 (--theme-file). 다른 도구가 파일을 다시 쓸 때마다 다시 불러옵니다.", + "prefs.theme_follow_note": "다른 도구가 파일을 다시 쓸 때마다 다시 불러옵니다. 테마를 선택하면 따르기를 중지합니다.", + "prefs.theme_follow_off": "끄기", + "prefs.theme_follow_stop": "따르기 중지" + }, + "ms": { + "prefs.theme_follow": "Ikut fail tema", + "prefs.theme_follow_error": "Tidak digunakan: {error}. Tema sah terakhir kekal aktif.", + "prefs.theme_follow_launch": "Diikuti untuk sesi ini sahaja (--theme-file); dimuat semula setiap kali alat lain menulis semula fail.", + "prefs.theme_follow_note": "Dimuat semula setiap kali alat lain menulis semula fail. Memilih tema menghentikan ikutan.", + "prefs.theme_follow_off": "Mati", + "prefs.theme_follow_stop": "Berhenti mengikuti" + }, + "nb": { + "prefs.theme_follow": "Følg en temafil", + "prefs.theme_follow_error": "Ikke brukt: {error}. Det siste gyldige temaet forblir aktivt.", + "prefs.theme_follow_launch": "Følges bare denne kjøringen (--theme-file); lastes inn på nytt når et annet verktøy skriver om filen.", + "prefs.theme_follow_note": "Lastes inn på nytt når et annet verktøy skriver om filen. Valg av et tema stopper dette.", + "prefs.theme_follow_off": "Av", + "prefs.theme_follow_stop": "Slutt å følge" + }, + "nl": { + "prefs.theme_follow": "Een themabestand volgen", + "prefs.theme_follow_error": "Niet toegepast: {error}. Het laatste geldige thema blijft actief.", + "prefs.theme_follow_launch": "Alleen deze sessie gevolgd (--theme-file); opnieuw geladen zodra een ander hulpmiddel het bestand overschrijft.", + "prefs.theme_follow_note": "Opnieuw geladen zodra een ander hulpmiddel het bestand overschrijft. Een thema kiezen stopt het volgen.", + "prefs.theme_follow_off": "Uit", + "prefs.theme_follow_stop": "Volgen stoppen" + }, + "pl": { + "prefs.theme_follow": "Śledź plik motywu", + "prefs.theme_follow_error": "Nie zastosowano: {error}. Ostatni poprawny motyw pozostaje aktywny.", + "prefs.theme_follow_launch": "Śledzenie tylko w tej sesji (--theme-file); plik jest wczytywany ponownie po każdym nadpisaniu przez inne narzędzie.", + "prefs.theme_follow_note": "Plik jest wczytywany ponownie po każdym nadpisaniu przez inne narzędzie. Wybór motywu kończy śledzenie.", + "prefs.theme_follow_off": "Wyłączone", + "prefs.theme_follow_stop": "Zakończ śledzenie" + }, + "pt-BR": { + "prefs.theme_follow": "Seguir um arquivo de tema", + "prefs.theme_follow_error": "Não aplicado: {error}. O último tema válido continua ativo.", + "prefs.theme_follow_launch": "Seguido apenas nesta sessão (--theme-file); recarregado sempre que outra ferramenta reescreve o arquivo.", + "prefs.theme_follow_note": "Recarregado sempre que outra ferramenta reescreve o arquivo. Escolher um tema interrompe o acompanhamento.", + "prefs.theme_follow_off": "Desativado", + "prefs.theme_follow_stop": "Parar de seguir" + }, + "ro": { + "prefs.theme_follow": "Urmărește un fișier de temă", + "prefs.theme_follow_error": "Nu s-a aplicat: {error}. Ultima temă validă rămâne activă.", + "prefs.theme_follow_launch": "Urmărit doar în această sesiune (--theme-file); reîncărcat când alt instrument rescrie fișierul.", + "prefs.theme_follow_note": "Reîncărcat când alt instrument rescrie fișierul. Alegerea unei teme oprește urmărirea.", + "prefs.theme_follow_off": "Dezactivat", + "prefs.theme_follow_stop": "Oprește urmărirea" + }, + "ru": { + "prefs.theme_follow": "Следить за файлом темы", + "prefs.theme_follow_error": "Не применено: {error}. Последняя рабочая тема остаётся активной.", + "prefs.theme_follow_launch": "Только для этого запуска (--theme-file); перезагружается, когда другой инструмент перезаписывает файл.", + "prefs.theme_follow_note": "Перезагружается, когда другой инструмент перезаписывает файл. Выбор темы прекращает отслеживание.", + "prefs.theme_follow_off": "Выкл.", + "prefs.theme_follow_stop": "Прекратить отслеживание" + }, + "sv": { + "prefs.theme_follow": "Följ en temafil", + "prefs.theme_follow_error": "Inte tillämpat: {error}. Det senaste giltiga temat förblir aktivt.", + "prefs.theme_follow_launch": "Följs endast denna körning (--theme-file); läses in igen när ett annat verktyg skriver om filen.", + "prefs.theme_follow_note": "Läses in igen när ett annat verktyg skriver om filen. Att välja ett tema avslutar detta.", + "prefs.theme_follow_off": "Av", + "prefs.theme_follow_stop": "Sluta följa" + }, + "tr": { + "prefs.theme_follow": "Bir tema dosyasını takip et", + "prefs.theme_follow_error": "Uygulanmadı: {error}. Son geçerli tema etkin kalır.", + "prefs.theme_follow_launch": "Yalnızca bu çalıştırmada takip edilir (--theme-file); başka bir araç dosyayı yeniden yazdığında yeniden yüklenir.", + "prefs.theme_follow_note": "Başka bir araç dosyayı yeniden yazdığında yeniden yüklenir. Tema seçmek takibi durdurur.", + "prefs.theme_follow_off": "Kapalı", + "prefs.theme_follow_stop": "Takibi durdur" + }, + "uk": { + "prefs.theme_follow": "Стежити за файлом теми", + "prefs.theme_follow_error": "Не застосовано: {error}. Остання робоча тема залишається активною.", + "prefs.theme_follow_launch": "Лише для цього запуску (--theme-file); перезавантажується, коли інший інструмент перезаписує файл.", + "prefs.theme_follow_note": "Перезавантажується, коли інший інструмент перезаписує файл. Вибір теми припиняє відстеження.", + "prefs.theme_follow_off": "Вимк.", + "prefs.theme_follow_stop": "Припинити відстеження" + }, + "vi": { + "prefs.theme_follow": "Theo dõi tệp chủ đề", + "prefs.theme_follow_error": "Chưa áp dụng: {error}. Chủ đề hợp lệ gần nhất vẫn được giữ.", + "prefs.theme_follow_launch": "Chỉ theo dõi trong lần chạy này (--theme-file); tải lại mỗi khi công cụ khác ghi lại tệp.", + "prefs.theme_follow_note": "Tải lại mỗi khi công cụ khác ghi lại tệp. Chọn chủ đề sẽ dừng theo dõi.", + "prefs.theme_follow_off": "Tắt", + "prefs.theme_follow_stop": "Dừng theo dõi" + }, + "zh": { + "prefs.theme_follow": "跟随主题文件", + "prefs.theme_follow_error": "未应用:{error}。保留上次有效的主题。", + "prefs.theme_follow_launch": "仅本次运行跟随 (--theme-file);其他工具改写文件时会重新加载。", + "prefs.theme_follow_note": "其他工具改写文件时会重新加载。选择主题将停止跟随。", + "prefs.theme_follow_off": "关闭", + "prefs.theme_follow_stop": "停止跟随" + }, + "zh-TW": { + "prefs.theme_follow": "跟隨主題檔案", + "prefs.theme_follow_error": "未套用:{error}。保留上次有效的主題。", + "prefs.theme_follow_launch": "僅本次執行跟隨 (--theme-file);其他工具改寫檔案時會重新載入。", + "prefs.theme_follow_note": "其他工具改寫檔案時會重新載入。選擇主題將停止跟隨。", + "prefs.theme_follow_off": "關閉", + "prefs.theme_follow_stop": "停止跟隨" + }, + "en-GB": { + "prefs.theme_follow": "Follow a theme file", + "prefs.theme_follow_error": "Not applied: {error}. The last good theme stays on.", + "prefs.theme_follow_launch": "Followed for this run only (--theme-file); reloaded whenever another tool rewrites it.", + "prefs.theme_follow_note": "Reloaded whenever another tool rewrites it. Choosing a theme stops following it.", + "prefs.theme_follow_off": "Off", + "prefs.theme_follow_stop": "Stop following" + } +} diff --git a/crates/ui-egui/src/prefs.rs b/crates/ui-egui/src/prefs.rs index 74c11d614..887fdd1c6 100644 --- a/crates/ui-egui/src/prefs.rs +++ b/crates/ui-egui/src/prefs.rs @@ -629,6 +629,9 @@ preference_settings! { viewport_theme: crate::theme::ViewportTheme = crate::theme::ViewportTheme::Theme, PAGE_INTERFACE; /// Imported theme files (`theme_files`), kept here so they also work in the browser. custom_themes: Vec = Vec::new(); + /// Desktop: a `solidcraft-theme/1` file another tool writes, followed as the theme and + /// reloaded when it changes (#7573). Empty (the default): no file is followed. + theme_follow: String = String::new(), PAGE_INTERFACE; /// Interface language (a registered locale ID). language: String = "en".into(), 0; /// Shared workspace composition; system windows and popups retain their purpose. @@ -856,6 +859,80 @@ pub struct PrefsWindow { font_filter: String, /// Search text on the Plugins page. pub(crate) plugin_query: String, + /// The followed theme file's state (#7573): its last good theme and why a read failed. + pub(crate) follow: crate::theme_files::Follow, +} + +/// Following a theme file needs the file system: the desktop app only (#7573). +const FOLLOW_AVAILABLE: bool = cfg!(not(target_arch = "wasm32")); + +/// Follow `path` as the theme for this run (the `--theme-file` launch flag), without saving it. +pub fn follow_theme_file_for_run(app: &mut SolveApp, path: &str) -> Result<(), String> { + if !FOLLOW_AVAILABLE { + return Err(FOLLOW_UNAVAILABLE.into()); + } + let path = crate::theme_files::follow_path(path)?; + app.prefs_window.follow.launch = (!path.is_empty()).then_some(path); + Ok(()) +} + +const FOLLOW_UNAVAILABLE: &str = "`theme_follow` is not available in the browser: it follows a file on this computer; import the theme instead"; + +/// Stop following a theme file: the preference and this run's launch flag. The chosen theme +/// takes over again, with its own dark or light. +fn stop_following(app: &mut SolveApp) { + let following = !app.prefs_window.follow.path(&app.preferences.theme_follow).is_empty(); + app.preferences.theme_follow.clear(); + app.prefs_window.follow.launch = None; + if following { + let theme = app.preferences.theme.clone(); + select_theme(app, &theme); + } +} + +/// Look at the followed theme file (#7573): every second while the app runs and whenever the +/// window gains the focus. A new failure is reported once in the status bar; a recovery too. +fn follow_theme_file(app: &mut SolveApp, ctx: &egui::Context) { + if !FOLLOW_AVAILABLE { + return; + } + let (now, focused) = ctx.input(|i| (i.time, i.focused)); + let follow = &mut app.prefs_window.follow; + let gained_focus = focused && !follow.focused; + follow.focused = focused; + let path = follow.path(&app.preferences.theme_follow).to_string(); + let had_error = follow.error().is_some(); + match follow.poll(&path, now, gained_focus) { + crate::theme_files::FollowChange::None => {} + crate::theme_files::FollowChange::Loaded(name) => { + if had_error { + app.set_status(format!("Theme file loaded again: {name}"), false); + } + } + crate::theme_files::FollowChange::Failed(e) => app.set_status(format!("Theme file not applied: {e} (the last good theme stays on)"), true), + } + if !path.is_empty() { + ctx.request_repaint_after(std::time::Duration::from_secs_f64(crate::theme_files::FOLLOW_INTERVAL)); + } +} + +/// `ui.prefs` `theme_follow`: a path follows that file (read at once, so the reply has any +/// error), `""` stops following. +fn set_theme_follow(app: &mut SolveApp, value: &serde_json::Value, available: bool) -> Result<(), String> { + if !available { + return Err(FOLLOW_UNAVAILABLE.into()); + } + let path = value.as_str().ok_or("`theme_follow` must be a theme file's path, or \"\" to stop following")?; + let path = crate::theme_files::follow_path(path)?; + if path.is_empty() { + stop_following(app); + return Ok(()); + } + app.prefs_window.follow.launch = None; + app.preferences.theme_follow = path.clone(); + // Read now, so the reply has any error; the next frame's look then follows on as usual. + let _ = app.prefs_window.follow.poll(&path, f64::NEG_INFINITY, true); + Ok(()) } /// Open the dialog at a page. @@ -934,6 +1011,8 @@ impl Snapshot { /// and Remove (an imported theme). Like the other preferences, a choice applies at once. fn theme_row(app: &mut SolveApp, ui: &mut egui::Ui) { let mut choices = theme_choices(app); + // While a file is followed (#7573) it is the theme, so no tile shows as chosen. + let following = !app.prefs_window.follow.path(&app.preferences.theme_follow).is_empty(); choices.sort_by_key(|(id, _)| match id.as_str() { "light" => 0, "dark" => 1, @@ -965,13 +1044,13 @@ fn theme_row(app: &mut SolveApp, ui: &mut egui::Ui) { ui, label, Some(note), - app.preferences.theme == *id, + !following && app.preferences.theme == *id, true, ui_kit::PreferenceFigure::Theme { palette: palette.into(), system: id == "system" }, ); crate::scenario::publish_target(&format!("prefs:theme_tile:{id}"), response.rect); crate::scenario::publish_target(&format!("prefs:theme:{id}"), response.rect); - if app.preferences.theme == *id { + if !following && app.preferences.theme == *id { crate::scenario::publish_target("prefs:theme", response.rect); } if response.clicked() { @@ -1006,6 +1085,8 @@ fn theme_row(app: &mut SolveApp, ui: &mut egui::Ui) { action_theme = Some(id); } if let Some(id) = chosen { + // Choosing a theme stops following a file (#7573). + stop_following(app); select_theme(app, &id); } match action { @@ -1047,6 +1128,46 @@ fn theme_row(app: &mut SolveApp, ui: &mut egui::Ui) { } } +/// Settings › Interface › Theme: a theme file to follow (#7573), chosen with the file picker, +/// and why its last read was not applied. The desktop app only. +fn follow_row(app: &mut SolveApp, ui: &mut egui::Ui) { + let path = app.prefs_window.follow.path(&app.preferences.theme_follow).to_string(); + let launch = app.prefs_window.follow.launch.is_some(); + let error = app.prefs_window.follow.error().map(str::to_string); + let (mut choose, mut stop) = (false, false); + // The setting's name is longer than the label column: it leads the row's own line. + ui_kit::row(ui, "", |ui| { + ui.horizontal(|ui| { + ui_kit::text(ui, app.tr("prefs.theme_follow"), ui_kit::Text::Inline); + let choose_button = ui_kit::button(ui, app.tr_label("Choose…"), ui_kit::Button::Small); + crate::scenario::publish_target("prefs:theme_follow", choose_button.rect); + choose = choose_button.clicked(); + let stop_button = ui_kit::button(ui, app.tr("prefs.theme_follow_stop"), ui_kit::Button::Enabled(!path.is_empty())); + stop = stop_button.clicked(); + let name = std::path::Path::new(&path).file_name().map(|n| n.to_string_lossy().to_string()); + let shown = name.unwrap_or_else(|| app.tr("prefs.theme_follow_off").to_string()); + ui_kit::text(ui, &shown, ui_kit::Text::Inline).on_hover_text(&path); + }); + }); + if !path.is_empty() { + ui_kit::text(ui, app.tr(if launch { "prefs.theme_follow_launch" } else { "prefs.theme_follow_note" }), ui_kit::Text::Hint("theme_follow")); + } + if let Some(error) = error.filter(|_| !path.is_empty()) { + ui_kit::text(ui, &crate::i18n::format("prefs.theme_follow_error", &[("error", &error)]), ui_kit::Text::Error("theme_follow")); + } + if stop { + stop_following(app); + } + if choose { + app.pick_open_for(&["json"], |app, path| { + let Some(path) = path else { return }; + if let Err(e) = set_theme_follow(app, &serde_json::Value::String(path), FOLLOW_AVAILABLE) { + app.set_status(format!("Follow a theme file: {e}"), true); + } + }); + } +} + /// The interface font (#1290): the built-in font first, then the installed families, with a /// search box. The choice applies at once, like the other preferences. fn ui_font_row(app: &mut SolveApp, ui: &mut egui::Ui) { @@ -1094,6 +1215,7 @@ fn defaults(app: &mut SolveApp, page: usize) { set_autosave(app); } PAGE_INTERFACE => { + app.prefs_window.follow.launch = None; app.ui.dark = true; app.ui.layout = app.preferences.layout; app.ui.show_navigation_bar = true; @@ -1135,8 +1257,10 @@ pub fn apply(app: &mut SolveApp, ctx: &egui::Context) { { app.ui.dark = t == egui::Theme::Dark; } - // A theme file's palette, in place of its base's (dark or light); the visuals follow. - let file = crate::theme_files::find(&app.preferences.theme, &app.preferences.custom_themes); + // A theme file's palette, in place of its base's (dark or light); the visuals follow. A + // followed file (#7573) wins while it is followed and has read completely once. + follow_theme_file(app, ctx); + let file = app.prefs_window.follow.theme().or_else(|| crate::theme_files::find(&app.preferences.theme, &app.preferences.custom_themes)); if let Some(f) = file { app.ui.dark = f.base.is_dark(); } @@ -2076,8 +2200,10 @@ fn button_job_picker( /// presses OK, Cancel, Apply or Restore Defaults, `stand_up: true` answers the stand-up offer /// (`false` leaves the file as it is, like "Leave it"), `theme_import` (a theme file's JSON or /// text) adds a theme and turns it on, `theme_remove` (an id) removes an imported one and -/// `theme_export: true` returns the theme on now as `theme_file`; any other keys set -/// preferences. Returns them all, the open page, the offer and the theme ids. +/// `theme_export: true` returns the theme on now as `theme_file`, `theme_follow` (a path, or +/// `""` to stop) follows a theme file on the desktop (#7573); any other keys set preferences. +/// Returns them all, the open page, the offer, the theme ids and the followed file +/// (`theme_followed`, `theme_follow_error`). pub fn control(app: &mut SolveApp, p: &serde_json::Value) -> Result { let mut rest = p.as_object().cloned().unwrap_or_default(); if let Some(page) = rest.remove("open") { @@ -2100,6 +2226,12 @@ pub fn control(app: &mut SolveApp, p: &serde_json::Value) -> Result set_theme_follow(app, &v, FOLLOW_AVAILABLE)?, + // Choosing a theme stops following a file, as clicking a theme tile does. + None if rest.contains_key("theme") => stop_following(app), + None => {} + } let export = rest.remove("theme_export").and_then(|v| v.as_bool()).unwrap_or(false); let button = rest.remove("button"); let mut out = set(app, &serde_json::Value::Object(rest))?; @@ -2120,6 +2252,10 @@ pub fn control(app: &mut SolveApp, p: &serde_json::Value) -> Result>())); + let follow = &app.prefs_window.follow; + let followed = follow.path(&app.preferences.theme_follow); + o.insert("theme_followed".into(), json!((!followed.is_empty()).then_some(followed))); + o.insert("theme_follow_error".into(), json!(follow.error().filter(|_| !followed.is_empty()))); if let Some(id) = imported { o.insert("theme_imported".into(), json!(id)); } @@ -2352,6 +2488,12 @@ pub fn set(app: &mut SolveApp, p: &serde_json::Value) -> Result>().join(", "))); } @@ -3650,6 +3792,79 @@ mod tests { } } + #[test] + fn a_followed_theme_file_applies_reloads_keeps_the_last_good_theme_and_the_flag_is_not_saved() { + use crate::theme::Tokens; + use egui::Color32; + use serde_json::json; + let mut h = crate::scenario::Harness::new(); + assert_eq!(h.app.preferences.theme_follow, "", "off by default"); + let out = h.call("ui.prefs", json!({})); + assert!(out["result"]["theme_followed"].is_null() && out["result"]["theme_follow_error"].is_null(), "{out}"); + + let dir = std::env::temp_dir().join(format!("solidcraft-prefs-follow-{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + let file = dir.join("live.json"); + let path = file.to_string_lossy().to_string(); + let write = |panel: &str, extra: &str| { + let text = format!(r##"{{"format":"solidcraft-theme/1","name":"Live","base":"light","colors":{{"panel":"{panel}"{extra}}}}}"##); + std::fs::write(&file, text).unwrap(); + }; + write("#102030", ""); + let out = h.call("ui.prefs", json!({"theme_follow": path})); + assert_eq!( + (out["result"]["theme_follow"].as_str(), out["result"]["theme_followed"].as_str()), + (Some(path.as_str()), Some(path.as_str())), + "{out}" + ); + assert!(out["result"]["theme_follow_error"].is_null(), "{out}"); + h.frames(2); + assert_eq!(Tokens::get().panel, Color32::from_rgb(0x10, 0x20, 0x30)); + assert!(!h.app.ui.dark, "the file's base"); + + // Another tool rewrites it: reloaded within the poll interval, without a restart. + write("#405060", r##","accent":"#aa3300""##); + h.frames(70); + assert_eq!(Tokens::get().panel, Color32::from_rgb(0x40, 0x50, 0x60)); + + // Broken or missing: the last good theme stays on and the reply says why. + std::fs::write(&file, "{\"format\": \"solidcraft-theme/1\", \"na").unwrap(); + h.frames(70); + assert_eq!(Tokens::get().panel, Color32::from_rgb(0x40, 0x50, 0x60)); + let out = h.call("ui.prefs", json!({})); + assert!(out["result"]["theme_follow_error"].as_str().is_some_and(|e| e.contains("not a theme file")), "{out}"); + std::fs::remove_file(&file).unwrap(); + let out = h.call("ui.prefs", json!({"theme_follow": path})); + assert!(out["result"]["theme_follow_error"].as_str().is_some_and(|e| e.contains("can't read")), "{out}"); + + // Choosing a theme, or "", stops following. + let out = h.call("ui.prefs", json!({"theme": "dark"})); + assert!(out["result"]["theme_followed"].is_null() && out["result"]["theme_follow"] == "", "{out}"); + h.frames(2); + assert_eq!(Tokens::get().panel, Tokens::dark().panel); + + // The launch flag follows a file for this run only: the saved preferences never name it. + write("#708090", ""); + follow_theme_file_for_run(&mut h.app, &path).unwrap(); + h.frames(2); + assert_eq!(Tokens::get().panel, Color32::from_rgb(0x70, 0x80, 0x90)); + assert_eq!(h.call("ui.prefs", json!({}))["result"]["theme_followed"].as_str(), Some(path.as_str())); + assert_eq!(h.app.preferences.theme_follow, ""); + assert!(!h.app.prefs().contains("live.json")); + h.call("ui.prefs", json!({"theme_follow": ""})); + h.frames(2); + assert_eq!(Tokens::get().panel, Tokens::dark().panel); + + // Hostile values are refused; the browser has no files to follow. + assert!(h.call("ui.prefs", json!({"theme_follow": 5}))["error"].is_string()); + assert!(h.call("ui.prefs", json!({"theme_follow": "a\nb"}))["error"].is_string()); + assert!(h.call("ui.prefs", json!({"theme_follow": "x".repeat(5000)}))["error"].is_string()); + let web = set_theme_follow(&mut h.app, &json!(path), false).unwrap_err(); + assert!(web.contains("not available in the browser"), "{web}"); + assert_eq!(h.app.preferences.theme_follow, ""); + let _ = std::fs::remove_dir_all(&dir); + } + #[test] fn theme_files_import_apply_export_save_and_remove() { use crate::theme::{ColorVision, Tokens}; diff --git a/crates/ui-egui/src/prefs/interface.rs b/crates/ui-egui/src/prefs/interface.rs index ee2a6368c..bb0ed4f33 100644 --- a/crates/ui-egui/src/prefs/interface.rs +++ b/crates/ui-egui/src/prefs/interface.rs @@ -18,6 +18,10 @@ pub(super) fn interface(app: &mut SolveApp, ui: &mut egui::Ui, t: &Tokens) { app.preferences.viewport_theme = *view; } }); + // A theme file another tool writes, reloaded when it changes (#7573). + if FOLLOW_AVAILABLE { + follow_row(app, ui); + } }); }); ui_kit::settings_section(ui, "layout", app.tr("prefs.layout"), |ui| { diff --git a/crates/ui-egui/src/theme_files.rs b/crates/ui-egui/src/theme_files.rs index d877e6918..3cca0a7c3 100644 --- a/crates/ui-egui/src/theme_files.rs +++ b/crates/ui-egui/src/theme_files.rs @@ -694,6 +694,129 @@ pub fn add(custom: &mut Vec, mut theme: ThemeFile) -> Result, + /// The path the state below belongs to. + path: String, + /// The file's modified time and size at the last read. + stamp: Option<(Option, u64)>, + /// When (`egui` input time, seconds) the file was last looked at. + checked: Option, + /// The last theme that read completely. + theme: Option, + /// Why the last read was not applied. + error: Option, + /// Whether the window had the focus last frame (gaining it re-reads the file). + pub focused: bool, +} + +/// What a [`Follow::poll`] changed. +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum FollowChange { + /// Nothing new. + None, + /// The file read completely; its theme is on now. + Loaded(String), + /// A read failed for a new reason (reported once; the last good theme stays on). + Failed(String), +} + +/// A followed path as given: trimmed, at most [`MAX_FOLLOW_PATH`] bytes, no control characters. +pub fn follow_path(path: &str) -> Result { + let path = path.trim(); + if path.len() > MAX_FOLLOW_PATH || path.chars().any(char::is_control) { + return Err(format!("a followed theme file's path is at most {MAX_FOLLOW_PATH} bytes without control characters")); + } + Ok(path.to_string()) +} + +impl Follow { + /// The path followed now: the launch flag's, else the preference's (empty: none). + pub fn path<'a>(&'a self, preference: &'a str) -> &'a str { + match self.launch.as_deref().map(str::trim) { + Some(path) if !path.is_empty() => path, + _ => preference.trim(), + } + } + + /// The theme the followed file gave last, if any read completely. + pub fn theme(&self) -> Option<&ThemeFile> { + self.theme.as_ref() + } + + /// Why the followed file's last read was not applied. + pub fn error(&self) -> Option<&str> { + self.error.as_deref() + } + + /// Look at `path` (`now` in seconds): at most every [`FOLLOW_INTERVAL`] unless `force`, and + /// read it only when its modified time or size changed. An empty path stops following. + pub fn poll(&mut self, path: &str, now: f64, force: bool) -> FollowChange { + if path != self.path { + *self = Follow { launch: self.launch.take(), focused: self.focused, path: path.to_string(), ..Default::default() }; + } + if path.is_empty() { + return FollowChange::None; + } + let due = self.checked.is_none_or(|t| now - t >= FOLLOW_INTERVAL || now < t); + if !force && !due { + return FollowChange::None; + } + self.checked = Some(now); + match self.read(force) { + Ok(None) => FollowChange::None, + Ok(Some(theme)) => { + let name = theme.name.clone(); + self.theme = Some(theme); + self.error = None; + FollowChange::Loaded(name) + } + Err(e) if self.error.as_deref() == Some(e.as_str()) => FollowChange::None, + Err(e) => { + self.error = Some(e.clone()); + FollowChange::Failed(e) + } + } + } + + /// The file's theme when it changed since the last read (`Ok(None)`: unchanged). + fn read(&mut self, force: bool) -> Result, String> { + use std::io::Read; + let path = std::path::Path::new(&self.path); + let meta = std::fs::metadata(path).map_err(|e| format!("can't read {}: {e}", self.path))?; + if !meta.is_file() { + return Err(format!("{} is not a file", self.path)); + } + if meta.len() > MAX_BYTES as u64 { + return Err(format!("a theme file is at most {} KiB", MAX_BYTES / 1024)); + } + let stamp = (meta.modified().ok(), meta.len()); + if !force && self.stamp == Some(stamp) { + return Ok(None); + } + self.stamp = Some(stamp); + // Never more than the cap, whatever the size said a moment ago. + let mut text = String::new(); + std::fs::File::open(path) + .and_then(|f| f.take(MAX_BYTES as u64 + 1).read_to_string(&mut text)) + .map_err(|e| format!("can't read {}: {e}", self.path))?; + let theme = parse(&text)?; + Ok(Some(ThemeFile { id: format!("file-{}", theme.id), ..theme })) + } +} + #[cfg(test)] mod tests { use super::*; @@ -1183,4 +1306,63 @@ mod tests { assert_eq!(radius_values(resolve(file)), defaults, "{}", file.id); } } + + #[test] + fn a_followed_file_reloads_when_rewritten_and_keeps_the_last_good_theme() { + let dir = std::env::temp_dir().join(format!("solidcraft-theme-follow-{}", std::process::id())); + std::fs::create_dir_all(&dir).unwrap(); + let file = dir.join("live.json"); + let path = file.to_string_lossy().to_string(); + let write = |panel: &str, extra: &str| { + std::fs::write(&file, format!(r##"{{"format":"{FORMAT}","name":"Live","base":"dark","colors":{{"panel":"{panel}"{extra}}}}}"##)).unwrap(); + }; + let panel = |f: &Follow| f.theme().map(|t| resolve(t).panel); + + // Off by default: nothing is followed or read. + let mut follow = Follow::default(); + assert_eq!(follow.path(""), ""); + assert_eq!(follow.poll("", 0.0, true), FollowChange::None); + assert!(follow.theme().is_none() && follow.error().is_none()); + + // A valid file applies; an unchanged one is not read again. + write("#102030", ""); + assert_eq!(follow.poll(&path, 0.0, false), FollowChange::Loaded("Live".into())); + assert_eq!(panel(&follow), Some(Color32::from_rgb(0x10, 0x20, 0x30))); + assert_eq!(follow.poll(&path, 0.5, false), FollowChange::None, "polled at most every second"); + assert_eq!(follow.poll(&path, 1.5, false), FollowChange::None, "unchanged"); + + // Rewritten (another size, so even a coarse modified time sees it): reloaded. + write("#405060", r##","accent":"#aa3300""##); + assert_eq!(follow.poll(&path, 1.6, false), FollowChange::None, "not due yet"); + assert_eq!(follow.poll(&path, 2.6, false), FollowChange::Loaded("Live".into())); + assert_eq!(panel(&follow), Some(Color32::from_rgb(0x40, 0x50, 0x60))); + + // Half written, broken, missing or too big: the last good theme stays, the reason once. + std::fs::write(&file, r#"{"format":"solidcraft-theme/1","name":"Li"#).unwrap(); + assert!(matches!(follow.poll(&path, 4.0, false), FollowChange::Failed(e) if e.contains("not a theme file"))); + assert_eq!(follow.poll(&path, 5.0, true), FollowChange::None, "the same reason is reported once"); + assert_eq!(panel(&follow), Some(Color32::from_rgb(0x40, 0x50, 0x60))); + std::fs::write(&file, vec![b' '; MAX_BYTES + 1]).unwrap(); + assert!(matches!(follow.poll(&path, 6.0, false), FollowChange::Failed(e) if e.contains("KiB"))); + std::fs::remove_file(&file).unwrap(); + assert!(matches!(follow.poll(&path, 7.0, false), FollowChange::Failed(e) if e.contains("can't read"))); + assert_eq!(panel(&follow), Some(Color32::from_rgb(0x40, 0x50, 0x60))); + assert!(follow.error().is_some()); + assert!(matches!(follow.poll(&dir.to_string_lossy(), 8.0, false), FollowChange::Failed(e) if e.contains("not a file"))); + + // Written again completely: back on, the error gone. + write("#708090", ""); + assert_eq!(follow.poll(&path, 9.0, false), FollowChange::Loaded("Live".into())); + assert_eq!((panel(&follow), follow.error()), (Some(Color32::from_rgb(0x70, 0x80, 0x90)), None)); + + // The launch flag's path wins over the preference's; an empty path stops following. + follow.launch = Some(path.clone()); + assert_eq!(follow.path("/elsewhere.json"), path); + follow.launch = None; + assert_eq!(follow.poll("", 10.0, false), FollowChange::None); + assert!(follow.theme().is_none()); + assert!(follow_path(&"x".repeat(MAX_FOLLOW_PATH + 1)).is_err() && follow_path("a\nb").is_err()); + assert!(follow_path("a\u{7}b").is_err()); + let _ = std::fs::remove_dir_all(&dir); + } } diff --git a/docs/book/src/guide/ui-tour.md b/docs/book/src/guide/ui-tour.md index c216e356f..9f4f60a7c 100644 --- a/docs/book/src/guide/ui-tour.md +++ b/docs/book/src/guide/ui-tour.md @@ -220,6 +220,20 @@ Command icons use the shared SVG palette. Imported themes are kept with your preferences, so they work in the browser app too. Colour vision modes still apply on top of any theme. +#### Follow a theme file + +In the desktop app, **Follow a theme file** (under the themes) takes a theme file that another +tool writes and keeps it as the theme: whenever the file changes, SolidCraft reloads it within +about a second, and again when its window comes back to the front, without a restart. This suits +tools that generate a colour scheme from your wallpaper or keep one scheme across your desktop +and applications (pywal and matugen are two examples); have them write a `solidcraft-theme/1` +file from a template. **Choose…** picks the file, **Stop following** (or choosing any theme) +turns it off; it is off until you choose a file. Only a file that reads completely is applied: +while it is being written, or if it is broken, missing or larger than 256 KiB, the last good +theme stays on and the setting says why. `solidcraft --theme-file my-theme.json` follows a file +for one run without changing your preferences. The browser app has no file to follow; import the +theme there instead. + Graphics › **Frame rate** shows frames per second in the view's bottom-right corner. Click it, or turn on **Frame rate details**, for the performance overlay: diff --git a/docs/control-protocol.md b/docs/control-protocol.md index 8a99c08ba..82e7e2a13 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -303,7 +303,7 @@ labels; `prefs:measure_axis_distances` identifies the checkbox. | `ui.home` | `open?`: bool; `sample?`: index | the start page: show or hide it, open a built-in sample (once built); returns `open` and the recent designs | | `ui.shortcut` | `command`, `key?`, `replace?` | a command's key, or rebinds it (`""` clears; a key another command uses is refused unless `replace`) | | `ui.help` | `item?`: `about`, `shortcuts` (read only), `report` (opens a report draft for review), `crashes` (the Crash Reports window) | the version, commit, build date and diagnostic text | -| `ui.prefs` | any of `default_units`, `nav` (`fusion`, `solidworks`, `inventor`, `alias`, `blender`, `tinkercad`, `openscad`, `touchpad`), `zoom_reverse`, `pan_reverse_x` (default false: horizontal scrolling pans the other way), `zoom_to_cursor`, `smooth_wheel_zoom` (default true), `trackpad_pan` (default true: two-finger scroll pans, except Touchpad always zooms; pinch zooms), `orbit_around` (`view_centre` (default: what Pan moves and Fit frames), `origin` (the world origin stays still on screen), `cursor` (the model point under the pointer when the drag began); the older `orbit_cursor` boolean still sets `cursor` when true), `sketch_exit_view` (`keep` (default: the view stays where it is when a sketch ends), `previous` (back to the view from before the sketch), `unless_rotated` (back unless the sketch view was turned)), `look_at_anim`, `look_at_speed`, `middle_double_click` (`home` (default), `fit`, `off`), `msaa`, `show_frame_rate` (default false: frames per second in the view's bottom-right corner, counting the frames the view draws anyway; it reads 0 FPS once the view is idle), `window_system` (Linux: `auto` (default: XWayland whenever there is an X display, native Wayland on niri), `wayland`, `x11`; saved in `graphics.json`, applies at the next start; `SOLIDCRAFT_WAYLAND` overrides it), `graphics_adapter` (exact card name, or empty for Automatic; applies after restart; `WGPU_ADAPTER_NAME` takes precedence), `frame_rate_details` (default false: with the frame rate, a frame-time graph of the frames drawn with the triangles over it, a frame-time histogram and what the GPU drew; clicking the readout switches it), `length_decimals`, `angle_decimals`, `step_values` (default false: Up/Down and the wheel step a plain number in a focused value field), `theme` (`dark`, `light`, `system` or a theme file's id: a built-in one such as `gruvbox-dark`, or an imported one; the reply's `theme_ids` lists them), `viewport_theme` (`theme` (default: the theme's own), `light`, `dark`: the 3D view in the Light or Dark theme's colours whatever the window uses, #4146), `theme_import` (a `solidcraft-theme/1` file's JSON or text: adds the theme and turns it on; the reply's `theme_imported` is its id), `theme_remove` (an imported theme's id), `theme_export: true` (the reply's `theme_file` is the theme on now as a complete file; see [colour themes](book/src/guide/ui-tour.md#colour-themes)), `language` (`en`, `ar`, `ja`, `de`, `fr`, `he`, `ko`, `ms`, `ru`, `uk`, `zh`; see [localization](localization.md)), `ui_scale`, `ui_font` (an installed font family or a font file for the interface; empty for the built-in font), `up_axis` (`z`, `y`), `offer_stand_up`, `extrude_auto_to_object` (default false: in the Extrude dialog, with a profile picked, a face, vertex or parallel plane picked off its plane switches the extent to To Object; it applies to Extrude dialogs opened afterwards), `hole_snaps` (default false: a Single hole snaps to its face's middle and round edges' centres), `hole_moves` (default false: a placed Single hole has a drag handle (`hole:`), and a pick on a face that has a hole moves it there), `placement_handles` (default false: handles on the preview of a Rest, Boss or Snap Fit that move it across the model and turn it), `color_vision` (`off` (default), `protan`, `deutan`, `tritan`: colour vision modes, #778), `view_confirm_corner` (default false: while a dialog or a sketch is open, a check and a cross at the view's top right, handles `view:confirm:ok` and `view:confirm:cancel`, do what the dialog's OK and Cancel do, or Finish Sketch and Cancel Sketch; the axis view or cube moves down below them, #6709), `history_sketches` (`in_order` (default), `under_feature`: the History at the left lists a sketch under the first feature built from it, #6489; the timeline at the bottom keeps the creation order), `dialog_buttons` (`bottom` (default), `top`: a feature dialog's OK, Cancel and Apply sit in its title row instead of under its inputs, #6708; the buttons keep their handles, and `dialog:close` is then Cancel's), `timeline_origin_bodies` (default false: the History on the left or under the browser starts with the active component's Bodies folder and the Origin, the browser's rows with their eyes, folds and menus; the bottom History is unchanged), `dialog_place` (`edge` (default) or `left_column`: command dialogs open in the left column in place of the browser and the History, #6707), `check_updates` (default true; [updates](book/src/guide/updates.md)), `nav_bridge_enabled` (default false) and `nav_bridge_port` (default 8765: a device's own app on this computer moves the view, [the navigation bridge](3d-mouse.md#device-apps-the-navigation-bridge)); `open` (a page: General, Interface, Design, Navigation, Keyboard Shortcuts, Sketch, Graphics, AI, Plugins; Shortcuts, Assistant and Sketch & selection are aliases, and the former Selection page opens Sketch) opens the Preferences dialog there; `button`: `ok`, `cancel`, `apply`, `defaults`; `stand_up: true` stands up a just-opened Y-up file, `stand_up: false` leaves it as it is ("Leave it": the offer closes and `offer_stand_up` stays on); the offer's buttons are the handles `stand_up:stand`, `stand_up:leave` and `stand_up:never` | sets preferences (kept between runs), returns them all plus `dialog` (the open page or null), `dark`, `viewport_dark` (whether the 3D view is dark) and `stand_up_offer` | +| `ui.prefs` | any of `default_units`, `nav` (`fusion`, `solidworks`, `inventor`, `alias`, `blender`, `tinkercad`, `openscad`, `touchpad`), `zoom_reverse`, `pan_reverse_x` (default false: horizontal scrolling pans the other way), `zoom_to_cursor`, `smooth_wheel_zoom` (default true), `trackpad_pan` (default true: two-finger scroll pans, except Touchpad always zooms; pinch zooms), `orbit_around` (`view_centre` (default: what Pan moves and Fit frames), `origin` (the world origin stays still on screen), `cursor` (the model point under the pointer when the drag began); the older `orbit_cursor` boolean still sets `cursor` when true), `sketch_exit_view` (`keep` (default: the view stays where it is when a sketch ends), `previous` (back to the view from before the sketch), `unless_rotated` (back unless the sketch view was turned)), `look_at_anim`, `look_at_speed`, `middle_double_click` (`home` (default), `fit`, `off`), `msaa`, `show_frame_rate` (default false: frames per second in the view's bottom-right corner, counting the frames the view draws anyway; it reads 0 FPS once the view is idle), `window_system` (Linux: `auto` (default: XWayland whenever there is an X display, native Wayland on niri), `wayland`, `x11`; saved in `graphics.json`, applies at the next start; `SOLIDCRAFT_WAYLAND` overrides it), `graphics_adapter` (exact card name, or empty for Automatic; applies after restart; `WGPU_ADAPTER_NAME` takes precedence), `frame_rate_details` (default false: with the frame rate, a frame-time graph of the frames drawn with the triangles over it, a frame-time histogram and what the GPU drew; clicking the readout switches it), `length_decimals`, `angle_decimals`, `step_values` (default false: Up/Down and the wheel step a plain number in a focused value field), `theme` (`dark`, `light`, `system` or a theme file's id: a built-in one such as `gruvbox-dark`, or an imported one; the reply's `theme_ids` lists them), `viewport_theme` (`theme` (default: the theme's own), `light`, `dark`: the 3D view in the Light or Dark theme's colours whatever the window uses, #4146), `theme_import` (a `solidcraft-theme/1` file's JSON or text: adds the theme and turns it on; the reply's `theme_imported` is its id), `theme_remove` (an imported theme's id), `theme_export: true` (the reply's `theme_file` is the theme on now as a complete file; see [colour themes](book/src/guide/ui-tour.md#colour-themes)), `theme_follow` (desktop only, default `""`: a `solidcraft-theme/1` file's path to follow as the theme, reloaded within about a second whenever it changes and when the window gains the focus; the file is read at once, and a file that doesn't read keeps the last good theme; `""` stops following, as does setting `theme`; in the browser it is an error; the launch flag `--theme-file PATH` follows a file for one run without saving it; the reply's `theme_followed` is the path followed now or null, and `theme_follow_error` why its last read was not applied, or null), `language` (`en`, `ar`, `ja`, `de`, `fr`, `he`, `ko`, `ms`, `ru`, `uk`, `zh`; see [localization](localization.md)), `ui_scale`, `ui_font` (an installed font family or a font file for the interface; empty for the built-in font), `up_axis` (`z`, `y`), `offer_stand_up`, `extrude_auto_to_object` (default false: in the Extrude dialog, with a profile picked, a face, vertex or parallel plane picked off its plane switches the extent to To Object; it applies to Extrude dialogs opened afterwards), `hole_snaps` (default false: a Single hole snaps to its face's middle and round edges' centres), `hole_moves` (default false: a placed Single hole has a drag handle (`hole:`), and a pick on a face that has a hole moves it there), `placement_handles` (default false: handles on the preview of a Rest, Boss or Snap Fit that move it across the model and turn it), `color_vision` (`off` (default), `protan`, `deutan`, `tritan`: colour vision modes, #778), `view_confirm_corner` (default false: while a dialog or a sketch is open, a check and a cross at the view's top right, handles `view:confirm:ok` and `view:confirm:cancel`, do what the dialog's OK and Cancel do, or Finish Sketch and Cancel Sketch; the axis view or cube moves down below them, #6709), `history_sketches` (`in_order` (default), `under_feature`: the History at the left lists a sketch under the first feature built from it, #6489; the timeline at the bottom keeps the creation order), `dialog_buttons` (`bottom` (default), `top`: a feature dialog's OK, Cancel and Apply sit in its title row instead of under its inputs, #6708; the buttons keep their handles, and `dialog:close` is then Cancel's), `timeline_origin_bodies` (default false: the History on the left or under the browser starts with the active component's Bodies folder and the Origin, the browser's rows with their eyes, folds and menus; the bottom History is unchanged), `dialog_place` (`edge` (default) or `left_column`: command dialogs open in the left column in place of the browser and the History, #6707), `check_updates` (default true; [updates](book/src/guide/updates.md)), `nav_bridge_enabled` (default false) and `nav_bridge_port` (default 8765: a device's own app on this computer moves the view, [the navigation bridge](3d-mouse.md#device-apps-the-navigation-bridge)); `open` (a page: General, Interface, Design, Navigation, Keyboard Shortcuts, Sketch, Graphics, AI, Plugins; Shortcuts, Assistant and Sketch & selection are aliases, and the former Selection page opens Sketch) opens the Preferences dialog there; `button`: `ok`, `cancel`, `apply`, `defaults`; `stand_up: true` stands up a just-opened Y-up file, `stand_up: false` leaves it as it is ("Leave it": the offer closes and `offer_stand_up` stays on); the offer's buttons are the handles `stand_up:stand`, `stand_up:leave` and `stand_up:never` | sets preferences (kept between runs), returns them all plus `dialog` (the open page or null), `dark`, `viewport_dark` (whether the 3D view is dark), `stand_up_offer`, `theme_followed` and `theme_follow_error` | | `ui.capture` | `action?`: `capture`, `revert`, `cancel` | answers the Capture Position question (asked when a command starts or the design is saved while components were moved without capturing); without `action`, what waits | | `ui.window` | `action`: minimize, maximize, restore, toggle, close | what the title bar's caption buttons do (on Windows and Linux the application bar is the title bar); close asks about unsaved designs first | | `ui.agent_cursor` | `show` (bool), `speed`: a number from 1 to 5 (times the normal speed) or `"instant"` (no animation: the command runs at once and the pointer jumps to where it acted), `follow_camera` (bool); all optional | the settings. While the cursor is shown, `engine.execute` first glides to the command's toolbar button and to each pick, then runs and replies; later requests wait their turn. The pointer shows the command's localized name, including commands inside a closed toolbar group; an animated batch names each command it visits. It also follows the pointer input sent with `ui.move`, `ui.click`, `ui.drag` and `ui.scroll`, as each event reaches the app, and a press leaves a ripple. `"animate": false` on a call skips it | From 0e4c5ae57704fac709116a9ee390cc8e1b3c51f6 Mon Sep 17 00:00:00 2001 From: Patrick Steinert Date: Tue, 27 Oct 2026 20:08:27 +0000 Subject: [PATCH 092/102] Save as Mesh: Add all bodies and Add visible bodies buttons (#7297) * Save as Mesh: Add all bodies and Add visible bodies buttons Two buttons under the Bodies input fill it with every body of the design, or with only the bodies the viewport shows. Co-Authored-By: Claude Opus 5.5 (1M context) * Save as Mesh: translate the two body buttons for every complete catalog ar, he, ja, vi and zh are complete catalogs, so every English message needs an entry there; ko as the ui-text skill asks. Co-Authored-By: Claude Opus 5.5 (1M context) --------- Co-authored-by: Claude Opus 5.5 (1M context) --- .../locales/pending/save-mesh-add-bodies.json | 10 +++++++++ crates/ui-egui/src/browser_card_tests.rs | 21 +++++++++++++++++++ crates/ui-egui/src/dialogs_dense.rs | 2 +- crates/ui-egui/src/dialogs_save_mesh.rs | 20 +++++++++++++++++- 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 assets/locales/pending/save-mesh-add-bodies.json diff --git a/assets/locales/pending/save-mesh-add-bodies.json b/assets/locales/pending/save-mesh-add-bodies.json new file mode 100644 index 000000000..cab34f02f --- /dev/null +++ b/assets/locales/pending/save-mesh-add-bodies.json @@ -0,0 +1,10 @@ +{ + "en": { "Add all bodies": "Add all bodies", "Add visible bodies": "Add visible bodies" }, + "ar": { "Add all bodies": "إضافة كل الأجسام", "Add visible bodies": "إضافة الأجسام المرئية" }, + "de": { "Add all bodies": "Alle Körper hinzufügen", "Add visible bodies": "Sichtbare Körper hinzufügen" }, + "he": { "Add all bodies": "הוספת כל הגופים", "Add visible bodies": "הוספת הגופים הגלויים" }, + "ja": { "Add all bodies": "すべてのボディを追加", "Add visible bodies": "表示中のボディを追加" }, + "ko": { "Add all bodies": "모든 바디 추가", "Add visible bodies": "보이는 바디 추가" }, + "vi": { "Add all bodies": "Thêm tất cả thân khối", "Add visible bodies": "Thêm các thân khối đang hiện" }, + "zh": { "Add all bodies": "添加所有实体", "Add visible bodies": "添加可见实体" } +} diff --git a/crates/ui-egui/src/browser_card_tests.rs b/crates/ui-egui/src/browser_card_tests.rs index 8dac69e0e..3a2cec121 100644 --- a/crates/ui-egui/src/browser_card_tests.rs +++ b/crates/ui-egui/src/browser_card_tests.rs @@ -2,6 +2,27 @@ use super::*; use crate::scenario::{Harness, handle_at, rect_of}; use crate::shell::{LayoutMode, SHELL_GAP}; +#[test] +fn save_mesh_add_all_and_add_visible_bodies_fill_the_bodies_input() { + let mut h = Harness::new(); + for (name, x) in [("One", 0), ("Two", 20), ("Three", 40)] { + h.app.run("solid.box", json!({"length":10,"width":10,"height":10,"corner":[x,0,0],"operation":"new_body","body_name":name})).unwrap(); + } + h.app.run("browser.visibility", json!({"items":["Two"],"visible":false})).unwrap(); + h.app.start("file.save_mesh"); + h.settle(); + for (button, expected) in [("Add all bodies", vec!["One", "Two", "Three"]), ("Add visible bodies", vec!["One", "Three"])] { + let handle = crate::scenario::handles("dialog:button:").into_iter().find(|(n, _)| n.ends_with(&format!(":{button}"))); + let (handle, _) = handle.unwrap_or_else(|| panic!("{button} is shown")); + h.step(&json!({"click":{"handle":handle}})).unwrap(); + let d = h.app.dialog.as_ref().unwrap(); + let crate::dialogs::Kind::SaveMesh(k) = &d.kind else { panic!("Save as Mesh is open") }; + let commands = crate::dialogs_save_mesh::commands(k, &d.inputs).unwrap(); + assert_eq!(commands[0].1["bodies"], json!(expected), "{button}"); + assert!(h.app.session.selection.is_empty(), "the buttons do not change the global selection"); + } +} + #[test] fn browser_body_clicks_fill_and_toggle_save_mesh_inputs() { for mode in [LayoutMode::Floating, LayoutMode::Docked] { diff --git a/crates/ui-egui/src/dialogs_dense.rs b/crates/ui-egui/src/dialogs_dense.rs index b26ddbcbe..1c794e231 100644 --- a/crates/ui-egui/src/dialogs_dense.rs +++ b/crates/ui-egui/src/dialogs_dense.rs @@ -197,7 +197,7 @@ pub(super) fn rows(app: &mut SolveApp, ctx: &egui::Context, d: &mut Dialog, ui: Kind::Motion(k) => enter |= crate::dialogs_motion::rows(app, ui, k, &mut d.inputs), Kind::Part(k) => enter |= crate::dialogs_parts::rows(app, ui, k, &d.inputs), Kind::PartSize(k) => enter |= crate::dialogs_part_size::rows(app, ui, k), - Kind::SaveMesh(k) => enter |= crate::dialogs_save_mesh::rows(app, ui, k), + Kind::SaveMesh(k) => enter |= crate::dialogs_save_mesh::rows(app, ui, k, &mut d.inputs), Kind::ViewDxf { dashed, tolerance } => crate::dialogs_view_dxf::rows(app, ui, dashed, tolerance), Kind::InsertDrawing(p) => crate::dialogs_insert_drawing::rows(ui, p), Kind::Sketch => { diff --git a/crates/ui-egui/src/dialogs_save_mesh.rs b/crates/ui-egui/src/dialogs_save_mesh.rs index 5599f994d..495a4e516 100644 --- a/crates/ui-egui/src/dialogs_save_mesh.rs +++ b/crates/ui-egui/src/dialogs_save_mesh.rs @@ -21,6 +21,7 @@ use crate::SolveApp; use crate::dialogs::{Kind, form_row}; use crate::selection::{BODIES, SelInput}; use crate::theme::Tokens; +use solidcraft_engine::Sel; /// The formats, as shown and as `file.save_mesh` names them. /// (label, `format` parameter, file extension). @@ -302,8 +303,25 @@ fn paint_icon(ui: &egui::Ui, rect: egui::Rect, tex: Option, nam } } +/// Every body of the design, in model order; with `visible`, only the bodies the viewport shows. +pub(crate) fn body_picks(app: &SolveApp, visible: bool) -> Vec { + let st = app.session.world_state(); + let shown = |name: &str| !visible || app.session.body_visible(name); + st.bodies.iter().filter(|b| shown(&b.name)).map(|b| Sel::Body { name: b.name.clone() }).collect() +} + /// The rows after the Bodies input; true when Enter was pressed in a field. -pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, k: &mut SaveMesh) -> bool { +pub fn rows(app: &mut SolveApp, ui: &mut egui::Ui, k: &mut SaveMesh, inputs: &mut [SelInput]) -> bool { + // One row each: the two side by side do not fit the dialog's width. + for (label, visible) in [("Add all bodies", false), ("Add visible bodies", true)] { + form_row(ui, "", |ui| { + if crate::ui_kit::button(ui, crate::i18n::tr_label(label), crate::ui_kit::Button::Small).clicked() + && let Some(input) = inputs.first_mut() + { + input.items = body_picks(app, visible); + } + }); + } if !k.open { choice_row(ui, "Format", "sm_format", &mut k.format, &FORMATS.map(|f| f.0)); choice_row(ui, "Quality", "sm_quality", &mut k.quality, &QUALITIES.map(|q| q.0)); From 392f4ed3966435ce5beffc8b53af07eb785a93b9 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 20:28:04 +0000 Subject: [PATCH 093/102] Report a bug: Ctrl/Cmd+Enter continues on GitHub (#7203) (#7204) * claim: #7203 * Report a bug: Ctrl/Cmd+Enter continues on GitHub (#7203) The report's fields are multi-line, so Enter adds a line break and the only way on was the mouse. Ctrl+Enter (Cmd+Enter on a Mac) in any field now does what Continue on GitHub does: it is read before the fields see it, so it adds no line break, and an empty description is still asked for. A note under the description says so, with the keys of this computer. Co-Authored-By: Claude Opus 5.5 * Report a bug: keep the shortcut hint apart from the other report changes Co-Authored-By: Claude Opus 5.5 * Report a bug: holding Ctrl/Cmd+Enter continues on GitHub once egui's consume_key also matches the key's repeats, so every repeat frame opened another GitHub tab. Only the press counts now; repeats are dropped. The test sends the modifiers each platform really sends (mac_cmd or ctrl together with command) and holds the key. Co-Authored-By: Claude Opus 5.5 * Locales: Arabic and Hebrew for the new strings ar and he are complete catalogs on main now (#3458): every new message needs them. The pending-messages test compares right-to-left messages in display order once #7532 lands (#7527). Co-Authored-By: Claude Opus 5.5 * Locales: Vietnamese for the new strings Vietnamese became a complete catalog on main (#5823), so every new English message needs it too. Co-Authored-By: Claude Opus 5.5 * Report a bug: the Save screenshot test scrolls its button into view The shortcut hint adds a line above the screenshot, which moves its buttons below the fold of the review's scroll area at the test's size. The test scrolls them into view first, as the other report tests do. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- .../pending/issue-report-ctrl-enter.json | 30 ++++++++++++ crates/ui-egui/src/issue_report.rs | 49 +++++++++++++++++++ crates/ui-egui/src/issue_report/form.rs | 25 +++++++++- 3 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 assets/locales/pending/issue-report-ctrl-enter.json diff --git a/assets/locales/pending/issue-report-ctrl-enter.json b/assets/locales/pending/issue-report-ctrl-enter.json new file mode 100644 index 000000000..1bea67a0b --- /dev/null +++ b/assets/locales/pending/issue-report-ctrl-enter.json @@ -0,0 +1,30 @@ +{ + "en": { + "Ctrl+Enter continues on GitHub.": "Ctrl+Enter continues on GitHub.", + "⌘Enter continues on GitHub.": "⌘Enter continues on GitHub." + }, + "ar": { + "Ctrl+Enter continues on GitHub.": "Ctrl+Enter يتابع في GitHub.", + "⌘Enter continues on GitHub.": "⌘Enter يتابع في GitHub." + }, + "de": { + "Ctrl+Enter continues on GitHub.": "Strg+Enter geht weiter zu GitHub.", + "⌘Enter continues on GitHub.": "⌘Enter geht weiter zu GitHub." + }, + "he": { + "Ctrl+Enter continues on GitHub.": "Ctrl+Enter ממשיך ב־GitHub.", + "⌘Enter continues on GitHub.": "⌘Enter ממשיך ב־GitHub." + }, + "ja": { + "Ctrl+Enter continues on GitHub.": "Ctrl+EnterでGitHubに進みます。", + "⌘Enter continues on GitHub.": "⌘EnterでGitHubに進みます。" + }, + "vi": { + "Ctrl+Enter continues on GitHub.": "Nhấn Ctrl+Enter để tiếp tục trên GitHub.", + "⌘Enter continues on GitHub.": "Nhấn ⌘Enter để tiếp tục trên GitHub." + }, + "zh": { + "Ctrl+Enter continues on GitHub.": "按Ctrl+Enter在GitHub中继续。", + "⌘Enter continues on GitHub.": "按⌘Enter在GitHub中继续。" + } +} diff --git a/crates/ui-egui/src/issue_report.rs b/crates/ui-egui/src/issue_report.rs index d6bd0cf01..2e5b541f1 100644 --- a/crates/ui-egui/src/issue_report.rs +++ b/crates/ui-egui/src/issue_report.rs @@ -1132,6 +1132,52 @@ mod tests { } } + /// Ctrl+Enter (⌘Enter on a Mac) continues on GitHub from a field, without a line break, and + /// asks for a description first like the button does (#7203). Holding it opens GitHub once. + #[test] + fn issue_report_ctrl_enter_continues_on_github() { + let mut h = crate::scenario::Harness::new(); + h.app.home.open = false; + h.app.issue_report.draft = Some(draft_for(&h.app, None, None)); + h.frames(8); + assert!(h.widget(form::shortcut_hint(h.ctx.os())).is_some(), "the dialog says so"); + // As the platforms send it: ⌘ sets mac_cmd and command, Ctrl elsewhere ctrl and command. + // egui marks a press of a key it already holds down as a repeat. + let key = |pressed: bool| { + let modifiers = if h.ctx.os() == egui::os::OperatingSystem::Mac { + egui::Modifiers { mac_cmd: true, command: true, ..Default::default() } + } else { + egui::Modifiers { ctrl: true, command: true, ..Default::default() } + }; + egui::Event::Key { key: egui::Key::Enter, physical_key: None, pressed, repeat: false, modifiers } + }; + let (down, up) = (key(true), key(false)); + // Held for `repeats` frames after the press, then released. + let press = |h: &mut crate::scenario::Harness, repeats: usize| { + let mut commands = Vec::new(); + for _ in 0..=repeats { + h.frame_with(vec![down.clone()]); + commands.extend(h.output.commands.clone()); + } + h.frame_with(vec![up.clone()]); + commands.extend(h.output.commands.clone()); + h.frames(2); + commands.extend(h.output.commands.clone()); + commands + }; + let commands = press(&mut h, 0); + assert!(!commands.iter().any(|c| matches!(c, egui::OutputCommand::OpenUrl(_)))); + assert!(h.app.issue_report.draft.as_ref().unwrap().missing_description, "an empty description is asked for"); + h.frame_with(vec![egui::Event::Text("The preview disappeared".into())]); + // Held down, it continues on GitHub once: its repeats open nothing more. + let commands = press(&mut h, 3); + let opened = commands.iter().filter(|c| matches!(c, egui::OutputCommand::OpenUrl(url) if url.url.starts_with(ISSUE_URL))).count(); + assert_eq!(opened, 1, "{commands:?}"); + let draft = h.app.issue_report.draft.as_ref().unwrap(); + assert_eq!(draft.description, "The preview disappeared", "no line break"); + assert!(draft.opened_github); + } + #[test] fn crash_draft_marks_later_detection_without_losing_native_evidence() { let message = @@ -1411,6 +1457,9 @@ mod tests { draft.image = Some(Arc::new(ColorImage::new([4, 3], vec![egui::Color32::GREEN; 12]))); h.app.issue_report.draft = Some(draft); h.frames(4); + // The screenshot's buttons sit low in the review's scroll area: scrolled into view first. + h.call("ui.scroll", json!({"x":800,"y":600,"delta":-1000})); + h.frames(2); for (path, saved) in [(h.dir.join("report.png"), true), (h.dir.join("missing").join("report.png"), false)] { let answer = path.to_string_lossy().to_string(); h.app.services.pick_save = Some(Box::new(move |_, _| Box::pin(std::future::ready(Some(answer.clone()))))); diff --git a/crates/ui-egui/src/issue_report/form.rs b/crates/ui-egui/src/issue_report/form.rs index 2aa736676..021efa6ab 100644 --- a/crates/ui-egui/src/issue_report/form.rs +++ b/crates/ui-egui/src/issue_report/form.rs @@ -89,7 +89,21 @@ pub(super) fn show(app: &mut SolveApp, draft: &mut Draft, ctx: &egui::Context) - let t = crate::theme::Tokens::get(); let screen = ctx.content_rect(); let cards = ((screen.width() - 2.0 * t.space_16) / t.form_card_width).clamp(0.5, 2.6); - let (closed, action) = ui_kit::Window::new(Id::new("sc_issue_report"), "bug_report", tr_label("Report a bug")) + // Ctrl+Enter (⌘Enter on a Mac) in any field continues on GitHub. Read before the fields see + // it, so it adds no line break. Only the press counts: the repeats of a held key are dropped, + // so holding it opens GitHub once. + let submit = ctx.input_mut(|i| { + let mut pressed_now = false; + i.events.retain(|e| match e { + egui::Event::Key { key: egui::Key::Enter, pressed, repeat, modifiers, .. } if modifiers.command => { + pressed_now |= *pressed && !*repeat; + false + } + _ => true, + }); + pressed_now + }); + let (closed, mut action) = ui_kit::Window::new(Id::new("sc_issue_report"), "bug_report", tr_label("Report a bug")) .cards(cards) .anchor(egui::Align2::CENTER_TOP, vec2(0.0, t.space_16)) .fields() @@ -164,6 +178,7 @@ pub(super) fn show(app: &mut SolveApp, draft: &mut Draft, ctx: &egui::Context) - draft.missing_description = false; } } + ui_kit::text(ui, tr_label(shortcut_hint(ui.ctx().os())), ui_kit::Text::Note("shortcut")); let steps = answer( ui, "Steps to reproduce (optional)", @@ -194,6 +209,9 @@ pub(super) fn show(app: &mut SolveApp, draft: &mut Draft, ctx: &egui::Context) - }); }); }); + if submit && action == ui_kit::Action::None { + action = ui_kit::Action::Ok; + } // TextEdit applies this frame's events while it is drawn. Export only after every editor // has processed its input, including diagnostic redactions. match action { @@ -223,3 +241,8 @@ pub(super) fn show(app: &mut SolveApp, draft: &mut Draft, ctx: &egui::Context) - } (retake, closed || action == ui_kit::Action::Cancel) } + +/// The keys that continue on GitHub from any field (#7203), as this computer spells them. +pub(super) fn shortcut_hint(os: egui::os::OperatingSystem) -> &'static str { + if os == egui::os::OperatingSystem::Mac { "⌘Enter continues on GitHub." } else { "Ctrl+Enter continues on GitHub." } +} From 153af8da22a62c40460c06ddbf628d3740547d5e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 20:49:27 +0000 Subject: [PATCH 094/102] Regenerate generated files and fold pending files [skip ci] --- assets/locales/ar.json | 2 + assets/locales/de.json | 132 +++++++++++++++++ assets/locales/en.json | 2 + assets/locales/he.json | 2 + assets/locales/ja.json | 2 + assets/locales/ko.json | 2 + assets/locales/pending/de-batch-2.json | 134 ------------------ .../locales/pending/free-orbit-upright.json | 34 ----- assets/locales/vi.json | 2 + assets/locales/zh.json | 2 + 10 files changed, 146 insertions(+), 168 deletions(-) delete mode 100644 assets/locales/pending/de-batch-2.json delete mode 100644 assets/locales/pending/free-orbit-upright.json diff --git a/assets/locales/ar.json b/assets/locales/ar.json index 699553a34..7624c6242 100644 --- a/assets/locales/ar.json +++ b/assets/locales/ar.json @@ -1406,6 +1406,8 @@ "nav.free_orbit.help": "الفأرة والفأرة ثلاثية الأبعاد تدوّران العرض عبر القطبين وتحافظان على اللف. يُعطَّل التقاط المحاور بـ Shift.", "nav.free_orbit.label": "تدوير حر", "nav.free_orbit.snap_help": "الفأرة والفأرة ثلاثية الأبعاد تدوّران العرض عبر القطبين وتحافظان على اللف. اضغط مطولًا على Shift أثناء سحب التدوير لالتقاط اتجاه العرض واللف.", + "nav.free_orbit_upright.help": "سحب الفأرة جانبيًا يدوّر النموذج حول المحور الرأسي للعالم؛ والسحب لأعلى ولأسفل يميله فوق القمة دون حد.", + "nav.free_orbit_upright.label": "الدوران حول المحور الرأسي", "nav.fusion.help": "السحب بالزر الأوسط يُزيح العرض، وShift مع الأوسط يدوّره، والسحب بالأيمن يدوّره", "nav.inventor.help": "السحب بالزر الأوسط يُزيح العرض، وShift مع الأوسط يدوّره، وCtrl مع الأوسط يكبّره، والسحب بالأيمن يدوّره", "nav.openscad.help": "السحب بالزر الأيسر على مساحة فارغة يدوّر العرض، وShift مع السحب بالأيسر يحدد بمربع، وسحب هندسة الرسم يعدّلها؛ والسحب بالأيمن أو الأوسط يُزيح، وShift مع السحب بالأيمن أو الأوسط يكبّر", diff --git a/assets/locales/de.json b/assets/locales/de.json index cc54f7854..5f6f25657 100644 --- a/assets/locales/de.json +++ b/assets/locales/de.json @@ -618,6 +618,34 @@ "Z angle": "Z-Winkel", "Z distance": "Z-Abstand", "Zebra": "Zebra", + "ai.connected_toast": "SolidCraft ist jetzt in {clients} verfügbar. Starten Sie diese neu, um es zu nutzen (Einstellungen > Assistent).", + "ai.prefs.allow_control": "Verbindungen von KI-Agenten zulassen (Steuerkanal / MCP)", + "ai.prefs.allow_control_note": "Öffnet einen Steuerkanal nur auf diesem Computer (127.0.0.1, Port 27878 oder der nächste freie). Ein verbindendes Programm muss zusätzlich ein geheimes Token vorweisen, das nur Ihr Benutzerkonto lesen kann und bei jedem Start neu erzeugt wird. Wirkt ab dem nächsten Start von SolidCraft. Aus: Es wartet nichts auf Verbindungen, außer Sie starten SolidCraft mit --control.", + "ai.prefs.availability": "Assistenten-Steuerung", + "ai.prefs.background_commands": "Agentenbefehle im Hintergrund ausführen", + "ai.prefs.connect_apps": "SolidCraft für KI-Apps auf diesem Computer verfügbar machen", + "ai.prefs.connect_apps_note": "Trägt SolidCraft beim Start als MCP-Server in die auf diesem Computer gefundenen KI-Apps ein (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), damit ein Agent es ohne Einrichtung nutzen kann. Nur der Eintrag „solidcraft“ wird hinzugefügt oder sein Pfad aktualisiert; ein von Ihnen geänderter Eintrag bleibt unberührt, und die Datei wird vorher gesichert. Aus: Die hinzugefügten Einträge werden entfernt. Hilfe > KI-Assistenten verbinden… erledigt das von Hand.", + "ai.prefs.follow_camera": "Kamera zu Skizzen drehen", + "ai.prefs.follow_camera_off": "Die automatische Kameraführung ist aus.", + "ai.prefs.follow_camera_on": "Die Kamera dreht sich zu Skizzen, die der Agent erstellt.", + "ai.prefs.intro": "Agenten, Berechtigungen und wie ihre Arbeit angezeigt wird.", + "ai.prefs.make_default": "Standardmäßig verwenden", + "ai.prefs.no_agents": "Noch keine Agenten. Fügen Sie einen Agenten hinzu oder aktualisieren Sie, um installierte Agenten zu finden.", + "ai.prefs.no_saved_approvals": "Keine gespeicherten Freigaben.", + "ai.prefs.override_all_warning": "Dieser Agent darf das Design ohne Rückfrage speichern, überschreiben, exportieren oder ersetzen.", + "ai.prefs.permission_all": "Alles erlauben", + "ai.prefs.permission_all_summary": "Verfügbare SolidCraft-Werkzeuge werden ohne Rückfrage ausgeführt.", + "ai.prefs.permission_ask": "Vor Änderungen fragen", + "ai.prefs.permission_ask_summary": "Jede Designänderung und Dateiaktion bestätigen.", + "ai.prefs.permission_edits": "Modelländerungen erlauben", + "ai.prefs.permission_edits_summary": "Modelländerungen werden ohne Rückfrage ausgeführt; Datei- und destruktive Aktionen fragen weiterhin nach.", + "ai.prefs.permission_scope": "Gilt nur für SolidCraft-Werkzeuge. Shell und Dateiänderungen des Agenten unterliegen dessen eigenen Berechtigungen.", + "ai.prefs.pointer_preview_hidden": "Zeiger ausgeblendet", + "ai.prefs.pointer_preview_speed": "Agentenzeiger · {speed}", + "ai.prefs.pointer_speed": "Bewegungsgeschwindigkeit", + "ai.prefs.privacy_note": "Die Unterhaltung geht nur an den von Ihnen gewählten Agenten oder API-Endpunkt. API-Schlüssel werden im Schlüsselbund des Systems gespeichert.", + "ai.prefs.show_pointer": "Agentenzeiger anzeigen", + "ai.prefs.turn_limit_hint": "Höchstzahl designändernder Werkzeugaufrufe, die der Assistent für eine Nachricht ausführen darf.", "angle, height": "Winkel, Höhe", "appearance.dielectric_ior": "Brechungsindex des Dielektrikums", "appearance.metallic": "Metallanteil", @@ -653,6 +681,8 @@ "cmd.appearance_replace": "Erscheinungsbild ersetzen", "cmd.assembly_bom": "Stückliste", "cmd.body_rename": "Körper umbenennen", + "cmd.browser_collapse_all": "Alles einklappen", + "cmd.browser_expand_all": "Alles ausklappen", "cmd.browser_group": "Neue Gruppe", "cmd.browser_move": "Browser-Elemente verschieben", "cmd.browser_order": "Browser-Elemente ordnen", @@ -670,6 +700,7 @@ "cmd.component_capture_position": "Position erfassen", "cmd.component_copies": "Identische Kopien finden", "cmd.component_create": "Neue Komponente", + "cmd.component_cycle_color": "Komponentenfarbe wechseln", "cmd.component_delete": "Komponente löschen", "cmd.component_extract": "In Datei extrahieren", "cmd.component_from_bodies": "Komponenten aus Körpern erstellen", @@ -757,6 +788,8 @@ "cmd.inspect_accessibility": "Zugänglichkeitsanalyse", "cmd.inspect_center_of_mass": "Massenschwerpunkt", "cmd.inspect_clearance": "Freiraum", + "cmd.inspect_colored_components": "Komponentenfarben einschalten", + "cmd.inspect_colored_components_disable": "Komponentenfarben ausschalten", "cmd.inspect_compare": "Körper vergleichen", "cmd.inspect_continuity": "Kontinuitätsprüfung", "cmd.inspect_curvature_comb": "Krümmungskamm-Analyse", @@ -766,6 +799,7 @@ "cmd.inspect_interference": "Eingriff", "cmd.inspect_isocurve": "Isokurvenanalyse", "cmd.inspect_minimum_radius": "Mindestradiusanalyse", + "cmd.inspect_parameter_sweep": "Parametervariation", "cmd.inspect_silhouette": "Silhouette", "cmd.inspect_zebra": "Zebra-Analyse", "cmd.joint_as_built": "Fertigungsgelenk", @@ -810,8 +844,10 @@ "cmd.motion_plot": "Diagramm der Bewegungsuntersuchung", "cmd.motion_study": "Bewegungsuntersuchung", "cmd.motion_trace": "Bewegungsbahn", + "cmd.motion_trace_edit": "Bewegungsbahn bearbeiten", "cmd.motion_trace_keep": "Bewegungsbahn behalten", "cmd.occurrence_copy": "Einfügen (Instanz)", + "cmd.occurrence_drag": "Instanz ziehen", "cmd.occurrence_ground": "Festsetzen", "cmd.occurrence_move": "Instanz verschieben", "cmd.occurrence_properties": "Physikalische Eigenschaften der Instanz", @@ -839,12 +875,14 @@ "cmd.plastic_rest": "Auflage", "cmd.plastic_rules": "Kunststoffregeln auflisten", "cmd.plastic_snap_fit": "Rastverbindung", + "cmd.render_aging_describe": "Mehrschichtige Oberflächenalterung", "cmd.render_backends": "Render-Backends", "cmd.render_batch": "Alle Aufnahmen rendern", "cmd.render_camera_fit": "Renderobjekt einpassen", "cmd.render_camera_get": "Renderkamera prüfen", "cmd.render_cancel": "Rendering abbrechen", "cmd.render_compare": "Bilder vergleichen", + "cmd.render_effects_describe": "Objektiv- und Kreativeffekte", "cmd.render_export": "PNG exportieren", "cmd.render_hdr_inspect": "HDR-Quelle untersuchen", "cmd.render_library_appearance_apply": "Opakes Bibliotheksaussehen anwenden", @@ -852,6 +890,7 @@ "cmd.render_library_environment_apply": "Integrierte HDR-Umgebung anwenden", "cmd.render_library_list": "Render-Bibliothek durchsuchen", "cmd.render_library_physical_prepare": "Prepare Physical Reference", + "cmd.render_library_preview": "Originale Oberflächentextur anzeigen", "cmd.render_library_studio_apply": "Erstellte Studiolichter anwenden", "cmd.render_library_studio_prepare": "Erstellte Studiolichter vorbereiten", "cmd.render_library_surface_bind": "Save Surface Binding", @@ -859,13 +898,22 @@ "cmd.render_library_surface_unbind": "Remove Surface Binding", "cmd.render_library_targets": "Ziele für Render-Ressourcen suchen", "cmd.render_lights_solo": "Licht allein anzeigen", + "cmd.render_optics_bind": "Optische Einstellungen zuweisen", + "cmd.render_optics_unbind": "Zuweisung optischer Einstellungen entfernen", "cmd.render_preflight": "Renderanfrage prüfen", + "cmd.render_preset_apply": "Studio-Voreinstellung anwenden", + "cmd.render_preset_resolve": "Studio-Voreinstellung überprüfen", + "cmd.render_quality_prepare": "Festes Sampling-Budget überprüfen", "cmd.render_result_pin": "Angezeigtes Render-Ergebnis behalten", + "cmd.render_result_regrade": "Lineares Master-Rendering erneut farbkorrigieren", "cmd.render_scene": "Renderszene prüfen", "cmd.render_settings_apply": "Renderkamera anwenden", "cmd.render_settings_capture_hdr": "Render-Einstellungen mit HDR speichern", "cmd.render_settings_get": "Rendereinstellungen", "cmd.render_settings_set": "Rendereinstellungen speichern", + "cmd.render_shot_duplicate": "Render-Aufnahme duplizieren", + "cmd.render_shot_remove": "Render-Aufnahme entfernen", + "cmd.render_shot_rename": "Render-Aufnahme umbenennen", "cmd.render_stage_backdrop": "Physischen Renderhintergrund speichern", "cmd.render_stage_clear": "Remove Render Stage", "cmd.render_stage_ground": "Save Render Ground", @@ -880,6 +928,7 @@ "cmd.sheet_fold": "Falten", "cmd.sheet_hem": "Umkantung", "cmd.sheet_manage_rules": "Blechregeln", + "cmd.sheet_path_flange": "Pfadflansch", "cmd.sheet_perforate": "Perforieren", "cmd.sheet_refold": "Wieder falten", "cmd.sheet_rules": "Blechregeln auflisten", @@ -891,6 +940,7 @@ "cmd.sketch_auto_constrain_from_datum": "Auto-Bedingung von Bezug", "cmd.sketch_auto_project": "Kanten automatisch auf Referenz projizieren", "cmd.sketch_blend_curve": "Übergangskurve", + "cmd.sketch_cancel": "Skizze abbrechen", "cmd.sketch_chain": "Kette", "cmd.sketch_chamfer_distance_angle": "Abschrägung mit Abstand und Winkel", "cmd.sketch_chamfer_equal_distance": "Abschrägung mit gleichem Abstand", @@ -1005,14 +1055,21 @@ "cmd.timeline_suppress": "Merkmal unterdrücken", "cmd.view_ambient_occlusion": "Umgebungsverdeckung", "cmd.view_apply": "Benannte Ansicht wiederherstellen", + "cmd.view_back": "Rückansicht", + "cmd.view_bottom": "Untersicht", "cmd.view_delete": "Benannte Ansicht löschen", + "cmd.view_front": "Vorderansicht", "cmd.view_graphics_preset": "Grafikprofil", + "cmd.view_isometric": "Isometrische Ansicht", + "cmd.view_left": "Linke Seitenansicht", "cmd.view_list": "Benannte Ansichten auflisten", "cmd.view_navigate": "Ansicht navigieren", "cmd.view_normal_to": "Senkrecht zur Auswahl", "cmd.view_rename": "Benannte Ansicht umbenennen", + "cmd.view_right": "Rechte Seitenansicht", "cmd.view_save": "Neue benannte Ansicht", "cmd.view_shots_strip": "Aufnahmenleiste", + "cmd.view_top": "Draufsicht", "color.copy": "Klicken, um Farbwerte zu kopieren", "color.edit": "Klicken, um Farbe zu bearbeiten", "color.gamma": "Farbwerte im Gammaraum 0-255 anzeigen", @@ -1053,6 +1110,7 @@ "crash.report": "Bericht…", "crash.unclean_explanation": "Beim späteren Start erkannt; der genaue Zeitpunkt des Beendens wurde nicht aufgezeichnet. Auch ein Herunterfahren des Systems oder ein erzwungener Stopp kann ein unsauberes Beenden verursachen.", "delete.and_more": "… und {count} weitere", + "diagnostic.empty_boolean_component": "In Komponente '{component}' gibt es keinen Körper zum Abziehen oder für eine Schnittmenge; das Werkzeug überschneidet sich eventuell mit '{body}' in Komponente '{other}' – aktivieren Sie diese Komponente oder wählen Sie den Körper als Ziel", "dialog.bodies_count": "{count} Körper", "dialog.clearance_invalid": "der Abstand muss eine Länge von 0 oder mehr sein", "dialog.compute": "Berechnen", @@ -1068,7 +1126,18 @@ "dialog.selection_guidance": "Wählen Sie eine Eingabe aus, um sie zu ändern. Klicken Sie auf ausgewählte Objekte, um sie zu entfernen; Strg/Cmd-Klick schaltet sie ebenfalls um. Prüfen Sie die Vorschau und drücken Sie dann OK.", "dialog.selection_step": "{step} von {total}: {input} auswählen", "dialog.step": "Schritt", + "document.changed_on_disk": "{name} wurde auf dem Datenträger geändert", + "document.changed_on_disk_detail": "{name} wurde seit dem Öffnen oder letzten Speichern von einem anderen Programm oder Computer geändert. „Überschreiben“ ersetzt diese Änderungen durch Ihre; „Kopie speichern“ behält beide.", + "document.copy_name": "{name} - Kopie", + "document.open_anyway": "Trotzdem öffnen", + "document.open_elsewhere": "{name} ist bereits geöffnet", + "document.open_elsewhere_detail": "{name} ist in SolidCraft {app} auf {who} geöffnet, seit {when}. Wenn Sie beide speichern, verliert einer von Ihnen Arbeit. Öffnen Sie die Datei schreibgeschützt, um sie anzusehen, ohne sie zu überschreiben.", + "document.open_read_only": "Schreibgeschützt öffnen", + "document.opened_read_only": "Schreibgeschützt geöffnet: Speichern fragt nach einer neuen Datei", + "document.overwrite": "Überschreiben", + "document.read_only_save": "Dieses Design wurde schreibgeschützt geöffnet: Speichern Sie es als neue Datei", "document.save_changes": "Änderungen in {name} speichern?", + "document.save_copy": "Kopie speichern…", "document.unsaved_changes": "{name} enthält ungespeicherte Änderungen. Wenn Sie nicht speichern, gehen sie verloren.", "drive.stopped_by_contact": "Angehalten bei {value}: {a} würde {b} durchdringen", "drive.stopped_by_loop": "Angehalten bei {value}: die Schleife über {joint} lässt sich nicht weiter schließen", @@ -1085,9 +1154,11 @@ "dxf.progress.write": "DXF schreiben (5/5)", "dxf.tolerance": "Kurventoleranz", "dxf.tolerance_help": "Nur sichtbare Körper und angezeigte Skizzen. Kurven werden durch gerade Segmente angenähert. Eine kleinere Toleranz liefert feinere Kurven und benötigt mehr Zeit und Speicher.", + "file.open.drawing_filter": "Designs, CAD-Dateien, Netze und Zeichnungen", "file_load.built": "Bisher erstellt: {built} von {total} Merkmalen.", "file_load.converting": "Volumenkörper {done} von {total} wird konvertiert", "file_load.inserting": "Geometrie wird eingefügt", + "file_load.link_item": "{name} ({done} von {total})", "file_load.opening": "Design wird geöffnet", "file_load.preparing_thumbnail": "Vorschaubild wird vorbereitet...", "file_load.preparing_view": "Ansicht wird vorbereitet...", @@ -1097,17 +1168,33 @@ "file_load.rebuilding": "Merkmal {done} von {total} wird neu aufgebaut", "file_load.recovering": "Design wird wiederhergestellt", "file_load.stopping": "Warten, bis der vorherige Vorgang beendet ist...", + "file_load.updating_links": "Verknüpfungen werden aktualisiert", "file_load.waiting": "Warten auf Dateivorgang", "fits the face, e.g. M8": "passt zur Fläche, z. B. M8", + "from the profile": "aus dem Profil", "from the rule": "aus der Regel", "help.apache": "Apache-Lizenz 2.0", "help.attributions": "Quellenangaben (ATTRIBUTION.md)", "help.build": "Version {version} · Commit {commit} · erstellt am {date}", + "help.connect_note": "Starten Sie jeden Assistenten neu, damit er den SolidCraft-Server lädt. Jede Datei wurde vor der Änderung als .bak gesichert.", + "help.connect_title": "KI-Assistenten verbinden", "help.font_details": "Die Oberfläche verwendet die integrierten Schriftarten von egui (Ubuntu Light und Hack unter der Ubuntu Font Licence und der MIT/Bitstream-Vera-Lizenz; Noto Emoji und die Emoji-Symbolschrift unter OFL und MIT). Skizzentext verwendet Liberation Sans (SIL OFL 1.1). Das optionale Schriftpaket craft-fonts von The Crafting Apps (BIZ UDPGothic, Shippori Mincho, BIZ UDMincho, Noto Sans CJK SC, Noto Sans Arabic; SIL OFL 1.1) ist nicht in SolidCraft-Builds enthalten.", "help.fonts": "Schriftarten", "help.licences": "Lizenzen", "help.mit": "MIT-Lizenz", "help.notice": "NOTICE", + "help.solid.chamfer": "Schneidet die gewählten Kanten mit einer ebenen Fase im eingestellten Abstand ab. Damit brechen Sie scharfe Kanten oder erleichtern das Einführen eines Stifts oder einer Schraube.", + "help.solid.combine": "Kombiniert Körper: vereinigt sie, zieht sie von einem Zielkörper ab oder behält nur das gemeinsame Volumen; die Werkzeugkörper können erhalten bleiben. Damit fügen Sie Teile zusammen, schneiden eine Form mit einer anderen aus oder finden, wo sich zwei Körper überschneiden.", + "help.solid.extrude": "Zieht ein Skizzenprofil über eine Strecke in die dritte Dimension und fügt dabei Material hinzu oder entfernt es. Damit machen Sie aus einer flachen Kontur einen Block, eine Erhebung oder eine Tasche.", + "help.solid.fillet": "Rundet die gewählten Kanten mit einem glatten Kreisübergang im eingestellten Radius ab. Damit entschärfen Sie scharfe Kanten für Festigkeit, Griffigkeit oder Optik.", + "help.solid.hole": "Bohrt an einem gewählten Punkt auf einer Fläche ein rundes Loch im eingestellten Durchmesser. Für Durchgangsbohrungen für Schrauben, Stifte und andere einfache runde Öffnungen.", + "help.solid.loft": "Erzeugt einen glatten Übergangskörper zwischen zwei oder mehr Skizzenprofilen oder von einem Profil zu einem Punkt. Für Übergänge, Trichter, Griffe und alle Formen, deren Querschnitt sich über die Länge ändert.", + "help.solid.mirror": "Erzeugt eine gespiegelte Kopie der gewählten Körper oder Features an einer Ebene und kann sie mit dem Original vereinigen. Für symmetrische Teile: Sie modellieren eine Hälfte und erhalten beide.", + "help.solid.pattern.circular": "Wiederholt die gewählten Objekte um eine Achse, mit der eingestellten Anzahl und dem Gesamtwinkel. Für Lochkreise, Speichen, Kühlrippen und Zähne.", + "help.solid.pattern.rectangular": "Wiederholt die gewählten Objekte in einer oder zwei Richtungen mit der eingestellten Anzahl und dem Abstand. Für Reihen und Raster von Bohrungen, Rippen, Stiften oder Füßen.", + "help.solid.revolve": "Dreht ein Skizzenprofil um eine Achse und erzeugt so einen runden Körper. Für Wellen, Knöpfe, Schalen und alle Teile, die um eine Mittellinie rund sind.", + "help.solid.shell": "Höhlt einen Körper aus, lässt Wände in der eingestellten Dicke stehen und kann gewählte Flächen öffnen. Für Kästen, Deckel und andere dünnwandige Teile.", + "help.solid.sweep": "Führt ein Skizzenprofil entlang eines Pfads und erzeugt so einen Körper. Für Rohre, Schienen, Griffe und alle Teile mit gleichbleibendem Querschnitt entlang einer Kurve.", "help.third_party": "Drittanbieterlizenzen", "home.back": "Zurück zu {name}", "home.crashes": "Absturzberichte", @@ -1187,6 +1274,8 @@ "joint.from_bodies_hint": "Jeder ausgewählte Körper kommt in eine eigene neue Komponente und bleibt, wo er ist.", "joint.one_body": "Beide Auswahlen liegen auf {body}. Wählen Sie die zweite auf einem anderen Teil.", "joint.one_component": "Diese Teile sind Körper einer Komponente: {bodies}. Ein Gelenk bewegt eine Komponente gegenüber einer anderen, daher braucht jedes Teil eine eigene Komponente.", + "joint.rigid_group_one_component": "Diese {count} Körper liegen alle in einer Komponente (oder direkt im Design): Verwenden Sie zuerst {command}.", + "joint.rigid_group_select_components": "Wählen Sie zwei oder mehr Komponenten aus.", "keymap.command_id": "Befehls-ID", "keymap.empty": "Keine passenden Befehle", "keymap.use_anyway": "{key} hier trotzdem verwenden", @@ -1197,8 +1286,49 @@ "manage.material_hint": "Wählen Sie Körper und deren physikalisches Material aus.", "manage.parameters_hint": "Bearbeiten Sie Ausdrücke und Einheiten. Änderungen werden mit der Eingabetaste oder beim Verlassen eines Feldes übernommen.", "manage.rules_hint": "Wählen Sie eine Regel zum Bearbeiten oder erstellen Sie eine neue. Bestätigen Sie, um die Regel zu speichern.", + "material.editor.add_property": "Eigenschaft hinzufügen", + "material.editor.add_source": "Quelle hinzufügen", + "material.editor.assigned_density": "Zugewiesene Dichte", + "material.editor.axes": "Materialachsen", "material.editor.axes_numeric": "1 / 2 / 3", "material.editor.axes_wood": "L / R / T", + "material.editor.copy_name": "Kopie von {name}", + "material.editor.density_range": "Die zugewiesene Dichte muss größer als 0 und höchstens 1000 g/cm³ sein.", + "material.editor.designation": "Bezeichnung", + "material.editor.duplicate": "Duplizieren", + "material.editor.engineering_card": "Technisches Datenblatt", + "material.editor.family": "Werkstoffgruppe", + "material.editor.glass": "Glas", + "material.editor.illustrative": "Beispielwerte", + "material.editor.invalid_property": "Nicht unterstützter Eigenschaftstyp.", + "material.editor.isotropic": "Isotrop", + "material.editor.measurement": "Messung", + "material.editor.metal": "Metall", + "material.editor.moisture": "Feuchte, bezogen auf Trockenmasse", + "material.editor.name_required": "Geben Sie einen Namen mit 1–128 Zeichen ein.", + "material.editor.no_draft": "Kein Materialentwurf geöffnet.", + "material.editor.number_required": "Geben Sie einen gültigen Zahlenwert ein.", + "material.editor.orthotropic": "Orthotrop", + "material.editor.other": "Sonstiges", + "material.editor.polymer": "Polymer", + "material.editor.preserved_appearance": "Beibehaltenes Erscheinungsbild", + "material.editor.public_reference": "Öffentliche Quelle", + "material.editor.reference": "Referenz", + "material.editor.save_or_discard": "Speichern oder verwerfen Sie den Materialentwurf, bevor Sie ein Material zuweisen.", + "material.editor.saved": "Material gespeichert. Körperzuweisungen bleiben unverändert.", + "material.editor.scope": "Speichern legt dieses Material ab, ohne es Körpern zuzuweisen. Leere Eigenschaften und Bedingungen bleiben unbekannt. Die Dichte im Datenblatt ändert weder die zugewiesene Dichte noch die Masse.", + "material.editor.source_id": "Quellen-ID", + "material.editor.source_kind": "Quellentyp", + "material.editor.source_title": "Quellentitel", + "material.editor.sources": "Quellen", + "material.editor.stale": "Dieses Material wurde geändert, während der Entwurf geöffnet war. Verwerfen und öffnen Sie es erneut, bevor Sie speichern.", + "material.editor.state": "Materialzustand", + "material.editor.strain_rate": "Dehnrate", + "material.editor.symmetry": "Elastische Symmetrie", + "material.editor.temperature": "Temperatur", + "material.editor.unknown_card": "Die technischen Eigenschaften sind unbekannt. Beim Speichern bleiben eventuell nur die zugewiesene Dichte und das vorhandene Erscheinungsbild erhalten.", + "material.editor.user_supplied": "Vom Benutzer angegeben", + "material.editor.wood": "Holz", "material.selection.choose": "Material auswählen", "material.selection.mixed": "Unterschiedliche Materialien", "measure.at": "Bei", @@ -1230,6 +1360,8 @@ "nav.free_orbit.help": "Maus und 3D-Maus drehen über beide Pole hinweg und behalten die Rollneigung bei. Das Einrasten mit Umschalt ist deaktiviert.", "nav.free_orbit.label": "Freie Drehung", "nav.free_orbit.snap_help": "Maus und 3D-Maus drehen über beide Pole hinweg und behalten die Rollausrichtung bei. Halten Sie beim Ziehen zum Drehen die Umschalttaste gedrückt, um Blickrichtung und Rollausrichtung einrasten zu lassen.", + "nav.free_orbit_upright.help": "Seitliches Ziehen mit der Maus dreht das Modell um die senkrechte Achse der Welt; Ziehen nach oben und unten neigt es ohne Begrenzung über den Pol hinweg.", + "nav.free_orbit_upright.label": "Um die senkrechte Achse drehen", "nav.fusion.help": "Mittlere Maustaste verschiebt, Umschalt+Mitte dreht, rechte Maustaste dreht", "nav.inventor.help": "Mittlere Maustaste verschiebt, Umschalt+Mitte dreht, Strg+Mitte zoomt, rechte Maustaste dreht", "nav.openscad.help": "Linksziehen auf leerem Hintergrund dreht, Umschalt+Linksziehen zieht ein Auswahlrechteck auf, Skizzengeometrie wird durch Ziehen bearbeitet; rechtes oder mittleres Ziehen verschiebt, Umschalt+rechtes oder Umschalt+mittleres Ziehen zoomt", diff --git a/assets/locales/en.json b/assets/locales/en.json index 97f75f5f0..f9e4f715b 100644 --- a/assets/locales/en.json +++ b/assets/locales/en.json @@ -1406,6 +1406,8 @@ "nav.free_orbit.help": "Mouse and 3D mouse rotate through both poles and preserve roll. Shift axis snapping is disabled.", "nav.free_orbit.label": "Free orbit", "nav.free_orbit.snap_help": "Mouse and 3D mouse rotate through both poles and preserve roll. Hold Shift during an orbit drag to snap the view direction and roll.", + "nav.free_orbit_upright.help": "Sideways mouse drags spin the model around the world's vertical axis; up and down drags tilt over the top without a limit.", + "nav.free_orbit_upright.label": "Turn around the vertical axis", "nav.fusion.help": "Middle drag pans, Shift+middle orbits, right drag orbits", "nav.inventor.help": "Middle drag pans, Shift+middle orbits, Ctrl+middle zooms, right drag orbits", "nav.openscad.help": "Left drag on empty space orbits, Shift+left drag box-selects, sketch geometry drags edit; right or middle drag pans, Shift+right or Shift+middle drag zooms", diff --git a/assets/locales/he.json b/assets/locales/he.json index 8809f2ede..9dc2b8f3e 100644 --- a/assets/locales/he.json +++ b/assets/locales/he.json @@ -1406,6 +1406,8 @@ "nav.free_orbit.help": "העכבר והעכבר התלת־ממדי מסובבים דרך שני הקטבים ושומרים על הגלגול. הצמדת הצירים עם Shift מושבתת.", "nav.free_orbit.label": "סיבוב חופשי", "nav.free_orbit.snap_help": "העכבר והעכבר התלת־ממדי מסובבים דרך שני הקטבים ושומרים על הגלגול. יש להחזיק את Shift בזמן גרירת סיבוב כדי להצמיד את כיוון התצוגה ואת הגלגול.", + "nav.free_orbit_upright.help": "גרירת העכבר הצידה מסובבת את המודל סביב הציר האנכי של העולם; גרירה למעלה ולמטה מטה אותו מעבר לקודקוד ללא הגבלה.", + "nav.free_orbit_upright.label": "סיבוב סביב הציר האנכי", "nav.fusion.help": "גרירה אמצעית מזיזה, Shift וגרירה אמצעית מסובבים, גרירה ימנית מסובבת", "nav.inventor.help": "גרירה אמצעית מזיזה, Shift וגרירה אמצעית מסובבים, Ctrl וגרירה אמצעית מבצעים זום, גרירה ימנית מסובבת", "nav.openscad.help": "גרירה שמאלית על שטח ריק מסובבת, Shift וגרירה שמאלית בוחרים במלבן, גרירת גאומטריית סקיצה עורכת אותה; גרירה ימנית או אמצעית מזיזה, Shift וגרירה ימנית או אמצעית מבצעים זום", diff --git a/assets/locales/ja.json b/assets/locales/ja.json index 2be770a31..27f004b4e 100644 --- a/assets/locales/ja.json +++ b/assets/locales/ja.json @@ -1406,6 +1406,8 @@ "nav.free_orbit.help": "マウスと3Dマウスで、極点を越えて回転し、ロールを保ちます。\nShiftによる軸スナップは無効になります。", "nav.free_orbit.label": "自由回転", "nav.free_orbit.snap_help": "マウスと3Dマウスで両極を越えて回転でき、ロールも保持されます。オービットのドラッグ中にShiftを押すと、視線方向とロールがスナップします。", + "nav.free_orbit_upright.help": "マウスを左右にドラッグするとワールドの垂直軸を中心にモデルが回転し、上下にドラッグすると制限なく真上を越えて傾きます。", + "nav.free_orbit_upright.label": "垂直軸を中心に回転", "nav.fusion.help": "中ドラッグでパン、Shift+中ドラッグで回転、右ドラッグで回転。", "nav.inventor.help": "中ドラッグでパン、Shift+中ドラッグで回転、Ctrl+中ドラッグでズーム、右ドラッグで回転。", "nav.openscad.help": "空きスペースで左ドラッグすると回転、Shift+左ドラッグで矩形選択、スケッチ ジオメトリはドラッグで編集。右または中ドラッグでパン、Shift+右または Shift+中ドラッグでズーム。", diff --git a/assets/locales/ko.json b/assets/locales/ko.json index 3e5a11679..c37db0bc9 100644 --- a/assets/locales/ko.json +++ b/assets/locales/ko.json @@ -1176,6 +1176,8 @@ "nav.free_orbit.help": "마우스와 3D 마우스로 롤을 유지하며 양 극점을 넘어 회전합니다. Shift 축 스냅은 비활성화됩니다.", "nav.free_orbit.label": "자유 회전", "nav.free_orbit.snap_help": "마우스와 3D 마우스로 양쪽 극점을 지나 회전할 수 있으며 롤 각도가 유지됩니다. 궤도 회전 드래그 중 Shift를 누르면 보기 방향과 롤 각도가 스냅됩니다.", + "nav.free_orbit_upright.help": "마우스를 좌우로 드래그하면 모델이 월드의 수직 축을 중심으로 회전하고, 위아래로 드래그하면 제한 없이 극점을 넘어 기울어집니다.", + "nav.free_orbit_upright.label": "수직 축을 중심으로 회전", "nav.fusion.help": "가운데 드래그는 이동, Shift+가운데 드래그는 회전, 오른쪽 드래그는 회전입니다", "nav.inventor.help": "가운데 드래그는 이동, Shift+가운데 드래그는 회전, Ctrl+가운데 드래그는 확대/축소, 오른쪽 드래그는 회전입니다", "nav.openscad.help": "빈 공간에서 왼쪽 드래그는 회전, Shift+왼쪽 드래그는 상자 선택, 스케치 형상 드래그는 편집입니다. 오른쪽 또는 가운데 드래그는 이동, Shift+오른쪽 또는 Shift+가운데 드래그는 확대/축소입니다", diff --git a/assets/locales/pending/de-batch-2.json b/assets/locales/pending/de-batch-2.json deleted file mode 100644 index 847b124e6..000000000 --- a/assets/locales/pending/de-batch-2.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "de": { - "ai.connected_toast": "SolidCraft ist jetzt in {clients} verfügbar. Starten Sie diese neu, um es zu nutzen (Einstellungen > Assistent).", - "ai.prefs.allow_control": "Verbindungen von KI-Agenten zulassen (Steuerkanal / MCP)", - "ai.prefs.allow_control_note": "Öffnet einen Steuerkanal nur auf diesem Computer (127.0.0.1, Port 27878 oder der nächste freie). Ein verbindendes Programm muss zusätzlich ein geheimes Token vorweisen, das nur Ihr Benutzerkonto lesen kann und bei jedem Start neu erzeugt wird. Wirkt ab dem nächsten Start von SolidCraft. Aus: Es wartet nichts auf Verbindungen, außer Sie starten SolidCraft mit --control.", - "ai.prefs.availability": "Assistenten-Steuerung", - "ai.prefs.background_commands": "Agentenbefehle im Hintergrund ausführen", - "ai.prefs.connect_apps": "SolidCraft für KI-Apps auf diesem Computer verfügbar machen", - "ai.prefs.connect_apps_note": "Trägt SolidCraft beim Start als MCP-Server in die auf diesem Computer gefundenen KI-Apps ein (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), damit ein Agent es ohne Einrichtung nutzen kann. Nur der Eintrag „solidcraft“ wird hinzugefügt oder sein Pfad aktualisiert; ein von Ihnen geänderter Eintrag bleibt unberührt, und die Datei wird vorher gesichert. Aus: Die hinzugefügten Einträge werden entfernt. Hilfe > KI-Assistenten verbinden… erledigt das von Hand.", - "ai.prefs.follow_camera": "Kamera zu Skizzen drehen", - "ai.prefs.follow_camera_off": "Die automatische Kameraführung ist aus.", - "ai.prefs.follow_camera_on": "Die Kamera dreht sich zu Skizzen, die der Agent erstellt.", - "ai.prefs.intro": "Agenten, Berechtigungen und wie ihre Arbeit angezeigt wird.", - "ai.prefs.make_default": "Standardmäßig verwenden", - "ai.prefs.no_agents": "Noch keine Agenten. Fügen Sie einen Agenten hinzu oder aktualisieren Sie, um installierte Agenten zu finden.", - "ai.prefs.no_saved_approvals": "Keine gespeicherten Freigaben.", - "ai.prefs.override_all_warning": "Dieser Agent darf das Design ohne Rückfrage speichern, überschreiben, exportieren oder ersetzen.", - "ai.prefs.permission_all": "Alles erlauben", - "ai.prefs.permission_all_summary": "Verfügbare SolidCraft-Werkzeuge werden ohne Rückfrage ausgeführt.", - "ai.prefs.permission_ask": "Vor Änderungen fragen", - "ai.prefs.permission_ask_summary": "Jede Designänderung und Dateiaktion bestätigen.", - "ai.prefs.permission_edits": "Modelländerungen erlauben", - "ai.prefs.permission_edits_summary": "Modelländerungen werden ohne Rückfrage ausgeführt; Datei- und destruktive Aktionen fragen weiterhin nach.", - "ai.prefs.permission_scope": "Gilt nur für SolidCraft-Werkzeuge. Shell und Dateiänderungen des Agenten unterliegen dessen eigenen Berechtigungen.", - "ai.prefs.pointer_preview_hidden": "Zeiger ausgeblendet", - "ai.prefs.pointer_preview_speed": "Agentenzeiger · {speed}", - "ai.prefs.pointer_speed": "Bewegungsgeschwindigkeit", - "ai.prefs.privacy_note": "Die Unterhaltung geht nur an den von Ihnen gewählten Agenten oder API-Endpunkt. API-Schlüssel werden im Schlüsselbund des Systems gespeichert.", - "ai.prefs.show_pointer": "Agentenzeiger anzeigen", - "ai.prefs.turn_limit_hint": "Höchstzahl designändernder Werkzeugaufrufe, die der Assistent für eine Nachricht ausführen darf.", - "cmd.browser_collapse_all": "Alles einklappen", - "cmd.browser_expand_all": "Alles ausklappen", - "cmd.component_cycle_color": "Komponentenfarbe wechseln", - "cmd.inspect_colored_components": "Komponentenfarben einschalten", - "cmd.inspect_colored_components_disable": "Komponentenfarben ausschalten", - "cmd.inspect_parameter_sweep": "Parametervariation", - "cmd.motion_trace_edit": "Bewegungsbahn bearbeiten", - "cmd.occurrence_drag": "Instanz ziehen", - "cmd.render_aging_describe": "Mehrschichtige Oberflächenalterung", - "cmd.render_effects_describe": "Objektiv- und Kreativeffekte", - "cmd.render_library_preview": "Originale Oberflächentextur anzeigen", - "cmd.render_optics_bind": "Optische Einstellungen zuweisen", - "cmd.render_optics_unbind": "Zuweisung optischer Einstellungen entfernen", - "cmd.render_preset_apply": "Studio-Voreinstellung anwenden", - "cmd.render_preset_resolve": "Studio-Voreinstellung überprüfen", - "cmd.render_quality_prepare": "Festes Sampling-Budget überprüfen", - "cmd.render_result_regrade": "Lineares Master-Rendering erneut farbkorrigieren", - "cmd.render_shot_duplicate": "Render-Aufnahme duplizieren", - "cmd.render_shot_remove": "Render-Aufnahme entfernen", - "cmd.render_shot_rename": "Render-Aufnahme umbenennen", - "cmd.sheet_path_flange": "Pfadflansch", - "cmd.sketch_cancel": "Skizze abbrechen", - "cmd.view_back": "Rückansicht", - "cmd.view_bottom": "Untersicht", - "cmd.view_front": "Vorderansicht", - "cmd.view_isometric": "Isometrische Ansicht", - "cmd.view_left": "Linke Seitenansicht", - "cmd.view_right": "Rechte Seitenansicht", - "cmd.view_top": "Draufsicht", - "diagnostic.empty_boolean_component": "In Komponente '{component}' gibt es keinen Körper zum Abziehen oder für eine Schnittmenge; das Werkzeug überschneidet sich eventuell mit '{body}' in Komponente '{other}' – aktivieren Sie diese Komponente oder wählen Sie den Körper als Ziel", - "document.changed_on_disk": "{name} wurde auf dem Datenträger geändert", - "document.changed_on_disk_detail": "{name} wurde seit dem Öffnen oder letzten Speichern von einem anderen Programm oder Computer geändert. „Überschreiben“ ersetzt diese Änderungen durch Ihre; „Kopie speichern“ behält beide.", - "document.copy_name": "{name} - Kopie", - "document.open_anyway": "Trotzdem öffnen", - "document.open_elsewhere": "{name} ist bereits geöffnet", - "document.open_elsewhere_detail": "{name} ist in SolidCraft {app} auf {who} geöffnet, seit {when}. Wenn Sie beide speichern, verliert einer von Ihnen Arbeit. Öffnen Sie die Datei schreibgeschützt, um sie anzusehen, ohne sie zu überschreiben.", - "document.open_read_only": "Schreibgeschützt öffnen", - "document.opened_read_only": "Schreibgeschützt geöffnet: Speichern fragt nach einer neuen Datei", - "document.overwrite": "Überschreiben", - "document.read_only_save": "Dieses Design wurde schreibgeschützt geöffnet: Speichern Sie es als neue Datei", - "document.save_copy": "Kopie speichern…", - "file.open.drawing_filter": "Designs, CAD-Dateien, Netze und Zeichnungen", - "file_load.link_item": "{name} ({done} von {total})", - "file_load.updating_links": "Verknüpfungen werden aktualisiert", - "from the profile": "aus dem Profil", - "help.connect_note": "Starten Sie jeden Assistenten neu, damit er den SolidCraft-Server lädt. Jede Datei wurde vor der Änderung als .bak gesichert.", - "help.connect_title": "KI-Assistenten verbinden", - "help.solid.chamfer": "Schneidet die gewählten Kanten mit einer ebenen Fase im eingestellten Abstand ab. Damit brechen Sie scharfe Kanten oder erleichtern das Einführen eines Stifts oder einer Schraube.", - "help.solid.combine": "Kombiniert Körper: vereinigt sie, zieht sie von einem Zielkörper ab oder behält nur das gemeinsame Volumen; die Werkzeugkörper können erhalten bleiben. Damit fügen Sie Teile zusammen, schneiden eine Form mit einer anderen aus oder finden, wo sich zwei Körper überschneiden.", - "help.solid.extrude": "Zieht ein Skizzenprofil über eine Strecke in die dritte Dimension und fügt dabei Material hinzu oder entfernt es. Damit machen Sie aus einer flachen Kontur einen Block, eine Erhebung oder eine Tasche.", - "help.solid.fillet": "Rundet die gewählten Kanten mit einem glatten Kreisübergang im eingestellten Radius ab. Damit entschärfen Sie scharfe Kanten für Festigkeit, Griffigkeit oder Optik.", - "help.solid.hole": "Bohrt an einem gewählten Punkt auf einer Fläche ein rundes Loch im eingestellten Durchmesser. Für Durchgangsbohrungen für Schrauben, Stifte und andere einfache runde Öffnungen.", - "help.solid.loft": "Erzeugt einen glatten Übergangskörper zwischen zwei oder mehr Skizzenprofilen oder von einem Profil zu einem Punkt. Für Übergänge, Trichter, Griffe und alle Formen, deren Querschnitt sich über die Länge ändert.", - "help.solid.mirror": "Erzeugt eine gespiegelte Kopie der gewählten Körper oder Features an einer Ebene und kann sie mit dem Original vereinigen. Für symmetrische Teile: Sie modellieren eine Hälfte und erhalten beide.", - "help.solid.pattern.circular": "Wiederholt die gewählten Objekte um eine Achse, mit der eingestellten Anzahl und dem Gesamtwinkel. Für Lochkreise, Speichen, Kühlrippen und Zähne.", - "help.solid.pattern.rectangular": "Wiederholt die gewählten Objekte in einer oder zwei Richtungen mit der eingestellten Anzahl und dem Abstand. Für Reihen und Raster von Bohrungen, Rippen, Stiften oder Füßen.", - "help.solid.revolve": "Dreht ein Skizzenprofil um eine Achse und erzeugt so einen runden Körper. Für Wellen, Knöpfe, Schalen und alle Teile, die um eine Mittellinie rund sind.", - "help.solid.shell": "Höhlt einen Körper aus, lässt Wände in der eingestellten Dicke stehen und kann gewählte Flächen öffnen. Für Kästen, Deckel und andere dünnwandige Teile.", - "help.solid.sweep": "Führt ein Skizzenprofil entlang eines Pfads und erzeugt so einen Körper. Für Rohre, Schienen, Griffe und alle Teile mit gleichbleibendem Querschnitt entlang einer Kurve.", - "joint.rigid_group_one_component": "Diese {count} Körper liegen alle in einer Komponente (oder direkt im Design): Verwenden Sie zuerst {command}.", - "joint.rigid_group_select_components": "Wählen Sie zwei oder mehr Komponenten aus.", - "material.editor.add_property": "Eigenschaft hinzufügen", - "material.editor.add_source": "Quelle hinzufügen", - "material.editor.assigned_density": "Zugewiesene Dichte", - "material.editor.axes": "Materialachsen", - "material.editor.copy_name": "Kopie von {name}", - "material.editor.density_range": "Die zugewiesene Dichte muss größer als 0 und höchstens 1000 g/cm³ sein.", - "material.editor.designation": "Bezeichnung", - "material.editor.duplicate": "Duplizieren", - "material.editor.engineering_card": "Technisches Datenblatt", - "material.editor.family": "Werkstoffgruppe", - "material.editor.glass": "Glas", - "material.editor.illustrative": "Beispielwerte", - "material.editor.invalid_property": "Nicht unterstützter Eigenschaftstyp.", - "material.editor.isotropic": "Isotrop", - "material.editor.measurement": "Messung", - "material.editor.metal": "Metall", - "material.editor.moisture": "Feuchte, bezogen auf Trockenmasse", - "material.editor.name_required": "Geben Sie einen Namen mit 1–128 Zeichen ein.", - "material.editor.no_draft": "Kein Materialentwurf geöffnet.", - "material.editor.number_required": "Geben Sie einen gültigen Zahlenwert ein.", - "material.editor.orthotropic": "Orthotrop", - "material.editor.other": "Sonstiges", - "material.editor.polymer": "Polymer", - "material.editor.preserved_appearance": "Beibehaltenes Erscheinungsbild", - "material.editor.public_reference": "Öffentliche Quelle", - "material.editor.reference": "Referenz", - "material.editor.save_or_discard": "Speichern oder verwerfen Sie den Materialentwurf, bevor Sie ein Material zuweisen.", - "material.editor.saved": "Material gespeichert. Körperzuweisungen bleiben unverändert.", - "material.editor.scope": "Speichern legt dieses Material ab, ohne es Körpern zuzuweisen. Leere Eigenschaften und Bedingungen bleiben unbekannt. Die Dichte im Datenblatt ändert weder die zugewiesene Dichte noch die Masse.", - "material.editor.source_id": "Quellen-ID", - "material.editor.source_kind": "Quellentyp", - "material.editor.source_title": "Quellentitel", - "material.editor.sources": "Quellen", - "material.editor.stale": "Dieses Material wurde geändert, während der Entwurf geöffnet war. Verwerfen und öffnen Sie es erneut, bevor Sie speichern.", - "material.editor.state": "Materialzustand", - "material.editor.strain_rate": "Dehnrate", - "material.editor.symmetry": "Elastische Symmetrie", - "material.editor.temperature": "Temperatur", - "material.editor.unknown_card": "Die technischen Eigenschaften sind unbekannt. Beim Speichern bleiben eventuell nur die zugewiesene Dichte und das vorhandene Erscheinungsbild erhalten.", - "material.editor.user_supplied": "Vom Benutzer angegeben", - "material.editor.wood": "Holz" - } -} diff --git a/assets/locales/pending/free-orbit-upright.json b/assets/locales/pending/free-orbit-upright.json deleted file mode 100644 index 505a2b2f2..000000000 --- a/assets/locales/pending/free-orbit-upright.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "en": { - "nav.free_orbit_upright.label": "Turn around the vertical axis", - "nav.free_orbit_upright.help": "Sideways mouse drags spin the model around the world's vertical axis; up and down drags tilt over the top without a limit." - }, - "ar": { - "nav.free_orbit_upright.label": "الدوران حول المحور الرأسي", - "nav.free_orbit_upright.help": "سحب الفأرة جانبيًا يدوّر النموذج حول المحور الرأسي للعالم؛ والسحب لأعلى ولأسفل يميله فوق القمة دون حد." - }, - "de": { - "nav.free_orbit_upright.label": "Um die senkrechte Achse drehen", - "nav.free_orbit_upright.help": "Seitliches Ziehen mit der Maus dreht das Modell um die senkrechte Achse der Welt; Ziehen nach oben und unten neigt es ohne Begrenzung über den Pol hinweg." - }, - "he": { - "nav.free_orbit_upright.label": "סיבוב סביב הציר האנכי", - "nav.free_orbit_upright.help": "גרירת העכבר הצידה מסובבת את המודל סביב הציר האנכי של העולם; גרירה למעלה ולמטה מטה אותו מעבר לקודקוד ללא הגבלה." - }, - "ja": { - "nav.free_orbit_upright.label": "垂直軸を中心に回転", - "nav.free_orbit_upright.help": "マウスを左右にドラッグするとワールドの垂直軸を中心にモデルが回転し、上下にドラッグすると制限なく真上を越えて傾きます。" - }, - "ko": { - "nav.free_orbit_upright.label": "수직 축을 중심으로 회전", - "nav.free_orbit_upright.help": "마우스를 좌우로 드래그하면 모델이 월드의 수직 축을 중심으로 회전하고, 위아래로 드래그하면 제한 없이 극점을 넘어 기울어집니다." - }, - "vi": { - "nav.free_orbit_upright.label": "Xoay quanh trục thẳng đứng", - "nav.free_orbit_upright.help": "Kéo chuột sang ngang sẽ xoay mô hình quanh trục thẳng đứng của không gian; kéo lên và xuống sẽ nghiêng qua đỉnh mà không bị giới hạn." - }, - "zh": { - "nav.free_orbit_upright.label": "绕竖直轴旋转", - "nav.free_orbit_upright.help": "左右拖动鼠标时模型绕世界竖直轴旋转;上下拖动可不受限制地越过顶部倾斜。" - } -} diff --git a/assets/locales/vi.json b/assets/locales/vi.json index 0fa3ea7d4..62faed5f7 100644 --- a/assets/locales/vi.json +++ b/assets/locales/vi.json @@ -1406,6 +1406,8 @@ "nav.free_orbit.help": "Chuột và chuột 3D xoay tự do qua cả hai cực và giữ nguyên độ lăn nghiêng (Roll). Bắt dính trục bằng phím Shift sẽ bị tắt.", "nav.free_orbit.label": "Xoay góc nhìn tự do", "nav.free_orbit.snap_help": "Chuột và chuột 3D xoay qua cả hai cực và giữ nguyên góc nghiêng cuộn. Giữ Shift trong khi kéo xoay quỹ đạo để bắt dính hướng nhìn và góc nghiêng cuộn.", + "nav.free_orbit_upright.help": "Kéo chuột sang ngang sẽ xoay mô hình quanh trục thẳng đứng của không gian; kéo lên và xuống sẽ nghiêng qua đỉnh mà không bị giới hạn.", + "nav.free_orbit_upright.label": "Xoay quanh trục thẳng đứng", "nav.fusion.help": "Kéo chuột giữa để trượt, Shift + chuột giữa để xoay, kéo chuột phải để xoay", "nav.inventor.help": "Kéo chuột giữa để trượt, Shift + chuột giữa để xoay, Ctrl + chuột giữa để thu phóng, kéo chuột phải để xoay", "nav.openscad.help": "Kéo chuột trái trên vùng trống để xoay, Shift + chuột trái để quét chọn vùng, kéo hình học phác thảo để chỉnh sửa; kéo chuột phải hoặc chuột giữa để trượt, Shift + kéo chuột phải hoặc chuột giữa để thu phóng", diff --git a/assets/locales/zh.json b/assets/locales/zh.json index 041fbc45c..973ef5190 100644 --- a/assets/locales/zh.json +++ b/assets/locales/zh.json @@ -1406,6 +1406,8 @@ "nav.free_orbit.help": "鼠标和3D鼠标可保持滚转并越过两个极点旋转。Shift轴吸附将被禁用。", "nav.free_orbit.label": "自由旋转", "nav.free_orbit.snap_help": "鼠标和3D鼠标可越过两极旋转,并保留画面旋转角度。在拖动环绕时按住Shift,可吸附视图方向和画面旋转角度。", + "nav.free_orbit_upright.help": "左右拖动鼠标时模型绕世界竖直轴旋转;上下拖动可不受限制地越过顶部倾斜。", + "nav.free_orbit_upright.label": "绕竖直轴旋转", "nav.fusion.help": "中键拖动平移,Shift+中键拖动旋转,右键拖动旋转", "nav.inventor.help": "中键拖动平移,Shift+中键拖动旋转,Ctrl+中键拖动缩放,右键拖动旋转", "nav.openscad.help": "在空白处左键拖动旋转,Shift+左键拖动框选,拖动草图几何可编辑;右键或中键拖动平移,Shift+右键或 Shift+中键拖动缩放", From a6ef3ee4d263f1d622a9c4694a951486aaac902f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 20:57:39 +0000 Subject: [PATCH 095/102] Regenerate generated files and fold pending files [skip ci] --- assets/locales/ar.json | 12 +- assets/locales/cs.json | 6 + assets/locales/da.json | 6 + assets/locales/de.json | 12 +- assets/locales/en-GB.json | 6 + assets/locales/en.json | 12 +- assets/locales/es.json | 6 + assets/locales/fr.json | 6 + assets/locales/gl.json | 6 + assets/locales/he.json | 12 +- assets/locales/hu.json | 6 + assets/locales/id.json | 6 + assets/locales/it.json | 6 + assets/locales/ja.json | 12 +- assets/locales/ko.json | 8 + assets/locales/ms.json | 6 + assets/locales/nb.json | 6 + assets/locales/nl.json | 6 + .../pending/issue-report-ctrl-enter.json | 30 --- .../locales/pending/save-mesh-add-bodies.json | 10 - assets/locales/pending/theme-follow.json | 226 ------------------ assets/locales/pl.json | 6 + assets/locales/pt-BR.json | 6 + assets/locales/ro.json | 6 + assets/locales/ru.json | 6 + assets/locales/sv.json | 6 + assets/locales/tr.json | 6 + assets/locales/uk.json | 6 + assets/locales/vi.json | 12 +- assets/locales/zh-TW.json | 6 + assets/locales/zh.json | 12 +- 31 files changed, 205 insertions(+), 273 deletions(-) delete mode 100644 assets/locales/pending/issue-report-ctrl-enter.json delete mode 100644 assets/locales/pending/save-mesh-add-bodies.json delete mode 100644 assets/locales/pending/theme-follow.json diff --git a/assets/locales/ar.json b/assets/locales/ar.json index 7624c6242..5e6c525b4 100644 --- a/assets/locales/ar.json +++ b/assets/locales/ar.json @@ -22,10 +22,12 @@ "Add Mid Radius": "إضافة نصف قطر أوسط", "Add Row": "إضافة صف", "Add a tool": "إضافة أداة", + "Add all bodies": "إضافة كل الأجسام", "Add bend": "إضافة ثني", "Add condition": "إضافة شرط", "Add or edit rule": "إضافة قاعدة أو تعديلها", "Add to New Folder": "إضافة إلى مجلد جديد", + "Add visible bodies": "إضافة الأجسام المرئية", "Advanced": "متقدم", "Against": "مقابل", "Alignment": "المحاذاة", @@ -141,6 +143,7 @@ "Create Issue — review draft": "إنشاء بلاغ — مراجعة المسودة", "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": "العرض المنظوري الحالي", @@ -1586,6 +1589,12 @@ "prefs.supersampling_brief": "يرسم العرض بحجم أكبر ثم يصغّره: حاد جدًا لكنه أثقل.", "prefs.tab_accent_note": "لون التمييز يتبع التبويب النشط", "prefs.theme_file": "ملف السمة", + "prefs.theme_follow": "اتباع ملف سمة", + "prefs.theme_follow_error": "لم يُطبّق: {error}. تبقى آخر سمة سليمة مفعّلة.", + "prefs.theme_follow_launch": "يُتّبع لهذه الجلسة فقط (--theme-file)؛ يُعاد تحميله كلما أعادت أداة أخرى كتابته.", + "prefs.theme_follow_note": "يُعاد تحميله كلما أعادت أداة أخرى كتابته. اختيار سمة يوقف اتباعه.", + "prefs.theme_follow_off": "إيقاف", + "prefs.theme_follow_stop": "إيقاف الاتباع", "prefs.timeline_half_hour": "−30 دقيقة", "prefs.timeline_now": "الآن", "prefs.timeline_quarter_hour": "−15", @@ -3397,5 +3406,6 @@ "web.open_link": "فتح التصميم المرتبط؟", "web.open_link_confirm": "توجد تغييرات غير محفوظة. هل تريد فتح التصميم المرتبط في تبويب جديد؟", "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ اختيار · Enter / Tab إكمال · Esc إغلاق", - "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ اختيار · Enter يطبّق ما كتبته · Esc إغلاق" + "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ اختيار · Enter يطبّق ما كتبته · Esc إغلاق", + "⌘Enter continues on GitHub.": "⌘Enter يتابع في GitHub." } diff --git a/assets/locales/cs.json b/assets/locales/cs.json index d6ddbd31e..6264c3dbd 100644 --- a/assets/locales/cs.json +++ b/assets/locales/cs.json @@ -1016,6 +1016,12 @@ "pick one or two vertices, edges or faces": "vyberte jeden nebo dva vrcholy, hrany či plochy", "prefs.cpu": "CPU (softwarově)", "prefs.minutes_suffix": " min", + "prefs.theme_follow": "Sledovat soubor motivu", + "prefs.theme_follow_error": "Nepoužito: {error}. Zůstává poslední funkční motiv.", + "prefs.theme_follow_launch": "Sledování jen pro toto spuštění (--theme-file); načte se znovu při každém přepsání jiným nástrojem.", + "prefs.theme_follow_note": "Načte se znovu při každém přepsání jiným nástrojem. Výběr motivu sledování ukončí.", + "prefs.theme_follow_off": "Vypnuto", + "prefs.theme_follow_stop": "Ukončit sledování", "properties.title": "Vlastnosti: {name}", "recovery.days_ago": "před {count} dny", "recovery.detail": "{file} · prvků: {features} · automaticky uloženo {when}", diff --git a/assets/locales/da.json b/assets/locales/da.json index f95605f38..d2c16ee77 100644 --- a/assets/locales/da.json +++ b/assets/locales/da.json @@ -1324,6 +1324,12 @@ "prefs.supersampling_brief": "Tegner visningen i større størrelse og nedskalerer den med filtrering: meget skarpt og mere krævende.", "prefs.tab_accent_note": "Accentfarven følger den aktive fane", "prefs.theme_file": "temafil", + "prefs.theme_follow": "Følg en temafil", + "prefs.theme_follow_error": "Ikke anvendt: {error}. Det seneste gyldige tema bevares.", + "prefs.theme_follow_launch": "Følges kun denne gang (--theme-file); genindlæses, når et andet værktøj overskriver filen.", + "prefs.theme_follow_note": "Genindlæses, når et andet værktøj overskriver filen. Valg af et tema stopper dette.", + "prefs.theme_follow_off": "Fra", + "prefs.theme_follow_stop": "Stop med at følge", "prefs.timeline_half_hour": "−30 min", "prefs.timeline_now": "nu", "prefs.timeline_quarter_hour": "−15", diff --git a/assets/locales/de.json b/assets/locales/de.json index 5f6f25657..33c5cea2c 100644 --- a/assets/locales/de.json +++ b/assets/locales/de.json @@ -22,10 +22,12 @@ "Add Mid Radius": "Mittleren Radius hinzufügen", "Add Row": "Zeile hinzufügen", "Add a tool": "Werkzeug hinzufügen", + "Add all bodies": "Alle Körper hinzufügen", "Add bend": "Biegung hinzufügen", "Add condition": "Bedingung hinzufügen", "Add or edit rule": "Regel hinzufügen oder bearbeiten", "Add to New Folder": "Zu neuem Ordner hinzufügen", + "Add visible bodies": "Sichtbare Körper hinzufügen", "Advanced": "Erweitert", "Against": "Gegen", "Alignment": "Ausrichtung", @@ -140,6 +142,7 @@ "Create Issue — review draft": "Issue erstellen — Entwurf prüfen", "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", @@ -1398,6 +1401,12 @@ "prefs.history_origin_bodies": "Ursprung und Körper oben zeigen", "prefs.history_origin_bodies_note": "Der Verlauf links oder unter dem Browser beginnt mit dem Körper-Ordner der aktiven Komponente und dem Ursprung, mit Augen und Menüs wie im Browser. Der Verlauf unten bleibt unverändert.", "prefs.minutes_suffix": " min", + "prefs.theme_follow": "Einer Designdatei folgen", + "prefs.theme_follow_error": "Nicht angewendet: {error}. Das letzte gültige Design bleibt aktiv.", + "prefs.theme_follow_launch": "Nur für diesen Start (--theme-file); wird neu geladen, sobald ein anderes Werkzeug die Datei überschreibt.", + "prefs.theme_follow_note": "Wird neu geladen, sobald ein anderes Werkzeug die Datei überschreibt. Die Auswahl eines Designs beendet das Folgen.", + "prefs.theme_follow_off": "Aus", + "prefs.theme_follow_stop": "Nicht mehr folgen", "properties.title": "Eigenschaften: {name}", "recovery.days_ago": "vor {count} Tagen", "recovery.detail": "{file} · {features} Merkmale · automatisch gespeichert {when}", @@ -2606,5 +2615,6 @@ "update.up_to_date": "SolidCraft ist aktuell.", "update.update_now": "Jetzt aktualisieren", "update.you_have": "Installiert ist {version}.", - "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ auswählen · Eingabe / Tab vervollständigen · Esc schließen" + "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ auswählen · Eingabe / Tab vervollständigen · Esc schließen", + "⌘Enter continues on GitHub.": "⌘Enter geht weiter zu GitHub." } diff --git a/assets/locales/en-GB.json b/assets/locales/en-GB.json index 235431930..3180b08f1 100644 --- a/assets/locales/en-GB.json +++ b/assets/locales/en-GB.json @@ -17,6 +17,12 @@ "cmd.sketch_slot_center_point": "Centre Point Slot", "cmd.sketch_slot_center_to_center": "Centre to Centre Slot", "pattern.alignment_hint": "Counts include the original. Centre balances copies; Flip chooses the extra side for even totals.", + "prefs.theme_follow": "Follow a theme file", + "prefs.theme_follow_error": "Not applied: {error}. The last good theme stays on.", + "prefs.theme_follow_launch": "Followed for this run only (--theme-file); reloaded whenever another tool rewrites it.", + "prefs.theme_follow_note": "Reloaded whenever another tool rewrites it. Choosing a theme stops following it.", + "prefs.theme_follow_off": "Off", + "prefs.theme_follow_stop": "Stop following", "render.aging_add": "Add aging layer", "render.aging_airborne": "Airborne dust / participating medium", "render.aging_airborne_help": "Airborne dust is a separate finite homogeneous scattering volume. It changes transport and raw EXR, not the surface-aging stack. Existing volume/glass/denoising restrictions remain explicit; no atmosphere is added automatically.", diff --git a/assets/locales/en.json b/assets/locales/en.json index f9e4f715b..19c6bcccf 100644 --- a/assets/locales/en.json +++ b/assets/locales/en.json @@ -22,10 +22,12 @@ "Add Mid Radius": "Add Mid Radius", "Add Row": "Add Row", "Add a tool": "Add a tool", + "Add all bodies": "Add all bodies", "Add bend": "Add bend", "Add condition": "Add condition", "Add or edit rule": "Add or edit rule", "Add to New Folder": "Add to New Folder", + "Add visible bodies": "Add visible bodies", "Advanced": "Advanced", "Against": "Against", "Alignment": "Alignment", @@ -141,6 +143,7 @@ "Create Issue — review draft": "Create Issue — review draft", "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", @@ -1586,6 +1589,12 @@ "prefs.supersampling_brief": "Draws the view larger and filters it down: very crisp, and heavier.", "prefs.tab_accent_note": "The accent follows the active tab", "prefs.theme_file": "theme file", + "prefs.theme_follow": "Follow a theme file", + "prefs.theme_follow_error": "Not applied: {error}. The last good theme stays on.", + "prefs.theme_follow_launch": "Followed for this run only (--theme-file); reloaded whenever another tool rewrites it.", + "prefs.theme_follow_note": "Reloaded whenever another tool rewrites it. Choosing a theme stops following it.", + "prefs.theme_follow_off": "Off", + "prefs.theme_follow_stop": "Stop following", "prefs.timeline_half_hour": "−30 min", "prefs.timeline_now": "now", "prefs.timeline_quarter_hour": "−15", @@ -3397,5 +3406,6 @@ "web.open_link": "Open linked design?", "web.open_link_confirm": "There are unsaved changes. Open the linked design in a new tab?", "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ choose · Enter / Tab complete · Esc dismiss", - "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ choose · Enter applies what you typed · Esc dismiss" + "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ choose · Enter applies what you typed · Esc dismiss", + "⌘Enter continues on GitHub.": "⌘Enter continues on GitHub." } diff --git a/assets/locales/es.json b/assets/locales/es.json index f6677c6de..437e035a0 100644 --- a/assets/locales/es.json +++ b/assets/locales/es.json @@ -1090,6 +1090,12 @@ "pick one or two vertices, edges or faces": "selecciona uno o dos vértices, aristas o caras", "prefs.cpu": "CPU (software)", "prefs.minutes_suffix": " min", + "prefs.theme_follow": "Seguir un archivo de tema", + "prefs.theme_follow_error": "No aplicado: {error}. Se mantiene el último tema válido.", + "prefs.theme_follow_launch": "Solo en esta sesión (--theme-file); se recarga cada vez que otra herramienta reescribe el archivo.", + "prefs.theme_follow_note": "Se recarga cada vez que otra herramienta reescribe el archivo. Elegir un tema deja de seguirlo.", + "prefs.theme_follow_off": "Desactivado", + "prefs.theme_follow_stop": "Dejar de seguir", "properties.title": "Propiedades: {name}", "recovery.days_ago": "hace {count} días", "recovery.detail": "{file} · {features} operaciones · autoguardado {when}", diff --git a/assets/locales/fr.json b/assets/locales/fr.json index f1bc7e283..92e0b640e 100644 --- a/assets/locales/fr.json +++ b/assets/locales/fr.json @@ -1491,6 +1491,12 @@ "prefs.supersampling_brief": "Dessine la vue en plus grand puis la réduit par filtrage : très net, mais plus lourd.", "prefs.tab_accent_note": "La couleur d'accent suit l'onglet actif", "prefs.theme_file": "fichier de thème", + "prefs.theme_follow": "Suivre un fichier de thème", + "prefs.theme_follow_error": "Non appliqué : {error}. Le dernier thème valide reste actif.", + "prefs.theme_follow_launch": "Suivi pour cette session uniquement (--theme-file) ; rechargé dès qu’un autre outil réécrit le fichier.", + "prefs.theme_follow_note": "Rechargé dès qu’un autre outil réécrit le fichier. Choisir un thème arrête le suivi.", + "prefs.theme_follow_off": "Désactivé", + "prefs.theme_follow_stop": "Arrêter le suivi", "prefs.timeline_half_hour": "−30 min", "prefs.timeline_now": "maintenant", "prefs.timeline_quarter_hour": "−15", diff --git a/assets/locales/gl.json b/assets/locales/gl.json index d87872b13..36fce7862 100644 --- a/assets/locales/gl.json +++ b/assets/locales/gl.json @@ -1003,6 +1003,12 @@ "pick one or two vertices, edges or faces": "escolle un ou dous vértices, arestas ou caras", "prefs.cpu": "CPU (software)", "prefs.minutes_suffix": " min", + "prefs.theme_follow": "Seguir un ficheiro de tema", + "prefs.theme_follow_error": "Non aplicado: {error}. Mantense o último tema válido.", + "prefs.theme_follow_launch": "Só nesta sesión (--theme-file); vólvese cargar cando outra ferramenta reescribe o ficheiro.", + "prefs.theme_follow_note": "Vólvese cargar cando outra ferramenta reescribe o ficheiro. Escoller un tema detén o seguimento.", + "prefs.theme_follow_off": "Desactivado", + "prefs.theme_follow_stop": "Deixar de seguir", "properties.title": "Propiedades: {name}", "recovery.days_ago": "hai {count} días", "recovery.detail": "{file} · {features} operacións · gardado automaticamente {when}", diff --git a/assets/locales/he.json b/assets/locales/he.json index 9dc2b8f3e..db2547f77 100644 --- a/assets/locales/he.json +++ b/assets/locales/he.json @@ -22,10 +22,12 @@ "Add Mid Radius": "הוספת רדיוס ביניים", "Add Row": "הוספת שורה", "Add a tool": "הוספת כלי", + "Add all bodies": "הוספת כל הגופים", "Add bend": "הוספת כיפוף", "Add condition": "הוספת תנאי", "Add or edit rule": "הוספה או עריכה של כלל", "Add to New Folder": "הוספה לתיקייה חדשה", + "Add visible bodies": "הוספת הגופים הגלויים", "Advanced": "מתקדם", "Against": "מול", "Alignment": "יישור", @@ -141,6 +143,7 @@ "Create Issue — review draft": "יצירת דיווח — בדיקת הטיוטה", "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": "תצוגת הפרספקטיבה הנוכחית", @@ -1586,6 +1589,12 @@ "prefs.supersampling_brief": "מצייר את המבט גדול יותר ומקטין אותו: חד מאוד, וכבד יותר.", "prefs.tab_accent_note": "צבע ההדגשה עוקב אחר הלשונית הפעילה", "prefs.theme_file": "קובץ ערכת נושא", + "prefs.theme_follow": "מעקב אחר קובץ ערכת נושא", + "prefs.theme_follow_error": "לא הוחל: {error}. ערכת הנושא התקינה האחרונה נשארת פעילה.", + "prefs.theme_follow_launch": "מעקב להפעלה זו בלבד (--theme-file); נטען מחדש בכל פעם שכלי אחר משכתב את הקובץ.", + "prefs.theme_follow_note": "נטען מחדש בכל פעם שכלי אחר משכתב את הקובץ. בחירת ערכת נושא מפסיקה את המעקב.", + "prefs.theme_follow_off": "כבוי", + "prefs.theme_follow_stop": "הפסקת המעקב", "prefs.timeline_half_hour": "−30 דק׳", "prefs.timeline_now": "עכשיו", "prefs.timeline_quarter_hour": "−15", @@ -3397,5 +3406,6 @@ "web.open_link": "לפתוח את התכן המקושר?", "web.open_link_confirm": "יש שינויים שלא נשמרו. לפתוח את התכן המקושר בלשונית חדשה?", "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ בחירה · Enter / Tab השלמה · Esc סגירה", - "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ בחירה · Enter מחיל את מה שהוקלד · Esc סגירה" + "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ בחירה · Enter מחיל את מה שהוקלד · Esc סגירה", + "⌘Enter continues on GitHub.": "⌘Enter ממשיך ב־GitHub." } diff --git a/assets/locales/hu.json b/assets/locales/hu.json index 505a9609e..bc80dcffd 100644 --- a/assets/locales/hu.json +++ b/assets/locales/hu.json @@ -1002,6 +1002,12 @@ "pick one or two vertices, edges or faces": "jelöljön ki egy vagy két csúcsot, élt vagy lapot", "prefs.cpu": "CPU (szoftveres)", "prefs.minutes_suffix": " perc", + "prefs.theme_follow": "Témafájl követése", + "prefs.theme_follow_error": "Nem alkalmazható: {error}. Az utolsó érvényes téma marad aktív.", + "prefs.theme_follow_launch": "Követés csak erre a futásra (--theme-file); újratöltés, ha más eszköz felülírja a fájlt.", + "prefs.theme_follow_note": "Újratöltés, ha más eszköz felülírja a fájlt. Téma választása leállítja a követést.", + "prefs.theme_follow_off": "Ki", + "prefs.theme_follow_stop": "Követés leállítása", "properties.title": "Tulajdonságok: {name}", "recovery.days_ago": "{count} napja", "recovery.detail": "{file} · {features} elem · automatikusan mentve: {when}", diff --git a/assets/locales/id.json b/assets/locales/id.json index ba3441597..c4c92ddc2 100644 --- a/assets/locales/id.json +++ b/assets/locales/id.json @@ -1002,6 +1002,12 @@ "pick one or two vertices, edges or faces": "pilih satu atau dua titik sudut, tepi, atau muka", "prefs.cpu": "CPU (perangkat lunak)", "prefs.minutes_suffix": " mnt", + "prefs.theme_follow": "Ikuti file tema", + "prefs.theme_follow_error": "Tidak diterapkan: {error}. Tema valid terakhir tetap aktif.", + "prefs.theme_follow_launch": "Diikuti hanya untuk sesi ini (--theme-file); dimuat ulang setiap kali alat lain menulis ulang file.", + "prefs.theme_follow_note": "Dimuat ulang setiap kali alat lain menulis ulang file. Memilih tema menghentikan pengikutan.", + "prefs.theme_follow_off": "Nonaktif", + "prefs.theme_follow_stop": "Berhenti mengikuti", "properties.title": "Properti: {name}", "recovery.days_ago": "{count} hari lalu", "recovery.detail": "{file} · {features} fitur · disimpan otomatis {when}", diff --git a/assets/locales/it.json b/assets/locales/it.json index 9a9c2fbef..f2de87899 100644 --- a/assets/locales/it.json +++ b/assets/locales/it.json @@ -1040,6 +1040,12 @@ "pick one or two vertices, edges or faces": "seleziona uno o due vertici, spigoli o facce", "prefs.cpu": "CPU (software)", "prefs.minutes_suffix": " min", + "prefs.theme_follow": "Segui un file di tema", + "prefs.theme_follow_error": "Non applicato: {error}. Resta attivo l’ultimo tema valido.", + "prefs.theme_follow_launch": "Seguito solo per questa sessione (--theme-file); ricaricato quando un altro strumento riscrive il file.", + "prefs.theme_follow_note": "Ricaricato quando un altro strumento riscrive il file. Scegliere un tema interrompe il monitoraggio.", + "prefs.theme_follow_off": "Disattivato", + "prefs.theme_follow_stop": "Smetti di seguire", "properties.title": "Proprietà: {name}", "recovery.days_ago": "{count} giorni fa", "recovery.detail": "{file} · {features} feature · salvato automaticamente {when}", diff --git a/assets/locales/ja.json b/assets/locales/ja.json index 27f004b4e..bbddd121f 100644 --- a/assets/locales/ja.json +++ b/assets/locales/ja.json @@ -22,10 +22,12 @@ "Add Mid Radius": "中間半径を追加", "Add Row": "行を追加", "Add a tool": "ツールを追加", + "Add all bodies": "すべてのボディを追加", "Add bend": "曲げを追加", "Add condition": "条件を追加", "Add or edit rule": "ルールを追加または編集", "Add to New Folder": "新しいフォルダーに追加", + "Add visible bodies": "表示中のボディを追加", "Advanced": "詳細", "Against": "相手", "Alignment": "配置", @@ -141,6 +143,7 @@ "Create Issue — review draft": "Issueを作成 — 下書きの確認", "Create Issue…": "Issueを作成…", "Cross curves": "交差する曲線", + "Ctrl+Enter continues on GitHub.": "Ctrl+EnterでGitHubに進みます。", "Cube": "キューブ", "Current orthographic view (1:1 mm)": "現在の平行投影(実寸・mm)", "Current perspective view": "現在の透視投影", @@ -1586,6 +1589,12 @@ "prefs.supersampling_brief": "大きく描画して縮小するため、非常に鮮明になりますが負荷も増えます。", "prefs.tab_accent_note": "アクセント色はアクティブなタブに従います", "prefs.theme_file": "テーマファイル", + "prefs.theme_follow": "テーマファイルに従う", + "prefs.theme_follow_error": "適用できません: {error}。最後に正常に適用されたテーマを維持します。", + "prefs.theme_follow_launch": "今回の起動時のみ有効です (--theme-file)。別のツールがファイルを書き換えるたびに再読み込みします。", + "prefs.theme_follow_note": "別のツールがファイルを書き換えるたびに再読み込みします。テーマを選ぶと追従を停止します。", + "prefs.theme_follow_off": "オフ", + "prefs.theme_follow_stop": "追従を停止", "prefs.timeline_half_hour": "−30 分", "prefs.timeline_now": "現在", "prefs.timeline_quarter_hour": "−15", @@ -3397,5 +3406,6 @@ "web.open_link": "リンク先のデザインを開きますか?", "web.open_link_confirm": "保存していない変更があります。リンク先のデザインを新しいタブで開きますか?", "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ 選択 · Enter / Tab 補完 · Esc 閉じる", - "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ 選択 · Enter 入力どおりに適用 · Esc 閉じる" + "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ 選択 · Enter 入力どおりに適用 · Esc 閉じる", + "⌘Enter continues on GitHub.": "⌘EnterでGitHubに進みます。" } diff --git a/assets/locales/ko.json b/assets/locales/ko.json index c37db0bc9..544e653c4 100644 --- a/assets/locales/ko.json +++ b/assets/locales/ko.json @@ -19,9 +19,11 @@ "Add Mid Radius": "중간 반지름 추가", "Add Row": "행 추가", "Add a tool": "도구 추가", + "Add all bodies": "모든 바디 추가", "Add condition": "조건 추가", "Add or edit rule": "규칙 추가 또는 편집", "Add to New Folder": "새 폴더에 추가", + "Add visible bodies": "보이는 바디 추가", "Advanced": "고급", "Against": "상대", "Alignment": "정렬", @@ -1321,6 +1323,12 @@ "prefs.supersampling_brief": "뷰를 더 크게 그린 뒤 줄여서 필터링합니다. 매우 선명하지만 더 무겁습니다.", "prefs.tab_accent_note": "강조 색상이 활성 탭을 따라갑니다", "prefs.theme_file": "테마 파일", + "prefs.theme_follow": "테마 파일 따르기", + "prefs.theme_follow_error": "적용되지 않음: {error}. 마지막으로 적용된 정상 테마를 유지합니다.", + "prefs.theme_follow_launch": "이번 실행에만 적용됩니다 (--theme-file). 다른 도구가 파일을 다시 쓸 때마다 다시 불러옵니다.", + "prefs.theme_follow_note": "다른 도구가 파일을 다시 쓸 때마다 다시 불러옵니다. 테마를 선택하면 따르기를 중지합니다.", + "prefs.theme_follow_off": "끄기", + "prefs.theme_follow_stop": "따르기 중지", "prefs.timeline_half_hour": "−30분", "prefs.timeline_now": "지금", "prefs.timeline_quarter_hour": "−15", diff --git a/assets/locales/ms.json b/assets/locales/ms.json index eb7970a74..349282cd4 100644 --- a/assets/locales/ms.json +++ b/assets/locales/ms.json @@ -1003,6 +1003,12 @@ "pick one or two vertices, edges or faces": "pilih satu atau dua bucu, tepi atau muka", "prefs.cpu": "CPU (perisian)", "prefs.minutes_suffix": " min", + "prefs.theme_follow": "Ikut fail tema", + "prefs.theme_follow_error": "Tidak digunakan: {error}. Tema sah terakhir kekal aktif.", + "prefs.theme_follow_launch": "Diikuti untuk sesi ini sahaja (--theme-file); dimuat semula setiap kali alat lain menulis semula fail.", + "prefs.theme_follow_note": "Dimuat semula setiap kali alat lain menulis semula fail. Memilih tema menghentikan ikutan.", + "prefs.theme_follow_off": "Mati", + "prefs.theme_follow_stop": "Berhenti mengikuti", "properties.title": "Sifat: {name}", "recovery.days_ago": "{count} hari lalu", "recovery.detail": "{file} · {features} ciri · disimpan automatik {when}", diff --git a/assets/locales/nb.json b/assets/locales/nb.json index eeed3247d..d758cc12f 100644 --- a/assets/locales/nb.json +++ b/assets/locales/nb.json @@ -1270,6 +1270,12 @@ "prefs.supersampling_brief": "Tegner visningen større og skalerer den ned: svært skarpt, og mer krevende.", "prefs.tab_accent_note": "Aksentfargen følger den aktive fanen", "prefs.theme_file": "temafil", + "prefs.theme_follow": "Følg en temafil", + "prefs.theme_follow_error": "Ikke brukt: {error}. Det siste gyldige temaet forblir aktivt.", + "prefs.theme_follow_launch": "Følges bare denne kjøringen (--theme-file); lastes inn på nytt når et annet verktøy skriver om filen.", + "prefs.theme_follow_note": "Lastes inn på nytt når et annet verktøy skriver om filen. Valg av et tema stopper dette.", + "prefs.theme_follow_off": "Av", + "prefs.theme_follow_stop": "Slutt å følge", "prefs.timeline_half_hour": "−30 min", "prefs.timeline_now": "nå", "prefs.timeline_quarter_hour": "−15", diff --git a/assets/locales/nl.json b/assets/locales/nl.json index 260043a33..7a6e5181e 100644 --- a/assets/locales/nl.json +++ b/assets/locales/nl.json @@ -1006,6 +1006,12 @@ "prefs.dialogs_left_column": "In de linkerkolom", "prefs.dialogs_note": "Waar opdrachtdialogen openen: vastgezet aan de rand van de weergave, of in de linkerkolom in plaats van de browser en de geschiedenis, die terugkomen zoals ze waren wanneer de dialoog sluit.", "prefs.minutes_suffix": " min", + "prefs.theme_follow": "Een themabestand volgen", + "prefs.theme_follow_error": "Niet toegepast: {error}. Het laatste geldige thema blijft actief.", + "prefs.theme_follow_launch": "Alleen deze sessie gevolgd (--theme-file); opnieuw geladen zodra een ander hulpmiddel het bestand overschrijft.", + "prefs.theme_follow_note": "Opnieuw geladen zodra een ander hulpmiddel het bestand overschrijft. Een thema kiezen stopt het volgen.", + "prefs.theme_follow_off": "Uit", + "prefs.theme_follow_stop": "Volgen stoppen", "properties.title": "Eigenschappen: {name}", "recovery.days_ago": "{count} dagen geleden", "recovery.detail": "{file} · {features} kenmerken · automatisch opgeslagen {when}", diff --git a/assets/locales/pending/issue-report-ctrl-enter.json b/assets/locales/pending/issue-report-ctrl-enter.json deleted file mode 100644 index 1bea67a0b..000000000 --- a/assets/locales/pending/issue-report-ctrl-enter.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "en": { - "Ctrl+Enter continues on GitHub.": "Ctrl+Enter continues on GitHub.", - "⌘Enter continues on GitHub.": "⌘Enter continues on GitHub." - }, - "ar": { - "Ctrl+Enter continues on GitHub.": "Ctrl+Enter يتابع في GitHub.", - "⌘Enter continues on GitHub.": "⌘Enter يتابع في GitHub." - }, - "de": { - "Ctrl+Enter continues on GitHub.": "Strg+Enter geht weiter zu GitHub.", - "⌘Enter continues on GitHub.": "⌘Enter geht weiter zu GitHub." - }, - "he": { - "Ctrl+Enter continues on GitHub.": "Ctrl+Enter ממשיך ב־GitHub.", - "⌘Enter continues on GitHub.": "⌘Enter ממשיך ב־GitHub." - }, - "ja": { - "Ctrl+Enter continues on GitHub.": "Ctrl+EnterでGitHubに進みます。", - "⌘Enter continues on GitHub.": "⌘EnterでGitHubに進みます。" - }, - "vi": { - "Ctrl+Enter continues on GitHub.": "Nhấn Ctrl+Enter để tiếp tục trên GitHub.", - "⌘Enter continues on GitHub.": "Nhấn ⌘Enter để tiếp tục trên GitHub." - }, - "zh": { - "Ctrl+Enter continues on GitHub.": "按Ctrl+Enter在GitHub中继续。", - "⌘Enter continues on GitHub.": "按⌘Enter在GitHub中继续。" - } -} diff --git a/assets/locales/pending/save-mesh-add-bodies.json b/assets/locales/pending/save-mesh-add-bodies.json deleted file mode 100644 index cab34f02f..000000000 --- a/assets/locales/pending/save-mesh-add-bodies.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "en": { "Add all bodies": "Add all bodies", "Add visible bodies": "Add visible bodies" }, - "ar": { "Add all bodies": "إضافة كل الأجسام", "Add visible bodies": "إضافة الأجسام المرئية" }, - "de": { "Add all bodies": "Alle Körper hinzufügen", "Add visible bodies": "Sichtbare Körper hinzufügen" }, - "he": { "Add all bodies": "הוספת כל הגופים", "Add visible bodies": "הוספת הגופים הגלויים" }, - "ja": { "Add all bodies": "すべてのボディを追加", "Add visible bodies": "表示中のボディを追加" }, - "ko": { "Add all bodies": "모든 바디 추가", "Add visible bodies": "보이는 바디 추가" }, - "vi": { "Add all bodies": "Thêm tất cả thân khối", "Add visible bodies": "Thêm các thân khối đang hiện" }, - "zh": { "Add all bodies": "添加所有实体", "Add visible bodies": "添加可见实体" } -} diff --git a/assets/locales/pending/theme-follow.json b/assets/locales/pending/theme-follow.json deleted file mode 100644 index 134e0d649..000000000 --- a/assets/locales/pending/theme-follow.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "en": { - "prefs.theme_follow": "Follow a theme file", - "prefs.theme_follow_error": "Not applied: {error}. The last good theme stays on.", - "prefs.theme_follow_launch": "Followed for this run only (--theme-file); reloaded whenever another tool rewrites it.", - "prefs.theme_follow_note": "Reloaded whenever another tool rewrites it. Choosing a theme stops following it.", - "prefs.theme_follow_off": "Off", - "prefs.theme_follow_stop": "Stop following" - }, - "ar": { - "prefs.theme_follow": "اتباع ملف سمة", - "prefs.theme_follow_error": "لم يُطبّق: {error}. تبقى آخر سمة سليمة مفعّلة.", - "prefs.theme_follow_launch": "يُتّبع لهذه الجلسة فقط (--theme-file)؛ يُعاد تحميله كلما أعادت أداة أخرى كتابته.", - "prefs.theme_follow_note": "يُعاد تحميله كلما أعادت أداة أخرى كتابته. اختيار سمة يوقف اتباعه.", - "prefs.theme_follow_off": "إيقاف", - "prefs.theme_follow_stop": "إيقاف الاتباع" - }, - "cs": { - "prefs.theme_follow": "Sledovat soubor motivu", - "prefs.theme_follow_error": "Nepoužito: {error}. Zůstává poslední funkční motiv.", - "prefs.theme_follow_launch": "Sledování jen pro toto spuštění (--theme-file); načte se znovu při každém přepsání jiným nástrojem.", - "prefs.theme_follow_note": "Načte se znovu při každém přepsání jiným nástrojem. Výběr motivu sledování ukončí.", - "prefs.theme_follow_off": "Vypnuto", - "prefs.theme_follow_stop": "Ukončit sledování" - }, - "da": { - "prefs.theme_follow": "Følg en temafil", - "prefs.theme_follow_error": "Ikke anvendt: {error}. Det seneste gyldige tema bevares.", - "prefs.theme_follow_launch": "Følges kun denne gang (--theme-file); genindlæses, når et andet værktøj overskriver filen.", - "prefs.theme_follow_note": "Genindlæses, når et andet værktøj overskriver filen. Valg af et tema stopper dette.", - "prefs.theme_follow_off": "Fra", - "prefs.theme_follow_stop": "Stop med at følge" - }, - "de": { - "prefs.theme_follow": "Einer Designdatei folgen", - "prefs.theme_follow_error": "Nicht angewendet: {error}. Das letzte gültige Design bleibt aktiv.", - "prefs.theme_follow_launch": "Nur für diesen Start (--theme-file); wird neu geladen, sobald ein anderes Werkzeug die Datei überschreibt.", - "prefs.theme_follow_note": "Wird neu geladen, sobald ein anderes Werkzeug die Datei überschreibt. Die Auswahl eines Designs beendet das Folgen.", - "prefs.theme_follow_off": "Aus", - "prefs.theme_follow_stop": "Nicht mehr folgen" - }, - "es": { - "prefs.theme_follow": "Seguir un archivo de tema", - "prefs.theme_follow_error": "No aplicado: {error}. Se mantiene el último tema válido.", - "prefs.theme_follow_launch": "Solo en esta sesión (--theme-file); se recarga cada vez que otra herramienta reescribe el archivo.", - "prefs.theme_follow_note": "Se recarga cada vez que otra herramienta reescribe el archivo. Elegir un tema deja de seguirlo.", - "prefs.theme_follow_off": "Desactivado", - "prefs.theme_follow_stop": "Dejar de seguir" - }, - "fr": { - "prefs.theme_follow": "Suivre un fichier de thème", - "prefs.theme_follow_error": "Non appliqué : {error}. Le dernier thème valide reste actif.", - "prefs.theme_follow_launch": "Suivi pour cette session uniquement (--theme-file) ; rechargé dès qu’un autre outil réécrit le fichier.", - "prefs.theme_follow_note": "Rechargé dès qu’un autre outil réécrit le fichier. Choisir un thème arrête le suivi.", - "prefs.theme_follow_off": "Désactivé", - "prefs.theme_follow_stop": "Arrêter le suivi" - }, - "gl": { - "prefs.theme_follow": "Seguir un ficheiro de tema", - "prefs.theme_follow_error": "Non aplicado: {error}. Mantense o último tema válido.", - "prefs.theme_follow_launch": "Só nesta sesión (--theme-file); vólvese cargar cando outra ferramenta reescribe o ficheiro.", - "prefs.theme_follow_note": "Vólvese cargar cando outra ferramenta reescribe o ficheiro. Escoller un tema detén o seguimento.", - "prefs.theme_follow_off": "Desactivado", - "prefs.theme_follow_stop": "Deixar de seguir" - }, - "he": { - "prefs.theme_follow": "מעקב אחר קובץ ערכת נושא", - "prefs.theme_follow_error": "לא הוחל: {error}. ערכת הנושא התקינה האחרונה נשארת פעילה.", - "prefs.theme_follow_launch": "מעקב להפעלה זו בלבד (--theme-file); נטען מחדש בכל פעם שכלי אחר משכתב את הקובץ.", - "prefs.theme_follow_note": "נטען מחדש בכל פעם שכלי אחר משכתב את הקובץ. בחירת ערכת נושא מפסיקה את המעקב.", - "prefs.theme_follow_off": "כבוי", - "prefs.theme_follow_stop": "הפסקת המעקב" - }, - "hu": { - "prefs.theme_follow": "Témafájl követése", - "prefs.theme_follow_error": "Nem alkalmazható: {error}. Az utolsó érvényes téma marad aktív.", - "prefs.theme_follow_launch": "Követés csak erre a futásra (--theme-file); újratöltés, ha más eszköz felülírja a fájlt.", - "prefs.theme_follow_note": "Újratöltés, ha más eszköz felülírja a fájlt. Téma választása leállítja a követést.", - "prefs.theme_follow_off": "Ki", - "prefs.theme_follow_stop": "Követés leállítása" - }, - "id": { - "prefs.theme_follow": "Ikuti file tema", - "prefs.theme_follow_error": "Tidak diterapkan: {error}. Tema valid terakhir tetap aktif.", - "prefs.theme_follow_launch": "Diikuti hanya untuk sesi ini (--theme-file); dimuat ulang setiap kali alat lain menulis ulang file.", - "prefs.theme_follow_note": "Dimuat ulang setiap kali alat lain menulis ulang file. Memilih tema menghentikan pengikutan.", - "prefs.theme_follow_off": "Nonaktif", - "prefs.theme_follow_stop": "Berhenti mengikuti" - }, - "it": { - "prefs.theme_follow": "Segui un file di tema", - "prefs.theme_follow_error": "Non applicato: {error}. Resta attivo l’ultimo tema valido.", - "prefs.theme_follow_launch": "Seguito solo per questa sessione (--theme-file); ricaricato quando un altro strumento riscrive il file.", - "prefs.theme_follow_note": "Ricaricato quando un altro strumento riscrive il file. Scegliere un tema interrompe il monitoraggio.", - "prefs.theme_follow_off": "Disattivato", - "prefs.theme_follow_stop": "Smetti di seguire" - }, - "ja": { - "prefs.theme_follow": "テーマファイルに従う", - "prefs.theme_follow_error": "適用できません: {error}。最後に正常に適用されたテーマを維持します。", - "prefs.theme_follow_launch": "今回の起動時のみ有効です (--theme-file)。別のツールがファイルを書き換えるたびに再読み込みします。", - "prefs.theme_follow_note": "別のツールがファイルを書き換えるたびに再読み込みします。テーマを選ぶと追従を停止します。", - "prefs.theme_follow_off": "オフ", - "prefs.theme_follow_stop": "追従を停止" - }, - "ko": { - "prefs.theme_follow": "테마 파일 따르기", - "prefs.theme_follow_error": "적용되지 않음: {error}. 마지막으로 적용된 정상 테마를 유지합니다.", - "prefs.theme_follow_launch": "이번 실행에만 적용됩니다 (--theme-file). 다른 도구가 파일을 다시 쓸 때마다 다시 불러옵니다.", - "prefs.theme_follow_note": "다른 도구가 파일을 다시 쓸 때마다 다시 불러옵니다. 테마를 선택하면 따르기를 중지합니다.", - "prefs.theme_follow_off": "끄기", - "prefs.theme_follow_stop": "따르기 중지" - }, - "ms": { - "prefs.theme_follow": "Ikut fail tema", - "prefs.theme_follow_error": "Tidak digunakan: {error}. Tema sah terakhir kekal aktif.", - "prefs.theme_follow_launch": "Diikuti untuk sesi ini sahaja (--theme-file); dimuat semula setiap kali alat lain menulis semula fail.", - "prefs.theme_follow_note": "Dimuat semula setiap kali alat lain menulis semula fail. Memilih tema menghentikan ikutan.", - "prefs.theme_follow_off": "Mati", - "prefs.theme_follow_stop": "Berhenti mengikuti" - }, - "nb": { - "prefs.theme_follow": "Følg en temafil", - "prefs.theme_follow_error": "Ikke brukt: {error}. Det siste gyldige temaet forblir aktivt.", - "prefs.theme_follow_launch": "Følges bare denne kjøringen (--theme-file); lastes inn på nytt når et annet verktøy skriver om filen.", - "prefs.theme_follow_note": "Lastes inn på nytt når et annet verktøy skriver om filen. Valg av et tema stopper dette.", - "prefs.theme_follow_off": "Av", - "prefs.theme_follow_stop": "Slutt å følge" - }, - "nl": { - "prefs.theme_follow": "Een themabestand volgen", - "prefs.theme_follow_error": "Niet toegepast: {error}. Het laatste geldige thema blijft actief.", - "prefs.theme_follow_launch": "Alleen deze sessie gevolgd (--theme-file); opnieuw geladen zodra een ander hulpmiddel het bestand overschrijft.", - "prefs.theme_follow_note": "Opnieuw geladen zodra een ander hulpmiddel het bestand overschrijft. Een thema kiezen stopt het volgen.", - "prefs.theme_follow_off": "Uit", - "prefs.theme_follow_stop": "Volgen stoppen" - }, - "pl": { - "prefs.theme_follow": "Śledź plik motywu", - "prefs.theme_follow_error": "Nie zastosowano: {error}. Ostatni poprawny motyw pozostaje aktywny.", - "prefs.theme_follow_launch": "Śledzenie tylko w tej sesji (--theme-file); plik jest wczytywany ponownie po każdym nadpisaniu przez inne narzędzie.", - "prefs.theme_follow_note": "Plik jest wczytywany ponownie po każdym nadpisaniu przez inne narzędzie. Wybór motywu kończy śledzenie.", - "prefs.theme_follow_off": "Wyłączone", - "prefs.theme_follow_stop": "Zakończ śledzenie" - }, - "pt-BR": { - "prefs.theme_follow": "Seguir um arquivo de tema", - "prefs.theme_follow_error": "Não aplicado: {error}. O último tema válido continua ativo.", - "prefs.theme_follow_launch": "Seguido apenas nesta sessão (--theme-file); recarregado sempre que outra ferramenta reescreve o arquivo.", - "prefs.theme_follow_note": "Recarregado sempre que outra ferramenta reescreve o arquivo. Escolher um tema interrompe o acompanhamento.", - "prefs.theme_follow_off": "Desativado", - "prefs.theme_follow_stop": "Parar de seguir" - }, - "ro": { - "prefs.theme_follow": "Urmărește un fișier de temă", - "prefs.theme_follow_error": "Nu s-a aplicat: {error}. Ultima temă validă rămâne activă.", - "prefs.theme_follow_launch": "Urmărit doar în această sesiune (--theme-file); reîncărcat când alt instrument rescrie fișierul.", - "prefs.theme_follow_note": "Reîncărcat când alt instrument rescrie fișierul. Alegerea unei teme oprește urmărirea.", - "prefs.theme_follow_off": "Dezactivat", - "prefs.theme_follow_stop": "Oprește urmărirea" - }, - "ru": { - "prefs.theme_follow": "Следить за файлом темы", - "prefs.theme_follow_error": "Не применено: {error}. Последняя рабочая тема остаётся активной.", - "prefs.theme_follow_launch": "Только для этого запуска (--theme-file); перезагружается, когда другой инструмент перезаписывает файл.", - "prefs.theme_follow_note": "Перезагружается, когда другой инструмент перезаписывает файл. Выбор темы прекращает отслеживание.", - "prefs.theme_follow_off": "Выкл.", - "prefs.theme_follow_stop": "Прекратить отслеживание" - }, - "sv": { - "prefs.theme_follow": "Följ en temafil", - "prefs.theme_follow_error": "Inte tillämpat: {error}. Det senaste giltiga temat förblir aktivt.", - "prefs.theme_follow_launch": "Följs endast denna körning (--theme-file); läses in igen när ett annat verktyg skriver om filen.", - "prefs.theme_follow_note": "Läses in igen när ett annat verktyg skriver om filen. Att välja ett tema avslutar detta.", - "prefs.theme_follow_off": "Av", - "prefs.theme_follow_stop": "Sluta följa" - }, - "tr": { - "prefs.theme_follow": "Bir tema dosyasını takip et", - "prefs.theme_follow_error": "Uygulanmadı: {error}. Son geçerli tema etkin kalır.", - "prefs.theme_follow_launch": "Yalnızca bu çalıştırmada takip edilir (--theme-file); başka bir araç dosyayı yeniden yazdığında yeniden yüklenir.", - "prefs.theme_follow_note": "Başka bir araç dosyayı yeniden yazdığında yeniden yüklenir. Tema seçmek takibi durdurur.", - "prefs.theme_follow_off": "Kapalı", - "prefs.theme_follow_stop": "Takibi durdur" - }, - "uk": { - "prefs.theme_follow": "Стежити за файлом теми", - "prefs.theme_follow_error": "Не застосовано: {error}. Остання робоча тема залишається активною.", - "prefs.theme_follow_launch": "Лише для цього запуску (--theme-file); перезавантажується, коли інший інструмент перезаписує файл.", - "prefs.theme_follow_note": "Перезавантажується, коли інший інструмент перезаписує файл. Вибір теми припиняє відстеження.", - "prefs.theme_follow_off": "Вимк.", - "prefs.theme_follow_stop": "Припинити відстеження" - }, - "vi": { - "prefs.theme_follow": "Theo dõi tệp chủ đề", - "prefs.theme_follow_error": "Chưa áp dụng: {error}. Chủ đề hợp lệ gần nhất vẫn được giữ.", - "prefs.theme_follow_launch": "Chỉ theo dõi trong lần chạy này (--theme-file); tải lại mỗi khi công cụ khác ghi lại tệp.", - "prefs.theme_follow_note": "Tải lại mỗi khi công cụ khác ghi lại tệp. Chọn chủ đề sẽ dừng theo dõi.", - "prefs.theme_follow_off": "Tắt", - "prefs.theme_follow_stop": "Dừng theo dõi" - }, - "zh": { - "prefs.theme_follow": "跟随主题文件", - "prefs.theme_follow_error": "未应用:{error}。保留上次有效的主题。", - "prefs.theme_follow_launch": "仅本次运行跟随 (--theme-file);其他工具改写文件时会重新加载。", - "prefs.theme_follow_note": "其他工具改写文件时会重新加载。选择主题将停止跟随。", - "prefs.theme_follow_off": "关闭", - "prefs.theme_follow_stop": "停止跟随" - }, - "zh-TW": { - "prefs.theme_follow": "跟隨主題檔案", - "prefs.theme_follow_error": "未套用:{error}。保留上次有效的主題。", - "prefs.theme_follow_launch": "僅本次執行跟隨 (--theme-file);其他工具改寫檔案時會重新載入。", - "prefs.theme_follow_note": "其他工具改寫檔案時會重新載入。選擇主題將停止跟隨。", - "prefs.theme_follow_off": "關閉", - "prefs.theme_follow_stop": "停止跟隨" - }, - "en-GB": { - "prefs.theme_follow": "Follow a theme file", - "prefs.theme_follow_error": "Not applied: {error}. The last good theme stays on.", - "prefs.theme_follow_launch": "Followed for this run only (--theme-file); reloaded whenever another tool rewrites it.", - "prefs.theme_follow_note": "Reloaded whenever another tool rewrites it. Choosing a theme stops following it.", - "prefs.theme_follow_off": "Off", - "prefs.theme_follow_stop": "Stop following" - } -} diff --git a/assets/locales/pl.json b/assets/locales/pl.json index d53454bbb..2aed9f1fe 100644 --- a/assets/locales/pl.json +++ b/assets/locales/pl.json @@ -1173,6 +1173,12 @@ "prefs.supersampling_brief": "Rysuje widok w większym rozmiarze i go zmniejsza: bardzo ostro, ale bardziej obciąża.", "prefs.tab_accent_note": "Kolor akcentu podąża za aktywną kartą", "prefs.theme_file": "plik motywu", + "prefs.theme_follow": "Śledź plik motywu", + "prefs.theme_follow_error": "Nie zastosowano: {error}. Ostatni poprawny motyw pozostaje aktywny.", + "prefs.theme_follow_launch": "Śledzenie tylko w tej sesji (--theme-file); plik jest wczytywany ponownie po każdym nadpisaniu przez inne narzędzie.", + "prefs.theme_follow_note": "Plik jest wczytywany ponownie po każdym nadpisaniu przez inne narzędzie. Wybór motywu kończy śledzenie.", + "prefs.theme_follow_off": "Wyłączone", + "prefs.theme_follow_stop": "Zakończ śledzenie", "prefs.timeline_half_hour": "−30 min", "prefs.timeline_now": "teraz", "prefs.timeline_quarter_hour": "−15", diff --git a/assets/locales/pt-BR.json b/assets/locales/pt-BR.json index 910a62ce1..8545d4f20 100644 --- a/assets/locales/pt-BR.json +++ b/assets/locales/pt-BR.json @@ -1293,6 +1293,12 @@ "prefs.supersampling_brief": "Desenha a vista maior e a reduz com filtragem: muito nítida, e mais pesada.", "prefs.tab_accent_note": "A cor de destaque acompanha a aba ativa", "prefs.theme_file": "arquivo de tema", + "prefs.theme_follow": "Seguir um arquivo de tema", + "prefs.theme_follow_error": "Não aplicado: {error}. O último tema válido continua ativo.", + "prefs.theme_follow_launch": "Seguido apenas nesta sessão (--theme-file); recarregado sempre que outra ferramenta reescreve o arquivo.", + "prefs.theme_follow_note": "Recarregado sempre que outra ferramenta reescreve o arquivo. Escolher um tema interrompe o acompanhamento.", + "prefs.theme_follow_off": "Desativado", + "prefs.theme_follow_stop": "Parar de seguir", "prefs.timeline_half_hour": "−30 min", "prefs.timeline_now": "agora", "prefs.timeline_quarter_hour": "−15", diff --git a/assets/locales/ro.json b/assets/locales/ro.json index ca4fa4cfc..345c8bd31 100644 --- a/assets/locales/ro.json +++ b/assets/locales/ro.json @@ -1002,6 +1002,12 @@ "pick one or two vertices, edges or faces": "alegeți unul sau două vârfuri, muchii sau fețe", "prefs.cpu": "CPU (software)", "prefs.minutes_suffix": " min", + "prefs.theme_follow": "Urmărește un fișier de temă", + "prefs.theme_follow_error": "Nu s-a aplicat: {error}. Ultima temă validă rămâne activă.", + "prefs.theme_follow_launch": "Urmărit doar în această sesiune (--theme-file); reîncărcat când alt instrument rescrie fișierul.", + "prefs.theme_follow_note": "Reîncărcat când alt instrument rescrie fișierul. Alegerea unei teme oprește urmărirea.", + "prefs.theme_follow_off": "Dezactivat", + "prefs.theme_follow_stop": "Oprește urmărirea", "properties.title": "Proprietăți: {name}", "recovery.days_ago": "acum {count} zile", "recovery.detail": "{file} · {features} operații · salvat automat {when}", diff --git a/assets/locales/ru.json b/assets/locales/ru.json index 61b777513..d7b3acf76 100644 --- a/assets/locales/ru.json +++ b/assets/locales/ru.json @@ -1002,6 +1002,12 @@ "pick one or two vertices, edges or faces": "выберите одну-две вершины, ребра или грани", "prefs.cpu": "ЦП (программный)", "prefs.minutes_suffix": " min", + "prefs.theme_follow": "Следить за файлом темы", + "prefs.theme_follow_error": "Не применено: {error}. Последняя рабочая тема остаётся активной.", + "prefs.theme_follow_launch": "Только для этого запуска (--theme-file); перезагружается, когда другой инструмент перезаписывает файл.", + "prefs.theme_follow_note": "Перезагружается, когда другой инструмент перезаписывает файл. Выбор темы прекращает отслеживание.", + "prefs.theme_follow_off": "Выкл.", + "prefs.theme_follow_stop": "Прекратить отслеживание", "properties.title": "Свойства: {name}", "recovery.days_ago": "{count} дн. назад", "recovery.detail": "{file} · операций: {features} · автосохранение {when}", diff --git a/assets/locales/sv.json b/assets/locales/sv.json index 2a8adc70d..330f87132 100644 --- a/assets/locales/sv.json +++ b/assets/locales/sv.json @@ -1002,6 +1002,12 @@ "pick one or two vertices, edges or faces": "välj ett eller två hörn, kanter eller ytor", "prefs.cpu": "CPU (programvara)", "prefs.minutes_suffix": " min", + "prefs.theme_follow": "Följ en temafil", + "prefs.theme_follow_error": "Inte tillämpat: {error}. Det senaste giltiga temat förblir aktivt.", + "prefs.theme_follow_launch": "Följs endast denna körning (--theme-file); läses in igen när ett annat verktyg skriver om filen.", + "prefs.theme_follow_note": "Läses in igen när ett annat verktyg skriver om filen. Att välja ett tema avslutar detta.", + "prefs.theme_follow_off": "Av", + "prefs.theme_follow_stop": "Sluta följa", "properties.title": "Egenskaper: {name}", "recovery.days_ago": "för {count} dagar sedan", "recovery.detail": "{file} · {features} funktioner · autosparad {when}", diff --git a/assets/locales/tr.json b/assets/locales/tr.json index 66808a562..feeebe206 100644 --- a/assets/locales/tr.json +++ b/assets/locales/tr.json @@ -1555,6 +1555,12 @@ "prefs.supersampling_brief": "Görünümü daha büyük çizip aşağı süzer: çok net, ama daha ağır.", "prefs.tab_accent_note": "Vurgu rengi etkin sekmeyi izler", "prefs.theme_file": "tema dosyası", + "prefs.theme_follow": "Bir tema dosyasını takip et", + "prefs.theme_follow_error": "Uygulanmadı: {error}. Son geçerli tema etkin kalır.", + "prefs.theme_follow_launch": "Yalnızca bu çalıştırmada takip edilir (--theme-file); başka bir araç dosyayı yeniden yazdığında yeniden yüklenir.", + "prefs.theme_follow_note": "Başka bir araç dosyayı yeniden yazdığında yeniden yüklenir. Tema seçmek takibi durdurur.", + "prefs.theme_follow_off": "Kapalı", + "prefs.theme_follow_stop": "Takibi durdur", "prefs.timeline_half_hour": "−30 dk", "prefs.timeline_now": "şimdi", "prefs.timeline_quarter_hour": "−15", diff --git a/assets/locales/uk.json b/assets/locales/uk.json index 946c5ccd4..2b0fe22db 100644 --- a/assets/locales/uk.json +++ b/assets/locales/uk.json @@ -1553,6 +1553,12 @@ "prefs.supersampling_brief": "Малює вид у більшому розмірі й зменшує його: дуже чітко, але потребує більше ресурсів.", "prefs.tab_accent_note": "Акцентний колір відповідає активній вкладці", "prefs.theme_file": "файл теми", + "prefs.theme_follow": "Стежити за файлом теми", + "prefs.theme_follow_error": "Не застосовано: {error}. Остання робоча тема залишається активною.", + "prefs.theme_follow_launch": "Лише для цього запуску (--theme-file); перезавантажується, коли інший інструмент перезаписує файл.", + "prefs.theme_follow_note": "Перезавантажується, коли інший інструмент перезаписує файл. Вибір теми припиняє відстеження.", + "prefs.theme_follow_off": "Вимк.", + "prefs.theme_follow_stop": "Припинити відстеження", "prefs.timeline_half_hour": "−30 хв", "prefs.timeline_now": "зараз", "prefs.timeline_quarter_hour": "−15", diff --git a/assets/locales/vi.json b/assets/locales/vi.json index 62faed5f7..28d8136eb 100644 --- a/assets/locales/vi.json +++ b/assets/locales/vi.json @@ -22,10 +22,12 @@ "Add Mid Radius": "Thêm bán kính giữa", "Add Row": "Thêm hàng", "Add a tool": "Thêm công cụ", + "Add all bodies": "Thêm tất cả thân khối", "Add bend": "Thêm góc uốn", "Add condition": "Thêm điều kiện", "Add or edit rule": "Thêm hoặc sửa quy tắc", "Add to New Folder": "Thêm vào thư mục mới", + "Add visible bodies": "Thêm các thân khối đang hiện", "Advanced": "Nâng cao", "Against": "So với", "Alignment": "Căn chỉnh", @@ -141,6 +143,7 @@ "Create Issue — review draft": "Tạo Issue — xem lại bản nháp", "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", @@ -1586,6 +1589,12 @@ "prefs.supersampling_brief": "Vẽ khung nhìn ở độ phân giải lớn hơn rồi lọc giảm tỷ lệ: rất sắc nét, nhưng tốn tài nguyên hơn.", "prefs.tab_accent_note": "Màu nhấn theo tab đang kích hoạt", "prefs.theme_file": "tệp chủ đề", + "prefs.theme_follow": "Theo dõi tệp chủ đề", + "prefs.theme_follow_error": "Chưa áp dụng: {error}. Chủ đề hợp lệ gần nhất vẫn được giữ.", + "prefs.theme_follow_launch": "Chỉ theo dõi trong lần chạy này (--theme-file); tải lại mỗi khi công cụ khác ghi lại tệp.", + "prefs.theme_follow_note": "Tải lại mỗi khi công cụ khác ghi lại tệp. Chọn chủ đề sẽ dừng theo dõi.", + "prefs.theme_follow_off": "Tắt", + "prefs.theme_follow_stop": "Dừng theo dõi", "prefs.timeline_half_hour": "−30 phút", "prefs.timeline_now": "bây giờ", "prefs.timeline_quarter_hour": "−15 phút", @@ -3397,5 +3406,6 @@ "web.open_link": "Mở thiết kế liên kết?", "web.open_link_confirm": "Có những thay đổi chưa lưu. Mở thiết kế liên kết trong tab mới?", "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ chọn · Enter / Tab hoàn tất · Esc bỏ qua", - "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ để chọn · Enter để áp dụng nội dung đã nhập · Esc để đóng" + "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ để chọn · Enter để áp dụng nội dung đã nhập · Esc để đóng", + "⌘Enter continues on GitHub.": "Nhấn ⌘Enter để tiếp tục trên GitHub." } diff --git a/assets/locales/zh-TW.json b/assets/locales/zh-TW.json index 85a90beed..ea8ee893d 100644 --- a/assets/locales/zh-TW.json +++ b/assets/locales/zh-TW.json @@ -1003,6 +1003,12 @@ "pick one or two vertices, edges or faces": "選擇一個或兩個頂點、邊或面", "prefs.cpu": "CPU(軟體)", "prefs.minutes_suffix": " min", + "prefs.theme_follow": "跟隨主題檔案", + "prefs.theme_follow_error": "未套用:{error}。保留上次有效的主題。", + "prefs.theme_follow_launch": "僅本次執行跟隨 (--theme-file);其他工具改寫檔案時會重新載入。", + "prefs.theme_follow_note": "其他工具改寫檔案時會重新載入。選擇主題將停止跟隨。", + "prefs.theme_follow_off": "關閉", + "prefs.theme_follow_stop": "停止跟隨", "properties.title": "屬性:{name}", "recovery.days_ago": "{count} 天前", "recovery.detail": "{file} · {features} 個特徵 · 自動儲存於 {when}", diff --git a/assets/locales/zh.json b/assets/locales/zh.json index 973ef5190..2b4d44be7 100644 --- a/assets/locales/zh.json +++ b/assets/locales/zh.json @@ -22,10 +22,12 @@ "Add Mid Radius": "添加中间半径", "Add Row": "添加行", "Add a tool": "添加工具", + "Add all bodies": "添加所有实体", "Add bend": "添加折弯", "Add condition": "添加条件", "Add or edit rule": "添加或编辑规则", "Add to New Folder": "添加到新文件夹", + "Add visible bodies": "添加可见实体", "Advanced": "高级", "Against": "对照", "Alignment": "对齐", @@ -141,6 +143,7 @@ "Create Issue — review draft": "创建 Issue——审阅草稿", "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": "当前透视视图", @@ -1586,6 +1589,12 @@ "prefs.supersampling_brief": "以更高分辨率绘制后滤波缩小:更清晰,但负载更高。", "prefs.tab_accent_note": "强调色跟随当前选项卡", "prefs.theme_file": "主题文件", + "prefs.theme_follow": "跟随主题文件", + "prefs.theme_follow_error": "未应用:{error}。保留上次有效的主题。", + "prefs.theme_follow_launch": "仅本次运行跟随 (--theme-file);其他工具改写文件时会重新加载。", + "prefs.theme_follow_note": "其他工具改写文件时会重新加载。选择主题将停止跟随。", + "prefs.theme_follow_off": "关闭", + "prefs.theme_follow_stop": "停止跟随", "prefs.timeline_half_hour": "−30 分钟", "prefs.timeline_now": "现在", "prefs.timeline_quarter_hour": "−15", @@ -3397,5 +3406,6 @@ "web.open_link": "打开链接的设计?", "web.open_link_confirm": "有未保存的更改。要在新标签页中打开链接的设计吗?", "↑ ↓ choose · Enter / Tab complete · Esc dismiss": "↑ ↓ 选择 · Enter / Tab 补全 · Esc 关闭", - "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ 选择 · Enter 按原样应用 · Esc 关闭" + "↑ ↓ choose · Enter applies what you typed · Esc dismiss": "↑ ↓ 选择 · Enter 按原样应用 · Esc 关闭", + "⌘Enter continues on GitHub.": "按⌘Enter在GitHub中继续。" } From 7a6c884418698e9c9fb0e6f97b9b847998c58c49 Mon Sep 17 00:00:00 2001 From: bherbruck Date: Tue, 27 Oct 2026 17:16:40 -0400 Subject: [PATCH 096/102] Change the app id to io.tangencylabs.solidcraft, with aliases for existing installs (#7681) The app id moves from ai.storyteller.solidcraft to io.tangencylabs.solidcraft: macOS bundle id (the CLI signs as io.tangencylabs.solidcraft.cli), Linux desktop/metainfo/MIME file names, icon name, Wayland app_id / X11 class, Flatpak, Snap common-id, nfpm/FreeBSD/Nix/AppImage staging, the web app's icon paths and the docs. Existing installs keep working: the Flatpak repository marks both old ids (ai.storyteller.solidcraft and ai.storyteller.solvecraft) end-of-life with a rebase straight to the new id, re-marking the solvecraft ref that pointed at the 0.8 id; the manifest grants read-only access to both old ~/.var/app folders and the first launch copies settings and autosaves from the newest one; AppStream / and X-Flatpak-RenamedFrom list both; the AppImage removes menu entries it wrote under either old id. The data and settings folders (solidcraft / SolidCraft) are unchanged. The MSI UpgradeCode and ProgIDs are unchanged. Co-authored-by: Claude Opus 5.5 --- .github/release-notes.md | 15 ++-- .github/workflows/packaging-lint.yml | 16 +++-- .github/workflows/release.yml | 2 +- ATTRIBUTION.md | 22 +++--- README.md | 2 +- apps/solidcraft-web/index.html | 10 +-- apps/solidcraft-web/manifest.webmanifest | 6 +- apps/solidcraft/src/main.rs | 16 ++--- assets/README.md | 2 +- ...aft.png => io.tangencylabs.solidcraft.png} | Bin ...aft.png => io.tangencylabs.solidcraft.png} | Bin ...aft.png => io.tangencylabs.solidcraft.png} | Bin ...aft.png => io.tangencylabs.solidcraft.png} | Bin ...aft.png => io.tangencylabs.solidcraft.png} | Bin ...aft.png => io.tangencylabs.solidcraft.png} | Bin ...aft.png => io.tangencylabs.solidcraft.png} | Bin ...aft.png => io.tangencylabs.solidcraft.png} | Bin ...top => io.tangencylabs.solidcraft.desktop} | 8 +-- ...o.tangencylabs.solidcraft.metainfo.xml.in} | 14 ++-- ...ml => io.tangencylabs.solidcraft.mime.xml} | 2 +- assets/platforms/macos/Info.plist.in | 2 +- crates/engine/src/recovery.rs | 4 +- crates/io/src/legacy_dir.rs | 64 ++++++++++++------ crates/io/src/lib.rs | 2 +- crates/ui-egui/src/agent_chat/panel.rs | 4 +- crates/ui-egui/src/update.rs | 2 +- crates/ui-egui/src/update/tests.rs | 2 +- docs/agent-chat.md | 2 +- docs/book/src/guide/getting-started.md | 19 +++--- docs/book/src/guide/troubleshooting.md | 4 +- docs/book/src/guide/updates.md | 2 +- docs/compatibility.md | 37 +++++----- docs/mcp.md | 2 +- flake.nix | 12 ++-- packaging/env.sh | 7 +- packaging/flatpak-site.sh | 58 +++++++++------- packaging/linux/AppRun | 25 ++++--- packaging/linux/flatpak-bundle.sh | 2 +- packaging/linux/flatpak-smoke.py | 2 +- ... => io.tangencylabs.solidcraft.bundle.yml} | 24 ++++--- packaging/linux/snap/snapcraft.yaml | 12 ++-- packaging/macos/package.sh | 8 +-- packaging/tests/apprun_test.py | 19 +++++- xtask/src/app_icons.rs | 2 +- 44 files changed, 249 insertions(+), 183 deletions(-) rename assets/icons/app/linux/exports/hicolor/128x128/apps/{ai.storyteller.solidcraft.png => io.tangencylabs.solidcraft.png} (100%) rename assets/icons/app/linux/exports/hicolor/16x16/apps/{ai.storyteller.solidcraft.png => io.tangencylabs.solidcraft.png} (100%) rename assets/icons/app/linux/exports/hicolor/24x24/apps/{ai.storyteller.solidcraft.png => io.tangencylabs.solidcraft.png} (100%) rename assets/icons/app/linux/exports/hicolor/256x256/apps/{ai.storyteller.solidcraft.png => io.tangencylabs.solidcraft.png} (100%) rename assets/icons/app/linux/exports/hicolor/32x32/apps/{ai.storyteller.solidcraft.png => io.tangencylabs.solidcraft.png} (100%) rename assets/icons/app/linux/exports/hicolor/48x48/apps/{ai.storyteller.solidcraft.png => io.tangencylabs.solidcraft.png} (100%) rename assets/icons/app/linux/exports/hicolor/512x512/apps/{ai.storyteller.solidcraft.png => io.tangencylabs.solidcraft.png} (100%) rename assets/icons/app/linux/exports/hicolor/64x64/apps/{ai.storyteller.solidcraft.png => io.tangencylabs.solidcraft.png} (100%) rename assets/platforms/linux/{ai.storyteller.solidcraft.desktop => io.tangencylabs.solidcraft.desktop} (62%) rename assets/platforms/linux/{ai.storyteller.solidcraft.metainfo.xml.in => io.tangencylabs.solidcraft.metainfo.xml.in} (82%) rename assets/platforms/linux/{ai.storyteller.solidcraft.mime.xml => io.tangencylabs.solidcraft.mime.xml} (93%) rename packaging/linux/flatpak/{ai.storyteller.solidcraft.bundle.yml => io.tangencylabs.solidcraft.bundle.yml} (67%) diff --git a/.github/release-notes.md b/.github/release-notes.md index 05f7fd0f5..7a5c779c6 100644 --- a/.github/release-notes.md +++ b/.github/release-notes.md @@ -9,9 +9,10 @@ parameter to watch the timeline rebuild. [Documentation](https://docs.solidcraft [ROADMAP](https://github.com/bherbruck/solidcraft/blob/main/ROADMAP.md#known-limitations) lists the known limitations. Designs from every earlier version open in this one. -**Upgrading from 0.7 or earlier.** 0.8 changed the Linux app ID to `ai.storyteller.solidcraft`: -`flatpak update` offers to replace the old app, and the `.deb`, `.rpm` and AppImage remove the old -menu entry. +**New app ID.** The app ID is now `io.tangencylabs.solidcraft` (it was `ai.storyteller.solidcraft`, +and `ai.storyteller.solvecraft` up to 0.7): `flatpak update` offers to replace the old app, the +`.deb`, `.rpm` and AppImage remove the old menu entry, and settings stay. On macOS the bundle ID +changed too, so macOS asks once more for the permissions it had granted. **Upgrading from 0.5 or earlier.** 0.6 renamed SolveCraft to SolidCraft and made the zip container the default save format. `.solvecraft` designs, old settings folders and @@ -42,16 +43,16 @@ installing SolidCraft; keep both remotes in the same user installation: ```sh flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo flatpak remote-add --user --if-not-exists solidcraft https://docs.solidcraft.io/flatpak/solidcraft.flatpakrepo -flatpak install --user solidcraft ai.storyteller.solidcraft -flatpak run ai.storyteller.solidcraft +flatpak install --user solidcraft io.tangencylabs.solidcraft +flatpak run io.tangencylabs.solidcraft ``` A remote added from the old `bherbruck.github.io` address no longer finds updates: run `flatpak remote-modify --user --url=https://docs.solidcraft.io/flatpak/repo/ solidcraft`, then `flatpak update --user`. -Flatpak installs from 0.7 or earlier use the old ID `ai.storyteller.solvecraft`: `flatpak update --user` -offers to replace it with `ai.storyteller.solidcraft`, and settings move along. +Flatpak installs under an old ID (`ai.storyteller.solidcraft`, or `ai.storyteller.solvecraft` from 0.7 or +earlier): `flatpak update --user` offers to replace it with `io.tangencylabs.solidcraft`, and settings move along. Single-file `.flatpak` bundles include the runtime repository address; missing runtimes still need an internet connection. [Linux installation details](https://docs.solidcraft.io/guide/getting-started.html#linux-flatpak). diff --git a/.github/workflows/packaging-lint.yml b/.github/workflows/packaging-lint.yml index a468e76ab..80d396a42 100644 --- a/.github/workflows/packaging-lint.yml +++ b/.github/workflows/packaging-lint.yml @@ -55,13 +55,15 @@ jobs: - name: XML, desktop entry, AppStream, Flatpak manifest run: | xmllint --noout assets/platforms/windows/solidcraft.wxs assets/platforms/windows/solidcraft.en-us.wxl assets/platforms/macos/*.plist* assets/platforms/linux/*.xml* - desktop-file-validate assets/platforms/linux/ai.storyteller.solidcraft.desktop - # The window's X11 class is its app id; the old id stays only as the rename shims. - grep -qx 'StartupWMClass=ai.storyteller.solidcraft' assets/platforms/linux/ai.storyteller.solidcraft.desktop - grep -q 'ai.storyteller.solvecraft' assets/platforms/linux/ai.storyteller.solidcraft.metainfo.xml.in + desktop-file-validate assets/platforms/linux/io.tangencylabs.solidcraft.desktop + # The window's X11 class is its app id; the old ids stay only as the rename shims. + grep -qx 'StartupWMClass=io.tangencylabs.solidcraft' assets/platforms/linux/io.tangencylabs.solidcraft.desktop + grep -q 'ai.storyteller.solidcraft' assets/platforms/linux/io.tangencylabs.solidcraft.metainfo.xml.in + grep -q 'ai.storyteller.solvecraft' assets/platforms/linux/io.tangencylabs.solidcraft.metainfo.xml.in + grep -qx 'X-Flatpak-RenamedFrom=ai.storyteller.solidcraft.desktop;ai.storyteller.solvecraft.desktop;' assets/platforms/linux/io.tangencylabs.solidcraft.desktop grep -qF -e '--end-of-life-rebase=' packaging/flatpak-site.sh - sed -e 's/@VERSION@/0.0.0/' -e 's/@DATE@/2026-01-01/' assets/platforms/linux/ai.storyteller.solidcraft.metainfo.xml.in >"$RUNNER_TEMP/ai.storyteller.solidcraft.metainfo.xml" - appstreamcli validate --no-net --explain "$RUNNER_TEMP/ai.storyteller.solidcraft.metainfo.xml" - python3 -c "import yaml; m = yaml.safe_load(open('packaging/linux/flatpak/ai.storyteller.solidcraft.bundle.yml')); assert m['id'] == 'ai.storyteller.solidcraft' and m['command'] == 'solidcraft'" + sed -e 's/@VERSION@/0.0.0/' -e 's/@DATE@/2026-01-01/' assets/platforms/linux/io.tangencylabs.solidcraft.metainfo.xml.in >"$RUNNER_TEMP/io.tangencylabs.solidcraft.metainfo.xml" + appstreamcli validate --no-net --explain "$RUNNER_TEMP/io.tangencylabs.solidcraft.metainfo.xml" + python3 -c "import yaml; m = yaml.safe_load(open('packaging/linux/flatpak/io.tangencylabs.solidcraft.bundle.yml')); assert m['id'] == 'io.tangencylabs.solidcraft' and m['command'] == 'solidcraft'" python3 -c "import yaml; m = yaml.safe_load(open('packaging/linux/snap/snapcraft.yaml')); assert m['name'] == 'solidcraft' and m['confinement'] == 'strict' and m['apps']['solidcraft']['command'] == 'usr/bin/solidcraft'" python3 -m py_compile packaging/linux/snap-smoke.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72c4a5585..6d44a02c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -297,7 +297,7 @@ jobs: export CARGO_TARGET_DIR=/var/tmp/solidcraft-target CARGO_BUILD_JOBS=4 bash packaging/freebsd/package.sh tar -tzf dist/release/solidcraft-*-freebsd-x86_64.tar.gz \ - | grep -E '/bin/solidcraft$|/bin/solidcraft-cli$|/share/applications/ai\.storyteller\.solvecraft\.desktop$|/share/doc/solidcraft/THIRD-PARTY-LICENSES\.txt$' + | grep -E '/bin/solidcraft$|/bin/solidcraft-cli$|/share/applications/io\.tangencylabs\.solidcraft\.desktop$|/share/doc/solidcraft/THIRD-PARTY-LICENSES\.txt$' - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: release-freebsd-x86_64 diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index e1ce57146..716a1cd90 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -128,14 +128,14 @@ Editable drawing code, native projects and shipped exports are collected under ` | assets/fonts/ibm-plex-mono/OFL.txt | IBM Corp. | Unmodified accompanying font licence | SIL OFL 1.1 | | assets/fonts/ibm-plex-sans/OFL.txt | IBM Corp. | Unmodified accompanying font licence | SIL OFL 1.1 | | assets/fonts/liberation-sans/OFL.txt | Red Hat, Inc.; Liberation Fonts contributors | Unmodified accompanying font licence | SIL OFL 1.1 | -| assets/icons/app/linux/exports/hicolor/128x128/apps/ai.storyteller.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | -| assets/icons/app/linux/exports/hicolor/16x16/apps/ai.storyteller.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | -| assets/icons/app/linux/exports/hicolor/24x24/apps/ai.storyteller.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | -| assets/icons/app/linux/exports/hicolor/256x256/apps/ai.storyteller.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | -| assets/icons/app/linux/exports/hicolor/32x32/apps/ai.storyteller.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | -| assets/icons/app/linux/exports/hicolor/48x48/apps/ai.storyteller.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | -| assets/icons/app/linux/exports/hicolor/512x512/apps/ai.storyteller.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | -| assets/icons/app/linux/exports/hicolor/64x64/apps/ai.storyteller.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | +| assets/icons/app/linux/exports/hicolor/128x128/apps/io.tangencylabs.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | +| assets/icons/app/linux/exports/hicolor/16x16/apps/io.tangencylabs.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | +| assets/icons/app/linux/exports/hicolor/24x24/apps/io.tangencylabs.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | +| assets/icons/app/linux/exports/hicolor/256x256/apps/io.tangencylabs.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | +| assets/icons/app/linux/exports/hicolor/32x32/apps/io.tangencylabs.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | +| assets/icons/app/linux/exports/hicolor/48x48/apps/io.tangencylabs.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | +| assets/icons/app/linux/exports/hicolor/512x512/apps/io.tangencylabs.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | +| assets/icons/app/linux/exports/hicolor/64x64/apps/io.tangencylabs.solidcraft.png | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | | assets/icons/app/shared/source/app_icon.rs | SolidCraft contributors | Original SolidCraft drawing code: the borderless mark, drawn from the faces and gradients of assets/icons/app/macos/source/SolidCraft.icon/Assets/03-solid-blue-cutout.svg | MIT OR Apache-2.0 | | assets/icons/app/shared/source/windows_ico.rs | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 | | assets/icons/app/windows/exports/solidcraft-executable.ico | SolidCraft contributors | Generated from assets/icons/app/shared/source/app_icon.rs with the original CLI/ICO encoders | MIT OR Apache-2.0 | @@ -171,9 +171,9 @@ Editable drawing code, native projects and shipped exports are collected under ` | assets/locales/zh.json | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 | | assets/locales/zh-TW.json | SolidCraft contributors | Original Traditional Chinese (Taiwan) translation of SolidCraft's English catalog; no commercial CAD text used | MIT OR Apache-2.0 | | assets/materials/library.rs | SolidCraft contributors | Original SolidCraft resource data or drawing code, collected without redesign | MIT OR Apache-2.0 | -| assets/platforms/linux/ai.storyteller.solidcraft.desktop | PhotoCraft / SolidCraft contributors | PhotoCraft packaging templates (https://github.com/storytold/photocraft), adapted for SolidCraft | Apache-2.0 | -| assets/platforms/linux/ai.storyteller.solidcraft.metainfo.xml.in | PhotoCraft / SolidCraft contributors | PhotoCraft packaging templates (https://github.com/storytold/photocraft), adapted for SolidCraft | Apache-2.0 | -| assets/platforms/linux/ai.storyteller.solidcraft.mime.xml | PhotoCraft / SolidCraft contributors | PhotoCraft packaging templates (https://github.com/storytold/photocraft), adapted for SolidCraft | Apache-2.0 | +| assets/platforms/linux/io.tangencylabs.solidcraft.desktop | PhotoCraft / SolidCraft contributors | PhotoCraft packaging templates (https://github.com/storytold/photocraft), adapted for SolidCraft | Apache-2.0 | +| assets/platforms/linux/io.tangencylabs.solidcraft.metainfo.xml.in | PhotoCraft / SolidCraft contributors | PhotoCraft packaging templates (https://github.com/storytold/photocraft), adapted for SolidCraft | Apache-2.0 | +| assets/platforms/linux/io.tangencylabs.solidcraft.mime.xml | PhotoCraft / SolidCraft contributors | PhotoCraft packaging templates (https://github.com/storytold/photocraft), adapted for SolidCraft | Apache-2.0 | | assets/platforms/macos/dmg/background.tiff | SolidCraft contributors | original disk image window background (blueprint sheet: grid, double border, circles, centre lines, leader arrow, title block) drawn by assets/platforms/macos/dmg/make_background.py in IBM Plex Sans/Mono; 1x and 2x representations | MIT OR Apache-2.0 | | assets/platforms/macos/dmg/make_background.py | SolidCraft contributors | authoring script that draws the disk image background (Pillow); not part of any build | MIT OR Apache-2.0 | | assets/platforms/macos/dmg/layout.json | SolidCraft contributors | disk image window size, icon size and icon positions shared by the background script and settings.py | MIT OR Apache-2.0 | diff --git a/README.md b/README.md index 8c1ca69a3..d7a9f9c1c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- SolidCraft + SolidCraft

SolidCraft

diff --git a/apps/solidcraft-web/index.html b/apps/solidcraft-web/index.html index c1068d5bd..90030947f 100644 --- a/apps/solidcraft-web/index.html +++ b/apps/solidcraft-web/index.html @@ -27,12 +27,12 @@ - - + + - - - + + + diff --git a/apps/solidcraft-web/manifest.webmanifest b/apps/solidcraft-web/manifest.webmanifest index 54b56d591..6b80eaf8a 100644 --- a/apps/solidcraft-web/manifest.webmanifest +++ b/apps/solidcraft-web/manifest.webmanifest @@ -9,8 +9,8 @@ "theme_color": "#343840", "categories": ["productivity", "utilities"], "icons": [ - { "src": "icons/32x32/ai.storyteller.solidcraft.png", "sizes": "32x32", "type": "image/png" }, - { "src": "icons/256x256/ai.storyteller.solidcraft.png", "sizes": "256x256", "type": "image/png" }, - { "src": "icons/512x512/ai.storyteller.solidcraft.png", "sizes": "512x512", "type": "image/png" } + { "src": "icons/32x32/io.tangencylabs.solidcraft.png", "sizes": "32x32", "type": "image/png" }, + { "src": "icons/256x256/io.tangencylabs.solidcraft.png", "sizes": "256x256", "type": "image/png" }, + { "src": "icons/512x512/io.tangencylabs.solidcraft.png", "sizes": "512x512", "type": "image/png" } ] } diff --git a/apps/solidcraft/src/main.rs b/apps/solidcraft/src/main.rs index 4045f1f73..fadaeb9e7 100644 --- a/apps/solidcraft/src/main.rs +++ b/apps/solidcraft/src/main.rs @@ -615,26 +615,26 @@ fn graphics_path() -> Option { /// Compatibility shim (docs/compatibility.md): on the first launch after the rename, copy the /// settings of earlier releases into the new folder. They kept `graphics.json` (and, on Linux /// and macOS, the recovery folder) under the old product name, and eframe's `app.ron` under the -/// window's old app id. In the Flatpak sandbox, releases before 0.8 kept everything under the -/// old app id's `~/.var/app` folder; that copy comes first, as it is the newest. The old folders +/// window's old app id. In the Flatpak sandbox, earlier releases kept everything under an +/// old app id's `~/.var/app` folder; those copies come first, newest first. The old folders /// are never changed. fn adopt_legacy_settings() { let (Some(current), Some(legacy)) = (settings_dir().ok().flatten(), eframe::storage_dir("SolveCraft")) else { return }; let legacy_eframe = eframe::storage_dir(solidcraft_engine::io::LEGACY_APP_ID); - let old_flatpak = solidcraft_engine::io::legacy_flatpak_path(¤t); - if let Err(e) = adopt_settings(¤t, old_flatpak.as_deref(), &legacy, legacy_eframe.as_deref()) { + let old_flatpak = solidcraft_engine::io::legacy_flatpak_paths(¤t); + if let Err(e) = adopt_settings(¤t, &old_flatpak, &legacy, legacy_eframe.as_deref()) { log::warn!("settings: could not copy the previous release's settings into {}: {e}", current.display()); } } fn adopt_settings( current: &std::path::Path, - old_flatpak: Option<&std::path::Path>, + old_flatpak: &[std::path::PathBuf], legacy: &std::path::Path, legacy_eframe: Option<&std::path::Path>, ) -> std::io::Result<()> { let fresh = !current.exists(); - if let Some(old) = old_flatpak { + for old in old_flatpak { solidcraft_engine::io::adopt_legacy_dir(current, old)?; } solidcraft_engine::io::adopt_legacy_dir(current, legacy)?; @@ -1388,14 +1388,14 @@ mod msaa_tests { std::fs::create_dir_all(&legacy_eframe).unwrap(); std::fs::write(legacy.join("graphics.json"), r#"{"msaa":8}"#).unwrap(); std::fs::write(legacy_eframe.join("app.ron"), "(prefs)").unwrap(); - super::adopt_settings(¤t, None, &legacy, Some(&legacy_eframe)).unwrap(); + super::adopt_settings(¤t, &[], &legacy, Some(&legacy_eframe)).unwrap(); assert_eq!(std::fs::read_to_string(current.join("graphics.json")).unwrap(), r#"{"msaa":8}"#); assert_eq!(std::fs::read_to_string(current.join("app.ron")).unwrap(), "(prefs)"); assert!(legacy.join("graphics.json").is_file() && legacy_eframe.join("app.ron").is_file()); // Later launches leave the current settings alone. std::fs::write(current.join("app.ron"), "(mine)").unwrap(); std::fs::remove_file(current.join("graphics.json")).unwrap(); - super::adopt_settings(¤t, None, &legacy, Some(&legacy_eframe)).unwrap(); + super::adopt_settings(¤t, &[], &legacy, Some(&legacy_eframe)).unwrap(); assert_eq!(std::fs::read_to_string(current.join("app.ron")).unwrap(), "(mine)"); assert!(!current.join("graphics.json").exists()); let _ = std::fs::remove_dir_all(&d); diff --git a/assets/README.md b/assets/README.md index 604e41392..d91988346 100644 --- a/assets/README.md +++ b/assets/README.md @@ -76,7 +76,7 @@ The CLI still supports arbitrary PNG/ICO exports with `solidcraft-cli icon`. | macOS | Composer master and paired exports; bundle installs `Assets.car` and `SolidCraft.icns` | | Windows executable | `solidcraft-executable.ico`: original DIB/mask representations at 16/24/32/48/64/128/256 px | | Windows installer | `solidcraft.ico`: PNG representations at 16/20/24/32/40/48/64/128/256 px; `SOLIDCRAFT_ICONS` override retained | -| Linux, Nix, deb/rpm, tar, Flatpak, Snap | Copy canonical hicolor images; icon name stays `ai.storyteller.solidcraft` | +| Linux, Nix, deb/rpm, tar, Flatpak, Snap | Copy canonical hicolor images; icon name stays `io.tangencylabs.solidcraft` | | AppImage | Uses the Linux 256 px image and `.DirIcon` alias | | FreeBSD | Shares Linux hicolor images and freedesktop metadata | | Web | HTML/Trunk and `manifest.webmanifest` stay in `apps/solidcraft-web/`; copies Japanese font/licence to `fonts/`, uses the collected CSS, and copies the Linux 32/256/512 px images to `icons/` for the favicon and installed app | diff --git a/assets/icons/app/linux/exports/hicolor/128x128/apps/ai.storyteller.solidcraft.png b/assets/icons/app/linux/exports/hicolor/128x128/apps/io.tangencylabs.solidcraft.png similarity index 100% rename from assets/icons/app/linux/exports/hicolor/128x128/apps/ai.storyteller.solidcraft.png rename to assets/icons/app/linux/exports/hicolor/128x128/apps/io.tangencylabs.solidcraft.png diff --git a/assets/icons/app/linux/exports/hicolor/16x16/apps/ai.storyteller.solidcraft.png b/assets/icons/app/linux/exports/hicolor/16x16/apps/io.tangencylabs.solidcraft.png similarity index 100% rename from assets/icons/app/linux/exports/hicolor/16x16/apps/ai.storyteller.solidcraft.png rename to assets/icons/app/linux/exports/hicolor/16x16/apps/io.tangencylabs.solidcraft.png diff --git a/assets/icons/app/linux/exports/hicolor/24x24/apps/ai.storyteller.solidcraft.png b/assets/icons/app/linux/exports/hicolor/24x24/apps/io.tangencylabs.solidcraft.png similarity index 100% rename from assets/icons/app/linux/exports/hicolor/24x24/apps/ai.storyteller.solidcraft.png rename to assets/icons/app/linux/exports/hicolor/24x24/apps/io.tangencylabs.solidcraft.png diff --git a/assets/icons/app/linux/exports/hicolor/256x256/apps/ai.storyteller.solidcraft.png b/assets/icons/app/linux/exports/hicolor/256x256/apps/io.tangencylabs.solidcraft.png similarity index 100% rename from assets/icons/app/linux/exports/hicolor/256x256/apps/ai.storyteller.solidcraft.png rename to assets/icons/app/linux/exports/hicolor/256x256/apps/io.tangencylabs.solidcraft.png diff --git a/assets/icons/app/linux/exports/hicolor/32x32/apps/ai.storyteller.solidcraft.png b/assets/icons/app/linux/exports/hicolor/32x32/apps/io.tangencylabs.solidcraft.png similarity index 100% rename from assets/icons/app/linux/exports/hicolor/32x32/apps/ai.storyteller.solidcraft.png rename to assets/icons/app/linux/exports/hicolor/32x32/apps/io.tangencylabs.solidcraft.png diff --git a/assets/icons/app/linux/exports/hicolor/48x48/apps/ai.storyteller.solidcraft.png b/assets/icons/app/linux/exports/hicolor/48x48/apps/io.tangencylabs.solidcraft.png similarity index 100% rename from assets/icons/app/linux/exports/hicolor/48x48/apps/ai.storyteller.solidcraft.png rename to assets/icons/app/linux/exports/hicolor/48x48/apps/io.tangencylabs.solidcraft.png diff --git a/assets/icons/app/linux/exports/hicolor/512x512/apps/ai.storyteller.solidcraft.png b/assets/icons/app/linux/exports/hicolor/512x512/apps/io.tangencylabs.solidcraft.png similarity index 100% rename from assets/icons/app/linux/exports/hicolor/512x512/apps/ai.storyteller.solidcraft.png rename to assets/icons/app/linux/exports/hicolor/512x512/apps/io.tangencylabs.solidcraft.png diff --git a/assets/icons/app/linux/exports/hicolor/64x64/apps/ai.storyteller.solidcraft.png b/assets/icons/app/linux/exports/hicolor/64x64/apps/io.tangencylabs.solidcraft.png similarity index 100% rename from assets/icons/app/linux/exports/hicolor/64x64/apps/ai.storyteller.solidcraft.png rename to assets/icons/app/linux/exports/hicolor/64x64/apps/io.tangencylabs.solidcraft.png diff --git a/assets/platforms/linux/ai.storyteller.solidcraft.desktop b/assets/platforms/linux/io.tangencylabs.solidcraft.desktop similarity index 62% rename from assets/platforms/linux/ai.storyteller.solidcraft.desktop rename to assets/platforms/linux/io.tangencylabs.solidcraft.desktop index 818f5c78f..789245ca9 100644 --- a/assets/platforms/linux/ai.storyteller.solidcraft.desktop +++ b/assets/platforms/linux/io.tangencylabs.solidcraft.desktop @@ -5,12 +5,12 @@ GenericName=3D CAD Comment=Parametric 3D CAD: sketch, constrain, extrude, and change a parameter to rebuild Exec=solidcraft %f TryExec=solidcraft -Icon=ai.storyteller.solidcraft +Icon=io.tangencylabs.solidcraft Terminal=false StartupNotify=true -StartupWMClass=ai.storyteller.solidcraft +StartupWMClass=io.tangencylabs.solidcraft Categories=Graphics;3DGraphics;Engineering; Keywords=cad;3d;parametric;sketch;step;stl;modelling;modeling; MimeType=application/x-solidcraft;model/step;model/iges;model/stl;model/3mf; -# Releases before 0.8 used this desktop id; launchers keep pinned entries across the rename. -X-Flatpak-RenamedFrom=ai.storyteller.solvecraft.desktop; +# Desktop ids of earlier releases; launchers keep pinned entries across the renames. +X-Flatpak-RenamedFrom=ai.storyteller.solidcraft.desktop;ai.storyteller.solvecraft.desktop; diff --git a/assets/platforms/linux/ai.storyteller.solidcraft.metainfo.xml.in b/assets/platforms/linux/io.tangencylabs.solidcraft.metainfo.xml.in similarity index 82% rename from assets/platforms/linux/ai.storyteller.solidcraft.metainfo.xml.in rename to assets/platforms/linux/io.tangencylabs.solidcraft.metainfo.xml.in index ef9b2c237..dfb5a2cf8 100644 --- a/assets/platforms/linux/ai.storyteller.solidcraft.metainfo.xml.in +++ b/assets/platforms/linux/io.tangencylabs.solidcraft.metainfo.xml.in @@ -2,7 +2,7 @@ - ai.storyteller.solidcraft + io.tangencylabs.solidcraft CC0-1.0 MIT OR Apache-2.0 SolidCraft @@ -24,8 +24,8 @@
  • Every action is a command, scriptable from a CLI, a JSON control channel and an MCP server
  • - ai.storyteller.solidcraft.desktop - ai.storyteller.solidcraft + io.tangencylabs.solidcraft.desktop + io.tangencylabs.solidcraft https://docs.solidcraft.io/ https://github.com/bherbruck/solidcraft/issues https://docs.solidcraft.io/ @@ -56,11 +56,15 @@ solidcraft solidcraft-cli application/x-solidcraft - + + ai.storyteller.solidcraft + ai.storyteller.solidcraft.desktop ai.storyteller.solvecraft.desktop
    - + + ai.storyteller.solidcraft ai.storyteller.solvecraft diff --git a/assets/platforms/linux/ai.storyteller.solidcraft.mime.xml b/assets/platforms/linux/io.tangencylabs.solidcraft.mime.xml similarity index 93% rename from assets/platforms/linux/ai.storyteller.solidcraft.mime.xml rename to assets/platforms/linux/io.tangencylabs.solidcraft.mime.xml index 15baa1891..4a03d2caf 100644 --- a/assets/platforms/linux/ai.storyteller.solidcraft.mime.xml +++ b/assets/platforms/linux/io.tangencylabs.solidcraft.mime.xml @@ -4,7 +4,7 @@ SolidCraft design - + diff --git a/assets/platforms/macos/Info.plist.in b/assets/platforms/macos/Info.plist.in index f12ee746a..40a20f7d1 100644 --- a/assets/platforms/macos/Info.plist.in +++ b/assets/platforms/macos/Info.plist.in @@ -13,7 +13,7 @@ CFBundleExecutable SolidCraft CFBundleIdentifier - ai.storyteller.solidcraft + io.tangencylabs.solidcraft CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType diff --git a/crates/engine/src/recovery.rs b/crates/engine/src/recovery.rs index 336eadeda..9c82b42f9 100644 --- a/crates/engine/src/recovery.rs +++ b/crates/engine/src/recovery.rs @@ -40,9 +40,9 @@ pub fn default_dir() -> Option { }; let (dir, legacy) = dirs_under(&long_names(&root), cfg!(windows) || cfg!(target_os = "macos")); // Compatibility shim (docs/compatibility.md): autosaves made before the rename (or, in the - // Flatpak sandbox, under the old app id) are copied to the new folder on first launch; the + // Flatpak sandbox, under an earlier app id) are copied to the new folder on first launch; the // old folder is left as it was. - for old in solidcraft_io::legacy_flatpak_path(&dir).into_iter().chain([legacy]) { + for old in solidcraft_io::legacy_flatpak_paths(&dir).into_iter().chain([legacy]) { if let Err(e) = solidcraft_io::adopt_legacy_dir(&dir, &old) { log::warn!("recovery: could not copy {} to {}: {e}", old.display(), dir.display()); } diff --git a/crates/io/src/legacy_dir.rs b/crates/io/src/legacy_dir.rs index 7dd70ea42..0bd9315c0 100644 --- a/crates/io/src/legacy_dir.rs +++ b/crates/io/src/legacy_dir.rs @@ -6,9 +6,13 @@ use std::path::{Path, PathBuf}; /// The Linux app id (Flatpak, desktop entry, AppStream, Wayland `app_id`). -pub const APP_ID: &str = "ai.storyteller.solidcraft"; -/// The app id of releases before 0.8 (compatibility shim, docs/compatibility.md). +pub const APP_ID: &str = "io.tangencylabs.solidcraft"; +/// The app id of releases before 0.8 (compatibility shim, docs/compatibility.md). eframe kept +/// the window state under it, so it is also the old settings key. pub const LEGACY_APP_ID: &str = "ai.storyteller.solvecraft"; +/// Every earlier app id, newest first (compatibility shim, docs/compatibility.md): 0.8 until the +/// move to Tangency Labs used `ai.storyteller.solidcraft`, releases before 0.8 `LEGACY_APP_ID`. +pub const PREVIOUS_APP_IDS: [&str; 2] = ["ai.storyteller.solidcraft", LEGACY_APP_ID]; /// Most files and nesting copied from a legacy folder (it holds preferences, autosaves and /// small caches; anything bigger is not ours). @@ -27,23 +31,23 @@ pub fn adopt_legacy_dir(current: &Path, legacy: &Path) -> std::io::Result Ok(true) } -/// In the Flatpak sandbox, the same `path` under the pre-rename app's data folder: Flatpak keeps -/// each app's XDG folders under `~/.var/app/`, so after the app id changed, settings and -/// autosaves of earlier Flatpak releases sit under the old id. `None` outside the sandbox or for -/// paths outside our own `~/.var/app` folder. Flatpak moves that folder itself when an install -/// follows the end-of-life rebase; this covers installs made next to the old app, which reach it -/// read-only through the manifest's `--filesystem` grant. -pub fn legacy_flatpak_path(path: &Path) -> Option { - flatpak_twin(path, &std::env::var_os("FLATPAK_ID")?, Path::new(&std::env::var_os("HOME")?)) +/// In the Flatpak sandbox, the same `path` under each earlier app id's data folder, newest first: +/// Flatpak keeps each app's XDG folders under `~/.var/app/`, so after the app id changed, +/// settings and autosaves of earlier Flatpak releases sit under the old id. Empty outside the +/// sandbox or for paths outside our own `~/.var/app` folder. Flatpak moves that folder itself +/// when an install follows the end-of-life rebase; this covers installs made next to the old +/// app, which reach it read-only through the manifest's `--filesystem` grants. +pub fn legacy_flatpak_paths(path: &Path) -> Vec { + let (Some(id), Some(home)) = (std::env::var_os("FLATPAK_ID"), std::env::var_os("HOME")) else { return Vec::new() }; + flatpak_twins(path, &id, Path::new(&home)) } -fn flatpak_twin(path: &Path, flatpak_id: &std::ffi::OsStr, home: &Path) -> Option { - if flatpak_id != APP_ID { - return None; - } +fn flatpak_twins(path: &Path, flatpak_id: &std::ffi::OsStr, home: &Path) -> Vec { let apps = home.join(".var").join("app"); - let rel = path.strip_prefix(apps.join(APP_ID)).ok()?; - Some(apps.join(LEGACY_APP_ID).join(rel)) + match path.strip_prefix(apps.join(APP_ID)) { + Ok(rel) if flatpak_id == APP_ID => PREVIOUS_APP_IDS.iter().map(|old| apps.join(old).join(rel)).collect(), + _ => Vec::new(), + } } fn copy_tree(from: &Path, to: &Path, depth: usize, budget: &mut usize) -> std::io::Result<()> { @@ -100,14 +104,32 @@ mod tests { } #[test] - fn flatpak_twin_maps_our_sandbox_data_to_the_old_app_id() { + fn flatpak_twins_map_our_sandbox_data_to_the_old_app_ids() { let home = Path::new("/home/u"); - let ours = home.join(".var/app/ai.storyteller.solidcraft/data/solidcraft"); + let ours = home.join(".var/app/io.tangencylabs.solidcraft/data/solidcraft"); let id = std::ffi::OsStr::new(APP_ID); - assert_eq!(flatpak_twin(&ours, id, home), Some(home.join(".var/app/ai.storyteller.solvecraft/data/solidcraft"))); + assert_eq!( + flatpak_twins(&ours, id, home), + [home.join(".var/app/ai.storyteller.solidcraft/data/solidcraft"), home.join(".var/app/ai.storyteller.solvecraft/data/solidcraft")] + ); // Outside our sandbox folder, or in another app's sandbox, there is nothing to map. - assert_eq!(flatpak_twin(&home.join(".local/share/solidcraft"), id, home), None); - assert_eq!(flatpak_twin(&ours, std::ffi::OsStr::new("org.example.Other"), home), None); + assert!(flatpak_twins(&home.join(".local/share/solidcraft"), id, home).is_empty()); + assert!(flatpak_twins(&ours, std::ffi::OsStr::new("org.example.Other"), home).is_empty()); + } + + #[test] + fn the_desktop_entry_is_named_after_the_app_id() { + // The window's Wayland app_id / X11 class is APP_ID; the desktop names it and its file + // name, so docks find the entry and its icon. + let linux = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../assets/platforms/linux"); + let desktop = std::fs::read_to_string(linux.join(format!("{APP_ID}.desktop"))).unwrap(); + assert!(desktop.lines().any(|l| l == format!("StartupWMClass={APP_ID}"))); + assert!(desktop.lines().any(|l| l == format!("Icon={APP_ID}"))); + let metainfo = std::fs::read_to_string(linux.join(format!("{APP_ID}.metainfo.xml.in"))).unwrap(); + assert!(metainfo.contains(&format!("{APP_ID}"))); + for old in PREVIOUS_APP_IDS { + assert!(metainfo.contains(&format!("{old}")) && desktop.contains(&format!("{old}.desktop;"))); + } } #[test] diff --git a/crates/io/src/lib.rs b/crates/io/src/lib.rs index fa0c98622..f0e98de48 100644 --- a/crates/io/src/lib.rs +++ b/crates/io/src/lib.rs @@ -32,7 +32,7 @@ pub mod vfs; pub use dxf::{read_dxf, write_dxf}; pub use dxf_out::{DxfEntity, DxfLayer, DxfLinetype, DxfShape, loop_shapes, seg_shape, write_dxf_drawing}; -pub use legacy_dir::{APP_ID, LEGACY_APP_ID, adopt_legacy_dir, legacy_flatpak_path}; +pub use legacy_dir::{APP_ID, LEGACY_APP_ID, PREVIOUS_APP_IDS, adopt_legacy_dir, legacy_flatpak_paths}; pub use safe_write::{backup_path, write_atomic}; pub use sketch2d::{Geom2, MAX_DRAWING_BYTES}; pub use svg::read_svg; diff --git a/crates/ui-egui/src/agent_chat/panel.rs b/crates/ui-egui/src/agent_chat/panel.rs index d06925b5c..88c0fcaf3 100644 --- a/crates/ui-egui/src/agent_chat/panel.rs +++ b/crates/ui-egui/src/agent_chat/panel.rs @@ -1188,7 +1188,7 @@ fn switcher(app: &mut SolveApp, ui: &mut egui::Ui) { } #[cfg(not(target_arch = "wasm32"))] -const FLATPAK_OVERRIDE: &str = "flatpak override --user ai.storyteller.solidcraft --filesystem=~/.nvm:ro --filesystem=~/.local/bin:ro --filesystem=~/.local/share/claude:ro --filesystem=~/.claude --filesystem=~/.claude.json --share=network"; +const FLATPAK_OVERRIDE: &str = "flatpak override --user io.tangencylabs.solidcraft --filesystem=~/.nvm:ro --filesystem=~/.local/bin:ro --filesystem=~/.local/share/claude:ro --filesystem=~/.claude --filesystem=~/.claude.json --share=network"; #[cfg(not(target_arch = "wasm32"))] pub(super) fn no_agents_message() -> String { @@ -1978,7 +1978,7 @@ mod tests { child.args(["--exact", "agent_chat::panel::tests::empty_discovery_explains_flatpak_permissions", "--nocapture"]); child.env(CHILD, case); if case == "flatpak" { - child.env("FLATPAK_ID", "ai.storyteller.solidcraft"); + child.env("FLATPAK_ID", "io.tangencylabs.solidcraft"); } else { child.env_remove("FLATPAK_ID"); } diff --git a/crates/ui-egui/src/update.rs b/crates/ui-egui/src/update.rs index a7ee2442d..c6bdb5916 100644 --- a/crates/ui-egui/src/update.rs +++ b/crates/ui-egui/src/update.rs @@ -56,7 +56,7 @@ const MAX_ASSETS: usize = 400; const TAB_ROOM: f32 = 300.0; /// The Linux app ID (Flatpak, desktop files). -pub const APP_ID: &str = "ai.storyteller.solidcraft"; +pub const APP_ID: &str = "io.tangencylabs.solidcraft"; /// Why a check failed. Automatic checks never show it; Check now does. #[derive(Clone, Debug, PartialEq)] diff --git a/crates/ui-egui/src/update/tests.rs b/crates/ui-egui/src/update/tests.rs index c86ecc2ce..690d70b21 100644 --- a/crates/ui-egui/src/update/tests.rs +++ b/crates/ui-egui/src/update/tests.rs @@ -191,7 +191,7 @@ fn each_installation_gets_its_own_file() { InstallKind::Snap { store: false }.update_command(Some("solidcraft-linux-x86_64.snap")).as_deref(), Some("sudo snap install --dangerous ./solidcraft-linux-x86_64.snap") ); - assert_eq!(InstallKind::Flatpak(APP_ID.into()).update_command(None).as_deref(), Some("flatpak update ai.storyteller.solidcraft")); + assert_eq!(InstallKind::Flatpak(APP_ID.into()).update_command(None).as_deref(), Some("flatpak update io.tangencylabs.solidcraft")); assert_eq!( InstallKind::Deb.update_command(Some("solidcraft-linux-x86_64.deb")).as_deref(), Some("sudo apt install ./solidcraft-linux-x86_64.deb") diff --git a/docs/agent-chat.md b/docs/agent-chat.md index 2e067ad0d..b3b4ba53f 100644 --- a/docs/agent-chat.md +++ b/docs/agent-chat.md @@ -188,7 +188,7 @@ through nvm or `~/.local/bin` can therefore work in a terminal while SolidCraft that no agent was found. For Claude Code and its ACP adapter, run: ```sh -flatpak override --user ai.storyteller.solidcraft --filesystem=~/.nvm:ro --filesystem=~/.local/bin:ro --filesystem=~/.local/share/claude:ro --filesystem=~/.claude --filesystem=~/.claude.json --share=network +flatpak override --user io.tangencylabs.solidcraft --filesystem=~/.nvm:ro --filesystem=~/.local/bin:ro --filesystem=~/.local/share/claude:ro --filesystem=~/.claude --filesystem=~/.claude.json --share=network ``` These permissions apply to SolidCraft for your user account: diff --git a/docs/book/src/guide/getting-started.md b/docs/book/src/guide/getting-started.md index 4bb2db13e..58403bb69 100644 --- a/docs/book/src/guide/getting-started.md +++ b/docs/book/src/guide/getting-started.md @@ -40,7 +40,7 @@ When updating from a build released under the previous product name, follow the ### Linux AppImage The first time you open the AppImage it adds a menu entry and icons under `~/.local/share` -(`applications/ai.storyteller.solidcraft.desktop`, `icons/hicolor`), so the desktop shows the +(`applications/io.tangencylabs.solidcraft.desktop`, `icons/hicolor`), so the desktop shows the right name and icon. It adds nothing if [appimaged](https://github.com/probonopd/go-appimage) already made an entry for the file, or if a launcher such as Gear Lever or AppImageLauncher started it (and removes the entry SolidCraft added before). To @@ -61,8 +61,8 @@ to the same user installation: ```sh flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo flatpak remote-add --user --if-not-exists solidcraft https://docs.solidcraft.io/flatpak/solidcraft.flatpakrepo -flatpak install --user solidcraft ai.storyteller.solidcraft -flatpak run ai.storyteller.solidcraft +flatpak install --user solidcraft io.tangencylabs.solidcraft +flatpak run io.tangencylabs.solidcraft ``` A SolidCraft remote added before the project moved to `docs.solidcraft.io` (from @@ -70,17 +70,18 @@ A SolidCraft remote added before the project moved to `docs.solidcraft.io` (from `flatpak remote-modify --user --url=https://docs.solidcraft.io/flatpak/repo/ solidcraft` and `flatpak update --user`. -Releases up to 0.7 used the application ID `ai.storyteller.solvecraft`. If you installed one -of those from the SolidCraft remote, `flatpak update --user` reports it as end-of-life and offers -to replace it with `ai.storyteller.solidcraft`; accept, and your settings and autosaves move with -it. If you installed a `.flatpak` bundle, install the new bundle, launch it once (it copies your -settings), then run `flatpak uninstall --user ai.storyteller.solvecraft` (see the +Earlier releases used the application IDs `ai.storyteller.solidcraft` and, up to 0.7, +`ai.storyteller.solvecraft`. If you installed one of those from the SolidCraft remote, +`flatpak update --user` reports it as end-of-life and offers to replace it with +`io.tangencylabs.solidcraft`; accept, and your settings and autosaves move with it. If you +installed a `.flatpak` bundle, install the new bundle, launch it once (it copies your settings), +then run `flatpak uninstall --user ai.storyteller.solidcraft` (or `ai.storyteller.solvecraft`; see the [compatibility notes](https://github.com/bherbruck/solidcraft/blob/main/docs/compatibility.md#linux-app-id)). Alternatively, download the release's `.flatpak` file for your architecture and run `flatpak install --user ./solidcraft-VERSION-linux-ARCH.flatpak`. The bundle supplies the Flathub runtime repository address; installation still needs internet access to fetch any -missing runtime. Launch with `flatpak run ai.storyteller.solidcraft`, rather than looking for +missing runtime. Launch with `flatpak run io.tangencylabs.solidcraft`, rather than looking for a host `solidcraft` binary. Files chosen through Open/Save use the desktop file-chooser portal; command-line paths outside Documents may need a specific additional filesystem permission. diff --git a/docs/book/src/guide/troubleshooting.md b/docs/book/src/guide/troubleshooting.md index 2a2fda414..3762b8fa6 100644 --- a/docs/book/src/guide/troubleshooting.md +++ b/docs/book/src/guide/troubleshooting.md @@ -15,7 +15,7 @@ start), skips the "Recover unsaved design?" offer and draws with the software re - Windows: run `solidcraft.exe --safe-mode` from a terminal in the install folder, or add ` --safe-mode` to the end of a shortcut's *Target*. - macOS: `open -a SolidCraft --args --safe-mode` -- Linux: `solidcraft --safe-mode` (Flatpak: `flatpak run ai.storyteller.solidcraft --safe-mode`) +- Linux: `solidcraft --safe-mode` (Flatpak: `flatpak run io.tangencylabs.solidcraft --safe-mode`) Setting `SOLIDCRAFT_SAFE_MODE=1` does the same. From 0.10.2, if two launches in a row stop before the window opens, the next one starts in safe mode by itself. `SOLIDCRAFT_RENDERER=cpu` @@ -47,7 +47,7 @@ with a bug report. | Windows | `%APPDATA%\SolidCraft` | `%LOCALAPPDATA%\SolidCraft` | | macOS | `~/Library/Application Support/SolidCraft` | (the same folder) | | Linux | `~/.local/share/solidcraft` | (the same folder); thumbnails in `$XDG_CACHE_HOME/SolidCraft` or `/tmp/SolidCraft` | -| Linux (Flatpak) | `~/.var/app/ai.storyteller.solidcraft/data/solidcraft` | (the same folder) | +| Linux (Flatpak) | `~/.var/app/io.tangencylabs.solidcraft/data/solidcraft` | (the same folder) | On Windows, paste `%APPDATA%` or `%LOCALAPPDATA%` into the Explorer address bar to open the folder. Releases before the rename used `SolveCraft` folders next to these; SolidCraft only diff --git a/docs/book/src/guide/updates.md b/docs/book/src/guide/updates.md index fa77b8802..b49b37119 100644 --- a/docs/book/src/guide/updates.md +++ b/docs/book/src/guide/updates.md @@ -98,7 +98,7 @@ and SolidCraft picks the one matching how it was installed: | Installed as | Detected by | Download | How to update | |---|---|---|---| | AppImage | `APPIMAGE` is set | `solidcraft-linux-.AppImage` | Replace the old AppImage with the new one | -| Flatpak | `FLATPAK_ID` is set | doesn't check (see below) | `flatpak update ai.storyteller.solidcraft` | +| Flatpak | `FLATPAK_ID` is set | doesn't check (see below) | `flatpak update io.tangencylabs.solidcraft` | | Snap from the Snap Store | `SNAP` is set | release page | `sudo snap refresh solidcraft` (snapd also refreshes by itself) | | Snap from a downloaded file | `SNAP_REVISION` starts with `x` | `solidcraft-linux-.snap` | `sudo snap install --dangerous ./solidcraft-linux-.snap` | | `.deb` | under `/usr`, dpkg knows `solidcraft` | `solidcraft-linux-.deb` | `sudo apt install ./solidcraft-linux-.deb` | diff --git a/docs/compatibility.md b/docs/compatibility.md index 9ecc3a6f0..9cc17229a 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -22,7 +22,7 @@ New designs are saved as `.solidcraft`. Files with the old extension still open | Browser file picker | `apps/solidcraft-web/src/files.rs` (`accept`) | | Windows | `assets/platforms/windows/solidcraft.wxs`: the `.solvecraft` extension on the design ProgId and in `SupportedTypes` | | macOS | `assets/platforms/macos/Info.plist.in`: `solvecraft` in the design document type's extensions | -| Linux / FreeBSD / Flatpak | `assets/platforms/linux/ai.storyteller.solidcraft.mime.xml`: `*.solvecraft` glob and the `application/x-solvecraft` alias | +| Linux / FreeBSD / Flatpak | `assets/platforms/linux/io.tangencylabs.solidcraft.mime.xml`: `*.solvecraft` glob and the `application/x-solvecraft` alias | Recent-files entries that point at a `.solvecraft` file keep working: they are plain paths and open through the same detection. The browser app also lists designs it stored under the old @@ -111,42 +111,45 @@ test `legacy_design_files_and_resource_uris`). | Package | Decision | Why | |---|---|---| -| Flatpak app ID / Linux desktop ID | changed in 0.8 from `ai.storyteller.solvecraft` to `ai.storyteller.solidcraft` | The ID the ArtCraft launcher looks for (`ai.storyteller.`). The `.desktop`, metainfo and MIME file names, the icon name, and the Wayland `app_id` / X11 class follow it. Existing installs are moved over; see [Linux app ID](#linux-app-id). | +| Flatpak app ID / Linux desktop ID | changed in 0.8 from `ai.storyteller.solvecraft` to `ai.storyteller.solidcraft`, then with the move to Tangency Labs to `io.tangencylabs.solidcraft` | The project's own reverse-DNS domain. The `.desktop`, metainfo and MIME file names, the icon name, and the Wayland `app_id` / X11 class follow it. Existing installs are moved over; see [Linux app ID](#linux-app-id). | | Flatpak remote file | `solidcraft.flatpakrepo`, plus a legacy `solvecraft.flatpakrepo` copy | Old links keep working; existing remotes point at the repo URL, which is unchanged. | -| macOS bundle ID | changed to `ai.storyteller.solidcraft` | No updater depends on it; the app is drag-installed. macOS may ask again on first launch (unsigned builds). | -| MSI `UpgradeCode` | **kept** | So the new MSI upgrades the old install in place. Product name is SolidCraft; the default folder becomes `Program Files\SolidCraft` (the major upgrade removes the old folder). A custom install folder isn't remembered across this one upgrade. | +| macOS bundle ID | changed to `ai.storyteller.solidcraft`, then to `io.tangencylabs.solidcraft`; the CLI's signing identifier is `io.tangencylabs.solidcraft.cli` (was `ai.storyteller.solidcraft-cli`) | No updater depends on it; the app is drag-installed and replaces the old `SolidCraft.app`. Settings live in folders named after the product, not the bundle ID, so they stay. macOS ties privacy permissions (such as access to Documents or Downloads) to the bundle ID, so it asks for them once more after the update. | +| MSI `UpgradeCode` | **kept** (also through the `io.tangencylabs` move; the Windows build sets no AppUserModelID and its ProgIDs `Solidcraft.Design` / `Solidcraft.Model` don't carry the app ID, so nothing there changes) | So the new MSI upgrades the old install in place. Product name is SolidCraft; the default folder becomes `Program Files\SolidCraft` (the major upgrade removes the old folder). A custom install folder isn't remembered across this one upgrade. | | deb / rpm package name | renamed to `solidcraft`; deb `Replaces`/`Conflicts`/`Provides: solvecraft`, rpm `Obsoletes`/`Provides: solvecraft` | Installing the new package replaces the old one instead of installing side by side. | | AppImage | `solidcraft--linux-.AppImage`; the release also carries a copy of its `.zsync` under the old `solvecraft-…` name | AppImages already installed look for the old-named `.zsync`, so AppImageUpdate keeps finding updates. | ## Linux app ID -Releases up to 0.7 used `ai.storyteller.solvecraft`; 0.8 uses `ai.storyteller.solidcraft` -everywhere (Flatpak, deb, rpm, AppImage, Snap, FreeBSD, Nix). The shims: +Releases up to 0.7 used `ai.storyteller.solvecraft`; 0.8 until the move to Tangency Labs used +`ai.storyteller.solidcraft`; releases since use `io.tangencylabs.solidcraft` everywhere (Flatpak, +deb, rpm, AppImage, Snap, FreeBSD, Nix, and the macOS bundle). The settings and autosave folders +(`solidcraft` / `SolidCraft`) are named after the product, not the app ID, so outside the Flatpak +sandbox they don't move. The shims cover both earlier IDs: | Shim | Where | What it does | |---|---|---| -| End-of-life rebase in the Flatpak repository | `packaging/flatpak-site.sh` | Each release's Pages deploy keeps the old `app/ai.storyteller.solvecraft//stable` refs (mirrored from the previous deploy) and marks them once with `flatpak build-commit-from --end-of-life-rebase=ai.storyteller.solvecraft=ai.storyteller.solidcraft`. `flatpak update` then says the old app is end-of-life and offers to replace it with the new one; accepting installs `ai.storyteller.solidcraft`, uninstalls the old app, and Flatpak moves `~/.var/app/ai.storyteller.solvecraft` to the new id's folder (leaving a symlink at the old path) on the first launch, so settings and autosaves come along unchanged. | -| AppStream `` / `` | `assets/platforms/linux/ai.storyteller.solidcraft.metainfo.xml.in` | Software centres treat the new id as the successor of the old one and of `ai.storyteller.solvecraft.desktop`. | -| `X-Flatpak-RenamedFrom` | `assets/platforms/linux/ai.storyteller.solidcraft.desktop` | Desktops that honour it (GNOME Shell) keep favourites and pinned launchers pointing at the renamed entry. | -| Read-only access to the old Flatpak data folder | `--filesystem=~/.var/app/ai.storyteller.solvecraft:ro` in `packaging/linux/flatpak/ai.storyteller.solidcraft.bundle.yml`; `solidcraft_io::legacy_flatpak_path`, used by `adopt_legacy_settings` and `recovery::default_dir` | When the new app was installed next to the old one (for example from a `.flatpak` bundle, which has no update feed) instead of through the rebase, its first launch copies settings and autosaves from the old app's folder, as in section 4. The old folder is not changed. | +| End-of-life rebase in the Flatpak repository | `packaging/flatpak-site.sh` | Each release's Pages deploy keeps the old `app/ai.storyteller.solidcraft//stable` and `app/ai.storyteller.solvecraft//stable` refs (mirrored from the previous deploy) and marks each with `flatpak build-commit-from --end-of-life-rebase==io.tangencylabs.solidcraft` (once the repository has the new ref). A ref already marked with a rebase to an older id (`ai.storyteller.solvecraft` pointed at `ai.storyteller.solidcraft`) is marked again, so every old install moves in one step. `flatpak update` then says the old app is end-of-life and offers to replace it with the new one; accepting installs `io.tangencylabs.solidcraft`, uninstalls the old app, and Flatpak moves `~/.var/app/` to the new id's folder (leaving a symlink at the old path) on the first launch, so settings and autosaves come along unchanged. | +| AppStream `` / `` | `assets/platforms/linux/io.tangencylabs.solidcraft.metainfo.xml.in` | Software centres treat the new id as the successor of `ai.storyteller.solidcraft` and `ai.storyteller.solvecraft` and of their `.desktop` ids. | +| `X-Flatpak-RenamedFrom` | `assets/platforms/linux/io.tangencylabs.solidcraft.desktop` (both old `.desktop` ids) | Desktops that honour it (GNOME Shell) keep favourites and pinned launchers pointing at the renamed entry. | +| Read-only access to the old Flatpak data folders | `--filesystem=~/.var/app/ai.storyteller.solidcraft:ro` and `--filesystem=~/.var/app/ai.storyteller.solvecraft:ro` in `packaging/linux/flatpak/io.tangencylabs.solidcraft.bundle.yml`; `solidcraft_io::legacy_flatpak_paths` (`PREVIOUS_APP_IDS`, newest first), used by `adopt_legacy_settings` and `recovery::default_dir` | When the new app was installed next to an old one (for example from a `.flatpak` bundle, which has no update feed) instead of through the rebase, its first launch copies settings and autosaves from the newest old app's folder that exists, as in section 4. The old folders are not changed. | | The old window `app_id` as eframe's legacy storage key | `adopt_legacy_settings` (`LEGACY_APP_ID`) | Window state that releases before the settings rename kept under `~/.local/share/ai.storyteller.solvecraft` is still copied (section 4). | -| Old AppImage menu entries | `packaging/linux/AppRun` | An AppImage's first run removes the `ai.storyteller.solvecraft.desktop` entry and icons that an AppImage up to 0.7 installed in `~/.local/share`, so the menu doesn't show the app twice. | +| Old AppImage menu entries | `packaging/linux/AppRun` | An AppImage's first run removes the `ai.storyteller.solidcraft.desktop` and `ai.storyteller.solvecraft.desktop` entries and icons that an earlier AppImage installed in `~/.local/share` (only entries it wrote itself), so the menu doesn't show the app twice. Test: `packaging/tests/apprun_test.py`. | deb and rpm need no shim: the package (`solidcraft`) is unchanged, and an upgrade removes the old -`/usr/share/applications/ai.storyteller.solvecraft.desktop`, metainfo, MIME and icon files +`/usr/share/applications/ai.storyteller.*.desktop`, metainfo, MIME and icon files because the new version doesn't ship them; the post-install script refreshes the desktop, MIME and icon caches, so no stale menu entry is left. The Snap is unaffected apart from its `common-id`: snapd names its menu entry after the snap. Flatpak installed from a downloaded `.flatpak` bundle (no update feed): install the new bundle, launch it once (settings and autosaves are copied), then -`flatpak uninstall --user ai.storyteller.solvecraft`. +`flatpak uninstall --user ai.storyteller.solidcraft` (or `ai.storyteller.solvecraft`). **Removal:** keep the end-of-life refs in the Flatpak repository for at least six months after -0.8.0 (until 2027-04) and at least two minor releases; removing them strands any install that -hasn't run `flatpak update` since. The read-only filesystem grant and `legacy_flatpak_path` can go -at the same time. ``, `` and `X-Flatpak-RenamedFrom` are harmless and can stay. -Tests: `flatpak_twin_maps_our_sandbox_data_to_the_old_app_id`, +the release that moved to `io.tangencylabs.solidcraft` and at least two minor releases; removing +them strands any install that hasn't run `flatpak update` since. The read-only filesystem grants +and `legacy_flatpak_paths` can go at the same time. ``, `` and `X-Flatpak-RenamedFrom` are harmless and can stay. +Tests: `flatpak_twins_map_our_sandbox_data_to_the_old_app_ids`, `first_launch_adopts_the_previous_release_settings`. ## macOS diff --git a/docs/mcp.md b/docs/mcp.md index d7e50c2c3..8b2026b15 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -133,7 +133,7 @@ not read-only, `destructiveHint` and `openWorldHint` are true. ### Client configuration -`solidcraft-cli` is on `PATH` after every package install: the Windows installer adds its folder, the deb, rpm and FreeBSD packages install it in `/usr/bin`, the Homebrew cask links it, the AppImage writes a small `solidcraft-cli` launcher into `~/.local/bin` on its first run, and the macOS app links it into `/opt/homebrew/bin` or `/usr/local/bin` when it starts (Help > Install solidcraft-cli command does it with an administrator prompt when those are not writable). Two packages keep it out of `PATH` by design: Snap exposes it as `solidcraft.cli`, and Flatpak runs it as `flatpak run --command=solidcraft-cli ai.storyteller.solidcraft`; use those as the client's `command` (with `mcp` as the arguments). +`solidcraft-cli` is on `PATH` after every package install: the Windows installer adds its folder, the deb, rpm and FreeBSD packages install it in `/usr/bin`, the Homebrew cask links it, the AppImage writes a small `solidcraft-cli` launcher into `~/.local/bin` on its first run, and the macOS app links it into `/opt/homebrew/bin` or `/usr/local/bin` when it starts (Help > Install solidcraft-cli command does it with an administrator prompt when those are not writable). Two packages keep it out of `PATH` by design: Snap exposes it as `solidcraft.cli`, and Flatpak runs it as `flatpak run --command=solidcraft-cli io.tangencylabs.solidcraft`; use those as the client's `command` (with `mcp` as the arguments). The quickest way: **Help > Connect AI assistants…** in the app, or diff --git a/flake.nix b/flake.nix index 4b9d4650e..65b2ac66a 100644 --- a/flake.nix +++ b/flake.nix @@ -135,14 +135,14 @@ postInstall = '' ${pkgs.lib.optionalString pkgs.stdenv.isLinux '' - install -Dm644 assets/platforms/linux/ai.storyteller.solidcraft.desktop \ - $out/share/applications/ai.storyteller.solidcraft.desktop - install -Dm644 assets/platforms/linux/ai.storyteller.solidcraft.mime.xml \ - $out/share/mime/packages/ai.storyteller.solidcraft.xml + install -Dm644 assets/platforms/linux/io.tangencylabs.solidcraft.desktop \ + $out/share/applications/io.tangencylabs.solidcraft.desktop + install -Dm644 assets/platforms/linux/io.tangencylabs.solidcraft.mime.xml \ + $out/share/mime/packages/io.tangencylabs.solidcraft.xml for size in 16 24 32 48 64 128 256 512; do - icon=$out/share/icons/hicolor/''${size}x''${size}/apps/ai.storyteller.solidcraft.png + icon=$out/share/icons/hicolor/''${size}x''${size}/apps/io.tangencylabs.solidcraft.png mkdir -p "$(dirname "$icon")" - cp assets/icons/app/linux/exports/hicolor/''${size}x''${size}/apps/ai.storyteller.solidcraft.png "$icon" >/dev/null + cp assets/icons/app/linux/exports/hicolor/''${size}x''${size}/apps/io.tangencylabs.solidcraft.png "$icon" >/dev/null done ''} ''; diff --git a/packaging/env.sh b/packaging/env.sh index 39408ae90..99a86a1d8 100644 --- a/packaging/env.sh +++ b/packaging/env.sh @@ -38,9 +38,10 @@ export DIST export SOLIDCRAFT_BUILD_DATE="${SOLIDCRAFT_BUILD_DATE:-${SOLVECRAFT_BUILD_DATE:-$(date -u +%Y-%m-%d)}}" export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-$ROOT/target}" # The reverse-DNS id: Flatpak app id, desktop, metainfo and MIME file names, icon name and the -# window's Wayland app_id / X11 class. Releases before 0.8 used ai.storyteller.solvecraft; the -# Flatpak repository rebases that id to this one (packaging/flatpak-site.sh, docs/compatibility.md). -APP_ID=ai.storyteller.solidcraft +# window's Wayland app_id / X11 class. Earlier releases used ai.storyteller.solidcraft (0.8 until +# the move to Tangency Labs) and ai.storyteller.solvecraft (before 0.8); the Flatpak repository +# rebases both to this one (packaging/flatpak-site.sh, docs/compatibility.md). +APP_ID=io.tangencylabs.solidcraft export APP_ID # Emit a GitHub Actions warning (plain stderr outside Actions). diff --git a/packaging/flatpak-site.sh b/packaging/flatpak-site.sh index 84e4d4ab0..045d886dd 100644 --- a/packaging/flatpak-site.sh +++ b/packaging/flatpak-site.sh @@ -6,12 +6,13 @@ trap 'echo "flatpak-site.sh: line $LINENO: \"$BASH_COMMAND\" failed (exit $?)" > site="${1:?site directory required}" tag="${RELEASE_TAG:-}" -app_id=ai.storyteller.solidcraft -# Compatibility shim (docs/compatibility.md): releases before 0.8 used this app id. Its refs stay -# in the repository, marked end-of-life with a rebase to $app_id once a release under $app_id -# has been imported. Until then (the latest release is still from before the rename), the -# release's bundles carry $legacy_id and are published as they are. -legacy_id=ai.storyteller.solvecraft +app_id=io.tangencylabs.solidcraft +# Compatibility shim (docs/compatibility.md): earlier releases used these app ids (newest first: +# 0.8 until the move to Tangency Labs, then releases before 0.8). Their refs stay in the +# repository, marked end-of-life with a rebase to $app_id once a release under $app_id has been +# imported. Until then (the latest release is still from before the move), the release's bundles +# carry an old id and are published as they are. +legacy_ids=(ai.storyteller.solidcraft ai.storyteller.solvecraft) if [ -z "$tag" ]; then tag="$(gh api "repos/$GITHUB_REPOSITORY/releases?per_page=100" \ --jq '[.[] | select(.draft == false and .prerelease == false)][0].tag_name // empty')" @@ -56,12 +57,15 @@ for arch in x86_64 aarch64; do ostree --repo="$validation_repo" init --mode=archive-z2 flatpak build-import-bundle "$validation_repo" "$bundles/$asset" refs="$(ostree --repo="$validation_repo" refs)" - if printf '%s\n' "$refs" | grep -Fxq "app/$app_id/$arch/stable"; then - bundle_id=$app_id - elif printf '%s\n' "$refs" | grep -Fxq "app/$legacy_id/$arch/stable"; then - bundle_id=$legacy_id - else - echo "error: $asset holds neither app/$app_id/$arch/stable nor app/$legacy_id/$arch/stable; refs:" >&2 + bundle_id= + for id in "$app_id" "${legacy_ids[@]}"; do + if printf '%s\n' "$refs" | grep -Fxq "app/$id/$arch/stable"; then + bundle_id=$id + break + fi + done + if [ -z "$bundle_id" ]; then + echo "error: $asset holds none of app/{$app_id,${legacy_ids[*]}}/$arch/stable; refs:" >&2 printf '%s\n' "$refs" >&2 exit 1 fi @@ -73,22 +77,28 @@ for arch in x86_64 aarch64; do echo "$asset: app/$bundle_id/$arch/stable" flatpak build-import-bundle "$repo_dir" "$bundles/$asset" done -# `flatpak update` then offers existing installs of the old id the move to the new one, and +# `flatpak update` then offers existing installs of an old id the move to the new one, and # Flatpak moves their ~/.var/app data folder along. The mark is a new commit on the old ref (the -# same app, so a skipped update changes nothing); it is made once and mirrored by later runs. +# same app, so a skipped update changes nothing); it is made once and mirrored by later runs. A +# ref already marked with a rebase to an older id (ai.storyteller.solvecraft pointed at +# ai.storyteller.solidcraft) is marked again, so every old install moves straight to $app_id. for arch in x86_64 aarch64; do - legacy_ref="app/$legacy_id/$arch/stable" - ostree --repo="$repo_dir" rev-parse "$legacy_ref" >/dev/null 2>&1 || continue - # Only rebase to an app the repository has: a release from before the rename has no new ref. - if ! ostree --repo="$repo_dir" rev-parse "app/$app_id/$arch/stable" >/dev/null 2>&1; then - echo "$legacy_ref: no app/$app_id/$arch/stable yet, not marked end-of-life" + new_ref="app/$app_id/$arch/stable" + # Only rebase to an app the repository has: a release from before the move has no new ref. + if ! ostree --repo="$repo_dir" rev-parse "$new_ref" >/dev/null 2>&1; then + echo "$new_ref: not in the repository yet, old ids not marked end-of-life" continue fi - if ! ostree --repo="$repo_dir" show --print-metadata-key=ostree.endoflife-rebase "$legacy_ref" >/dev/null 2>&1; then - flatpak build-commit-from --no-update-summary --end-of-life-rebase="$legacy_id=$app_id" \ - --src-ref="$legacy_ref" "$repo_dir" "$legacy_ref" - fi - test "$(ostree --repo="$repo_dir" show --print-metadata-key=ostree.endoflife-rebase "$legacy_ref")" = "'app/$app_id/$arch/stable'" + for legacy_id in "${legacy_ids[@]}"; do + legacy_ref="app/$legacy_id/$arch/stable" + ostree --repo="$repo_dir" rev-parse "$legacy_ref" >/dev/null 2>&1 || continue + mark="$(ostree --repo="$repo_dir" show --print-metadata-key=ostree.endoflife-rebase "$legacy_ref" 2>/dev/null || true)" + if [ "$mark" != "'$new_ref'" ]; then + flatpak build-commit-from --no-update-summary --end-of-life-rebase="$legacy_id=$app_id" \ + --src-ref="$legacy_ref" "$repo_dir" "$legacy_ref" + fi + test "$(ostree --repo="$repo_dir" show --print-metadata-key=ostree.endoflife-rebase "$legacy_ref")" = "'$new_ref'" + done done flatpak build-update-repo --title="SolidCraft" --comment='Official SolidCraft releases' \ --description='Official Flatpak repository for SolidCraft' \ diff --git a/packaging/linux/AppRun b/packaging/linux/AppRun index 345091d5a..9d27aeee7 100755 --- a/packaging/linux/AppRun +++ b/packaging/linux/AppRun @@ -3,7 +3,7 @@ # Adapted from PhotoCraft's AppRun (storytold/photocraft, Apache-2.0; see ATTRIBUTION.md). # # On Wayland the compositor resolves a window's dock icon by taking the window's -# app_id (ai.storyteller.solidcraft) and looking up an installed .desktop file. +# app_id (io.tangencylabs.solidcraft) and looking up an installed .desktop file. # An AppImage installs nothing, so every AppImage run would otherwise show the # generic "Wayland" icon. Best-effort desktop integration: on first run # (and whenever the AppImage's path changes) install the .desktop entry and the @@ -23,10 +23,11 @@ set -u APPDIR="$(dirname "$(readlink -f "$0")")" -DESK_ID=ai.storyteller.solidcraft +DESK_ID=io.tangencylabs.solidcraft CLI_MARKER="# solidcraft-cli wrapper written by the SolidCraft AppImage" -# Compatibility shim (docs/compatibility.md): the desktop id of releases before 0.8. -OLD_DESK_ID=ai.storyteller.solvecraft +# Compatibility shim (docs/compatibility.md): the desktop ids of earlier releases (0.8 until the +# move to Tangency Labs, and before 0.8). +OLD_DESK_IDS="ai.storyteller.solidcraft ai.storyteller.solvecraft" # The wrapper in ~/.local/bin: $1 is the AppImage's path, $2 the home folder. install_cli() { @@ -117,13 +118,15 @@ integrate() { return 0 fi - # An entry and icons that an AppImage before 0.8 installed under the old id would show a - # second menu entry; remove them (only an entry this script wrote: it points Exec at a path). - old="$apps/$OLD_DESK_ID.desktop" - if [ -f "$old" ] && grep -q "^Icon=$OLD_DESK_ID\$" "$old" && grep -q '^Exec="' "$old"; then - rm -f "$old" "$data"/icons/hicolor/*/apps/"$OLD_DESK_ID".png 2>/dev/null - command -v update-desktop-database >/dev/null 2>&1 && update-desktop-database "$apps" >/dev/null 2>&1 - fi + # An entry and icons that an earlier AppImage installed under an old id would show a second + # menu entry; remove them (only an entry this script wrote: it points Exec at a path). + for old_id in $OLD_DESK_IDS; do + old="$apps/$old_id.desktop" + if [ -f "$old" ] && grep -q "^Icon=$old_id\$" "$old" && grep -q '^Exec="' "$old"; then + rm -f "$old" "$data"/icons/hicolor/*/apps/"$old_id".png 2>/dev/null + command -v update-desktop-database >/dev/null 2>&1 && update-desktop-database "$apps" >/dev/null 2>&1 + fi + done # Icons: per-file compare so an unchanged install costs a handful of cmp calls. src_icons="$APPDIR/usr/share/icons/hicolor" diff --git a/packaging/linux/flatpak-bundle.sh b/packaging/linux/flatpak-bundle.sh index 95a5cbfd3..3444b2574 100755 --- a/packaging/linux/flatpak-bundle.sh +++ b/packaging/linux/flatpak-bundle.sh @@ -12,7 +12,7 @@ # installed per-user from Flathub. Unless --no-test, the bundle is installed per-user, the CLI # is checked, and the desktop creates/measures a box on headless X11 and Wayland. The desktop # check also needs python3, dbus-x11, xvfb, xauth and weston; no screenshots are produced. -# Manifest: packaging/linux/flatpak/ai.storyteller.solidcraft.bundle.yml. +# Manifest: packaging/linux/flatpak/io.tangencylabs.solidcraft.bundle.yml. # Adapted from PhotoCraft's (storytold/photocraft, Apache-2.0; see ATTRIBUTION.md). set -euo pipefail # shellcheck source=../env.sh diff --git a/packaging/linux/flatpak-smoke.py b/packaging/linux/flatpak-smoke.py index 303a37fec..2a6d81b1d 100644 --- a/packaging/linux/flatpak-smoke.py +++ b/packaging/linux/flatpak-smoke.py @@ -19,7 +19,7 @@ import tempfile import time import zlib -APP_ID = "ai.storyteller.solidcraft" +APP_ID = "io.tangencylabs.solidcraft" MAX_PIXELS = 16_000_000 MAX_PNG_BYTES = 70_000_000 SANDBOX_PROBE = r''' diff --git a/packaging/linux/flatpak/ai.storyteller.solidcraft.bundle.yml b/packaging/linux/flatpak/io.tangencylabs.solidcraft.bundle.yml similarity index 67% rename from packaging/linux/flatpak/ai.storyteller.solidcraft.bundle.yml rename to packaging/linux/flatpak/io.tangencylabs.solidcraft.bundle.yml index a3cf3709e..bc9f4cdbe 100644 --- a/packaging/linux/flatpak/ai.storyteller.solidcraft.bundle.yml +++ b/packaging/linux/flatpak/io.tangencylabs.solidcraft.bundle.yml @@ -7,10 +7,11 @@ # during the build, and the same binaries as the AppImage/deb/rpm. The binaries need glibc >= 2.35 # and load X11, Wayland, xkbcommon and Vulkan at runtime; the freedesktop runtime has all of # them, and the GPU driver comes from its org.freedesktop.Platform.GL extension. -# Releases before 0.8 used the id ai.storyteller.solvecraft. The Flatpak repository marks that -# id end-of-life with a rebase to this one, so `flatpak update` moves existing installs over -# (packaging/flatpak-site.sh, docs/compatibility.md). -id: ai.storyteller.solidcraft +# Earlier releases used the ids ai.storyteller.solidcraft (0.8 until the move to Tangency Labs) +# and ai.storyteller.solvecraft (before 0.8). The Flatpak repository marks both end-of-life with a +# rebase to this one, so `flatpak update` moves existing installs over (packaging/flatpak-site.sh, +# docs/compatibility.md). +id: io.tangencylabs.solidcraft runtime: org.freedesktop.Platform runtime-version: '26.08' sdk: org.freedesktop.Sdk @@ -27,12 +28,13 @@ finish-args: # files work anywhere without broad filesystem access. Documents is granted so files passed by # path (the command line, recent designs) work in the usual place. - --filesystem=xdg-documents - # Compatibility shim (docs/compatibility.md): settings and autosaves of releases before 0.8, - # kept under the old app id, read once on first launch when this app was installed next to - # the old one instead of replacing it through `flatpak update`. + # Compatibility shim (docs/compatibility.md): settings and autosaves of earlier releases, kept + # under the old app ids, read once on first launch when this app was installed next to the old + # one instead of replacing it through `flatpak update`. + - --filesystem=~/.var/app/ai.storyteller.solidcraft:ro - --filesystem=~/.var/app/ai.storyteller.solvecraft:ro # Deliberately not granted: network (the optional --control server listens on 127.0.0.1 in - # the sandbox; `flatpak override --user --share=network ai.storyteller.solidcraft` exposes it to + # the sandbox; `flatpak override --user --share=network io.tangencylabs.solidcraft` exposes it to # host agents) and home/host filesystem access. modules: - name: solidcraft @@ -42,10 +44,10 @@ modules: - install -Dm755 bin/solidcraft-cli /app/bin/solidcraft-cli # The old CLI name, forwarding to solidcraft-cli (compatibility shim, docs/compatibility.md). - install -Dm755 bin/solvecraft-cli /app/bin/solvecraft-cli - - install -Dm644 share/applications/ai.storyteller.solidcraft.desktop /app/share/applications/ai.storyteller.solidcraft.desktop - - install -Dm644 share/mime/packages/ai.storyteller.solidcraft.xml /app/share/mime/packages/ai.storyteller.solidcraft.xml + - install -Dm644 share/applications/io.tangencylabs.solidcraft.desktop /app/share/applications/io.tangencylabs.solidcraft.desktop + - install -Dm644 share/mime/packages/io.tangencylabs.solidcraft.xml /app/share/mime/packages/io.tangencylabs.solidcraft.xml # Already has the release's version and date substituted by package.sh. - - install -Dm644 share/metainfo/ai.storyteller.solidcraft.metainfo.xml /app/share/metainfo/ai.storyteller.solidcraft.metainfo.xml + - install -Dm644 share/metainfo/io.tangencylabs.solidcraft.metainfo.xml /app/share/metainfo/io.tangencylabs.solidcraft.metainfo.xml - mkdir -p /app/share/icons /app/share/doc && cp -R share/icons/hicolor /app/share/icons/ && cp -R share/doc/solidcraft /app/share/doc/ sources: - type: dir diff --git a/packaging/linux/snap/snapcraft.yaml b/packaging/linux/snap/snapcraft.yaml index 3f6f75edf..6e89042b7 100644 --- a/packaging/linux/snap/snapcraft.yaml +++ b/packaging/linux/snap/snapcraft.yaml @@ -28,7 +28,7 @@ contact: https://github.com/bherbruck/solidcraft/issues website: https://docs.solidcraft.io/ source-code: https://github.com/bherbruck/solidcraft issues: https://github.com/bherbruck/solidcraft/issues -icon: stage/share/icons/hicolor/512x512/apps/ai.storyteller.solidcraft.png +icon: stage/share/icons/hicolor/512x512/apps/io.tangencylabs.solidcraft.png base: core24 grade: stable confinement: strict @@ -41,10 +41,10 @@ platforms: apps: solidcraft: command: usr/bin/solidcraft - desktop: usr/share/applications/ai.storyteller.solidcraft.desktop - # Ties the snap to the AppStream id (ai.storyteller.solidcraft, the same in every package) so + desktop: usr/share/applications/io.tangencylabs.solidcraft.desktop + # Ties the snap to the AppStream id (io.tangencylabs.solidcraft, the same in every package) so # software centres treat it as the same app. - common-id: ai.storyteller.solidcraft + common-id: io.tangencylabs.solidcraft extensions: [gnome] plugs: - desktop @@ -77,5 +77,5 @@ parts: override-prime: | craftctl default # Point the menu entry at the packaged icon (the hicolor name isn't on the host's path). - sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/ai.storyteller.solidcraft.png|' \ - usr/share/applications/ai.storyteller.solidcraft.desktop + sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/io.tangencylabs.solidcraft.png|' \ + usr/share/applications/io.tangencylabs.solidcraft.desktop diff --git a/packaging/macos/package.sh b/packaging/macos/package.sh index 32f53bab2..96707d2e8 100755 --- a/packaging/macos/package.sh +++ b/packaging/macos/package.sh @@ -26,7 +26,7 @@ set -euo pipefail # shellcheck source=../env.sh . "$(dirname "${BASH_SOURCE[0]}")/../env.sh" # The same reverse-DNS id as the Linux APP_ID. -MACOS_BUNDLE_ID=ai.storyteller.solidcraft +MACOS_BUNDLE_ID=io.tangencylabs.solidcraft # sign_code [identifier] [entitlements]: Developer ID with the hardened runtime and a secure # timestamp, or the ad-hoc signature (Apple silicon refuses unsigned code) without an identity. @@ -171,7 +171,7 @@ printf 'APPL????' >"$APP/Contents/PkgInfo" # Signature over the whole bundle. Nested code is signed first: the bundle signature refuses an # unsigned helper in Contents/MacOS. The entitlements go on the bundle (they apply to the main # executable): the 3D mouse driver is loaded by the app, not by the CLI. -sign_code "$APP/Contents/MacOS/solidcraft-cli" "$MACOS_BUNDLE_ID-cli" +sign_code "$APP/Contents/MacOS/solidcraft-cli" "$MACOS_BUNDLE_ID.cli" sign_code "$APP" "" "$SCRIPT_DIR/entitlements.plist" codesign --verify --strict --deep --verbose=2 "$APP" if [ -n "$SIGN_IDENTITY" ]; then @@ -256,10 +256,10 @@ echo "==> building $CLI_ZIP" CLI_DIR="$WORK/solidcraft-cli-$VERSION-macos-$ARCH" mkdir -p "$CLI_DIR" cp "$WORK/bin/solidcraft-cli" "$CLI_DIR/" -sign_code "$CLI_DIR/solidcraft-cli" "$MACOS_BUNDLE_ID-cli" +sign_code "$CLI_DIR/solidcraft-cli" "$MACOS_BUNDLE_ID.cli" # Compatibility shim (docs/compatibility.md): the old CLI name forwards to solidcraft-cli. cp "$WORK/bin/solvecraft-cli" "$CLI_DIR/" -sign_code "$CLI_DIR/solvecraft-cli" "$MACOS_BUNDLE_ID-cli-alias" +sign_code "$CLI_DIR/solvecraft-cli" "$MACOS_BUNDLE_ID.cli-alias" copy_docs "$CLI_DIR" rm -f "$CLI_ZIP" ditto -c -k --keepParent "$CLI_DIR" "$CLI_ZIP" diff --git a/packaging/tests/apprun_test.py b/packaging/tests/apprun_test.py index a59a3e542..999936dc4 100644 --- a/packaging/tests/apprun_test.py +++ b/packaging/tests/apprun_test.py @@ -17,7 +17,7 @@ class AppRunCli(unittest.TestCase): (self.appdir / "usr/bin").mkdir(parents=True) (self.appdir / "usr/share/applications").mkdir(parents=True) shutil.copy(ROOT / "packaging/linux/AppRun", self.appdir / "AppRun") - (self.appdir / "usr/share/applications/ai.storyteller.solidcraft.desktop").write_text("[Desktop Entry]\nExec=solidcraft\n") + (self.appdir / "usr/share/applications/io.tangencylabs.solidcraft.desktop").write_text("[Desktop Entry]\nExec=solidcraft\n") for name in ("solidcraft", "solidcraft-cli"): p = self.appdir / "usr/bin" / name p.write_text(f"#!/bin/sh\necho {name} \"$@\"\n") @@ -61,6 +61,23 @@ class AppRunCli(unittest.TestCase): self.run_apprun() self.assertTrue(other.is_symlink()) + def test_entries_under_earlier_app_ids_are_replaced(self): + apps = self.home / ".local/share/applications" + apps.mkdir(parents=True) + icons = self.home / ".local/share/icons/hicolor/256x256/apps" + icons.mkdir(parents=True) + for old in ("ai.storyteller.solidcraft", "ai.storyteller.solvecraft"): + (apps / f"{old}.desktop").write_text(f'[Desktop Entry]\nExec="/old/SolidCraft.AppImage" %F\nIcon={old}\n') + (icons / f"{old}.png").write_text("png") + # An entry this script did not write (a package's, Exec on PATH) is left alone. + (apps / "ai.storyteller.other.desktop").write_text("[Desktop Entry]\nExec=other\nIcon=ai.storyteller.other\n") + self.run_apprun() + self.assertTrue((apps / "io.tangencylabs.solidcraft.desktop").is_file()) + for old in ("ai.storyteller.solidcraft", "ai.storyteller.solvecraft"): + self.assertFalse((apps / f"{old}.desktop").exists()) + self.assertFalse((icons / f"{old}.png").exists()) + self.assertTrue((apps / "ai.storyteller.other.desktop").is_file()) + def test_opt_out_installs_nothing(self): self.run_apprun(SOLIDCRAFT_NO_DESKTOP_INTEGRATION="1") self.assertFalse(self.wrapper.exists()) diff --git a/xtask/src/app_icons.rs b/xtask/src/app_icons.rs index 3183419aa..bd9eafa12 100644 --- a/xtask/src/app_icons.rs +++ b/xtask/src/app_icons.rs @@ -13,7 +13,7 @@ pub fn run(root: &Path) -> Result<(), String> { for size in [16, 24, 32, 48, 64, 128, 256, 512] { let png = stage.join(format!("{size}.png")); draw(&png, size)?; - exports.push((png, format!("linux/exports/hicolor/{size}x{size}/apps/ai.storyteller.solidcraft.png"))); + exports.push((png, format!("linux/exports/hicolor/{size}x{size}/apps/io.tangencylabs.solidcraft.png"))); } let installer = stage.join("solidcraft.ico"); draw(&installer, 256)?; From ca75f86947d2dc241ba5c19566cddaa5e207e7f9 Mon Sep 17 00:00:00 2001 From: semmelrinde <124386289+semmelrinde@users.noreply.github.com> Date: Tue, 27 Oct 2026 20:53:34 +0000 Subject: [PATCH 097/102] Sketch: deleting a dimension in a rolled-back history no longer rebuilds the features after the marker (#7253) (#7425) * claim: #7253 * Sketch: deleting a dimension in a rolled-back history no longer rebuilds the features after the marker (#7253) The check before a delete evaluated the whole history twice when the timeline was rolled back. Removing a sketch constraint changes the later features' cache keys, so on a long history Delete on a dimension took minutes. When the design differs only in sketch constraints (and model parameters nothing uses any more) and each changed sketch solves to the same geometry, profiles and ends, the features after the marker see the same inputs: compare the live models only. Anything else still gets the full check, so the report is unchanged. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: Claude Opus 5.5 --- crates/doc/src/eval.rs | 9 ++++++ crates/engine/src/cmd/delete.rs | 37 +++++++++++++++++++++++++ crates/engine/src/cmd/edit.rs | 49 +++++++++++++++++++++++++++++++-- 3 files changed, 93 insertions(+), 2 deletions(-) diff --git a/crates/doc/src/eval.rs b/crates/doc/src/eval.rs index 85d7aa1c2..85b1448ae 100644 --- a/crates/doc/src/eval.rs +++ b/crates/doc/src/eval.rs @@ -1055,6 +1055,15 @@ impl EvalCache { EvalCache { budget: bytes, ..EvalCache::default() } } + /// Results stored. + pub fn len(&self) -> usize { + self.map.len() + } + + pub fn is_empty(&self) -> bool { + self.map.is_empty() + } + fn get(&mut self, key: u64) -> Option { let r = self.map.get(&key).cloned(); if r.is_some() { diff --git a/crates/engine/src/cmd/delete.rs b/crates/engine/src/cmd/delete.rs index ffa949f39..d7479ae80 100644 --- a/crates/engine/src/cmd/delete.rs +++ b/crates/engine/src/cmd/delete.rs @@ -274,6 +274,43 @@ mod tests { assert_eq!(done["would_fail"], json!(["Hole"]), "{done}"); } + /// Deleting a dimension of a sketch with a rolled-back history after it (#7253): the sketch + /// keeps its geometry, so the check before the delete does not build the features after the + /// marker again (that took minutes on a long history). A deleted line still breaks them, and + /// the check still says so. + #[test] + fn deleting_a_dimension_in_a_rolled_back_history_builds_nothing_after_the_marker() { + let mut s = Session::default(); + let sk = run(&mut s, "sketch.create", json!({"plane": "XY"}))["sketch"].as_u64().unwrap(); + run(&mut s, "sketch.line", json!({"points": [[0, 0], [40, 0], [30, 20], [10, 20]], "closed": true})); + let lines: Vec = s.model.state().sketch(sk).unwrap().sketch.curves.iter().map(|c| c.id.clone()).collect(); + let param = run(&mut s, "sketch.dimension", json!({"entities": [lines[0], lines[1]], "type": "angle"}))["param"].as_str().map(str::to_string); + let angle = s.model.state().sketch(sk).unwrap().sketch.constraints.iter().find(|c| param.is_some() && c.param == param).unwrap().id.clone(); + run(&mut s, "sketch.finish", json!({})); + run(&mut s, "solid.extrude", json!({"distance": 5, "name": "Plate"})); + let later = 6; + for i in 0..later { + run(&mut s, "solid.cylinder", json!({"base": [12 + 3 * i, 8, -1], "radius": 1, "height": 10, "operation": "cut"})); + } + run(&mut s, "timeline.roll_to", json!({"position": 1})); + run(&mut s, "sketch.edit", json!({"sketch": sk})); + let cached = |s: &Session| s.model.cache.lock().map(|c| c.len()).unwrap_or(0); + let before = cached(&s); + let doc = s.doc.clone(); + let items = json!([{"type": "sketch_constraint", "id": angle}]); + let dry = run(&mut s, "selection.delete", json!({"items": items, "dry_run": true})); + assert_eq!((&dry["deleted"], &dry["would_fail"]), (&json!([]), &json!([])), "{dry}"); + assert_eq!(*s.doc, *doc, "the check changes nothing"); + // The sketch itself is solved again; Plate and the cuts are not built. + let built = cached(&s).saturating_sub(before); + assert!(built < later, "{built} results built for the check"); + let line = json!([{"type": "sketch_curve", "id": lines[1]}]); + let dry = run(&mut s, "selection.delete", json!({"items": line, "dry_run": true})); + assert!(dry["would_fail"].as_array().unwrap().contains(&json!("Plate")), "{dry}"); + run(&mut s, "selection.delete", json!({"items": items})); + assert!(s.model.state().sketch(sk).unwrap().sketch.constraints.iter().all(|c| c.id != angle)); + } + #[test] fn mixed_selection_is_one_undo_step() { let (mut s, _) = part(); diff --git a/crates/engine/src/cmd/edit.rs b/crates/engine/src/cmd/edit.rs index 518e6944f..89772ca25 100644 --- a/crates/engine/src/cmd/edit.rs +++ b/crates/engine/src/cmd/edit.rs @@ -1222,14 +1222,15 @@ fn newly_broken(before: &solidcraft_doc::Model, after: &solidcraft_doc::Model) - /// (the model of `after_doc`). With the history rolled back, the features after the marker are /// evaluated too, on copies of the models (which share their cache): a delete made in the /// rolled-back history that breaks them says so before it is made, rather than leaving error marks -/// that only show at the end of the timeline (#3471). +/// that only show at the end of the timeline (#3471). A change that leaves them the same inputs +/// needs no such evaluation ([`only_constraints_changed`]). pub(super) fn newly_broken_in_history( before_doc: &solidcraft_doc::Document, before: &solidcraft_doc::Model, after_doc: &solidcraft_doc::Document, after: &solidcraft_doc::Model, ) -> Vec<(String, String)> { - if before_doc.marker.is_none() && after_doc.marker.is_none() { + if (before_doc.marker.is_none() && after_doc.marker.is_none()) || only_constraints_changed(before_doc, before, after_doc, after) { return newly_broken(before, after); } let whole = |doc: &solidcraft_doc::Document, model: &solidcraft_doc::Model| { @@ -1242,6 +1243,50 @@ pub(super) fn newly_broken_in_history( newly_broken(&whole(before_doc, before), &whole(after_doc, after)) } +/// Whether `after_doc` differs from `before_doc` only in sketch constraints and dimensions (and +/// model parameters nothing uses any more), every sketch whose constraints changed solving to +/// the same geometry, profiles and ends as before. The features after the marker are then built +/// from the same inputs, so evaluating the whole history twice would find nothing new (#7253): +/// deleting one dimension of a sketch with a long rolled-back history after it took minutes. +fn only_constraints_changed( + before_doc: &solidcraft_doc::Document, + before: &solidcraft_doc::Model, + after_doc: &solidcraft_doc::Document, + after: &solidcraft_doc::Model, +) -> bool { + let without_constraints = |doc: &solidcraft_doc::Document| { + let mut doc = doc.clone(); + for f in &mut doc.features { + if let FeatureKind::Sketch { sketch, .. } = &mut f.kind { + sketch.constraints.clear(); + } + } + doc + }; + let (mut b, a) = (without_constraints(before_doc), without_constraints(after_doc)); + if b.params.iter().any(|p| !a.params.contains(p) && (!p.model || !after_doc.param_users(&p.name).is_empty())) { + return false; + } + b.params.retain(|p| a.params.contains(p)); + if b != a { + return false; + } + // What a later feature reads of a sketch: the solved geometry, its plane, profiles and ends. + let solved = |model: &solidcraft_doc::Model, id: u64| { + let r = model.result(id).filter(|r| !r.skipped && r.error.is_none())?; + let s = r.state.sketch(id)?; + let mut sketch = s.sketch.clone(); + sketch.constraints.clear(); + Some((s.plane, sketch, serde_json::to_value(&s.profiles).ok()?, s.ends.clone(), s.report.ok())) + }; + before_doc.features.iter().zip(&after_doc.features).all(|(fb, fa)| match (&fb.kind, &fa.kind) { + (FeatureKind::Sketch { sketch: sb, .. }, FeatureKind::Sketch { sketch: sa, .. }) if sb.constraints != sa.constraints => { + solved(before, fb.id).is_some_and(|x| solved(after, fa.id).is_some_and(|y| x == y)) + } + _ => true, + }) +} + fn reorder(s: &mut Session, p: &Value) -> Result { let cmd = "timeline.reorder"; let id = feature_id(s, p.get("feature"), cmd)?; From 42ec27cfe4f4dd7cf07c164d3ab990400fa347cd Mon Sep 17 00:00:00 2001 From: sascha2101 Date: Tue, 27 Oct 2026 20:59:38 +0000 Subject: [PATCH 098/102] Browser with History under it: drag the split between the two cards (#7371) (#7803) * claim: #7371 * Browser with History under it: drag the split between the two cards (#7371) Under the browser, History took exactly half the column. The seam between the two expanded cards is now a grip with the vertical resize cursor; dragging it moves the split, as the column's right edge moves its width. The split is kept as the browser's share of the column in a new preference, browser_share, whose default is the equal split, so nothing changes until someone drags. Either card keeps at least its header and two rows. Folding either card works as before and gives the other the rest; while one is folded or folding there is no grip. A non-finite share falls back to one half. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FN5eEMrqWWXqi65FcK8GXq * Prefs: keep the browser share with the History-under-browser settings Moves the entry so it no longer sits next to the render and dialog preferences that main added after browser_width. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: sascha2101 <221609842+sascha2101@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- crates/ui-egui/src/prefs.rs | 7 ++ crates/ui-egui/src/timeline_left.rs | 104 ++++++++++++++++++++++++++-- docs/book/src/guide/ui-tour.md | 2 + docs/control-protocol.md | 2 +- 4 files changed, 110 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/prefs.rs b/crates/ui-egui/src/prefs.rs index 887fdd1c6..130b9e541 100644 --- a/crates/ui-egui/src/prefs.rs +++ b/crates/ui-egui/src/prefs.rs @@ -445,6 +445,10 @@ impl SpaceMouseDriver { /// itself clamps what the user drags to its own range. pub const DEFAULT_BROWSER_WIDTH: f32 = 250.0; +/// The browser's first share of the column it shares with History under it (#7371): the equal +/// split; the column clamps what the user drags so both cards keep their header and two rows. +pub const DEFAULT_BROWSER_SHARE: f32 = 0.5; + // The stored fields, their defaults, page resets and simple form controls share this table. // Omitted pages keep fields such as grid_follows_view and added agents when restoring defaults. // Accepted control-channel ranges may differ from slider ranges (look_at_speed). @@ -656,6 +660,9 @@ preference_settings! { timeline_under_browser: bool = false, PAGE_INTERFACE; /// Fold the shared-column history to its header. timeline_collapsed: bool = false, PAGE_INTERFACE; + /// The browser's share of the column's height when History sits under it, which the user + /// drags at the seam between the two cards (#7371). + browser_share: f32 = DEFAULT_BROWSER_SHARE, PAGE_INTERFACE; /// Whether the browser beside the vertical history is collapsed to its rail. timeline_left_browser_collapsed: bool = false, PAGE_INTERFACE; /// Whether the History at the left lists a sketch under the feature built from it. diff --git a/crates/ui-egui/src/timeline_left.rs b/crates/ui-egui/src/timeline_left.rs index 59a0b1eba..13c741b23 100644 --- a/crates/ui-egui/src/timeline_left.rs +++ b/crates/ui-egui/src/timeline_left.rs @@ -121,9 +121,9 @@ pub(crate) fn animate_folds(app: &mut SolveApp, ctx: &egui::Context) { } } -/// Shared bounds keep browser and history at exactly the same width. Their split is half -/// the available height. One folded header gives the other the remainder; two folded -/// headers sit together at the top. +/// Shared bounds keep browser and history at exactly the same width. Their split is the +/// remembered share of the available height (half until the seam is dragged, #7371). One folded +/// header gives the other the remainder; two folded headers sit together at the top. pub(crate) fn stacked_rects(app: &SolveApp, available: Rect) -> (Rect, Rect) { let progress = app .shell @@ -148,7 +148,7 @@ fn column_rects_at(app: &SolveApp, available: Rect, browser_fold: f32, history_f } let budget = (column.height() - gap).max(0.0); let header = header_outer_height().min(budget / 2.0); - let expanded_browser = egui::lerp(budget / 2.0..=(budget - header).max(0.0), history_fold); + let expanded_browser = egui::lerp(browser_split(app.preferences.browser_share, budget, header)..=(budget - header).max(0.0), history_fold); let browser_height = egui::lerp(expanded_browser..=header, browser_fold); let browser = Rect::from_min_size(column.min, vec2(column.width(), browser_height)); let history_top = (browser.bottom() + gap).min(column.bottom()); @@ -157,6 +157,50 @@ fn column_rects_at(app: &SolveApp, available: Rect, browser_fold: f32, history_f (browser, history) } +/// The expanded browser's height in a column of `budget` (both cards, without the gap): the +/// remembered share, kept to at least a header and two rows for either card. +pub(crate) fn browser_split(share: f32, budget: f32, header: f32) -> f32 { + let share = if share.is_finite() { share } else { crate::prefs::DEFAULT_BROWSER_SHARE }; + let least = (header + 2.0 * crate::ui_kit::TREE_ROW_HEIGHT).min(budget / 2.0).max(0.0); + (budget * share).clamp(least, (budget - least).max(least)) +} + +/// How tall a grip the seam between the stacked browser and History offers, around the gap. +const SPLIT_RAIL: f32 = 6.0; + +/// Dragging the seam between the expanded browser and History moves their split (#7371), as the +/// column's right edge moves its width. +fn split_handle(app: &mut SolveApp, ui: &egui::Ui, available: Rect) { + if !app.ui.show_browser + || app.preferences.timeline_left_browser_collapsed + || app.preferences.timeline_collapsed + || app.shell.history_folding.is_some_and(|p| p != [0.0, 0.0]) + { + return; + } + let (browser, history) = stacked_rects(app, available); + let budget = history.bottom() - browser.top() - (history.top() - browser.bottom()); + if !browser.is_positive() || !history.is_positive() || budget <= 0.0 { + return; + } + let rail = Rect::from_x_y_ranges(browser.x_range(), browser.bottom() - SPLIT_RAIL / 2.0..=history.top() + SPLIT_RAIL / 2.0); + Container::new(ui.ctx(), Surface::Canvas).area(egui::Id::new("sc_column_split")).order(egui::Order::Foreground).fixed_pos(rail.min).show( + ui.ctx(), + |ui| { + ui.set_min_size(rail.size()); + let response = ui.interact(rail, egui::Id::new("sc_column_split_rail"), Sense::drag()).on_hover_cursor(egui::CursorIcon::ResizeVertical); + if response.dragged() { + let delta = ui.input(|input| input.pointer.delta().y); + if delta.is_finite() { + let header = header_outer_height().min(budget / 2.0); + app.preferences.browser_share = browser_split((browser.height() + delta) / budget, budget, header) / budget; + } + } + }, + ); + crate::scenario::publish_handle("left-column-split", rail.center()); +} + pub(crate) fn floating_rect(app: &SolveApp, available: Rect) -> Rect { if stacked(app) { return stacked_rects(app, available).1; @@ -211,6 +255,7 @@ pub fn left_panel(app: &mut SolveApp, ui: &mut egui::Ui) { if stacked(app) { let width = crate::browser::browser_width(app.preferences.browser_width); crate::browser::resize_column(app, ui, response.response.rect, width, "left-history-rail"); + split_handle(app, ui, available); } }); app.shell.history = Some(card.response.rect); @@ -1882,6 +1927,57 @@ mod tests { assert!(narrower < wider - 20.0, "dragging it left should narrow it again: {wider} -> {narrower}"); } + #[test] + fn the_seam_between_browser_and_history_drags_their_split_and_is_remembered() { + // #7371: under the browser, History took exactly half the column; the seam now moves it. + for mode in [crate::shell::LayoutMode::Floating, crate::shell::LayoutMode::Docked] { + let mut h = Harness::new(); + h.app.home.open = false; + h.app.ui.layout = mode; + h.call("ui.resize", json!({"width":1400,"height":900})); + h.app.run("view.history_layout", json!({"dock":"under_browser"})).unwrap(); + h.app.run("solid.box", json!({"length":10,"width":10,"height":10})).unwrap(); + h.settle(); + let (browser, history) = (h.app.shell.browser.unwrap(), h.app.shell.history.unwrap()); + assert!((browser.height() - history.height()).abs() < 1.0, "{mode:?}: an equal split by default: {browser:?} {history:?}"); + let seam = handle_at("left-column-split").expect("the seam between the cards is a grip"); + h.step(&json!({"drag": [[seam.x, seam.y], [seam.x, seam.y + 120.0]]})).unwrap(); + h.settle(); + let (taller, shorter) = (h.app.shell.browser.unwrap(), h.app.shell.history.unwrap()); + assert!((taller.height() - browser.height() - 120.0).abs() < 2.0, "{mode:?}: {browser:?} -> {taller:?}"); + assert!((history.height() - shorter.height() - 120.0).abs() < 2.0, "{mode:?}: {history:?} -> {shorter:?}"); + assert!((shorter.bottom() - history.bottom()).abs() < 1.0 && (taller.top() - browser.top()).abs() < 1.0); + let share = h.app.preferences.browser_share; + assert!(share > 0.6 && share < 0.7, "{mode:?}: {share}"); + let mut restored = SolveApp::new(Default::default(), Default::default()); + restored.load_prefs(&h.app.prefs()); + assert_eq!(restored.preferences.browser_share, share); + // Either card keeps its header and two rows however far the seam goes. + let least = header_outer_height() + 2.0 * crate::ui_kit::TREE_ROW_HEIGHT - 1.0; + for dy in [2000.0, -2000.0] { + let seam = handle_at("left-column-split").unwrap(); + h.step(&json!({"drag": [[seam.x, seam.y], [seam.x, seam.y + dy]]})).unwrap(); + h.settle(); + let (browser, history) = (h.app.shell.browser.unwrap(), h.app.shell.history.unwrap()); + assert!(browser.height() >= least && history.height() >= least, "{mode:?}, {dy}: {browser:?} {history:?}"); + } + // Folding History still gives the browser the rest, and unfolding brings the split back. + let split = h.app.shell.browser.unwrap().height(); + h.app.preferences.timeline_collapsed = true; + h.frames(12); + assert!(h.app.shell.history.unwrap().height() <= header_outer_height() + 1.0); + assert!(handle_at("left-column-split").is_none(), "no grip while a card is folded"); + h.app.preferences.timeline_collapsed = false; + h.frames(12); + assert!((h.app.shell.browser.unwrap().height() - split).abs() < 1.0); + } + // A hostile preference falls back to the equal split; a tiny column still fits both headers. + assert_eq!(browser_split(f32::NAN, 600.0, 40.0), 300.0); + assert_eq!(browser_split(f32::INFINITY, 600.0, 40.0), 300.0); + assert_eq!(browser_split(-3.0, 600.0, 40.0), 40.0 + 2.0 * crate::ui_kit::TREE_ROW_HEIGHT); + assert_eq!(browser_split(0.9, 60.0, 30.0), 30.0); + } + #[test] fn history_follows_the_browsers_translucency_only_under_the_browser() { let opaque = Tokens::get().panel; diff --git a/docs/book/src/guide/ui-tour.md b/docs/book/src/guide/ui-tour.md index 9f4f60a7c..26088578d 100644 --- a/docs/book/src/guide/ui-tour.md +++ b/docs/book/src/guide/ui-tour.md @@ -94,6 +94,8 @@ back, and drag features to reorder them. Preferences can put the timeline vertically at the far left of the viewport, beside the browser. Its seam handle switches between icon chips and compact feature names; the browser can collapse to a rail beside either width. + Docked under the browser, the two share the column: drag the seam between them to give either + more height, and the split is remembered. Previous, Play and Next sit at the top. Double-click Previous to roll to the start. Interface › **Sketches** › **Under their feature** lists a sketch in the vertical timeline one level in, under the first feature built from it, behind that feature's fold arrow. Dragging the diff --git a/docs/control-protocol.md b/docs/control-protocol.md index 82e7e2a13..aebcfbc15 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -310,7 +310,7 @@ labels; `prefs:measure_axis_distances` identifies the checkbox. | `engine.execute` → `view.layout` | `mode`: `floating` or `compact` | Apply and save the workspace layout without opening a dialog, changing the design, resetting the camera or cancelling its active tool. General preferences expose the same choice; `ui.prefs {"layout":"compact"}` also saves it. | | `engine.execute` → `browser.expand_all` | `path?`: occurrence ids; `component?`: id; omit both for the whole tree | Open every Browser row under that scope, including folders that start closed (Origin, Named Views, Features). Display only: not saved in the design, not an undo step. | | `engine.execute` → `browser.collapse_all` | same | Close those rows. The design row stays open when the whole tree is collapsed. | -| `engine.execute` → `view.history_layout` | `width?`, `dock?`: `bottom`, `left`, `under_browser`, `collapsed?` | Resize/dock the history without opening a dialog or changing the design. Contents respond to measured width; browser-stacked history shares its width and splits height equally. One folded header gives the expanded card the rest; two folded headers stay at the top. | +| `engine.execute` → `view.history_layout` | `width?`, `dock?`: `bottom`, `left`, `under_browser`, `collapsed?` | Resize/dock the history without opening a dialog or changing the design. Contents respond to measured width; browser-stacked history shares its width and splits the height at the remembered share (`browser_share`, half until the seam between the two cards is dragged). One folded header gives the expanded card the rest; two folded headers stay at the top. | | `ui.agent_chat` | `features?`, `toolbar_button?`, `connect_at_start?` and `open_at_start?` (connect the agent started last, and open the panel, when SolidCraft starts; both off by default, never with `--control`), `permissions?` (`ask`, `edits`, `all`), `add_agent?` ({`name`, `kind`: `acp`, `api` or `anthropic` (`api` is OpenAI-compatible, `anthropic` Anthropic-compatible), `command` or `base_url` + `model` + `request_timeout_s?` (seconds one model request may take, 300 by default, rounded and clamped to 30 to 3600)}; no keys), `add_dialog?` (`installed`, `custom`, `api`, `anthropic`, or `false` to close), `default_agent?`, `agent?` (the conversation's agent, by id), `mode?` (the agent's own mode), `provider?` (which provider's models the model picker lists, when they come from several), `model?` (one of its models), `open?`, `side?` (`left`, `right`), `minimized?`, `popped?` (in its own window), `width?`, `picker?`, `refresh?`, `connect?`, `stop?`, `attach?`: a file's path (a picture, a text file or a CAD file, for the next message; CAD files are imported at once), `remove_file?` (index of a file on the next message), `send?`: text (files alone make a message too), `attach_view?`, `attach_selection?`, `pick?` (true: open the context picker), `permission?`: an option id or `"cancel"` (the newest question of the agent's own), `approve?`: true, false or `"always"` (the oldest request held for Allow/Deny), `cancel?` (Stop: the queue stays), `send_now?` (stop the running step, then send the queued messages), `remove_pending?` (index), `new_chat?` (clear the chat, new session), `undo?` (the last message's changes) | the chat's state: `features`, `agents` (found and added), `currentAgent`, `state` (off, starting, ready, busy, auth, exited, failed: the agent never got ready, and Connect reads Retry), `connectAtStart`, `openAtStart`, `lastAgent` (the agent started last), `popped`, `window` (its place and size), `agent`, `modes`, `mode`, `models`, `model`, `modelWarning` (the model capability warning text, or `null` when unknown or tool support is reported; checked asynchronously and never blocks sending), `turnWarning` (the latest completed turn's no-tool notice, otherwise `null`; cleared on the next turn or new chat), `providers` (`name` and `count` of each, empty with one provider), `provider` (the one listed), `authMethods`, `toolsPort`, `pid`, `waiting`, `turn`, `pending` (queued messages, with their `files`), `attachments` (the files on the next message, by name), `loading` (pictures still being read for it, by name), `stopped`, `detection` and the conversation (`items`). With `features` off only the settings apply. Desktop only; see [Agent chat](agent-chat.md) | | `ui.resize` | `width`, `height` | | | `app.quit` | `force?` (quit without asking about unsaved designs) | `quitting` (the window closes), `asking` (a "save changes?" prompt is open) | From 83ac98ac76a6fb81e69a9e330a448653b0d73445 Mon Sep 17 00:00:00 2001 From: Lars Jansen Date: Tue, 27 Oct 2026 21:06:14 +0000 Subject: [PATCH 099/102] Origin plane names: Top / Front / Right (#6491) (#6496) * claim: #6491 * feat(ui): origin plane names Top / Front / Right (#6491) --- .../locales/pending/origin-plane-names.json | 34 +++++ crates/ui-egui/src/browser.rs | 18 ++- crates/ui-egui/src/dialogs.rs | 18 +-- crates/ui-egui/src/dialogs_dense.rs | 4 +- crates/ui-egui/src/hole_refs.rs | 4 +- crates/ui-egui/src/prefs.rs | 116 ++++++++++++++++++ crates/ui-egui/src/prefs/interface.rs | 28 +++++ crates/ui-egui/src/round_pick_tests.rs | 4 +- crates/ui-egui/src/select_other.rs | 5 +- crates/ui-egui/src/select_other_tests.rs | 19 +++ crates/ui-egui/src/sketch_attachment_ui.rs | 8 +- docs/book/src/guide/sketching.md | 2 + docs/control-protocol.md | 2 +- 13 files changed, 240 insertions(+), 22 deletions(-) create mode 100644 assets/locales/pending/origin-plane-names.json diff --git a/assets/locales/pending/origin-plane-names.json b/assets/locales/pending/origin-plane-names.json new file mode 100644 index 000000000..bca13c9e3 --- /dev/null +++ b/assets/locales/pending/origin-plane-names.json @@ -0,0 +1,34 @@ +{ + "en": { + "prefs.origin_plane_names": "Origin plane names", + "prefs.origin_plane_names_note": "Names shown in the browser, dialogs and lists. {top} is XY, {front} is XZ and {right} is YZ, with Z up. Commands, scripts and saved designs keep XY, XZ and YZ." + }, + "ja": { + "prefs.origin_plane_names": "原点平面の名前", + "prefs.origin_plane_names_note": "ブラウザー、ダイアログ、一覧に表示される名前です。{top} は XY、{front} は XZ、{right} は YZ です (Z が上)。コマンド、スクリプト、保存されたデザインでは XY、XZ、YZ のままです。" + }, + "zh": { + "prefs.origin_plane_names": "原点平面名称", + "prefs.origin_plane_names_note": "浏览器、对话框和列表中显示的名称。{top} 即 XY,{front} 即 XZ,{right} 即 YZ(Z 轴朝上)。命令、脚本和已保存的设计仍使用 XY、XZ 和 YZ。" + }, + "ar": { + "prefs.origin_plane_names": "أسماء مستويات الأصل", + "prefs.origin_plane_names_note": "الأسماء المعروضة في المستعرض والحوارات والقوائم. {top} هو XY و{front} هو XZ و{right} هو YZ، والمحور Z للأعلى. تحتفظ الأوامر والسكربتات والتصاميم المحفوظة بـ XY وXZ وYZ." + }, + "he": { + "prefs.origin_plane_names": "שמות מישורי הראשית", + "prefs.origin_plane_names_note": "השמות המוצגים בדפדפן, בתיבות הדו־שיח וברשימות. {top} הוא XY, {front} הוא XZ ו־{right} הוא YZ, כש־Z למעלה. פקודות, סקריפטים ותכנונים שמורים שומרים על XY, XZ ו־YZ." + }, + "de": { + "prefs.origin_plane_names": "Namen der Ursprungsebenen", + "prefs.origin_plane_names_note": "Namen in Browser, Dialogen und Listen. {top} ist XY, {front} ist XZ und {right} ist YZ, mit Z nach oben. Befehle, Skripte und gespeicherte Konstruktionen behalten XY, XZ und YZ." + }, + "ko": { + "prefs.origin_plane_names": "원점 평면 이름", + "prefs.origin_plane_names_note": "브라우저, 대화 상자, 목록에 표시되는 이름입니다. {top}은 XY, {front}는 XZ, {right}는 YZ이며 Z가 위쪽입니다. 명령, 스크립트, 저장된 디자인은 XY, XZ, YZ를 유지합니다." + }, + "vi": { + "prefs.origin_plane_names": "Tên các mặt phẳng gốc", + "prefs.origin_plane_names_note": "Tên hiển thị trong trình duyệt, hộp thoại và danh sách. {top} là XY, {front} là XZ và {right} là YZ, với Z hướng lên. Lệnh, script và thiết kế đã lưu vẫn dùng XY, XZ và YZ." + } +} diff --git a/crates/ui-egui/src/browser.rs b/crates/ui-egui/src/browser.rs index a8720eb4a..e801f8243 100644 --- a/crates/ui-egui/src/browser.rs +++ b/crates/ui-egui/src/browser.rs @@ -1700,7 +1700,8 @@ fn origin_rows(app: &mut SolveApp, ui: &mut egui::Ui, depth: usize, acts: &Actio return; } for (k, icon, thing) in items { - let label = k; + // An origin plane by the name the preferences give it; its key stays the id. + let label = app.preferences.origin_plane_names.label(k); let visible = !app.session.visibility.hidden_origin.iter().any(|h| h == k); let sel = match icon { "plane" => Some(Sel::Plane { name: k.into() }), @@ -1711,8 +1712,19 @@ fn origin_rows(app: &mut SolveApp, ui: &mut egui::Ui, depth: usize, acts: &Actio let r = draw_row( ui, ui.id().with(("o", k)), - // Faded when hidden itself or with the whole Origin. - &Row { depth: depth + 1, eye: Some(visible), icon, label, selected, dim: !visible || !app.origin_shown(), mark, ..Default::default() }, + // Faded when hidden itself or with the whole Origin. A renamed plane's label is already + // in the interface's language (`name`). + &Row { + depth: depth + 1, + eye: Some(visible), + icon, + label, + name: label != k, + selected, + dim: !visible || !app.origin_shown(), + mark, + ..Default::default() + }, ); if r.eye { // Through the command, so the Origin row's eye is an undo step (#2219). diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index dc01b723c..6ab9fb73c 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -2307,13 +2307,15 @@ fn placement_row(d: &mut Dialog, ui: &mut egui::Ui, session: &Session) { } /// A picked item as its chip shows it. A round edge or face says what it stands for in `inp`: -/// its axis in an axis input, a circle's centre in a point input. -pub(crate) fn selection_label(s: &Session, d: &Dialog, inp: &SelInput, item: &Sel) -> String { +/// its axis in an axis input, a circle's centre in a point input. An origin plane goes by +/// the name the preferences give it. +pub(crate) fn selection_label(s: &Session, names: crate::prefs::OriginPlaneNames, d: &Dialog, inp: &SelInput, item: &Sel) -> String { let axis = inp.accept == selection::AXIS_PICKS && round_axis(s, item).is_some(); match item { Sel::SketchCurve { id, .. } => id.clone(), Sel::SketchPoint { id } => crate::sketch_modify_ui::point_id(s, item).unwrap_or(id).to_string(), - Sel::Plane { name } | Sel::Axis { name } | Sel::ConstructionPoint { name } | Sel::Body { name } => name.clone(), + Sel::Plane { name } => names.label(name).to_string(), + Sel::Axis { name } | Sel::ConstructionPoint { name } | Sel::Body { name } => name.clone(), Sel::Face { body, index, .. } if axis => format!("{body} · face {index} axis"), Sel::Face { body, index, .. } => format!("{body} · face {index}"), Sel::Edge { body, .. } if axis => format!("{body} · circle axis"), @@ -2336,8 +2338,8 @@ pub(crate) fn selection_label(s: &Session, d: &Dialog, inp: &SelInput, item: &Se /// Selection input rows: label, "N selected" (or a hint) and a clear button; clicking a row /// makes it the active input. -fn input_rows(d: &mut Dialog, ui: &mut egui::Ui, s: &Session) { - input_rows_range(d, ui, s, 0..d.inputs.len()); +fn input_rows(d: &mut Dialog, ui: &mut egui::Ui, s: &Session, names: crate::prefs::OriginPlaneNames) { + input_rows_range(d, ui, s, names, 0..d.inputs.len()); } /// Saved vectors/axes are real inputs even when they have no origin-axis selection chip. @@ -2360,7 +2362,7 @@ fn stored_revolve_axis(kind: &Kind) -> Option<&Value> { } } -pub(crate) fn input_rows_range(d: &mut Dialog, ui: &mut egui::Ui, s: &Session, range: std::ops::Range) { +pub(crate) fn input_rows_range(d: &mut Dialog, ui: &mut egui::Ui, s: &Session, names: crate::prefs::OriginPlaneNames, range: std::ops::Range) { // Edit Text shows its Path input among its own rows. if matches!(d.kind, Kind::Text(_)) { return; @@ -2382,7 +2384,7 @@ pub(crate) fn input_rows_range(d: &mut Dialog, ui: &mut egui::Ui, s: &Session, r RichText::new(if custom_axis || stored_reference.is_some() { crate::i18n::tr("dialog.custom_axis").into() } else if !inp.multi { - inp.items.first().map(|item| selection_label(s, d, inp, item)).unwrap_or_default() + inp.items.first().map(|item| selection_label(s, names, d, inp, item)).unwrap_or_default() } else { let count = if i == 0 { shell_count.unwrap_or(inp.items.len()) } else { inp.items.len() }; crate::i18n::format("dialog.selected_count", &[("count", &count.to_string())]) @@ -2439,7 +2441,7 @@ pub(crate) fn input_rows_range(d: &mut Dialog, ui: &mut egui::Ui, s: &Session, r }); if matches!(d.kind, Kind::SketchModify(_)) && inp.multi { for (index, item) in inp.items.iter().enumerate() { - if crate::ui_kit::list_row(ui, &format!("{}:{index}", inp.label), &selection_label(s, d, inp, item)).clicked() { + if crate::ui_kit::list_row(ui, &format!("{}:{index}", inp.label), &selection_label(s, names, d, inp, item)).clicked() { remove = Some((i, index)); } } diff --git a/crates/ui-egui/src/dialogs_dense.rs b/crates/ui-egui/src/dialogs_dense.rs index 1c794e231..50eef02c4 100644 --- a/crates/ui-egui/src/dialogs_dense.rs +++ b/crates/ui-egui/src/dialogs_dense.rs @@ -186,9 +186,9 @@ pub(super) fn rows(app: &mut SolveApp, ctx: &egui::Context, d: &mut Dialog, ui: placement_row(d, ui, &app.session); if crate::hole_refs::takes(d) { // Each reference edge with its distance (#37, #6380). - enter |= crate::hole_refs::input_rows(d, ui, &app.session); + enter |= crate::hole_refs::input_rows(d, ui, &app.session, app.preferences.origin_plane_names); } else { - input_rows(d, ui, &app.session); + input_rows(d, ui, &app.session, app.preferences.origin_plane_names); } d.sync_material(&app.session); match &mut d.kind { diff --git a/crates/ui-egui/src/hole_refs.rs b/crates/ui-egui/src/hole_refs.rs index b2477da0b..768a2348a 100644 --- a/crates/ui-egui/src/hole_refs.rs +++ b/crates/ui-egui/src/hole_refs.rs @@ -238,10 +238,10 @@ pub(crate) fn sync(s: &Session, d: &mut Dialog) { /// The Single hole's (or the Cylinder's) selection rows, each reference edge with its distance on /// the row below it once it is picked. Whether Enter was pressed in a distance. -pub(crate) fn input_rows(d: &mut Dialog, ui: &mut egui::Ui, s: &Session) -> bool { +pub(crate) fn input_rows(d: &mut Dialog, ui: &mut egui::Ui, s: &Session, names: crate::prefs::OriginPlaneNames) -> bool { let mut enter = false; for i in 0..d.inputs.len() { - crate::dialogs::input_rows_range(d, ui, s, i..i + 1); + crate::dialogs::input_rows_range(d, ui, s, names, i..i + 1); let Some(k) = d.inputs.get(i).filter(|inp| !inp.items.is_empty()).and_then(|inp| REFERENCES.iter().position(|l| *l == inp.label)) else { continue; }; diff --git a/crates/ui-egui/src/prefs.rs b/crates/ui-egui/src/prefs.rs index 130b9e541..f5a922601 100644 --- a/crates/ui-egui/src/prefs.rs +++ b/crates/ui-egui/src/prefs.rs @@ -332,6 +332,35 @@ pub enum HistorySketches { UnderFeature, } +/// What the interface calls the origin planes (Preferences › Interface). Only the names shown +/// change: the planes' ids (`XY`, `XZ`, `YZ`), commands, scripts and saved designs keep theirs. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum OriginPlaneNames { + /// XY, XZ and YZ. Also what a naming this version doesn't know reads as (`lenient`). + #[default] + Xyz, + /// Top for XY, Front for XZ and Right for YZ (Z up), the engine's aliases for them. + TopFrontRight, +} + +impl OriginPlaneNames { + pub const ALL: [Self; 2] = [Self::Xyz, Self::TopFrontRight]; + /// The origin planes' ids, in the order the Preferences list them. + pub const PLANES: [&'static str; 3] = ["XY", "XZ", "YZ"]; + + /// The name shown for the plane `name`: an origin plane in this naming, in the interface's + /// language; any other plane (a construction plane) by its own name. + pub fn label(self, name: &str) -> &str { + match (self, name) { + (Self::TopFrontRight, "XY") => crate::i18n::tr("ui.top"), + (Self::TopFrontRight, "XZ") => crate::i18n::tr("ui.front"), + (Self::TopFrontRight, "YZ") => crate::i18n::tr("ui.right"), + _ => name, + } + } +} + /// What an orbit turns around (Preferences: "Orbit around"). #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] @@ -685,6 +714,8 @@ preference_settings! { /// Where command dialogs open: at the view's edge, or in the left column in place of the /// browser and the History there (#6707). dialog_place: crate::dialog_column::DialogPlace = Default::default(), PAGE_INTERFACE; + /// The names the browser, dialogs and lists show for the origin planes (#6491). + origin_plane_names: OriginPlaneNames = OriginPlaneNames::default(), PAGE_INTERFACE; /// The wheel zooms toward the point under the cursor (else toward the view's centre). zoom_to_cursor: bool = true, PAGE_NAVIGATION => check("Zoom to the cursor", "The wheel zooms toward the point under the cursor (off: toward the view's centre)"); /// Spread discrete wheel input across frames (off: apply each event immediately). @@ -4322,6 +4353,91 @@ mod tests { assert_eq!(h.app.session.doc.to_json(), design); } + /// The texts one frame paints. + fn painted_texts(h: &mut crate::scenario::Harness) -> Vec { + let output = h.ctx.run_ui(egui::RawInput { screen_rect: Some(h.ctx.content_rect()), focused: true, ..Default::default() }, |ui| { + h.app.logic(ui.ctx()); + h.app.ui(ui); + }); + output + .shapes + .iter() + .filter_map(|s| match &s.shape { + egui::Shape::Text(t) => Some(t.galley.job.text.clone()), + _ => None, + }) + .collect() + } + + /// Origin plane names (#6491): Top, Front and Right are names shown in the browser, the + /// dialogs' chips and the plane choices; the planes' ids, the commands and the design keep XY, + /// XZ and YZ. Saved, refused when unknown, and taken back by Cancel and Restore Defaults. + #[test] + fn origin_plane_names_change_only_the_names_shown() { + use OriginPlaneNames::{TopFrontRight, Xyz}; + let old: Prefs = serde_json::from_value(json!({"nav":"solidworks"})).unwrap(); + assert_eq!(old.origin_plane_names, Xyz, "older preferences keep XY, XZ and YZ"); + assert_eq!(lenient(&json!({"origin_plane_names":"hologram","zoom_reverse":true})).origin_plane_names, Xyz); + assert_eq!(OriginPlaneNames::PLANES.map(|p| Xyz.label(p)), ["XY", "XZ", "YZ"]); + assert_eq!(OriginPlaneNames::PLANES.map(|p| TopFrontRight.label(p)), ["Top", "Front", "Right"]); + assert_eq!(TopFrontRight.label("Plane1"), "Plane1", "construction planes keep their own names"); + + let mut h = crate::scenario::Harness::new(); + let sketch = h.app.run("sketch.create", json!({"plane":"XY"})).unwrap()["sketch"].as_u64().unwrap(); + h.app.run("sketch.rectangle.two_point", json!({"p0":[0,0],"p1":[20,10]})).unwrap(); + h.app.run("sketch.finish", json!({})).unwrap(); + h.frames(2); + h.step(&json!({"click":{"chevron":"Origin"}})).unwrap(); + let rows = || crate::browser::drawn_rows().into_iter().map(|(label, ..)| label).collect::>(); + assert!(OriginPlaneNames::PLANES.iter().all(|p| rows().iter().any(|r| r == p)), "{:?}", rows()); + let design = h.app.session.doc.to_json(); + h.call("ui.prefs", json!({"open":"Interface"})); + super::reveal_preference(&mut h, "prefs:origin_plane_names:top_front_right"); + h.step(&json!({"click":{"handle":"prefs:origin_plane_names:top_front_right"}})).unwrap(); + assert_eq!(h.app.preferences.origin_plane_names, TopFrontRight); + h.call("ui.prefs", json!({"button":"ok"})); + h.frames(2); + for (id, name) in [("XY", "Top"), ("XZ", "Front"), ("YZ", "Right")] { + assert!(rows().iter().any(|r| r == name) && !rows().iter().any(|r| r == id), "{:?}", rows()); + } + assert_eq!(h.app.session.doc.to_json(), design, "a name shown changes nothing in the design"); + + // Picked from its row, the plane is named in the dialog's chip and runs by its id. + h.call("ui.start", json!({"command":"construct.plane.offset"})); + h.step(&json!({"click":{"browser":"Front"}})).unwrap(); + let picked = h.app.dialog.as_ref().and_then(|d| d.inputs.first()).map(|i| i.items.clone()); + assert_eq!(picked, Some(vec![solidcraft_engine::Sel::Plane { name: "XZ".into() }])); + assert!(painted_texts(&mut h).iter().any(|t| t == "Front"), "the chip shows the plane's name"); + h.step(&json!({"widget":"OK"})).unwrap(); + h.frames(2); + let made = h.app.session.doc.features.last().map(|f| serde_json::to_value(&f.kind).unwrap_or_default()).unwrap_or_default(); + assert!(made.to_string().contains("\"XZ\""), "the command took the id: {made}"); + // The sketch plane choices of Redefine Sketch Plane: by name, and they run by id. + crate::browser::redefine_sketch(&mut h.app, sketch); + h.frames(2); + let texts = painted_texts(&mut h); + assert!(["Use Top plane", "Use Front plane", "Use Right plane"].iter().all(|t| texts.iter().any(|x| x == t)), "{texts:?}"); + assert!(!texts.iter().any(|t| t == "Use XY plane")); + crate::sketch_attachment_ui::clear(&mut h.app); + + let mut restored = SolveApp::new(solidcraft_engine::Session::default(), Default::default()); + restored.load_prefs(&h.app.prefs()); + assert_eq!(restored.preferences.origin_plane_names, TopFrontRight, "the choice is saved"); + let before = h.app.preferences.clone(); + assert!(control(&mut h.app, &json!({"origin_plane_names":"top", "nav":"solidworks"})).is_err()); + assert_eq!(h.app.preferences, before, "an unknown naming fails atomically"); + h.call("ui.prefs", json!({"open":"Interface","origin_plane_names":"xyz"})); + h.call("ui.prefs", json!({"button":"cancel"})); + assert_eq!(h.app.preferences.origin_plane_names, TopFrontRight, "Cancel takes it back"); + h.call("ui.prefs", json!({"open":"Interface"})); + h.call("ui.prefs", json!({"button":"defaults"})); + assert_eq!(h.app.preferences.origin_plane_names, Xyz, "Restore Defaults: XY, XZ and YZ"); + h.frames(2); + assert!(OriginPlaneNames::PLANES.iter().all(|p| rows().iter().any(|r| r == p)), "{:?}", rows()); + h.call("ui.prefs", json!({"button":"cancel"})); + assert_eq!(h.app.preferences.origin_plane_names, TopFrontRight); + } + #[test] fn history_sketches_defaults_in_order_and_follows_preferences_transactions() { let old: Prefs = serde_json::from_value(json!({"timeline_left": true})).unwrap(); diff --git a/crates/ui-egui/src/prefs/interface.rs b/crates/ui-egui/src/prefs/interface.rs index bb0ed4f33..c692872be 100644 --- a/crates/ui-egui/src/prefs/interface.rs +++ b/crates/ui-egui/src/prefs/interface.rs @@ -1,5 +1,32 @@ //! Interface settings composition, using shared controls and previews. use super::*; + +/// Origin plane names: each choice shows the three names it gives (`XY / XZ / YZ`), with a note +/// that only the names shown change. +fn origin_plane_names(app: &mut SolveApp, ui: &mut egui::Ui) { + ui_kit::settings_section(ui, "origin_plane_names", app.tr("prefs.origin_plane_names"), |ui| { + let choices: Vec = + OriginPlaneNames::ALL.iter().map(|names| OriginPlaneNames::PLANES.map(|plane| names.label(plane)).join(" / ")).collect(); + let options: Vec<&str> = choices.iter().map(String::as_str).collect(); + let mut selected = OriginPlaneNames::ALL.iter().position(|names| *names == app.preferences.origin_plane_names).unwrap_or(0); + if ui_kit::settings_segments(ui, app.tr("prefs.origin_plane_names"), &mut selected, &options) + && let Some(names) = OriginPlaneNames::ALL.get(selected) + { + app.preferences.origin_plane_names = *names; + } + // Handles that don't depend on the language, by the choice's saved value. + for (choice, key) in choices.iter().zip(["xyz", "top_front_right"]) { + if let Some(at) = crate::scenario::handle_at(&format!("dialog:{}:{choice}", app.tr("prefs.origin_plane_names"))) { + crate::scenario::publish_handle(&format!("prefs:origin_plane_names:{key}"), at); + } + } + let top = OriginPlaneNames::TopFrontRight; + let note = + crate::i18n::format("prefs.origin_plane_names_note", &[("top", top.label("XY")), ("front", top.label("XZ")), ("right", top.label("YZ"))]); + ui_kit::text(ui, ¬e, ui_kit::Text::Hint("origin_plane_names")); + }); +} + pub(super) fn interface(app: &mut SolveApp, ui: &mut egui::Ui, t: &Tokens) { ui_kit::settings_heading(ui, app.tr("prefs.interface"), app.tr("prefs.interface_note")); ui_kit::settings_section(ui, "theme", app.tr("ui.theme"), |ui| { @@ -145,6 +172,7 @@ pub(super) fn interface(app: &mut SolveApp, ui: &mut egui::Ui, t: &Tokens) { ui_kit::layout_preview, ); }); + origin_plane_names(app, ui); ui_kit::settings_section(ui, "scale", app.tr("prefs.scale_text"), |ui| { ui_kit::settings_pair( ui, diff --git a/crates/ui-egui/src/round_pick_tests.rs b/crates/ui-egui/src/round_pick_tests.rs index 7a5552763..e3c50a911 100644 --- a/crates/ui-egui/src/round_pick_tests.rs +++ b/crates/ui-egui/src/round_pick_tests.rs @@ -182,7 +182,9 @@ fn move_rotates_about_a_cylinder_wall_and_moves_from_a_circle_centre() { let a: Vec = serde_json::from_value(p["axis"].clone()).unwrap(); assert!((a[2].abs() - 1.0).abs() < 1e-9, "about the shaft's axis: {a:?}"); // The chips say what the round picks stand for. - let label = |d: &crate::dialogs::Dialog, i: usize, sel: &Sel| crate::dialogs::selection_label(&h.app.session, d, &d.inputs[i], sel); + let label = |d: &crate::dialogs::Dialog, i: usize, sel: &Sel| { + crate::dialogs::selection_label(&h.app.session, crate::prefs::OriginPlaneNames::Xyz, d, &d.inputs[i], sel) + }; let wall_label = label(&d, 1, &wall); assert!(wall_label.starts_with("Shaft · face ") && wall_label.ends_with(" axis"), "{wall_label}"); assert!(label(&d, 1, &rim).ends_with("· circle axis"), "{}", label(&d, 1, &rim)); diff --git a/crates/ui-egui/src/select_other.rs b/crates/ui-egui/src/select_other.rs index 717613980..c085b0487 100644 --- a/crates/ui-egui/src/select_other.rs +++ b/crates/ui-egui/src/select_other.rs @@ -310,7 +310,8 @@ fn point_label(sk: &solidcraft_engine::sketch::Sketch, id: &str) -> String { } } -/// A row's name: "Line 3", "Point (arc 2 centre)", "Edge 4 · Body1", "XY Plane"… +/// A row's name: "Line 3", "Point (arc 2 centre)", "Edge 4 · Body1", "XY Plane" (an origin plane +/// by the name the preferences give it)… pub fn label(app: &SolveApp, sel: &Sel) -> String { let st = app.session.world_state(); let in_sketch = @@ -331,7 +332,7 @@ pub fn label(app: &SolveApp, sel: &Sel) -> String { Sel::Occurrence { path } => format!("Occurrence {path:?}"), Sel::Feature { id } => app.session.doc.feature(*id).map(|f| f.name.clone()).unwrap_or_else(|| format!("Feature {id}")), Sel::Profile { sketch, index } => format!("Profile {} · {}", index + 1, sketch_name(app, *sketch)), - Sel::Plane { name } if matches!(name.as_str(), "XY" | "XZ" | "YZ") => format!("{name} Plane"), + Sel::Plane { name } if matches!(name.as_str(), "XY" | "XZ" | "YZ") => format!("{} Plane", app.preferences.origin_plane_names.label(name)), Sel::Axis { name } if matches!(name.as_str(), "X" | "Y" | "Z") => format!("{name} Axis"), Sel::Plane { name } | Sel::Axis { name } | Sel::ConstructionPoint { name } => name.clone(), } diff --git a/crates/ui-egui/src/select_other_tests.rs b/crates/ui-egui/src/select_other_tests.rs index 50fda5df4..b6ac9593d 100644 --- a/crates/ui-egui/src/select_other_tests.rs +++ b/crates/ui-egui/src/select_other_tests.rs @@ -246,6 +246,25 @@ fn overlapping_bodies_list_both_and_the_hidden_one_can_be_picked() { assert_eq!(h.app.session.selection, [Sel::Body { name: "Inner".into() }]); } +/// Origin plane names (#6491): the list names an origin plane as the preferences do, and picking +/// it still selects the plane by its id. +#[test] +fn origin_planes_are_listed_by_the_names_the_preferences_give_them() { + let mut h = Harness::new(); + h.call("ui.view", json!({"view":"top"})); + h.settle(); + h.step(&json!({"hold": {"plane": "XY"}})).unwrap(); + assert!(labels(&h).iter().any(|r| r == "XY Plane"), "{:?}", labels(&h)); + h.step(&json!({"key": "Escape"})).unwrap(); + h.call("ui.prefs", json!({"origin_plane_names": "top_front_right"})); + h.step(&json!({"hold": {"plane": "XY"}})).unwrap(); + let rows = labels(&h); + let row = rows.iter().position(|r| r == "Top Plane").unwrap_or_else(|| panic!("{rows:?}")); + assert!(!rows.iter().any(|r| r == "XY Plane"), "{rows:?}"); + h.step(&json!({"click": {"handle": format!("select_other:{row}")}})).unwrap(); + assert_eq!(h.app.session.selection, vec![Sel::Plane { name: "XY".into() }]); +} + #[test] fn long_names_stay_inside_the_popup_and_remain_available_on_hover() { let mut h = Harness::new(); diff --git a/crates/ui-egui/src/sketch_attachment_ui.rs b/crates/ui-egui/src/sketch_attachment_ui.rs index 73ef926b4..fe6a6b842 100644 --- a/crates/ui-egui/src/sketch_attachment_ui.rs +++ b/crates/ui-egui/src/sketch_attachment_ui.rs @@ -269,9 +269,11 @@ pub fn panel(app: &mut SolveApp, ctx: &egui::Context) { } }); ui.horizontal_wrapped(|ui| { - for plane in ["XY", "XZ", "YZ"] { - if ui_kit::button(ui, crate::i18n::format("sketch_panel.use_plane", &[("plane", plane)]), ui_kit::Button::Normal).clicked() { - draft.choose(json!(plane), plane.into()); + // The command takes the plane's id; the button and the choice show its name. + for plane in crate::prefs::OriginPlaneNames::PLANES { + let label = app.preferences.origin_plane_names.label(plane); + if ui_kit::button(ui, crate::i18n::format("sketch_panel.use_plane", &[("plane", label)]), ui_kit::Button::Normal).clicked() { + draft.choose(json!(plane), label.into()); } } }); diff --git a/docs/book/src/guide/sketching.md b/docs/book/src/guide/sketching.md index e2a2b202c..85ddde37f 100644 --- a/docs/book/src/guide/sketching.md +++ b/docs/book/src/guide/sketching.md @@ -10,6 +10,8 @@ an edited one goes back to how it was, as one step that Undo brings back. Opening a sketch turns the view to face it. When the sketch ends, the view stays where it is by default. Preferences › Sketch › **When a sketch ends** changes that: **Return to the previous view** goes back to the view from before the sketch, and **Return unless rotated** goes back only when you panned or zoomed the sketch view but didn't turn it. In scripts, `XY`, `XZ`, `YZ` and their `Top`, `Front`, `Right` aliases name origin planes. +Preferences › Interface › **Origin plane names** shows them as Top, Front and Right in the +browser, dialogs and lists; scripts and saved designs keep XY, XZ and YZ. These names are reserved: a construction plane cannot be created with or renamed to one (case-insensitive). If an older design already has a construction plane with such a name, a string argument naming it is ambiguous and is rejected; use the other alias (`XY` for `Top`) diff --git a/docs/control-protocol.md b/docs/control-protocol.md index aebcfbc15..870f95fae 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -303,7 +303,7 @@ labels; `prefs:measure_axis_distances` identifies the checkbox. | `ui.home` | `open?`: bool; `sample?`: index | the start page: show or hide it, open a built-in sample (once built); returns `open` and the recent designs | | `ui.shortcut` | `command`, `key?`, `replace?` | a command's key, or rebinds it (`""` clears; a key another command uses is refused unless `replace`) | | `ui.help` | `item?`: `about`, `shortcuts` (read only), `report` (opens a report draft for review), `crashes` (the Crash Reports window) | the version, commit, build date and diagnostic text | -| `ui.prefs` | any of `default_units`, `nav` (`fusion`, `solidworks`, `inventor`, `alias`, `blender`, `tinkercad`, `openscad`, `touchpad`), `zoom_reverse`, `pan_reverse_x` (default false: horizontal scrolling pans the other way), `zoom_to_cursor`, `smooth_wheel_zoom` (default true), `trackpad_pan` (default true: two-finger scroll pans, except Touchpad always zooms; pinch zooms), `orbit_around` (`view_centre` (default: what Pan moves and Fit frames), `origin` (the world origin stays still on screen), `cursor` (the model point under the pointer when the drag began); the older `orbit_cursor` boolean still sets `cursor` when true), `sketch_exit_view` (`keep` (default: the view stays where it is when a sketch ends), `previous` (back to the view from before the sketch), `unless_rotated` (back unless the sketch view was turned)), `look_at_anim`, `look_at_speed`, `middle_double_click` (`home` (default), `fit`, `off`), `msaa`, `show_frame_rate` (default false: frames per second in the view's bottom-right corner, counting the frames the view draws anyway; it reads 0 FPS once the view is idle), `window_system` (Linux: `auto` (default: XWayland whenever there is an X display, native Wayland on niri), `wayland`, `x11`; saved in `graphics.json`, applies at the next start; `SOLIDCRAFT_WAYLAND` overrides it), `graphics_adapter` (exact card name, or empty for Automatic; applies after restart; `WGPU_ADAPTER_NAME` takes precedence), `frame_rate_details` (default false: with the frame rate, a frame-time graph of the frames drawn with the triangles over it, a frame-time histogram and what the GPU drew; clicking the readout switches it), `length_decimals`, `angle_decimals`, `step_values` (default false: Up/Down and the wheel step a plain number in a focused value field), `theme` (`dark`, `light`, `system` or a theme file's id: a built-in one such as `gruvbox-dark`, or an imported one; the reply's `theme_ids` lists them), `viewport_theme` (`theme` (default: the theme's own), `light`, `dark`: the 3D view in the Light or Dark theme's colours whatever the window uses, #4146), `theme_import` (a `solidcraft-theme/1` file's JSON or text: adds the theme and turns it on; the reply's `theme_imported` is its id), `theme_remove` (an imported theme's id), `theme_export: true` (the reply's `theme_file` is the theme on now as a complete file; see [colour themes](book/src/guide/ui-tour.md#colour-themes)), `theme_follow` (desktop only, default `""`: a `solidcraft-theme/1` file's path to follow as the theme, reloaded within about a second whenever it changes and when the window gains the focus; the file is read at once, and a file that doesn't read keeps the last good theme; `""` stops following, as does setting `theme`; in the browser it is an error; the launch flag `--theme-file PATH` follows a file for one run without saving it; the reply's `theme_followed` is the path followed now or null, and `theme_follow_error` why its last read was not applied, or null), `language` (`en`, `ar`, `ja`, `de`, `fr`, `he`, `ko`, `ms`, `ru`, `uk`, `zh`; see [localization](localization.md)), `ui_scale`, `ui_font` (an installed font family or a font file for the interface; empty for the built-in font), `up_axis` (`z`, `y`), `offer_stand_up`, `extrude_auto_to_object` (default false: in the Extrude dialog, with a profile picked, a face, vertex or parallel plane picked off its plane switches the extent to To Object; it applies to Extrude dialogs opened afterwards), `hole_snaps` (default false: a Single hole snaps to its face's middle and round edges' centres), `hole_moves` (default false: a placed Single hole has a drag handle (`hole:`), and a pick on a face that has a hole moves it there), `placement_handles` (default false: handles on the preview of a Rest, Boss or Snap Fit that move it across the model and turn it), `color_vision` (`off` (default), `protan`, `deutan`, `tritan`: colour vision modes, #778), `view_confirm_corner` (default false: while a dialog or a sketch is open, a check and a cross at the view's top right, handles `view:confirm:ok` and `view:confirm:cancel`, do what the dialog's OK and Cancel do, or Finish Sketch and Cancel Sketch; the axis view or cube moves down below them, #6709), `history_sketches` (`in_order` (default), `under_feature`: the History at the left lists a sketch under the first feature built from it, #6489; the timeline at the bottom keeps the creation order), `dialog_buttons` (`bottom` (default), `top`: a feature dialog's OK, Cancel and Apply sit in its title row instead of under its inputs, #6708; the buttons keep their handles, and `dialog:close` is then Cancel's), `timeline_origin_bodies` (default false: the History on the left or under the browser starts with the active component's Bodies folder and the Origin, the browser's rows with their eyes, folds and menus; the bottom History is unchanged), `dialog_place` (`edge` (default) or `left_column`: command dialogs open in the left column in place of the browser and the History, #6707), `check_updates` (default true; [updates](book/src/guide/updates.md)), `nav_bridge_enabled` (default false) and `nav_bridge_port` (default 8765: a device's own app on this computer moves the view, [the navigation bridge](3d-mouse.md#device-apps-the-navigation-bridge)); `open` (a page: General, Interface, Design, Navigation, Keyboard Shortcuts, Sketch, Graphics, AI, Plugins; Shortcuts, Assistant and Sketch & selection are aliases, and the former Selection page opens Sketch) opens the Preferences dialog there; `button`: `ok`, `cancel`, `apply`, `defaults`; `stand_up: true` stands up a just-opened Y-up file, `stand_up: false` leaves it as it is ("Leave it": the offer closes and `offer_stand_up` stays on); the offer's buttons are the handles `stand_up:stand`, `stand_up:leave` and `stand_up:never` | sets preferences (kept between runs), returns them all plus `dialog` (the open page or null), `dark`, `viewport_dark` (whether the 3D view is dark), `stand_up_offer`, `theme_followed` and `theme_follow_error` | +| `ui.prefs` | any of `default_units`, `nav` (`fusion`, `solidworks`, `inventor`, `alias`, `blender`, `tinkercad`, `openscad`, `touchpad`), `zoom_reverse`, `pan_reverse_x` (default false: horizontal scrolling pans the other way), `zoom_to_cursor`, `smooth_wheel_zoom` (default true), `trackpad_pan` (default true: two-finger scroll pans, except Touchpad always zooms; pinch zooms), `orbit_around` (`view_centre` (default: what Pan moves and Fit frames), `origin` (the world origin stays still on screen), `cursor` (the model point under the pointer when the drag began); the older `orbit_cursor` boolean still sets `cursor` when true), `sketch_exit_view` (`keep` (default: the view stays where it is when a sketch ends), `previous` (back to the view from before the sketch), `unless_rotated` (back unless the sketch view was turned)), `look_at_anim`, `look_at_speed`, `middle_double_click` (`home` (default), `fit`, `off`), `msaa`, `show_frame_rate` (default false: frames per second in the view's bottom-right corner, counting the frames the view draws anyway; it reads 0 FPS once the view is idle), `window_system` (Linux: `auto` (default: XWayland whenever there is an X display, native Wayland on niri), `wayland`, `x11`; saved in `graphics.json`, applies at the next start; `SOLIDCRAFT_WAYLAND` overrides it), `graphics_adapter` (exact card name, or empty for Automatic; applies after restart; `WGPU_ADAPTER_NAME` takes precedence), `frame_rate_details` (default false: with the frame rate, a frame-time graph of the frames drawn with the triangles over it, a frame-time histogram and what the GPU drew; clicking the readout switches it), `length_decimals`, `angle_decimals`, `step_values` (default false: Up/Down and the wheel step a plain number in a focused value field), `theme` (`dark`, `light`, `system` or a theme file's id: a built-in one such as `gruvbox-dark`, or an imported one; the reply's `theme_ids` lists them), `viewport_theme` (`theme` (default: the theme's own), `light`, `dark`: the 3D view in the Light or Dark theme's colours whatever the window uses, #4146), `theme_import` (a `solidcraft-theme/1` file's JSON or text: adds the theme and turns it on; the reply's `theme_imported` is its id), `theme_remove` (an imported theme's id), `theme_export: true` (the reply's `theme_file` is the theme on now as a complete file; see [colour themes](book/src/guide/ui-tour.md#colour-themes)), `theme_follow` (desktop only, default `""`: a `solidcraft-theme/1` file's path to follow as the theme, reloaded within about a second whenever it changes and when the window gains the focus; the file is read at once, and a file that doesn't read keeps the last good theme; `""` stops following, as does setting `theme`; in the browser it is an error; the launch flag `--theme-file PATH` follows a file for one run without saving it; the reply's `theme_followed` is the path followed now or null, and `theme_follow_error` why its last read was not applied, or null), `language` (`en`, `ar`, `ja`, `de`, `fr`, `he`, `ko`, `ms`, `ru`, `uk`, `zh`; see [localization](localization.md)), `ui_scale`, `ui_font` (an installed font family or a font file for the interface; empty for the built-in font), `up_axis` (`z`, `y`), `offer_stand_up`, `extrude_auto_to_object` (default false: in the Extrude dialog, with a profile picked, a face, vertex or parallel plane picked off its plane switches the extent to To Object; it applies to Extrude dialogs opened afterwards), `hole_snaps` (default false: a Single hole snaps to its face's middle and round edges' centres), `hole_moves` (default false: a placed Single hole has a drag handle (`hole:`), and a pick on a face that has a hole moves it there), `placement_handles` (default false: handles on the preview of a Rest, Boss or Snap Fit that move it across the model and turn it), `color_vision` (`off` (default), `protan`, `deutan`, `tritan`: colour vision modes, #778), `view_confirm_corner` (default false: while a dialog or a sketch is open, a check and a cross at the view's top right, handles `view:confirm:ok` and `view:confirm:cancel`, do what the dialog's OK and Cancel do, or Finish Sketch and Cancel Sketch; the axis view or cube moves down below them, #6709), `history_sketches` (`in_order` (default), `under_feature`: the History at the left lists a sketch under the first feature built from it, #6489; the timeline at the bottom keeps the creation order), `dialog_buttons` (`bottom` (default), `top`: a feature dialog's OK, Cancel and Apply sit in its title row instead of under its inputs, #6708; the buttons keep their handles, and `dialog:close` is then Cancel's), `timeline_origin_bodies` (default false: the History on the left or under the browser starts with the active component's Bodies folder and the Origin, the browser's rows with their eyes, folds and menus; the bottom History is unchanged), `origin_plane_names` (`xyz` (default) or `top_front_right`: the browser, dialogs and lists call the origin planes Top, Front and Right; their ids, commands and saved designs keep XY, XZ and YZ), `dialog_place` (`edge` (default) or `left_column`: command dialogs open in the left column in place of the browser and the History, #6707), `check_updates` (default true; [updates](book/src/guide/updates.md)), `nav_bridge_enabled` (default false) and `nav_bridge_port` (default 8765: a device's own app on this computer moves the view, [the navigation bridge](3d-mouse.md#device-apps-the-navigation-bridge)); `open` (a page: General, Interface, Design, Navigation, Keyboard Shortcuts, Sketch, Graphics, AI, Plugins; Shortcuts, Assistant and Sketch & selection are aliases, and the former Selection page opens Sketch) opens the Preferences dialog there; `button`: `ok`, `cancel`, `apply`, `defaults`; `stand_up: true` stands up a just-opened Y-up file, `stand_up: false` leaves it as it is ("Leave it": the offer closes and `offer_stand_up` stays on); the offer's buttons are the handles `stand_up:stand`, `stand_up:leave` and `stand_up:never` | sets preferences (kept between runs), returns them all plus `dialog` (the open page or null), `dark`, `viewport_dark` (whether the 3D view is dark), `stand_up_offer`, `theme_followed` and `theme_follow_error` | | `ui.capture` | `action?`: `capture`, `revert`, `cancel` | answers the Capture Position question (asked when a command starts or the design is saved while components were moved without capturing); without `action`, what waits | | `ui.window` | `action`: minimize, maximize, restore, toggle, close | what the title bar's caption buttons do (on Windows and Linux the application bar is the title bar); close asks about unsaved designs first | | `ui.agent_cursor` | `show` (bool), `speed`: a number from 1 to 5 (times the normal speed) or `"instant"` (no animation: the command runs at once and the pointer jumps to where it acted), `follow_camera` (bool); all optional | the settings. While the cursor is shown, `engine.execute` first glides to the command's toolbar button and to each pick, then runs and replies; later requests wait their turn. The pointer shows the command's localized name, including commands inside a closed toolbar group; an animated batch names each command it visits. It also follows the pointer input sent with `ui.move`, `ui.click`, `ui.drag` and `ui.scroll`, as each event reaches the app, and a press leaves a ripple. `"animate": false` on a call skips it | From 7fad8dbec06ab4a6407249a71673dfef53e5221b Mon Sep 17 00:00:00 2001 From: Frank <58932224+plexi32@users.noreply.github.com> Date: Tue, 27 Oct 2026 21:17:39 +0000 Subject: [PATCH 100/102] Fix feature creation at timeline end (#7620) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- crates/doc/src/document.rs | 9 +++++---- crates/engine/src/cmd/edit_tests.rs | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/crates/doc/src/document.rs b/crates/doc/src/document.rs index bf6266ad5..1406057a6 100644 --- a/crates/doc/src/document.rs +++ b/crates/doc/src/document.rs @@ -3512,11 +3512,12 @@ impl Document { match self.marker { // A marker right after the last feature moves on past a feature added there, or the // new feature would be added rolled back (#7741). - Some(m) if m <= self.features.len() => { - self.features.insert(m, f); - self.marker = Some(m + 1); + Some(marker) => { + let position = marker.min(self.features.len()); + self.features.insert(position, f); + self.marker = Some(position + 1); } - _ => self.features.push(f), + None => self.features.push(f), } if let Some(group_id) = insertion_group { let positions: std::collections::BTreeMap = diff --git a/crates/engine/src/cmd/edit_tests.rs b/crates/engine/src/cmd/edit_tests.rs index f847fde53..c9844edee 100644 --- a/crates/engine/src/cmd/edit_tests.rs +++ b/crates/engine/src/cmd/edit_tests.rs @@ -54,6 +54,31 @@ fn repeat_is_refused_outside_the_app_and_changes_nothing() { assert_eq!((spec.shortcut, spec.tab, spec.undoable), (Some("Shift+R"), "", false)); } +#[test] +fn creating_after_deleting_future_features_keeps_the_new_feature_active() { + let mut s = Session::default(); + for (name, corner, size) in [("Base", [0, 0, 0], 10), ("Later1", [20, 0, 0], 2), ("Later2", [40, 0, 0], 3)] { + run(&mut s, "solid.box", json!({"name": name, "corner": corner, "length": size, "width": size, "height": size, "operation": "new"})); + } + + run(&mut s, "timeline.roll_to", json!({"position": 1})); + run(&mut s, "solid.box", json!({"name": "Inserted", "corner": [60, 0, 0], "length": 4, "width": 4, "height": 4, "operation": "new"})); + assert_eq!(s.doc.features.iter().map(|feature| feature.name.as_str()).collect::>(), ["Base", "Inserted", "Later1", "Later2"]); + assert_eq!(s.doc.marker, Some(2), "with later features, the new feature is inserted at the cursor"); + + run(&mut s, "timeline.delete", json!({"features": ["Later1", "Later2"]})); + assert_eq!(s.doc.features.len(), 2); + assert_eq!(s.doc.marker, Some(2), "the cursor is at the end after deleting all later features"); + + run(&mut s, "solid.box", json!({"name": "Appended", "corner": [80, 0, 0], "length": 5, "width": 5, "height": 5, "operation": "new"})); + + assert_eq!(s.doc.features.iter().map(|feature| feature.name.as_str()).collect::>(), ["Base", "Inserted", "Appended"]); + assert_eq!(s.doc.marker, Some(3), "the new feature advances the cursor to the end"); + assert_eq!(s.model.state().bodies.len(), 3, "the appended feature is evaluated, not left in the future"); + let volume = run(&mut s, "inspect.measure", json!({}))["total"]["volume_mm3"].as_f64().unwrap(); + assert!((volume - 1189.0).abs() < 1e-6, "{volume}"); +} + #[test] fn g2_fillet_survives_edit_undo_and_reopen() { use solidcraft_doc::{Document, FeatureKind, FilletStyle}; From 13d62705f3e3a8b709cc9fc7aa964b580c35913e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 21:51:37 +0000 Subject: [PATCH 101/102] Regenerate generated files and fold pending files [skip ci] --- assets/locales/ar.json | 2 ++ assets/locales/de.json | 2 ++ assets/locales/en.json | 2 ++ assets/locales/he.json | 2 ++ assets/locales/ja.json | 2 ++ assets/locales/ko.json | 2 ++ .../locales/pending/origin-plane-names.json | 34 ------------------- assets/locales/vi.json | 2 ++ assets/locales/zh.json | 2 ++ 9 files changed, 16 insertions(+), 34 deletions(-) delete mode 100644 assets/locales/pending/origin-plane-names.json diff --git a/assets/locales/ar.json b/assets/locales/ar.json index 5e6c525b4..c88f94064 100644 --- a/assets/locales/ar.json +++ b/assets/locales/ar.json @@ -1549,6 +1549,8 @@ "prefs.opaque": "معتم", "prefs.orbit_snap": "اضغط Shift أثناء التدوير للالتقاط على محور.", "prefs.orientation": "الاتجاه", + "prefs.origin_plane_names": "أسماء مستويات الأصل", + "prefs.origin_plane_names_note": "الأسماء المعروضة في المستعرض والحوارات والقوائم. {top} هو XY و{front} هو XZ و{right} هو YZ، والمحور Z للأعلى. تحتفظ الأوامر والسكربتات والتصاميم المحفوظة بـ XY وXZ وYZ.", "prefs.overall_speed": "السرعة العامة", "prefs.placement": "الموضع", "prefs.prefer_free_sketch_points": "تفضيل نقاط الرسم القابلة للتحريك عند تداخل النقاط", diff --git a/assets/locales/de.json b/assets/locales/de.json index 33c5cea2c..a5c61e47c 100644 --- a/assets/locales/de.json +++ b/assets/locales/de.json @@ -1401,6 +1401,8 @@ "prefs.history_origin_bodies": "Ursprung und Körper oben zeigen", "prefs.history_origin_bodies_note": "Der Verlauf links oder unter dem Browser beginnt mit dem Körper-Ordner der aktiven Komponente und dem Ursprung, mit Augen und Menüs wie im Browser. Der Verlauf unten bleibt unverändert.", "prefs.minutes_suffix": " min", + "prefs.origin_plane_names": "Namen der Ursprungsebenen", + "prefs.origin_plane_names_note": "Namen in Browser, Dialogen und Listen. {top} ist XY, {front} ist XZ und {right} ist YZ, mit Z nach oben. Befehle, Skripte und gespeicherte Konstruktionen behalten XY, XZ und YZ.", "prefs.theme_follow": "Einer Designdatei folgen", "prefs.theme_follow_error": "Nicht angewendet: {error}. Das letzte gültige Design bleibt aktiv.", "prefs.theme_follow_launch": "Nur für diesen Start (--theme-file); wird neu geladen, sobald ein anderes Werkzeug die Datei überschreibt.", diff --git a/assets/locales/en.json b/assets/locales/en.json index 19c6bcccf..5bb15b254 100644 --- a/assets/locales/en.json +++ b/assets/locales/en.json @@ -1549,6 +1549,8 @@ "prefs.opaque": "Opaque", "prefs.orbit_snap": "Hold Shift during orbit to snap to an axis.", "prefs.orientation": "Orientation", + "prefs.origin_plane_names": "Origin plane names", + "prefs.origin_plane_names_note": "Names shown in the browser, dialogs and lists. {top} is XY, {front} is XZ and {right} is YZ, with Z up. Commands, scripts and saved designs keep XY, XZ and YZ.", "prefs.overall_speed": "Overall speed", "prefs.placement": "Placement", "prefs.prefer_free_sketch_points": "Prefer movable sketch points when points overlap", diff --git a/assets/locales/he.json b/assets/locales/he.json index db2547f77..e1957dc27 100644 --- a/assets/locales/he.json +++ b/assets/locales/he.json @@ -1549,6 +1549,8 @@ "prefs.opaque": "אטום", "prefs.orbit_snap": "החזקת Shift בזמן סיבוב מצמידה לציר.", "prefs.orientation": "כיוון", + "prefs.origin_plane_names": "שמות מישורי הראשית", + "prefs.origin_plane_names_note": "השמות המוצגים בדפדפן, בתיבות הדו־שיח וברשימות. {top} הוא XY, {front} הוא XZ ו־{right} הוא YZ, כש־Z למעלה. פקודות, סקריפטים ותכנונים שמורים שומרים על XY, XZ ו־YZ.", "prefs.overall_speed": "מהירות כללית", "prefs.placement": "מיקום", "prefs.prefer_free_sketch_points": "העדפת נקודות סקיצה ניתנות להזזה כשנקודות חופפות", diff --git a/assets/locales/ja.json b/assets/locales/ja.json index bbddd121f..bd7b1d2ba 100644 --- a/assets/locales/ja.json +++ b/assets/locales/ja.json @@ -1549,6 +1549,8 @@ "prefs.opaque": "不透明", "prefs.orbit_snap": "回転中にShiftを押すと軸にスナップします。", "prefs.orientation": "方向", + "prefs.origin_plane_names": "原点平面の名前", + "prefs.origin_plane_names_note": "ブラウザー、ダイアログ、一覧に表示される名前です。{top} は XY、{front} は XZ、{right} は YZ です (Z が上)。コマンド、スクリプト、保存されたデザインでは XY、XZ、YZ のままです。", "prefs.overall_speed": "全体の速度", "prefs.placement": "配置", "prefs.prefer_free_sketch_points": "スケッチ点が重なったときは移動可能な点を優先する", diff --git a/assets/locales/ko.json b/assets/locales/ko.json index 544e653c4..0ba68fdfc 100644 --- a/assets/locales/ko.json +++ b/assets/locales/ko.json @@ -1290,6 +1290,8 @@ "prefs.opaque": "불투명", "prefs.orbit_snap": "회전하는 동안 Shift를 누르면 축에 맞춰집니다.", "prefs.orientation": "방향", + "prefs.origin_plane_names": "원점 평면 이름", + "prefs.origin_plane_names_note": "브라우저, 대화 상자, 목록에 표시되는 이름입니다. {top}은 XY, {front}는 XZ, {right}는 YZ이며 Z가 위쪽입니다. 명령, 스크립트, 저장된 디자인은 XY, XZ, YZ를 유지합니다.", "prefs.overall_speed": "전체 속도", "prefs.preview_choices": "선택 항목 미리보기", "prefs.quality_default": "기본값", diff --git a/assets/locales/pending/origin-plane-names.json b/assets/locales/pending/origin-plane-names.json deleted file mode 100644 index bca13c9e3..000000000 --- a/assets/locales/pending/origin-plane-names.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "en": { - "prefs.origin_plane_names": "Origin plane names", - "prefs.origin_plane_names_note": "Names shown in the browser, dialogs and lists. {top} is XY, {front} is XZ and {right} is YZ, with Z up. Commands, scripts and saved designs keep XY, XZ and YZ." - }, - "ja": { - "prefs.origin_plane_names": "原点平面の名前", - "prefs.origin_plane_names_note": "ブラウザー、ダイアログ、一覧に表示される名前です。{top} は XY、{front} は XZ、{right} は YZ です (Z が上)。コマンド、スクリプト、保存されたデザインでは XY、XZ、YZ のままです。" - }, - "zh": { - "prefs.origin_plane_names": "原点平面名称", - "prefs.origin_plane_names_note": "浏览器、对话框和列表中显示的名称。{top} 即 XY,{front} 即 XZ,{right} 即 YZ(Z 轴朝上)。命令、脚本和已保存的设计仍使用 XY、XZ 和 YZ。" - }, - "ar": { - "prefs.origin_plane_names": "أسماء مستويات الأصل", - "prefs.origin_plane_names_note": "الأسماء المعروضة في المستعرض والحوارات والقوائم. {top} هو XY و{front} هو XZ و{right} هو YZ، والمحور Z للأعلى. تحتفظ الأوامر والسكربتات والتصاميم المحفوظة بـ XY وXZ وYZ." - }, - "he": { - "prefs.origin_plane_names": "שמות מישורי הראשית", - "prefs.origin_plane_names_note": "השמות המוצגים בדפדפן, בתיבות הדו־שיח וברשימות. {top} הוא XY, {front} הוא XZ ו־{right} הוא YZ, כש־Z למעלה. פקודות, סקריפטים ותכנונים שמורים שומרים על XY, XZ ו־YZ." - }, - "de": { - "prefs.origin_plane_names": "Namen der Ursprungsebenen", - "prefs.origin_plane_names_note": "Namen in Browser, Dialogen und Listen. {top} ist XY, {front} ist XZ und {right} ist YZ, mit Z nach oben. Befehle, Skripte und gespeicherte Konstruktionen behalten XY, XZ und YZ." - }, - "ko": { - "prefs.origin_plane_names": "원점 평면 이름", - "prefs.origin_plane_names_note": "브라우저, 대화 상자, 목록에 표시되는 이름입니다. {top}은 XY, {front}는 XZ, {right}는 YZ이며 Z가 위쪽입니다. 명령, 스크립트, 저장된 디자인은 XY, XZ, YZ를 유지합니다." - }, - "vi": { - "prefs.origin_plane_names": "Tên các mặt phẳng gốc", - "prefs.origin_plane_names_note": "Tên hiển thị trong trình duyệt, hộp thoại và danh sách. {top} là XY, {front} là XZ và {right} là YZ, với Z hướng lên. Lệnh, script và thiết kế đã lưu vẫn dùng XY, XZ và YZ." - } -} diff --git a/assets/locales/vi.json b/assets/locales/vi.json index 28d8136eb..6875a8b3d 100644 --- a/assets/locales/vi.json +++ b/assets/locales/vi.json @@ -1549,6 +1549,8 @@ "prefs.opaque": "Đậm đặc (không trong suốt)", "prefs.orbit_snap": "Giữ Shift khi xoay để bắt dính vào một trục tọa độ.", "prefs.orientation": "Hướng nhìn", + "prefs.origin_plane_names": "Tên các mặt phẳng gốc", + "prefs.origin_plane_names_note": "Tên hiển thị trong trình duyệt, hộp thoại và danh sách. {top} là XY, {front} là XZ và {right} là YZ, với Z hướng lên. Lệnh, script và thiết kế đã lưu vẫn dùng XY, XZ và YZ.", "prefs.overall_speed": "Tốc độ tổng thể", "prefs.placement": "Vị trí đặt", "prefs.prefer_free_sketch_points": "Ưu tiên điểm phác thảo có thể di chuyển khi các điểm chồng lên nhau", diff --git a/assets/locales/zh.json b/assets/locales/zh.json index 2b4d44be7..28596ee7d 100644 --- a/assets/locales/zh.json +++ b/assets/locales/zh.json @@ -1549,6 +1549,8 @@ "prefs.opaque": "不透明", "prefs.orbit_snap": "旋转时按住Shift可捕捉到坐标轴。", "prefs.orientation": "方向", + "prefs.origin_plane_names": "原点平面名称", + "prefs.origin_plane_names_note": "浏览器、对话框和列表中显示的名称。{top} 即 XY,{front} 即 XZ,{right} 即 YZ(Z 轴朝上)。命令、脚本和已保存的设计仍使用 XY、XZ 和 YZ。", "prefs.overall_speed": "整体速度", "prefs.placement": "放置", "prefs.prefer_free_sketch_points": "草图点重合时优先选择可移动的点", From 03d03424694eb9f76c1c341e81612887c96e0129 Mon Sep 17 00:00:00 2001 From: bherbruck Date: Tue, 27 Oct 2026 18:05:36 -0400 Subject: [PATCH 102/102] Release 0.25.0: version bump, design format 41 (#7916) Co-authored-by: Claude Opus 5.5 --- Cargo.lock | 34 +++++++++---------- Cargo.toml | 2 +- .../cylinder-reference-edges.rs | 0 3 files changed, 18 insertions(+), 18 deletions(-) rename crates/doc/src/format/{pending => v41}/cylinder-reference-edges.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 8b88428a0..db0d36878 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4208,7 +4208,7 @@ dependencies = [ [[package]] name = "solidcraft" -version = "0.24.1" +version = "0.25.0" dependencies = [ "block2 0.6.2", "eframe", @@ -4242,11 +4242,11 @@ dependencies = [ [[package]] name = "solidcraft-3dx-client" -version = "0.24.1" +version = "0.25.0" [[package]] name = "solidcraft-cli" -version = "0.24.1" +version = "0.25.0" dependencies = [ "image", "log", @@ -4258,7 +4258,7 @@ dependencies = [ [[package]] name = "solidcraft-derive" -version = "0.24.1" +version = "0.25.0" dependencies = [ "proc-macro2", "quote", @@ -4267,7 +4267,7 @@ dependencies = [ [[package]] name = "solidcraft-doc" -version = "0.24.1" +version = "0.25.0" dependencies = [ "log", "serde", @@ -4284,7 +4284,7 @@ dependencies = [ [[package]] name = "solidcraft-engine" -version = "0.24.1" +version = "0.25.0" dependencies = [ "image", "log", @@ -4305,7 +4305,7 @@ dependencies = [ [[package]] name = "solidcraft-geom" -version = "0.24.1" +version = "0.25.0" dependencies = [ "serde", "serde_json", @@ -4314,7 +4314,7 @@ dependencies = [ [[package]] name = "solidcraft-gpu" -version = "0.24.1" +version = "0.25.0" dependencies = [ "image", "log", @@ -4334,7 +4334,7 @@ dependencies = [ [[package]] name = "solidcraft-io" -version = "0.24.1" +version = "0.25.0" dependencies = [ "cadmpeg-core", "cadmpeg-ir", @@ -4358,7 +4358,7 @@ dependencies = [ [[package]] name = "solidcraft-kernel" -version = "0.24.1" +version = "0.25.0" dependencies = [ "log", "proptest", @@ -4378,7 +4378,7 @@ dependencies = [ [[package]] name = "solidcraft-mcp" -version = "0.24.1" +version = "0.25.0" dependencies = [ "serde_json", "solidcraft-engine", @@ -4387,7 +4387,7 @@ dependencies = [ [[package]] name = "solidcraft-render" -version = "0.24.1" +version = "0.25.0" dependencies = [ "image", "moxcms", @@ -4401,7 +4401,7 @@ dependencies = [ [[package]] name = "solidcraft-sketch" -version = "0.24.1" +version = "0.25.0" dependencies = [ "serde", "serde_json", @@ -4412,14 +4412,14 @@ dependencies = [ [[package]] name = "solidcraft-space-mouse" -version = "0.24.1" +version = "0.25.0" dependencies = [ "serde", ] [[package]] name = "solidcraft-ui-egui" -version = "0.24.1" +version = "0.25.0" dependencies = [ "arboard", "egui", @@ -4449,7 +4449,7 @@ dependencies = [ [[package]] name = "solidcraft-web" -version = "0.24.1" +version = "0.25.0" dependencies = [ "eframe", "egui", @@ -5994,7 +5994,7 @@ checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" [[package]] name = "xtask" -version = "0.24.1" +version = "0.25.0" dependencies = [ "proc-macro2", "serde", diff --git a/Cargo.toml b/Cargo.toml index fde68c437..12119f655 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = ["crates/*", "apps/*", "xtask"] exclude = ["vendor"] [workspace.package] -version = "0.24.1" +version = "0.25.0" edition = "2024" license = "MIT OR Apache-2.0" rust-version = "1.95" diff --git a/crates/doc/src/format/pending/cylinder-reference-edges.rs b/crates/doc/src/format/v41/cylinder-reference-edges.rs similarity index 100% rename from crates/doc/src/format/pending/cylinder-reference-edges.rs rename to crates/doc/src/format/v41/cylinder-reference-edges.rs