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
+38
View File
@@ -1,20 +1,46 @@
#include <algorithm>
#include <boost/log/trivial.hpp>
#include <limits>
#include <cstddef>
#include <functional>
#include <cassert>
#include <cstdlib>
#include <memory>
#include <math.h>
#include <cmath>
#include <iterator>
#include <tbb/parallel_for.h>
#include <vector>
#include <utility>
#include "BoundingBox.hpp"
#include "ClipperUtils.hpp"
#include "ElephantFootCompensation.hpp"
#include "ExPolygon.hpp"
#include "Exception.hpp"
#include "Flow.hpp"
#include "I18N.hpp"
#include "Layer.hpp"
#include "Model.hpp"
#include "MultiMaterialSegmentation.hpp"
#include "ObjectID.hpp"
#include "Point.hpp"
#include "Polygon.hpp"
#include "Print.hpp"
#include "BeltTransform.hpp"
#include "BeltSliceStrategy.hpp"
#include "Geometry.hpp"
//BBS
#include "PrintConfig.hpp"
#include "PrintBase.hpp"
#include "ShortestPath.hpp"
#include "libslic3r.h"
#include "TriangleMeshSlicer.hpp"
#include "TriangleMesh.hpp"
#include "Slicing.hpp"
#include "Surface.hpp"
#include "Utils.hpp"
#include "libslic3r/Feature/Interlocking/InterlockingGenerator.hpp"
//! macro used to mark string used at localization, return same string
@@ -1802,4 +1828,16 @@ std::vector<Polygons> PrintObject::slice_support_volumes(const ModelVolumeType m
return slices;
}
std::vector<ExPolygons> PrintObject::slice_single_volume_regions(const ModelVolume* volume) const
{
if (volume == nullptr)
return {};
// Match the existing slicing heights and centered transform without flattening holes.
const std::vector<float> zs = zs_from_layers(this->layers());
MeshSlicingParamsEx params;
params.trafo = this->trafo_centered();
const Print *print = this->print();
return slice_volume(*volume, zs, params, [print]() { print->throw_if_canceled(); });
}
} // namespace Slic3r