#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Geometry/VoronoiUtils.hpp>
Static Public Member Functions | |
| static Vec2i64 | to_point (const VoronoiDiagram::vertex_type *vertex) |
| static Vec2i64 | to_point (const VoronoiDiagram::vertex_type &vertex) |
| static bool | is_finite (const VoronoiDiagram::vertex_type &vertex) |
| static VoronoiDiagram::vertex_type | make_rotated_vertex (VoronoiDiagram::vertex_type &vertex, double angle) |
| template<typename SegmentIterator> | |
| static boost::polygon::enable_if< typenameboost::polygon::gtl_if< typenameboost::polygon::is_segment_concept< typenameboost::polygon::geometry_concept< typenamestd::iterator_traits< SegmentIterator >::value_type >::type >::type >::type, typenamestd::iterator_traits< SegmentIterator >::reference >::type | get_source_segment (const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end) |
| template<typename SegmentIterator> | |
| static boost::polygon::enable_if< typenameboost::polygon::gtl_if< typenameboost::polygon::is_segment_concept< typenameboost::polygon::geometry_concept< typenamestd::iterator_traits< SegmentIterator >::value_type >::type >::type >::type, typenameboost::polygon::segment_point_type< typenamestd::iterator_traits< SegmentIterator >::value_type >::type >::type | get_source_point (const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end) |
| template<typename SegmentIterator> | |
| static boost::polygon::enable_if< typenameboost::polygon::gtl_if< typenameboost::polygon::is_segment_concept< typenameboost::polygon::geometry_concept< typenamestd::iterator_traits< SegmentIterator >::value_type >::type >::type >::type, Arachne::PolygonsPointIndex >::type | get_source_point_index (const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end) |
| template<typename Segment> | |
| static boost::polygon::enable_if< typenameboost::polygon::gtl_if< typenameboost::polygon::is_segment_concept< typenameboost::polygon::geometry_concept< Segment >::type >::type >::type, Points >::type | discretize_parabola (const Point &source_point, const Segment &source_segment, const Point &start, const Point &end, coord_t approximate_step_size, float transitioning_angle) |
| template<typename SegmentIterator> | |
| static boost::polygon::enable_if< typenameboost::polygon::gtl_if< typenameboost::polygon::is_segment_concept< typenameboost::polygon::geometry_concept< typenamestd::iterator_traits< SegmentIterator >::value_type >::type >::type >::type, Geometry::SegmentCellRange< typenameboost::polygon::segment_point_type< typenamestd::iterator_traits< SegmentIterator >::value_type >::type > >::type | compute_segment_cell_range (const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end) |
| template<typename SegmentIterator> | |
| static boost::polygon::enable_if< typenameboost::polygon::gtl_if< typenameboost::polygon::is_segment_concept< typenameboost::polygon::geometry_concept< typenamestd::iterator_traits< SegmentIterator >::value_type >::type >::type >::type, Geometry::PointCellRange< typenameboost::polygon::segment_point_type< typenamestd::iterator_traits< SegmentIterator >::value_type >::type > >::type | compute_point_cell_range (const VoronoiDiagram::cell_type &cell, SegmentIterator segment_begin, SegmentIterator segment_end) |
| template<typename T> | |
| static bool | is_in_range (double value) |
| template<typename T> | |
| static bool | is_in_range (const VoronoiDiagram::vertex_type &vertex) |
| template<typename T> | |
| static bool | is_in_range (const VoronoiDiagram::edge_type &edge) |
|
static |
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.
Adapted from CuraEngine VoronoiUtils::computePointCellRange by Tim Kuipers @BagelOrb Jaime van Kessel @nallath, Remco Burema @rburema and @Ghostkeeper.
| cell | The cell to compute the range of line segments for. |
| segment_begin | Begin iterator for all edges of the input Polygons. |
| segment_end | End iterator for all edges of the input Polygons. |
References Slic3r::cast(), Slic3r::Geometry::PointCellRange< PT >::edge_begin, Slic3r::Geometry::PointCellRange< PT >::edge_end, get_source_point(), get_source_point_index(), is_in_range(), Slic3r::Geometry::is_point_inside_polygon_corner(), Slic3r::Arachne::PathsPointIndex< Paths >::next(), Slic3r::Arachne::PathsPointIndex< Paths >::p(), Slic3r::Arachne::PathsPointIndex< Paths >::prev(), and to_point().
Referenced by Slic3r::Arachne::SkeletalTrapezoidation::constructFromPolygons().
|
static |
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.
Adapted from CuraEngine VoronoiUtils::computeSegmentCellRange by Tim Kuipers @BagelOrb, Jaime van Kessel @nallath, Remco Burema @rburema and @Ghostkeeper.
| cell | The cell to compute the range of line segments for. |
| segment_begin | Begin iterator for all edges of the input Polygons. |
| segment_end | End iterator for all edges of the input Polygons. |
References Slic3r::cast(), Slic3r::Geometry::SegmentCellRange< PT >::edge_begin, Slic3r::Geometry::SegmentCellRange< PT >::edge_end, get_source_segment(), and to_point().
Referenced by Slic3r::Arachne::SkeletalTrapezoidation::constructFromPolygons(), Slic3r::Geometry::VoronoiDiagram::detect_known_voronoi_cell_issues(), and Slic3r::Geometry::VoronoiDiagram::try_to_repair_degenerated_voronoi_diagram_by_rotation().
|
static |
Discretize a parabola based on (approximate) step size.
Adapted from CuraEngine VoronoiUtils::discretizeParabola by Tim Kuipers @BagelOrb and @Ghostkeeper.
| approximate_step_size | is measured parallel to the source_segment, not along the parabola. |
References Slic3r::Line::distance_to_infinite_squared(), Slic3r::dot(), is_in_range(), Slic3r::perp(), and Slic3r::Point::rotated().
Referenced by Slic3r::Arachne::SkeletalTrapezoidation::discretize().
|
static |
Referenced by compute_point_cell_range(), Slic3r::Arachne::SkeletalTrapezoidation::discretize(), and Slic3r::Geometry::get_parabolic_segment().
|
static |
Referenced by compute_point_cell_range().
|
static |
References Slic3r::OutOfRange.
Referenced by compute_segment_cell_range(), Slic3r::Geometry::VoronoiDiagram::detect_known_voronoi_cell_issues(), Slic3r::Arachne::SkeletalTrapezoidation::discretize(), and Slic3r::Geometry::get_parabolic_segment().
|
static |
Referenced by Slic3r::Geometry::VoronoiDiagram::detect_known_voronoi_edge_issues(), is_in_range(), Slic3r::Geometry::VoronoiUtilsCgal::is_voronoi_diagram_planar_angle(), and Slic3r::Geometry::VoronoiUtilsCgal::is_voronoi_diagram_planar_intersection().
|
inlinestatic |
References is_in_range().
|
inlinestatic |
References is_finite(), and is_in_range().
|
inlinestatic |
Referenced by compute_point_cell_range(), Slic3r::Arachne::SkeletalTrapezoidation::constructFromPolygons(), Slic3r::Arachne::SkeletalTrapezoidation::discretize(), discretize_parabola(), is_in_range(), is_in_range(), and to_point().
|
static |
References Slic3r::angle().
Referenced by Slic3r::Geometry::VoronoiDiagram::try_to_repair_degenerated_voronoi_diagram_by_rotation().
|
static |
References is_in_range().
|
static |
References to_point().
Referenced by compute_point_cell_range(), compute_segment_cell_range(), Slic3r::Arachne::SkeletalTrapezoidation::constructFromPolygons(), Slic3r::Arachne::SkeletalTrapezoidation::discretize(), and to_point().