fix(xref): blocks respect their internal draw order

Xref merge now inserts entities in the source block's chain order and
carries SortEntitiesTable objects across (remapped to merged handles).
draw_depth_map values become [depth, half] so exploded block/xref fills
and wide-polyline band wires both compose child depth as
insert_depth + in-block rank x half, recursing into nested inserts with
the same divisor - bands and fills from one block interleave by the
block's internal order instead of stacking at the insert's single depth.
Band batches split per rank via WireModel.depth_override; thin wires
stay merged. The wire arena falls back to a full rebuild when a slab
carries mixed depths so refreshes don't flatten band overrides.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Fable 5 committed 2026-07-21 15:53:28 +03:00
1 parent 1546c1dc30
commit e177f92ff5
48 files changed
+337 -50

No files matched your search

+2
View File
@@ -188,6 +188,7 @@ impl CadCommand for AlignedDimensionCommand {
Some(WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
@@ -241,6 +242,7 @@ fn preview_aligned(p1: DVec3, p2: DVec3, dim_pt: DVec3) -> WireModel {
WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -132,6 +132,7 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -182,6 +182,7 @@ fn preview_line(a: Vec3, b: Vec3) -> WireModel {
WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -181,6 +181,7 @@ impl CadCommand for DimBaselineCommand {
Some(WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -161,6 +161,7 @@ impl CadCommand for DimContinueCommand {
Some(WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -87,6 +87,7 @@ impl CadCommand for DimJogLineCommand {
Some(WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -102,6 +102,7 @@ impl CadCommand for DimTeditCommand {
Some(WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -165,6 +165,7 @@ fn preview_wire(pts: &[Vec3]) -> WireModel {
WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -220,6 +220,7 @@ fn preview_wire(points: Vec<DVec3>) -> WireModel {
WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -152,6 +152,7 @@ fn preview_wire(pts: &[Vec3]) -> WireModel {
WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -460,6 +460,7 @@ fn preview_wire(pts: &[Vec3]) -> WireModel {
WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -123,6 +123,7 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -92,6 +92,7 @@ impl CadCommand for QdimCommand {
Some(WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -187,6 +187,7 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -141,6 +141,7 @@ impl CadCommand for TableCommand {
Some(WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),
+1
View File
@@ -86,6 +86,7 @@ impl CadCommand for ToleranceCommand {
Some(WireModel {
taper_widths: Vec::new(),
world_width: 0.0,
depth_override: None,
fill_is_3d: false,
pick_tris: Vec::new(),
pick_tris_low: Vec::new(),