feat: redesign Annotate ribbon tab with proper groups and SVG icons

Added 15 SVG icons for all annotation tools (dimensions, leaders,
table, wipeout, revision cloud, tolerance, ddedit).

Annotate ribbon now has 6 groups matching standard CAD layout:
- Text: MText (large dropdown) + Text + Edit Text
- Dimensions: Linear (large dropdown with 6 types) + Continue + Baseline + Tolerance
- Leaders: Multileader (large dropdown) + Leader
- Tables: Table (large)
- Markup: Wipeout + Rev Cloud
- Annotation Scaling: Scale List, Add Scale, Scale Edit, Sync Scales

Added pub tool() + ICON to all annotate tools that were missing them
(aligned_dim, diameter_dim, dim_continue, dim_baseline, table_cmd,
tolerance_cmd, ddedit), and to home/draw/wipeout and revcloud.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-04-09 03:03:08 +03:00
commit 510bcf11e5
31 changed files with 362 additions and 16 deletions

11
assets/icons/ddedit.svg Normal file
View file

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Text lines -->
<line x1="4" y1="7" x2="16" y2="7" stroke="#e0e0e0" stroke-width="1.5" stroke-linecap="round"/>
<line x1="4" y1="11" x2="16" y2="11" stroke="#e0e0e0" stroke-width="1.5" stroke-linecap="round"/>
<line x1="4" y1="15" x2="11" y2="15" stroke="#e0e0e0" stroke-width="1.5" stroke-linecap="round"/>
<!-- Edit pencil -->
<line x1="15" y1="18" x2="20" y2="13" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<line x1="15" y1="18" x2="13" y2="20" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<polygon points="20,13 18,11 16,13 18,15" fill="#4cc9f0"/>
<line x1="13" y1="20" x2="12" y2="21" stroke="#e0e0e0" stroke-width="1" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 796 B

View file

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Diagonal measured object -->
<line x1="4" y1="20" x2="16" y2="8" stroke="#e0e0e0" stroke-width="1.5" stroke-linecap="round"/>
<!-- Extension lines (perpendicular to object) -->
<line x1="4" y1="20" x2="1" y2="17" stroke="#e0e0e0" stroke-width="1" stroke-dasharray="1,1"/>
<line x1="16" y1="8" x2="13" y2="5" stroke="#e0e0e0" stroke-width="1" stroke-dasharray="1,1"/>
<!-- Aligned dimension line -->
<line x1="2" y1="18" x2="14" y2="6" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<polygon points="2,18 4.5,16.5 3.5,14.5" fill="#4cc9f0"/>
<polygon points="14,6 11.5,7.5 12.5,9.5" fill="#4cc9f0"/>
</svg>

After

Width:  |  Height:  |  Size: 726 B

View file

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Two lines forming an angle -->
<line x1="4" y1="20" x2="20" y2="20" stroke="#e0e0e0" stroke-width="1.5" stroke-linecap="round"/>
<line x1="4" y1="20" x2="14" y2="6" stroke="#e0e0e0" stroke-width="1.5" stroke-linecap="round"/>
<!-- Arc dimension -->
<path d="M 16 20 A 12 12 0 0 0 10.8 10.4" stroke="#4cc9f0" stroke-width="1.5" fill="none" stroke-linecap="round"/>
<!-- Arrow at arc end -->
<polygon points="10.8,10.4 13.2,11.2 11.6,13" fill="#4cc9f0"/>
<!-- Angle label -->
<text x="17" y="16" font-size="4.5" fill="#4cc9f0" font-family="monospace"></text>
</svg>

After

Width:  |  Height:  |  Size: 674 B

View file

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Base line -->
<line x1="2" y1="19" x2="22" y2="19" stroke="#e0e0e0" stroke-width="1.5" stroke-linecap="round"/>
<!-- Baseline point -->
<circle cx="4" cy="19" r="1.2" fill="#4cc9f0"/>
<!-- Extension lines -->
<line x1="12" y1="19" x2="12" y2="14" stroke="#e0e0e0" stroke-width="1" stroke-dasharray="1,1"/>
<line x1="18" y1="19" x2="18" y2="10" stroke="#e0e0e0" stroke-width="1" stroke-dasharray="1,1"/>
<!-- Dimension lines from baseline -->
<line x1="4" y1="15" x2="12" y2="15" stroke="#4cc9f0" stroke-width="1.3" stroke-linecap="round"/>
<polygon points="12,15 9.5,13.7 9.5,16.3" fill="#4cc9f0"/>
<line x1="4" y1="11" x2="18" y2="11" stroke="#4cc9f0" stroke-width="1.3" stroke-linecap="round"/>
<polygon points="18,11 15.5,9.7 15.5,12.3" fill="#4cc9f0"/>
</svg>

After

Width:  |  Height:  |  Size: 877 B

View file

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Base line -->
<line x1="2" y1="17" x2="22" y2="17" stroke="#e0e0e0" stroke-width="1.5" stroke-linecap="round"/>
<!-- Extension lines -->
<line x1="6" y1="17" x2="6" y2="11" stroke="#e0e0e0" stroke-width="1" stroke-dasharray="1,1"/>
<line x1="12" y1="17" x2="12" y2="11" stroke="#e0e0e0" stroke-width="1" stroke-dasharray="1,1"/>
<line x1="18" y1="17" x2="18" y2="11" stroke="#e0e0e0" stroke-width="1" stroke-dasharray="1,1"/>
<!-- Dimension lines -->
<line x1="6" y1="12" x2="12" y2="12" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<polygon points="6,12 8.5,10.7 8.5,13.3" fill="#4cc9f0"/>
<polygon points="12,12 9.5,10.7 9.5,13.3" fill="#4cc9f0"/>
<line x1="12" y1="12" x2="18" y2="12" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<polygon points="18,12 15.5,10.7 15.5,13.3" fill="#4cc9f0"/>
</svg>

After

Width:  |  Height:  |  Size: 949 B

View file

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Circle -->
<circle cx="12" cy="12" r="8" stroke="#e0e0e0" stroke-width="1.5" fill="none"/>
<!-- Diameter line with arrows -->
<line x1="4" y1="12" x2="20" y2="12" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<polygon points="4,12 7,10.5 7,13.5" fill="#4cc9f0"/>
<polygon points="20,12 17,10.5 17,13.5" fill="#4cc9f0"/>
<!-- Ø label -->
<text x="9" y="8.5" font-size="4.5" fill="#4cc9f0" font-family="monospace"></text>
</svg>

After

Width:  |  Height:  |  Size: 551 B

View file

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Measured object -->
<line x1="4" y1="18" x2="20" y2="18" stroke="#e0e0e0" stroke-width="1.5" stroke-linecap="round"/>
<!-- Extension lines -->
<line x1="4" y1="18" x2="4" y2="10" stroke="#e0e0e0" stroke-width="1" stroke-dasharray="1,1" stroke-linecap="round"/>
<line x1="20" y1="18" x2="20" y2="10" stroke="#e0e0e0" stroke-width="1" stroke-dasharray="1,1" stroke-linecap="round"/>
<!-- Dimension line with arrows -->
<line x1="4" y1="11" x2="20" y2="11" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<polygon points="4,11 7,9.5 7,12.5" fill="#4cc9f0"/>
<polygon points="20,11 17,9.5 17,12.5" fill="#4cc9f0"/>
<!-- Dimension text -->
<text x="12" y="9" text-anchor="middle" font-size="4" fill="#4cc9f0" font-family="monospace">12.5</text>
</svg>

After

Width:  |  Height:  |  Size: 871 B

View file

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Measured point -->
<circle cx="5" cy="16" r="1.5" fill="#4cc9f0"/>
<!-- Leader lines (L-shaped) -->
<line x1="5" y1="16" x2="5" y2="7" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<line x1="5" y1="7" x2="16" y2="7" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<!-- Axis indicator -->
<line x1="3" y1="20" x2="3" y2="4" stroke="#e0e0e0" stroke-width="1" stroke-dasharray="2,1"/>
<line x1="2" y1="20" x2="22" y2="20" stroke="#e0e0e0" stroke-width="1" stroke-dasharray="2,1"/>
<!-- Label -->
<text x="17" y="9" font-size="4" fill="#4cc9f0" font-family="monospace">Y</text>
</svg>

