Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] construct polygon using vertices and edges as input

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] construct polygon using vertices and edges as input


Chronological Thread 
  • From: Chongke Bi <>
  • To:
  • Subject: Re: [cgal-discuss] construct polygon using vertices and edges as input
  • Date: Wed, 15 Jun 2011 15:43:49 +0900
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=QBvGIY4/rFQblJXNneAIdT95M7Nmi1SaxUMjF+GY/v3n1zHNknP7W1fmejDTUNWYwe 91zWAfxgSGJQnBn6HWvCOZffp8wI9UFarfsymBb2vrvNgzFjLVpENc+BGOPJL8Of6fQV Vc8okqy5o/U5DkeCauFT+4FPblK8+eh06s+eo=

Dear Loriot,

Thank you very much for your answer.

I will read the related documents of the two methods you have provided.
After that, maybe I still need your help again. ^_^

Thanks again.

Best regards,
Chongke

On Wed, Jun 15, 2011 at 3:29 PM, Sebastien Loriot (GeometryFactory)
<>
wrote:
> 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
>>
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
>



--
Chongke
BI<>



Archive powered by MHonArc 2.6.16.

Top of Page