Files
flush-fidget/recon/grok-flush-into-object.md
Fred Book 7439b38601 Record the flush-into-object trace.
Phase 1 recon only. No slicer code.
2026-10-04 17:33:00 -05:00

8.8 KiB
Raw Blame History

Flush into an object — Grok

Read-only trace of the existing flush-into-infill / support / this-object feature. Source: fred/OrcaSlicer main at b6d11b2b3aaa39b28d8ee0e577617da7171ad94d (shallow clone, 2026-10-04). No slice was run.

Answer

Purge is not a new path. Orca reassigns whole existing extrusion islands to the new filament, and credits their volume against the flush the matrix asked for. Anything those islands cannot hold is still wasted. On a Bambu profile the leftover becomes poop, and the prime tower still prints. The feature cannot turn the tower off, and it never extrudes extra plastic into the cube's gaps.

Where it is routed

VERIFIED. The three flags live on PrintObjectConfig (src/libslic3r/PrintConfig.hpp 1259–1262).

Flag Default What it may recolor
flush_into_infill off Sparse internal infill only (erInternalInfill)
flush_into_support on Support and support interface, if those are not locked to a support filament
flush_into_objects off Every non-soluble island on that object, walls included

VERIFIED. Labels and the "needs a prime tower" tooltips: src/libslic3r/PrintConfig.cpp 7891–7909. VERIFIED. "Flush into this object" is hidden on the global process page and shown on the object: src/slic3r/GUI/ConfigManipulation.cpp 1119, src/slic3r/GUI/GUI_Factories.cpp 94. The other two are on the global Flush options page (src/slic3r/GUI/Tab.cpp 3139–3142) and apply as the object default.

VERIFIED. Nothing is marked unless a wipe tower is actually built:

  1. Print::has_wipe_tower() (src/libslic3r/Print.cpp 4500–4511) requires enable_prime_tower, more than one filament, and not spiral vase (timelapse or wrapping detection can also force it).
  2. The UI disables all three flags when the tower is off (ConfigManipulation.cpp 1103–1104).
  3. Print::_make_wipe_tower() returns before any marking if the tool ordering has no tower (Print.cpp 4555–4557). Layers with has_wipe_tower == false are skipped (Print.cpp 4678 and 4835).

VERIFIED. The marker is WipingExtrusions::mark_wiping_extrusions (src/libslic3r/GCode/ToolOrdering.cpp 3356–3492). It walks objects, then copies, then regions. Objects with flush_into_objects are sorted first (3371–3377). It assigns the new filament to a whole ExtrusionEntityCollection and subtracts total_volume() (ExtrusionEntity.hpp 307: mm³ per mm times path length). At G-code time those overrides replace the island's filament (src/libslic3r/GCode.cpp 6231–6243).

PROMPT.md guessed WipeTower.cpp / WipeTower2.cpp. VERIFIED those files exist. They plan the tower that receives the leftover. They do not choose which object islands get the purge.

What limits how much a layer absorbs

VERIFIED, all in mark_wiping_extrusions and is_overriddable unless noted.

  • The budget for one filament change is the flush-matrix cell times the flush multiplier. Default multiplier is 0.3 (PrintConfig.cpp 7699–7703). Fast prime mode uses flush_multiplier_fast instead, default 1.2 (Print.cpp 4702–4705, PrintConfig.cpp 7708–7711). A profile can override either. Which profile this project uses is UNVERIFIED.
  • Only existing paths count. There is no extra extrusion into infill gaps, joints, or empty space. A layer can absorb at most the volume of the islands it is allowed to recolor.
  • Islands are taken whole or not at all. min_infill_volume is 0 (ToolOrdering.cpp 3359), so a tiny island is eligible, and the last island can overshoot the budget. The function then returns 0, meaning "nothing left for the tower/poop," even though the island was bigger than the need.
  • An island already used by an earlier change on that layer is skipped (is_entity_overridden, 3425). Later changes on the same layer only get what is left.
  • flush_into_infill refuses anything whose collection role is not erInternalInfill (ToolOrdering.cpp 3329). Solid infill, top, bottom, bridges, gap fill, ironing, and walls do not count (ExtrusionEntity.hpp 26–48). A walls-only layer absorbs nothing from this flag.
  • flush_into_objects accepts every non-soluble collection, then marks both fills and perimeters (ToolOrdering.cpp 3326–3327, 3413–3446). That is the switch that puts purge color on the outer wall.
  • If outer-wall and inner-wall filaments differ, perimeter collections are split and the override is not applied (GCode.cpp 6269–6291). Defaults keep those filaments the same. Whether the cube will is UNVERIFIED.
  • Soluble filament on either side of the change: absorb nothing (ToolOrdering.cpp 3361–3362). Support filament (filament_is_support) on either side: absorb nothing (3365–3366).
  • flush_into_support is all-or-nothing per object for support, and again for interface (ToolOrdering.cpp 3451–3486). A dedicated support filament blocks that part (is_support_overriddable, 3336–3351).
  • Infill-only mode, when infill is not printed first, skips the infill unless the new filament is ordered after the wall filament (ToolOrdering.cpp 3419–3423).
  • After every change on the layer, ensure_perimeters_infills_order (ToolOrdering.cpp 3501–3557) may still recolor leftover islands on a flush object so walls and infill stay in a legal order. That second pass is not charged against the flush budget. It mixes more color onto the object. It does not absorb more purge.

