fix(plot): honor wipeout draw order

This commit is contained in:
Hakan Seven committed 2026-08-22 15:33:43 +03:00
1 parent cfbf3233be
commit e5b84ab8de
5 files changed
+129 -37

No files matched your search

+8
View File
@@ -5454,6 +5454,14 @@ impl Scene {
(self.paper_sheet_wires_arc().as_ref().clone(), model_wires)
}
pub(crate) fn plot_wire_depths(&self, wires: &[WireModel]) -> Vec<f32> {
let depths = self.draw_depth_map();
wires
.iter()
.map(|wire| pipeline::wire_gpu::wire_draw_depth(wire, depths.as_ref()))
.collect()
}
/// Per-entity stable draw-order depth, keyed by entity handle value.
/// A full build assigns sparse labels in effective draw order. Incremental
/// Add/Remove then changes only the named handle: existing siblings retain
+2 -2
View File
@@ -354,7 +354,7 @@ impl Scene {
/// needs the equivalent paper-space geometry explicitly.
pub fn viewport_plot_fills(
&self,
) -> (Vec<WireModel>, Vec<HatchModel>, Vec<HatchModel>) {
) -> (Vec<(WireModel, f32)>, Vec<HatchModel>, Vec<HatchModel>) {
use acadrust::entities::Viewport;
use model::hatch_model::HatchPattern;
@@ -478,7 +478,7 @@ impl Scene {
wire.aci = hatch.aci;
wire.line_weight_px = hatch.line_weight_px;
wire.aabb = aabb;
pattern_wires.push(wire);
pattern_wires.push((wire, hatch.draw_depth));
}
continue;
}