Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/local/dev' into superslicer_var…
Browse files Browse the repository at this point in the history
…iant
  • Loading branch information
supermerill committed Mar 5, 2025
2 parents ef5e639 + e928af7 commit c8bc91f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
19 changes: 15 additions & 4 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11943,10 +11943,21 @@ CustomGcodeSpecificConfigDef::CustomGcodeSpecificConfigDef()
def->label = L("Next color");
def->tooltip = L("Next color to display when a color change is performed, in #ffffff format.");

def = this->add("next_colour", coString);
// TRN: This is a label in custom g-code editor dialog, belonging to color_change_extruder. Denoted index of the extruder for which color change is performed.
def->label = L("Next colour");
def->tooltip = L("Next colour to display when a colour change is performed, in #ffffff format.");
def = this->add("previous_extrusion_role", coString);
def->label = L("Previous extrusion role");
def->tooltip = L("The extrusion role before changing to the new one.");

def = this->add("next_extrusion_role", coString);
def->label = L("Next extrusion role");
def->tooltip = L("The new extrusion role the gcode changes to.");

def = this->add("extrusion_role", coString);
def->label = L("Extrusion role");
def->tooltip = L("Deprecated, use next_extrusion_role.");

def = this->add("last_extrusion_role", coString);
def->label = L("Last extrusion role");
def->tooltip = L("Deprecated, use previous_extrusion_role.");

def = this->add("start_gcode_bed_temperature", coInt);
def->label = L("Computed bed temperature for first layer");
Expand Down
7 changes: 4 additions & 3 deletions src/libslic3r/PrintObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4781,6 +4781,7 @@ void PrintObject::clean_surfaces() {
// fill_surfaces but we only turn them into VOID surfaces, thus preserving the boundaries.
void PrintObject::combine_infill()
{
coord_t scaled_resolution = std::max(SCALED_EPSILON, scale_t(this->print()->config().resolution.value));
// Work on each region separately.
for (size_t region_id = 0; region_id < this->num_printing_regions(); ++ region_id) {
const PrintRegion &region = this->printing_region(region_id);
Expand Down Expand Up @@ -4837,6 +4838,7 @@ void PrintObject::combine_infill()
// Start looping from the second layer and intersect the current intersection with it.
for (size_t i = 1; i < layerms.size(); ++i)
intersection = intersection_ex(to_expolygons(layerms[i]->fill_surfaces().filter_by_type(stPosInternal | stDensSparse)), intersection);
ensure_valid(intersection, scaled_resolution);
double area_threshold = layerms.front()->infill_area_threshold();
if (! intersection.empty() && area_threshold > 0.)
intersection.erase(std::remove_if(intersection.begin(), intersection.end(),
Expand Down Expand Up @@ -4865,14 +4867,13 @@ void PrintObject::combine_infill()
region.config().fill_pattern.value == ipHoneycomb) ? 1.5f : 0.5f) *
layerms.back()->flow(frSolidInfill).scaled_width();
for (ExPolygon& expoly : intersection) {
expoly.assert_valid();
polygons_append(intersection_with_clearance, offset(expoly, clearance_offset));
}
for (LayerRegion *layerm : layerms) {
Polygons internal = to_polygons(layerm->fill_surfaces().filter_by_type(stPosInternal | stDensSparse));
layerm->m_fill_surfaces.remove_type(stPosInternal | stDensSparse);
ExPolygons only_internal = diff_ex(internal, intersection_with_clearance);
assert_valid(only_internal);
ensure_valid(only_internal, scaled_resolution);
layerm->m_fill_surfaces.append(std::move(only_internal), stPosInternal | stDensSparse);
if (layerm == layerms.back()) {
// Apply surfaces back with adjusted depth to the uppermost layer.
Expand All @@ -4886,7 +4887,7 @@ void PrintObject::combine_infill()
} else {
// Save void surfaces.
ExPolygons only_void = intersection_ex(internal, intersection_with_clearance);
assert_valid(only_void);
ensure_valid(only_void, scaled_resolution);
layerm->m_fill_surfaces.append(std::move(only_void), stPosInternal | stDensVoid);
}
}
Expand Down
8 changes: 0 additions & 8 deletions src/slic3r/GUI/FirmwareDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,14 +901,6 @@ FirmwareDialog::FirmwareDialog(wxWindow *parent) :
p->port_picker->Bind(wxEVT_TEXT, [this](wxCommandEvent &) { p->update_flash_enabled(); });

p->spoiler->Bind(wxEVT_COLLAPSIBLEPANE_CHANGED, [=](wxCollapsiblePaneEvent &evt) {
if (evt.GetCollapsed()) {
this->SetMinSize(wxSize(p->min_width, p->min_height));
const auto new_height = this->GetSize().GetHeight() - this->p->txt_stdout->GetSize().GetHeight();
this->SetSize(this->GetSize().GetWidth(), new_height);
} else {
this->SetMinSize(wxSize(p->min_width, p->min_height_expanded));
}

this->Layout();
this->p->fit_no_shrink();
});
Expand Down

0 comments on commit c8bc91f

Please sign in to comment.