#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Arachne/SkeletalTrapezoidation.hpp>
Classes | |
| struct | TransitionMidRef |
Public Types | |
| using | Segment = PolygonsSegmentIndex |
| 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 (const VD::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 (const Point &from, const Point &to, const VD::edge_type &vd_edge, edge_t *&prev_edge, const Point &start_source_point, const Point &end_source_point, const std::vector< Segment > &segments) |
| Points | discretize (const VD::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) |
| 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 Beading | interpolate (const Beading &left, double ratio_left_to_whole, const Beading &right, coord_t switching_radius) |
| static Beading | interpolate (const Beading &left, double ratio_left_to_whole, const Beading &right) |
Protected Attributes | |
| ankerl::unordered_dense::map< const VD::edge_type *, edge_t * > | vd_edge_to_he_edge |
| ankerl::unordered_dense::map< const VD::vertex_type *, node_t * > | vd_node_to_he_node |
| std::vector< VariableWidthLines > * | p_generated_toolpaths |
Private Types | |
| 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 Member Functions | |
| coord_t | central_filter_dist () |
| Generic arithmatic inaccuracy. Only used to determine whether a transition really needs to insert an extra edge. | |
| coord_t | snap_dist () |
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 Filter areas marked as 'central' smaller than this. | |
| const BeadingStrategy & | beading_strategy |
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*> |
|
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 allowed_filter_deviation, beading_propagation_transition_dist, beading_strategy, constructFromPolygons(), discretization_step_size, transition_filter_dist, and transitioning_angle.
|
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 addToolpathSegment(), Slic3r::empty(), Slic3r::Arachne::ExtrusionJunction::p, p_generated_toolpaths, Slic3r::Arachne::ExtrusionJunction::perimeter_index, Slic3r::scaled(), Slic3r::shorter_then(), and Slic3r::Arachne::ExtrusionJunction::w.
Referenced by addToolpathSegment(), and connectJunctions().
|
protected |
Also set the rest values at nodes in between the transition ends
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::cast(), 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::SkeletalTrapezoidationEdge::EXTRA_VD, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::SkeletalTrapezoidationEdge::getTransitionEnds(), graph, Slic3r::Arachne::SkeletalTrapezoidationEdge::hasTransitionEnds(), 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, Slic3r::Arachne::SkeletalTrapezoidationEdge::TransitionEnd::pos, Slic3r::Arachne::SkeletalTrapezoidationEdge::setTransitionEnds(), snap_dist(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, Slic3r::Arachne::SkeletalTrapezoidationJoint::transition_ratio, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin, and Slic3r::Arachne::SkeletalTrapezoidationEdge::type.
Referenced by generateTransitioningRibs().
|
inlineprivate |
Generic arithmatic inaccuracy. Only used to determine whether a transition really needs to insert an extra edge.
References Slic3r::scaled().
Referenced by generateToolpaths(), and propagateBeadingsUpward().
|
protected |
connect junctions in each quad
References addToolpathSegment(), Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, connectJunctions(), 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(), getQuadMaxRedgeTo(), graph, 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::scaled(), 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.
Referenced by connectJunctions().
|
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::Geometry::VoronoiDiagram::cells(), Slic3r::Geometry::VoronoiUtils::compute_point_cell_range(), Slic3r::Geometry::VoronoiUtils::compute_segment_cell_range(), Slic3r::Geometry::VoronoiDiagram::construct_voronoi(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::debug_out_path(), Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, Slic3r::SVG::draw_outline(), Slic3r::dump_voronoi_to_svg(), Slic3r::Geometry::PointCellRange< PT >::edge_begin, Slic3r::Geometry::SegmentCellRange< PT >::edge_begin, Slic3r::Geometry::PointCellRange< PT >::edge_end, Slic3r::Geometry::SegmentCellRange< PT >::edge_end, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::get_extents(), graph, Slic3r::grid(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::incident_edge, Slic3r::Geometry::VoronoiUtils::is_in_range(), Slic3r::Geometry::PointCellRange< PT >::is_valid(), Slic3r::Geometry::SegmentCellRange< PT >::is_valid(), Slic3r::Geometry::VoronoiUtilsCgal::is_voronoi_diagram_planar_intersection(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::prev, Slic3r::scaled(), separatePointyQuadEndNodes(), Slic3r::Geometry::PointCellRange< PT >::source_point, Slic3r::Geometry::SegmentCellRange< PT >::source_segment_end_point, Slic3r::Geometry::SegmentCellRange< PT >::source_segment_start_point, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to, Slic3r::to_lines(), Slic3r::Geometry::VoronoiUtils::to_point(), Slic3r::Arachne::to_points(), transferEdge(), vd_edge_to_he_edge, and vd_node_to_he_node.
Referenced by SkeletalTrapezoidation().
|
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 Slic3r::cast(), discretization_step_size, Slic3r::Geometry::VoronoiUtils::discretize_parabola(), Slic3r::dot(), Slic3r::Geometry::VoronoiUtils::get_source_point(), Slic3r::Geometry::VoronoiUtils::get_source_segment(), Slic3r::Geometry::VoronoiUtils::is_in_range(), M_PI, Slic3r::perp(), Slic3r::Geometry::VoronoiUtils::to_point(), and transitioning_angle.
Referenced by transferEdge().
|
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().
|
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::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().
|
protected |
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 filterCentral(), graph, isEndOfCentral(), Slic3r::Arachne::STHalfEdgeNode::isLocalMaximum(), 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 filterCentral(), filterCentral(), and generateToolpaths().
|
protected |
Filter central areas connected to starting_edge recursively.
References Slic3r::cast(), 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.
|
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. |
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::cast(), 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().
|
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::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, filterNoncentralRegions(), graph, isEndOfCentral(), Slic3r::scaled(), and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to.
Referenced by filterNoncentralRegions(), filterNoncentralRegions(), and generateToolpaths().
|
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::cast(), 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::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::scaled(), 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.
|
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::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, graph, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::prev, Slic3r::Arachne::SkeletalTrapezoidationEdge::setIsCentral(), and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by generateToolpaths().
|
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, 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, dissolveBeadCountRegion(), dissolveNearbyTransitions(), Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, filterEndOfCentralTransition(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, Slic3r::Arachne::SkeletalTrapezoidationEdge::getTransitions(), graph, Slic3r::Arachne::SkeletalTrapezoidationEdge::hasTransitions(), 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, transition_filter_dist, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by generateTransitioningRibs().
|
protected |
Generate the endpoints of all transitions for all edges in the graph.
| [out] | edge_transition_ends | The resulting transition endpoints. |
References 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, generateTransitionEnds(), Slic3r::Arachne::SkeletalTrapezoidationEdge::getTransitions(), graph, Slic3r::Arachne::SkeletalTrapezoidationEdge::hasTransitions(), and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to.
Referenced by generateTransitioningRibs().
|
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::SkeletalTrapezoidationEdge::EXTRA_VD, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, graph, 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().
|
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::cast(), 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, generateJunctions(), getOrCreateBeading(), graph, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::scaled(), Slic3r::Arachne::SkeletalTrapezoidationEdge::setExtrusionJunctions(), 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.
Referenced by generateJunctions().
|
protected |
Genrate small segments for local maxima where the beading would only result in a single bead
References Slic3r::Arachne::BeadingStrategy::Beading::bead_widths, generateLocalMaximaSingleBeads(), graph, Slic3r::Arachne::ExtrusionLine::junctions, M_PI, and p_generated_toolpaths.
Referenced by generateLocalMaximaSingleBeads().
|
protected |
| [out] | segments | the generated segments |
References Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, graph, Slic3r::Arachne::STHalfEdge::isUpward(), 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.
Referenced by generateToolpaths().
| 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().
|
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().
|
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::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().
|
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::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::debug_out_path(), filterTransitionMids(), Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, generateAllTransitionEnds(), generateTransitionMids(), graph, Slic3r::Arachne::SkeletalTrapezoidationEdge::hasTransitions(), Slic3r::Arachne::SkeletalTrapezoidationEdge::isCentral(), 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().
|
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 Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, beading_strategy, Slic3r::cast(), Slic3r::Arachne::SkeletalTrapezoidationEdge::centralIsSet(), 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(), graph, Slic3r::Arachne::SkeletalTrapezoidationEdge::hasTransitions(), Slic3r::Arachne::SkeletalTrapezoidationEdge::isCentral(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::p, Slic3r::Arachne::SkeletalTrapezoidationEdge::setTransitions(), and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to.
Referenced by generateTransitioningRibs().
|
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. |
References Slic3r::Geometry::dist(), getNearestBeading(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::incident_edge, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, SKELETAL_TRAPEZOIDATION_BEAD_SEARCH_MAX, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by getNearestBeading(), and getOrCreateBeading().
|
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, beading_strategy, Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::data, Slic3r::Geometry::dist(), Slic3r::Arachne::SkeletalTrapezoidationJoint::distance_to_boundary, Slic3r::Arachne::SkeletalTrapezoidationJoint::getBeading(), getNearestBeading(), getOrCreateBeading(), Slic3r::Arachne::SkeletalTrapezoidationJoint::hasBeading(), Slic3r::Arachne::HalfEdgeNode< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::incident_edge, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::next, Slic3r::scaled(), Slic3r::Arachne::SkeletalTrapezoidationJoint::setBeading(), and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by generateJunctions(), getOrCreateBeading(), and propagateBeadingsDownward().
|
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, getQuadMaxRedgeTo(), 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, Slic3r::scaled(), and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::to.
Referenced by connectJunctions(), and getQuadMaxRedgeTo().
|
staticprotected |
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, interpolate(), and Slic3r::Arachne::BeadingStrategy::Beading::toolpath_locations.
|
staticprotected |
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 interpolate(), and Slic3r::Arachne::BeadingStrategy::Beading::toolpath_locations.
Referenced by interpolate(), interpolate(), and propagateBeadingsDownward().
|
protected |
Determines whether this edge marks the end of the central region.
| edge | The edge to check. |
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().
|
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. |
References Slic3r::Arachne::SkeletalTrapezoidationJoint::bead_count, Slic3r::cast(), 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().
|
protected |
Get the node which the VD node maps to, or create a new mapping if there wasn't any yet.
References graph, and vd_node_to_he_node.
Referenced by transferEdge().
|
protected |
Subroutine of propagateBeadingsDownward(std::vector<edge_t*>&, ptr_vector_t<BeadingPropagation>&)
References Slic3r::Arachne::SkeletalTrapezoidationJoint::BeadingPropagation::beading, beading_propagation_transition_dist, Slic3r::cast(), 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(), getOrCreateBeading(), Slic3r::Arachne::SkeletalTrapezoidationJoint::hasBeading(), interpolate(), 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, propagateBeadingsDownward(), 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.
|
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. |
References propagateBeadingsDownward().
Referenced by propagateBeadingsDownward(), and propagateBeadingsDownward().
|
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::cast(), central_filter_dist(), 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, propagateBeadingsUpward(), 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.
Referenced by propagateBeadingsUpward().
|
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::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::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, and Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin.
Referenced by constructFromPolygons().
|
inlineprivate |
References Slic3r::scaled().
Referenced by applyTransitions(), and generateExtraRibs().
|
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::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::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, 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().
|
protected |
Set bead count in central regions based on the optimal_bead_count of the beading strategy.
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, 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::SkeletalTrapezoidationEdge::isCentral(), Slic3r::Arachne::STHalfEdgeNode::isLocalMaximum(), 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::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().
|
protected |
References beading_strategy, Slic3r::Arachne::SkeletalTrapezoidationEdge::centralIsSet(), 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::SkeletalTrapezoidationEdge::EXTRA_VD, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::from, graph, Slic3r::Arachne::SkeletalTrapezoidationEdge::isCentral(), 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, Slic3r::Arachne::HalfEdge< node_data_t, edge_data_t, derived_node_t, derived_edge_t >::twin, and Slic3r::Arachne::SkeletalTrapezoidationEdge::type.
Referenced by generateToolpaths().
|
private |
The allowed line width deviation induced by filtering.
Referenced by SkeletalTrapezoidation(), and dissolveNearbyTransitions().
|
private |
When there are different beadings propagated from below and from above, use this transitioning distance Filter areas marked as 'central' smaller than this.
Referenced by SkeletalTrapezoidation(), and propagateBeadingsDownward().
|
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 SkeletalTrapezoidation(), dissolveNearbyTransitions(), filterNoncentralRegions(), filterTransitionMids(), generateExtraRibs(), generateTransitionEnds(), generateTransitionMids(), getOrCreateBeading(), updateBeadCount(), and updateIsCentral().
|
private |
approximate size of segments when parabolic VD edges get discretized (and vertex-vertex edges)
Referenced by SkeletalTrapezoidation(), 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(), connectJunctions(), constructFromPolygons(), filterCentral(), filterNoncentralRegions(), filterOuterCentral(), filterTransitionMids(), generateAllTransitionEnds(), generateExtraRibs(), generateJunctions(), generateLocalMaximaSingleBeads(), generateSegments(), generateTransitioningRibs(), generateTransitionMids(), makeNode(), separatePointyQuadEndNodes(), transferEdge(), updateBeadCount(), and updateIsCentral().
|
protected |
(Eventual) returned 'polylines per index' result (from generateToolpaths):
Referenced by addToolpathSegment(), generateLocalMaximaSingleBeads(), and generateToolpaths().
|
private |
Filter transition mids (i.e. anchors) closer together than this.
Referenced by SkeletalTrapezoidation(), and filterTransitionMids().
|
private |
How pointy a region should be before we apply the method. Equals 180* - limit_bisector_angle.
Referenced by SkeletalTrapezoidation(), and 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().