fix: exporting a sliced print again gives different G-code (#16025)

extrude_infill() and extrude_support() reversed the layer's extrusion
entities in place while chaining them, so each export started from the
previous one's reversed toolpaths, and each copy of an object from the
copy before it. The export-time region lists now hold const pointers,
and chaining reverses a clone instead.
This commit is contained in:
Kris Austin
2026-10-01 08:08:03 -03:00
committed by GitHub
parent 236a8786ef
commit d1d14329d9
7 changed files with 127 additions and 49 deletions
+3 -2
View File
@@ -225,7 +225,7 @@ DynamicPrintConfig multifilament_config(unsigned int filaments, std::initializer
}
void init_print(std::vector<TriangleMesh> &&meshes, Slic3r::Print &print, Slic3r::Model &model, const DynamicPrintConfig &config_in,
const std::vector<std::vector<ConfigBase::SetDeserializeItem>> *per_object_overrides, bool arrange)
const std::vector<std::vector<ConfigBase::SetDeserializeItem>> *per_object_overrides, bool arrange, size_t instances)
{
DynamicPrintConfig config = DynamicPrintConfig::full_print_config();
config.apply(config_in);
@@ -236,7 +236,8 @@ void init_print(std::vector<TriangleMesh> &&meshes, Slic3r::Print &print, Slic3r
ModelObject *object = model.add_object();
object->name += "object.stl";
object->add_volume(std::move(t));
object->add_instance();
for (size_t i = 0; i < instances; ++i)
object->add_instance();
if (per_object_overrides && object_idx < per_object_overrides->size() && !(*per_object_overrides)[object_idx].empty()) {
DynamicPrintConfig oc;