OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::FillLightning::Generator Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Fill/Lightning/Generator.hpp>

Collaboration diagram for Slic3r::FillLightning::Generator:

Public Member Functions

 Generator (const PrintObject &print_object, const std::function< void()> &throw_on_cancel_callback)
const Layer & getTreesForLayer (const size_t &layer_id) const
std::vector< Polygons > & Overhangs ()
float infilll_extrusion_width () const
 Generator (PrintObject *m_object, std::vector< Polygons > &contours, std::vector< Polygons > &overhangs, const std::function< void()> &throw_on_cancel_callback, float density=0.15)

Protected Member Functions

void generateInitialInternalOverhangs (const PrintObject &print_object, const std::function< void()> &throw_on_cancel_callback)
void generateTrees (const PrintObject &print_object, const std::function< void()> &throw_on_cancel_callback)
void generateTreesforSupport (std::vector< Polygons > &contours, const std::function< void()> &throw_on_cancel_callback)

Protected Attributes

float m_infill_extrusion_width
coord_t m_supporting_radius
coord_t m_wall_supporting_radius
coord_t m_prune_length
coord_t m_straightening_max_distance
std::vector< Polygons > m_overhang_per_layer
std::vector< Layer > m_lightning_layers
std::vector< BoundingBox > bboxs

Detailed Description

Generates the Lightning Infill pattern.

The lightning infill pattern is designed to use a minimal amount of material to support the top skin of the print, while still printing with reasonably consistently flowing lines. It sacrifices strength completely in favour of top surface quality and reduced print time / material usage.

Lightning Infill is so named because the patterns it creates resemble a forked path with one main path and many small lines on the side. These paths grow out from the sides of the model just below where the top surface needs to be supported from the inside, so that minimal material is needed.

This pattern is based on a paper called "Ribbed Support Vaults for 3D Printing of Hollowed Objects" by Tricard, Claux and Lefebvre: https://www.researchgate.net/publication/333808588_Ribbed_Support_Vaults_for_3D_Printing_of_Hollowed_Objects

Constructor & Destructor Documentation

◆ Generator() [1/2]

Slic3r::FillLightning::Generator::Generator ( const PrintObject & print_object,
const std::function< void()> & throw_on_cancel_callback )
explicit

Create a generator to fill a certain mesh with infill.

This generator will pre-compute things in preparation of generating Lightning Infill for the infill areas in that mesh. The infill areas must already be calculated at this point.

91{
92 const PrintConfig &print_config = print_object.print()->config();
93 const PrintObjectConfig &object_config = print_object.config();
94 const PrintRegionConfig &region_config = print_object.shared_regions()->all_regions.front()->config();
95 const std::vector<double> &nozzle_diameters = print_config.nozzle_diameter.values;
96 double max_nozzle_diameter = *std::max_element(nozzle_diameters.begin(), nozzle_diameters.end());
97 const int n_multiline = region_config.fill_multiline.value;
98// const int infill_extruder = region_config.infill_extruder.value;
99 const double default_infill_extrusion_width = Flow::auto_extrusion_width(FlowRole::frInfill, float(max_nozzle_diameter));
100 // Note: There's not going to be a layer below the first one, so the 'initial layer height' doesn't have to be taken into account.
101 const double layer_thickness = scaled<double>(object_config.layer_height.value);
102
103 m_infill_extrusion_width = scaled<float>(region_config.sparse_infill_line_width.get_abs_value(max_nozzle_diameter));
104 // Orca: fix lightning infill divide by zero when infill line width is set to 0.
105 // firstly attempt to set it to the default line width. If that is not provided either, set it to a sane default
106 // based on the nozzle diameter.
109 object_config.line_width.get_abs_value(max_nozzle_diameter) < EPSILON ?
110 default_infill_extrusion_width :
111 object_config.line_width.get_abs_value(max_nozzle_diameter)
112 );
113
114 m_supporting_radius = coord_t(m_infill_extrusion_width) * 100 * n_multiline / region_config.sparse_infill_density;
115
116 const double lightning_infill_overhang_angle = region_config.lightning_overhang_angle.value * M_PI / 180.0;
117 const double lightning_infill_prune_angle = region_config.lightning_prune_angle.value * M_PI / 180.0;
118 const double lightning_infill_straightening_angle = region_config.lightning_straightening_angle.value * M_PI / 180.0;
119 m_wall_supporting_radius = coord_t(layer_thickness * std::tan(lightning_infill_overhang_angle));
120 m_prune_length = coord_t(layer_thickness * std::tan(lightning_infill_prune_angle));
121 m_straightening_max_distance = coord_t(layer_thickness * std::tan(lightning_infill_straightening_angle));
122
123 generateInitialInternalOverhangs(print_object, throw_on_cancel_callback);
124 generateTrees(print_object, throw_on_cancel_callback);
125}
#define EPSILON
Definition ColorUtils.cpp:64
#define M_PI
Definition ExtrusionSimulator.cpp:31
coord_t m_prune_length
Definition Generator.hpp:110
coord_t m_supporting_radius
Definition Generator.hpp:92
void generateInitialInternalOverhangs(const PrintObject &print_object, const std::function< void()> &throw_on_cancel_callback)
Definition Generator.cpp:175
float m_infill_extrusion_width
Definition Generator.hpp:87
void generateTrees(const PrintObject &print_object, const std::function< void()> &throw_on_cancel_callback)
Definition Generator.cpp:203
coord_t m_straightening_max_distance
Definition Generator.hpp:120
coord_t m_wall_supporting_radius
Definition Generator.hpp:101
static float auto_extrusion_width(FlowRole role, float nozzle_diameter)
Definition Flow.cpp:27
int64_t coord_t
Definition libslic3r.h:48
BoundingBox scaled(const BoundingBoxf &bb)
Definition BoundingBox.hpp:284
zaa_minimize_perimeter_height PrintRegionConfig
Definition PrintConfig.hpp:2183
@ frInfill
Definition Flow.hpp:21
zaa_minimize_perimeter_height PrintObjectConfig
Definition PrintConfig.hpp:2183

References Slic3r::PrintObjectRegions::all_regions, Slic3r::Flow::auto_extrusion_width(), Slic3r::Print::config(), Slic3r::PrintObject::config(), EPSILON, Slic3r::frInfill, generateInitialInternalOverhangs(), generateTrees(), m_infill_extrusion_width, M_PI, m_prune_length, m_straightening_max_distance, m_supporting_radius, m_wall_supporting_radius, Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnum, COUNT >::print(), Slic3r::PrintObjectConfig, Slic3r::PrintRegionConfig, Slic3r::scaled(), and Slic3r::PrintObject::shared_regions().

Here is the call graph for this function:

◆ Generator() [2/2]

Slic3r::FillLightning::Generator::Generator ( PrintObject * m_object,
std::vector< Polygons > & contours,
std::vector< Polygons > & overhangs,
const std::function< void()> & throw_on_cancel_callback,
float density = 0.15 )
128{
129 const PrintConfig &print_config = m_object->print()->config();
130 const PrintObjectConfig &object_config = m_object->config();
131 const PrintRegionConfig &region_config = m_object->shared_regions()->all_regions.front()->config();
132 const std::vector<double> &nozzle_diameters = print_config.nozzle_diameter.values;
133 double max_nozzle_diameter = *std::max_element(nozzle_diameters.begin(), nozzle_diameters.end());
134// const int infill_extruder = region_config.infill_extruder.value;
135 const double default_infill_extrusion_width = Flow::auto_extrusion_width(FlowRole::frInfill, float(max_nozzle_diameter));
136 // Note: There's not going to be a layer below the first one, so the 'initial layer height' doesn't have to be taken into account.
137 const double layer_thickness = scaled<double>(object_config.layer_height.value);
138
139 m_infill_extrusion_width = scaled<float>(region_config.sparse_infill_line_width.get_abs_value(max_nozzle_diameter));
140 // Orca: fix lightning infill divide by zero when infill line width is set to 0.
141 // firstly attempt to set it to the default line width. If that is not provided either, set it to a sane default
142 // based on the nozzle diameter.
145 object_config.line_width.get_abs_value(max_nozzle_diameter) < EPSILON ?
146 default_infill_extrusion_width :
147 object_config.line_width.get_abs_value(max_nozzle_diameter)
148 );
149 //m_supporting_radius: against to the density of lightning, failures may happen if set to high density
150 //higher density lightning makes support harder, more time-consuming on computing and printing, but more reliable on supporting overhangs
151 //lower density lightning performs opposite
152 //TODO: decide whether enable density controller in advanced options or not
153 density = std::max(0.15f, density);
155 // Keep support-lightning behavior fixed and independent of user print-region angles.
156 const double lightning_infill_overhang_angle = M_PI / 4; // 45 degrees
157 const double lightning_infill_prune_angle = M_PI / 4; // 45 degrees
158 const double lightning_infill_straightening_angle = M_PI / 4; // 45 degrees
159 m_wall_supporting_radius = layer_thickness * std::tan(lightning_infill_overhang_angle);
160 m_prune_length = layer_thickness * std::tan(lightning_infill_prune_angle);
161 m_straightening_max_distance = layer_thickness * std::tan(lightning_infill_straightening_angle);
162
163 m_overhang_per_layer = overhangs;
164
165 generateTreesforSupport(contours, throw_on_cancel_callback);
166
167 //for (size_t i = 0; i < overhangs.size(); i++)
168 //{
169 // auto svg = draw_two_overhangs_to_svg(i, to_expolygons(contours[i]), to_expolygons(overhangs[i]));
170 // for (auto& root : m_lightning_layers[i].tree_roots)
171 // root->draw_tree(svg);
172 //}
173}
void generateTreesforSupport(std::vector< Polygons > &contours, const std::function< void()> &throw_on_cancel_callback)
Definition Generator.cpp:260
std::vector< Polygons > m_overhang_per_layer
Definition Generator.hpp:127

