10000 Do not deduplicate single line polygon by Czaki · Pull Request #65 · 4DNucleome/PartSegCore-compiled-backend · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Do not deduplicate single line polygon #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 14, 2025
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
0