#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Arachne/WallToolPaths.hpp>
Public Types | |
| using | ExtrusionLineSet = ankerl::unordered_dense::set<std::pair<const ExtrusionLine *, const ExtrusionLine *>, boost::hash<std::pair<const ExtrusionLine *, const ExtrusionLine *>>> |
Public Member Functions | |
| WallToolPaths (const Polygons &outline, coord_t bead_width_0, coord_t bead_width_x, size_t inset_count, coord_t wall_0_inset, coordf_t layer_height, const WallToolPathsParams ¶ms) | |
| const std::vector< VariableWidthLines > & | generate () |
| const std::vector< VariableWidthLines > & | getToolPaths () |
| void | separateOutInnerContour () |
| const Polygons & | getInnerContour () |
Static Public Member Functions | |
| static bool | removeEmptyToolPaths (std::vector< VariableWidthLines > &toolpaths) |
| static ExtrusionLineSet | getRegionOrder (const std::vector< ExtrusionLine * > &input, bool outer_to_inner) |
Protected Member Functions | |
| void | removeSmallLines (std::vector< VariableWidthLines > &toolpaths) |
Static Protected Member Functions | |
| static void | stitchToolPaths (std::vector< VariableWidthLines > &toolpaths, coord_t bead_width_x) |
| static void | simplifyToolPaths (std::vector< VariableWidthLines > &toolpaths, const WallToolPathsParams ¶ms) |
Private Attributes | |
| const Polygons & | outline |
| coord_t | bead_width_0 |
| coord_t | bead_width_x |
| size_t | inset_count |
| coord_t | wall_0_inset |
| coordf_t | layer_height |
| bool | print_thin_walls |
| coord_t | min_feature_size |
| coord_t | min_bead_width |
| double | small_area_length |
| coord_t | wall_transition_filter_deviation |
| The allowed line width deviation induced by filtering. | |
| bool | toolpaths_generated |
| std::vector< VariableWidthLines > | toolpaths |
| Polygons | inner_contour |
| const WallToolPathsParams | m_params |
| using Slic3r::Arachne::WallToolPaths::ExtrusionLineSet = ankerl::unordered_dense::set<std::pair<const ExtrusionLine *, const ExtrusionLine *>, boost::hash<std::pair<const ExtrusionLine *, const ExtrusionLine *>>> |
| Slic3r::Arachne::WallToolPaths::WallToolPaths | ( | const Polygons & | outline, |
| coord_t | bead_width_0, | ||
| coord_t | bead_width_x, | ||
| size_t | inset_count, | ||
| coord_t | wall_0_inset, | ||
| coordf_t | layer_height, | ||
| const WallToolPathsParams & | params ) |
A class that creates the toolpaths given an outline, nominal bead width and maximum amount of walls
| outline | An outline of the area in which the ToolPaths are to be generated |
| bead_width_0 | The bead width of the first wall used in the generation of the toolpaths |
| bead_width_x | The bead width of the inner walls used in the generation of the toolpaths |
| inset_count | The maximum number of parallel extrusion lines that make up the wall |
| wall_0_inset | How far to inset the outer wall, to make it adhere better to other walls. |
References bead_width_0, bead_width_x, Slic3r::Arachne::fill_outline_gaps, inset_count, layer_height, m_params, min_bead_width, min_feature_size, outline, print_thin_walls, Slic3r::scaled(), small_area_length, toolpaths_generated, wall_0_inset, and wall_transition_filter_deviation.
| const std::vector< VariableWidthLines > & Slic3r::Arachne::WallToolPaths::generate | ( | ) |
Generates the Toolpaths
References Slic3r::area(), bead_width_0, bead_width_x, Slic3r::Geometry::deg2rad(), Slic3r::Arachne::fixSelfIntersections(), Slic3r::Arachne::SkeletalTrapezoidation::generateToolpaths(), inset_count, layer_height, m_params, Slic3r::Arachne::BeadingStrategyFactory::makeStrategy(), min_bead_width, min_feature_size, Slic3r::offset(), outline, print_thin_walls, Slic3r::Arachne::removeColinearEdges(), Slic3r::Arachne::removeDegenerateVerts(), removeEmptyToolPaths(), Slic3r::Arachne::removeSmallAreas(), removeSmallLines(), Slic3r::Flow::rounded_rectangle_extrusion_width_from_spacing(), Slic3r::scaled(), separateOutInnerContour(), Slic3r::Arachne::simplify(), simplifyToolPaths(), small_area_length, stitchToolPaths(), toolpaths, toolpaths_generated, Slic3r::union_(), Slic3r::unscale(), Slic3r::unscaled(), wall_0_inset, and wall_transition_filter_deviation.
Referenced by getInnerContour(), and getToolPaths().
| const Polygons & Slic3r::Arachne::WallToolPaths::getInnerContour | ( | ) |
Gets the inner contour of the area which is inside of the generated tool paths.
If the walls haven't been generated yet, this will lazily call the generate() function to generate the walls with variable width. The resulting polygon will snugly match the inside of the variable-width walls where the walls get limited by the LimitedBeadingStrategy to a maximum wall count. If there are no walls, the outline will be returned.
References generate(), inner_contour, inset_count, outline, and toolpaths_generated.
|
static |
Get the order constraints of the insets when printing walls per region / hole. Each returned pair consists of adjacent wall lines where the left has an inset_idx one lower than the right.
Odd walls should always go after their enclosing wall polygons.
| outer_to_inner | Whether the wall polygons with a lower inset_idx should go before those with a higher one. |
Get the order constraints of the insets when printing walls per region / hole. Each returned pair consists of adjacent wall lines where the left has an inset_idx one lower than the right.
Odd walls follow the same order as even ones, so that the centre line of a narrow wall is an inner wall like any other when printing inner to outer.
| outer_to_inner | Whether the wall polygons with a lower inset_idx should go before those with a higher one. |
References Slic3r::grid(), Slic3r::Arachne::ExtrusionLine::inset_idx, and Slic3r::shorter_then().
| const std::vector< VariableWidthLines > & Slic3r::Arachne::WallToolPaths::getToolPaths | ( | ) |
Gets the toolpaths, if this called before generate() it will first generate the Toolpaths
References generate(), toolpaths, and toolpaths_generated.
Referenced by Slic3r::FillConcentric::_fill_surface_single(), Slic3r::FillSpiralInset::_fill_surface_single(), and Slic3r::FillConcentricInternal::fill_surface_extrusion().
|
static |
Removes empty paths from the toolpaths
| toolpaths | the VariableWidthPaths generated with generate() |
References toolpaths.
Referenced by generate().
|
protected |
Remove polylines shorter than half the smallest line width along that polyline.
References Slic3r::Arachne::ExtrusionLine::is_closed, Slic3r::Arachne::ExtrusionLine::is_odd, m_params, Slic3r::Arachne::shorterThan(), Slic3r::BoundingBoxBase< PointType, APointsType >::size(), and toolpaths.
Referenced by generate().
| void Slic3r::Arachne::WallToolPaths::separateOutInnerContour | ( | ) |
Compute the inner contour of the walls. This contour indicates where the walled area ends and its infill begins. The inside can then be filled, e.g. with skin/infill for the walls of a part, or with a pattern in the case of infill with extra infill walls.
References inner_contour, inset_count, Slic3r::pftEvenOdd, toolpaths, and Slic3r::union_().
Referenced by generate().
|
staticprotected |
Simplifies the variable-width toolpaths by calling the simplify on every line in the toolpath using the provided settings.
| toolpaths | The toolpaths vector to simplify |
| params | The settings as provided by the user |
References Slic3r::Arachne::meshfix_maximum_extrusion_area_deviation(), toolpaths, Slic3r::Arachne::WallToolPathsParams::wall_maximum_deviation, and Slic3r::Arachne::WallToolPathsParams::wall_maximum_resolution.
Referenced by generate().
|
staticprotected |
Stitch the polylines together and form closed polygons.
Works on both toolpaths and inner contours simultaneously.
References bead_width_x, Slic3r::debug_out_path(), Slic3r::SVG::draw(), Slic3r::SVG::draw_outline(), Slic3r::BoundingBoxBase< PointType, APointsType >::merge(), Slic3r::Arachne::PolylineStitcher< Paths, Path, Junction >::stitch(), and toolpaths.
Referenced by generate().
|
private |
Referenced by WallToolPaths(), and generate().
|
private |
Referenced by WallToolPaths(), generate(), and stitchToolPaths().
|
private |
Referenced by getInnerContour(), and separateOutInnerContour().
|
private |
Referenced by WallToolPaths(), generate(), getInnerContour(), and separateOutInnerContour().
|
private |
Referenced by WallToolPaths(), and generate().
|
private |
Referenced by WallToolPaths(), generate(), and removeSmallLines().
|
private |
Referenced by WallToolPaths(), and generate().
|
private |
Referenced by WallToolPaths(), and generate().
|
private |
Referenced by WallToolPaths(), generate(), and getInnerContour().
|
private |
Referenced by WallToolPaths(), and generate().
|
private |
Referenced by WallToolPaths(), and generate().
|
private |
|
private |
Referenced by WallToolPaths(), generate(), getInnerContour(), and getToolPaths().
|
private |
Referenced by WallToolPaths(), and generate().
|
private |
The allowed line width deviation induced by filtering.
Referenced by WallToolPaths(), and generate().