FIX: sequential_print_clearance_valid not working
not working correctly with short objects jira: STUDIO-6489 Change-Id: I33e1a165f448e1c3e272d4045934c63ad345db2f (cherry picked from commit 9348eaa22a056db5384a38ea966cec9ba4a533a7)
This commit is contained in:
parent
886d8ee1b4
commit
3658c97a94
|
@ -518,7 +518,7 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||||
polygons->clear();
|
polygons->clear();
|
||||||
std::vector<size_t> intersecting_idxs;
|
std::vector<size_t> intersecting_idxs;
|
||||||
|
|
||||||
bool all_objects_are_short = std::all_of(print.objects().begin(), print.objects().end(), [&](PrintObject* obj) { return obj->height() < scale_(print.config().nozzle_height.value - MARGIN_HEIGHT); });
|
bool all_objects_are_short = print.is_all_objects_are_short();
|
||||||
// Shrink the extruder_clearance_radius a tiny bit, so that if the object arrangement algorithm placed the objects
|
// Shrink the extruder_clearance_radius a tiny bit, so that if the object arrangement algorithm placed the objects
|
||||||
// exactly by satisfying the extruder_clearance_radius, this test will not trigger collision.
|
// exactly by satisfying the extruder_clearance_radius, this test will not trigger collision.
|
||||||
float obj_distance = all_objects_are_short ? scale_(0.5*MAX_OUTER_NOZZLE_RADIUS-0.1) : scale_(0.5*print.config().extruder_clearance_radius.value-0.1);
|
float obj_distance = all_objects_are_short ? scale_(0.5*MAX_OUTER_NOZZLE_RADIUS-0.1) : scale_(0.5*print.config().extruder_clearance_radius.value-0.1);
|
||||||
|
|
|
@ -844,6 +844,10 @@ public:
|
||||||
// Unset types are just ignored.
|
// Unset types are just ignored.
|
||||||
static int get_compatible_filament_type(const std::set<int>& types);
|
static int get_compatible_filament_type(const std::set<int>& types);
|
||||||
|
|
||||||
|
bool is_all_objects_are_short() const {
|
||||||
|
return std::all_of(this->objects().begin(), this->objects().end(), [&](PrintObject* obj) { return obj->height() < scale_(this->config().nozzle_height.value); });
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Invalidates the step, and its depending steps in Print.
|
// Invalidates the step, and its depending steps in Print.
|
||||||
bool invalidate_step(PrintStep step);
|
bool invalidate_step(PrintStep step);
|
||||||
|
|
Loading…
Reference in New Issue