Subject: CGAL users discussion list
List archive
- From: Francesc Vila <>
- To:
- Subject: Re: [cgal-discuss] Partition a polygon
- Date: Tue, 22 Jun 2010 15:43:53 +0200
El 21/06/2010 18:23, Sebastien Loriot (GeometryFactory) escribió:
Francesc Vila wrote:Hi,
El 21/06/2010 17:44, Sebastien Loriot (GeometryFactory) escribió:An alternative that may fit you need is to use a constrained
Francesc Vila wrote:I thought so..... :(
Hi all,
I am using CGAL to make some transformations on a GDSII (stream format) file. Within this file, I can read polygons that aren't always simple. Is there any way to partition a polygon that is not simple? In fact, the polygon is weakly simple (has a coincident edge).
Thanks in advance,
Francesc Vila
I think you will need to use a pre-processing step to extract simple polygons from each weakly simple polygon.
S.
Further reading this list, I found a method to create polygons with holes from Polygon_2. But it is dated 2009 and the code doesn't compile on my system.... Maybe it is my fault, but I think I can benefit from the general idea it implements.
Regards,
Francesc Vila
triangulation to partition your weakly simple polygon,
constraints being polygon edges.
S.
I tried the constrained triangulation, but some of the triangles it generated were part of the hole and not the polygon. Finally I preprocessed the polygon to make it simple. I have iterated through all vertices, and once I find a repeated one, I create a new polygon and save into a list. When I have finished I join all polygons in that list to obtain the polygon with holes.
Best regards,
Francesc
- [cgal-discuss] Partition a polygon, Francesc Vila, 06/21/2010
- Re: [cgal-discuss] Partition a polygon, Sebastien Loriot (GeometryFactory), 06/21/2010
- Re: [cgal-discuss] Partition a polygon, Francesc Vila, 06/21/2010
- Re: [cgal-discuss] Partition a polygon, Sebastien Loriot (GeometryFactory), 06/21/2010
- Re: [cgal-discuss] Partition a polygon, Francesc Vila, 06/22/2010
- Re: [cgal-discuss] Partition a polygon, Ralph Boland, 06/22/2010
- Re: [cgal-discuss] Partition a polygon, Francesc Vila, 06/22/2010
- Re: [cgal-discuss] Partition a polygon, Sebastien Loriot (GeometryFactory), 06/21/2010
- Re: [cgal-discuss] Partition a polygon, Francesc Vila, 06/21/2010
- Re: [cgal-discuss] Partition a polygon, Sebastien Loriot (GeometryFactory), 06/21/2010
Archive powered by MHonArc 2.6.16.