Subject: CGAL users discussion list
List archive
Re: Re: [cgal-discuss][Arrangement_2]How to get the associated edges froma given point?
Chronological Thread
- From: "Wang Weiwei" <>
- To: "" <>
- Subject: Re: Re: [cgal-discuss][Arrangement_2]How to get the associated edges froma given point?
- Date: Mon, 23 Apr 2007 19:11:35 +0800
- Disposition-notification-to: "Wang Weiwei" <>
Hello Efraim Fogel,
Thanks for your help!
I'm using the following code to remove the free edges (leaves) froma an arr:
bool bPure;
do {
bPure = true;
for (Arrangement_2::Edge_iterator eit = arr.edges_begin();
eit != arr.edges_end(); ++eit)
{
if(eit->source()->degree() < 2 ||
eit->target()->degree() < 2)
{
std::cout << "free edge found" << std::endl;
arr.remove_edge(eit, false, false);
bPure = false;
}
}
} while(! bPure);
// now remove the isolated vertices
Arrangement_2::Vertex_iterator vit;
for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit)
{
if(vit->degree() == 0)
arr.remove_isolated_vertex (vit);
But it seems not work well, what's wrong?
Thanks
Max
>Wang Weiwei wrote:
>
>> Hello everyone,
>>
>> Some small questions for help:
>>
>> For an Arrangement_2
>>
>> 1. Given a vertex iterator vit, how can I get its associated edges?
>>
>Halfedge_around_vertex_circulator vit.incident_halfedges ()
>
>> 2. Given an edge iterator eit, how can I remove it from the arrangemant?
>>
>> Thanks for any help.
>>
>Face_handle arr.remove_edge (Halfedge_handle eit,
>bool remove_source = true,
>bool remove_target = true)
>
>> Max
>>
>--
> ____ _ ____ _
> /_____/_) o /__________ __ //
>(____ ( ( ( (_/ (_/-(-'_(/
> _/
>
>--
>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][Arrangement_2]How to get the associated edges from a given point?, Wang Weiwei, 04/19/2007
- Re: [cgal-discuss][Arrangement_2]How to get the associated edges from a given point?, Efraim Fogel, 04/19/2007
- Re: Re: [cgal-discuss][Arrangement_2]How to get the associated edges froma given point?, Wang Weiwei, 04/23/2007
- Re: [cgal-discuss][Arrangement_2]How to get the associated edges from a given point?, Efraim Fogel, 04/19/2007
Archive powered by MHonArc 2.6.16.