OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::MaterialType Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/MaterialType.hpp>

Static Public Member Functions

static const std::vector< MaterialTypeInfo > & all ()
static const MaterialTypeInfo * find (const std::string &name)
static bool get_temperature_range (const std::string &type, int &min_temp, int &max_temp)
static bool get_chamber_temperature_range (const std::string &type, int &chamber_min_temp, int &chamber_max_temp)
static bool get_adhesion_coefficient (const std::string &type, double &adhesion_coefficient)
static bool get_yield_strength (const std::string &type, double &yield_strength)
static bool get_thermal_length (const std::string &type, double &thermal_length)

Detailed Description

Member Function Documentation

◆ all()

const std::vector< MaterialTypeInfo > & Slic3r::MaterialType::all ( )
static
19{
20 static const std::vector<MaterialTypeInfo> material_types = {
21 {"ABS", 190, 300, 50, 65, 1, 0.1 , 100},
22 {"ABS-CF", 220, 300, 50, 65, 1, 0.1 , 100},
23 {"ABS-GF", 240, 280, 50, 65, 1, 0.1 , 100},
24 {"ASA", 220, 300, 50, 65, 1, 0.1 , 100},
25 {"ASA-CF", 230, 300, 50, 65, 1, 0.1 , 100},
26 {"ASA-GF", 240, 300, 50, 65, 1, 0.1 , 100},
27 {"ASA-AERO", 240, 280, 50, 65, 1, 0.1 , 100},
28 {"BVOH", 190, 240, 0, 70, 1, 0.02, 200},
29 {"CoPE", 190, 240, 0, 45, 1, 0.02, 200},
30 {"EVA", 175, 220, 0, 50, 1, 0.02, 200},
31 {"FLEX", 210, 230, 0, 50, 0.5, 0.02, 1000},
32 {"HIPS", 220, 270, 50, 60, 1, 0.02, 200},
33 {"PA", 235, 280, 50, 60, 1, 0.02, 100},
34 {"PA-CF", 240, 315, 50, 60, 1, 0.02, 100},
35 {"PA-GF", 240, 290, 50, 60, 1, 0.02, 100},
36 {"PA6", 260, 300, 50, 60, 1, 0.02, 100},
37 {"PA6-CF", 230, 300, 50, 60, 1, 0.02, 100},
38 {"PA6-GF", 260, 300, 50, 60, 1, 0.02, 100},
39 {"PA11", 275, 295, 50, 60, 1, 0.02, 100},
40 {"PA11-CF", 275, 295, 50, 60, 1, 0.02, 100},
41 {"PA11-GF", 275, 295, 50, 60, 1, 0.02, 100},
42 {"PA12", 250, 270, 50, 60, 1, 0.02, 100},
43 {"PA12-CF", 250, 300, 50, 60, 1, 0.02, 100},
44 {"PA12-GF", 255, 270, 50, 60, 1, 0.02, 100},
45 {"PAHT", 260, 310, 55, 65, 1, 0.02, 200},
46 {"PAHT-CF", 270, 310, 55, 65, 1, 0.02, 200},
47 {"PAHT-GF", 270, 310, 55, 65, 1, 0.02, 200},
48 {"PC", 240, 300, 60, 70, 1, 0.02, 40},
49 {"PC-ABS", 230, 270, 60, 70, 1, 0.02, 80},
50 {"PC-CF", 270, 295, 60, 70, 1, 0.02, 80},
51 {"PC-PBT", 260, 300, 60, 70, 1, 0.02, 40},
52 {"PCL", 130, 170, 0, 45, 1, 0.02, 200},
53 {"PCTG", 220, 300, 0, 55, 2, 0.02, 200},
54 {"PE", 175, 260, 45, 60, 1, 0.02, 200},
55 {"PE-CF", 175, 260, 45, 60, 1, 0.02, 200},
56 {"PE-GF", 230, 270, 45, 60, 1, 0.02, 200},
57 {"PEI-1010", 370, 430, 80, 100, 1, 0.02, 200},
58 {"PEI-1010-CF", 380, 430, 80, 100, 1, 0.02, 200},
59 {"PEI-1010-GF", 380, 430, 80, 100, 1, 0.02, 200},
60 {"PEI-9085", 350, 390, 80, 100, 1, 0.02, 200},
61 {"PEI-9085-CF", 365, 390, 80, 100, 1, 0.02, 200},
62 {"PEI-9085-GF", 370, 390, 80, 100, 1, 0.02, 200},
63 {"PEEK", 350, 460, 80, 100, 1, 0.02, 200},
64 {"PEEK-CF", 380, 410, 80, 100, 1, 0.02, 200},
65 {"PEEK-GF", 375, 410, 80, 100, 1, 0.02, 200},
66 {"PEKK", 325, 400, 80, 100, 1, 0.02, 200},
67 {"PEKK-CF", 360, 400, 80, 100, 1, 0.02, 200},
68 {"PES", 340, 390, 80, 100, 1, 0.02, 200},
69 {"PET", 200, 290, 0, 55, 2, 0.3 , 100},
70 {"PET-CF", 240, 320, 0, 55, 2, 0.3 , 100},
71 {"PET-GF", 280, 320, 0, 55, 2, 0.3 , 100},
72 {"PETG", 190, 260, 0, 55, 2, 0.3 , 100},
73 {"PETG-CF", 230, 290, 0, 55, 1, 0.3 , 100},
74 {"PETG-GF", 210, 270, 0, 55, 1, 0.3 , 100},
75 {"PHA", 190, 250, 0, 55, 1, 0.02, 200},
76 {"PI", 390, 410, 90, 100, 1, 0.02, 200},
77 {"PLA", 180, 240, 0, 45, 1, 0.02, 200},
78 {"PLA-AERO", 220, 270, 0, 55, 1, 0.02, 200},
79 {"PLA-CF", 190, 250, 0, 50, 1, 0.02, 200},
80 {"POM", 210, 250, 50, 65, 1, 0.02, 200},
81 {"PP", 200, 240, 45, 60, 1, 0.02, 200},
82 {"PP-CF", 210, 250, 45, 60, 1, 0.02, 200},
83 {"PP-GF", 220, 260, 45, 60, 1, 0.02, 200},
84 {"PPA-CF", 260, 300, 55, 70, 1, 0.02, 200},
85 {"PPA-GF", 260, 290, 55, 70, 1, 0.02, 200},
86 {"PPS", 300, 345, 90, 100, 1, 0.02, 200},
87 {"PPS-CF", 295, 350, 90, 100, 1, 0.02, 200},
88 {"PPSU", 360, 420, 90, 100, 1, 0.02, 200},
89 {"PSU", 350, 380, 90, 100, 1, 0.02, 200},
90 {"PVA", 185, 250, 0, 60, 1, 0.02, 200},
91 {"PVB", 190, 250, 0, 55, 1, 0.02, 200},
92 {"PVDF", 245, 265, 40, 60, 1, 0.02, 200},
93 {"SBS", 195, 250, 0, 55, 1, 0.02, 200},
94 {"TPI", 420, 445, 90, 100, 1, 0.02, 200},
95 {"TPU", 175, 260, 0, 50, 0.5, 0.02, 1000}
96 };
97
98 return material_types;
99}

