Commit Graph
30834 Commits
Author SHA1 Message Date
harrierpigeon 7a23d9ea2c Belt slicing: only model parts set the layer range again
The filter was lost with the debug logging it shared an #if with, so modifiers
and support blockers stretched the sliced range of a belt object.
2026-10-02 12:46:43 -05:00
harrierpigeon bfbf5ad1c2 Arrange: keep a pile aligned to an off-centre point on the bed
With best_object_pos away from the bed centre the placer packs the pile
inside the bin and then translates it so its centre lands on that point,
without checking that it still fits there. A belt printer aims at the
leading end of the belt (BabyBelt Pro: 0.5, 0.05), so any pile longer than
the 50 mm around that point was pushed past the edge: four 90 mm parts on
the 95 x 500 mm belt ended with one across the edge and one outside while
290 mm of belt stayed free.

The final alignment now stops the pile at the edge of the bin; the items'
inflated boxes leave the object spacing as the margin. A pile that does not
fit along an axis is centred on it, as before.
2026-10-02 12:09:59 -05:00
harrierpigeon 31494a9836 tests: give the belt fan band test a band the walls reach 2026-10-02 02:42:14 -05:00
harrierpigeon 441ae8e877 Belt: decide the fan band per extrusion segment
A tilted layer runs from the belt to the top of the part, so a wall loop
that starts above the belt still passes along it. Tagging only the path's
first point left such loops out of the band entirely; the band is now
evaluated at each segment, with the tag capped where the fan stops
depending on it.
2026-10-02 02:36:13 -05:00
harrierpigeon 461063856d tests: fix two belt test expectations
The clearance test needs the relative-E reset in its layer change G-code to
get past validate()'s other checks, and now asserts the height message. The
fan band test counts cycles rather than commands: the band is decided per
path start, so a cube cycles the fan far less often than a benchy.
2026-10-02 02:33:14 -05:00
harrierpigeon 1b392955de tests: organic tree supports reaching the belt slice without a negative flow
Covers the case from Hanif Koh's review of #14394 (belt raft layers below
the object with no lower bound), which the negative-Z bottom layer fix in
layer_initialize() addresses.
2026-10-02 01:13:29 -05:00
harrierpigeon 3beb448ae6 Belt brim: lattice lines closer to the belt than the band fraction move uphill
With a first layer of about 0.28 mm or more at 45 degrees (or a shallower
belt) the brim band is wider than one bead and its lines go on the nominal
lattice. A lattice line could land where the belt is almost at the band's
print_z; its flow was clamped to half a layer while the nozzle sat nearly on
the belt. Such a line now moves uphill to the 0.75 fraction the single-line
case uses, and a line that lands on the previous one is skipped.

Ported from the Unlayered fork (patch 0007 of its belt port series, found
there by fuzzing first layer heights). The fork's companion fix, restricting
the brim filament to those the writer was handed (0008), is not needed here:
ToolOrdering registers the brim filament on every band's layer, so the writer
always has it. A test pins that with every object a flush target.
2026-10-02 01:13:29 -05:00
harrierpigeon 412564cae3 Belt: document the frame of the exclude-object outlines
EXCLUDE_OBJECT_DEFINE keeps plate coordinates on a belt printer: the frame
after the slicing rotation is undone and before the G-code axis remap and
machine-frame shear, which is where the object stands on the belt.

Raised in Hanif Koh's review of #14394.
2026-10-02 01:11:59 -05:00
harrierpigeon 360a68e078 Belt: warn when the purge tower is enabled but the project has no tower object
The purge tower is a model object the GUI creates and sizes, and libslic3r
only purges into one that exists. A multi-filament belt project sliced from
the CLI without it changed filament with nowhere to purge, silently.

