OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::PressureEqualizer::GCodeLine Struct Reference
Collaboration diagram for Slic3r::PressureEqualizer::GCodeLine:

Public Member Functions

 GCodeLine ()
bool moving_xy () const
bool moving_z () const
bool extruding () const
bool retracting () const
bool deretracting () const
float dist_xy2 () const
float dist_xyz2 () const
float dist_xy () const
float dist_xyz () const
float dist_e () const
float feedrate () const
float time () const
float time_inv () const
float volumetric_correction_avg () const

Public Attributes

GCodeLineType type
std::vector< char > raw
size_t raw_length
bool modified
float pos_start [5]
float pos_end [5]
bool pos_provided [5]
size_t extruder_id
ExtrusionRole extrusion_role
float volumetric_extrusion_rate
float volumetric_extrusion_rate_start
float volumetric_extrusion_rate_end
float max_volumetric_extrusion_rate_slope_positive
float max_volumetric_extrusion_rate_slope_negative
bool adjustable_flow = false
bool extrude_set_speed_tag = false
bool extrude_end_tag = false

Detailed Description

Constructor & Destructor Documentation

◆ GCodeLine()

Slic3r::PressureEqualizer::GCodeLine::GCodeLine ( )
inline
114 :
116 raw_length(0),
117 modified(false),
118 extruder_id(0),
122 {}
@ GCODELINETYPE_INVALID
Definition PressureEqualizer.hpp:102
float volumetric_extrusion_rate
Definition PressureEqualizer.hpp:168
size_t extruder_id
Definition PressureEqualizer.hpp:163
size_t raw_length
Definition PressureEqualizer.hpp:151
bool modified
Definition PressureEqualizer.hpp:154
float volumetric_extrusion_rate_start
Definition PressureEqualizer.hpp:170
GCodeLineType type
Definition PressureEqualizer.hpp:147
float volumetric_extrusion_rate_end
Definition PressureEqualizer.hpp:172

References extruder_id, Slic3r::PressureEqualizer::GCODELINETYPE_INVALID, modified, raw_length, type, volumetric_extrusion_rate, volumetric_extrusion_rate_end, and volumetric_extrusion_rate_start.

Member Function Documentation

◆ deretracting()

bool Slic3r::PressureEqualizer::GCodeLine::deretracting ( ) const
inline
128{ return ! moving_xy() && pos_end[3] > pos_start[3]; }
float pos_end[5]
Definition PressureEqualizer.hpp:158
float pos_start[5]
Definition PressureEqualizer.hpp:157
bool moving_xy() const
Definition PressureEqualizer.hpp:124

References moving_xy(), pos_end, and pos_start.

Here is the call graph for this function:

◆ dist_e()

float Slic3r::PressureEqualizer::GCodeLine::dist_e ( ) const
inline
134{ return fabs(pos_end[3] - pos_start[3]); }

References pos_end, and pos_start.

◆ dist_xy()

float Slic3r::PressureEqualizer::GCodeLine::dist_xy ( ) const
inline
132{ return sqrt(dist_xy2()); }
float dist_xy2() const
Definition PressureEqualizer.hpp:130

References dist_xy2().

Here is the call graph for this function:

◆ dist_xy2()

float Slic3r::PressureEqualizer::GCodeLine::dist_xy2 ( ) const
inline
130{ return (pos_end[0] - pos_start[0]) * (pos_end[0] - pos_start[0]) + (pos_end[1] - pos_start[1]) * (pos_end[1] - pos_start[1]); }

References pos_end, and pos_start.

Referenced by dist_xy().

Here is the caller graph for this function:

◆ dist_xyz()

float Slic3r::PressureEqualizer::GCodeLine::dist_xyz ( ) const
inline
133{ return sqrt(dist_xyz2()); }
float dist_xyz2() const
Definition PressureEqualizer.hpp:131

References dist_xyz2().

Referenced by Slic3r::PressureEqualizer::adjust_volumetric_rate(), Slic3r::PressureEqualizer::output_gcode_line(), time(), and time_inv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dist_xyz2()

float Slic3r::PressureEqualizer::GCodeLine::dist_xyz2 ( ) const
inline
131{ return (pos_end[0] - pos_start[0]) * (pos_end[0] - pos_start[0]) + (pos_end[1] - pos_start[1]) * (pos_end[1] - pos_start[1]) + (pos_end[2] - pos_start[2]) * (pos_end[2] - pos_start[2]); }

