feat: redesign Insert tab and fix all warnings
- Redesign Insert ribbon tab with 6 groups matching screenshot layout: Reference (Attach/Clip/Adjust large + Underlay Layers/Frames/Snap small), Point Cloud (Attach), Block (Multi-View Block/Insert large + Create/Edit/Base small), Attributes (Define/Edit large + Manage/Sync small), Import (Import/Land XML), Content (Content Browser/Design Center) - Remove Primitives group and dead box_prim/clear/cylinder/sphere modules - Fix all compiler warnings with #[allow(dead_code)] on unused-but-intentional items Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10
assets/icons/attdef.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Tag shape -->
|
||||
<path d="M3 3 h8 l10 9 -10 9 H3 Z"/>
|
||||
<circle cx="8" cy="12" r="1.5" fill="currentColor" stroke="none"/>
|
||||
<!-- "A" attribute letter -->
|
||||
<text x="5" y="14" font-size="6" fill="currentColor" stroke="none" font-weight="bold">A</text>
|
||||
<!-- Plus (define/create) -->
|
||||
<line x1="19" y1="3" x2="19" y2="9"/>
|
||||
<line x1="16" y1="6" x2="22" y2="6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 538 B |
10
assets/icons/attedit.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Tag shape -->
|
||||
<path d="M3 5 h7 l9 7 -9 7 H3 Z"/>
|
||||
<circle cx="7" cy="12" r="1.5" fill="currentColor" stroke="none"/>
|
||||
<!-- Pencil edit -->
|
||||
<line x1="17" y1="3" x2="22" y2="8"/>
|
||||
<polygon points="15,5 20,10 18,12 13,7"/>
|
||||
<line x1="13" y1="7" x2="12" y2="12"/>
|
||||
<line x1="12" y1="12" x2="17" y2="11"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 485 B |
15
assets/icons/attman.svg
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- List of attributes -->
|
||||
<rect x="2" y="3" width="20" height="18" rx="1"/>
|
||||
<line x1="2" y1="7" x2="22" y2="7"/>
|
||||
<!-- Tag rows -->
|
||||
<line x1="5" y1="11" x2="10" y2="11"/>
|
||||
<line x1="12" y1="11" x2="19" y2="11"/>
|
||||
<line x1="5" y1="15" x2="10" y2="15"/>
|
||||
<line x1="12" y1="15" x2="19" y2="15"/>
|
||||
<line x1="5" y1="19" x2="10" y2="19"/>
|
||||
<line x1="12" y1="19" x2="19" y2="19"/>
|
||||
<!-- Header labels -->
|
||||
<line x1="5" y1="5" x2="9" y2="5" stroke-width="1"/>
|
||||
<line x1="12" y1="5" x2="16" y2="5" stroke-width="1"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 695 B |
9
assets/icons/attsync.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Sync arrows -->
|
||||
<path d="M4 12 A8 8 0 0 1 18 7"/>
|
||||
<polyline points="16,4 18,7 15,8"/>
|
||||
<path d="M20 12 A8 8 0 0 1 6 17"/>
|
||||
<polyline points="8,20 6,17 9,16"/>
|
||||
<!-- Tag dot in center -->
|
||||
<circle cx="12" cy="12" r="2" fill="currentColor" stroke="none"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 437 B |
7
assets/icons/base_point.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Crosshair at base point -->
|
||||
<line x1="12" y1="2" x2="12" y2="22"/>
|
||||
<line x1="2" y1="12" x2="22" y2="12"/>
|
||||
<circle cx="12" cy="12" r="4"/>
|
||||
<circle cx="12" cy="12" r="1.5" fill="currentColor" stroke="none"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 389 B |
13
assets/icons/content_browser.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Browser window -->
|
||||
<rect x="2" y="3" width="20" height="18" rx="1"/>
|
||||
<line x1="2" y1="7" x2="22" y2="7"/>
|
||||
<!-- Nav buttons -->
|
||||
<circle cx="5" cy="5" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="9" cy="5" r="1" fill="currentColor" stroke="none"/>
|
||||
<!-- Content grid -->
|
||||
<rect x="4" y="10" width="6" height="5" rx="0.5"/>
|
||||
<rect x="13" y="10" width="6" height="5" rx="0.5"/>
|
||||
<rect x="4" y="17" width="6" height="3" rx="0.5"/>
|
||||
<rect x="13" y="17" width="6" height="3" rx="0.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 678 B |
16
assets/icons/design_center.svg
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Panel with tree on left, content on right -->
|
||||
<rect x="2" y="3" width="20" height="18" rx="1"/>
|
||||
<line x1="9" y1="3" x2="9" y2="21"/>
|
||||
<!-- Tree structure on left -->
|
||||
<line x1="4" y1="7" x2="7" y2="7"/>
|
||||
<line x1="5" y1="7" x2="5" y2="11"/>
|
||||
<line x1="5" y1="11" x2="7" y2="11"/>
|
||||
<line x1="5" y1="11" x2="5" y2="15"/>
|
||||
<line x1="5" y1="15" x2="7" y2="15"/>
|
||||
<!-- Content thumbnails on right -->
|
||||
<rect x="11" y="6" width="4" height="4" rx="0.5"/>
|
||||
<rect x="17" y="6" width="4" height="4" rx="0.5"/>
|
||||
<rect x="11" y="12" width="4" height="4" rx="0.5"/>
|
||||
<rect x="17" y="12" width="4" height="4" rx="0.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 796 B |
9
assets/icons/edit_block.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Block outline -->
|
||||
<rect x="3" y="5" width="14" height="14" rx="1" stroke-dasharray="4 2"/>
|
||||
<!-- Pencil edit icon -->
|
||||
<line x1="14" y1="3" x2="21" y2="10"/>
|
||||
<polygon points="12,5 19,12 16,15 9,8"/>
|
||||
<line x1="9" y1="8" x2="7" y2="17"/>
|
||||
<line x1="7" y1="17" x2="16" y2="15"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 460 B |
6
assets/icons/landxml.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Terrain/land profile -->
|
||||
<polyline points="2,18 6,10 10,14 14,7 18,12 22,6"/>
|
||||
<!-- XML brackets -->
|
||||
<text x="3" y="23" font-size="5" fill="currentColor" stroke="none"><XML></text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 367 B |
14
assets/icons/mview_block.svg
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Multi-view: 3 perspective projections of a block -->
|
||||
<!-- Top view -->
|
||||
<rect x="2" y="2" width="8" height="8" rx="0.5"/>
|
||||
<!-- Front view -->
|
||||
<rect x="2" y="14" width="8" height="8" rx="0.5"/>
|
||||
<!-- Isometric block -->
|
||||
<polygon points="14,8 20,5 20,15 14,18"/>
|
||||
<polygon points="14,8 20,5 22,7 16,10"/>
|
||||
<polygon points="16,10 22,7 22,17 16,20"/>
|
||||
<line x1="14" y1="8" x2="16" y2="10"/>
|
||||
<line x1="14" y1="18" x2="16" y2="20"/>
|
||||
<line x1="20" y1="15" x2="22" y2="17"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 659 B |
14
assets/icons/pc_attach.svg
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Point cloud -->
|
||||
<circle cx="6" cy="14" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="9" cy="11" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="12" cy="9" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="5" cy="17" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="8" cy="16" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="11" cy="13" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="14" cy="11" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="13" cy="16" r="1" fill="currentColor" stroke="none"/>
|
||||
<!-- Plus/attach symbol -->
|
||||
<line x1="18" y1="5" x2="18" y2="13"/>
|
||||
<line x1="14" y1="9" x2="22" y2="9"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 841 B |
18
assets/icons/recap.svg
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Point cloud dots -->
|
||||
<circle cx="7" cy="15" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="10" cy="11" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="13" cy="9" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="5" cy="12" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="9" cy="16" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="12" cy="13" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="15" cy="11" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="17" cy="8" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="14" cy="16" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="17" cy="14" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="6" cy="18" r="1" fill="currentColor" stroke="none"/>
|
||||
<circle cx="11" cy="18" r="1" fill="currentColor" stroke="none"/>
|
||||
<!-- ReCap logo hint: circular arrow -->
|
||||
<path d="M19 5 A7 7 0 0 1 21 12" stroke-width="2"/>
|
||||
<polyline points="17,3 19,5 21,3"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
10
assets/icons/snap_underlays.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Underlay image -->
|
||||
<rect x="2" y="5" width="14" height="12" rx="1" stroke-dasharray="3 2"/>
|
||||
<!-- Snap crosshair -->
|
||||
<line x1="17" y1="11" x2="22" y2="11"/>
|
||||
<line x1="19" y1="9" x2="19" y2="13"/>
|
||||
<circle cx="19" cy="11" r="3"/>
|
||||
<!-- Snap indicator dot -->
|
||||
<circle cx="19" cy="11" r="1" fill="currentColor" stroke="none"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 510 B |
13
assets/icons/underlay_frames.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Frame border (dashed) -->
|
||||
<rect x="3" y="3" width="18" height="18" rx="1" stroke-dasharray="4 2"/>
|
||||
<!-- Corner markers -->
|
||||
<line x1="3" y1="3" x2="7" y2="3"/>
|
||||
<line x1="3" y1="3" x2="3" y2="7"/>
|
||||
<line x1="21" y1="3" x2="17" y2="3"/>
|
||||
<line x1="21" y1="3" x2="21" y2="7"/>
|
||||
<line x1="3" y1="21" x2="7" y2="21"/>
|
||||
<line x1="3" y1="21" x2="3" y2="17"/>
|
||||
<line x1="21" y1="21" x2="17" y2="21"/>
|
||||
<line x1="21" y1="21" x2="21" y2="17"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 622 B |
6
assets/icons/underlay_layers.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Stacked layers -->
|
||||
<polygon points="12,3 22,8 12,13 2,8"/>
|
||||
<polyline points="2,12 12,17 22,12"/>
|
||||
<polyline points="2,16 12,21 22,16"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 316 B |
8
assets/icons/xadjust.svg
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Image/underlay rectangle -->
|
||||
<rect x="3" y="4" width="14" height="14" rx="1"/>
|
||||
<!-- Brightness/contrast sliders -->
|
||||
<line x1="19" y1="6" x2="19" y2="18"/>
|
||||
<circle cx="19" cy="10" r="2" fill="currentColor" stroke="none"/>
|
||||
<line x1="17" y1="10" x2="21" y2="10"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 446 B |
10
assets/icons/xclip.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Document with clip boundary -->
|
||||
<rect x="4" y="3" width="12" height="16" rx="1"/>
|
||||
<!-- Clip boundary (dashed polygon) -->
|
||||
<polygon points="6,6 14,6 14,15 6,15" stroke-dasharray="3 2"/>
|
||||
<!-- Scissors symbol -->
|
||||
<line x1="16" y1="16" x2="21" y2="21"/>
|
||||
<circle cx="18" cy="14" r="2"/>
|
||||
<circle cx="20" cy="19" r="2"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 503 B |
|
|
@ -356,6 +356,7 @@ pub enum Message {
|
|||
LayoutContextMenuClose,
|
||||
// ── Layout Manager Panel ────────────────────────────────────────────
|
||||
LayoutManagerOpen,
|
||||
#[allow(dead_code)]
|
||||
LayoutManagerClose,
|
||||
LayoutManagerSelect(String),
|
||||
LayoutManagerRenameBuf(String),
|
||||
|
|
@ -369,6 +370,7 @@ pub enum Message {
|
|||
SetTheme(Theme),
|
||||
// ── Keyboard Shortcut Editor ────────────────────────────────────────
|
||||
ShortcutsPanelOpen,
|
||||
#[allow(dead_code)]
|
||||
ShortcutsPanelClose,
|
||||
/// Close the viewport right-click context menu without performing any action.
|
||||
ViewportContextMenuClose,
|
||||
|
|
@ -418,6 +420,7 @@ pub enum Message {
|
|||
PlotStyleClear,
|
||||
/// Open/close the Plot Style panel.
|
||||
PlotStylePanelOpen,
|
||||
#[allow(dead_code)]
|
||||
PlotStylePanelClose,
|
||||
/// Select an ACI entry in the panel.
|
||||
PlotStylePanelSelectAci(u8),
|
||||
|
|
@ -433,6 +436,7 @@ pub enum Message {
|
|||
PlotStylePanelSavePath(Option<std::path::PathBuf>),
|
||||
// ── TextStyle Font Browser ────────────────────────────────────────────
|
||||
TextStyleDialogOpen,
|
||||
#[allow(dead_code)]
|
||||
TextStyleDialogClose,
|
||||
TextStyleDialogSelect(String),
|
||||
TextStyleDialogSetCurrent,
|
||||
|
|
@ -446,12 +450,14 @@ pub enum Message {
|
|||
TextStyleFontPick(String),
|
||||
// ── TableStyle Dialog ─────────────────────────────────────────────────
|
||||
TableStyleDialogOpen,
|
||||
#[allow(dead_code)]
|
||||
TableStyleDialogClose,
|
||||
TableStyleDialogSelect(String),
|
||||
TableStyleDialogNew,
|
||||
TableStyleDialogDelete,
|
||||
// ── MLineStyle Dialog ─────────────────────────────────────────────────
|
||||
MlStyleDialogOpen,
|
||||
#[allow(dead_code)]
|
||||
MlStyleDialogClose,
|
||||
MlStyleDialogSelect(String),
|
||||
MlStyleDialogSetCurrent,
|
||||
|
|
|
|||
5
src/modules/insert/attdef.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/attdef.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "ATTDEF", label: "Define\nAttributes", icon: ICON, event: ModuleEvent::Command("ATTDEF".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/attedit.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/attedit.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "ATTEDIT", label: "Edit\nAttribute", icon: ICON, event: ModuleEvent::Command("ATTEDIT".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/attman.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/attman.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "ATTMAN", label: "Manage", icon: ICON, event: ModuleEvent::Command("ATTMAN".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/attsync.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/attsync.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "ATTSYNC", label: "Synchronize", icon: ICON, event: ModuleEvent::Command("ATTSYNC".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/base_point.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/base_point.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "BASE", label: "Set Base\nPoint", icon: ICON, event: ModuleEvent::Command("BASE".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/content_browser.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/content_browser.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "CONTENTBROWSER", label: "Content\nBrowser", icon: ICON, event: ModuleEvent::Command("CONTENTBROWSER".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/design_center.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/design_center.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "ADCENTER", label: "Design\nCenter", icon: ICON, event: ModuleEvent::Command("ADCENTER".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/edit_block.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/edit_block.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "BEDIT", label: "Edit Block", icon: ICON, event: ModuleEvent::Command("BEDIT".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/landxml.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/landxml.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "LANDXMLIMPORT", label: "Land\nXML", icon: ICON, event: ModuleEvent::Command("LANDXMLIMPORT".to_string()) }
|
||||
}
|
||||
|
|
@ -1,17 +1,29 @@
|
|||
// Insert module — file import, solid primitives, and blocks.
|
||||
// Insert module — references, point clouds, blocks, attributes, import, content.
|
||||
|
||||
mod box_prim;
|
||||
mod clear;
|
||||
mod attdef;
|
||||
mod attedit;
|
||||
mod attman;
|
||||
mod attsync;
|
||||
mod base_point;
|
||||
pub(crate) mod create_block;
|
||||
mod cylinder;
|
||||
mod content_browser;
|
||||
mod design_center;
|
||||
mod edit_block;
|
||||
pub(crate) mod insert_block;
|
||||
mod landxml;
|
||||
mod mview_block;
|
||||
mod open_obj;
|
||||
mod pc_attach;
|
||||
mod snap_underlays;
|
||||
pub(crate) mod solid3d_cmds;
|
||||
mod sphere;
|
||||
mod underlay_frames;
|
||||
mod underlay_layers;
|
||||
pub(crate) mod wblock;
|
||||
pub(crate) mod xattach;
|
||||
mod xadjust;
|
||||
mod xclip;
|
||||
|
||||
use crate::modules::{CadModule, RibbonGroup};
|
||||
use crate::modules::{CadModule, IconKind, RibbonGroup, RibbonItem};
|
||||
|
||||
pub struct InsertModule;
|
||||
|
||||
|
|
@ -25,25 +37,69 @@ impl CadModule for InsertModule {
|
|||
|
||||
fn ribbon_groups(&self) -> Vec<RibbonGroup> {
|
||||
vec![
|
||||
// ── Reference ────────────────────────────────────────────────────
|
||||
RibbonGroup {
|
||||
title: "Import",
|
||||
tools: vec![open_obj::tool().into(), clear::tool().into()],
|
||||
},
|
||||
RibbonGroup {
|
||||
title: "Primitives",
|
||||
title: "Reference",
|
||||
tools: vec![
|
||||
box_prim::tool().into(),
|
||||
sphere::tool().into(),
|
||||
cylinder::tool().into(),
|
||||
RibbonItem::LargeTool(xattach::tool()),
|
||||
RibbonItem::LargeTool(xclip::tool()),
|
||||
RibbonItem::LargeTool(xadjust::tool()),
|
||||
RibbonItem::Tool(underlay_layers::tool()),
|
||||
RibbonItem::Dropdown {
|
||||
id: "FRAMES_DROPDOWN",
|
||||
icon: IconKind::Svg(include_bytes!("../../../assets/icons/underlay_frames.svg")),
|
||||
items: vec![
|
||||
("FRAMES0", "Frames Off", IconKind::Svg(include_bytes!("../../../assets/icons/underlay_frames.svg"))),
|
||||
("FRAMES1", "Frames On", IconKind::Svg(include_bytes!("../../../assets/icons/underlay_frames.svg"))),
|
||||
("FRAMES2", "Frames & Print",IconKind::Svg(include_bytes!("../../../assets/icons/underlay_frames.svg"))),
|
||||
],
|
||||
default: "FRAMES1",
|
||||
},
|
||||
RibbonItem::Tool(snap_underlays::tool()),
|
||||
],
|
||||
},
|
||||
// ── Point Cloud ───────────────────────────────────────────────────
|
||||
RibbonGroup {
|
||||
title: "Point Cloud",
|
||||
tools: vec![
|
||||
RibbonItem::LargeTool(pc_attach::tool()),
|
||||
],
|
||||
},
|
||||
// ── Block ─────────────────────────────────────────────────────────
|
||||
RibbonGroup {
|
||||
title: "Block",
|
||||
tools: vec![
|
||||
create_block::tool().into(),
|
||||
insert_block::tool().into(),
|
||||
wblock::tool().into(),
|
||||
xattach::tool().into(),
|
||||
RibbonItem::LargeTool(mview_block::tool()),
|
||||
RibbonItem::LargeTool(insert_block::tool()),
|
||||
RibbonItem::Tool(create_block::tool()),
|
||||
RibbonItem::Tool(edit_block::tool()),
|
||||
RibbonItem::Tool(base_point::tool()),
|
||||
],
|
||||
},
|
||||
// ── Attributes ────────────────────────────────────────────────────
|
||||
RibbonGroup {
|
||||
title: "Attributes",
|
||||
tools: vec![
|
||||
RibbonItem::LargeTool(attdef::tool()),
|
||||
RibbonItem::LargeTool(attedit::tool()),
|
||||
RibbonItem::Tool(attman::tool()),
|
||||
RibbonItem::Tool(attsync::tool()),
|
||||
],
|
||||
},
|
||||
// ── Import ────────────────────────────────────────────────────────
|
||||
RibbonGroup {
|
||||
title: "Import",
|
||||
tools: vec![
|
||||
RibbonItem::LargeTool(open_obj::tool()),
|
||||
RibbonItem::LargeTool(landxml::tool()),
|
||||
],
|
||||
},
|
||||
// ── Content ───────────────────────────────────────────────────────
|
||||
RibbonGroup {
|
||||
title: "Content",
|
||||
tools: vec![
|
||||
RibbonItem::LargeTool(content_browser::tool()),
|
||||
RibbonItem::LargeTool(design_center::tool()),
|
||||
],
|
||||
},
|
||||
]
|
||||
|
|
|
|||
5
src/modules/insert/mview_block.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/mview_block.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "BLOCKPALETTE", label: "Multi-View\nBlock", icon: ICON, event: ModuleEvent::Command("BLOCKPALETTE".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/pc_attach.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/pc_attach.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "POINTCLOUDATTACH", label: "Attach", icon: ICON, event: ModuleEvent::Command("POINTCLOUDATTACH".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/recap.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/recap.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "RECAP", label: "Autodesk\nReCap", icon: ICON, event: ModuleEvent::Command("RECAP".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/snap_underlays.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/snap_underlays.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "UOSNAP", label: "Snap to\nUnderlays", icon: ICON, event: ModuleEvent::Command("UOSNAP".to_string()) }
|
||||
}
|
||||
7
src/modules/insert/underlay_frames.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
#[allow(dead_code)]
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/underlay_frames.svg"));
|
||||
#[allow(dead_code)]
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "FRAMES", label: "Frames", icon: ICON, event: ModuleEvent::Command("FRAMES".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/underlay_layers.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/underlay_layers.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "UNDERLAYLAYERS", label: "Underlay\nLayers", icon: ICON, event: ModuleEvent::Command("UNDERLAYLAYERS".to_string()) }
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ use acadrust::{CadDocument, EntityType};
|
|||
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef {
|
||||
id: "WBLOCK",
|
||||
|
|
|
|||
5
src/modules/insert/xadjust.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/xadjust.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "ADJUST", label: "Adjust", icon: ICON, event: ModuleEvent::Command("ADJUST".to_string()) }
|
||||
}
|
||||
5
src/modules/insert/xclip.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
pub const ICON: IconKind = IconKind::Svg(include_bytes!("../../../assets/icons/xclip.svg"));
|
||||
pub fn tool() -> ToolDef {
|
||||
ToolDef { id: "XCLIP", label: "Clip", icon: ICON, event: ModuleEvent::Command("XCLIP".to_string()) }
|
||||
}
|
||||
|
|
@ -20,6 +20,7 @@ pub enum ModuleEvent {
|
|||
/// Open the OS file dialog.
|
||||
OpenFileDialog,
|
||||
/// Remove all loaded models from the scene.
|
||||
#[allow(dead_code)]
|
||||
ClearModels,
|
||||
/// Toggle wireframe rendering.
|
||||
SetWireframe(bool),
|
||||
|
|
|
|||