After

Width:  |  Height:  |  Size: 718 B

View file

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Circle -->
<circle cx="12" cy="13" r="8" stroke="#e0e0e0" stroke-width="1.5" fill="none"/>
<!-- Radius line with arrow -->
<line x1="12" y1="13" x2="19" y2="7" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<polygon points="19,7 16.2,8.8 17.5,11.2" fill="#4cc9f0"/>
<!-- R label -->
<text x="5" y="8" font-size="5" fill="#4cc9f0" font-family="monospace" font-weight="bold">R</text>
</svg>

After

Width:  |  Height:  |  Size: 506 B

9
assets/icons/leader.svg Normal file
View file

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Leader lines (bent) -->
<line x1="4" y1="19" x2="12" y2="10" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<line x1="12" y1="10" x2="20" y2="10" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<!-- Arrowhead -->
<polygon points="4,19 7.5,18 6.5,15.5" fill="#4cc9f0"/>
<!-- Simple text label -->
<text x="12" y="8.5" font-size="4" fill="#e0e0e0" font-family="monospace">text</text>
</svg>

After

Width:  |  Height:  |  Size: 519 B

11
assets/icons/mleader.svg Normal file
View file

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Leader line -->
<line x1="4" y1="18" x2="14" y2="10" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<line x1="14" y1="10" x2="21" y2="10" stroke="#4cc9f0" stroke-width="1.5" stroke-linecap="round"/>
<!-- Arrowhead -->
<polygon points="4,18 7.5,17 6.5,14.5" fill="#4cc9f0"/>
<!-- Text box -->
<rect x="14" y="6" width="8" height="8" rx="1" stroke="#4cc9f0" stroke-width="1" fill="none"/>
<line x1="15" y1="9" x2="21" y2="9" stroke="#e0e0e0" stroke-width="0.8"/>
<line x1="15" y1="11" x2="19" y2="11" stroke="#e0e0e0" stroke-width="0.8"/>
</svg>

After

Width:  |  Height:  |  Size: 665 B

20
assets/icons/revcloud.svg Normal file
View file

@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Cloud-like arc sequence forming a rectangle cloud -->
<path d="
M 4 12
Q 4 8, 7 8
Q 7 5, 10 5
Q 10 3, 14 3
Q 14 5, 17 5
Q 17 8, 20 8
Q 20 12, 20 15
Q 17 15, 17 18
Q 14 18, 14 20
Q 10 20, 10 18
Q 7 18, 7 15
Q 4 15, 4 12
Z
" stroke="#4cc9f0" stroke-width="1.5" fill="none" stroke-linejoin="round"/>
<!-- Arrow indicating cloud direction -->
<polygon points="4,12 7,11 6,14" fill="#4cc9f0"/>
</svg>

After

Width:  |  Height:  |  Size: 547 B

13
assets/icons/table.svg Normal file
View file

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Table outline -->
<rect x="3" y="4" width="18" height="16" rx="1" stroke="#4cc9f0" stroke-width="1.5" fill="none"/>
<!-- Header row fill -->
<rect x="3" y="4" width="18" height="4" rx="1" fill="#4cc9f0" fill-opacity="0.3"/>
<!-- Horizontal dividers -->
<line x1="3" y1="8" x2="21" y2="8" stroke="#4cc9f0" stroke-width="1"/>
<line x1="3" y1="12" x2="21" y2="12" stroke="#e0e0e0" stroke-width="0.8"/>
<line x1="3" y1="16" x2="21" y2="16" stroke="#e0e0e0" stroke-width="0.8"/>
<!-- Vertical dividers -->
<line x1="9" y1="4" x2="9" y2="20" stroke="#e0e0e0" stroke-width="0.8"/>
<line x1="15" y1="4" x2="15" y2="20" stroke="#e0e0e0" stroke-width="0.8"/>
</svg>

After

Width:  |  Height:  |  Size: 769 B

