mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-30 14:22:07 +00:00
Merge branch 'main' into libvgcode
This commit is contained in:
@@ -1529,12 +1529,22 @@ void Layer::make_ironing()
|
||||
if (ironing_params.extruder != -1) {
|
||||
//TODO just_infill is currently not used.
|
||||
ironing_params.just_infill = false;
|
||||
ironing_params.line_spacing = config.ironing_spacing;
|
||||
ironing_params.inset = config.ironing_inset;
|
||||
ironing_params.height = default_layer_height * 0.01 * config.ironing_flow;
|
||||
ironing_params.speed = config.ironing_speed;
|
||||
// Get filament-specific overrides if configured, otherwise use default values
|
||||
size_t extruder_idx = ironing_params.extruder - 1;
|
||||
ironing_params.line_spacing = (!config.filament_ironing_spacing.is_nil(extruder_idx)
|
||||
? config.filament_ironing_spacing.get_at(extruder_idx)
|
||||
: config.ironing_spacing);
|
||||
ironing_params.inset = (!config.filament_ironing_inset.is_nil(extruder_idx)
|
||||
? config.filament_ironing_inset.get_at(extruder_idx)
|
||||
: config.ironing_inset);
|
||||
ironing_params.height = default_layer_height * 0.01 * (!config.filament_ironing_flow.is_nil(extruder_idx)
|
||||
? config.filament_ironing_flow.get_at(extruder_idx)
|
||||
: config.ironing_flow);
|
||||
ironing_params.speed = (!config.filament_ironing_speed.is_nil(extruder_idx)
|
||||
? config.filament_ironing_speed.get_at(extruder_idx)
|
||||
: config.ironing_speed);
|
||||
ironing_params.angle = (config.ironing_angle_fixed ? 0 : calculate_infill_rotation_angle(this->object(), this->id(), config.solid_infill_direction.value, config.solid_infill_rotate_template.value)) + config.ironing_angle * M_PI / 180.;
|
||||
ironing_params.fixed_angle = config.ironing_angle_fixed || !config.solid_infill_rotate_template.value.empty();
|
||||
ironing_params.fixed_angle = config.ironing_angle_fixed || !config.solid_infill_rotate_template.value.empty();
|
||||
ironing_params.pattern = config.ironing_pattern;
|
||||
ironing_params.layerm = layerm;
|
||||
by_extruder.emplace_back(ironing_params);
|
||||
|
||||
@@ -349,8 +349,9 @@ std::pair<double, double> adaptive_fill_line_spacing(const PrintObject &print_ob
|
||||
} else
|
||||
return 0.;
|
||||
};
|
||||
adaptive_line_spacing = to_line_spacing(adaptive_cnt, adaptive_fill_density, adaptive_infill_extrusion_width);
|
||||
support_line_spacing = to_line_spacing(support_cnt, support_fill_density, support_infill_extrusion_width);
|
||||
const int n_multiline = print_object.printing_region(0).config().fill_multiline.value;
|
||||
adaptive_line_spacing = to_line_spacing(adaptive_cnt, adaptive_fill_density, adaptive_infill_extrusion_width) * n_multiline;
|
||||
support_line_spacing = to_line_spacing(support_cnt, support_fill_density, support_infill_extrusion_width) * n_multiline;
|
||||
}
|
||||
|
||||
return std::make_pair(adaptive_line_spacing, support_line_spacing);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "../ClipperUtils.hpp"
|
||||
#include "../Print.hpp"
|
||||
#include "../ShortestPath.hpp"
|
||||
#include "FillBase.hpp"
|
||||
@@ -19,6 +20,7 @@ void Filler::_fill_surface_single(
|
||||
// Apply multiline offset if needed
|
||||
multiline_fill(fill_lines, params, spacing);
|
||||
|
||||
fill_lines = Slic3r::intersection_pl(std::move(fill_lines), expolygon);
|
||||
|
||||
chain_or_connect_infill(std::move(fill_lines), expolygon, polylines_out, this->spacing, params);
|
||||
}
|
||||
|
||||
@@ -2998,7 +2998,6 @@ bool FillRectilinear::fill_surface_by_multilines(const Surface *surface, FillPar
|
||||
assert(sweep_params.size() >= 1);
|
||||
assert(!params.full_infill());
|
||||
params.density /= double(sweep_params.size());
|
||||
int n_multilines = params.multiline;
|
||||
assert(params.density > 0.0001f && params.density <= 1.f);
|
||||
|
||||
ExPolygonWithOffset poly_with_offset_base(surface->expolygon, 0, float(scale_(this->overlap - 0.5 * this->spacing)));
|
||||
@@ -3014,9 +3013,9 @@ bool FillRectilinear::fill_surface_by_multilines(const Surface *surface, FillPar
|
||||
// Rotate polygons so that we can work with vertical lines here
|
||||
float angle = rotate_vector.first + sweep.angle_base;
|
||||
//Fill Multiline
|
||||
for (int i = 0; i < n_multilines; ++i) {
|
||||
for (int i = 0; i < params.multiline; ++i) {
|
||||
coord_t group_offset = i * line_spacing;
|
||||
coord_t internal_offset = (i - (n_multilines - 1) / 2.0f) * line_width;
|
||||
coord_t internal_offset = (i - (params.multiline - 1) / 2.0f) * line_width;
|
||||
coord_t total_offset = group_offset + internal_offset;
|
||||
coord_t pattern_shift = scale_(sweep.pattern_shift + unscale_(total_offset));
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ Generator::Generator(const PrintObject &print_object, const std::function<void()
|
||||
const PrintRegionConfig ®ion_config = print_object.shared_regions()->all_regions.front()->config();
|
||||
const std::vector<double> &nozzle_diameters = print_config.nozzle_diameter.values;
|
||||
double max_nozzle_diameter = *std::max_element(nozzle_diameters.begin(), nozzle_diameters.end());
|
||||
const int n_multiline = region_config.fill_multiline.value;
|
||||
// const int infill_extruder = region_config.infill_extruder.value;
|
||||
const double default_infill_extrusion_width = Flow::auto_extrusion_width(FlowRole::frInfill, float(max_nozzle_diameter));
|
||||
// Note: There's not going to be a layer below the first one, so the 'initial layer height' doesn't have to be taken into account.
|
||||
@@ -86,7 +87,7 @@ Generator::Generator(const PrintObject &print_object, const std::function<void()
|
||||
object_config.line_width.get_abs_value(max_nozzle_diameter)
|
||||
);
|
||||
|
||||
m_supporting_radius = coord_t(m_infill_extrusion_width) * 100 / region_config.sparse_infill_density;
|
||||
m_supporting_radius = coord_t(m_infill_extrusion_width) * 100 * n_multiline / region_config.sparse_infill_density;
|
||||
|
||||
const double lightning_infill_overhang_angle = M_PI / 4; // 45 degrees
|
||||
const double lightning_infill_prune_angle = M_PI / 4; // 45 degrees
|
||||
|
||||
@@ -974,6 +974,8 @@ static std::vector<std::string> s_Preset_filament_options {/*"filament_colour",
|
||||
//SoftFever
|
||||
"enable_pressure_advance", "pressure_advance","adaptive_pressure_advance","adaptive_pressure_advance_model","adaptive_pressure_advance_overhangs", "adaptive_pressure_advance_bridges","chamber_temperature", "filament_shrink","filament_shrinkage_compensation_z", "support_material_interface_fan_speed","internal_bridge_fan_speed", "filament_notes" /*,"filament_seam_gap"*/,
|
||||
"ironing_fan_speed",
|
||||
// Filament ironing overrides
|
||||
"filament_ironing_flow", "filament_ironing_spacing", "filament_ironing_inset", "filament_ironing_speed",
|
||||
"filament_loading_speed", "filament_loading_speed_start",
|
||||
"filament_unloading_speed", "filament_unloading_speed_start", "filament_toolchange_delay", "filament_cooling_moves", "filament_stamping_loading_speed", "filament_stamping_distance",
|
||||
"filament_cooling_initial_speed", "filament_cooling_final_speed", "filament_ramming_parameters",
|
||||
|
||||
@@ -1143,7 +1143,7 @@ void PrintConfigDef::init_fff_params()
|
||||
// xgettext:no-c-format, no-boost-format
|
||||
def->tooltip = L("Bridging angle override. If left to zero, the bridging angle will be calculated "
|
||||
"automatically. Otherwise the provided angle will be used for external bridges. "
|
||||
"Use 180°for zero angle.");
|
||||
"Use 180° for zero angle.");
|
||||
def->sidetext = u8"°"; // degrees, don't need translation
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
@@ -1155,7 +1155,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Internal bridging angle override. If left to zero, the bridging angle will be calculated "
|
||||
"automatically. Otherwise the provided angle will be used for internal bridges. "
|
||||
"Use 180°for zero angle.\n\nIt is recommended to leave it at 0 unless there is a specific model need not to.");
|
||||
"Use 180° for zero angle.\n\nIt is recommended to leave it at 0 unless there is a specific model need not to.");
|
||||
def->sidetext = u8"°"; // degrees, don't need translation
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
@@ -1168,7 +1168,7 @@ void PrintConfigDef::init_fff_params()
|
||||
"Lower density external bridges can help improve reliability as there is more space for air to circulate "
|
||||
"around the extruded bridge, improving its cooling speed. Minimum is 10%.\n\n"
|
||||
"Higher densities can produce smoother bridge surfaces, as overlapping lines provide "
|
||||
"additional support during printing. Maximum is 120%. \n"
|
||||
"additional support during printing. Maximum is 120%.\n"
|
||||
"Note: Bridge density that is too high can cause warping or overextrusion.");
|
||||
def->sidetext = "%";
|
||||
def->min = 10;
|
||||
@@ -3147,6 +3147,50 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionInts{ -1 });
|
||||
|
||||
// Filament ironing overrides
|
||||
def = this->add("filament_ironing_flow", coPercents);
|
||||
def->label = L("Ironing flow");
|
||||
def->tooltip = L("Filament-specific override for ironing flow. This allows you to customize the ironing flow "
|
||||
"for each filament type. Too high value results in overextrusion on the surface.");
|
||||
def->sidetext = "%";
|
||||
def->min = 0;
|
||||
def->max = 100;
|
||||
def->mode = comAdvanced;
|
||||
def->nullable = true;
|
||||
def->set_default_value(new ConfigOptionPercentsNullable{ ConfigOptionPercentsNullable::nil_value() });
|
||||
|
||||
def = this->add("filament_ironing_spacing", coFloats);
|
||||
def->label = L("Ironing line spacing");
|
||||
def->tooltip = L("Filament-specific override for ironing line spacing. This allows you to customize the spacing "
|
||||
"between ironing lines for each filament type.");
|
||||
def->sidetext = "mm";
|
||||
def->min = 0;
|
||||
def->max = 1;
|
||||
def->mode = comAdvanced;
|
||||
def->nullable = true;
|
||||
def->set_default_value(new ConfigOptionFloatsNullable{ ConfigOptionFloatsNullable::nil_value() });
|
||||
|
||||
def = this->add("filament_ironing_inset", coFloats);
|
||||
def->label = L("Ironing inset");
|
||||
def->tooltip = L("Filament-specific override for ironing inset. This allows you to customize the distance to keep "
|
||||
"from the edges when ironing for each filament type.");
|
||||
def->sidetext = "mm";
|
||||
def->min = 0;
|
||||
def->max = 100;
|
||||
def->mode = comAdvanced;
|
||||
def->nullable = true;
|
||||
def->set_default_value(new ConfigOptionFloatsNullable{ ConfigOptionFloatsNullable::nil_value() });
|
||||
|
||||
def = this->add("filament_ironing_speed", coFloats);
|
||||
def->label = L("Ironing speed");
|
||||
def->tooltip = L("Filament-specific override for ironing speed. This allows you to customize the print speed "
|
||||
"of ironing lines for each filament type.");
|
||||
def->sidetext = "mm/s";
|
||||
def->min = 1;
|
||||
def->mode = comAdvanced;
|
||||
def->nullable = true;
|
||||
def->set_default_value(new ConfigOptionFloatsNullable{ ConfigOptionFloatsNullable::nil_value() });
|
||||
|
||||
def = this->add("fuzzy_skin", coEnum);
|
||||
def->label = L("Fuzzy Skin");
|
||||
def->category = L("Others");
|
||||
@@ -3532,7 +3576,7 @@ void PrintConfigDef::init_fff_params()
|
||||
"Advanced syntax is supported: '+5' rotates +5° every layer; '+5#5' rotates +5° every 5 layers. See the Wiki for details. "
|
||||
"When a template is set, the standard infill direction setting is ignored. "
|
||||
"Note: some infill patterns (e.g., Gyroid) control rotation themselves; use with care.");
|
||||
def->sidetext = L("°");
|
||||
def->sidetext = u8"°"; // degrees, don't need translation
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionString(""));
|
||||
|
||||
|
||||
@@ -1085,6 +1085,11 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||
((ConfigOptionFloat, ironing_speed))
|
||||
((ConfigOptionFloat, ironing_angle))
|
||||
((ConfigOptionBool, ironing_angle_fixed))
|
||||
// Filament Ironing
|
||||
((ConfigOptionPercentsNullable, filament_ironing_flow))
|
||||
((ConfigOptionFloatsNullable, filament_ironing_spacing))
|
||||
((ConfigOptionFloatsNullable, filament_ironing_inset))
|
||||
((ConfigOptionFloatsNullable, filament_ironing_speed))
|
||||
// Detect bridging perimeters
|
||||
((ConfigOptionBool, detect_overhang_wall))
|
||||
((ConfigOptionInt, wall_filament))
|
||||
|
||||
Reference in New Issue
Block a user