Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] find outer edge of set of segment2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] find outer edge of set of segment2


Chronological Thread 
  • From: Mariette Yvinec <>
  • To:
  • Subject: Re: [cgal-discuss] find outer edge of set of segment2
  • Date: Thu, 05 Jul 2012 17:59:50 +0200

Alpha_shapes can give you a set of triangulation edges
which are segments on the boundary of your objects.

Each edge has two endpoints that are triangulation vertices.
From thes incidences between edges and vertices
you may easily organize your set of edges into polygonal contours ;
each vertex is incident  to edges and those edges
are consecutive on the contour.
Once this is done, it is easy to orient the polygonal contour
so that the interior of the object is on the left.

The outer polygon is then the only one that gets
a counterclockwise orientation. You may also look
for the contour going through the vertex with max or min x-coordinate.


Le 05/07/12 17:06, a écrit :
hello,
I am developing a CAD application.
From a set of 2D points, I would like to get the outer edge of a building
floor.

I have used the alpha shape algorithm and he successfully gave me a
std::vector<Segment_2>.
When I draw the set of segments, I have a polygon with several holes.

Now I would like to keep only the outer Polygon and discard holes polygons

Is there any CGAL way to achieve this ?
Thank you very much


-- 
Mariette Yvinec
Geometrica project team
INRIA  Sophia-Antipolis  





Archive powered by MHonArc 2.6.18.

Top of Page