forked from 1b-agent/opencadstudio-upstream
refactor(modules): rename home module to draw, restore first-tab order
The Home tab was already titled "Draw"; rename the module to match:
folder modules/home → modules/draw, HomeModule → DrawModule, id "home"
→ "draw". The inner draw/ command folder is kept (modules::draw::draw).
Update build.rs PRIORITY ("home" → "draw") so the tab returns to the
front of the ribbon; registry.rs regenerates accordingly.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
c6152ef705
commit
3666c7fa69
85 files changed
+141
-141
No files matched your search
@@ -38,7 +38,7 @@ impl CadModule for AnnotateModule {
|
||||
}
|
||||
|
||||
fn ribbon_groups(&self) -> Vec<RibbonGroup> {
|
||||
use crate::modules::home::draw::{revcloud, wipeout};
|
||||
use crate::modules::draw::draw::{revcloud, wipeout};
|
||||
|
||||
vec![
|
||||
// ── Text ─────────────────────────────────────────────────────
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -12,7 +12,7 @@ use acadrust::types::Vector3;
|
||||
use acadrust::{Circle, EntityType};
|
||||
|
||||
use crate::command::{CadCommand, CmdResult, DynField, TangentObject};
|
||||
use crate::modules::home::defaults;
|
||||
use crate::modules::draw::defaults;
|
||||
use crate::modules::IconKind;
|
||||
use crate::scene::model::wire_model::WireModel;
|
||||
use glam::Vec3;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
|
||||
// Home module — Draw, Modify, Annotation and Layer tools.
|
||||
// Draw module — Draw, Modify, Annotation and Layer tools.
|
||||
|
||||
mod about;
|
||||
mod changelog;
|
||||
@@ -16,11 +16,11 @@ pub mod select;
|
||||
|
||||
use crate::modules::{CadModule, RibbonGroup, RibbonItem};
|
||||
|
||||
pub struct HomeModule;
|
||||
pub struct DrawModule;
|
||||
|
||||
impl CadModule for HomeModule {
|
||||
impl CadModule for DrawModule {
|
||||
fn id(&self) -> &'static str {
|
||||
"home"
|
||||
"draw"
|
||||
}
|
||||
fn title(&self) -> &'static str {
|
||||
"Draw"
|
||||
@@ -220,7 +220,7 @@ impl CadModule for HomeModule {
|
||||
],
|
||||
},
|
||||
// Support group lives on the Start tab now (see view.rs:
|
||||
// start_page_view). Removed from the Home ribbon to declutter.
|
||||
// start_page_view). Removed from the Draw ribbon to declutter.
|
||||
]
|
||||
}
|
||||
}
|
||||
File renamed without changes.
@@ -17,7 +17,7 @@ use acadrust::Handle;
|
||||
use glam::Vec3;
|
||||
|
||||
use crate::command::{CadCommand, CmdResult, EntityTransform};
|
||||
use crate::modules::home::defaults;
|
||||
use crate::modules::draw::defaults;
|
||||
use crate::modules::IconKind;
|
||||
use crate::scene::model::wire_model::WireModel;
|
||||
|
||||
File renamed without changes.
@@ -7,7 +7,7 @@
|
||||
//
|
||||
// BREAK @ (at-sign as second point) → Break at a single point (splits without gap).
|
||||
|
||||
use crate::modules::home::modify::spline_ops::{
|
||||
use crate::modules::draw::modify::spline_ops::{
|
||||
bspline_to_spline, spline_nearest_t, spline_to_bspline,
|
||||
};
|
||||
use acadrust::entities::{
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -17,7 +17,7 @@ use glam::Vec3;
|
||||
const TAU: f64 = std::f64::consts::TAU;
|
||||
|
||||
use crate::command::{CadCommand, CmdResult};
|
||||
use crate::modules::home::defaults;
|
||||
use crate::modules::draw::defaults;
|
||||
use crate::modules::IconKind;
|
||||
use crate::scene::model::wire_model::WireModel;
|
||||
|
||||
File renamed without changes.
@@ -7,7 +7,7 @@
|
||||
//
|
||||
// The entity is modified at whichever end is closest to the pick point.
|
||||
|
||||
use crate::modules::home::modify::spline_ops::{bspline_to_spline, spline_to_bspline};
|
||||
use crate::modules::draw::modify::spline_ops::{bspline_to_spline, spline_to_bspline};
|
||||
use acadrust::entities::{
|
||||
Arc as ArcEnt, Ellipse as EllipseEnt, Line as LineEnt, LwPolyline, Spline as SplineEnt,
|
||||
};
|
||||
File renamed without changes.
File renamed without changes.
@@ -11,7 +11,7 @@
|
||||
|
||||
use std::f64::consts::TAU;
|
||||
|
||||
use crate::modules::home::modify::spline_ops::{spline_pts_wire, spline_sample_xy};
|
||||
use crate::modules::draw::modify::spline_ops::{spline_pts_wire, spline_sample_xy};
|
||||
use acadrust::entities::LwVertex;
|
||||
use acadrust::entities::{
|
||||
Arc as ArcEnt, Circle as CircleEnt, Ellipse as EllipseEnt, Line as LineEnt, LwPolyline,
|
||||
@@ -21,7 +21,7 @@ use acadrust::{EntityType, Handle};
|
||||
use glam::Vec3;
|
||||
|
||||
use crate::command::{CadCommand, CmdResult};
|
||||
use crate::modules::home::defaults;
|
||||
use crate::modules::draw::defaults;
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
use crate::scene::model::wire_model::WireModel;
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -10,7 +10,7 @@ use acadrust::Handle;
|
||||
use glam::Vec3;
|
||||
|
||||
use crate::command::{CadCommand, CmdResult, DynField, EntityTransform};
|
||||
use crate::modules::home::defaults;
|
||||
use crate::modules::draw::defaults;
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
use crate::scene::model::wire_model::WireModel;
|
||||
|
||||
@@ -16,7 +16,7 @@ use acadrust::Handle;
|
||||
use glam::Vec3;
|
||||
|
||||
use crate::command::{CadCommand, CmdResult, EntityTransform};
|
||||
use crate::modules::home::defaults;
|
||||
use crate::modules::draw::defaults;
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
use crate::scene::model::wire_model::WireModel;
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -20,7 +20,7 @@ use glam::Vec3;
|
||||
use truck_modeling::base::{BoundedCurve, Cut, ParametricCurve};
|
||||
|
||||
use crate::command::{CadCommand, CmdResult};
|
||||
use crate::modules::home::modify::spline_ops::{
|
||||
use crate::modules::draw::modify::spline_ops::{
|
||||
bspline_to_spline, spline_nearest_t, spline_pts_wire, spline_sample_xy, spline_to_bspline,
|
||||
t_to_rel,
|
||||
};
|
||||
@@ -281,7 +281,7 @@ fn build_geos(entities: &[EntityType]) -> Vec<Geo> {
|
||||
| EntityType::Polyline(_)
|
||||
| EntityType::Polyline2D(_)
|
||||
| EntityType::Polyline3D(_) => {
|
||||
for seg in crate::modules::home::modify::explode::explode_polyline_segments(e) {
|
||||
for seg in crate::modules::draw::modify::explode::explode_polyline_segments(e) {
|
||||
if let Some(g) = geo_from_entity(h, &seg) {
|
||||
out.push(g);
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -25,7 +25,7 @@ pub use ocs_plugin_api::ribbon::{
|
||||
// ── Module declarations ───────────────────────────────────────────────────
|
||||
|
||||
pub mod annotate;
|
||||
pub mod home;
|
||||
pub mod draw;
|
||||
pub mod insert;
|
||||
pub mod model;
|
||||
pub mod layout;
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::modules::CadModule;
|
||||
/// Called once at startup by `Ribbon::new()`.
|
||||
pub fn all_modules() -> Vec<Box<dyn CadModule>> {
|
||||
vec![
|
||||
Box::new(super::home::HomeModule),
|
||||
Box::new(super::draw::DrawModule),
|
||||
Box::new(super::model::ModelModule),
|
||||
Box::new(super::insert::InsertModule),
|
||||
Box::new(super::annotate::AnnotateModule),
|
||||
|
||||
Reference in new issue
Block a user