Merge upstream/main into belt-printer

Brings belt-printer up to main 4b4a261787. Resolutions:

- G-code header (#15897, #15915): main moved the header, config and
  thumbnail block later in _do_export; write_belt_header() moves with it,
  still after the thumbnails and outside the BTT_TFT gate.
- _extrude: first-layer acceleration keeps the per-path first-layer plane
  test with main's cached nozzle index (#16028); main's set_speed out-param
  form (#16108) everywhere else.
- GCodeWriter (#16108): the arc-to-polyline fallback for machine mappings
  that cannot express G2/G3 now runs in the out-param extrude_arc_to_xy,
  which is the overload GCode calls, and appends to the caller's string.
- GCodeProcessorResult: the belt fields join main's forwarding assign.
- Clipper2 (#15969): belt arrange helpers take Slic3r::Point; the tree
  support join types lose their ClipperLib qualifier.
- CLI arrange (#15837): belt printers still reserve no wipe tower.
- Wipe tower options (#15841): the two new sparse-layer toggles are hidden
  for belt printers like the rest of the tower options.
- Keyboard shortcuts (#15706): main's registry replaces the old key switch;
  the belt view toggle is re-registered in the next commit.
- Print::process: the belt purge-plan undo runs before main's SliceStarted
  event.
- scripts/filament_id_snapshot.json: deleted on main (a77209af8f).
- Includes and appended tests: union of both sides.
This commit is contained in:
harrierpigeon
2026-10-04 19:20:33 -05:00
11471 changed files with 2992690 additions and 2720441 deletions
+30 -4
View File
@@ -1,23 +1,49 @@
#include "ClipperUtils.hpp"
#include "libslic3r/ExPolygon.hpp"
#include "ExtrusionEntity.hpp"
#include "ExtrusionEntityCollection.hpp"
#include "libslic3r/Flow.hpp"
#include "Layer.hpp"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/Polyline.hpp"
#include "Print.hpp"
#include "SupportMaterial.hpp"
#include "libslic3r/Slicing.hpp"
#include "libslic3r/Support/SupportLayer.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "SupportCommon.hpp"
#include "BeltFloorContext.hpp"
#include "Geometry.hpp"
#include "Point.hpp"
#include "MutablePolygon.hpp"
#include "libslic3r/libslic3r.h"
#include "libslic3r/Surface.hpp"
#include "libslic3r/TriangleSelector.hpp"
#include <agg/agg_rendering_buffer.h>
#include <agg/agg_renderer_base.h>
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <iterator>
#include <cstdint>
#include <cstddef>
#include <deque>
#include <initializer_list>
#include <limits>
#include <map>
#include <memory>
#include <boost/log/trivial.hpp>
#include <boost/container/static_vector.hpp>
#include <set>
#include <numeric>
#include <tbb/parallel_for.h>
#include <tbb/spin_mutex.h>
#include <tbb/task_group.h>
#include <vector>
#include <utility>
#include <tuple>
#define SUPPORT_USE_AGG_RASTERIZER
@@ -64,9 +90,9 @@ namespace Slic3r {
#define PILLAR_SIZE (2.5)
#define PILLAR_SPACING 10
//#define SUPPORT_SURFACES_OFFSET_PARAMETERS ClipperLib::jtMiter, 3.
//#define SUPPORT_SURFACES_OFFSET_PARAMETERS ClipperLib::jtMiter, 1.5
#define SUPPORT_SURFACES_OFFSET_PARAMETERS ClipperLib::jtSquare, 0.
//#define SUPPORT_SURFACES_OFFSET_PARAMETERS jtMiter, 3.
//#define SUPPORT_SURFACES_OFFSET_PARAMETERS jtMiter, 1.5
#define SUPPORT_SURFACES_OFFSET_PARAMETERS jtSquare, 0.
static constexpr bool support_with_sheath = false;
@@ -1691,7 +1717,7 @@ static inline std::tuple<Polygons, Polygons, double> detect_contacts(
offset(
diff_polygons,
scaled<float>(SUPPORT_MATERIAL_MARGIN / NUM_MARGIN_STEPS),
ClipperLib::jtRound,
jtRound,
// round mitter limit
scale_(0.05)),
slices_margin.polygons);