libslic3r
Library for generating gcode from 3d models
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Slic3r::Flow Class Reference

Represents material flow; provides methods to predict material spacing. More...

#include <Flow.hpp>

Public Member Functions

 Flow (float _w, float _h, float _nd, bool _bridge=false)
 
float spacing () const
 
float spacing (const Flow &other) const
 
void set_spacing (float spacing)
 
void set_solid_spacing (const coord_t total_width)
 
void set_solid_spacing (const coordf_t total_width)
 
double mm3_per_mm () const
 
coord_t scaled_width () const
 
coord_t scaled_spacing () const
 
coord_t scaled_spacing (const Flow &other) const
 

Static Public Member Functions

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 an extrusion width config setting and some other context properties. More...
 
static Flow new_from_spacing (float spacing, float nozzle_diameter, float height, bool bridge)
 Static method to build a Flow object from a specified centerline spacing (center-to-center). More...
 
template<class T >
static T solid_spacing (const T total_width, const T spacing)
 

Public Attributes

float width
 
float height
 
float nozzle_diameter
 
bool bridge
 

Detailed Description

Represents material flow; provides methods to predict material spacing.

Constructor & Destructor Documentation

◆ Flow()

Slic3r::Flow::Flow ( float  _w,
float  _h,
float  _nd,
bool  _bridge = false 
)
inline

Member Function Documentation

◆ mm3_per_mm()

double Slic3r::Flow::mm3_per_mm ( ) const

◆ new_from_config_width()

Flow Slic3r::Flow::new_from_config_width ( FlowRole  role,
const ConfigOptionFloatOrPercent width,
float  nozzle_diameter,
float  height,
float  bridge_flow_ratio 
)
static

Static method to build a Flow object from an extrusion width config setting and some other context properties.

◆ new_from_spacing()

Flow Slic3r::Flow::new_from_spacing ( float  spacing,
float  nozzle_diameter,
float  height,
bool  bridge 
)
static

Static method to build a Flow object from a specified centerline spacing (center-to-center).

◆ scaled_spacing() [1/2]

coord_t Slic3r::Flow::scaled_spacing ( ) const
inline

◆ scaled_spacing() [2/2]

coord_t Slic3r::Flow::scaled_spacing ( const Flow other) const
inline

◆ scaled_width()

coord_t Slic3r::Flow::scaled_width ( ) const
inline

◆ set_solid_spacing() [1/2]

void Slic3r::Flow::set_solid_spacing ( const coord_t  total_width)
inline

◆ set_solid_spacing() [2/2]

void Slic3r::Flow::set_solid_spacing ( const coordf_t  total_width)
inline

◆ set_spacing()

void Slic3r::Flow::set_spacing ( float  spacing)

◆ solid_spacing()

template<class T >
template int Slic3r::Flow::solid_spacing< int > ( const T  total_width,
const T  spacing 
)
static

Calculate a new spacing to fill width with possibly integer number of lines, the first and last line being centered at the interval ends. This function possibly increases the spacing, never decreases, and for a narrow width the increase in spacing may become severe, therefore the adjustment is limited to 20% increase.

◆ spacing() [1/2]

float Slic3r::Flow::spacing ( ) const

Return the centerline spacing between two adjacent extrusions that have the same properties (width, etc). Models as a rectangle with semicircles at the ends.

◆ spacing() [2/2]

float Slic3r::Flow::spacing ( const Flow other) const

Return the centerline spacing between two Flow objects (current and some other flow).

Remarks
this->spacing(other) == other.spacing(this)

Member Data Documentation

◆ bridge

bool Slic3r::Flow::bridge

◆ height

float Slic3r::Flow::height

◆ nozzle_diameter

float Slic3r::Flow::nozzle_diameter

◆ width

float Slic3r::Flow::width

The documentation for this class was generated from the following files: