Merge remote-tracking branch 'origin/main' into codex/attdef-parity

# Conflicts:
#	Cargo.lock
#	src/modules/draw/draw/attdef.rs
This commit is contained in:
ramox81 committed 2026-10-02 09:09:21 +03:00
commit 53f2983e9c
77 files changed
+4034 -243

No files matched your search

+6 -2
View File
@@ -366,7 +366,9 @@ impl CadCommand for AlignedDimensionCommand {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
})
..Default::default()
})
}
fn dyn_spec(&self) -> Option<crate::command::DynSpec> {
@@ -482,7 +484,9 @@ fn preview_aligned(p1: DVec3, p2: DVec3, dim_pt: DVec3) -> WireModel {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
+3 -1
View File
@@ -1275,7 +1275,9 @@ fn preview_wire(points: Vec<DVec3>) -> WireModel {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
inventory::submit!(crate::command::CommandRegistration { names: &["DIMANGULAR"] });
+4 -2
View File
@@ -134,7 +134,9 @@ impl DataLinkPlaceCommand {
plinegen: true,
fill_tris: Vec::new(),
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
}
@@ -160,7 +162,7 @@ impl CadCommand for DataLinkPlaceCommand {
self.table.insertion_point = codec::types::Vector3::new(point.x, point.y, point.z);
CmdResult::CommitAndExit(
self.plane
.place_entity(EntityType::Table(self.table.clone())),
.place_entity(EntityType::Table(Box::new(self.table.clone()))),
)
}
+3 -1
View File
@@ -364,7 +364,9 @@ fn preview_line(far_chord: Vec3, chord: Vec3, text: Vec3) -> WireModel {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
inventory::submit!(crate::command::CommandRegistration { names: &["DIMDIAMETER"] });
+3 -1
View File
@@ -755,7 +755,9 @@ fn preview_for_dimension(dimension: &Dimension) -> WireModel {
plinegen: true,
fill_tris: Vec::new(),
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
fn linear_preview(
+3 -1
View File
@@ -506,7 +506,9 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
plinegen: true,
fill_tris: Vec::new(),
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
inventory::submit!(crate::command::CommandRegistration {
+3 -1
View File
@@ -470,7 +470,9 @@ fn preview_wire(pts: &[Vec3], arrow_size: f32) -> WireModel {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
pub fn arrowhead_wings(tip: Vec3, next: Vec3, size: f32) -> [Vec3; 2] {
+3 -1
View File
@@ -590,7 +590,9 @@ fn preview_wire(points: Vec<DVec3>) -> WireModel {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
/// Project the two extension origins onto the dimension line, which passes
+4 -2
View File
@@ -269,7 +269,7 @@ impl MLeaderCommand {
ml.text_style_handle = style_handle;
ml.context.text_style_handle = style_handle;
}
let entity = self.plane.place_entity(EntityType::MultiLeader(ml));
let entity = self.plane.place_entity(EntityType::MultiLeader(Box::new(ml)));
if self.content_type == LeaderContentType::MText && self.text.is_empty() {
CmdResult::CommitAndEditText(entity)
} else {
@@ -799,7 +799,9 @@ fn preview_wire(pts: &[Vec3], arrow_size: f32) -> WireModel {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
fn arrowhead_wings(tip: Vec3, next: Vec3, size: f32) -> [Vec3; 2] {
+3 -1
View File
@@ -523,7 +523,9 @@ fn preview_wire(pts: &[Vec3]) -> WireModel {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
fn point_segment_distance_xy(point: Vector3, start: Vector3, end: Vector3) -> f64 {
+3 -1
View File
@@ -315,7 +315,9 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
+3 -1
View File
@@ -376,7 +376,9 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
inventory::submit!(crate::command::CommandRegistration { names: &["DIMRADIUS"] });
+5 -3
View File
@@ -271,7 +271,7 @@ impl TableCommand {
row.style = Some(styles[row_index.min(2)].clone());
}
}
self.plane.place_entity(EntityType::Table(table))
self.plane.place_entity(EntityType::Table(Box::new(table)))
}
fn preview_grid(
@@ -341,7 +341,9 @@ impl TableCommand {
plinegen: true,
fill_tris: Vec::new(),
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
}
@@ -795,7 +797,7 @@ impl CadCommand for TableCellEditCommand {
cell.set_text(&formatted);
self.table.block_record_handle = None;
Some(CmdResult::ReplaceMany(
vec![(self.handle, vec![EntityType::Table(self.table.clone())])],
vec![(self.handle, vec![EntityType::Table(Box::new(self.table.clone()))])],
Vec::new(),
))
}
+3 -1
View File
@@ -114,7 +114,9 @@ impl CadCommand for ToleranceCommand {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
})
..Default::default()
})
}
}
+1 -1
View File
@@ -139,7 +139,7 @@ impl HelixCommand {
helix.turn_height = if curve.turns == 0.0 { 0.0 } else { height / curve.turns };
helix.handedness = self.counter_clockwise;
helix.constraint = self.constraint;
Some(EntityType::Helix(helix))
Some(EntityType::Helix(Box::new(helix)))
}
fn commit(&mut self, height: f64, axis: DVec3) -> CmdResult {
+3 -1
View File
@@ -213,7 +213,9 @@ impl MlineCommand {
plinegen: true,
fill_tris,
fill_tris_low,
})
..Default::default()
})
}
}
+3 -1
View File
@@ -202,7 +202,9 @@ impl CadCommand for ImageCommand {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
})
..Default::default()
})
}
}
+6 -2
View File
@@ -119,7 +119,9 @@ impl CadCommand for RayCommand {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
})
..Default::default()
})
}
}
@@ -408,7 +410,9 @@ impl CadCommand for XLineCommand {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
})
..Default::default()
})
}
}
+3 -1
View File
@@ -401,7 +401,9 @@ impl CadCommand for AreaCommand {
plinegen: true,
fill_tris: Vec::new(),
fill_tris_low: Vec::new(),
})
..Default::default()
})
}
fn area_preview_regions(&self) -> Option<Vec<AreaPreviewRegion>> {
+3 -1
View File
@@ -124,7 +124,9 @@ impl CadCommand for DistCommand {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
})
..Default::default()
})
}
}
+3 -1
View File
@@ -103,7 +103,9 @@ impl MeasureGeomCommand {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
/// Extract (radius) from a Circle or Arc; `None` for anything else.
+2 -1
View File
@@ -75,7 +75,8 @@ impl ReverseCommand {
}
EntityType::Spline(sp) => Some(EntityType::Spline(reverse_spline(sp))),
EntityType::Helix(helix) => {
crate::entities::helix::reversed(helix).map(EntityType::Helix)
crate::entities::helix::reversed(helix)
.map(|helix| EntityType::Helix(Box::new(helix)))
}
_ => None,
}
+3 -1
View File
@@ -4870,7 +4870,9 @@ fn preview_wire(points: Vec<[f32; 3]>, color: [f32; 4], name: &str) -> WireModel
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
/// Insert the exact boundary crossings between consecutive samples so a
+5 -2
View File
@@ -117,7 +117,10 @@ impl PointCloudCropCommand {
if let ExtendedEntityData::PointCloudEx(data) = &mut cloud.data {
change(data);
}
CmdResult::UpdateEntityAndFinish { handle: self.handle, entity: EntityType::Extended(cloud) }
CmdResult::UpdateEntityAndFinish {
handle: self.handle,
entity: EntityType::Extended(Box::new(cloud)),
}
}
fn axes(data: &PointCloudExData) -> glam::DMat3 {
@@ -296,7 +299,7 @@ impl CadCommand for PointCloudCropCommand {
match self.picked.take() {
Some(EntityType::Extended(cloud)) if matches!(cloud.data, ExtendedEntityData::PointCloudEx(_)) => {
self.handle = handle;
self.cloud = Some(cloud);
self.cloud = Some(*cloud);
if self.uncrop {
return self.finish(|data| data.croppings.clear());
}
+3 -3
View File
@@ -2793,7 +2793,7 @@ pub fn empty_extruded_surface(direction: DVec3, taper_angle: f64) -> EntityType
options.is_solid = false;
*sweep_vector = Vector3::new(direction.x, direction.y, direction.z);
}
EntityType::Surface(surface)
EntityType::Surface(Box::new(surface))
}
pub fn empty_revolved_surface(
@@ -2832,7 +2832,7 @@ pub fn empty_revolved_surface(
*stored_start = start_angle;
*solid = false;
}
EntityType::Surface(surface)
EntityType::Surface(Box::new(surface))
}
// ── Autocomplete registry ─────────────────────────────────
@@ -2909,7 +2909,7 @@ mod thicken_command_tests {
let handle = Handle::new(42);
let mut command = ThickenCommand::new(vec![
(Handle::new(1), EntityType::Line(codec::entities::Line::default())),
(handle, EntityType::Surface(codec::entities::Surface::new(codec::entities::SurfaceKind::Plane))),
(handle, EntityType::Surface(Box::new(codec::entities::Surface::new(codec::entities::SurfaceKind::Plane)))),
]);
assert!(!command.is_selection_gathering());
assert_eq!(command.handles, vec![handle]);
+3 -1
View File
@@ -3710,5 +3710,7 @@ fn wire(name: &str, points: Vec<[f32; 3]>) -> WireModel {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
..Default::default()
}
}
+1 -1
View File
@@ -172,7 +172,7 @@ impl SectionPlaneCommand {
self.kind == SectionKind::Slice,
depth,
);
EntityType::Extended(entity)
EntityType::Extended(Box::new(entity))
}
fn line_at(&self, point: DVec3, viewing: DVec3, vertical_hint: DVec3) -> (Vec<DVec3>, DVec3) {
+3 -1
View File
@@ -96,7 +96,9 @@ impl CadCommand for PlotWindowCommand {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
})
..Default::default()
})
}
}
+3 -1
View File
@@ -175,6 +175,8 @@ impl CadCommand for ZoomWindowCommand {
plinegen: true,
fill_tris: vec![],
fill_tris_low: Vec::new(),
})
..Default::default()
})
}
}