From dc83a3e5fa1e8d2e3cc2cf980efd9a4b0214fc0d Mon Sep 17 00:00:00 2001 From: ramox81 <184937705+ramox81@users.noreply.github.com> Date: Thu, 10 Sep 2026 15:55:07 +0300 Subject: [PATCH] feat: expose Construction Line in the Draw expansion --- assets/icons/xline.svg | 3 +++ src/modules/draw/draw/ray.rs | 1 - src/ui/ribbon/draw_tools/03_xline.rs | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 assets/icons/xline.svg create mode 100644 src/ui/ribbon/draw_tools/03_xline.rs diff --git a/assets/icons/xline.svg b/assets/icons/xline.svg new file mode 100644 index 000000000..7b02665ef --- /dev/null +++ b/assets/icons/xline.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/modules/draw/draw/ray.rs b/src/modules/draw/draw/ray.rs index 0b349b42e..4d976acd9 100644 --- a/src/modules/draw/draw/ray.rs +++ b/src/modules/draw/draw/ray.rs @@ -167,7 +167,6 @@ impl CadCommand for XLineCommand { Vector3::new(base.x, base.y, base.z), Vector3::new(dir_n.x, dir_n.y, dir_n.z), ); - self.base = None; CmdResult::CommitEntity(EntityType::XLine(xline)) } else { self.base = Some(pt); diff --git a/src/ui/ribbon/draw_tools/03_xline.rs b/src/ui/ribbon/draw_tools/03_xline.rs new file mode 100644 index 000000000..65e5138f8 --- /dev/null +++ b/src/ui/ribbon/draw_tools/03_xline.rs @@ -0,0 +1,6 @@ +Tool { + command: "XLINE", + label: "Construction Line", + icon: include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/icons/xline.svg")), + options: &[], +}