Referenced by find(), and Slic3r::PrintConfigDef::init_fff_params().

Here is the caller graph for this function:

◆ find()

const MaterialTypeInfo * Slic3r::MaterialType::find ( const std::string & name)
static
102{
103 const auto& types = all();
104 const auto it = std::find_if(types.begin(), types.end(), [&name](const MaterialTypeInfo& info) { return info.name == name; });
105 return it != types.end() ? &(*it) : nullptr;
106}
static const std::vector< MaterialTypeInfo > & all()
Definition MaterialType.cpp:18

References all().

Referenced by get_adhesion_coefficient(), get_chamber_temperature_range(), get_temperature_range(), get_thermal_length(), get_yield_strength(), and Slic3r::normalize_filament_type().

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

◆ get_adhesion_coefficient()

bool Slic3r::MaterialType::get_adhesion_coefficient ( const std::string & type,
double & adhesion_coefficient )
static
137{
138 adhesion_coefficient = DEFAULT_ADHESION_COEFFICIENT;
139
140 if (const auto* info = find(type)) {
141 adhesion_coefficient = info->adhesion_coefficient;
142 return true;
143 }
144
145 return false;
146}
static const MaterialTypeInfo * find(const std::string &name)
Definition MaterialType.cpp:101
constexpr double DEFAULT_ADHESION_COEFFICIENT
Definition MaterialType.cpp:13

