mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-20 02:43:02 +00:00
Revive the disabled fff_print test suite (#14196)
* Fix null-deref and arranger bugs that gate headless slicing tests export_gcode dereferenced a null result out-param, enum serialization dereferenced a null keys_map, and get_arrange_polys left bed_idx unseeded so the arranger dropped items. All only affect the headless test/CLI path. * Fix the headless test harness and add G-code test helpers Use the real arranger, fix temp-file handling with an RAII guard, and add layers_with_role / max_z for inspecting sliced G-code. * Re-enable the Model construction test * Re-enable SupportMaterial tests and add an enforced-support test * Re-enable and extend PrintObject layer-height and perimeter tests * Re-enable Print skirt, brim, and solid-surface tests * Re-enable and extend PrintGCode tests Un-hide the basic scenario (dead-key fixes, reframes, trimmed trivia) and add initial-layer-height, sequential-order, and null-result export tests. * Re-enable and reframe the skirt/brim tests Detect skirt/brim by G-code role comment instead of a sentinel speed, and resolve the previously-unfinished skirt-enclosure test. * Replace the stale lift()/unlift() test with a z_hop test * Delete the stub and broken Flow tests
This commit is contained in:
@@ -2186,7 +2186,7 @@ private:
|
||||
else
|
||||
throw ConfigurationError("Serializing NaN");
|
||||
}
|
||||
else {
|
||||
else if (this->keys_map != nullptr) {
|
||||
for (const auto& kvp : *this->keys_map)
|
||||
if (kvp.second == v)
|
||||
ss << kvp.first;
|
||||
|
||||
@@ -2194,7 +2194,7 @@ void GCode::do_export(Print* print, const char* path, GCodeProcessorResult* resu
|
||||
BOOST_LOG_TRIVIAL(info) << "Exporting G-code finished" << log_memory_info();
|
||||
print->set_done(psGCodeExport);
|
||||
|
||||
if(is_BBL_Printer())
|
||||
if(is_BBL_Printer() && result != nullptr)
|
||||
result->label_object_enabled = m_enable_exclude_object;
|
||||
// Write the profiler measurements to file
|
||||
PROFILE_UPDATE();
|
||||
|
||||
@@ -19,6 +19,10 @@ arrangement::ArrangePolygons get_arrange_polys(const Model &model, ModelInstance
|
||||
for (ModelObject *mo : model.objects)
|
||||
for (ModelInstance *minst : mo->instances) {
|
||||
minst->get_arrange_polygon(&ap);
|
||||
// ModelInstance::get_arrange_polygon leaves bed_idx at its UNARRANGED
|
||||
// default; seed it to bed 0 (as get_instance_arrange_poly does) so the
|
||||
// nester treats the item as placeable instead of returning it unplaced.
|
||||
ap.bed_idx = 0;
|
||||
input.emplace_back(ap);
|
||||
instances.emplace_back(minst);
|
||||
}
|
||||
|
||||
@@ -2632,7 +2632,8 @@ std::string Print::export_gcode(const std::string& path_template, GCodeProcessor
|
||||
gcode.do_export(this, path.c_str(), result, thumbnail_cb);
|
||||
gcode.export_layer_filaments(result);
|
||||
//BBS
|
||||
result->conflict_result = m_conflict_result;
|
||||
if (result != nullptr)
|
||||
result->conflict_result = m_conflict_result;
|
||||
return path.c_str();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user