View file

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- GD&T frame box -->
<rect x="2" y="8" width="20" height="8" rx="0.5" stroke="#4cc9f0" stroke-width="1.5" fill="none"/>
<!-- Vertical dividers -->
<line x1="8" y1="8" x2="8" y2="16" stroke="#4cc9f0" stroke-width="1"/>
<line x1="14" y1="8" x2="14" y2="16" stroke="#4cc9f0" stroke-width="1"/>
<!-- Symbols -->
<text x="4" y="14.5" font-size="6" fill="#e0e0e0" font-family="monospace" text-anchor="middle"></text>
<text x="11" y="14" font-size="4.5" fill="#e0e0e0" font-family="monospace" text-anchor="middle">0.1</text>
<text x="17" y="14" font-size="5" fill="#e0e0e0" font-family="monospace" text-anchor="middle">A</text>
<!-- Leader/datum triangle -->
<polygon points="12,4 10,8 14,8" fill="#4cc9f0"/>
</svg>

After

Width:  |  Height:  |  Size: 821 B

11
assets/icons/wipeout.svg Normal file
View file

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="64" height="64">
<!-- Background area being masked -->
<line x1="4" y1="6" x2="20" y2="6" stroke="#555" stroke-width="1" stroke-dasharray="1.5,1.5"/>
<line x1="4" y1="10" x2="20" y2="10" stroke="#555" stroke-width="1" stroke-dasharray="1.5,1.5"/>
<line x1="4" y1="14" x2="20" y2="14" stroke="#555" stroke-width="1" stroke-dasharray="1.5,1.5"/>
<line x1="4" y1="18" x2="20" y2="18" stroke="#555" stroke-width="1" stroke-dasharray="1.5,1.5"/>
<!-- Wipeout polygon (covers the background) -->
<polygon points="6,7 18,7 18,17 6,17" fill="#1a1a1a" stroke="#4cc9f0" stroke-width="1.5"/>
<!-- Wipeout border -->
<polygon points="6,7 18,7 18,17 6,17" fill="none" stroke="#4cc9f0" stroke-width="1.5"/>
</svg>

After

Width:  |  Height:  |  Size: 785 B

View file

@ -6,8 +6,20 @@ use acadrust::EntityType;
use glam::Vec3;
use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/dim_aligned.svg"));
pub fn tool() -> ToolDef {
ToolDef {
id: "DIMALIGNED",
label: "Aligned",
icon: ICON,
event: ModuleEvent::Command("DIMALIGNED".to_string()),
}
}
enum Step {
First,
Second(Vec3),

View file

@ -7,7 +7,7 @@ use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
use glam::Vec3;
pub const ICON: IconKind = IconKind::Glyph("");
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/dim_angular.svg"));
pub fn tool() -> ToolDef {
ToolDef {

View file

@ -8,6 +8,18 @@ use acadrust::{EntityType, Handle};
use glam::Vec3;
use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/ddedit.svg"));
pub fn tool() -> ToolDef {
ToolDef {
id: "DDEDIT",
label: "Edit Text",
icon: ICON,
event: ModuleEvent::Command("DDEDIT".to_string()),
}
}
enum DdeditStep {
PickEntity,

View file

@ -6,8 +6,20 @@ use acadrust::EntityType;
use glam::Vec3;
use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/dim_diameter.svg"));
pub fn tool() -> ToolDef {
ToolDef {
id: "DIMDIAMETER",
label: "Diameter",
icon: ICON,
event: ModuleEvent::Command("DIMDIAMETER".to_string()),
}
}
enum Step {
CenterPoint,
ArcPoint(Vec3),

View file

@ -12,8 +12,20 @@ use acadrust::EntityType;
use glam::Vec3;
use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/dim_baseline.svg"));
pub fn tool() -> ToolDef {
ToolDef {
id: "DIMBASELINE",
label: "Baseline",
icon: ICON,
event: ModuleEvent::Command("DIMBASELINE".to_string()),
}
}
/// Default stacking increment (world units) between successive baseline dimensions.
const DIMDLI: f32 = 1.5;

View file

@ -12,8 +12,20 @@ use acadrust::EntityType;
use glam::Vec3;
use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/dim_continue.svg"));
pub fn tool() -> ToolDef {
ToolDef {
id: "DIMCONTINUE",
label: "Continue",
icon: ICON,
event: ModuleEvent::Command("DIMCONTINUE".to_string()),
}
}
pub struct DimContinueCommand {
/// Fixed first-extension-line origin for the current step (moves each iteration).
chain_p1: Vec3,

View file

@ -15,7 +15,7 @@ use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
pub const ICON: IconKind = IconKind::Glyph("");
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/leader.svg"));
pub fn tool() -> ToolDef {
ToolDef {

View file

@ -7,7 +7,7 @@ use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
use glam::Vec3;
pub const ICON: IconKind = IconKind::Glyph("");
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/dim_linear.svg"));
pub fn tool() -> ToolDef {
ToolDef {

View file

@ -14,7 +14,7 @@ use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
pub const ICON: IconKind = IconKind::Glyph("");
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/mleader.svg"));
pub fn tool() -> ToolDef {
ToolDef {

View file

@ -1,4 +1,4 @@
// Annotate module — dimension and text annotation tools.
// Annotate module — dimension, text, leader, table, and markup tools.
pub mod aligned_dim;
pub mod angular_dim;
@ -29,54 +29,110 @@ impl CadModule for AnnotateModule {
}
fn ribbon_groups(&self) -> Vec<RibbonGroup> {
use crate::modules::home::draw::{wipeout, revcloud};
vec![
// ── Text ─────────────────────────────────────────────────────
RibbonGroup {
title: "Text",
tools: vec![
RibbonItem::LargeDropdown {
id: "ANNOTATE_TEXT",
label: "Text",
icon: text::ICON,
icon: mtext::ICON,
items: vec![
(text::tool().id, text::tool().label, text::tool().icon),
(mtext::tool().id, mtext::tool().label, mtext::tool().icon),
(text::tool().id, text::tool().label, text::tool().icon),
(ddedit::tool().id, ddedit::tool().label, ddedit::tool().icon),
],
default: "TEXT",
default: "MTEXT",
},
],
},
// ── Dimensions ───────────────────────────────────────────────
RibbonGroup {
title: "Dimensions",
tools: vec![
RibbonItem::LargeDropdown {
id: "ANNOTATE_DIM",
label: "Dimensions",
label: "Dimension",
icon: linear_dim::ICON,
items: vec![
(linear_dim::tool().id, linear_dim::tool().label, linear_dim::tool().icon),
(radius_dim::tool().id, radius_dim::tool().label, radius_dim::tool().icon),
(linear_dim::tool().id, linear_dim::tool().label, linear_dim::tool().icon),
(aligned_dim::tool().id, aligned_dim::tool().label, aligned_dim::tool().icon),
(angular_dim::tool().id, angular_dim::tool().label, angular_dim::tool().icon),
(radius_dim::tool().id, radius_dim::tool().label, radius_dim::tool().icon),
(diameter_dim::tool().id, diameter_dim::tool().label, diameter_dim::tool().icon),
(ordinate_dim::tool().id, ordinate_dim::tool().label, ordinate_dim::tool().icon),
],
default: "DIMLINEAR",
},
RibbonItem::Tool(dim_continue::tool()),
RibbonItem::Tool(dim_baseline::tool()),
RibbonItem::Tool(tolerance_cmd::tool()),
],
},
// ── Leaders ──────────────────────────────────────────────────
RibbonGroup {
title: "Leaders",
tools: vec![
RibbonItem::LargeDropdown {
id: "ANNOTATE_LEADER",
label: "Leader",
icon: leader_cmd::ICON,
label: "Multileader",
icon: mleader_cmd::ICON,
items: vec![
(mleader_cmd::tool().id, mleader_cmd::tool().label, mleader_cmd::tool().icon),
(leader_cmd::tool().id, leader_cmd::tool().label, leader_cmd::tool().icon),
(leader_cmd::tool().id, leader_cmd::tool().label, leader_cmd::tool().icon),
],
default: "MLEADER",
},
],
},
// ── Tables ───────────────────────────────────────────────────
RibbonGroup {
title: "Tables",
tools: vec![
RibbonItem::LargeTool(table_cmd::tool()),
],
},
// ── Markup ───────────────────────────────────────────────────
RibbonGroup {
title: "Markup",
tools: vec![
RibbonItem::Tool(wipeout::tool()),
RibbonItem::Tool(revcloud::tool()),
],
},
// ── Annotation Scaling ───────────────────────────────────────
RibbonGroup {
title: "Annotation Scaling",
tools: vec![
RibbonItem::Tool(crate::modules::ToolDef {
id: "ANNOSCALE",
label: "Scale List",
icon: crate::modules::IconKind::Glyph(""),
event: crate::modules::ModuleEvent::Command("ANNOSCALE".to_string()),
}),
RibbonItem::Tool(crate::modules::ToolDef {
id: "OBJECTSCALE",
label: "Add Scale",
icon: crate::modules::IconKind::Glyph(""),
event: crate::modules::ModuleEvent::Command("OBJECTSCALE".to_string()),
}),
RibbonItem::Tool(crate::modules::ToolDef {
id: "SCALELISTEDIT",
label: "Scale Edit",
icon: crate::modules::IconKind::Glyph(""),
event: crate::modules::ModuleEvent::Command("SCALELISTEDIT".to_string()),
}),
RibbonItem::Tool(crate::modules::ToolDef {
id: "SYNCPVIEWPORTS",
label: "Sync Scales",
icon: crate::modules::IconKind::Glyph(""),
event: crate::modules::ModuleEvent::Command("SYNCPVIEWPORTS".to_string()),
}),
],
},
]
}
}

View file

@ -21,7 +21,7 @@ pub fn tool() -> ToolDef {
ToolDef {
id: "DIMORDINATE",
label: "Ordinate",
icon: IconKind::Glyph("Φ"),
icon: IconKind::Svg(include_bytes!("../../../assets/icons/dim_ordinate.svg")),
event: ModuleEvent::Command("DIMORDINATE".to_string()),
}
}

View file

@ -7,7 +7,7 @@ use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
use glam::Vec3;
pub const ICON: IconKind = IconKind::Glyph("");
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/dim_radius.svg"));
pub fn tool() -> ToolDef {
ToolDef {

View file

@ -13,8 +13,20 @@ use acadrust::EntityType;
use glam::Vec3;
use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/table.svg"));
pub fn tool() -> ToolDef {
ToolDef {
id: "TABLE",
label: "Table",
icon: ICON,
event: ModuleEvent::Command("TABLE".to_string()),
}
}
const DEFAULT_COLS: usize = 3;
const DEFAULT_ROWS: usize = 4;
const COL_WIDTH: f64 = 2.0;

View file

@ -10,8 +10,20 @@ use acadrust::EntityType;
use glam::Vec3;
use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/tolerance.svg"));
pub fn tool() -> ToolDef {
ToolDef {
id: "TOLERANCE",
label: "Tolerance",
icon: ICON,
event: ModuleEvent::Command("TOLERANCE".to_string()),
}
}
enum Step {
Text,
Insertion { text: String },

View file

@ -10,8 +10,20 @@ use acadrust::{EntityType, entities::LwVertex};
use glam::Vec3;
use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../../assets/icons/revcloud.svg"));
pub fn tool() -> ToolDef {
ToolDef {
id: "REVCLOUD",
label: "Rev Cloud",
icon: ICON,
event: ModuleEvent::Command("REVCLOUD".to_string()),
}
}
const DEFAULT_ARC_LEN: f64 = 1.0; // default arc bump length
pub struct RevCloudCommand {

View file

@ -10,8 +10,20 @@ use acadrust::EntityType;
use glam::Vec3;
use crate::command::{CadCommand, CmdResult};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::wire_model::WireModel;
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../../assets/icons/wipeout.svg"));
pub fn tool() -> ToolDef {
ToolDef {
id: "WIPEOUT",
label: "Wipeout",
icon: ICON,
event: ModuleEvent::Command("WIPEOUT".to_string()),
}
}
pub struct WipeoutCommand {
mode: WipeoutMode,
first: Option<Vec3>,