References Slic3r::PrintObjectRegions::all_regions, Slic3r::Flow::auto_extrusion_width(), Slic3r::Print::config(), Slic3r::PrintObject::config(), EPSILON, Slic3r::frInfill, generateTreesforSupport(), m_infill_extrusion_width, m_overhang_per_layer, M_PI, m_prune_length, m_straightening_max_distance, m_supporting_radius, m_wall_supporting_radius, Slic3r::PrintObjectBaseWithState< PrintType, PrintObjectStepEnum, COUNT >::print(), Slic3r::PrintObjectConfig, Slic3r::PrintRegionConfig, Slic3r::scaled(), and Slic3r::PrintObject::shared_regions().

Here is the call graph for this function:

Member Function Documentation

◆ generateInitialInternalOverhangs()

void Slic3r::FillLightning::Generator::generateInitialInternalOverhangs ( const PrintObject & print_object,
const std::function< void()> & throw_on_cancel_callback )
protected

Calculate the overhangs above the infill areas that need to be supported by infill.

Normally, overhangs are only generated for the outside of the model and only when support is generated. For this pattern, we also need to generate overhang areas for the inside of the model.

176{
177 m_overhang_per_layer.resize(print_object.layers().size());
178
179 Polygons infill_area_above;
180 //Iterate from top to bottom, to subtract the overhang areas above from the overhang areas on the layer below, to get only overhang in the top layer where it is overhanging.
181 for (int layer_nr = int(print_object.layers().size()) - 1; layer_nr >= 0; --layer_nr) {
182 throw_on_cancel_callback();
183 Polygons infill_area_here;
184 for (const LayerRegion* layerm : print_object.get_layer(layer_nr)->regions())
185 for (const Surface& surface : layerm->fill_surfaces.surfaces)
186 if (surface.surface_type == stInternal || surface.surface_type == stInternalVoid)
187 append(infill_area_here, to_polygons(surface.expolygon));
188
189 //Remove the part of the infill area that is already supported by the walls.
190 Polygons overhang = diff(offset(infill_area_here, -float(m_wall_supporting_radius)), infill_area_above);
191
192 m_overhang_per_layer[layer_nr] = overhang;
193 infill_area_above = std::move(infill_area_here);
194 }
195}
std::vector< Polygon, PointsAllocator< Polygon > > Polygons
Definition Polygon.hpp:22
Slic3r::Polygons offset(const Slic3r::Polygon &polygon, const float delta, JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:582
Polygons to_polygons(const ExPolygon &src)
Definition ExPolygon.hpp:307
@ stInternal
Definition Surface.hpp:26
@ stInternalVoid
Definition Surface.hpp:35
void append(std::vector< T, Alloc > &dest, const std::vector< T, Alloc2 > &src)
Definition libslic3r.h:157
Slic3r::Polygons diff(const Slic3r::Polygon &subject, const Slic3r::Polygon &clip, ApplySafetyOffset do_safety_offset)
Definition ClipperUtils.cpp:731

References Slic3r::append(), Slic3r::diff(), Slic3r::Surface::expolygon, Slic3r::PrintObject::get_layer(), Slic3r::PrintObject::layers(), m_overhang_per_layer, m_wall_supporting_radius, Slic3r::offset(), Slic3r::Layer::regions(), Slic3r::ConstVectorOfPtrsAdaptor< T >::size(), Slic3r::stInternal, Slic3r::stInternalVoid, Slic3r::Surface::surface_type, and Slic3r::to_polygons().

Referenced by Generator().

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

◆ generateTrees()

void Slic3r::FillLightning::Generator::generateTrees ( const PrintObject & print_object,
const std::function< void()> & throw_on_cancel_callback )
protected

Calculate the tree structure of all layers.

204{
205 const auto _locator_cell_size = locator_cell_size();
206 m_lightning_layers.resize(print_object.layers().size());
207 bboxs.resize(print_object.layers().size());
208 std::vector<Polygons> infill_outlines(print_object.layers().size(), Polygons());
209
210 // For-each layer from top to bottom:
211 for (int layer_id = int(print_object.layers().size()) - 1; layer_id >= 0; layer_id--) {
212 throw_on_cancel_callback();
213 for (const LayerRegion *layerm : print_object.get_layer(layer_id)->regions())
214 for (const Surface &surface : layerm->fill_surfaces.surfaces)
215 if (surface.surface_type == stInternal || surface.surface_type == stInternalVoid)
216 append(infill_outlines[layer_id], to_polygons(surface.expolygon));
217 }
218
219 // For various operations its beneficial to quickly locate nearby features on the polygon:
220 const size_t top_layer_id = print_object.layers().size() - 1;
221 EdgeGrid::Grid outlines_locator(get_extents(infill_outlines[top_layer_id]).inflated(SCALED_EPSILON));
222 outlines_locator.create(infill_outlines[top_layer_id], _locator_cell_size);
223
224 // For-each layer from top to bottom:
225 for (int layer_id = int(top_layer_id); layer_id >= 0; layer_id--) {
226 throw_on_cancel_callback();
227 Layer &current_lightning_layer = m_lightning_layers[layer_id];
228 const Polygons &current_outlines = infill_outlines[layer_id];
229 const BoundingBox &current_outlines_bbox = get_extents(current_outlines);
230
231 bboxs[layer_id] = get_extents(current_outlines);
232
233 // register all trees propagated from the previous layer as to-be-reconnected
234 std::vector<NodeSPtr> to_be_reconnected_tree_roots = current_lightning_layer.tree_roots;
235
236 current_lightning_layer.generateNewTrees(m_overhang_per_layer[layer_id], current_outlines, current_outlines_bbox, outlines_locator, m_supporting_radius, m_wall_supporting_radius, throw_on_cancel_callback);
237 current_lightning_layer.reconnectRoots(to_be_reconnected_tree_roots, current_outlines, current_outlines_bbox, outlines_locator, m_supporting_radius, m_wall_supporting_radius);
238
239 // Initialize trees for next lower layer from the current one.
240 if (layer_id == 0)
241 return;
242
243 const Polygons &below_outlines = infill_outlines[layer_id - 1];
244 BoundingBox below_outlines_bbox = get_extents(below_outlines).inflated(SCALED_EPSILON);
245 if (const BoundingBox &outlines_locator_bbox = outlines_locator.bbox(); outlines_locator_bbox.defined)
246 below_outlines_bbox.merge(outlines_locator_bbox);
247
248 if (!current_lightning_layer.tree_roots.empty())
249 below_outlines_bbox.merge(get_extents(current_lightning_layer.tree_roots).inflated(SCALED_EPSILON));
250
251 outlines_locator.set_bbox(below_outlines_bbox);
252 outlines_locator.create(below_outlines, _locator_cell_size);
253
254 std::vector<NodeSPtr>& lower_trees = m_lightning_layers[layer_id - 1].tree_roots;
255 for (auto& tree : current_lightning_layer.tree_roots)
256 tree->propagateToNextLayer(lower_trees, below_outlines, outlines_locator, m_prune_length, m_straightening_max_distance, _locator_cell_size / 2);
257 }
258}
void merge(const PointType &point)
Definition BoundingBox.cpp:75
BoundingBox inflated(coordf_t delta) const noexcept
Definition BoundingBox.hpp:228
std::vector< BoundingBox > bboxs
Definition Generator.hpp:136
std::vector< Layer > m_lightning_layers
Definition Generator.hpp:134
#define SCALED_EPSILON
Definition libslic3r.h:109
BoundingBox get_extents(const NodeSPtr &root_node)
Definition TreeNode.hpp:295
coord_t locator_cell_size()
Definition TreeNode.hpp:29

References Slic3r::append(), Slic3r::EdgeGrid::Grid::bbox(), bboxs, Slic3r::EdgeGrid::Grid::create(), Slic3r::BoundingBoxBase< PointType, APointsType >::defined, Slic3r::Surface::expolygon, Slic3r::FillLightning::Layer::generateNewTrees(), Slic3r::FillLightning::get_extents(), Slic3r::PrintObject::get_layer(), Slic3r::BoundingBox::inflated(), Slic3r::PrintObject::layers(), Slic3r::FillLightning::locator_cell_size(), m_lightning_layers, m_overhang_per_layer, m_prune_length, m_straightening_max_distance, m_supporting_radius, m_wall_supporting_radius, Slic3r::BoundingBoxBase< PointType, APointsType >::merge(), Slic3r::FillLightning::Layer::reconnectRoots(), Slic3r::Layer::regions(), SCALED_EPSILON, Slic3r::EdgeGrid::Grid::set_bbox(), Slic3r::ConstVectorOfPtrsAdaptor< T >::size(), Slic3r::stInternal, Slic3r::stInternalVoid, Slic3r::Surface::surface_type, Slic3r::to_polygons(), and Slic3r::FillLightning::Layer::tree_roots.

Referenced by Generator().

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

◆ generateTreesforSupport()

void Slic3r::FillLightning::Generator::generateTreesforSupport ( std::vector< Polygons > & contours,
const std::function< void()> & throw_on_cancel_callback )
protected
261{
262 if (contours.empty()) return;
263
264 m_lightning_layers.resize(contours.size());
265 bboxs.resize(contours.size());
266
267 const auto _locator_cell_size = locator_cell_size();
268 // For various operations its beneficial to quickly locate nearby features on the polygon:
269 const size_t top_layer_id = contours.size() - 1;
270 EdgeGrid::Grid outlines_locator(get_extents(contours[top_layer_id]).inflated(SCALED_EPSILON));
271 outlines_locator.create(contours[top_layer_id], _locator_cell_size);
272
273 // For-each layer from top to bottom:
274 for (int layer_id = int(top_layer_id); layer_id >= 0; layer_id--) {
275 throw_on_cancel_callback();
276 Layer& current_lightning_layer = m_lightning_layers[layer_id];
277 const Polygons& current_outlines = contours[layer_id];
278 const BoundingBox& current_outlines_bbox = get_extents(current_outlines);
279
280 bboxs[layer_id] = get_extents(current_outlines);
281
282 // register all trees propagated from the previous layer as to-be-reconnected
283 std::vector<NodeSPtr> to_be_reconnected_tree_roots = current_lightning_layer.tree_roots;
284
285 current_lightning_layer.generateNewTrees(m_overhang_per_layer[layer_id], current_outlines, current_outlines_bbox, outlines_locator, m_supporting_radius, m_wall_supporting_radius, throw_on_cancel_callback);
286 current_lightning_layer.reconnectRoots(to_be_reconnected_tree_roots, current_outlines, current_outlines_bbox, outlines_locator, m_supporting_radius, m_wall_supporting_radius);
287
288 // Initialize trees for next lower layer from the current one.
289 if (layer_id == 0)
290 return;
291
292 const Polygons& below_outlines = contours[layer_id - 1];
293 BoundingBox below_outlines_bbox = get_extents(below_outlines).inflated(SCALED_EPSILON);
294 if (const BoundingBox& outlines_locator_bbox = outlines_locator.bbox(); outlines_locator_bbox.defined)
295 below_outlines_bbox.merge(outlines_locator_bbox);
296
297 if (!current_lightning_layer.tree_roots.empty())
298 below_outlines_bbox.merge(get_extents(current_lightning_layer.tree_roots).inflated(SCALED_EPSILON));
299
300 outlines_locator.set_bbox(below_outlines_bbox);
301 outlines_locator.create(below_outlines, _locator_cell_size);
302
303 std::vector<NodeSPtr>& lower_trees = m_lightning_layers[layer_id - 1].tree_roots;
304 for (auto& tree : current_lightning_layer.tree_roots)
305 tree->propagateToNextLayer(lower_trees, below_outlines, outlines_locator, m_prune_length, m_straightening_max_distance, _locator_cell_size / 2);
306 }
307}

References Slic3r::EdgeGrid::Grid::bbox(), bboxs, Slic3r::EdgeGrid::Grid::create(), Slic3r::BoundingBoxBase< PointType, APointsType >::defined, Slic3r::FillLightning::Layer::generateNewTrees(), Slic3r::FillLightning::get_extents(), Slic3r::BoundingBox::inflated(), Slic3r::FillLightning::locator_cell_size(), m_lightning_layers, m_overhang_per_layer, m_prune_length, m_straightening_max_distance, m_supporting_radius, m_wall_supporting_radius, Slic3r::BoundingBoxBase< PointType, APointsType >::merge(), Slic3r::FillLightning::Layer::reconnectRoots(), SCALED_EPSILON, Slic3r::EdgeGrid::Grid::set_bbox(), and Slic3r::FillLightning::Layer::tree_roots.

Referenced by Generator().

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

◆ getTreesForLayer()

const Layer & Slic3r::FillLightning::Generator::getTreesForLayer ( const size_t & layer_id) const

Get a tree of paths generated for a certain layer of the mesh.

This tree represents the paths that must be traced to print the infill.

Parameters
layer_idThe layer number to get the path tree for. This is within the range of layers of the mesh (not the global layer numbers).
Returns
A tree structure representing paths to print to create the Lightning Infill pattern.
198{
199 assert(layer_id < m_lightning_layers.size());
200 return m_lightning_layers[layer_id];
201}

References m_lightning_layers.

◆ infilll_extrusion_width()

float Slic3r::FillLightning::Generator::infilll_extrusion_width ( ) const
inline

◆ Overhangs()

std::vector< Polygons > & Slic3r::FillLightning::Generator::Overhangs ( )
inline
64{ return m_overhang_per_layer; }

References m_overhang_per_layer.

Member Data Documentation

◆ bboxs

std::vector<BoundingBox> Slic3r::FillLightning::Generator::bboxs
protected

◆ m_infill_extrusion_width

float Slic3r::FillLightning::Generator::m_infill_extrusion_width
protected

◆ m_lightning_layers

std::vector<Layer> Slic3r::FillLightning::Generator::m_lightning_layers
protected

For each layer, the generated lightning paths.

This is generated by generateTrees.

Referenced by generateTrees(), generateTreesforSupport(), and getTreesForLayer().

◆ m_overhang_per_layer

std::vector<Polygons> Slic3r::FillLightning::Generator::m_overhang_per_layer
protected

For each layer, the overhang that needs to be supported by the pattern.

This is generated by generateInitialInternalOverhangs.

Referenced by Generator(), generateInitialInternalOverhangs(), generateTrees(), generateTreesforSupport(), and Overhangs().

◆ m_prune_length

coord_t Slic3r::FillLightning::Generator::m_prune_length
protected

How far each piece of infill can support other infill in the layer above.

This may be different than supporting_radius, because the infill is printed with one end floating in mid-air. This endpoint will sag more, so an infill line may need to be supported more than a skin line.

Referenced by Generator(), Generator(), generateTrees(), and generateTreesforSupport().

◆ m_straightening_max_distance

coord_t Slic3r::FillLightning::Generator::m_straightening_max_distance
protected

How far a line may be shifted in order to straighten the line out.

Straightening the line reduces material and time usage and reduces accelerations needed to print the pattern. However it makes the infill weak if lines are partially suspended next to the line on the previous layer.

Referenced by Generator(), Generator(), generateTrees(), and generateTreesforSupport().

◆ m_supporting_radius

coord_t Slic3r::FillLightning::Generator::m_supporting_radius
protected

How far each piece of infill can support skin in the layer above.

Referenced by Generator(), Generator(), generateTrees(), and generateTreesforSupport().

◆ m_wall_supporting_radius

coord_t Slic3r::FillLightning::Generator::m_wall_supporting_radius
protected

How far a wall can support the wall above it. If a wall completely supports the wall above it, no infill needs to support that.

This is similar to the overhang distance calculated for support. It is determined by the lightning_infill_overhang_angle setting.

Referenced by Generator(), Generator(), generateInitialInternalOverhangs(), generateTrees(), and generateTreesforSupport().


The documentation for this class was generated from the following files:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Fill/Lightning/Generator.hpp
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Fill/Lightning/Generator.cpp