Subject: CGAL users discussion list
List archive
- From:
- To:
- Subject: Re: [cgal-discuss] triangulating Polygon_with_holes_2
- Date: Sun, 24 Jan 2010 00:31:50 +0200
Quoting Remi
<>:
I have an instance of Polygon_with_holes_2. First I call
connect_holes(..) to get rid of the holes and then I call
optimal_convex_partition_2(..) with the list of vertices
connect_holes(..) gave me.
But the precondition check in optimal_convex_partition_2(..) fails. It
says that the list of input vertices doesn't represent a simple
polygon! (is_simple_2(..) returns false). Isn't connect_holes(..)
supposed to produce a simple polygon?
No! It is definitely not simple.
Is optimal_convex_partition_2(..) the best way to triangulate
polygons, especially polygons with holes?
Define "best".
One easy way to do it is to use what is called "vertical decomposition", which decomposes an arrangement into pseudo trapezoids. You insert your object of type Polygon_with_holes_2 into an object of type Polygon_set_2 and obtain the underlying arrangement. Then, you use the decompose () free function to obtain the pairs of features that lie above and below every vertex of the arrangement. You discard all features but the ones that induce vertical segments that are contained in the original input polygon with holes. You still need to split real trapezoids into triangles. This process constructs many new points --- it may not suits you.
I'm a beginner so any input is appreciated.
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- [cgal-discuss] triangulating Polygon_with_holes_2, Remi, 01/23/2010
- Re: [cgal-discuss] triangulating Polygon_with_holes_2, efif, 01/23/2010
- Re: [cgal-discuss] triangulating Polygon_with_holes_2, Remi, 01/24/2010
- Re: [cgal-discuss] triangulating Polygon_with_holes_2, Mariette Yvinec, 01/25/2010
- Re: [cgal-discuss] triangulating Polygon_with_holes_2, efif, 01/23/2010
Archive powered by MHonArc 2.6.16.