![]() |
Prusa Slicer 2.6.0
|
#include <src/libslic3r/Fill/Lightning/Generator.hpp>
Collaboration diagram for Slic3r::FillLightning::Generator:Public Member Functions | |
| Generator (const PrintObject &print_object, const coordf_t fill_density, const std::function< void()> &throw_on_cancel_callback) | |
| const Layer & | getTreesForLayer (const size_t &layer_id) const |
| float | infilll_extrusion_width () const |
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) |
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 |
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
|
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.
References Slic3r::PrintObjectRegions::all_regions, Slic3r::Flow::auto_extrusion_width(), Slic3r::PrintObject::config(), Slic3r::Print::config(), Slic3r::fill_density(), 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, PrintObjectStepEnumType, COUNT >::print(), Slic3r::PrintObjectConfig, Slic3r::PrintRegionConfig, and Slic3r::PrintObject::shared_regions().
Here is the call graph for this function:
|
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.
References Slic3r::append(), Slic3r::diff(), Slic3r::PrintObject::get_layer(), Slic3r::PrintObject::layers(), m_overhang_per_layer, m_wall_supporting_radius, Slic3r::offset(), Slic3r::opening(), Slic3r::Layer::regions(), SCALED_EPSILON, Slic3r::stInternal, Slic3r::stInternalVoid, Slic3r::to_polygons(), and Slic3r::union_().
Referenced by Generator().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Calculate the tree structure of all layers.
References Slic3r::append(), Slic3r::EdgeGrid::Grid::bbox(), Slic3r::EdgeGrid::Grid::create(), 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::stInternal, Slic3r::stInternalVoid, Slic3r::to_polygons(), Slic3r::FillLightning::Layer::tree_roots, and Slic3r::union_().
Referenced by Generator().
Here is the call graph for this function:
Here is the caller graph for this function: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.
| layer_id | The layer number to get the path tree for. This is within the range of layers of the mesh (not the global layer numbers). |
References m_lightning_layers.
Referenced by Slic3r::FillLightning::Filler::_fill_surface_single().
Here is the caller graph for this function:
|
inline |
References m_infill_extrusion_width.
|
protected |
Referenced by Generator(), and infilll_extrusion_width().
|
protected |
For each layer, the generated lightning paths.
This is generated by generateTrees.
Referenced by generateTrees(), and getTreesForLayer().
|
protected |
For each layer, the overhang that needs to be supported by the pattern.
This is generated by generateInitialInternalOverhangs.
Referenced by generateInitialInternalOverhangs(), and generateTrees().
|
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(), and generateTrees().
|
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(), and generateTrees().
|
protected |
How far each piece of infill can support skin in the layer above.
Referenced by Generator(), and generateTrees().
|
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(), generateInitialInternalOverhangs(), and generateTrees().