![]() |
Prusa Slicer 2.6.0
|
#include <src/libslic3r/Arachne/SkeletalTrapezoidation.hpp>
Collaboration diagram for Slic3r::Arachne::SkeletalTrapezoidation:Classes | |
| struct | TransitionMidRef |
Public Types | |
| using | Segment = PolygonsSegmentIndex |
| using | PointMap = ankerl::unordered_dense::map< Point, Point, PointHash > |
| using | NodeSet = ankerl::unordered_dense::set< node_t * > |
Public Member Functions | |
| SkeletalTrapezoidation (const Polygons &polys, const BeadingStrategy &beading_strategy, double transitioning_angle, coord_t discretization_step_size, coord_t transition_filter_dist, coord_t allowed_filter_deviation, coord_t beading_propagation_transition_dist) | |
| void | generateToolpaths (std::vector< VariableWidthLines > &generated_toolpaths, bool filter_outermost_central_edges=false) |
Public Attributes | |
| graph_t | graph |
Protected Member Functions | |
| void | constructFromPolygons (const Polygons &polys) |
| node_t & | makeNode (vd_t::vertex_type &vd_node, Point p) |
| Get the node which the VD node maps to, or create a new mapping if there wasn't any yet. | |
| void | transferEdge (Point from, Point to, vd_t::edge_type &vd_edge, edge_t *&prev_edge, Point &start_source_point, Point &end_source_point, const std::vector< Segment > &segments) |
| Points | discretize (const vd_t::edge_type &segment, const std::vector< Segment > &segments) |
| void | separatePointyQuadEndNodes () |
| void | updateIsCentral () |
| void | filterCentral (coord_t max_length) |
| bool | filterCentral (edge_t *starting_edge, coord_t traveled_dist, coord_t max_length) |
| void | filterOuterCentral () |
| void | updateBeadCount () |
| void | filterNoncentralRegions () |
| bool | filterNoncentralRegions (edge_t *to_edge, coord_t bead_count, coord_t traveled_dist, coord_t max_dist) |
| void | generateTransitionMids (ptr_vector_t< std::list< TransitionMiddle > > &edge_transitions) |
| void | filterTransitionMids () |
| std::list< TransitionMidRef > | dissolveNearbyTransitions (edge_t *edge_to_start, TransitionMiddle &origin_transition, coord_t traveled_dist, coord_t max_dist, bool going_up) |
| void | dissolveBeadCountRegion (edge_t *edge_to_start, coord_t from_bead_count, coord_t to_bead_count) |
| bool | filterEndOfCentralTransition (edge_t *edge_to_start, coord_t traveled_dist, coord_t max_dist, coord_t replacing_bead_count) |
| void | generateAllTransitionEnds (ptr_vector_t< std::list< TransitionEnd > > &edge_transition_ends) |
| void | applyTransitions (ptr_vector_t< std::list< TransitionEnd > > &edge_transition_ends) |
| void | generateTransitioningRibs () |
| void | generateTransitionEnds (edge_t &edge, coord_t mid_R, coord_t transition_lower_bead_count, ptr_vector_t< std::list< TransitionEnd > > &edge_transition_ends) |
| bool | generateTransitionEnd (edge_t &edge, coord_t start_pos, coord_t end_pos, coord_t transition_half_length, double start_rest, double end_rest, coord_t transition_lower_bead_count, ptr_vector_t< std::list< TransitionEnd > > &edge_transition_ends) |
| bool | isGoingDown (edge_t *outgoing, coord_t traveled_dist, coord_t transition_half_length, coord_t lower_bead_count) const |
| bool | isEndOfCentral (const edge_t &edge) const |
| void | generateExtraRibs () |
| void | generateSegments () |
| edge_t * | getQuadMaxRedgeTo (edge_t *quad_start_edge) |
| void | propagateBeadingsUpward (std::vector< edge_t * > &upward_quad_mids, ptr_vector_t< BeadingPropagation > &node_beadings) |
| void | propagateBeadingsDownward (std::vector< edge_t * > &upward_quad_mids, ptr_vector_t< BeadingPropagation > &node_beadings) |
| void | propagateBeadingsDownward (edge_t *edge_to_peak, ptr_vector_t< BeadingPropagation > &node_beadings) |
| Beading | interpolate (const Beading &left, double ratio_left_to_whole, const Beading &right, coord_t switching_radius) const |
| Beading | interpolate (const Beading &left, double ratio_left_to_whole, const Beading &right) const |
| std::shared_ptr< BeadingPropagation > | getOrCreateBeading (node_t *node, ptr_vector_t< BeadingPropagation > &node_beadings) |
| std::shared_ptr< BeadingPropagation > | getNearestBeading (node_t *node, coord_t max_dist) |
| void | generateJunctions (ptr_vector_t< BeadingPropagation > &node_beadings, ptr_vector_t< LineJunctions > &edge_junctions) |
| void | addToolpathSegment (const ExtrusionJunction &from, const ExtrusionJunction &to, bool is_odd, bool force_new_path, bool from_is_3way, bool to_is_3way) |
| void | connectJunctions (ptr_vector_t< LineJunctions > &edge_junctions) |
| void | generateLocalMaximaSingleBeads () |
Static Protected Member Functions | |
| static bool | computePointCellRange (vd_t::cell_type &cell, Point &start_source_point, Point &end_source_point, vd_t::edge_type *&starting_vd_edge, vd_t::edge_type *&ending_vd_edge, const std::vector< Segment > &segments) |
| static void | computeSegmentCellRange (vd_t::cell_type &cell, Point &start_source_point, Point &end_source_point, vd_t::edge_type *&starting_vd_edge, vd_t::edge_type *&ending_vd_edge, const std::vector< Segment > &segments) |
Protected Attributes | |
| ankerl::unordered_dense::map< vd_t::edge_type *, edge_t * > | vd_edge_to_he_edge |
| ankerl::unordered_dense::map< vd_t::vertex_type *, node_t * > | vd_node_to_he_node |
| std::vector< VariableWidthLines > * | p_generated_toolpaths |
Private Types | |
| using | pos_t = double |
| using | vd_t = boost::polygon::voronoi_diagram< pos_t > |
| using | graph_t = SkeletalTrapezoidationGraph |
| using | edge_t = STHalfEdge |
| using | node_t = STHalfEdgeNode |
| using | Beading = BeadingStrategy::Beading |
| using | BeadingPropagation = SkeletalTrapezoidationJoint::BeadingPropagation |
| using | TransitionMiddle = SkeletalTrapezoidationEdge::TransitionMiddle |
| using | TransitionEnd = SkeletalTrapezoidationEdge::TransitionEnd |
| template<typename T > | |
| using | ptr_vector_t = std::vector< std::shared_ptr< T > > |
Private Attributes | |
| double | transitioning_angle |
| How pointy a region should be before we apply the method. Equals 180* - limit_bisector_angle. | |
| coord_t | discretization_step_size |
| approximate size of segments when parabolic VD edges get discretized (and vertex-vertex edges) | |
| coord_t | transition_filter_dist |
| Filter transition mids (i.e. anchors) closer together than this. | |
| coord_t | allowed_filter_deviation |
| The allowed line width deviation induced by filtering. | |
| coord_t | beading_propagation_transition_dist |
| When there are different beadings propagated from below and from above, use this transitioning distance. | |
| const BeadingStrategy & | beading_strategy |
Static Private Attributes | |
| static constexpr coord_t | central_filter_dist = scaled<coord_t>(0.02) |
| Filter areas marked as 'central' smaller than this. | |
| static constexpr coord_t | snap_dist = scaled<coord_t>(0.02) |
| Generic arithmatic inaccuracy. Only used to determine whether a transition really needs to insert an extra edge. | |
Friends | |
| bool | detect_voronoi_edge_intersecting_input_segment (const Geometry::VoronoiDiagram &voronoi_diagram, const std::vector< VoronoiUtils::Segment > &segments) |
Main class of the dynamic beading strategies.
The input polygon region is decomposed into trapezoids and represented as a half-edge data-structure.
We determine which edges are 'central' accordinding to the transitioning_angle of the beading strategy, and determine the bead count for these central regions and apply them outward when generating toolpaths. [oversimplified]
The method can be visually explained as generating the 3D union of cones surface on the outline polygons, and changing the heights along central regions of that surface so that they are flat. For more info, please consult the paper "A framework for adaptive width control of dense contour-parallel toolpaths in fused deposition modeling" by Kuipers et al. This visual explanation aid explains the use of "upward", "lower" etc, i.e. the radial distance and/or the bead count are used as heights of this visualization, there is no coordinate called 'Z'.
TODO: split this class into two:
|
private |
|
private |
|
private |
| using Slic3r::Arachne::SkeletalTrapezoidation::NodeSet = ankerl::unordered_dense::set<node_t*> |
| using Slic3r::Arachne::SkeletalTrapezoidation::PointMap = ankerl::unordered_dense::map<Point, Point, PointHash> |
|
private |
|
private |
|
private |
|
private |
|
private |
| Slic3r::Arachne::SkeletalTrapezoidation::SkeletalTrapezoidation | ( | const Polygons & | polys, |
| const BeadingStrategy & | beading_strategy, | ||
| double | transitioning_angle, | ||
| coord_t | discretization_step_size, | ||
| coord_t | transition_filter_dist, | ||
| coord_t | allowed_filter_deviation, | ||
| coord_t | beading_propagation_transition_dist | ||
| ) |
Construct a new trapezoidation problem to solve.
| polys | The shapes to fill with walls. |
| beading_strategy | The strategy to use to fill these shapes. |
| transitioning_angle | Where we transition to a different number of walls, how steep should this transition be? A lower angle means that the transition will be longer. |
| discretization_step_size | Since g-code can't represent smooth transitions in line width, the line width must change with discretized steps. This indicates how long the line segments between those steps will be. |
| transition_filter_dist | The minimum length of transitions. Transitions shorter than this will be considered for dissolution. |
| beading_propagation_transition_dist | When there are different beadings propagated from below and from above, use this transitioning distance. |
References constructFromPolygons().
Here is the call graph for this function:
|
protected |
Add a new toolpath segment, defined between two extrusion-juntions.
| from | The junction from which to add a segment. |
| to | The junction to which to add a segment. |
| is_odd | Whether this segment is an odd gap filler along the middle of the skeleton. |
| force_new_path | Whether to prevent adding this path to an existing path which ends in from |
| from_is_3way | Whether the from junction is a splitting junction where two normal wall lines and a gap filler line come together. |
| to_is_3way | Whether the to junction is a splitting junction where two normal wall lines and a gap filler line come together. |
References Slic3r::empty(), error, Slic3r::Arachne::ExtrusionJunction::p, Slic3r::Arachne::ExtrusionJunction::perimeter_index, Slic3r::shorter_then(), and Slic3r::Arachne::ExtrusionJunction::w.
Here is the call graph for this function:
|
protected |
Also set the rest values at nodes in between the transition ends
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, Slic3r::Arachne::SkeletalTrapezoidationEdge::EXTRA_VD, graph, Slic3r::Arachne::SkeletalTrapezoidationGraph::insertNode(), Slic3r::Arachne::SkeletalTrapezoidationEdge::isCentral(), Slic3r::length(), Slic3r::Arachne::normal(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, snap_dist, Slic3r::Arachne::SkeletalTrapezoidationJoint::transition_ratio, and Slic3r::Arachne::SkeletalTrapezoidationEdge::type.
Referenced by generateTransitioningRibs().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprotected |
Compute the range of line segments that surround a cell of the skeletal graph that belongs to a point on the medial axis.
This should only be used on cells that belong to a corner in the skeletal graph, e.g. triangular cells, not trapezoid cells.
The resulting line segments is just the first and the last segment. They are linked to the neighboring segments, so you can iterate over the segments until you reach the last segment.
| cell | The cell to compute the range of line segments for. | |
| [out] | start_source_point | The start point of the source segment of this cell. |
| [out] | end_source_point | The end point of the source segment of this cell. |
| [out] | starting_vd_edge | The edge of the Voronoi diagram where the loop around the cell starts. |
| [out] | ending_vd_edge | The edge of the Voronoi diagram where the loop around the cell ends. |
| points | All vertices of the input Polygons. | |
| segments | All edges of the input Polygons. /return Whether the cell is inside of the polygon. If it's outside of the polygon we should skip processing it altogether. |
References Slic3r::Arachne::VoronoiUtils::getSourcePoint(), Slic3r::Arachne::VoronoiUtils::getSourcePointIndex(), Slic3r::Arachne::LinearAlg2D::isInsideCorner(), Slic3r::Arachne::PathsPointIndex< Paths >::next(), Slic3r::Arachne::PathsPointIndex< Paths >::p(), Slic3r::Arachne::VoronoiUtils::p(), and Slic3r::Arachne::PathsPointIndex< Paths >::prev().
Referenced by constructFromPolygons().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprotected |
Compute the range of line segments that surround a cell of the skeletal graph that belongs to a line segment of the medial axis.
This should only be used on cells that belong to a central line segment of the skeletal graph, e.g. trapezoid cells, not triangular cells.
The resulting line segments is just the first and the last segment. They are linked to the neighboring segments, so you can iterate over the segments until you reach the last segment.
| cell | The cell to compute the range of line segments for. | |
| [out] | start_source_point | The start point of the source segment of this cell. |
| [out] | end_source_point | The end point of the source segment of this cell. |
| [out] | starting_vd_edge | The edge of the Voronoi diagram where the loop around the cell starts. |
| [out] | ending_vd_edge | The edge of the Voronoi diagram where the loop around the cell ends. |
| points | All vertices of the input Polygons. | |
| segments | All edges of the input Polygons. /return Whether the cell is inside of the polygon. If it's outside of the polygon we should skip processing it altogether. |
References Slic3r::Arachne::PolygonsSegmentIndex::from(), Slic3r::Arachne::VoronoiUtils::getSourceSegment(), Slic3r::Arachne::VoronoiUtils::p(), and Slic3r::Arachne::PolygonsSegmentIndex::to().
Referenced by constructFromPolygons().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
connect junctions in each quad
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::SkeletalTrapezoidationEdge::getExtrusionJunctions(), Slic3r::Arachne::STHalfEdge::getNextUnconnected(), Slic3r::Arachne::SkeletalTrapezoidationEdge::hasExtrusionJunctions(), Slic3r::Arachne::STHalfEdgeNode::isMultiIntersection(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, Slic3r::Arachne::ExtrusionJunction::p, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::Arachne::ExtrusionJunction::perimeter_index, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::prev, Slic3r::Arachne::SkeletalTrapezoidationEdge::setExtrusionJunctions(), Slic3r::shorter_then(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, Slic3r::Arachne::SkeletalTrapezoidationJoint::transition_ratio, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Here is the call graph for this function:
|
protected |
Compute the skeletal trapezoidation decomposition of the input shape.
Compute the Voronoi Diagram (VD) and transfer all inside edges into our half-edge (HE) datastructure.
The algorithm is currently a bit overcomplicated, because the discretization of parabolic edges is performed at the same time as all edges are being transfered, which means that there is no one-to-one mapping from VD edges to HE edges. Instead we map from a VD edge to the last HE edge. This could be cimplified by recording the edges which should be discretized and discretizing the mafterwards.
Another complication arises because the VD uses floating logic, which can result in zero-length segments after rounding to integers. We therefore collapse edges and their whole cells afterwards.
References Slic3r::Arachne::SkeletalTrapezoidationGraph::collapseSmallEdges(), computePointCellRange(), computeSegmentCellRange(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::debug_out_path(), Slic3r::Arachne::detect_missing_voronoi_vertex(), Slic3r::Arachne::detect_voronoi_diagram_known_issues(), Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, Slic3r::SVG::draw_outline(), Slic3r::dump_voronoi_to_svg(), Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, error, Slic3r::get_extents(), graph, Slic3r::grid(), Slic3r::Arachne::has_missing_twin_edge(), Slic3r::Geometry::VoronoiUtilsCgal::is_voronoi_diagram_planar_intersection(), Slic3r::Arachne::SkeletalTrapezoidationGraph::makeRib(), Slic3r::Arachne::MISSING_VORONOI_VERTEX, Slic3r::Arachne::NO_ISSUE_DETECTED, Slic3r::Arachne::NON_PLANAR_VORONOI_DIAGRAM, Slic3r::Arachne::OTHER_TYPE_OF_VORONOI_DIAGRAM_DEGENERATION, Slic3r::Arachne::VoronoiUtils::p(), PI, Slic3r::Arachne::rotate_back_skeletal_trapezoidation_graph_after_fix(), separatePointyQuadEndNodes(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, Slic3r::to_lines(), Slic3r::to_points(), transferEdge(), Slic3r::Arachne::try_to_fix_degenerated_voronoi_diagram_by_rotation(), vd_edge_to_he_edge, vd_node_to_he_node, and Slic3r::Arachne::VORONOI_EDGE_INTERSECTING_INPUT_SEGMENT.
Referenced by SkeletalTrapezoidation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Discretize a Voronoi edge that represents the medial axis of a vertex- line region or vertex-vertex region into small segments that can be considered to have a straight medial axis and a linear line width transition.
The medial axis between a point and a line is a parabola. The rest of the algorithm doesn't want to have to deal with parabola, so this discretises the parabola into straight line segments. This is necessary if there is a sharp inner corner (acts as a point) that comes close to a straight edge.
The medial axis between a point and a point is a straight line segment. However the distance from the medial axis to either of those points draws a parabola as you go along the medial axis. That means that the resulting line width along the medial axis would not be linearly increasing or linearly decreasing, but needs to take the shape of a parabola. Instead, we'll break this edge up into tiny line segments that can approximate the parabola with tiny linear increases or decreases in line width.
| segment | The variable-width Voronoi edge to discretize. |
| points | All vertices of the original Polygons to fill with beads. |
| segments | All line segments of the original Polygons to fill with beads. |
References discretization_step_size, Slic3r::Arachne::VoronoiUtils::discretizeParabola(), Slic3r::dot(), Slic3r::Arachne::VoronoiUtils::getSourcePoint(), Slic3r::Arachne::VoronoiUtils::getSourceSegment(), M_PI, Slic3r::Arachne::VoronoiUtils::p(), Slic3r::perp(), tan(), and transitioning_angle.
Referenced by transferEdge().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Spread a certain bead count over a region in the graph.
| edge_to_start | One edge of the region to spread the bead count in. |
| from_bead_count | All edges with this bead count will be changed. |
| to_bead_count | The new bead count for those edges. |
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, dissolveBeadCountRegion(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by dissolveBeadCountRegion(), and filterTransitionMids().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Merge transitions that are too close together.
| edge_to_start | Edge pointing to the node from which to start traveling in all directions except along edge_to_start . |
| origin_transition | The transition for which we are checking nearby transitions. |
| traveled_dist | The distance traveled before we came to edge_to_start.to . |
| going_up | Whether we are traveling in the upward direction as seen from the origin_transition. If this doesn't align with the direction according to the R diff on a consecutive edge we know there was a local optimum. |
References allowed_filter_deviation, beading_strategy, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, dissolveNearbyTransitions(), Slic3r::Arachne::SkeletalTrapezoidationEdge::TransitionMiddle::feature_radius, Slic3r::Arachne::BeadingStrategy::getTransitioningLength(), Slic3r::Arachne::SkeletalTrapezoidationEdge::getTransitions(), Slic3r::Arachne::SkeletalTrapezoidationEdge::hasTransitions(), Slic3r::Arachne::SkeletalTrapezoidationEdge::TransitionMiddle::lower_bead_count, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by dissolveNearbyTransitions(), and filterTransitionMids().
Here is the call graph for this function:
Here is the caller graph for this function:Filter out small central areas.
Only used to get rid of small edges which get marked as central because of rounding errors because the region is so small.
References Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, filterCentral(), graph, and isEndOfCentral().
Referenced by filterCentral(), filterCentral(), and generateToolpaths().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Filter central areas connected to starting_edge recursively.
References Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, filterCentral(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::STHalfEdgeNode::isLocalMaximum(), Slic3r::length(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::Arachne::SkeletalTrapezoidationEdge::setIsCentral(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Here is the call graph for this function:
|
protected |
Change the bead count if the given edge is at the end of a central region.
This is necessary to provide a transitioning bead count to the edges of a central region to transition more smoothly from a high bead count in the central region to a lower bead count at the edge.
| edge_to_start | One edge from a zone that needs to be filtered. |
| traveled_dist | The distance along the edges we've traveled so far. |
| max_distance | Don't filter beyond this range. |
| replacing_bead_count | The new bead count for this region. |
true if the bead count of this edge was changed. References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, filterEndOfCentralTransition(), Slic3r::length(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by filterEndOfCentralTransition(), and filterTransitionMids().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Add central regions and set bead counts where there is an end of the central area and when traveling upward we get to another region with the same bead count.
References Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, filterNoncentralRegions(), graph, and isEndOfCentral().
Referenced by filterNoncentralRegions(), filterNoncentralRegions(), and generateToolpaths().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Add central regions and set bead counts for a particular edge and all of its adjacent edges.
Recursive subroutine for filterNoncentralRegions().
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, beading_strategy, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, filterNoncentralRegions(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::BeadingStrategy::getOptimalBeadCount(), Slic3r::length(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::Arachne::SkeletalTrapezoidationEdge::setIsCentral(), Slic3r::shorter_then(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, Slic3r::Arachne::SkeletalTrapezoidationJoint::transition_ratio, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Here is the call graph for this function:
|
protected |
Unmark the outermost edges directly connected to the outline, as not being central.
Only used to emulate some related literature.
The paper shows that this function is bad for the stability of the framework.
References Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, and graph.
Referenced by generateToolpaths().
Here is the caller graph for this function:
|
protected |
Removes some transition middle points.
Transitions can be removed if there are multiple intersecting transitions that are too close together. If transitions have opposite effects, both are removed.
References beading_strategy, dissolveBeadCountRegion(), dissolveNearbyTransitions(), Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, filterEndOfCentralTransition(), Slic3r::Arachne::BeadingStrategy::getTransitionAnchorPos(), Slic3r::Arachne::BeadingStrategy::getTransitioningLength(), graph, and transition_filter_dist.
Referenced by generateTransitioningRibs().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Generate the endpoints of all transitions for all edges in the graph.
| [out] | edge_transition_ends | The resulting transition endpoints. |
References Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, generateTransitionEnds(), and graph.
Referenced by generateTransitioningRibs().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Create extra ribs in the graph where the graph contains a parabolic arc or a straight between two inner corners.
There might be transitions there as the beads go through a narrow bottleneck in the polygon.
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, beading_strategy, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, discretization_step_size, Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, Slic3r::Arachne::SkeletalTrapezoidationEdge::EXTRA_VD, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::BeadingStrategy::getNonlinearThicknesses(), graph, Slic3r::Arachne::SkeletalTrapezoidationGraph::insertNode(), Slic3r::Arachne::SkeletalTrapezoidationEdge::isCentral(), Slic3r::Arachne::normal(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::shorter_then(), snap_dist, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, Slic3r::Arachne::SkeletalTrapezoidationJoint::transition_ratio, and Slic3r::Arachne::SkeletalTrapezoidationEdge::type.
Referenced by generateToolpaths().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
generate junctions for each bone
| edge_to_junctions | junctions ordered high R to low R |
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::Arachne::BeadingStrategy::Beading::bead_widths, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, Slic3r::Arachne::BeadingStrategy::Beading::toolpath_locations, and Slic3r::Arachne::BeadingStrategy::Beading::total_thickness.
|
protected |
Genrate small segments for local maxima where the beading would only result in a single bead
References Slic3r::Arachne::ExtrusionLine::back(), Slic3r::Arachne::BeadingStrategy::Beading::bead_widths, cos(), Slic3r::Arachne::ExtrusionLine::junctions, M_PI, segment(), and sin().
Here is the call graph for this function:
|
protected |
| [out] | segments | the generated segments |
References Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, and graph.
Referenced by generateToolpaths().
Here is the caller graph for this function:| void Slic3r::Arachne::SkeletalTrapezoidation::generateToolpaths | ( | std::vector< VariableWidthLines > & | generated_toolpaths, |
| bool | filter_outermost_central_edges = false |
||
| ) |
Generate the paths that the printer must extrude, to print the outlines in the input polygons.
| filter_outermost_central_edges | Some edges are "central" but still touch the outside of the polygon. If enabled, don't treat these as "central" but as if it's a obtuse corner. As a result, sharp corners will no longer end in a single line but will just loop. |
References central_filter_dist, Slic3r::debug_out_path(), filterCentral(), filterNoncentralRegions(), filterOuterCentral(), generateExtraRibs(), generateSegments(), generateTransitioningRibs(), p_generated_toolpaths, updateBeadCount(), and updateIsCentral().
Referenced by Slic3r::Arachne::WallToolPaths::generate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Compute a single endpoint of a transition.
| edge | The edge to generate the endpoint for. | |
| start_pos | The position where the transition starts. | |
| end_pos | The position where the transition ends on the other side. | |
| transition_half_length | The distance to the transition middle point. | |
| start_rest | The gap between the start of the transition and the starting endpoint, as ratio of the inner bead width at the high end of the transition. | |
| end_rest | The gap between the end of the transition and the ending endpoint, as ratio of the inner bead width at the high end of the transition. | |
| transition_lower_bead_count | The bead count at the lower end of the transition. | |
| [out] | edge_transition_ends | The list to put the resulting endpoints in. |
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, generateTransitionEnd(), Slic3r::Arachne::SkeletalTrapezoidationEdge::getTransitionEnds(), Slic3r::Arachne::SkeletalTrapezoidationEdge::hasTransitionEnds(), Slic3r::Arachne::SkeletalTrapezoidationEdge::isCentral(), isGoingDown(), Slic3r::Arachne::STHalfEdge::isUpward(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::Arachne::SkeletalTrapezoidationEdge::setTransitionEnds(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, Slic3r::Arachne::SkeletalTrapezoidationJoint::transition_ratio, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by generateTransitionEnd(), and generateTransitionEnds().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Generate the endpoints of a specific transition midpoint.
| edge | The edge to create transitions on. | |
| mid_R | The radius of the transition middle point. | |
| transition_lower_bead_count | The bead count at the lower end of the transition. | |
| [out] | edge_transition_ends | A list of endpoints to add the new endpoints to. |
References beading_strategy, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, generateTransitionEnd(), Slic3r::Arachne::BeadingStrategy::getTransitionAnchorPos(), Slic3r::Arachne::BeadingStrategy::getTransitioningLength(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by generateAllTransitionEnds().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Create extra edges along all edges, where it needs to transition from one bead count to another.
For example, if an edge of the graph goes from a bead count of 6 to a bead count of 1, it needs to generate 5 places where the beads around this line transition to a lower bead count. These are the "ribs". They reach from the edge to the border of the polygon. Where the beads hit those ribs the beads know to make a transition.
References applyTransitions(), Slic3r::debug_out_path(), Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, filterTransitionMids(), generateAllTransitionEnds(), generateTransitionMids(), and graph.
Referenced by generateToolpaths().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Generate middle points of all transitions on edges.
The transition middle points are saved in the graph itself. They are also returned via the output parameter.
| [out] | edge_transitions | A list of transitions that were generated. |
References beading_strategy, Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, error, Slic3r::Arachne::BeadingStrategy::getOptimalBeadCount(), Slic3r::Arachne::BeadingStrategy::getTransitionThickness(), and graph.
Referenced by generateTransitioningRibs().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
In case we cannot find the beading of a node, get a beading from the nearest node.
| node | The node to attempt to get a beading from. The actual node that the returned beading is from may be a different, nearby node. |
| max_dist | The maximum distance to search for. |
nullptr if there is no node nearby with a beading. References Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::incident_edge, and SKELETAL_TRAPEZOIDATION_BEAD_SEARCH_MAX.
|
protected |
Get the beading at a certain node of the skeletal graph, or create one if it doesn't have one yet.
This is a lazy get.
| node | The node to get the beading from. |
| node_beadings | A list of all beadings for nodes. |
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, error, Slic3r::Arachne::SkeletalTrapezoidationJoint::getBeading(), Slic3r::Arachne::SkeletalTrapezoidationJoint::hasBeading(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::incident_edge, and Slic3r::Arachne::SkeletalTrapezoidationJoint::setBeading().
Here is the call graph for this function:
|
protected |
From a quad (a group of linked edges in one cell of the Voronoi), find the edge pointing to the node that is furthest away from the border of the polygon.
| quad_start_edge | The first edge of the quad. |
References Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::prev, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to.
|
protected |
Subroutine of interpolate(const Beading&, Ratio, const Beading&, coord_t)
This creates a new Beading between two beadings, assuming that both have the same number of beads.
| left | One of the beadings to interpolate between. |
| ratio_left_to_whole | The position within the two beadings to sample an interpolation. Should be a ratio between 0 and 1. |
| right | One of the beadings to interpolate between. |
References Slic3r::Arachne::BeadingStrategy::Beading::bead_widths, and Slic3r::Arachne::BeadingStrategy::Beading::toolpath_locations.
|
protected |
Find a beading in between two other beadings.
This creates a new beading. With this we can find the coordinates of the endpoints of the actual line segments to draw.
The parameters left and right are not actually always left or right but just arbitrary directions to visually indicate the difference.
| left | One of the beadings to interpolate between. |
| ratio_left_to_whole | The position within the two beadings to sample an interpolation. Should be a ratio between 0 and 1. |
| right | One of the beadings to interpolate between. |
| switching_radius | The bead radius at which we switch from the left beading to the merged beading, if the beadings have a different number of beads. |
References Slic3r::Arachne::BeadingStrategy::Beading::toolpath_locations.
Determines whether this edge marks the end of the central region.
| edge | The edge to check. |
true if this edge goes from a central region to a non-central region, or false in every other case (central to central, non-central to non-central, non-central to central, or end-of-the-line). References Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::SkeletalTrapezoidationEdge::isCentral(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by filterCentral(), and filterNoncentralRegions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Determines whether an edge is going downwards or upwards in the graph.
An edge is said to go "downwards" if it's going towards a narrower part of the polygon. The notion of "downwards" comes from the conical representation of the graph, where the polygon is filled with a cone of maximum radius.
This function works by recursively checking adjacent edges until the edge is reached.
| outgoing | The edge to check. |
| traveled_dist | The distance traversed so far. |
| transition_half_length | The radius of the transition width. |
| lower_bead_count | The bead count at the lower end of the edge. |
true if this edge is going down, or false if it's going up. References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::SkeletalTrapezoidationEdge::getTransitions(), Slic3r::Arachne::SkeletalTrapezoidationEdge::hasTransitions(), isGoingDown(), Slic3r::length(), Slic3r::Arachne::SkeletalTrapezoidationEdge::TransitionMiddle::lower_bead_count, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::Arachne::SkeletalTrapezoidationEdge::TransitionMiddle::pos, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, Slic3r::Arachne::SkeletalTrapezoidationJoint::transition_ratio, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by generateTransitionEnd(), and isGoingDown().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Get the node which the VD node maps to, or create a new mapping if there wasn't any yet.
References graph, Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::nodes, and vd_node_to_he_node.
Referenced by transferEdge().
Here is the caller graph for this function:
|
protected |
Subroutine of propagateBeadingsDownward(std::vector<edge_t*>&, ptr_vector_t<BeadingPropagation>&)
References Slic3r::Arachne::SkeletalTrapezoidationJoint::BeadingPropagation::beading, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::SkeletalTrapezoidationJoint::BeadingPropagation::dist_from_top_source, Slic3r::Arachne::SkeletalTrapezoidationJoint::BeadingPropagation::dist_to_bottom_source, Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::SkeletalTrapezoidationJoint::getBeading(), Slic3r::Arachne::SkeletalTrapezoidationJoint::hasBeading(), Slic3r::Arachne::SkeletalTrapezoidationJoint::BeadingPropagation::is_upward_propagated_only, Slic3r::length(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::Arachne::SkeletalTrapezoidationJoint::setBeading(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, and Slic3r::Arachne::BeadingStrategy::Beading::total_thickness.
Here is the call graph for this function:
|
protected |
propagate beading info from higher R nodes to lower R nodes
merge with upward propagated beadings if they are encountered
don't transfer to nodes which lie on the outline polygon
edges are sorted so that we can do a depth-first walk without employing a recursive algorithm
| upward_quad_mids | all upward halfedges of the inner skeletal edges (not directly connected to the outline) sorted on their highest [distance_to_boundary]. Higher dist first. |
|
protected |
Propagate beading information from nodes that are closer to the edge (low radius R) to nodes that are farther from the edge (high R).
only propagate from nodes with beading info upward to nodes without beading info
Edges are sorted by their radius, so that we can do a depth-first walk without employing a recursive algorithm.
In upward propagated beadings we store the distance traveled, so that we can merge these beadings with the downward propagated beadings in propagateBeadingsDownward(.)
| upward_quad_mids | all upward halfedges of the inner skeletal edges (not directly connected to the outline) sorted on their highest [distance_to_boundary]. Higher dist first. |
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::Arachne::SkeletalTrapezoidationJoint::BeadingPropagation::beading, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::SkeletalTrapezoidationJoint::BeadingPropagation::dist_to_bottom_source, Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::SkeletalTrapezoidationJoint::getBeading(), Slic3r::Arachne::SkeletalTrapezoidationJoint::hasBeading(), Slic3r::Arachne::SkeletalTrapezoidationJoint::BeadingPropagation::is_upward_propagated_only, Slic3r::length(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::Arachne::SkeletalTrapezoidationJoint::setBeading(), Slic3r::shorter_then(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, and Slic3r::Arachne::BeadingStrategy::Beading::total_thickness.
Here is the call graph for this function:
|
protected |
For VD cells associated with an input polygon vertex, we need to separate the node at the end and start of the cell into two That way we can reach both the quad_start and the quad_end from the [incident_edge] of the two new nodes Otherwise if node.incident_edge = quad_start you couldnt reach quad_end.twin by normal iteration (i.e. it = it.twin.next)
References Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, graph, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::incident_edge, Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::nodes, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by constructFromPolygons().
Here is the caller graph for this function:
|
protected |
Transfer an edge from the VD to the HE and perform discretization of parabolic edges (and vertex-vertex edges) prev_edge serves as input and output. May be null as input.
References discretize(), Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, error, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, graph, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::incident_edge, makeNode(), Slic3r::Arachne::SkeletalTrapezoidationGraph::makeRib(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::nodes, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::prev, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin, vd_edge_to_he_edge, and vd_node_to_he_node.
Referenced by constructFromPolygons().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Set bead count in central regions based on the optimal_bead_count of the beading strategy.
References beading_strategy, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::BeadingStrategy::getOptimalBeadCount(), graph, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::nodes, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by generateToolpaths().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
References beading_strategy, Slic3r::Arachne::HalfEdgeGraph< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::edges, Slic3r::Arachne::SkeletalTrapezoidationEdge::EXTRA_VD, Slic3r::Arachne::BeadingStrategy::getTransitioningAngle(), Slic3r::Arachne::BeadingStrategy::getTransitionThickness(), graph, and sin().
Referenced by generateToolpaths().
Here is the call graph for this function:
Here is the caller graph for this function:
|
friend |
|
private |
The allowed line width deviation induced by filtering.
Referenced by dissolveNearbyTransitions().
|
private |
When there are different beadings propagated from below and from above, use this transitioning distance.
|
private |
The strategy to use to fill a certain shape with lines.
Various BeadingStrategies are available that differ in which lines get to print at their optimal width, where the play is being compensated, and how the joints are handled where we transition to different numbers of lines.
Referenced by dissolveNearbyTransitions(), filterNoncentralRegions(), filterTransitionMids(), generateExtraRibs(), generateTransitionEnds(), generateTransitionMids(), updateBeadCount(), and updateIsCentral().
|
staticconstexprprivate |
Filter areas marked as 'central' smaller than this.
Referenced by generateToolpaths().
|
private |
approximate size of segments when parabolic VD edges get discretized (and vertex-vertex edges)
Referenced by discretize(), and generateExtraRibs().
| graph_t Slic3r::Arachne::SkeletalTrapezoidation::graph |
A skeletal graph through the polygons that we need to fill with beads.
The skeletal graph represents the medial axes through each part of the polygons, and the lines from these medial axes towards each vertex of the polygons. The graph can be used to see what the width is of a polygon in each place and where the width transitions.
Referenced by applyTransitions(), constructFromPolygons(), filterCentral(), filterNoncentralRegions(), filterOuterCentral(), filterTransitionMids(), generateAllTransitionEnds(), generateExtraRibs(), generateSegments(), generateTransitioningRibs(), generateTransitionMids(), makeNode(), separatePointyQuadEndNodes(), transferEdge(), updateBeadCount(), and updateIsCentral().
|
protected |
(Eventual) returned 'polylines per index' result (from generateToolpaths):
Referenced by generateToolpaths().
|
staticconstexprprivate |
Generic arithmatic inaccuracy. Only used to determine whether a transition really needs to insert an extra edge.
Referenced by applyTransitions(), and generateExtraRibs().
|
private |
Filter transition mids (i.e. anchors) closer together than this.
Referenced by filterTransitionMids().
|
private |
How pointy a region should be before we apply the method. Equals 180* - limit_bisector_angle.
Referenced by discretize().
|
protected |
mapping each voronoi VD edge to the corresponding halfedge HE edge In case the result segment is discretized, we map the VD edge to the last HE edge
Referenced by constructFromPolygons(), and transferEdge().
|
protected |
Referenced by constructFromPolygons(), makeNode(), and transferEdge().