Raised in Hanif Koh's review of #14394.
2026-10-02 01:11:59 -05:00
harrierpigeon 556569c0e3 Belt: drive the first-layer fan band from the generator, not from parsed moves
The cooling buffer's band pass rebuilt positions from the layer's G-code
and tested them against the first-layer plane. The G-code is in machine
coordinates and the plane is in slicing coordinates, so on the shipped
profiles the nearest move was over 100 mm from a 0.2 mm band and the pass
never changed the fan. GCode::_extrude() already knows each path's height
above the belt, so it now tags the band changes and the buffer applies and
strips the tags.

The pass also took the S of every M106 as the part fan, whatever its P
index, and stored that 0..255 value where a percentage was expected (an
auxiliary fan line came back as M106 S651); it now uses FanMover's parser,
which ignores other fans, and converts to percent. It no longer overwrites
the layer's intended speed, only the fan's actual state.

Raised in Hanif Koh's review of #14394.
2026-10-02 01:10:57 -05:00
harrierpigeon 646fe6384c Belt: retire the two support floor modes nothing implements
clip_only and both were never read and behaved like none; old values now
load as none.

Raised in Hanif Koh's review of #14394.
2026-10-02 01:07:45 -05:00
harrierpigeon f7b822abb7 Belt: remove the unused clip_support_fills()
It had no caller besides its own recursion.

Raised in Hanif Koh's review of #14394.
2026-10-02 01:07:45 -05:00
harrierpigeon c0ba2c8c44 Belt brim: read the belt axis from the config in the instance check
belt_brim_instances_compatible() runs while the slicing parameters can be
stale, like the rest of the brim predicates, which read the print config.

Raised in Hanif Koh's review of #14394.
2026-10-02 01:07:44 -05:00
harrierpigeon 0701f64ba9 Belt: index apron layers into the first layer's nozzle map
Apron bands looked up their filament and nozzle config slot with a running
counter, while object layers use Layer::id(), so band N read the map of
object layer N. They precede layer 0 and now use its assignment.

Raised in Hanif Koh's review of #14394.
2026-10-02 01:07:44 -05:00
harrierpigeon c49e8d32c8 Belt: drop the per-extrusion transform determinant
The mesh transform is a rotation and an axis permutation, so its
determinant is always 1; rebuilding the forward transform on every
extrusion to divide the flow by it changed nothing.

Raised in Hanif Koh's review of #14394.
2026-10-02 01:07:43 -05:00
harrierpigeon 3752144995 Belt: do not refuse a brim because the prime tower setting is on
enable_prime_tower stays on for any multi-filament project, but a belt
printer never prints the classic tower and the belt purge prism is an
ordinary object that never takes a brim, so every brim on a multi-filament
belt print was refused for nothing.

Raised in Hanif Koh's review of #14394.
2026-10-02 01:07:42 -05:00
harrierpigeon 2aa4122aae Belt: check object height against the gantry clearance again
validate() skipped the build-volume height check whenever the machine-frame
transform was active, which is every shipped belt profile, so a 400 mm
object passed on a 300 mm printable_height. The transform only changes how
the height is written to G-code; the clearance check from f682ab5cd3
applies regardless.

