fix: render wipeout fills after wire pass so they correctly mask wires
Previously wipeout solid fills were part of the hatch pass (pass 1), drawn before wires (pass 5), so all wires appeared on top of the wipeout. This fix moves wipeout fills into a dedicated pass 6 that runs after wires, so the background-colored polygon correctly covers the lines/text beneath it — matching AutoCAD behaviour. - Scene.wipeout_models() separated from synced_hatch_models() - Primitive.wipeout_hatches populated via wipeout_models() - Pipeline.gpu_wipeouts + upload_wipeouts() + pass 6 after wires Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
efc259fdbe
commit
c184535d5e
3 changed files with 63 additions and 5 deletions
|
|
@ -1249,15 +1249,18 @@ impl Scene {
|
|||
}
|
||||
}
|
||||
|
||||
// ── Wipeout solid fills ───────────────────────────────────────────────
|
||||
// Wipeouts are rendered as background-colored filled polygons so that
|
||||
// they mask hatch fills drawn earlier in the same pass.
|
||||
// Wipeout fills are appended last so they render on top of other hatches.
|
||||
models
|
||||
}
|
||||
|
||||
/// Wipeout fill models — rendered in a separate pass AFTER wires so that
|
||||
/// wipeouts correctly mask everything below them in the draw order.
|
||||
pub(super) fn wipeout_models(&self) -> Vec<HatchModel> {
|
||||
let bg_color: [f32; 4] = if self.current_layout == "Model" {
|
||||
self.bg_color
|
||||
} else {
|
||||
self.paper_bg_color
|
||||
};
|
||||
let mut models = Vec::new();
|
||||
for entity in self.document.entities() {
|
||||
let EntityType::Wipeout(wo) = entity else { continue };
|
||||
if entity.common().invisible {
|
||||
|
|
@ -1286,7 +1289,6 @@ impl Scene {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
models
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue