Do not print brim when object has raft, it is not supported and makes no sense
This commit is contained in:
parent
b6deda3477
commit
16562a2e77
@ -71,12 +71,16 @@ static ConstPrintObjectPtrs get_top_level_objects_with_brim(const Print &print,
|
|||||||
Polygons islands;
|
Polygons islands;
|
||||||
ConstPrintObjectPtrs island_to_object;
|
ConstPrintObjectPtrs island_to_object;
|
||||||
for(size_t print_object_idx = 0; print_object_idx < print.objects().size(); ++print_object_idx) {
|
for(size_t print_object_idx = 0; print_object_idx < print.objects().size(); ++print_object_idx) {
|
||||||
|
const PrintObject *object = print.objects()[print_object_idx];
|
||||||
|
|
||||||
|
if (! object->has_brim())
|
||||||
|
continue;
|
||||||
|
|
||||||
Polygons islands_object;
|
Polygons islands_object;
|
||||||
islands_object.reserve(bottom_layers_expolygons[print_object_idx].size());
|
islands_object.reserve(bottom_layers_expolygons[print_object_idx].size());
|
||||||
for (const ExPolygon &ex_poly : bottom_layers_expolygons[print_object_idx])
|
for (const ExPolygon &ex_poly : bottom_layers_expolygons[print_object_idx])
|
||||||
islands_object.emplace_back(ex_poly.contour);
|
islands_object.emplace_back(ex_poly.contour);
|
||||||
|
|
||||||
const PrintObject *object = print.objects()[print_object_idx];
|
|
||||||
islands.reserve(islands.size() + object->instances().size() * islands_object.size());
|
islands.reserve(islands.size() + object->instances().size() * islands_object.size());
|
||||||
for (const PrintInstance &instance : object->instances())
|
for (const PrintInstance &instance : object->instances())
|
||||||
for (Polygon &poly : islands_object) {
|
for (Polygon &poly : islands_object) {
|
||||||
|
@ -271,7 +271,11 @@ public:
|
|||||||
// Centering offset of the sliced mesh from the scaled and rotated mesh of the model.
|
// Centering offset of the sliced mesh from the scaled and rotated mesh of the model.
|
||||||
const Point& center_offset() const { return m_center_offset; }
|
const Point& center_offset() const { return m_center_offset; }
|
||||||
|
|
||||||
bool has_brim() const { return this->config().brim_type != btNoBrim && this->config().brim_width.value > 0.; }
|
bool has_brim() const {
|
||||||
|
return this->config().brim_type != btNoBrim
|
||||||
|
&& this->config().brim_width.value > 0.
|
||||||
|
&& ! this->has_raft();
|
||||||
|
}
|
||||||
|
|
||||||
// This is the *total* layer count (including support layers)
|
// This is the *total* layer count (including support layers)
|
||||||
// this value is not supposed to be compared with Layer::id
|
// this value is not supposed to be compared with Layer::id
|
||||||
@ -321,7 +325,7 @@ public:
|
|||||||
bool has_raft() const { return m_config.raft_layers > 0; }
|
bool has_raft() const { return m_config.raft_layers > 0; }
|
||||||
bool has_support_material() const { return this->has_support() || this->has_raft(); }
|
bool has_support_material() const { return this->has_support() || this->has_raft(); }
|
||||||
// Checks if the model object is painted using the multi-material painting gizmo.
|
// Checks if the model object is painted using the multi-material painting gizmo.
|
||||||
bool is_mm_painted() const { return this->model_object()->is_mm_painted(); };
|
bool is_mm_painted() const { return this->model_object()->is_mm_painted(); }
|
||||||
|
|
||||||
// returns 0-based indices of extruders used to print the object (without brim, support and other helper extrusions)
|
// returns 0-based indices of extruders used to print the object (without brim, support and other helper extrusions)
|
||||||
std::vector<unsigned int> object_extruders() const;
|
std::vector<unsigned int> object_extruders() const;
|
||||||
|
@ -471,7 +471,8 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def = this->add("brim_width", coFloat);
|
def = this->add("brim_width", coFloat);
|
||||||
def->label = L("Brim width");
|
def->label = L("Brim width");
|
||||||
def->category = L("Skirt and brim");
|
def->category = L("Skirt and brim");
|
||||||
def->tooltip = L("Horizontal width of the brim that will be printed around each object on the first layer.");
|
def->tooltip = L("Horizontal width of the brim that will be printed around each object on the first layer."
|
||||||
|
"When raft is used, no brim is generated (use raft_first_layer_expansion).");
|
||||||
def->sidetext = L("mm");
|
def->sidetext = L("mm");
|
||||||
def->min = 0;
|
def->min = 0;
|
||||||
def->max = 200;
|
def->max = 200;
|
||||||
|
Loading…
Reference in New Issue
Block a user