mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-31 20:31:59 +08:00
Doxygen comments for Flow
This commit is contained in:
parent
ff21018f32
commit
a7331c2966
@ -120,11 +120,11 @@ Flow::_width_from_spacing(float spacing, float nozzle_diameter, float height, bo
|
|||||||
return spacing + OVERLAP_FACTOR * height * (1 - PI/4.0);
|
return spacing + OVERLAP_FACTOR * height * (1 - PI/4.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate a new spacing to fill width with possibly integer number of lines,
|
/// Calculate a new spacing to fill width with possibly integer number of lines,
|
||||||
// the first and last line being centered at the interval ends.
|
/// the first and last line being centered at the interval ends.
|
||||||
// This function possibly increases the spacing, never decreases,
|
/// This function possibly increases the spacing, never decreases,
|
||||||
// and for a narrow width the increase in spacing may become severe,
|
/// and for a narrow width the increase in spacing may become severe,
|
||||||
// therefore the adjustment is limited to 20% increase.
|
/// therefore the adjustment is limited to 20% increase.
|
||||||
template <class T>
|
template <class T>
|
||||||
T
|
T
|
||||||
Flow::solid_spacing(const T total_width, const T spacing)
|
Flow::solid_spacing(const T total_width, const T spacing)
|
||||||
|
@ -10,7 +10,8 @@ namespace Slic3r {
|
|||||||
constexpr auto BRIDGE_EXTRA_SPACING = 0.05;
|
constexpr auto BRIDGE_EXTRA_SPACING = 0.05;
|
||||||
constexpr auto OVERLAP_FACTOR = 1.0;
|
constexpr auto OVERLAP_FACTOR = 1.0;
|
||||||
|
|
||||||
enum FlowRole {
|
/// Enumeration for different flow roles
|
||||||
|
enum FlowRole
|
||||||
frExternalPerimeter,
|
frExternalPerimeter,
|
||||||
frPerimeter,
|
frPerimeter,
|
||||||
frInfill,
|
frInfill,
|
||||||
@ -20,6 +21,8 @@ enum FlowRole {
|
|||||||
frSupportMaterialInterface,
|
frSupportMaterialInterface,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/// Represents material flow; provides methods to predict material spacing.
|
||||||
class Flow
|
class Flow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -28,7 +31,13 @@ class Flow
|
|||||||
|
|
||||||
Flow(float _w, float _h, float _nd, bool _bridge = false)
|
Flow(float _w, float _h, float _nd, bool _bridge = false)
|
||||||
: width(_w), height(_h), nozzle_diameter(_nd), bridge(_bridge) {};
|
: width(_w), height(_h), nozzle_diameter(_nd), bridge(_bridge) {};
|
||||||
|
|
||||||
|
/// Return the centerline spacing between two adjacent extrusions that have the same properties (width, etc).
|
||||||
|
/// Models as a rectangle with semicircles at the ends.
|
||||||
float spacing() const;
|
float spacing() const;
|
||||||
|
|
||||||
|
/// Return the centerline spacing between two Flow objects (current and some other flow).
|
||||||
|
/// \remark this->spacing(other) == other.spacing(this)
|
||||||
float spacing(const Flow &other) const;
|
float spacing(const Flow &other) const;
|
||||||
void set_spacing(float spacing);
|
void set_spacing(float spacing);
|
||||||
void set_solid_spacing(const coord_t total_width) {
|
void set_solid_spacing(const coord_t total_width) {
|
||||||
@ -48,12 +57,18 @@ class Flow
|
|||||||
return scale_(this->spacing(other));
|
return scale_(this->spacing(other));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/// Static method to build a Flow object from an extrusion width config setting and some other context properties
|
||||||
static Flow new_from_config_width(FlowRole role, const ConfigOptionFloatOrPercent &width, float nozzle_diameter, float height, float bridge_flow_ratio);
|
static Flow new_from_config_width(FlowRole role, const ConfigOptionFloatOrPercent &width, float nozzle_diameter, float height, float bridge_flow_ratio);
|
||||||
|
|
||||||
|
/// Static method to build a Flow object from a specified centerline spacing (center-to-center).
|
||||||
static Flow new_from_spacing(float spacing, float nozzle_diameter, float height, bool bridge);
|
static Flow new_from_spacing(float spacing, float nozzle_diameter, float height, bool bridge);
|
||||||
template <class T> static T solid_spacing(const T total_width, const T spacing);
|
template <class T> static T solid_spacing(const T total_width, const T spacing);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static float _bridge_width(float nozzle_diameter, float bridge_flow_ratio);
|
static float _bridge_width(float nozzle_diameter, float bridge_flow_ratio);
|
||||||
|
/// Calculate a relatively sane extrusion width, based on height and nozzle diameter.
|
||||||
|
/// Algorithm used does not play nice with layer heights < 0.1mm.
|
||||||
static float _auto_width(FlowRole role, float nozzle_diameter, float height);
|
static float _auto_width(FlowRole role, float nozzle_diameter, float height);
|
||||||
static float _width_from_spacing(float spacing, float nozzle_diameter, float height, bool bridge);
|
static float _width_from_spacing(float spacing, float nozzle_diameter, float height, bool bridge);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user