feat(plot): complete plot workflow

This commit is contained in:
Hakan Seven committed 2026-07-31 12:06:12 +03:00
1 parent eb0861cf6e
commit bd1b5b4293
14 files changed
+1141 -541

No files matched your search

+15
View File
@@ -3159,6 +3159,7 @@ impl Scene {
pattern: crate::scene::model::hatch_model::HatchPattern::Solid,
name: "SOLID".to_string(),
color: self.paper_bg_color,
aci: 0,
angle_offset: 0.0,
scale: 1.0,
// Draw-order bias is signed: entity fills/wires land in (-1, 1)
@@ -4823,6 +4824,20 @@ impl Scene {
self.entity_wires_arc()
}
/// Return paper entities and projected model-viewport entities separately.
/// Keeping the two groups distinct lets non-GPU plotters honor the requested
/// paper/model draw order.
pub fn plot_wire_groups(&self) -> (Vec<WireModel>, Vec<WireModel>) {
if self.current_layout == "Model" {
return (self.entity_wires_arc().as_ref().clone(), Vec::new());
}
let paper_block = self.current_layout_block_handle();
(
self.paper_sheet_wires_arc().as_ref().clone(),
self.viewport_content_wires(paper_block, None, None),
)
}
/// 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