Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] construct polygon using vertices and edges as input
- Date: Wed, 15 Jun 2011 08:29:21 +0200
The answer depends on what you want to do with your polygon.
Using CGAL::Polygon will not work because your polygon has
a tail made of two segments.
You can use halfedge data structure to get a representation of it,
or even the arrangement package (using the insert functions insert_from_left_vertex, insert_from_right_vertex and insert_at_vertices) if you then need to do location queries.
See related documentation pages:
HDS:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/HalfedgeDS/Chapter_main.html
Arrangement:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Arrangement_on_surface_2/Chapter_main.html
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Arrangement_on_surface_2_ref/Class_Arrangement_2.html
Sebastien.
Chongke Bi wrote:
Dear all,
I will explain my question using a simple example.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
The input of my question is as followings:
- 8 Vertices :
(index of vertices)
-0.500000 -0.500000 0.00000 (0)
0.500000 -0.500000 0.00000 (1)
1.500000 -1.5000000 0.00000 (2)
2.500000 -0.5000000 0.00000 (3)
2.500000 0.500000 0.00000 (4)
1.500000 1.500000 0.00000 (5)
0.500000 0.500000 0.00000 (6)
-0.500000 0.500000 0.00000 (7)
- 9 Edges : 01 (01 represents an edge with vertices 0 and 1)
12
23
34
45
56
61
67
70
The output that I want to get is
- to construct a polygon by using these vertices and edges
or - to get the information of the corresponding surfaces
surface-1 : 0167
surface-2 : 123456
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Are there any functions or methods to solve this problem.
Thanks.
Best regards,
Chongke
- [cgal-discuss] construct polygon using vertices and edges as input, Chongke Bi, 06/15/2011
- Re: [cgal-discuss] construct polygon using vertices and edges as input, zeinab hasani, 06/15/2011
- Re: [cgal-discuss] construct polygon using vertices and edges as input, Sebastien Loriot (GeometryFactory), 06/15/2011
- Re: [cgal-discuss] construct polygon using vertices and edges as input, Sebastien Loriot (GeometryFactory), 06/15/2011
- Re: [cgal-discuss] construct polygon using vertices and edges as input, Chongke Bi, 06/15/2011
- Re: [cgal-discuss] construct polygon using vertices and edges as input, zeinab hasani, 06/15/2011
Archive powered by MHonArc 2.6.16.