mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-15 05:51:49 +08:00
parent
7802f276e4
commit
6064dfe2c7
@ -58,7 +58,7 @@ Flow Flow::new_from_spacing(float spacing, float nozzle_diameter, float height,
|
||||
// For normal extrusons, extrusion width is wider than the spacing due to the rounding and squishing of the extrusions.
|
||||
// For bridge extrusions, the extrusions are placed with a tiny BRIDGE_EXTRA_SPACING gaps between the threads.
|
||||
float width = float(bridge ?
|
||||
(spacing - BRIDGE_EXTRA_SPACING) :
|
||||
(spacing - BRIDGE_EXTRA_SPACING_MULT * nozzle_diameter) :
|
||||
#ifdef HAS_PERIMETER_LINE_OVERLAP
|
||||
(spacing + PERIMETER_LINE_OVERLAP_FACTOR * height * (1. - 0.25 * PI));
|
||||
#else
|
||||
@ -78,7 +78,7 @@ float Flow::spacing() const
|
||||
float min_flow_spacing = this->width - this->height * (1. - 0.25 * PI);
|
||||
float res = this->width - PERIMETER_LINE_OVERLAP_FACTOR * (this->width - min_flow_spacing);
|
||||
#else
|
||||
float res = float(this->bridge ? (this->width + BRIDGE_EXTRA_SPACING) : (this->width - this->height * (1. - 0.25 * PI)));
|
||||
float res = float(this->bridge ? (this->width + BRIDGE_EXTRA_SPACING_MULT * nozzle_diameter) : (this->width - this->height * (1. - 0.25 * PI)));
|
||||
#endif
|
||||
// assert(res > 0.f);
|
||||
if (res <= 0.f)
|
||||
@ -94,7 +94,7 @@ float Flow::spacing(const Flow &other) const
|
||||
assert(this->height == other.height);
|
||||
assert(this->bridge == other.bridge);
|
||||
float res = float(this->bridge ?
|
||||
0.5 * this->width + 0.5 * other.width + BRIDGE_EXTRA_SPACING :
|
||||
0.5 * this->width + 0.5 * other.width + BRIDGE_EXTRA_SPACING_MULT * nozzle_diameter :
|
||||
0.5 * this->spacing() + 0.5 * other.spacing());
|
||||
// assert(res > 0.f);
|
||||
if (res <= 0.f)
|
||||
|
@ -9,8 +9,8 @@ namespace Slic3r {
|
||||
|
||||
class PrintObject;
|
||||
|
||||
// Extra spacing of bridge threads, in mm.
|
||||
#define BRIDGE_EXTRA_SPACING 0.05
|
||||
// Extra spacing of bridge threads, in mult of nozzle_width/extrusion_width. 0.05 for 0.4
|
||||
#define BRIDGE_EXTRA_SPACING_MULT 0.125
|
||||
|
||||
// Overlap factor of perimeter lines. Currently no overlap.
|
||||
#ifdef HAS_PERIMETER_LINE_OVERLAP
|
||||
|
@ -63,9 +63,9 @@ void PerimeterGenerator::process()
|
||||
// external loops (which is the correct way) instead of using ext_perimeter_spacing2
|
||||
// which is the spacing between external and internal, which is not correct
|
||||
// and would make the collapsing (thus the details resolution) dependent on
|
||||
// internal flow which is unrelated.
|
||||
coord_t min_spacing = (coord_t)( perimeter_spacing * (1 - INSET_OVERLAP_TOLERANCE) );
|
||||
coord_t ext_min_spacing = (coord_t)( ext_perimeter_spacing * (1 - INSET_OVERLAP_TOLERANCE) );
|
||||
// internal flow which is unrelated. <- i don't undertand, so revert to ext_perimeter_spacing2
|
||||
coord_t min_spacing = (coord_t)( perimeter_spacing * (1 - 0.05/*INSET_OVERLAP_TOLERANCE*/) );
|
||||
coord_t ext_min_spacing = (coord_t)( ext_perimeter_spacing2 * (1 - 0.05/*INSET_OVERLAP_TOLERANCE*/) );
|
||||
|
||||
// prepare grown lower layer slices for overhang detection
|
||||
if (this->lower_slices != NULL && this->config->overhangs) {
|
||||
@ -353,7 +353,10 @@ void PerimeterGenerator::process()
|
||||
if (i == 0) {
|
||||
// compute next onion, without taking care of thin_walls : destroy too thin areas.
|
||||
if (!this->config->thin_walls)
|
||||
next_onion = offset_ex(last, double( - ext_perimeter_width / 2));
|
||||
next_onion = offset2_ex(
|
||||
last,
|
||||
-(float)(ext_perimeter_width / 2 + ext_min_spacing / 2 - 1),
|
||||
+(float)(ext_min_spacing / 2 - 1));
|
||||
|
||||
|
||||
// look for thin walls
|
||||
|
@ -581,7 +581,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->full_label = L("External perimeters width");
|
||||
def->category = L("Extrusion Width");
|
||||
def->tooltip = L("Set this to a non-zero value to set a manual extrusion width for external perimeters. "
|
||||
"If left zero, default extrusion width will be used if set, otherwise 1.125 x nozzle diameter will be used. "
|
||||
"If left zero, default extrusion width will be used if set, otherwise 1.05 x nozzle diameter will be used. "
|
||||
"If expressed as percentage (for example 112.5%), it will be computed over nozzle diameter.");
|
||||
def->sidetext = L("mm or %");
|
||||
def->mode = comAdvanced;
|
||||
|
@ -266,15 +266,14 @@ std::string PresetHints::recommended_thin_wall_thickness(const PresetBundle &pre
|
||||
|
||||
|
||||
if (num_perimeters > 0) {
|
||||
int num_lines = std::min(num_perimeters * 2, 10);
|
||||
out += (boost::format(_utf8(L("Recommended object min wall thickness for layer height %.2f and"))) % layer_height).str() + " ";
|
||||
int num_lines = std::min(num_perimeters, 6);
|
||||
out += (boost::format(_utf8(L("Recommended object min (thick) wall thickness for layer height %.2f and"))) % layer_height).str() + " ";
|
||||
out += (boost::format(_utf8(L("%d perimeter: %.2f mm"))) % 1 % (external_perimeter_flow.width + external_perimeter_flow.spacing())).str() + " ";
|
||||
// Start with the width of two closely spaced
|
||||
double width = external_perimeter_flow.width + external_perimeter_flow.spacing();
|
||||
for (int i = 2; i <= num_lines; thin_walls ? ++ i : i += 2) {
|
||||
if (i > 2)
|
||||
out += ", ";
|
||||
out += (boost::format(_utf8(L("%d perimeter: %.2f mm"))) % i % width).str() + " ";
|
||||
width += perimeter_flow.spacing() * (thin_walls ? 1.f : 2.f);
|
||||
double width = 2*(external_perimeter_flow.width + external_perimeter_flow.spacing(perimeter_flow));
|
||||
for (int i = 2; i <= num_lines; thin_walls ? ++ i : i ++) {
|
||||
out += ", " + (boost::format(_utf8(L("%d perimeter: %.2f mm"))) % i % width).str() + " ";
|
||||
width += perimeter_flow.spacing()*2;
|
||||
}
|
||||
}
|
||||
return out;
|
||||
|
Loading…
x
Reference in New Issue
Block a user