OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings Struct Reference

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

Collaboration diagram for Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings:

Public Member Functions

 TreeSupportMeshGroupSettings ()=default
 TreeSupportMeshGroupSettings (const PrintObject &print_object)

Public Attributes

coord_t layer_height { scaled<coord_t>(0.15) }
coord_t resolution { scaled<coord_t>(0.025) }
coord_t min_feature_size { scaled<coord_t>(0.1) }
double support_angle { 50. * M_PI / 180. }
coord_t support_line_width { scaled<coord_t>(0.4) }
coord_t support_roof_line_width { scaled<coord_t>(0.4) }
bool support_bottom_enable { false }
coord_t support_bottom_height { scaled<coord_t>(1.) }
bool support_material_buildplate_only { false }
coord_t support_xy_distance { scaled<coord_t>(0.7) }
coord_t support_xy_distance_1st_layer { scaled<coord_t>(0.7) }
coord_t support_xy_distance_overhang { scaled<coord_t>(0.2) }
coord_t support_top_distance { scaled<coord_t>(0.1) }
coord_t support_bottom_distance { scaled<coord_t>(0.1) }
coord_t support_interface_skip_height { scaled<coord_t>(0.3) }
bool support_roof_enable { false }
coord_t support_roof_layers { 2 }
bool support_floor_enable { false }
coord_t support_floor_layers { 2 }
double minimum_roof_area { scaled<double>(scaled<double>(1.)) }
std::vector< double > support_roof_angles {}
SupportMaterialInterfacePattern support_roof_pattern { smipAuto }
SupportMaterialPattern support_pattern { smpRectilinear }
coord_t support_line_spacing { scaled<coord_t>(2.66 - 0.4) }
coord_t support_bottom_offset { scaled<coord_t>(0.) }
int support_wall_count { 1 }
coord_t support_roof_line_distance { scaled<coord_t>(0.4) }
coord_t minimum_support_area { scaled<coord_t>(0.) }
coord_t minimum_bottom_area { scaled<coord_t>(1.0) }
coord_t support_offset { scaled<coord_t>(0.) }
double support_tree_angle { 60. * M_PI / 180. }
double support_tree_branch_diameter_angle { 5. * M_PI / 180. }
coord_t support_tree_branch_distance { scaled<coord_t>(1.) }
coord_t support_tree_branch_diameter { scaled<coord_t>(2.) }
double support_tree_angle_slow { 50. * M_PI / 180. }
coord_t support_tree_max_diameter_increase_by_merges_when_support_to_model { scaled<coord_t>(1.0) }
coord_t support_tree_min_height_to_model { scaled<coord_t>(1.0) }
coord_t support_tree_bp_diameter { scaled<coord_t>(7.5) }
double support_tree_top_rate { 15. }
coord_t support_tree_tip_diameter { scaled<coord_t>(0.4) }

Detailed Description

Constructor & Destructor Documentation

◆ TreeSupportMeshGroupSettings() [1/2]

Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::TreeSupportMeshGroupSettings ( )
default

◆ TreeSupportMeshGroupSettings() [2/2]

Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::TreeSupportMeshGroupSettings ( const PrintObject & print_object)
inlineexplicit
57 {
58 const PrintConfig &print_config = print_object.print()->config();
59 const PrintObjectConfig &config = print_object.config();
60 const SlicingParameters &slicing_params = print_object.slicing_parameters();
61 // const std::vector<unsigned int> printing_extruders = print_object.object_extruders();
62
63 // Support must be enabled and set to Tree style.
64 //assert(config.support_material);
65 //assert(config.support_material_style == smsTree || config.support_material_style == smsOrganic);
66
67 // Calculate maximum external perimeter width over all printing regions, taking into account the default layer height.
68 coordf_t external_perimeter_width = 0.;
69 for (size_t region_id = 0; region_id < print_object.num_printing_regions(); ++ region_id) {
70 const PrintRegion &region = print_object.printing_region(region_id);
71 external_perimeter_width = std::max<coordf_t>(external_perimeter_width, region.flow(print_object, frExternalPerimeter, config.layer_height).width());
72 }
73
74 this->layer_height = scaled<coord_t>(config.layer_height.value);
75 this->resolution = scaled<coord_t>(print_config.resolution.value);
76 // Arache feature
77 this->min_feature_size = scaled<coord_t>(config.min_feature_size.value);
78 // +1 makes the threshold inclusive
79 this->support_angle = 0.5 * M_PI - std::clamp<double>((config.support_threshold_angle + 1) * M_PI / 180., 0., 0.5 * M_PI);
80 this->support_line_width = support_material_flow(&print_object, config.layer_height).scaled_width();
81 this->support_roof_line_width = support_material_interface_flow(&print_object, config.layer_height).scaled_width();
82 const int bottom_interface_layers = number_of_support_interface_bottom_layers(config);
83 this->support_bottom_enable = bottom_interface_layers > 0;
85 bottom_interface_layers * this->layer_height :
86 0;
87 this->support_material_buildplate_only = config.support_on_build_plate_only;
88 this->support_xy_distance = scaled<coord_t>(config.support_object_xy_distance.value);
89 this->support_xy_distance_1st_layer = scaled<coord_t>(config.support_object_first_layer_gap.value);
90 // Separation of interfaces, it is likely smaller than support_xy_distance.
91 this->support_xy_distance_overhang = std::min(this->support_xy_distance, scaled<coord_t>(0.5 * external_perimeter_width));
92 this->support_top_distance = scaled<coord_t>(slicing_params.gap_support_object);
93 this->support_bottom_distance = scaled<coord_t>(slicing_params.gap_object_support);
94 this->support_roof_enable = config.support_interface_top_layers.value > 0;
95 this->support_roof_layers = config.support_interface_top_layers.value;
96 this->support_floor_enable = bottom_interface_layers > 0;
97 this->support_floor_layers = bottom_interface_layers;
98 this->support_roof_pattern = config.support_interface_pattern;
99 this->support_pattern = config.support_base_pattern;
100 this->support_line_spacing = scaled<coord_t>(config.support_base_pattern_spacing.value);
101 this->support_wall_count = std::max(1, config.tree_support_wall_count.value); // at least 1 wall for organic tree support
102 this->support_roof_line_distance = scaled<coord_t>(config.support_interface_spacing.value) + this->support_roof_line_width;
103 this->support_tree_branch_distance = scaled<coord_t>(config.tree_support_branch_distance_organic.value);
104 this->support_tree_angle = std::clamp<double>(config.tree_support_branch_angle_organic * M_PI / 180., 0., 0.5 * M_PI - EPSILON);
105 this->support_tree_angle_slow = std::clamp<double>(config.tree_support_angle_slow * M_PI / 180., 0., this->support_tree_angle - EPSILON);
106 this->support_tree_branch_diameter = scaled<coord_t>(config.tree_support_branch_diameter_organic.value);
107 this->support_tree_branch_diameter_angle = std::clamp<double>(config.tree_support_branch_diameter_angle * M_PI / 180., 0., 0.5 * M_PI - EPSILON);
108 this->support_tree_top_rate = config.tree_support_top_rate.value; // percent
109 // this->support_tree_tip_diameter = this->support_line_width;
110 this->support_tree_tip_diameter = std::clamp(scaled<coord_t>(config.tree_support_tip_diameter.value), (coord_t)0, this->support_tree_branch_diameter);
111 }
#define EPSILON
Definition ColorUtils.cpp:64
#define M_PI
Definition ExtrusionSimulator.cpp:31
coord_t scaled_width() const
Definition Flow.hpp:64
int64_t coord_t
Definition libslic3r.h:48
BoundingBox scaled(const BoundingBoxf &bb)
Definition BoundingBox.hpp:284
double coordf_t
Definition GUI_ObjectList.hpp:46
@ frExternalPerimeter
Definition Flow.hpp:19
int number_of_support_interface_bottom_layers(const PrintObjectConfig &object_config)
Definition SupportParameters.hpp:21
Flow support_material_flow(const PrintObject *object, float layer_height)
Definition Flow.cpp:239
zaa_minimize_perimeter_height PrintObjectConfig
Definition PrintConfig.hpp:2183
Flow support_material_interface_flow(const PrintObject *object, float layer_height)
Definition Flow.cpp:269
coord_t support_xy_distance
Definition TreeSupportCommon.hpp:149
SupportMaterialPattern support_pattern
Definition TreeSupportCommon.hpp:191
coord_t support_bottom_distance
Definition TreeSupportCommon.hpp:160
double support_tree_angle
Definition TreeSupportCommon.hpp:223
bool support_roof_enable
Definition TreeSupportCommon.hpp:172
coord_t support_xy_distance_overhang
Definition TreeSupportCommon.hpp:154
double support_angle
Definition TreeSupportCommon.hpp:133
coord_t support_floor_layers
Definition TreeSupportCommon.hpp:177
coord_t support_tree_branch_distance
Definition TreeSupportCommon.hpp:232
coord_t support_tree_tip_diameter
Definition TreeSupportCommon.hpp:271
coord_t support_roof_layers
Definition TreeSupportCommon.hpp:175
coord_t support_xy_distance_1st_layer
Definition TreeSupportCommon.hpp:150
bool support_floor_enable
Definition TreeSupportCommon.hpp:176
coord_t resolution
Definition TreeSupportCommon.hpp:121
int support_wall_count
Definition TreeSupportCommon.hpp:202
double support_tree_top_rate
Definition TreeSupportCommon.hpp:267
bool support_bottom_enable
Definition TreeSupportCommon.hpp:141
coord_t support_roof_line_width
Definition TreeSupportCommon.hpp:138
coord_t support_line_spacing
Definition TreeSupportCommon.hpp:194
double support_tree_branch_diameter_angle
Definition TreeSupportCommon.hpp:228
coord_t support_top_distance
Definition TreeSupportCommon.hpp:157
SupportMaterialInterfacePattern support_roof_pattern
Definition TreeSupportCommon.hpp:188
double support_tree_angle_slow
Definition TreeSupportCommon.hpp:245
coord_t support_tree_branch_diameter
Definition TreeSupportCommon.hpp:236
coord_t min_feature_size
Definition TreeSupportCommon.hpp:125
coord_t support_bottom_height
Definition TreeSupportCommon.hpp:144
bool support_material_buildplate_only
Definition TreeSupportCommon.hpp:145
coord_t layer_height
Definition TreeSupportCommon.hpp:116
coord_t support_roof_line_distance
Definition TreeSupportCommon.hpp:205
coord_t support_line_width
Definition TreeSupportCommon.hpp:136

References Slic3r::Print::config(), Slic3r::PrintObject::config(), EPSILON, Slic3r::PrintRegion::flow(), Slic3r::frExternalPerimeter, Slic3r::SlicingParameters::gap_object_support, Slic3r::SlicingParameters::gap_support_object, layer_height, M_PI, min_feature_size, Slic3r::PrintObject::num_printing_regions(), Slic3r::number_of_support_interface_bottom_layers(), Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnum, COUNT >::print(), Slic3r::PrintObject::printing_region(), Slic3r::PrintObjectConfig, resolution, Slic3r::scaled(), Slic3r::Flow::scaled_width(), Slic3r::PrintObject::slicing_parameters(), support_angle, support_bottom_distance, support_bottom_enable, support_bottom_height, support_floor_enable, support_floor_layers, support_line_spacing, support_line_width, support_material_buildplate_only, Slic3r::support_material_flow(), Slic3r::support_material_interface_flow(), support_pattern, support_roof_enable, support_roof_layers, support_roof_line_distance, support_roof_line_width, support_roof_pattern, support_top_distance, support_tree_angle, support_tree_angle_slow, support_tree_branch_diameter, support_tree_branch_diameter_angle, support_tree_branch_distance, support_tree_tip_diameter, support_tree_top_rate, support_wall_count, support_xy_distance, support_xy_distance_1st_layer, support_xy_distance_overhang, and Slic3r::Flow::width().

Here is the call graph for this function:

Member Data Documentation

◆ layer_height

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::layer_height { scaled<coord_t>(0.15) }

◆ min_feature_size

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::min_feature_size { scaled<coord_t>(0.1) }
125{ scaled<coord_t>(0.1) };

Referenced by TreeSupportMeshGroupSettings().

◆ minimum_bottom_area

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::minimum_bottom_area { scaled<coord_t>(1.0) }
211{ scaled<coord_t>(1.0) };

◆ minimum_roof_area

double Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::minimum_roof_area { scaled<double>(scaled<double>(1.)) }

◆ minimum_support_area

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::minimum_support_area { scaled<coord_t>(0.) }
208{ scaled<coord_t>(0.) };

◆ resolution

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::resolution { scaled<coord_t>(0.025) }

◆ support_angle

double Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_angle { 50. * M_PI / 180. }

◆ support_bottom_distance

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_bottom_distance { scaled<coord_t>(0.1) }

◆ support_bottom_enable

bool Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_bottom_enable { false }
141{ false };

Referenced by TreeSupportMeshGroupSettings().

◆ support_bottom_height

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_bottom_height { scaled<coord_t>(1.) }
144{ scaled<coord_t>(1.) };

Referenced by TreeSupportMeshGroupSettings().

◆ support_bottom_offset

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_bottom_offset { scaled<coord_t>(0.) }
197{ scaled<coord_t>(0.) };

◆ support_floor_enable

bool Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_floor_enable { false }
176{ false };

Referenced by TreeSupportMeshGroupSettings().

◆ support_floor_layers

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_floor_layers { 2 }
177{ 2 };

Referenced by TreeSupportMeshGroupSettings().

◆ support_interface_skip_height

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_interface_skip_height { scaled<coord_t>(0.3) }
164{ scaled<coord_t>(0.3) };

◆ support_line_spacing

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_line_spacing { scaled<coord_t>(2.66 - 0.4) }
194{ scaled<coord_t>(2.66 - 0.4) };

Referenced by TreeSupportMeshGroupSettings().

◆ support_line_width

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_line_width { scaled<coord_t>(0.4) }
136{ scaled<coord_t>(0.4) };

Referenced by TreeSupportMeshGroupSettings().

◆ support_material_buildplate_only

bool Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_material_buildplate_only { false }
145{ false };

Referenced by TreeSupportMeshGroupSettings().

◆ support_offset

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_offset { scaled<coord_t>(0.) }
214{ scaled<coord_t>(0.) };

◆ support_pattern

SupportMaterialPattern Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_pattern { smpRectilinear }
@ smpRectilinear
Definition PrintConfig.hpp:357

Referenced by TreeSupportMeshGroupSettings().

◆ support_roof_angles

std::vector<double> Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_roof_angles {}
185{};

◆ support_roof_enable

bool Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_roof_enable { false }
172{ false };

Referenced by TreeSupportMeshGroupSettings().

◆ support_roof_layers

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_roof_layers { 2 }

◆ support_roof_line_distance

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_roof_line_distance { scaled<coord_t>(0.4) }

◆ support_roof_line_width

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_roof_line_width { scaled<coord_t>(0.4) }
138{ scaled<coord_t>(0.4) };

Referenced by TreeSupportMeshGroupSettings().

◆ support_roof_pattern

SupportMaterialInterfacePattern Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_roof_pattern { smipAuto }
188{ smipAuto };
@ smipAuto
Definition PrintConfig.hpp:374

Referenced by TreeSupportMeshGroupSettings().

◆ support_top_distance

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_top_distance { scaled<coord_t>(0.1) }

◆ support_tree_angle

double Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_tree_angle { 60. * M_PI / 180. }
223{ 60. * M_PI / 180. };

Referenced by TreeSupportMeshGroupSettings().

◆ support_tree_angle_slow

double Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_tree_angle_slow { 50. * M_PI / 180. }
245{ 50. * M_PI / 180. };

Referenced by TreeSupportMeshGroupSettings().

◆ support_tree_bp_diameter

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_tree_bp_diameter { scaled<coord_t>(7.5) }
258{ scaled<coord_t>(7.5) };

◆ support_tree_branch_diameter

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_tree_branch_diameter { scaled<coord_t>(2.) }
236{ scaled<coord_t>(2.) };

Referenced by TreeSupportMeshGroupSettings().

◆ support_tree_branch_diameter_angle

double Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_tree_branch_diameter_angle { 5. * M_PI / 180. }
228{ 5. * M_PI / 180. };

Referenced by TreeSupportMeshGroupSettings().

◆ support_tree_branch_distance

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_tree_branch_distance { scaled<coord_t>(1.) }

◆ support_tree_max_diameter_increase_by_merges_when_support_to_model

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_tree_max_diameter_increase_by_merges_when_support_to_model { scaled<coord_t>(1.0) }
250{ scaled<coord_t>(1.0) };

◆ support_tree_min_height_to_model

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_tree_min_height_to_model { scaled<coord_t>(1.0) }
254{ scaled<coord_t>(1.0) };

◆ support_tree_tip_diameter

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_tree_tip_diameter { scaled<coord_t>(0.4) }
271{ scaled<coord_t>(0.4) };

Referenced by TreeSupportMeshGroupSettings().

◆ support_tree_top_rate

double Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_tree_top_rate { 15. }

◆ support_wall_count

int Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_wall_count { 1 }
202{ 1 };

Referenced by TreeSupportMeshGroupSettings().

◆ support_xy_distance

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_xy_distance { scaled<coord_t>(0.7) }

◆ support_xy_distance_1st_layer

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_xy_distance_1st_layer { scaled<coord_t>(0.7) }
150{ scaled<coord_t>(0.7) };

Referenced by TreeSupportMeshGroupSettings().

◆ support_xy_distance_overhang

coord_t Slic3r::TreeSupport3D::TreeSupportMeshGroupSettings::support_xy_distance_overhang { scaled<coord_t>(0.2) }
154{ scaled<coord_t>(0.2) };

Referenced by TreeSupportMeshGroupSettings().


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