References pos_end, and pos_start.

Referenced by dist_xyz().

Here is the caller graph for this function:

◆ extruding()

bool Slic3r::PressureEqualizer::GCodeLine::extruding ( ) const
inline
126{ return moving_xy() && pos_end[3] > pos_start[3]; }

References moving_xy(), pos_end, and pos_start.

Here is the call graph for this function:

◆ feedrate()

float Slic3r::PressureEqualizer::GCodeLine::feedrate ( ) const
inline
136{ return pos_end[4]; }

References pos_end.

Referenced by Slic3r::PressureEqualizer::adjust_volumetric_rate(), Slic3r::PressureEqualizer::output_gcode_line(), time(), and time_inv().

Here is the caller graph for this function:

◆ moving_xy()

bool Slic3r::PressureEqualizer::GCodeLine::moving_xy ( ) const
inline
124{ return fabs(pos_end[0] - pos_start[0]) > 0.f || fabs(pos_end[1] - pos_start[1]) > 0.f; }

References pos_end, and pos_start.

Referenced by deretracting(), and extruding().

Here is the caller graph for this function:

◆ moving_z()

bool Slic3r::PressureEqualizer::GCodeLine::moving_z ( ) const
inline
125{ return fabs(pos_end[2] - pos_start[2]) > 0.f; }

References pos_end, and pos_start.

◆ retracting()

bool Slic3r::PressureEqualizer::GCodeLine::retracting ( ) const
inline
127{ return pos_end[3] < pos_start[3]; }

References pos_end, and pos_start.

◆ time()

float Slic3r::PressureEqualizer::GCodeLine::time ( ) const
inline
137{ return dist_xyz() / feedrate(); }
float dist_xyz() const
Definition PressureEqualizer.hpp:133
float feedrate() const
Definition PressureEqualizer.hpp:136

References dist_xyz(), and feedrate().

Here is the call graph for this function:

◆ time_inv()

float Slic3r::PressureEqualizer::GCodeLine::time_inv ( ) const
inline
138{ return feedrate() / dist_xyz(); }

References dist_xyz(), and feedrate().

Here is the call graph for this function:

◆ volumetric_correction_avg()

float Slic3r::PressureEqualizer::GCodeLine::volumetric_correction_avg ( ) const
inline
139 {
140 // Orca: cap the correction to 0.05 - 1.00000001 to avoid zero feedrate
141 float avg_correction = std::max(0.05f,0.5f * (volumetric_extrusion_rate_start + volumetric_extrusion_rate_end) / volumetric_extrusion_rate);
142 assert(avg_correction > 0.f);
143 assert(avg_correction <= 1.00000001f);
144 return avg_correction;
145 }

References volumetric_extrusion_rate, volumetric_extrusion_rate_end, and volumetric_extrusion_rate_start.

Referenced by Slic3r::PressureEqualizer::output_gcode_line().

Here is the caller graph for this function:

Member Data Documentation

◆ adjustable_flow

bool Slic3r::PressureEqualizer::GCodeLine::adjustable_flow = false

◆ extrude_end_tag

bool Slic3r::PressureEqualizer::GCodeLine::extrude_end_tag = false

◆ extrude_set_speed_tag

bool Slic3r::PressureEqualizer::GCodeLine::extrude_set_speed_tag = false

◆ extruder_id

size_t Slic3r::PressureEqualizer::GCodeLine::extruder_id

◆ extrusion_role

◆ max_volumetric_extrusion_rate_slope_negative

float Slic3r::PressureEqualizer::GCodeLine::max_volumetric_extrusion_rate_slope_negative

◆ max_volumetric_extrusion_rate_slope_positive

float Slic3r::PressureEqualizer::GCodeLine::max_volumetric_extrusion_rate_slope_positive

◆ modified

◆ pos_end

◆ pos_provided

◆ pos_start

◆ raw

std::vector<char> Slic3r::PressureEqualizer::GCodeLine::raw

◆ raw_length

size_t Slic3r::PressureEqualizer::GCodeLine::raw_length

◆ type

GCodeLineType Slic3r::PressureEqualizer::GCodeLine::type

◆ volumetric_extrusion_rate

◆ volumetric_extrusion_rate_end

◆ volumetric_extrusion_rate_start


The documentation for this struct was generated from the following file: