diff options
author | bubnikv <bubnikv@gmail.com> | 2017-07-19 16:53:43 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2017-07-19 16:53:43 +0300 |
commit | 2f2c0ddc992eb2a8d915d8e0da2f55102c4b968b (patch) | |
tree | fe7163990689f2d7c603d2e547d9e295a5152e6a /xs/src/libslic3r/Flow.hpp | |
parent | 9c1b1829cf1830393666ef00bb0b824d4960c9ae (diff) |
Refactored Fill / Flow for readability.
Added an "overlap" member variable to fill classes in the preparation
for futher move of the "infill / perimeter" overlap to the Fill class.
Moved the orientation predicates from Fill to Geometry.
Diffstat (limited to 'xs/src/libslic3r/Flow.hpp')
-rw-r--r-- | xs/src/libslic3r/Flow.hpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/xs/src/libslic3r/Flow.hpp b/xs/src/libslic3r/Flow.hpp index a01070c45..a058cc8b7 100644 --- a/xs/src/libslic3r/Flow.hpp +++ b/xs/src/libslic3r/Flow.hpp @@ -13,7 +13,6 @@ class PrintObject; #define BRIDGE_EXTRA_SPACING 0.05 // Overlap factor of perimeter lines. Currently no overlap. -// #define HAS_OVERLAP #ifdef HAS_PERIMETER_LINE_OVERLAP #define PERIMETER_LINE_OVERLAP_FACTOR 1.0 #endif @@ -37,28 +36,23 @@ public: // Non bridging flow: Layer height. // Bridging flow: Bridge thread diameter = layer height. float height; - // Nozzle diameter is + // Nozzle diameter. float nozzle_diameter; // Is it a bridge? bool bridge; - Flow(float _w, float _h, float _nd, bool _bridge = false) - : width(_w), height(_h), nozzle_diameter(_nd), bridge(_bridge) {}; - float spacing() const; - float spacing(const Flow &other) const; - double mm3_per_mm() const; + Flow(float _w, float _h, float _nd, bool _bridge = false) : + width(_w), height(_h), nozzle_diameter(_nd), bridge(_bridge) {}; + + float spacing() const; + float spacing(const Flow &other) const; + double mm3_per_mm() const; coord_t scaled_width() const { return coord_t(scale_(this->width)); }; coord_t scaled_spacing() const { return coord_t(scale_(this->spacing())); }; coord_t scaled_spacing(const Flow &other) const { return coord_t(scale_(this->spacing(other))); }; static Flow new_from_config_width(FlowRole role, const ConfigOptionFloatOrPercent &width, float nozzle_diameter, float height, float bridge_flow_ratio); static Flow new_from_spacing(float spacing, float nozzle_diameter, float height, bool bridge); - - private: - static float _bridge_width(float nozzle_diameter, float bridge_flow_ratio); - 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 _spacing(float width, float nozzle_diameter, float height, float bridge_flow_ratio); }; extern Flow support_material_flow(const PrintObject *object, float layer_height = 0.f); |