References find().

Referenced by Slic3r::getadhesionCoeff(), and Slic3r::getadhesionCoeff().

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

◆ get_chamber_temperature_range()

bool Slic3r::MaterialType::get_chamber_temperature_range ( const std::string & type,
int & chamber_min_temp,
int & chamber_max_temp )
static
123{
124 chamber_min_temp = DEFAULT_CHAMBER_MIN_TEMP;
125 chamber_max_temp = DEFAULT_CHAMBER_MAX_TEMP;
126
127 if (const auto* info = find(type)) {
128 chamber_min_temp = info->chamber_min_temp;
129 chamber_max_temp = info->chamber_max_temp;
130 return true;
131 }
132
133 return false;
134}
constexpr int DEFAULT_CHAMBER_MIN_TEMP
Definition MaterialType.cpp:11
constexpr int DEFAULT_CHAMBER_MAX_TEMP
Definition MaterialType.cpp:12

References find().

Referenced by Slic3r::GUI::ConfigManipulation::check_chamber_temperature().

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

◆ get_temperature_range()

bool Slic3r::MaterialType::get_temperature_range ( const std::string & type,
int & min_temp,
int & max_temp )
static
109{
110 min_temp = DEFAULT_MIN_TEMP;
111 max_temp = DEFAULT_MAX_TEMP;
112
113 if (const auto* info = find(type)) {
114 min_temp = info->min_temp;
115 max_temp = info->max_temp;
116 return true;
117 }
118
119 return false;
120}
constexpr int DEFAULT_MIN_TEMP
Definition MaterialType.cpp:9
constexpr int DEFAULT_MAX_TEMP
Definition MaterialType.cpp:10

References find().

Referenced by Slic3r::Print::check_multi_filaments_compatibility(), Slic3r::GUI::ConfigManipulation::check_nozzle_recommended_temperature_range(), and Slic3r::Print::get_filament_temp_type().

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

◆ get_thermal_length()

bool Slic3r::MaterialType::get_thermal_length ( const std::string & type,
double & thermal_length )
static
161{
162 thermal_length = DEFAULT_THERMAL_LENGTH;
163
164 if (const auto* info = find(type)) {
165 thermal_length = info->thermal_length;
166 return true;
167 }
168
169 return false;
170}
constexpr double DEFAULT_THERMAL_LENGTH
Definition MaterialType.cpp:15

References find().

Referenced by Slic3r::Model::getThermalLength().

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

◆ get_yield_strength()

bool Slic3r::MaterialType::get_yield_strength ( const std::string & type,
double & yield_strength )
static
149{
150 yield_strength = DEFAULT_YIELD_STRENGTH;
151
152 if (const auto* info = find(type)) {
153 yield_strength = info->yield_strength;
154 return true;
155 }
156
157 return false;
158}
constexpr double DEFAULT_YIELD_STRENGTH
Definition MaterialType.cpp:14

References find().

Referenced by Slic3r::SupportSpotsGenerator::Params::get_bed_adhesion_yield_strength().

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

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