Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1320,13 +1320,17 @@ struct GraphNode {
* resulting sub-polygon contains unique edges. This operation can help to
* resolve ambiguities in complex or self-intersecting polygons.
*
* Note: Polygons with exactly 2 points are treated as single line segments and
* are not processed for edge deduplication between their first and last points.
*
* @param polygon The input polygon represented as a list of edges.
*
* @return A vector of sub-polygons, where each sub-polygon is free of repeated
* edges.
*/
inline std::vector<std::vector<point::Point>> split_polygon_on_repeated_edges(
const std::vector<point::Point> &polygon) {
if (polygon.size() < 3) return {polygon};
auto edges_dedup = calc_dedup_edges({polygon});
std::vector<std::vector<point::Point>> result;
point::Segment segment;
Expand Down
Loading