mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 06:55:58 +08:00
Sequential test changed from hard error to soft error (allowing export)
This commit is contained in:
parent
3bfcf1cc0b
commit
2d1b498d2b
@ -538,6 +538,7 @@ void GCodeProcessorResult::reset() {
|
|||||||
custom_gcode_per_print_z = std::vector<CustomGCode::Item>();
|
custom_gcode_per_print_z = std::vector<CustomGCode::Item>();
|
||||||
spiral_vase_mode = false;
|
spiral_vase_mode = false;
|
||||||
conflict_result = std::nullopt;
|
conflict_result = std::nullopt;
|
||||||
|
sequential_collision_detected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<std::pair<GCodeProcessor::EProducer, std::string>> GCodeProcessor::Producers = {
|
const std::vector<std::pair<GCodeProcessor::EProducer, std::string>> GCodeProcessor::Producers = {
|
||||||
|
@ -163,6 +163,7 @@ namespace Slic3r {
|
|||||||
bool spiral_vase_mode;
|
bool spiral_vase_mode;
|
||||||
|
|
||||||
ConflictResultOpt conflict_result;
|
ConflictResultOpt conflict_result;
|
||||||
|
bool sequential_collision_detected;
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
};
|
};
|
||||||
|
@ -462,11 +462,6 @@ std::string Print::validate(std::vector<std::string>* warnings) const
|
|||||||
if (extruders.empty())
|
if (extruders.empty())
|
||||||
return _u8L("The supplied settings will cause an empty print.");
|
return _u8L("The supplied settings will cause an empty print.");
|
||||||
|
|
||||||
if (m_config.complete_objects) {
|
|
||||||
if (! check_seq_printability(m_model, m_config))
|
|
||||||
return _u8L("Some objects are too close; your extruder will collide with them.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_config.avoid_crossing_perimeters && m_config.avoid_crossing_curled_overhangs) {
|
if (m_config.avoid_crossing_perimeters && m_config.avoid_crossing_curled_overhangs) {
|
||||||
return _u8L("Avoid crossing perimeters option and avoid crossing curled overhangs option cannot be both enabled together.");
|
return _u8L("Avoid crossing perimeters option and avoid crossing curled overhangs option cannot be both enabled together.");
|
||||||
}
|
}
|
||||||
@ -975,6 +970,8 @@ void Print::process()
|
|||||||
if (conflictRes.has_value())
|
if (conflictRes.has_value())
|
||||||
BOOST_LOG_TRIVIAL(error) << boost::format("gcode path conflicts found between %1% and %2%") % conflictRes->_objName1 % conflictRes->_objName2;
|
BOOST_LOG_TRIVIAL(error) << boost::format("gcode path conflicts found between %1% and %2%") % conflictRes->_objName1 % conflictRes->_objName2;
|
||||||
|
|
||||||
|
m_sequential_collision_detected = config().complete_objects && ! check_seq_printability(model(), config());
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << "Slicing process finished." << log_memory_info();
|
BOOST_LOG_TRIVIAL(info) << "Slicing process finished." << log_memory_info();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1004,6 +1001,8 @@ std::string Print::export_gcode(const std::string& path_template, GCodeProcessor
|
|||||||
if (m_conflict_result.has_value())
|
if (m_conflict_result.has_value())
|
||||||
result->conflict_result = *m_conflict_result;
|
result->conflict_result = *m_conflict_result;
|
||||||
|
|
||||||
|
result->sequential_collision_detected = m_sequential_collision_detected;
|
||||||
|
|
||||||
return path.c_str();
|
return path.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -749,6 +749,7 @@ private:
|
|||||||
friend class PrintObject;
|
friend class PrintObject;
|
||||||
|
|
||||||
ConflictResultOpt m_conflict_result;
|
ConflictResultOpt m_conflict_result;
|
||||||
|
bool m_sequential_collision_detected;
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* slic3r_Print_hpp_ */
|
} /* slic3r_Print_hpp_ */
|
||||||
|
@ -1112,6 +1112,8 @@ void GCodeViewer::load_as_gcode(const GCodeProcessorResult& gcode_result, const
|
|||||||
m_conflict_result = gcode_result.conflict_result;
|
m_conflict_result = gcode_result.conflict_result;
|
||||||
if (m_conflict_result.has_value())
|
if (m_conflict_result.has_value())
|
||||||
m_conflict_result->layer = m_viewer.get_layer_id_at(static_cast<float>(m_conflict_result->_height));
|
m_conflict_result->layer = m_viewer.get_layer_id_at(static_cast<float>(m_conflict_result->_height));
|
||||||
|
|
||||||
|
m_sequential_collision_detected = gcode_result.sequential_collision_detected;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCodeViewer::load_as_preview(libvgcode::GCodeInputData&& data)
|
void GCodeViewer::load_as_preview(libvgcode::GCodeInputData&& data)
|
||||||
|
@ -261,6 +261,7 @@ private:
|
|||||||
bool m_contained_in_bed{ true };
|
bool m_contained_in_bed{ true };
|
||||||
|
|
||||||
ConflictResultOpt m_conflict_result;
|
ConflictResultOpt m_conflict_result;
|
||||||
|
bool m_sequential_collision_detected{ false };
|
||||||
|
|
||||||
libvgcode::Viewer m_viewer;
|
libvgcode::Viewer m_viewer;
|
||||||
bool m_loaded_as_preview{ false };
|
bool m_loaded_as_preview{ false };
|
||||||
@ -357,6 +358,7 @@ public:
|
|||||||
void invalidate_legend() { m_legend_resizer.reset(); }
|
void invalidate_legend() { m_legend_resizer.reset(); }
|
||||||
|
|
||||||
const ConflictResultOpt& get_conflict_result() const { return m_conflict_result; }
|
const ConflictResultOpt& get_conflict_result() const { return m_conflict_result; }
|
||||||
|
bool get_sequential_collision_detected() const { return m_sequential_collision_detected; }
|
||||||
|
|
||||||
void load_shells(const Print& print);
|
void load_shells(const Print& print);
|
||||||
|
|
||||||
|
@ -2923,6 +2923,7 @@ void GLCanvas3D::load_gcode_preview(const GCodeProcessorResult& gcode_result, co
|
|||||||
if (wxGetApp().is_editor()) {
|
if (wxGetApp().is_editor()) {
|
||||||
_set_warning_notification_if_needed(EWarning::ToolpathOutside);
|
_set_warning_notification_if_needed(EWarning::ToolpathOutside);
|
||||||
_set_warning_notification_if_needed(EWarning::GCodeConflict);
|
_set_warning_notification_if_needed(EWarning::GCodeConflict);
|
||||||
|
_set_warning_notification_if_needed(EWarning::SequentialCollision);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_as_dirty();
|
set_as_dirty();
|
||||||
@ -7365,6 +7366,8 @@ void GLCanvas3D::_set_warning_notification_if_needed(EWarning warning)
|
|||||||
show = m_gcode_viewer.has_data() && !m_gcode_viewer.is_contained_in_bed();
|
show = m_gcode_viewer.has_data() && !m_gcode_viewer.is_contained_in_bed();
|
||||||
else if (warning == EWarning::GCodeConflict)
|
else if (warning == EWarning::GCodeConflict)
|
||||||
show = m_gcode_viewer.has_data() && m_gcode_viewer.is_contained_in_bed() && m_gcode_viewer.get_conflict_result().has_value();
|
show = m_gcode_viewer.has_data() && m_gcode_viewer.is_contained_in_bed() && m_gcode_viewer.get_conflict_result().has_value();
|
||||||
|
else if (warning == EWarning::SequentialCollision)
|
||||||
|
show = m_gcode_viewer.has_data() && m_gcode_viewer.get_sequential_collision_detected();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7404,6 +7407,11 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
|||||||
error = ErrorType::SLICING_ERROR;
|
error = ErrorType::SLICING_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case EWarning::SequentialCollision: {
|
||||||
|
text = _u8L("Collision between an object and extruder gantry detected.");
|
||||||
|
error = ErrorType::SLICING_ERROR;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
auto& notification_manager = *wxGetApp().plater()->get_notification_manager();
|
auto& notification_manager = *wxGetApp().plater()->get_notification_manager();
|
||||||
|
|
||||||
|
@ -373,7 +373,8 @@ class GLCanvas3D
|
|||||||
SlaSupportsOutside,
|
SlaSupportsOutside,
|
||||||
SomethingNotShown,
|
SomethingNotShown,
|
||||||
ObjectClashed,
|
ObjectClashed,
|
||||||
GCodeConflict
|
GCodeConflict,
|
||||||
|
SequentialCollision
|
||||||
};
|
};
|
||||||
|
|
||||||
class RenderStats
|
class RenderStats
|
||||||
|
Loading…
x
Reference in New Issue
Block a user