Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::CoolingLine Struct Reference

Public Types

enum  Type {
  TYPE_SET_TOOL = 1 << 0 , TYPE_EXTRUDE_END = 1 << 1 , TYPE_BRIDGE_FAN_START = 1 << 2 , TYPE_BRIDGE_FAN_END = 1 << 3 ,
  TYPE_G0 = 1 << 4 , TYPE_G1 = 1 << 5 , TYPE_ADJUSTABLE = 1 << 6 , TYPE_EXTERNAL_PERIMETER = 1 << 7 ,
  TYPE_HAS_F = 1 << 8 , TYPE_WIPE = 1 << 9 , TYPE_G4 = 1 << 10 , TYPE_G92 = 1 << 11 ,
  TYPE_ADJUSTABLE_EMPTY = 1 << 12 , TYPE_SET_FAN_SPEED = 1 << 13 , TYPE_RESET_FAN_SPEED = 1 << 14
}
 

Public Member Functions

 CoolingLine (unsigned int type, size_t line_start, size_t line_end)
 
bool adjustable (bool slowdown_external_perimeters) const
 
bool adjustable () const
 

Public Attributes

size_t type
 
size_t line_start
 
size_t line_end
 
float length
 
float feedrate
 
float time
 
float time_max
 
int fan_speed
 
bool slowdown
 

Detailed Description

Member Enumeration Documentation

◆ Type

Enumerator
TYPE_SET_TOOL 
TYPE_EXTRUDE_END 
TYPE_BRIDGE_FAN_START 
TYPE_BRIDGE_FAN_END 
TYPE_G0 
TYPE_G1 
TYPE_ADJUSTABLE 
TYPE_EXTERNAL_PERIMETER 
TYPE_HAS_F 
TYPE_WIPE 
TYPE_G4 
TYPE_G92 
TYPE_ADJUSTABLE_EMPTY 
TYPE_SET_FAN_SPEED 
TYPE_RESET_FAN_SPEED 
46 {
47 TYPE_SET_TOOL = 1 << 0,
48 TYPE_EXTRUDE_END = 1 << 1,
49 TYPE_BRIDGE_FAN_START = 1 << 2,
50 TYPE_BRIDGE_FAN_END = 1 << 3,
51 TYPE_G0 = 1 << 4,
52 TYPE_G1 = 1 << 5,
53 TYPE_ADJUSTABLE = 1 << 6,
55 // The line sets a feedrate.
56 TYPE_HAS_F = 1 << 8,
57 TYPE_WIPE = 1 << 9,
58 TYPE_G4 = 1 << 10,
59 TYPE_G92 = 1 << 11,
60 // Would be TYPE_ADJUSTABLE, but the block of G-code lines has zero extrusion length, thus the block
61 // cannot have its speed adjusted. This should not happen (sic!).
62 TYPE_ADJUSTABLE_EMPTY = 1 << 12,
63 // Custom fan speed (introduced for overhang fan speed)
64 TYPE_SET_FAN_SPEED = 1 << 13,
65 TYPE_RESET_FAN_SPEED = 1 << 14,
66 };
@ TYPE_ADJUSTABLE
Definition CoolingBuffer.cpp:53
@ TYPE_G4
Definition CoolingBuffer.cpp:58
@ TYPE_WIPE
Definition CoolingBuffer.cpp:57
@ TYPE_G92
Definition CoolingBuffer.cpp:59
@ TYPE_BRIDGE_FAN_START
Definition CoolingBuffer.cpp:49
@ TYPE_HAS_F
Definition CoolingBuffer.cpp:56
@ TYPE_BRIDGE_FAN_END
Definition CoolingBuffer.cpp:50
@ TYPE_SET_FAN_SPEED
Definition CoolingBuffer.cpp:64
@ TYPE_G0
Definition CoolingBuffer.cpp:51
@ TYPE_EXTRUDE_END
Definition CoolingBuffer.cpp:48
@ TYPE_EXTERNAL_PERIMETER
Definition CoolingBuffer.cpp:54
@ TYPE_G1
Definition CoolingBuffer.cpp:52
@ TYPE_ADJUSTABLE_EMPTY
Definition CoolingBuffer.cpp:62
@ TYPE_SET_TOOL
Definition CoolingBuffer.cpp:47
@ TYPE_RESET_FAN_SPEED
Definition CoolingBuffer.cpp:65

Constructor & Destructor Documentation

◆ CoolingLine()

Slic3r::CoolingLine::CoolingLine ( unsigned int  type,
size_t  line_start,
size_t  line_end 
)
inline
68 :
70 length(0.f), feedrate(0.f), time(0.f), time_max(0.f), slowdown(false) {}
size_t line_start
Definition CoolingBuffer.cpp:84
float time
Definition CoolingBuffer.cpp:92
float time_max
Definition CoolingBuffer.cpp:94
bool slowdown
Definition CoolingBuffer.cpp:98
float feedrate
Definition CoolingBuffer.cpp:90
size_t type
Definition CoolingBuffer.cpp:82
float length
Definition CoolingBuffer.cpp:88
size_t line_end
Definition CoolingBuffer.cpp:86

Member Function Documentation

◆ adjustable() [1/2]

bool Slic3r::CoolingLine::adjustable ( ) const
inline
78 {
79 return (this->type & TYPE_ADJUSTABLE) && this->time < this->time_max;
80 }

References time, time_max, type, and TYPE_ADJUSTABLE.

◆ adjustable() [2/2]

bool Slic3r::CoolingLine::adjustable ( bool  slowdown_external_perimeters) const
inline
72 {
73 return (this->type & TYPE_ADJUSTABLE) &&
74 (! (this->type & TYPE_EXTERNAL_PERIMETER) || slowdown_external_perimeters) &&
75 this->time < this->time_max;
76 }

References time, time_max, type, TYPE_ADJUSTABLE, and TYPE_EXTERNAL_PERIMETER.

Member Data Documentation

◆ fan_speed

int Slic3r::CoolingLine::fan_speed

◆ feedrate

◆ length

float Slic3r::CoolingLine::length

◆ line_end

size_t Slic3r::CoolingLine::line_end

◆ line_start

size_t Slic3r::CoolingLine::line_start

◆ slowdown

bool Slic3r::CoolingLine::slowdown

◆ time

◆ time_max

float Slic3r::CoolingLine::time_max

◆ type

size_t Slic3r::CoolingLine::type

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