feat: expose Ray in the Draw expansion

This commit is contained in:
ramox81 committed 2026-09-10 15:57:19 +03:00
1 parent b19992cbcb
commit cc503f1847
3 files changed
+10 -3

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="Ray" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 20L21 3" stroke="#B4B6B9" stroke-width="1.6"/><path d="M16 3h5v5" stroke="#6DB7ED" stroke-width="1.6"/><path d="M2 18h4v4H2z" fill="#6DB7ED" stroke="none"/>
</svg>

After

Width:  |  Height:  |  Size: 326 B

+1 -3
View File
@@ -61,9 +61,7 @@ impl CadCommand for RayCommand {
Vector3::new(base.x, base.y, base.z),
Vector3::new(dir_n.x, dir_n.y, dir_n.z),
);
// Stay active: new base = same base (can keep clicking through points)
// Actually AutoCAD prompts for new start after each ray — reset base.
self.base = None;
// Repeated through points share the original start point.
CmdResult::CommitEntity(EntityType::Ray(ray))
} else {
self.base = Some(pt);
+6
View File
@@ -0,0 +1,6 @@
Tool {
command: "RAY",
label: "Ray",
icon: include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/icons/ray.svg")),
options: &[],
}