mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-16 08:12:39 -07:00
Refactoring: new method in Flow for calculating spacing between extrusions having different width
This commit is contained in:
@@ -40,7 +40,7 @@ Flow::new_from_spacing(float spacing, float nozzle_diameter, float height, bool
|
||||
float
|
||||
Flow::spacing() const {
|
||||
if (this->bridge) {
|
||||
return width + BRIDGE_EXTRA_SPACING;
|
||||
return this->width + BRIDGE_EXTRA_SPACING;
|
||||
}
|
||||
|
||||
float min_flow_spacing;
|
||||
@@ -54,6 +54,21 @@ Flow::spacing() const {
|
||||
return this->width - OVERLAP_FACTOR * (this->width - min_flow_spacing);
|
||||
}
|
||||
|
||||
/* This method returns the centerline spacing between an extrusion using this
|
||||
flow and another one using another flow.
|
||||
this->spacing(other) shall return the same value as other.spacing(*this) */
|
||||
float
|
||||
Flow::spacing(const Flow &other) const {
|
||||
assert(this->height == other.height);
|
||||
assert(this->bridge == other.bridge);
|
||||
|
||||
if (this->bridge) {
|
||||
return this->width/2 + other.width/2 + BRIDGE_EXTRA_SPACING;
|
||||
}
|
||||
|
||||
return this->spacing()/2 + other.spacing()/2;
|
||||
}
|
||||
|
||||
/* This method returns extrusion volume per head move unit. */
|
||||
double
|
||||
Flow::mm3_per_mm() const {
|
||||
|
||||
Reference in New Issue
Block a user