Raised in Hanif Koh's review of #14394.
2026-10-02 01:07:42 -05:00
harrierpigeon 97034b22f6 Belt: remove the tagged diagnostic logging
Drops the [BELT-DEBUG], [BELTRACE], [BELT-CALIB] and [BELT-PREVIEW] log
lines, the SLIC3R_BELT_DIAGNOSTIC_LOG blocks, and the counters and
temporaries that existed only to feed them. Six of the purge tower lines
logged at warning level, which is Orca's default, on every plan. Raised in
Hanif Koh's review of #14394.
2026-10-02 01:04:33 -05:00
harrierpigeon 3776739cb5 docs: drop the private build notification note
The build-notify workflow is a local tool of one contributor and does not
belong in the shared agent instructions.
2026-10-02 01:02:58 -05:00
harrierpigeon 93fc4b31e9 Belt: show the axis remap options in Develop mode only
preslice_remap_*, preslice_remap_global and gcode_remap_* describe the
printer's kinematics and are set once by its profile. A wrong value sends
the gantry outside the machine (a user preset with the pre-slice remap in
place of the G-code remap emitted gantry moves to Y=646 mm), so they are no
longer offered in Expert mode.
2026-10-02 01:02:58 -05:00
harrierpigeon 33fc99785a Belt profiles: print without a z-hop by default
On a belt printer a lift is a move along the belt axis (0.4 mm / sin 45 =
0.57 mm of belt travel out and back on every hop), not a lift away from the
part. The three belt printer bases now ship z_hop 0, the IR3 V2 leaf no
longer restates 0.4, and the BabyBelt Pro and IR3 V2 filaments stop
overriding the printer with filament_z_hop 0.4. The option stays editable.
2026-10-02 01:02:57 -05:00
harrierpigeon f219431935 GUI: the plate is open along Y for containment tests on an infinite-Y belt printer
PartPlate's containment tests treat the plate as open along Y on a belt printer with
belt_printer_infinite_y, so a long part is no longer flagged outside the plate in Prepare
while the slicer and the G-code checks accept it. The check reads the printer preset
through the app object, which does not exist headlessly, so it is guarded on the plater.
2026-10-02 01:00:36 -05:00
harrierpigeon b8a8e38ceb G-code: no crossing-perimeter avoidance while travelling on a brim apron layer
Crossing-perimeter avoidance dereferenced the (null) layer while travelling on a brim
apron layer.
2026-10-02 01:00:36 -05:00
harrierpigeon d755580c99 Belt brim: the purge prism never gets a brim, whatever its config says
The prism's generator already sets no_brim; PrintObject::has_belt_brim() now also ignores
any brim setting on the prism (belt_purge_tower_object), so a brim on the parts beside it
never blocks purging.
2026-10-02 01:00:36 -05:00
harrierpigeon e8926efbe3 Belt purge: detect filament changes by scanning the ordering, not the first layer's flag
ToolOrdering::has_wipe_tower() reads the first layer's flag. On a belt the first layer may
be a brim apron band, which carries neither object nor support and never gets the flag, so
with a brim the purge plan returned early and nothing was purged. Scan the layers for a
change.
2026-10-02 01:00:36 -05:00
harrierpigeon 2ae41bb0ef Painting: guard the top/bottom projection erase when no shell layers are requested
With top_shell_layers = 0 the `top` vector is never filled and erasing its begin() was
undefined (found by fuzzing on a painted object dropped below the plate).
2026-10-02 01:00:36 -05:00
harrierpigeon 6a6ceb2612 G-code: key the island tour cache on the island layout, never index past the islands
The per-filament island tour was cached by island centroids only. A later layer with the
same centroids but fewer islands (thin walls, negative volumes) reused the stale visit
list, whose catch-all index pointed past the layer's islands, and extrude_perimeters read
freed memory (three fuzz crashes, planar and belt). The per-instance island layout is part
of the cache key and the use site never indexes past the islands.
2026-10-02 01:00:36 -05:00
harrierpigeon 6be7911e40 CLI: survive a project with missing printable_height or fewer filaments than loaded
Found by fuzzing the headless slicer:

- A BBS-style 3MF without Metadata/project_settings.config segfaulted the CLI silently on
  the missing printable_height option.
- A project saved with fewer filaments (or filament groups) than --load-filaments overran
  the filament variant tables (segfault in the variant match) and then hit an uncaught
  ConfigurationError from set_with_restore_2 (std::terminate). The tables are regenerated
  for the filaments the project did not know about, the destination vectors grown first
  (only from a non-empty source), the match bounded, and a failure becomes a CLI config
  error.
2026-10-02 01:00:36 -05:00
harrierpigeon d57549159d 3MF loader: refuse non-finite vertex coordinates
A 3MF vertex with a nan/inf coordinate was accepted by both parsers and crashed qhull in
ModelVolume's convex hull while the file was still loading. Both vertex handlers refuse it,
and volume generation checks again whichever parser produced the geometry. The main
parser's _stop_object_xml_parser keeps a message a handler already set.
2026-10-02 01:00:36 -05:00
harrierpigeon 4f110bc261 Belt scarf test: slice without a z-hop
The default 0.4 mm z-hop is a 0.57 mm move along the belt axis and its
return tripped the back-step check. Shipped belt profiles print without a
z-hop, so the test does too.
2026-09-30 17:42:16 -05:00
harrierpigeon 69a08915d1 Belt: do not fail the G-code height check against belt travel
check_multi_extruder_gcode_valid() compares each object's max Z with
printable_height. On a belt printer machine Z is belt travel (a 3DBenchy
on the BabyBelt Pro runs from Z=197 to Z=309 on a 69 mm printable_height),
so every belt export set the over-height error bit and the CLI refused the
plate with -102 "G-code in unprintable area". The preview already skips its
ToolHeightOutside warning for the same reason; the export check now does
too. The XY printable-area check is unchanged.
2026-09-30 17:29:33 -05:00
harrierpigeon 2c0570c97d Drop references to planning docs that are not in the tree
The MachineKinematics comments pointed at docs/superpowers plan files,
which are gitignored working notes.
2026-09-30 15:44:49 -05:00
harrierpigeon 48af5b5d97 Read the pre-slice remap header tags at their real length
The header tags lost their belt_ prefix in the Part 3.2 rename (20
characters now), but the parser still skipped 25, so every axis read as
pos_x. Found in Hanif Koh's review of #14394.
2026-09-30 15:44:18 -05:00
harrierpigeon 6cf747808c Belt: never start a scarf joint seam below the layer
A scarf joint begins one layer height below the current layer and ramps
up along the wall. On a tilted belt that start is a step backwards along
the belt axis, into the previous layer's wall at the seam: 0.283 mm per
0.2 mm layer at 45 degrees. With an aligned seam the nozzle rams the same
spot on every layer. A BabyBelt Pro benchy with seam_slope_type=external
showed 601 such back-steps from layer 107 on, and in the field the belt
"jumped backwards" and the head knocked the part loose.

Belt printers now skip the scarf in GCode::extrude_loop, and the process
tab greys the scarf controls out for them, as it already does for arc
fitting. The regression test slices a cube on a belt with the scarf
enabled and checks the belt axis never steps back by a layer pitch.
2026-09-30 15:44:18 -05:00
harrierpigeon ad6afce67b Merge upstream/hanif/belt-printer-fixes into belt/final-round
Brings in upstream/belt-printer (the Sept 14 main merge) plus Hanif Koh's
21 review-fix commits from PR #15685, on top of the MachineKinematics
refactor and the purge-prism / tree-support / first-layer-speed fixes.

Conflict resolution:
- BeltGCodeWriter is gone (kinematics refactor), so Hanif's plate-offset
  fix for it is ported into GCodeWriter: the first-layer-plane checks in
  travel_to_xy / travel_to_xyz / _travel_to_z now evaluate the plate-local
  point, and BeltGCode::init_belt_writer hands the stored plate origin to
  the writer it installs.
- init_belt_writer(Print&) takes Hanif's signature; the BBL flag is set on
  the surviving writer by GCode::_do_export.
- The shared emit_belt_brim_bands() loop keeps the BeltFloorObjectGuard the
  local branch added, so apron bands classify first-layer height against
  their own object.
- eager_lift keeps effective_type: it now carries set_force_normal_lift().
- GCodeWriter's initializer list follows Hanif's member order with
  m_kinematics in its declared position.
- TreeSupport::detect_overhangs uses Hanif's clamped build_plate_tilt_slope()
  for the non-belt path and the belt shear for the belt path.
2026-09-30 15:22:19 -05:00
Hanif Koh 2b2c710626 Order GCodeWriter Initializers Like the Members Moved to Protected
The lift, speed and cached-extruder members now live in the protected section ahead of the private ones; list their initializers first so the list reads in construction order. No behaviour change.
2026-09-14 17:27:33 +08:00
Hanif Koh 2b1a7e38df Drop Redundant Belt Checks in BeltGCode
BeltGCode is only created for belt printers, so its hooks no longer re-check belt_printer, and the BBL-machine flag is set once on whichever writer survives init_belt_writer instead of on one about to be discarded.
2026-09-14 17:27:33 +08:00
Hanif Koh b4052ec99f Drop the Redundant Lift Type Alias in eager_lift
effective_type was a plain copy of the parameter.
2026-09-14 17:27:33 +08:00
Hanif Koh 14cf7861e0 Fix Belt Tooltip Spacing and Legend Casing
Drop double spaces in the belt tilt tooltips and match the preview legend header to
the "Belt printer" settings group.
2026-09-14 17:27:33 +08:00
Hanif Koh 18c08862a8 Align up_direction Position in TriangleSelector Fill Calls
seed_fill_select_triangles() now takes up_direction right after highlight_by_angle_deg, as select_patch() does.
2026-09-14 17:27:33 +08:00
Hanif Koh 62ef0fa4f8 Write the Standard Layer Change Tag on Belt Brim Apron Layers
Apron layers appended print_z to the layer change tag, unlike every other layer; write the plain tag line.
2026-09-14 17:27:33 +08:00
Hanif Koh a8a45439db Share One Build Plate Tilt Up-Direction Helper Across the GUI
The bed gravity arrow, volume rendering and the painter/support gizmos each rebuilt
the tilt up-vector from build_plate_tilt_x/y; use one helper that also tolerates
presets without the keys.
2026-09-14 17:27:33 +08:00
Hanif Koh 5cd6661280 Check the Belt Temperature Tower Model Load
Bail out like the other calibration paths when add_model() fails instead of
indexing the empty model.
2026-09-14 17:27:33 +08:00
Hanif Koh 33aec258da Skip CLI Wipe Tower Reservation on Belt Printers
Print::has_wipe_tower() is always false for belt printers, but CLI arrange, plate checks and the pre-slice tower clamp still reserved a phantom tower footprint and wrote a clamped wipe_tower_x/y into the config.
2026-09-14 17:27:33 +08:00
Hanif Koh 76aba24ddf Number Belt Extension Support Layers Sequentially
Extension layers were all created with id 0, so every one of them could be taken for the first layer by id-only checks (ooze-prevention standby temperature, cached layer ids). Renumber the support layers after inserting them.
2026-09-14 17:27:33 +08:00
Hanif Koh cb5b489e90 Invalidate Only G-code Export for Belt Output Options
gcode_back_transform, first_layer_plane* and belt_printer_infinite_y fell through to invalidate_all_steps(), which re-ran tool ordering, skirt/brim and G-code export on toggles that only affect G-code export.
2026-09-14 17:27:33 +08:00
Hanif Koh 19a085206c Print Belt Brim Aprons in Each Object's Brim Filament
Apron-only layers printed every band with the first tool, so objects with different brim filaments at the same apron Z shared one filament. Emit each brim filament's bands with its own toolchange.
2026-09-14 17:27:33 +08:00
Hanif Koh 708212a306 Share One Belt Brim Band Loop Between Apron-Only and Ordinary Layers
The ordinary-layer path kept its own copy of the apron band loop. Give emit_belt_brim_bands() an optional brim filament filter and call it from the per-extruder lambda; without a filter it still prints every band, so apron-only layers are unchanged.
2026-09-14 17:27:33 +08:00
Hanif Koh 3b302b4666 Derive Belt Support Tilt From Slicing Rotation in Print::apply
build_plate_tilt_x/y was synced from belt_slice_rotation* only by the printer Tab, so CLI or 3MF edits of the rotation left the support tilt stale.
2026-09-14 17:27:32 +08:00
Hanif Koh 4a7311bf01 Rebuild the Brim Type Combobox Only When Its Entries Change
toggle_options() now runs on every value change and mode switch; rebuild the
brim_type choices only when the leading-edge entry has to be added or removed.
2026-09-14 17:27:32 +08:00