fix(plot): respect non-printing layers

Filter nested block, attribute, table, hatch, and wipeout geometry during export while preserving canvas visibility.
This commit is contained in:
Hakan Seven committed 2026-08-21 18:57:23 +03:00
1 parent eb5cbaeca0
commit 77e1f1b876
10 files changed
+140 -27

No files matched your search

+20 -1
View File
@@ -490,6 +490,7 @@ impl Scene {
None,
self.paper_annotation_scale_handle(),
self.annotation_all_visible(),
false,
))
}
@@ -502,6 +503,7 @@ impl Scene {
frozen: Option<&rustc_hash::FxHashSet<Handle>>,
annotation_scale_handle: Option<Handle>,
all_visible: bool,
include_solids: bool,
) -> Vec<HatchModel> {
let layer_hidden = |layer: &str| {
self.document
@@ -528,6 +530,9 @@ impl Scene {
annotation_scale_handle,
);
let entity = contextual.as_ref();
if !include_solids && matches!(entity, EntityType::Solid(_)) {
continue;
}
let common = entity.common();
if common.invisible
|| self.entity_temporarily_hidden(handle)
@@ -600,6 +605,7 @@ impl Scene {
all_visible,
self.paper_bg_color,
highlight_selection,
true,
)
}
@@ -609,13 +615,26 @@ impl Scene {
/// content viewport's GPU pipeline) don't get a second mis-projected
/// copy on the paper sheet.
pub fn paper_canvas_wipeouts(&self) -> Arc<Vec<HatchModel>> {
let layout_block = self.current_layout_block_handle();
Arc::new(self.wipeout_models_for_block_graph(
layout_block,
None,
self.paper_annotation_scale_handle(),
self.annotation_all_visible(),
self.paper_bg_color,
true,
false,
))
}
pub fn paper_plot_wipeouts(&self) -> Arc<Vec<HatchModel>> {
let layout_block = self.current_layout_block_handle();
Arc::new(self.plot_wipeouts_for_block(
layout_block,
None,
self.paper_annotation_scale_handle(),
self.annotation_all_visible(),
true,
false,
))
}