diff --git a/crates/engine/src/cmd/draw2/arc.rs b/crates/engine/src/cmd/draw2/arc.rs index 332f2265..34e488b7 100644 --- a/crates/engine/src/cmd/draw2/arc.rs +++ b/crates/engine/src/cmd/draw2/arc.rs @@ -65,18 +65,22 @@ impl ArcV { const S: &str = "Specify start point of arc"; const C: &str = "Specify center point of arc"; const E: &str = "Specify end point of arc"; - const A: &str = "Specify included angle"; - const L: &str = "Specify length of chord"; + // The last prompt of every variant whose direction Ctrl switches says so, as + // AutoCAD's does. + const EC: &str = "Specify end point of arc (hold Ctrl to switch direction)"; + const CC: &str = "Specify center point of arc (hold Ctrl to switch direction)"; + const A: &str = "Specify included angle (hold Ctrl to switch direction)"; + const L: &str = "Specify length of chord (hold Ctrl to switch direction)"; match self { ArcV::ThreeP => &[(S, Ask::Point), ("Specify second point of arc", Ask::Point), (E, Ask::Point)], - ArcV::Sec => &[(S, Ask::Point), (E, Ask::Point), (C, Ask::Point)], - ArcV::Sce => &[(S, Ask::Point), (C, Ask::Point), (E, Ask::Point)], + ArcV::Sec => &[(S, Ask::Point), (E, Ask::Point), (CC, Ask::Point)], + ArcV::Sce => &[(S, Ask::Point), (C, Ask::Point), (EC, Ask::Point)], ArcV::Sca => &[(S, Ask::Point), (C, Ask::Point), (A, Ask::Sweep(1, 0))], ArcV::Scl => &[(S, Ask::Point), (C, Ask::Point), (L, Ask::Dist(0))], ArcV::Sea => &[(S, Ask::Point), (E, Ask::Point), (A, Ask::Angle(0))], ArcV::Sed => &[(S, Ask::Point), (E, Ask::Point), ("Specify tangent direction for the start point of arc", Ask::Angle(0))], - ArcV::Ser => &[(S, Ask::Point), (E, Ask::Point), ("Specify radius of arc", Ask::Dist(1))], - ArcV::Cse => &[(C, Ask::Point), (S, Ask::Point), ("Specify end point of arc (hold Ctrl to switch direction)", Ask::Point)], + ArcV::Ser => &[(S, Ask::Point), (E, Ask::Point), ("Specify radius of arc (hold Ctrl to switch direction)", Ask::Dist(1))], + ArcV::Cse => &[(C, Ask::Point), (S, Ask::Point), (EC, Ask::Point)], ArcV::Csa => &[(C, Ask::Point), (S, Ask::Point), (A, Ask::Sweep(0, 1))], ArcV::Csl => &[(C, Ask::Point), (S, Ask::Point), (L, Ask::Dist(1))], ArcV::CircleCd => &[("Specify center point for circle", Ask::Point), ("Specify diameter of circle", Ask::Dist(0))], @@ -90,28 +94,36 @@ impl ArcV { ], } } + /// Builds the entity from the values. `ctrl` (Ctrl, or Cmd on macOS, held) switches the + /// arc to the other direction, clockwise from the start point instead of counter-clockwise: + /// + /// * start/center/end picked (`Sce`, `Sec`, `Cse`): the same two endpoints on the same + /// circle, walking the other way around, so the start/end angles swap; + /// * start, end and angle or radius (`Sea`, `Ser`): the same sweep or radius bulging to the + /// other side of the chord; + /// * start, center and chord length (`Scl`, `Csl`): the same chord, clockwise from the start; + /// * included angle (`Sca`, `Csa`): already signed when the value was taken (see + /// `SeqM::value_from_point`), because a picked angle must keep ending at the cursor. fn build(self, v: &[Val], ctrl: bool) -> Option { let p = |i: usize| v.get(i).and_then(|x| x.p()); let n = |i: usize| v.get(i).and_then(|x| x.n()); + let swap = |a: Arc| if ctrl { Arc::new(a.center, a.radius, a.end, a.start) } else { a }; let a = match self { ArcV::ThreeP => Arc::from_3_points(p(0)?, p(1)?, p(2)?), - ArcV::Sec => Some(Arc::from_start_center_end(p(0)?, p(2)?, p(1)?)), - ArcV::Sce => Some(Arc::from_start_center_end(p(0)?, p(1)?, p(2)?)), + ArcV::Sec => Some(swap(Arc::from_start_center_end(p(0)?, p(2)?, p(1)?))), + ArcV::Sce => Some(swap(Arc::from_start_center_end(p(0)?, p(1)?, p(2)?))), ArcV::Sca => curves::arc_sca(p(0)?, p(1)?, n(2)?), - ArcV::Scl => curves::arc_scl(p(0)?, p(1)?, n(2)?), - ArcV::Sea => curves::arc_sea(p(0)?, p(1)?, n(2)?), + ArcV::Scl => curves::arc_scl(p(0)?, p(1)?, n(2)?).map(|a| if ctrl { clockwise_from_start(a) } else { a }), + ArcV::Sea => curves::arc_sea(p(0)?, p(1)?, if ctrl { -n(2)? } else { n(2)? }), ArcV::Sed => curves::arc_sed(p(0)?, p(1)?, Vec2::from_angle(n(2)?)), + // Counter-clockwise from the end back to the start is clockwise from the start. + ArcV::Ser if ctrl => curves::arc_ser(p(1)?, p(0)?, n(2)?), ArcV::Ser => curves::arc_ser(p(0)?, p(1)?, n(2)?), - // Center, Start, End. Ctrl keeps the two endpoints on the circle and walks the - // other way around: swapping the start/end angles is the mirror arc through the - // same two endpoints. (Continue below flips differently, by negating the start + // Center, Start, End. (Continue below flips differently, by negating the start // tangent; both are "reverse", but only here is the chord fixed by the picks.) - ArcV::Cse => { - let a = Arc::from_start_center_end(p(1)?, p(0)?, p(2)?); - Some(if ctrl { Arc::new(a.center, a.radius, a.end, a.start) } else { a }) - } + ArcV::Cse => Some(swap(Arc::from_start_center_end(p(1)?, p(0)?, p(2)?))), ArcV::Csa => curves::arc_sca(p(1)?, p(0)?, n(2)?), - ArcV::Csl => curves::arc_scl(p(1)?, p(0)?, n(2)?), + ArcV::Csl => curves::arc_scl(p(1)?, p(0)?, n(2)?).map(|a| if ctrl { clockwise_from_start(a) } else { a }), ArcV::CircleCd => { let d = n(1)?.abs(); let c = p(0)?; @@ -130,6 +142,13 @@ impl ArcV { } } +/// The counter-clockwise arc `a`, which starts at its start point, turned to sweep the same +/// angle clockwise from that point instead. +fn clockwise_from_start(a: Arc) -> Arc { + let sweep = norm_angle(a.end - a.start); + Arc::new(a.center, a.radius, a.start - sweep, a.start) +} + impl ArcV { /// Options at step `i` and the variant each one switches to (the values so far carry over). fn alts(self, i: usize) -> &'static [(&'static str, ArcV)] { @@ -165,14 +184,17 @@ impl SeqM { fn ask(&self) -> Option<(&'static str, Ask)> { self.v.steps().get(self.vals.len()).copied() } - fn value_from_point(&self, ask: Ask, q: Vec2) -> Option { + /// The value a picked point gives. With `ctrl` an included angle is measured clockwise + /// (negative), so the arc still ends on the ray through the cursor but goes the other way. + fn value_from_point(&self, ask: Ask, q: Vec2, ctrl: bool) -> Option { let pt = |i: usize| self.vals.get(i).and_then(|x| x.p()); Some(match ask { Ask::Point => Val::P(q), Ask::Angle(b) => Val::N(pt(b)?.angle_to(q)), Ask::Sweep(c, f) => { let c = pt(c)?; - Val::N(norm_angle(c.angle_to(q) - c.angle_to(pt(f)?))) + let ccw = norm_angle(c.angle_to(q) - c.angle_to(pt(f)?)); + Val::N(if ctrl && ccw > 0.0 { ccw - std::f64::consts::TAU } else { ccw }) } Ask::Dist(b) => Val::N(pt(b)?.dist(q)), }) @@ -235,12 +257,14 @@ impl Interactive for SeqM { } let Some((_, ask)) = self.ask() else { return Ok(Step::Done) }; let val = match (&i, ask) { - (Input::Point(q), _) => self.value_from_point(ask, *q), + (Input::Point(q), _) => self.value_from_point(ask, *q, s.ctrl_down), (Input::Text(t), Ask::Angle(_) | Ask::Sweep(..)) => { // The tangent direction is a direction; included angles are sizes. let au = s.angle_settings(); let a = if self.v == ArcV::Sed { au.direction(t) } else { au.amount(t) }; - Some(Val::N(a.ok_or_else(|| other("Requires a valid angle."))?)) + let a = a.ok_or_else(|| other("Requires a valid angle."))?; + // A typed included angle is signed already; Ctrl reverses it like a picked one. + Some(Val::N(if s.ctrl_down && matches!(ask, Ask::Sweep(..)) { -a } else { a })) } (Input::Text(t), Ask::Dist(_)) => Some(Val::N(number(t).ok_or_else(|| other("Requires numeric distance or a point."))?)), (Input::Enter, _) => return Ok(Step::Cancel), @@ -274,7 +298,7 @@ impl Interactive for SeqM { return curves::arc_sed(st, c, d).map(|a| vec![arc(&a)]).unwrap_or_default(); } let Some((_, ask)) = self.ask() else { return Vec::new() }; - let Some(v) = self.value_from_point(ask, c) else { return Vec::new() }; + let Some(v) = self.value_from_point(ask, c, s.ctrl_down) else { return Vec::new() }; let mut vals = self.vals.clone(); vals.push(v); let mut out: Vec = self.base().map(|b| vec![line(b, c)]).unwrap_or_default(); diff --git a/crates/engine/tests/it/arc_ctrl_direction.rs b/crates/engine/tests/it/arc_ctrl_direction.rs index ec5746c3..77bf0deb 100644 --- a/crates/engine/tests/it/arc_ctrl_direction.rs +++ b/crates/engine/tests/it/arc_ctrl_direction.rs @@ -8,6 +8,10 @@ //! //! Both should land on the same circle with its two halves swapped, so the assertions below //! are the same: same center, same radius, and the start/end angles are exchanged. +//! +//! The other ARC variants AutoCAD lets Ctrl reverse are below `every_variant_…`: each one is +//! drawn with and without Ctrl, and the rubber band shown while Ctrl is held must be the arc +//! the click then creates. use draftcraft_engine::doc::EntityKind; use draftcraft_engine::geom::Vec2; @@ -106,3 +110,120 @@ fn no_ctrl_is_the_old_behavior() { let plain = run_continue(false); assert!(plain.0.y > 0.0, "tangent as-is puts the center above the chord: {:?}", plain.0); } + +// ---------------- every ARC variant whose direction Ctrl switches ---------------- + +/// Same angle modulo a full turn. +fn same_angle(a: f64, b: f64) -> bool { + let d = (a - b).rem_euclid(std::f64::consts::TAU); + d < 1e-9 || d > std::f64::consts::TAU - 1e-9 +} + +/// Types each input at the command line, holding Ctrl (or not) for the last one, and returns +/// the arc it made plus, when the last input is a point, the arc previewed at that point first. +fn draw(inputs: &[&str], ctrl: bool) -> ((Vec2, f64, f64, f64), Option<(Vec2, f64, f64, f64)>) { + let mut s = Session::new(); + s.execute("setvar", &serde_json::json!({ "name": "OSMODE", "value": 0 })).unwrap(); + let (last, first) = inputs.split_last().unwrap(); + for t in first { + s.cmdline(t).unwrap(); + } + assert!(s.prompt_text().contains("hold Ctrl"), "{inputs:?}: the last prompt should advertise Ctrl: {}", s.prompt_text()); + s.ctrl_down = ctrl; + let previewed = last.split_once(',').map(|(x, y)| { + let c = Vec2::new(x.parse().unwrap(), y.parse().unwrap()); + let arcs: Vec<_> = s + .preview(c) + .into_iter() + .filter_map(|e| match e.kind { + EntityKind::Arc(a) => Some((a.center.xy(), a.radius, a.start, a.end)), + _ => None, + }) + .collect(); + assert_eq!(arcs.len(), 1, "{inputs:?}: one arc in the rubber band"); + arcs[0] + }); + s.cmdline(last).unwrap(); + assert!(s.current_prompt().is_none(), "{inputs:?}: ARC should be done"); + (last_arc(&s), previewed) +} + +fn same_arc(a: (Vec2, f64, f64, f64), b: (Vec2, f64, f64, f64)) -> bool { + a.0.dist(b.0) < 1e-9 && near(a.1, b.1) && same_angle(a.2, b.2) && same_angle(a.3, b.3) +} + +/// How a Ctrl arc relates to the plain one. +enum Flip { + /// Same circle, other way round: start and end angles swap. + Swap, + /// Same sweep, clockwise from the same start point. + ClockwiseFromStart, + /// Same two endpoints and radius, the center mirrored across the chord. + Mirror(Vec2), +} + +#[test] +fn every_variant_ctrl_switches_direction_in_preview_and_result() { + // Start (5,0), center (0,0) and the point (0,5) a quarter turn counter-clockwise. + let cases: &[(&str, &[&str], Flip)] = &[ + ("start, center, end", &["arc", "5,0", "c", "0,0", "0,5"], Flip::Swap), + ("start, end, center", &["arc", "5,0", "e", "0,5", "0,0"], Flip::Swap), + ("center, start, end", &["arc", "c", "0,0", "5,0", "0,5"], Flip::Swap), + ("start, center, picked angle", &["arc", "5,0", "c", "0,0", "a", "0,5"], Flip::Swap), + ("center, start, picked angle", &["arc", "c", "0,0", "5,0", "a", "0,5"], Flip::Swap), + ("start, center, typed angle", &["arc", "5,0", "c", "0,0", "a", "90"], Flip::ClockwiseFromStart), + ("center, start, typed angle", &["arc", "c", "0,0", "5,0", "a", "90"], Flip::ClockwiseFromStart), + ("start, center, chord length", &["arc", "5,0", "c", "0,0", "l", "5"], Flip::ClockwiseFromStart), + ("center, start, chord length", &["arc", "c", "0,0", "5,0", "l", "5"], Flip::ClockwiseFromStart), + ("start, end, angle", &["arc", "5,0", "e", "0,5", "a", "90"], Flip::Mirror(Vec2::new(5.0, 5.0))), + ("start, end, radius", &["arc", "5,0", "e", "0,5", "r", "5"], Flip::Mirror(Vec2::new(5.0, 5.0))), + ]; + for (name, inputs, flip) in cases { + let (plain, plain_preview) = draw(inputs, false); + let (flipped, flipped_preview) = draw(inputs, true); + for (arc, preview) in [(plain, plain_preview), (flipped, flipped_preview)] { + if let Some(p) = preview { + assert!(same_arc(arc, p), "{name}: the rubber band {p:?} is not the arc drawn {arc:?}"); + } + } + assert!(plain.0.dist(Vec2::ZERO) < 1e-9 && near(plain.1, 5.0), "{name}: plain arc {plain:?}"); + assert!(same_angle(plain.2, 0.0), "{name}: plain arc starts at the start point: {plain:?}"); + assert!(!same_arc(plain, flipped), "{name}: Ctrl changed nothing: {plain:?}"); + match flip { + Flip::Swap => assert!( + same_arc(flipped, (plain.0, plain.1, plain.3, plain.2)), + "{name}: Ctrl must walk the other way round the same circle: {plain:?} vs {flipped:?}" + ), + Flip::ClockwiseFromStart => { + let sw = sweep(plain.2, plain.3); + assert!( + same_arc(flipped, (plain.0, plain.1, plain.2 - sw, plain.2)), + "{name}: Ctrl must sweep the same angle clockwise from the start: {plain:?} vs {flipped:?}" + ); + } + Flip::Mirror(c) => { + assert!(flipped.0.dist(*c) < 1e-9 && near(flipped.1, plain.1), "{name}: mirrored center expected: {flipped:?}"); + // Counter-clockwise from the end point (0,5) back to the start point (5,0). + let end = Vec2::new(0.0, 5.0) - *c; + let start = Vec2::new(5.0, 0.0) - *c; + assert!(same_angle(flipped.2, end.y.atan2(end.x)) && same_angle(flipped.3, start.y.atan2(start.x)), "{name}: {flipped:?}"); + } + } + } +} + +/// ARC's three-point form and the tangent direction variant have no Ctrl in AutoCAD; holding it +/// changes nothing there. +#[test] +fn ctrl_leaves_three_point_and_direction_arcs_alone() { + for inputs in [&["arc", "5,0", "3.5355339,3.5355339", "0,5"][..], &["arc", "5,0", "e", "0,5", "d", "90"][..]] { + let mut a = Session::new(); + let mut b = Session::new(); + b.ctrl_down = true; + for t in inputs { + a.cmdline(t).unwrap(); + b.cmdline(t).unwrap(); + } + assert!(same_arc(last_arc(&a), last_arc(&b)), "{inputs:?}"); + } +} diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs index ba289e02..83a6f60d 100644 --- a/crates/ui-egui/src/canvas.rs +++ b/crates/ui-egui/src/canvas.rs @@ -277,7 +277,9 @@ fn navigate_canvas(app: &mut CadApp, ui: &mut egui::Ui, nav: &Navigation<'_>) -> let p = nav.pointer; let inside = p.hover_pos.is_some_and(|at| nav.rect.contains(at) && ui.ctx().layer_id_at(at) == Some(ui.layer_id()) && nav.response.hovered()); let on_menu = p.hover_pos.is_some_and(|at| over_canvas_menu(app, at)); - app.session.ctrl_down = p.mods.ctrl; + // ARC's "hold Ctrl to switch direction": Ctrl everywhere, and Cmd too on macOS (`mac_cmd`; + // `command` is Cmd there and Ctrl elsewhere), where a Ctrl-click can turn into a right click. + app.session.ctrl_down = p.mods.ctrl || p.mods.command || p.mods.mac_cmd; ui.input(|i| { for event in &i.raw.events { if let egui::Event::MouseWheel { unit, .. } = event { diff --git a/crates/ui-egui/src/canvas/tests.rs b/crates/ui-egui/src/canvas/tests.rs index a67bb453..3b584f8c 100644 --- a/crates/ui-egui/src/canvas/tests.rs +++ b/crates/ui-egui/src/canvas/tests.rs @@ -272,3 +272,32 @@ fn selection_window_previews_what_it_would_select() { assert!(app.canvas.window_preview.is_empty()); assert_eq!(app.session.selection(), vec![line]); } + +/// ARC's "hold Ctrl to switch direction" reads `Session::ctrl_down`, which the canvas writes +/// every frame: Ctrl does it everywhere, and Cmd (egui's `command`) does too, which is how it +/// is held on macOS, where a Ctrl-click can turn into a right click. +#[test] +fn ctrl_or_cmd_held_reaches_the_session() { + let mut app = CadApp::new(draftcraft_engine::Session::new(), crate::Services::default()); + let ctx = egui::Context::default(); + let frame = |app: &mut CadApp, modifiers: egui::Modifiers| { + let raw = egui::RawInput { + screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(1400.0, 900.0))), + events: vec![egui::Event::ModifiersChanged(modifiers), egui::Event::PointerMoved(pos2(700.0, 450.0))], + ..Default::default() + }; + ctx.run_ui(raw, |ui| { + app.logic(ui.ctx()); + app.ui(ui); + }) + .textures_delta + .clear(); + app.session.ctrl_down + }; + assert!(!frame(&mut app, egui::Modifiers::NONE)); + assert!(frame(&mut app, egui::Modifiers::CTRL), "Ctrl"); + assert!(!frame(&mut app, egui::Modifiers::NONE), "released"); + assert!(frame(&mut app, egui::Modifiers::MAC_CMD), "Cmd on macOS"); + assert!(frame(&mut app, egui::Modifiers::COMMAND), "Command"); + assert!(!frame(&mut app, egui::Modifiers::SHIFT), "Shift alone"); +} diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rs index 0d9a9673..3d28e46d 100644 --- a/crates/ui-egui/src/control.rs +++ b/crates/ui-egui/src/control.rs @@ -14,6 +14,7 @@ //! - `ui.pointer {x, y, space?: "world"|"screen", button?: left|right, action?: click|move}` //! - `ui.click {x, y, shift?, ctrl?}`, `ui.move {x, y}`: real egui pointer input in screen points //! - `ui.key {key, cmd?, shift?, alt?}`, `ui.text {text}`: synthetic keyboard input +//! - `ui.modifiers {ctrl?, cmd?, shift?, alt?}`: hold these modifier keys (all false releases them) //! - `ui.set {...UiState fields}`, `ui.resize {width, height}` //! - `ui.screenshot {path?}`: PNG of the window; `ui.render {path?, width?, height?, fit?, window?, //! background?, plot_style?}`: headless render of the drawing (no window needed; fits the drawing @@ -209,6 +210,7 @@ const METHODS: &[(&str, &str, &str)] = &[ ("ui.move", "{x, y}", "Real egui pointer move in screen points."), ("ui.drag", "{x, y, to: [x, y], button?}", "Real press, move and release."), ("ui.key", "{key, cmd?, shift?, alt?}", "Synthetic key press."), + ("ui.modifiers", "{ctrl?, cmd?, shift?, alt?}", "Hold modifier keys until the next call (e.g. ARC's hold Ctrl to switch direction)."), ("ui.text", "{text}", "Synthetic text input."), ("ui.set", "UiState fields", "Change UI state: palettes, toolbars, command line, theme…"), ("ui.resize", "{width, height}", "Resize the window."), @@ -445,6 +447,20 @@ pub fn handle(app: &mut CadApp, ctx: &egui::Context, req: &ControlRequest) -> Ou app.synthetic.push(egui::Event::Key { key, physical_key: None, pressed: false, repeat: false, modifiers }); ok(Value::Null) } + // Holds modifiers like a real key held down: egui keeps them until the next change. + "ui.modifiers" => { + let b = |k: &str| p.get(k).and_then(Value::as_bool).unwrap_or(false); + let modifiers = egui::Modifiers { + alt: b("alt"), + shift: b("shift"), + command: b("cmd") || (b("ctrl") && !cfg!(target_os = "macos")), + mac_cmd: b("cmd") && cfg!(target_os = "macos"), + ctrl: b("ctrl") || (b("cmd") && !cfg!(target_os = "macos")), + }; + app.synthetic_held = modifiers; + app.synthetic.push(egui::Event::ModifiersChanged(modifiers)); + ok(Value::Null) + } "ui.text" => { app.synthetic.push(egui::Event::Text(s("text").unwrap_or("").to_string())); ok(Value::Null) diff --git a/crates/ui-egui/src/i18n/ar.tsv b/crates/ui-egui/src/i18n/ar.tsv index 1158f0fb..6b4f5371 100644 --- a/crates/ui-egui/src/i18n/ar.tsv +++ b/crates/ui-egui/src/i18n/ar.tsv @@ -959,6 +959,7 @@ Specify center of polygon حدد مركز المضلع Specify center point for circle حدد نقطة المركز للدائرة Specify center point of arc حدد نقطة مركز القوس + Specify center point of arc (hold Ctrl to switch direction) حدد نقطة مركز القوس (استمر في الضغط على Ctrl لتبديل الاتجاه) Specify center point of array حدد نقطة مركز المصفوفة Specify center point of base حدد نقطة مركز الأساس Specify corner of viewport حدد زاوية إطار العرض @@ -997,6 +998,7 @@ Specify height حدد الارتفاع Specify helix height حدد ارتفاع الحلزون Specify included angle حدد الزاوية المحصورة + Specify included angle (hold Ctrl to switch direction) حدد الزاوية المحصورة (استمر في الضغط على Ctrl لتبديل الاتجاه) Specify insertion base point حدد نقطة الأساس للإدراج Specify insertion point حدد نقطة الإدراج Specify inside diameter of donut حدد القطر الداخلي للحلقة @@ -1005,6 +1007,7 @@ Specify leader landing location حدد موضع هبوط خط الإشارة Specify length for rectangles حدد طولاً للمستطيلات Specify length of chord حدد طول الوتر + Specify length of chord (hold Ctrl to switch direction) حدد طول الوتر (استمر في الضغط على Ctrl لتبديل الاتجاه) Specify length of segment حدد طول المقطع Specify line width for rectangles حدد عرض الخط للمستطيلات Specify location for new vertex حدد موضعاً لرأس جديد @@ -1023,6 +1026,7 @@ Specify point on object for second tangent of circle حدد نقطة على كائن لثاني مماس للدائرة Specify point on side to offset حدد نقطة على الجانب المراد إزاحته Specify radius of arc حدد نصف قطر القوس + Specify radius of arc (hold Ctrl to switch direction) حدد نصف قطر القوس (استمر في الضغط على Ctrl لتبديل الاتجاه) Specify radius of circle حدد نصف قطر الدائرة Specify rotation angle حدد زاوية التدوير Specify rotation angle of text حدد زاوية تدوير النص diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 4080a345..373cf525 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -887,6 +887,7 @@ Specify center of polygon Navedite središte mnogougla Specify center point for circle Navedite središnju tačku kruga Specify center point of arc Navedite središnju tačku luka + Specify center point of arc (hold Ctrl to switch direction) Navedite središnju tačku luka (držite Ctrl za promjenu smjera) Specify center point of array Navedite središnju tačku niza Specify center point of base Navedite središnju tačku baze Specify corner of viewport Navedite ugao prozora prikaza @@ -925,6 +926,7 @@ Specify height Navedite visinu Specify helix height Navedite visinu spirale Specify included angle Navedite obuhvaćeni ugao + Specify included angle (hold Ctrl to switch direction) Navedite obuhvaćeni ugao (držite Ctrl za promjenu smjera) Specify insertion base point Navedite baznu tačku umetanja Specify insertion point Navedite tačku umetanja A drawing opened from a file keeps that file's format. Crtež otvoren iz datoteke zadržava format te datoteke. @@ -968,6 +970,7 @@ Specify leader landing location Navedite lokaciju police pokazne linije Specify length for rectangles Navedite dužinu za pravougaonike Specify length of chord Navedite dužinu tetive + Specify length of chord (hold Ctrl to switch direction) Navedite dužinu tetive (držite Ctrl za promjenu smjera) Specify length of segment Navedite dužinu segmenta Specify line width for rectangles Navedite širinu linije za pravougaonike Specify location for new vertex Navedite lokaciju novog tjemena @@ -986,6 +989,7 @@ Specify point on object for second tangent of circle Navedite tačku na objektu za drugu tangentu kruga Specify point on side to offset Navedite tačku na strani za odmak Specify radius of arc Navedite poluprečnik luka + Specify radius of arc (hold Ctrl to switch direction) Navedite poluprečnik luka (držite Ctrl za promjenu smjera) Specify radius of circle Navedite poluprečnik kruga Specify rotation angle Navedite ugao rotacije Specify rotation angle of text Navedite ugao rotacije teksta diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 9b6debf1..cd7aa964 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -885,6 +885,7 @@ Specify center of polygon Určete střed mnohoúhelníku Specify center point for circle Určete středový bod kružnice Specify center point of arc Určete středový bod oblouku + Specify center point of arc (hold Ctrl to switch direction) Určete středový bod oblouku (podržením Ctrl přepnete směr) Specify center point of array Určete středový bod pole Specify center point of base Určete středový bod základny Specify corner of viewport Určete roh výřezu @@ -923,6 +924,7 @@ Specify height Určete výšku Specify helix height Určete výšku šroubovice Specify included angle Určete středový úhel + Specify included angle (hold Ctrl to switch direction) Určete středový úhel (podržením Ctrl přepnete směr) Specify insertion base point Určete základní bod vložení Specify insertion point Určete bod vložení A drawing opened from a file keeps that file's format. Výkres otevřený ze souboru si zachová formát tohoto souboru. @@ -966,6 +968,7 @@ Specify leader landing location Určete polohu zakončení odkazu Specify length for rectangles Určete délku obdélníků Specify length of chord Určete délku tětivy + Specify length of chord (hold Ctrl to switch direction) Určete délku tětivy (podržením Ctrl přepnete směr) Specify length of segment Určete délku segmentu Specify line width for rectangles Určete šířku čáry obdélníků Specify location for new vertex Určete polohu nového vrcholu @@ -984,6 +987,7 @@ Specify point on object for second tangent of circle Určete bod na objektu pro druhou tečnu kružnice Specify point on side to offset Určete bod na straně pro ekvidistantu Specify radius of arc Určete poloměr oblouku + Specify radius of arc (hold Ctrl to switch direction) Určete poloměr oblouku (podržením Ctrl přepnete směr) Specify radius of circle Určete poloměr kružnice Specify rotation angle Určete úhel otočení Specify rotation angle of text Určete úhel otočení textu diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 457af137..a828aa0f 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -770,6 +770,7 @@ Specify center of polygon Geben Sie den Mittelpunkt des Polygons an Specify center point for circle Geben Sie den Mittelpunkt des Kreises an Specify center point of arc Geben Sie den Mittelpunkt des Bogens an + Specify center point of arc (hold Ctrl to switch direction) Geben Sie den Mittelpunkt des Bogens an (Strg halten, um die Richtung zu wechseln) Specify center point of array Geben Sie den Mittelpunkt der Reihe an Specify center point of base Geben Sie den Mittelpunkt der Basis an Specify corner of viewport Geben Sie die Ecke des Ansichtsfensters an @@ -808,6 +809,7 @@ Specify height Geben Sie die Höhe an Specify helix height Geben Sie die Höhe der Helix an Specify included angle Geben Sie den eingeschlossenen Winkel an + Specify included angle (hold Ctrl to switch direction) Geben Sie den eingeschlossenen Winkel an (Strg halten, um die Richtung zu wechseln) Specify insertion base point Geben Sie den Einfügebasispunkt an Specify insertion point Geben Sie den Einfügepunkt an Specify inside diameter of donut Geben Sie den Innendurchmesser des Rings an @@ -816,6 +818,7 @@ Specify leader landing location Geben Sie die Position des Führungslinienabsatzes an Specify length for rectangles Geben Sie die Länge für Rechtecke an Specify length of chord Geben Sie die Länge der Sehne an + Specify length of chord (hold Ctrl to switch direction) Geben Sie die Länge der Sehne an (Strg halten, um die Richtung zu wechseln) Specify length of segment Geben Sie die Länge des Segments an Specify line width for rectangles Geben Sie die Linienbreite für Rechtecke an Specify location for new vertex Geben Sie die Position des neuen Scheitelpunkts an @@ -834,6 +837,7 @@ Specify point on object for second tangent of circle Geben Sie einen Punkt auf dem Objekt für die zweite Tangente des Kreises an Specify point on side to offset Geben Sie einen Punkt auf der Seite des Versatzes an Specify radius of arc Geben Sie den Radius des Bogens an + Specify radius of arc (hold Ctrl to switch direction) Geben Sie den Radius des Bogens an (Strg halten, um die Richtung zu wechseln) Specify radius of circle Geben Sie den Radius des Kreises an Specify rotation angle Geben Sie den Drehwinkel an Specify rotation angle of text Geben Sie den Drehwinkel des Textes an diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 16de07ab..6e5841f7 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -1039,6 +1039,7 @@ Specify center of polygon Καθορίστε κέντρο πολυγώνου Specify center point for circle Καθορίστε κεντρικό σημείο κύκλου Specify center point of arc Καθορίστε κεντρικό σημείο τόξου + Specify center point of arc (hold Ctrl to switch direction) Καθορίστε κεντρικό σημείο τόξου (κρατήστε Ctrl για αλλαγή κατεύθυνσης) Specify center point of array Καθορίστε κεντρικό σημείο διάταξης Specify center point of base Καθορίστε κεντρικό σημείο βάσης Specify corner of viewport Καθορίστε γωνία παραθύρου προβολής @@ -1077,6 +1078,7 @@ Specify height Καθορίστε ύψος Specify helix height Καθορίστε ύψος έλικας Specify included angle Καθορίστε περιεχόμενη γωνία + Specify included angle (hold Ctrl to switch direction) Καθορίστε περιεχόμενη γωνία (κρατήστε Ctrl για αλλαγή κατεύθυνσης) Specify insertion base point Καθορίστε σημείο βάσης εισαγωγής Specify insertion point Καθορίστε σημείο εισαγωγής Specify inside diameter of donut Καθορίστε εσωτερική διάμετρο δακτυλίου @@ -1085,6 +1087,7 @@ Specify leader landing location Καθορίστε θέση οριζόντιου τμήματος γραμμής υπόδειξης Specify length for rectangles Καθορίστε μήκος ορθογωνίων Specify length of chord Καθορίστε μήκος χορδής + Specify length of chord (hold Ctrl to switch direction) Καθορίστε μήκος χορδής (κρατήστε Ctrl για αλλαγή κατεύθυνσης) Specify length of segment Καθορίστε μήκος τμήματος Specify line width for rectangles Καθορίστε πλάτος γραμμής για ορθογώνια Specify location for new vertex Καθορίστε θέση νέας κορυφής @@ -1103,6 +1106,7 @@ Specify point on object for second tangent of circle Καθορίστε σημείο του αντικειμένου για τη δεύτερη εφαπτομένη κύκλου Specify point on side to offset Καθορίστε σημείο στην πλευρά της παράλληλης μετατόπισης Specify radius of arc Καθορίστε ακτίνα τόξου + Specify radius of arc (hold Ctrl to switch direction) Καθορίστε ακτίνα τόξου (κρατήστε Ctrl για αλλαγή κατεύθυνσης) Specify radius of circle Καθορίστε ακτίνα κύκλου Specify rotation angle Καθορίστε γωνία περιστροφής Specify rotation angle of text Καθορίστε γωνία περιστροφής κειμένου diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 064666e9..549dfd42 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -974,6 +974,7 @@ Specify center of polygon Indica el centro del polígono Specify center point for circle Indica el centro del círculo Specify center point of arc Indica el centro del arco + Specify center point of arc (hold Ctrl to switch direction) Indica el centro del arco (mantén Ctrl para cambiar de sentido) Specify center point of array Indica el centro de la matriz Specify center point of base Indica el centro de la base Specify corner of viewport Indica una esquina de la ventana gráfica @@ -1012,6 +1013,7 @@ Specify height Indica la altura Specify helix height Indica la altura de la hélice Specify included angle Indica el ángulo incluido + Specify included angle (hold Ctrl to switch direction) Indica el ángulo incluido (mantén Ctrl para cambiar de sentido) Specify insertion base point Indica el punto base de inserción Specify insertion point Indica el punto de inserción Specify inside diameter of donut Indica el diámetro interior de la arandela @@ -1020,6 +1022,7 @@ Specify leader landing location Indica la posición del rellano de la directriz Specify length for rectangles Indica la longitud de los rectángulos Specify length of chord Indica la longitud de la cuerda + Specify length of chord (hold Ctrl to switch direction) Indica la longitud de la cuerda (mantén Ctrl para cambiar de sentido) Specify length of segment Indica la longitud del segmento Specify line width for rectangles Indica la anchura de línea de los rectángulos Specify location for new vertex Indica la posición del nuevo vértice @@ -1038,6 +1041,7 @@ Specify point on object for second tangent of circle Indica un punto del objeto para la segunda tangente del círculo Specify point on side to offset Indica un punto en el lado del desfase Specify radius of arc Indica el radio del arco + Specify radius of arc (hold Ctrl to switch direction) Indica el radio del arco (mantén Ctrl para cambiar de sentido) Specify radius of circle Indica el radio del círculo Specify rotation angle Indica el ángulo de giro Specify rotation angle of text Indica el ángulo de giro del texto diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 49f4a4d5..d29a0d3a 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -764,6 +764,7 @@ Specify center of polygon Spécifiez le centre du polygone Specify center point for circle Spécifiez le point central du cercle Specify center point of arc Spécifiez le point central de l'arc + Specify center point of arc (hold Ctrl to switch direction) Spécifiez le point central de l'arc (maintenez Ctrl enfoncé pour changer de direction) Specify center point of array Spécifiez le point central de la matrice Specify center point of base Spécifiez le point central de la base Specify corner of viewport Spécifiez le coin de la fenêtre @@ -802,6 +803,7 @@ Specify height Spécifiez la hauteur Specify helix height Spécifiez la hauteur de l'hélice Specify included angle Spécifiez l'angle inclus + Specify included angle (hold Ctrl to switch direction) Spécifiez l'angle inclus (maintenez Ctrl enfoncé pour changer de direction) Specify insertion base point Spécifiez le point de base d'insertion Specify insertion point Spécifiez le point d'insertion Specify inside diameter of donut Spécifiez le diamètre intérieur de l'anneau @@ -810,6 +812,7 @@ Specify leader landing location Spécifiez l'emplacement de la base du repère Specify length for rectangles Spécifiez la longueur des rectangles Specify length of chord Spécifiez la longueur de la corde + Specify length of chord (hold Ctrl to switch direction) Spécifiez la longueur de la corde (maintenez Ctrl enfoncé pour changer de direction) Specify length of segment Spécifiez la longueur du segment Specify line width for rectangles Spécifiez la largeur de ligne des rectangles Specify location for new vertex Spécifiez l'emplacement du nouveau sommet @@ -828,6 +831,7 @@ Specify point on object for second tangent of circle Spécifiez le point sur l'objet pour la deuxième tangente du cercle Specify point on side to offset Spécifiez le point du côté à décaler Specify radius of arc Spécifiez le rayon de l'arc + Specify radius of arc (hold Ctrl to switch direction) Spécifiez le rayon de l'arc (maintenez Ctrl enfoncé pour changer de direction) Specify radius of circle Spécifiez le rayon du cercle Specify rotation angle Spécifiez l'angle de rotation Specify rotation angle of text Spécifiez l'angle de rotation du texte diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 2cae38c6..df4af803 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -1049,6 +1049,7 @@ Specify center of polygon Add meg a sokszög középpontját Specify center point for circle Add meg a kör középpontját Specify center point of arc Add meg az ív középpontját + Specify center point of arc (hold Ctrl to switch direction) Add meg az ív középpontját (a Ctrl nyomva tartásával irányt válthatsz) Specify center point of array Add meg a kiosztás középpontját Specify center point of base Add meg az alap középpontját Specify corner of viewport Add meg a nézetablak sarkát @@ -1087,6 +1088,7 @@ Specify height Add meg a magasságot Specify helix height Add meg a csavarvonal magasságát Specify included angle Add meg a középponti szöget + Specify included angle (hold Ctrl to switch direction) Add meg a középponti szöget (a Ctrl nyomva tartásával irányt válthatsz) Specify insertion base point Add meg a beszúrási bázispontot Specify insertion point Add meg a beszúrási pontot Specify inside diameter of donut Add meg a gyűrű belső átmérőjét @@ -1095,6 +1097,7 @@ Specify leader landing location Add meg a mutatóvonal vállának helyét Specify length for rectangles Add meg a téglalapok hosszát Specify length of chord Add meg a húr hosszát + Specify length of chord (hold Ctrl to switch direction) Add meg a húr hosszát (a Ctrl nyomva tartásával irányt válthatsz) Specify length of segment Add meg a szakasz hosszát Specify line width for rectangles Add meg a téglalapok vonalszélességét Specify location for new vertex Add meg az új csúcspont helyét @@ -1113,6 +1116,7 @@ Specify point on object for second tangent of circle Add meg az objektumon a kör második érintési pontját Specify point on side to offset Adj meg egy pontot az eltolás oldalán Specify radius of arc Add meg az ív sugarát + Specify radius of arc (hold Ctrl to switch direction) Add meg az ív sugarát (a Ctrl nyomva tartásával irányt válthatsz) Specify radius of circle Add meg a kör sugarát Specify rotation angle Add meg az elforgatási szöget Specify rotation angle of text Add meg a szöveg elforgatási szögét diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 7565dedc..68326f77 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -899,6 +899,7 @@ menu Modify Edita Specify center of polygon Specificare il centro del poligono Specify center point for circle Specificare il centro del cerchio Specify center point of arc Specificare il centro dell'arco + Specify center point of arc (hold Ctrl to switch direction) Specificare il centro dell'arco (tenere premuto Ctrl per invertire la direzione) Specify center point of array Specificare il centro della serie Specify center point of base Specificare il centro della base Specify corner of viewport Specificare l'angolo della finestra @@ -937,6 +938,7 @@ menu Modify Edita Specify height Specificare l'altezza Specify helix height Specificare l'altezza dell'elica Specify included angle Specificare l'angolo compreso + Specify included angle (hold Ctrl to switch direction) Specificare l'angolo compreso (tenere premuto Ctrl per invertire la direzione) Specify insertion base point Specificare il punto base di inserimento Specify insertion point Specificare il punto di inserimento A drawing opened from a file keeps that file's format. Un disegno aperto da un file conserva il formato di quel file. @@ -980,6 +982,7 @@ menu Modify Edita Specify leader landing location Specificare la posizione del tratto orizzontale della direttrice Specify length for rectangles Specificare la lunghezza dei rettangoli Specify length of chord Specificare la lunghezza della corda + Specify length of chord (hold Ctrl to switch direction) Specificare la lunghezza della corda (tenere premuto Ctrl per invertire la direzione) Specify length of segment Specificare la lunghezza del segmento Specify line width for rectangles Specificare la larghezza di linea dei rettangoli Specify location for new vertex Specificare la posizione del nuovo vertice @@ -998,6 +1001,7 @@ menu Modify Edita Specify point on object for second tangent of circle Specificare il punto sull'oggetto per la seconda tangente del cerchio Specify point on side to offset Specificare un punto sul lato dell'offset Specify radius of arc Specificare il raggio dell'arco + Specify radius of arc (hold Ctrl to switch direction) Specificare il raggio dell'arco (tenere premuto Ctrl per invertire la direzione) Specify radius of circle Specificare il raggio del cerchio Specify rotation angle Specificare l'angolo di rotazione Specify rotation angle of text Specificare l'angolo di rotazione del testo diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index be324b9b..77d78287 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -884,6 +884,7 @@ Specify center of polygon 다각형 중심 지정 Specify center point for circle 원 중심점 지정 Specify center point of arc 호 중심점 지정 + Specify center point of arc (hold Ctrl to switch direction) 호 중심점 지정(Ctrl을 누르면 방향 전환) Specify center point of array 배열 중심점 지정 Specify center point of base 밑면 중심점 지정 Specify corner of viewport 뷰포트 구석 지정 @@ -922,6 +923,7 @@ Specify height 높이 지정 Specify helix height 나선 높이 지정 Specify included angle 사이각 지정 + Specify included angle (hold Ctrl to switch direction) 사이각 지정(Ctrl을 누르면 방향 전환) Specify insertion base point 삽입 기준점 지정 Specify insertion point 삽입점 지정 A drawing opened from a file keeps that file's format. 파일에서 연 도면은 해당 파일의 형식을 유지합니다. @@ -965,6 +967,7 @@ Specify leader landing location 지시선 연결선 위치 지정 Specify length for rectangles 직사각형 길이 지정 Specify length of chord 현 길이 지정 + Specify length of chord (hold Ctrl to switch direction) 현 길이 지정(Ctrl을 누르면 방향 전환) Specify length of segment 구간 길이 지정 Specify line width for rectangles 직사각형 선 폭 지정 Specify location for new vertex 새 정점 위치 지정 @@ -983,6 +986,7 @@ Specify point on object for second tangent of circle 원의 두 번째 접선을 위한 객체 위의 점 지정 Specify point on side to offset 간격띄우기할 쪽의 점 지정 Specify radius of arc 호 반지름 지정 + Specify radius of arc (hold Ctrl to switch direction) 호 반지름 지정(Ctrl을 누르면 방향 전환) Specify radius of circle 원 반지름 지정 Specify rotation angle 회전 각도 지정 Specify rotation angle of text 문자 회전 각도 지정 diff --git a/crates/ui-egui/src/i18n/pt_br.tsv b/crates/ui-egui/src/i18n/pt_br.tsv index da6bbff3..ac52b9c2 100644 --- a/crates/ui-egui/src/i18n/pt_br.tsv +++ b/crates/ui-egui/src/i18n/pt_br.tsv @@ -969,6 +969,7 @@ Specify center of polygon Especifique o centro do polígono Specify center point for circle Especifique o ponto central do círculo Specify center point of arc Especifique o ponto central do arco + Specify center point of arc (hold Ctrl to switch direction) Especifique o ponto central do arco (segure Ctrl para inverter o sentido) Specify center point of array Especifique o ponto central da matriz Specify center point of base Especifique o ponto central da base Specify corner of viewport Especifique o canto do viewport @@ -1007,6 +1008,7 @@ Specify height Especifique a altura Specify helix height Especifique a altura da hélice Specify included angle Especifique o ângulo incluído + Specify included angle (hold Ctrl to switch direction) Especifique o ângulo incluído (segure Ctrl para inverter o sentido) Specify insertion base point Especifique o ponto base de inserção Specify insertion point Especifique o ponto de inserção Specify inside diameter of donut Especifique o diâmetro interno do anel @@ -1015,6 +1017,7 @@ Specify leader landing location Especifique a posição do patamar da linha de chamada Specify length for rectangles Especifique o comprimento para retângulos Specify length of chord Especifique o comprimento da corda + Specify length of chord (hold Ctrl to switch direction) Especifique o comprimento da corda (segure Ctrl para inverter o sentido) Specify length of segment Especifique o comprimento do segmento Specify line width for rectangles Especifique a largura de linha para retângulos Specify location for new vertex Especifique a posição do novo vértice @@ -1033,6 +1036,7 @@ Specify point on object for second tangent of circle Especifique o ponto no objeto para a segunda tangente do círculo Specify point on side to offset Especifique um ponto no lado do offset Specify radius of arc Especifique o raio do arco + Specify radius of arc (hold Ctrl to switch direction) Especifique o raio do arco (segure Ctrl para inverter o sentido) Specify radius of circle Especifique o raio do círculo Specify rotation angle Especifique o ângulo de rotação Specify rotation angle of text Especifique o ângulo de rotação do texto diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index d19fb5f5..50f111c0 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -764,6 +764,7 @@ Specify center of polygon Укажите центр многоугольника Specify center point for circle Укажите центр круга Specify center point of arc Укажите центр дуги + Specify center point of arc (hold Ctrl to switch direction) Укажите центр дуги (удерживайте Ctrl для смены направления) Specify center point of array Укажите центр массива Specify center point of base Укажите центр основания Specify corner of viewport Укажите угол видового экрана @@ -802,6 +803,7 @@ Specify height Укажите высоту Specify helix height Укажите высоту спирали Specify included angle Укажите угол между сторонами + Specify included angle (hold Ctrl to switch direction) Укажите угол между сторонами (удерживайте Ctrl для смены направления) Specify insertion base point Укажите базовую точку вставки Specify insertion point Укажите точку вставки Specify inside diameter of donut Укажите внутренний диаметр кольца @@ -810,6 +812,7 @@ Specify leader landing location Укажите положение полки выноски Specify length for rectangles Укажите длину прямоугольников Specify length of chord Укажите длину хорды + Specify length of chord (hold Ctrl to switch direction) Укажите длину хорды (удерживайте Ctrl для смены направления) Specify length of segment Укажите длину сегмента Specify line width for rectangles Укажите ширину линий прямоугольников Specify location for new vertex Укажите положение новой вершины @@ -828,6 +831,7 @@ Specify point on object for second tangent of circle Укажите точку на объекте для второй касательной круга Specify point on side to offset Укажите точку со стороны смещения Specify radius of arc Укажите радиус дуги + Specify radius of arc (hold Ctrl to switch direction) Укажите радиус дуги (удерживайте Ctrl для смены направления) Specify radius of circle Укажите радиус круга Specify rotation angle Укажите угол поворота Specify rotation angle of text Укажите угол поворота текста diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 472cf52b..af9aeb35 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -967,6 +967,7 @@ Specify center of polygon Ange polygonens centrum Specify center point for circle Ange cirkelns centrumpunkt Specify center point of arc Ange bågens centrumpunkt + Specify center point of arc (hold Ctrl to switch direction) Ange bågens centrumpunkt (håll ned Ctrl för att byta riktning) Specify center point of array Ange mönstrets centrumpunkt Specify center point of base Ange basens centrumpunkt Specify corner of viewport Ange vyfönstrets hörn @@ -1005,6 +1006,7 @@ Specify height Ange höjd Specify helix height Ange helixens höjd Specify included angle Ange medelpunktsvinkel + Specify included angle (hold Ctrl to switch direction) Ange medelpunktsvinkel (håll ned Ctrl för att byta riktning) Specify insertion base point Ange insättningens baspunkt Specify insertion point Ange insättningspunkt Specify inside diameter of donut Ange ringens innerdiameter @@ -1013,6 +1015,7 @@ Specify leader landing location Ange placering för hänvisningslinjens avsats Specify length for rectangles Ange längd för rektanglar Specify length of chord Ange kordans längd + Specify length of chord (hold Ctrl to switch direction) Ange kordans längd (håll ned Ctrl för att byta riktning) Specify length of segment Ange segmentets längd Specify line width for rectangles Ange linjebredd för rektanglar Specify location for new vertex Ange placering för ny hörnpunkt @@ -1031,6 +1034,7 @@ Specify point on object for second tangent of circle Ange punkt på objektet för cirkelns andra tangent Specify point on side to offset Ange punkt på den sida som ska förskjutas Specify radius of arc Ange bågens radie + Specify radius of arc (hold Ctrl to switch direction) Ange bågens radie (håll ned Ctrl för att byta riktning) Specify radius of circle Ange cirkelns radie Specify rotation angle Ange rotationsvinkel Specify rotation angle of text Ange textens rotationsvinkel diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 8bad4102..3bca4bad 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -1050,6 +1050,7 @@ Specify center of polygon Çokgenin merkezini belirtin Specify center point for circle Dairenin merkez noktasını belirtin Specify center point of arc Yayın merkez noktasını belirtin + Specify center point of arc (hold Ctrl to switch direction) Yayın merkez noktasını belirtin (yönü değiştirmek için Ctrl'yi basılı tutun) Specify center point of array Dizinin merkez noktasını belirtin Specify center point of base Tabanın merkez noktasını belirtin Specify corner of viewport Görünüm penceresinin köşesini belirtin @@ -1088,6 +1089,7 @@ Specify height Yüksekliği belirtin Specify helix height Helezon yüksekliğini belirtin Specify included angle İç açıyı belirtin + Specify included angle (hold Ctrl to switch direction) İç açıyı belirtin (yönü değiştirmek için Ctrl'yi basılı tutun) Specify insertion base point Ekleme taban noktasını belirtin Specify insertion point Ekleme noktasını belirtin Specify inside diameter of donut Halkanın iç çapını belirtin @@ -1096,6 +1098,7 @@ Specify leader landing location Kılavuz bağlantı konumunu belirtin Specify length for rectangles Dikdörtgenler için uzunluğu belirtin Specify length of chord Kirişin uzunluğunu belirtin + Specify length of chord (hold Ctrl to switch direction) Kirişin uzunluğunu belirtin (yönü değiştirmek için Ctrl'yi basılı tutun) Specify length of segment Parçanın uzunluğunu belirtin Specify line width for rectangles Dikdörtgenler için çizgi genişliğini belirtin Specify location for new vertex Yeni köşe noktasının konumunu belirtin @@ -1114,6 +1117,7 @@ Specify point on object for second tangent of circle Dairenin ikinci teğeti için nesne üzerinde nokta belirtin Specify point on side to offset Ötelenecek taraftaki noktayı belirtin Specify radius of arc Yayın yarıçapını belirtin + Specify radius of arc (hold Ctrl to switch direction) Yayın yarıçapını belirtin (yönü değiştirmek için Ctrl'yi basılı tutun) Specify radius of circle Dairenin yarıçapını belirtin Specify rotation angle Döndürme açısını belirtin Specify rotation angle of text Metnin döndürme açısını belirtin diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 4eae7cf3..0f6e16f5 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -909,6 +909,7 @@ Specify center of polygon Укажіть центр багатокутника Specify center point for circle Укажіть центр кола Specify center point of arc Укажіть центр дуги + Specify center point of arc (hold Ctrl to switch direction) Укажіть центр дуги (утримуйте Ctrl для зміни напрямку) Specify center point of array Укажіть центр масиву Specify center point of base Укажіть центр основи Specify corner of viewport Укажіть кут видового екрана @@ -947,6 +948,7 @@ Specify height Укажіть висоту Specify helix height Укажіть висоту спіралі Specify included angle Укажіть кут між сторонами + Specify included angle (hold Ctrl to switch direction) Укажіть кут між сторонами (утримуйте Ctrl для зміни напрямку) Specify insertion base point Укажіть базову точку вставлення Specify insertion point Укажіть точку вставлення # Options dialog (OPTIONS). @@ -1020,6 +1022,7 @@ Specify leader landing location Укажіть розташування полиці виноски Specify length for rectangles Укажіть довжину прямокутників Specify length of chord Укажіть довжину хорди + Specify length of chord (hold Ctrl to switch direction) Укажіть довжину хорди (утримуйте Ctrl для зміни напрямку) Specify length of segment Укажіть довжину сегмента Specify line width for rectangles Укажіть ширину ліній прямокутників Specify location for new vertex Укажіть розташування нової вершини @@ -1038,6 +1041,7 @@ Specify point on object for second tangent of circle Укажіть точку на об'єкті для другої дотичної кола Specify point on side to offset Укажіть точку з боку зміщення Specify radius of arc Укажіть радіус дуги + Specify radius of arc (hold Ctrl to switch direction) Укажіть радіус дуги (утримуйте Ctrl для зміни напрямку) Specify radius of circle Укажіть радіус кола Specify rotation angle Укажіть кут повороту Specify rotation angle of text Укажіть кут повороту тексту diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 1d2535a8..4e5f5d52 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -887,6 +887,7 @@ Specify center of polygon Chỉ định tâm đa giác Specify center point for circle Chỉ định tâm đường tròn Specify center point of arc Chỉ định tâm cung + Specify center point of arc (hold Ctrl to switch direction) Chỉ định tâm cung (giữ Ctrl để đổi hướng) Specify center point of array Chỉ định tâm mảng Specify center point of base Chỉ định tâm của đáy Specify corner of viewport Chỉ định góc của khung nhìn @@ -925,6 +926,7 @@ Specify height Chỉ định chiều cao Specify helix height Chỉ định chiều cao đường xoắn ốc Specify included angle Chỉ định góc chắn của cung + Specify included angle (hold Ctrl to switch direction) Chỉ định góc chắn của cung (giữ Ctrl để đổi hướng) Specify insertion base point Chỉ định điểm gốc chèn Specify insertion point Chỉ định điểm chèn A drawing opened from a file keeps that file's format. Bản vẽ mở từ một tệp sẽ giữ nguyên định dạng của tệp đó. @@ -968,6 +970,7 @@ Specify leader landing location Chỉ định vị trí đoạn ngang của đường dẫn ghi chú Specify length for rectangles Chỉ định chiều dài cho hình chữ nhật Specify length of chord Chỉ định độ dài dây cung + Specify length of chord (hold Ctrl to switch direction) Chỉ định độ dài dây cung (giữ Ctrl để đổi hướng) Specify length of segment Chỉ định chiều dài đoạn Specify line width for rectangles Chỉ định bề rộng đường cho hình chữ nhật Specify location for new vertex Chỉ định vị trí cho đỉnh mới @@ -986,6 +989,7 @@ Specify point on object for second tangent of circle Chỉ định điểm trên đối tượng cho tiếp tuyến thứ hai của đường tròn Specify point on side to offset Chỉ định điểm ở phía cần offset Specify radius of arc Chỉ định bán kính của cung + Specify radius of arc (hold Ctrl to switch direction) Chỉ định bán kính của cung (giữ Ctrl để đổi hướng) Specify radius of circle Chỉ định bán kính đường tròn Specify rotation angle Chỉ định góc xoay Specify rotation angle of text Chỉ định góc xoay của chữ diff --git a/crates/ui-egui/src/i18n/zh.tsv b/crates/ui-egui/src/i18n/zh.tsv index fbc82c6d..f1883ea3 100644 --- a/crates/ui-egui/src/i18n/zh.tsv +++ b/crates/ui-egui/src/i18n/zh.tsv @@ -771,6 +771,7 @@ Specify center of polygon 指定多边形中心 Specify center point for circle 指定圆的圆心 Specify center point of arc 指定圆弧的中心点 + Specify center point of arc (hold Ctrl to switch direction) 指定圆弧的中心点(按住 Ctrl 切换方向) Specify center point of array 指定阵列中心点 Specify center point of base 指定基准中心点 Specify corner of viewport 指定视口角点 @@ -809,6 +810,7 @@ Specify height 指定高度 Specify helix height Specify helix height Specify included angle 指定夹角 + Specify included angle (hold Ctrl to switch direction) 指定夹角(按住 Ctrl 切换方向) Specify insertion base point 指定插入基点 Specify insertion point 指定插入点 Specify inside diameter of donut 指定圆环内径 @@ -817,6 +819,7 @@ Specify leader landing location 指定引线尾巴位置 Specify length for rectangles 指定矩形长度 Specify length of chord 指定弦长 + Specify length of chord (hold Ctrl to switch direction) 指定弦长(按住 Ctrl 切换方向) Specify length of segment 指定段长 Specify line width for rectangles 指定矩形线宽 Specify location for new vertex 指定新顶点位置 @@ -835,6 +838,7 @@ Specify point on object for second tangent of circle 在对象上指定圆的第二条切线点 Specify point on side to offset 指定要偏移在哪一侧的点 Specify radius of arc 指定圆弧半径 + Specify radius of arc (hold Ctrl to switch direction) 指定圆弧半径(按住 Ctrl 切换方向) Specify radius of circle 指定圆半径 Specify rotation angle 指定旋转角度 Specify rotation angle of text 指定文字旋转角度 diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 95c28780..6652d306 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -305,6 +305,9 @@ pub struct CadApp { pub raise_panel: Option, /// One synthetic batch has been put into `RawInput` and is waiting for a real `App::ui` call. synthetic_injected: bool, + /// Modifiers the control channel holds down (`ui.modifiers`): a synthetic move goes back to + /// these instead of letting go of everything. + pub(crate) synthetic_held: egui::Modifiers, /// Counts settled UI passes (one per painted frame; never hidden logic-only ticks or /// discarded passes). pub ui_frames: u64, @@ -390,6 +393,7 @@ impl CadApp { restore_modifiers: None, raise_panel: None, synthetic_injected: false, + synthetic_held: egui::Modifiers::NONE, ui_frames: 0, #[cfg(not(target_arch = "wasm32"))] frame_cap: None, @@ -814,10 +818,11 @@ impl CadApp { if let Some(egui::Event::PointerMoved(p) | egui::Event::PointerButton { pos: p, .. }) = self.synthetic.first() { raw.events.push(egui::Event::PointerMoved(*p)); } - // A synthetic click holds its Shift/Ctrl (Shift+click a grip); the next move lets go. + // A synthetic click holds its Shift/Ctrl (Shift+click a grip); the next move lets go, + // back to what `ui.modifiers` holds down. match self.synthetic.first() { - Some(egui::Event::PointerButton { modifiers, .. }) => raw.events.push(egui::Event::ModifiersChanged(*modifiers)), - Some(egui::Event::PointerMoved(_)) => raw.events.push(egui::Event::ModifiersChanged(egui::Modifiers::default())), + Some(egui::Event::PointerButton { modifiers, .. }) => raw.events.push(egui::Event::ModifiersChanged(*modifiers | self.synthetic_held)), + Some(egui::Event::PointerMoved(_)) => raw.events.push(egui::Event::ModifiersChanged(self.synthetic_held)), _ => {} } let n = n.min(self.synthetic.len()); diff --git a/docs/control-protocol.md b/docs/control-protocol.md index c60faaf7..1c8fe3f9 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -57,6 +57,7 @@ field. `engine.commands` returns a separate command catalog, not a list of addit | `ui.click` / `ui.move` | `{x, y, button?, shift?, ctrl?}` | Real egui pointer events in screen points (reach every widget). | | `ui.drag` | `{x, y, to: [x, y], button?}` | Real press, move and release (drag the command line's top edge, the ViewCube ring…). | | `ui.key` / `ui.text` | `{key, cmd?, shift?, alt?}` / `{text}` | Synthetic keyboard input. | +| `ui.modifiers` | `{ctrl?, cmd?, shift?, alt?}` | Holds these modifier keys until the next call; all false releases them (e.g. ARC's "hold Ctrl to switch direction"). | | `ui.set` | UiState fields | Show/hide palettes, the ribbon (`showToolbar`), command line, ViewCube…; `theme: "system"\|"light"\|"dark"` (also `engine.execute` with `ui.theme {theme}`); `ui.inspect` reports the theme shown (`theme`: light/dark). `animations: "system"\|"on"\|"off"` (also `ui.animations {animations}`) shows or hides animation effects (dialog and menu fades, smoothed scrolling), `system` following the operating system's setting; `ui.inspect` reports whether they show (`animations`: true/false). `saveFormat: "dxf"\|"dwg"` (also `ui.saveformat {format}`) is the format Save As suggests for new drawings; `saveVersion: "2000"`…`"2018"` (also `ui.saveversion {version}`) the version it saves them in (SAVEAS also takes `version` and `binary` directly). | | `ui.resize` | `{width, height}` | Resize the window. | | `ui.focus` | | Activate the native window. Does not assign focus to a widget. |