Avoid updating and sending to gpu sequential print clearance contours at every frame. Cache them instead and update only their transforms.

Fixed conflicts after cherry-picking e99ee946af
This commit is contained in:
enricoturri1966 2023-03-14 08:21:38 +01:00
parent 77da892927
commit 6974962dd0
8 changed files with 200 additions and 52 deletions

View file

@ -469,13 +469,13 @@ std::string Print::validate(std::string* warning) const
return _u8L("The supplied settings will cause an empty print.");
if (m_config.complete_objects) {
if (!sequential_print_horizontal_clearance_valid(*this, const_cast<Polygons*>(&m_sequential_print_clearance_polygons)))
if (!sequential_print_horizontal_clearance_valid(*this, const_cast<Polygons*>(&m_sequential_print_clearance_contours)))
return _u8L("Some objects are too close; your extruder will collide with them.");
if (!sequential_print_vertical_clearance_valid(*this))
return _u8L("Some objects are too tall and cannot be printed without extruder collisions.");
}
else
const_cast<Polygons*>(&m_sequential_print_clearance_polygons)->clear();
const_cast<Polygons*>(&m_sequential_print_clearance_contours)->clear();
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.");