Leftover still goes to waste, and the tower stays

Two generators. Which one runs depends on the printer.

VERIFIED. A Bambu vendor preset forces tower Type 1 (src/slic3r/GUI/BackgroundSlicingProcess.cpp 723, Print.hpp 1203). On that path (Print.cpp 4594–4732):

  • The full flush budget is offered to objects. filament_minimal_purge_on_wipe_tower is not reserved.
  • grab_length * 2.4 mm³ is then subtracted from the remainder (Print.cpp 4713–4716).
  • The tower's own extrusion is the prime volume, not the leftover flush (WipeTower.cpp plan_toolchange 3116–3174: depth comes from wipe_volume, which is filament_prime_volume or prime_volume). Default prime_volume is 45 mm³ (PrintConfig.cpp 7713–7720). Saving mode forces both prime candidates to 15 mm³ (Print.cpp 4726–4728).
  • The remainder is stored as purge_volume and becomes the change_filament_gcode poop (GCode.cpp 1259–1261). If the remainder is above zero, it is raised to at least 100 mm³ (g_min_purge_volume, GCode.cpp 145). A fully absorbed change poops nothing.

VERIFIED. Any other printer uses wipe_tower_type, default Type 2 (PrintConfig.cpp 6747–6756). Marking runs only when purge_in_prime_tower and single_extruder_multi_material are both on (both default on: PrintConfig.cpp 6733–6737 and 6758–6762; call site Print.cpp 4843–4855). On that path the minimal purge (default 15 mm³, PrintConfig.cpp 3223–3232) is kept on the tower and only the rest is offered to objects. The tower is planned with that sum, so it never drops below the minimum.

UNVERIFIED. Which printer this project will slice with. The success test's "Flushed + Tower" split matches the Type 1 accounting. Fred's printer profile was not opened.

What this means for the three options

Not a design. Consequences of the trace above.

  1. No code, cube set to "Flush into this object." VERIFIED from this trace: not enough to meet the success test on its own. The tower cannot be disabled while the feature is on, and Type 1 still primes every change. Poop goes to zero only on layers where eligible cube volume covers the whole flush budget. A flexi is mostly walls and clearances, so flush_into_infill alone will not paint the outside and will absorb little. flush_into_objects does paint the outer wall, which is the look the brief wants. Joints stay gaps in the toolpath. Whether those gaps still fuse on the printer is UNVERIFIED. This trace did not measure the cube.

  2. Extend the same feature so the cube can take more, including the outer surface. The outer surface is already included when flush_into_objects is on. The missing piece is volume: the code stops at existing islands and will not invent extrusion. Taking more means adding paths (or thickening ones) up to the flush budget, and not adding them across the joint clearances. Files that would have to change: ToolOrdering.cpp (the budget and the whole-island rule) and the place that generates the cube's perimeters/infill. Tower removal is a separate change in Print.cpp / ConfigManipulation.cpp, because the feature is hard-gated on the tower.

  3. Replace the tower geometry with the cube. The tower planners (WipeTower.cpp for Type 1, WipeTower2.cpp for Type 2) build their own box from prime and leftover volumes. They do not load an STL. That option is a different pipeline from this feature.

Not checked

UNVERIFIED. No slice, so no measured mm³ per layer of assets/flexi cube.stl, and no before/after Flushed or Tower grams. That needs Claude's mesh numbers and Phase 0's baseline.