mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
seam gap parameter
This commit is contained in:
parent
dd1efb3969
commit
594819ef9c
9 changed files with 34 additions and 12 deletions
|
@ -464,10 +464,12 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LayerRegion* layerm = this->m_regions[surface_fill.region_id];
|
||||||
|
|
||||||
// Maximum length of the perimeter segment linking two infill lines.
|
// Maximum length of the perimeter segment linking two infill lines.
|
||||||
f->link_max_length = (coord_t)scale_(link_max_length);
|
f->link_max_length = (coord_t)scale_(link_max_length);
|
||||||
// Used by the concentric infill pattern to clip the loops to create extrusion paths.
|
// Used by the concentric infill pattern to clip the loops to create extrusion paths.
|
||||||
f->loop_clipping = coord_t(scale_(surface_fill.params.flow.nozzle_diameter()) * LOOP_CLIPPING_LENGTH_OVER_NOZZLE_DIAMETER);
|
f->loop_clipping = coord_t(scale_(layerm->region().config().seam_gap.get_abs_value(surface_fill.params.flow.nozzle_diameter())));
|
||||||
|
|
||||||
// apply half spacing using this flow's own spacing and generate infill
|
// apply half spacing using this flow's own spacing and generate infill
|
||||||
FillParams params;
|
FillParams params;
|
||||||
|
@ -486,7 +488,6 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
|
||||||
params.no_extrusion_overlap = surface_fill.params.overlap;
|
params.no_extrusion_overlap = surface_fill.params.overlap;
|
||||||
params.with_loop = surface_fill.params.with_loop;
|
params.with_loop = surface_fill.params.with_loop;
|
||||||
|
|
||||||
LayerRegion* layerm = this->m_regions[surface_fill.region_id];
|
|
||||||
params.config = &layerm->region().config();
|
params.config = &layerm->region().config();
|
||||||
for (ExPolygon& expoly : surface_fill.expolygons) {
|
for (ExPolygon& expoly : surface_fill.expolygons) {
|
||||||
f->no_overlap_expolygons = intersection_ex(surface_fill.no_overlap_expolygons, ExPolygons() = {expoly});
|
f->no_overlap_expolygons = intersection_ex(surface_fill.no_overlap_expolygons, ExPolygons() = {expoly});
|
||||||
|
|
|
@ -3334,8 +3334,7 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
|
||||||
// if polyline was shorter than the clipping distance we'd get a null polyline, so
|
// if polyline was shorter than the clipping distance we'd get a null polyline, so
|
||||||
// we discard it in that case
|
// we discard it in that case
|
||||||
double clip_length = m_enable_loop_clipping ?
|
double clip_length = m_enable_loop_clipping ?
|
||||||
scale_(EXTRUDER_CONFIG(nozzle_diameter)) * LOOP_CLIPPING_LENGTH_OVER_NOZZLE_DIAMETER :
|
scale_(m_config.seam_gap.get_abs_value(EXTRUDER_CONFIG(nozzle_diameter))) : 0;
|
||||||
0;
|
|
||||||
|
|
||||||
// get paths
|
// get paths
|
||||||
ExtrusionPaths paths;
|
ExtrusionPaths paths;
|
||||||
|
|
|
@ -752,7 +752,7 @@ static std::vector<std::string> s_Preset_print_options {
|
||||||
"small_perimeter_speed", "small_perimeter_threshold","bridge_angle", "filter_out_gap_fill", "post_process", "travel_acceleration","inner_wall_acceleration",
|
"small_perimeter_speed", "small_perimeter_threshold","bridge_angle", "filter_out_gap_fill", "post_process", "travel_acceleration","inner_wall_acceleration",
|
||||||
"default_jerk", "outer_wall_jerk", "inner_wall_jerk", "top_surface_jerk", "initial_layer_jerk","travel_jerk",
|
"default_jerk", "outer_wall_jerk", "inner_wall_jerk", "top_surface_jerk", "initial_layer_jerk","travel_jerk",
|
||||||
"top_solid_infill_flow_ratio","bottom_solid_infill_flow_ratio","only_one_wall_first_layer",
|
"top_solid_infill_flow_ratio","bottom_solid_infill_flow_ratio","only_one_wall_first_layer",
|
||||||
"print_flow_ratio"
|
"print_flow_ratio","seam_gap"
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -777,7 +777,7 @@ static std::vector<std::string> s_Preset_filament_options {
|
||||||
"filament_wipe_distance", "additional_cooling_fan_speed",
|
"filament_wipe_distance", "additional_cooling_fan_speed",
|
||||||
"bed_temperature_difference", "nozzle_temperature_range_low", "nozzle_temperature_range_high",
|
"bed_temperature_difference", "nozzle_temperature_range_low", "nozzle_temperature_range_high",
|
||||||
//SoftFever
|
//SoftFever
|
||||||
"enable_pressure_advance", "pressure_advance","chamber_temperature"
|
"enable_pressure_advance", "pressure_advance","chamber_temperature" /*,"filament_seam_gap"*/
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::vector<std::string> s_Preset_machine_limits_options {
|
static std::vector<std::string> s_Preset_machine_limits_options {
|
||||||
|
|
|
@ -148,7 +148,9 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
||||||
"thumbnails",
|
"thumbnails",
|
||||||
"nozzle_hrc",
|
"nozzle_hrc",
|
||||||
"required_nozzle_HRC",
|
"required_nozzle_HRC",
|
||||||
"upward_compatible_machine"
|
"upward_compatible_machine",
|
||||||
|
// SoftFever
|
||||||
|
"seam_gap"
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::unordered_set<std::string> steps_ignore;
|
static std::unordered_set<std::string> steps_ignore;
|
||||||
|
|
|
@ -2371,6 +2371,17 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->mode = comSimple;
|
def->mode = comSimple;
|
||||||
def->set_default_value(new ConfigOptionEnum<SeamPosition>(spAligned));
|
def->set_default_value(new ConfigOptionEnum<SeamPosition>(spAligned));
|
||||||
|
|
||||||
|
|
||||||
|
def = this->add("seam_gap", coFloatOrPercent);
|
||||||
|
def->label = L("Seam gap");
|
||||||
|
def->tooltip = L("To avoid visible seam, the extrusion can be stoppped a bit before the end of the loop."
|
||||||
|
"\nCan be a mm or a % of the current extruder diameter.");
|
||||||
|
def->sidetext = L("mm or %");
|
||||||
|
def->min = 0;
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
def->set_default_value(new ConfigOptionFloatOrPercent(15,true));
|
||||||
|
|
||||||
|
|
||||||
def = this->add("skirt_distance", coFloat);
|
def = this->add("skirt_distance", coFloat);
|
||||||
def->label = L("Skirt distance");
|
def->label = L("Skirt distance");
|
||||||
def->tooltip = L("Distance from skirt to brim or object");
|
def->tooltip = L("Distance from skirt to brim or object");
|
||||||
|
@ -3351,7 +3362,7 @@ void PrintConfigDef::init_filament_option_keys()
|
||||||
"retraction_length", "z_hop", "retraction_speed", "deretraction_speed",
|
"retraction_length", "z_hop", "retraction_speed", "deretraction_speed",
|
||||||
"retract_before_wipe", "retract_restart_extra", "retraction_minimum_travel", "wipe", "wipe_distance",
|
"retract_before_wipe", "retract_restart_extra", "retraction_minimum_travel", "wipe", "wipe_distance",
|
||||||
"retract_when_changing_layer", "retract_length_toolchange", "retract_restart_extra_toolchange", "filament_colour",
|
"retract_when_changing_layer", "retract_length_toolchange", "retract_restart_extra_toolchange", "filament_colour",
|
||||||
"default_filament_profile"
|
"default_filament_profile"/*,"filament_seam_gap"*/
|
||||||
};
|
};
|
||||||
|
|
||||||
m_filament_retract_keys = {
|
m_filament_retract_keys = {
|
||||||
|
|
|
@ -756,6 +756,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||||
((ConfigOptionBool, only_one_wall_first_layer))
|
((ConfigOptionBool, only_one_wall_first_layer))
|
||||||
//SoftFever
|
//SoftFever
|
||||||
((ConfigOptionFloat, print_flow_ratio))
|
((ConfigOptionFloat, print_flow_ratio))
|
||||||
|
((ConfigOptionFloatOrPercent, seam_gap))
|
||||||
)
|
)
|
||||||
|
|
||||||
PRINT_CONFIG_CLASS_DEFINE(
|
PRINT_CONFIG_CLASS_DEFINE(
|
||||||
|
|
|
@ -679,7 +679,8 @@ bool PrintObject::invalidate_state_by_config_options(
|
||||||
|| opt_key == "only_one_wall_first_layer"
|
|| opt_key == "only_one_wall_first_layer"
|
||||||
|| opt_key == "initial_layer_line_width"
|
|| opt_key == "initial_layer_line_width"
|
||||||
|| opt_key == "inner_wall_line_width"
|
|| opt_key == "inner_wall_line_width"
|
||||||
|| opt_key == "infill_wall_overlap") {
|
|| opt_key == "infill_wall_overlap"
|
||||||
|
|| opt_key == "seam_gap") {
|
||||||
steps.emplace_back(posPerimeters);
|
steps.emplace_back(posPerimeters);
|
||||||
} else if (opt_key == "gap_infill_speed"
|
} else if (opt_key == "gap_infill_speed"
|
||||||
|| opt_key == "filter_out_gap_fill" ) {
|
|| opt_key == "filter_out_gap_fill" ) {
|
||||||
|
|
|
@ -57,7 +57,8 @@ static constexpr double EPSILON = 1e-4;
|
||||||
static constexpr double SCALING_FACTOR = 0.000001;
|
static constexpr double SCALING_FACTOR = 0.000001;
|
||||||
static constexpr double PI = 3.141592653589793238;
|
static constexpr double PI = 3.141592653589793238;
|
||||||
// When extruding a closed loop, the loop is interrupted and shortened a bit to reduce the seam.
|
// When extruding a closed loop, the loop is interrupted and shortened a bit to reduce the seam.
|
||||||
static constexpr double LOOP_CLIPPING_LENGTH_OVER_NOZZLE_DIAMETER = 0.15;
|
// SoftFever: replaced by seam_gap now
|
||||||
|
// static constexpr double LOOP_CLIPPING_LENGTH_OVER_NOZZLE_DIAMETER = 0.15;
|
||||||
static constexpr double RESOLUTION = 0.0125;
|
static constexpr double RESOLUTION = 0.0125;
|
||||||
#define SCALED_RESOLUTION (RESOLUTION / SCALING_FACTOR)
|
#define SCALED_RESOLUTION (RESOLUTION / SCALING_FACTOR)
|
||||||
static constexpr double SPARSE_INFILL_RESOLUTION = 0.04;
|
static constexpr double SPARSE_INFILL_RESOLUTION = 0.04;
|
||||||
|
|
|
@ -1834,6 +1834,8 @@ void TabPrint::build()
|
||||||
|
|
||||||
optgroup = page->new_optgroup(L("Seam"), L"param_seam");
|
optgroup = page->new_optgroup(L("Seam"), L"param_seam");
|
||||||
optgroup->append_single_option_line("seam_position", "Seam");
|
optgroup->append_single_option_line("seam_position", "Seam");
|
||||||
|
optgroup->append_single_option_line("seam_gap","Seam");
|
||||||
|
|
||||||
|
|
||||||
optgroup = page->new_optgroup(L("Precision"), L"param_precision");
|
optgroup = page->new_optgroup(L("Precision"), L"param_precision");
|
||||||
optgroup->append_single_option_line("slice_closing_radius");
|
optgroup->append_single_option_line("slice_closing_radius");
|
||||||
|
@ -2468,7 +2470,9 @@ void TabFilament::add_filament_overrides_page()
|
||||||
"filament_wipe",
|
"filament_wipe",
|
||||||
//BBS
|
//BBS
|
||||||
"filament_wipe_distance",
|
"filament_wipe_distance",
|
||||||
"filament_retract_before_wipe"
|
"filament_retract_before_wipe",
|
||||||
|
//SoftFever
|
||||||
|
// "filament_seam_gap"
|
||||||
})
|
})
|
||||||
append_single_option_line(opt_key, extruder_idx);
|
append_single_option_line(opt_key, extruder_idx);
|
||||||
}
|
}
|
||||||
|
@ -2499,7 +2503,9 @@ void TabFilament::update_filament_overrides_page()
|
||||||
"filament_wipe",
|
"filament_wipe",
|
||||||
//BBS
|
//BBS
|
||||||
"filament_wipe_distance",
|
"filament_wipe_distance",
|
||||||
"filament_retract_before_wipe"
|
"filament_retract_before_wipe",
|
||||||
|
//SoftFever
|
||||||
|
// "filament_seam_gap"
|
||||||
};
|
};
|
||||||
|
|
||||||
const int extruder_idx = 0; // #ys_FIXME
|
const int extruder_idx = 0; // #ys_FIXME
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue