mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-06 23:31:19 +00:00
Belt: stop the purge prism printing plastic no toolchange needs
Two independent leaks of filament on the belt purge prism, plus the replan safety net the second one needs. 1. The early-truncation scan bounded itself with the prism's own toolchanges. ToolOrdering covers the whole print and the prism is a printed object in it, so the "last toolchange" the scan found was on the prism's own top layers -- it runs past every model object by design -- and the truncation cancelled nothing. Bound the scan at the tallest non-prism object (support layers included; on a belt they can top the object). On MCTEST5 that was 197 toolchanges over 39.4 mm of tower that no swap ever needed. 2. On a layer with no toolchange, the prism's entire fill printed as solid infill in its own filament. Drop the fills no toolchange claimed, right after the purge marking and before ensure_perimeters_infills_order() force-overrides whatever is left. Perimeters stay so the bar keeps a continuous wall. An earlier version of this deleted the entities and had to be reverted: psWipeTower can rerun without regenerating infill, and a later tool ordering may claim what this one did not. The entities are now stashed with their layer, region and index and put back exactly, the same reversibility contract layer truncation already had. 3. Both stashes go stale if an object step reruns: make_fills() clears and regenerates fills over m_layers only, so a stale stash would put old fills back next to new ones, and truncated layers would keep old perimeters/fills. Undo the plan's edits at the top of Print::process() whenever psWipeTower is not done. Every object-step invalidation also invalidates psWipeTower, so that condition is exactly "some object step may rerun"; when it is done nothing regenerates and the edits must stay. This also covers a prism left behind after belt mode is turned off, which previously stayed truncated forever. WipingExtrusions::is_entity_overridden() becomes public so the prism can tell claimed fills from unclaimed ones. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SsuY8Laiyh7q2zPVVKV3HZ
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
1b6fb2a81f
commit
1bcfe58064
@@ -1119,6 +1119,13 @@ void PrintObject::clear_layers()
|
||||
for (Layer *l : m_belt_truncated_layers)
|
||||
delete l;
|
||||
m_belt_truncated_layers.clear();
|
||||
// Fills dropped for plastic saving are owned by the stash while they sit
|
||||
// outside their layer's collection, so they are freed here too. Order
|
||||
// matters only in that these point at layers deleted just above, and we
|
||||
// never dereference the layer -- just the entity.
|
||||
for (const BeltDroppedFill &d : m_belt_dropped_fills)
|
||||
delete d.entity;
|
||||
m_belt_dropped_fills.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user