How joining two Polygon_with_holes_2 on cgal
Asked Answered
H

0

6

I have two polygons (Polygon_with_holes_2) how joining it into thirth Polygon_with_holes_2

I need general solution. Get any polygon_with_holes (or not if empty hole list but still polygon_with_holes structures) and joining it with other and get polygon_with_holes. How check orientation (cgal not can joining if it not good), reducing points etc. How to do this with good code without memory leak.

Helmick answered 11/11, 2017 at 22:56 Comment(6)
Have you tried to read any sort of documentation, doc.cgal.org/latest/Boolean_set_operations_2/… and without your code you are expecting us to be Yoda!!Guidebook
@Frrank on docummentation no exist any example with Polygon_with_holes_2 If You clever show me.Helmick
At least in this example boolean operation is done on polygon with holes.Prady
@Prady You are clever.Thanks, I search this a few day. I cant vote Your ansver, sorryHelmick
How defining Polygon_with_holes_2 without any holes? Empty? Polygon_2 outP; Polygon_2 holesP[1]; outP.push_back (Point_2 (0, 0));.... 4 point Polygon_with_holes_2 P (outP, holesP, holesP + 1); i get Explanation: Holes of the PWH intersect amongst themselves or with outer boundary Refer to the bug-reporting instructions at cgal.org/bug_report.html terminate called after throwing an instance of 'CGAL::Precondition_exception' what(): CGAL ERROR: precondition violation! Expr: is_valid_unknown_polygon(p, t)Asthma
@Please share the code that show how you are creating the polygon. Then we can talk about boolean on the polygon.Cassius

© 2022 - 2024 — McMap. All rights reserved.