mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-16 23:01:48 +08:00
#252 fixes
1: add a little safety offset of 1mm 2: halve the brim & skirts, remove skirt verification if only one skirt for all objects. 3: can't reproduce, there is a strange thing with an object going to 0:0, but it's corrected by a second click on slice button.
This commit is contained in:
parent
5b6aaf8c29
commit
ece98a1f04
@ -4414,22 +4414,24 @@ double PrintConfig::min_object_distance(const ConfigBase *config)
|
|||||||
for (double val : vals) max_nozzle_diam = std::fmax(max_nozzle_diam, val);
|
for (double val : vals) max_nozzle_diam = std::fmax(max_nozzle_diam, val);
|
||||||
|
|
||||||
// min object distance is max(duplicate_distance, clearance_radius)
|
// min object distance is max(duplicate_distance, clearance_radius)
|
||||||
double extruder_clearance_radius = config->option("extruder_clearance_radius")->getFloat();
|
//add 1 as safety offset.
|
||||||
|
double extruder_clearance_radius = config->option("extruder_clearance_radius")->getFloat() + 1;
|
||||||
if (extruder_clearance_radius > base_dist) {
|
if (extruder_clearance_radius > base_dist) {
|
||||||
base_dist = extruder_clearance_radius;
|
base_dist = extruder_clearance_radius;
|
||||||
}
|
}
|
||||||
//add brim width
|
//add brim width
|
||||||
|
//FIXME: does not take into account object-defined brim !!! you can crash yoursefl with it
|
||||||
if (config->option("brim_width")->getFloat() > 0) {
|
if (config->option("brim_width")->getFloat() > 0) {
|
||||||
base_dist += config->option("brim_width")->getFloat() * 2;
|
base_dist += config->option("brim_width")->getFloat();
|
||||||
}
|
}
|
||||||
//add the skirt
|
//add the skirt
|
||||||
if (config->option("skirts")->getInt() > 0) {
|
if (config->option("skirts")->getInt() > 0 && !config->option("complete_objects_one_skirt")->getBool()) {
|
||||||
//add skirt dist
|
//add skirt dist
|
||||||
double dist_skirt = config->option("skirt_distance")->getFloat();
|
double dist_skirt = config->option("skirt_distance")->getFloat();
|
||||||
|
dist_skirt += max_nozzle_diam * config->option("skirts")->getInt() * 1.5;
|
||||||
|
//add skirt width if needed
|
||||||
if (dist_skirt > config->option("brim_width")->getFloat())
|
if (dist_skirt > config->option("brim_width")->getFloat())
|
||||||
base_dist += (dist_skirt - config->option("brim_width")->getFloat()) * 2;
|
base_dist += (dist_skirt - config->option("brim_width")->getFloat());
|
||||||
//add skirt width
|
|
||||||
base_dist += max_nozzle_diam * config->option("skirts")->getInt() * 1.5 * 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return base_dist;
|
return base_dist;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user