Re: insert voronoi edges into arrangement

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: insert voronoi edges into arrangement

Paul Neugebauer
@Efi Fogel: thank you for the reply

But I have got still the same problem. I have to solve it to continue my
program.
I get the source and target of the curve with:

*eit.source()->point();
*eit.target()->point();

Please give me a hint, how I get the information for constructing the curve.

Thank you very much,
Paul


Efi Fogel schrieb:

> Paul Neugebauer wrote:
>> Thank you for the reply,
>> I tried this:
>>
>> Traits_2::Curve_2      Curve_2;
>>
>> ...
>> insert_curve(arr,  Curve_2(*eit));
>> ...
>>
>> but still get an error. So what exactly do you mean with "extract".
> By extract I mean that the information for constructing the curve or
> even the curve itself is available in the record pointed by (*eit),
> and should be obtained from there. Please consult the documentation.
>>
>> Thank you,
>> Paul
>>
>>
>> [hidden email] schrieb:
>>> Quoting [hidden email]:
>>>
>>>> Hi List,
>>>> I'm new to CGAL and I'd like to do the following:
>>>>
>>>> Insert the voronoi edges into an arrangement. Like this:
>>>>
>>>>
>>>> typedef CGAL::Voronoi_diagram_2<SDG2,SDG2_AT2,SDG2_AP2>   VD;
>>>> typedef CGAL::Arr_conic_traits_2<Rat_kernel,
>>>>                                  Alg_kernel,
>>>>                                  Nt_traits>             Traits_2;
>>>> typedef CGAL::Arrangement_2<Traits_2>                   Arrangement_2;
>>>>
>>>> VD vd;
>>>> Arrangement_2 arr;
>>>>
>>>> Edge_iterator eit = vd.edges_begin();
>>>> for ( ; eit != vd.edges_end(); ++eit) {
>>>>       insert_curve(arr,  *eit);
>>>> }
>>>>
>>>> *eit is no curve, so I get an error, but how can I do it otherwise ?
>>>
>>> You got it. You have to insert the curve. Extract the curve from the
>>> Voronoi edge iterator, and insert it.
>>>>
>>>> Can someone help me?
>>>>
>>>> Thank you very much in advance,
>>>> Paul
>>>> --
>>>> You are currently subscribed to cgal-discuss.
>>>> To unsubscribe or access the archives, go to
>>>> https://lists-sop.inria.fr/wws/info/cgal-discuss
>>>>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Reply | Threaded
Open this post in threaded view
|

Re: insert voronoi edges into arrangement

Paul Neugebauer
Hi again,

I found this routine:

Segment_Delaunay_graph_2<Gt,ST,DS,LTag>::primal(const Edge e) const

The return type is a Line_2, a Segment_2, a Ray_2 or a Parabola_Segment_2.
Maybe this routine will solve my problem. But I can't imagine this is
the best one.

If anybody has a better idea or knows a better solution, please answer me.

Thank you very much in advance,
Paul


Paul Neugebauer schrieb:

> @Efi Fogel: thank you for the reply
>
> But I have got still the same problem. I have to solve it to continue
> my program.
> I get the source and target of the curve with:
>
> *eit.source()->point();
> *eit.target()->point();
>
> Please give me a hint, how I get the information for constructing the
> curve.
>
> Thank you very much,
> Paul
>
>
> Efi Fogel schrieb:
>> Paul Neugebauer wrote:
>>> Thank you for the reply,
>>> I tried this:
>>>
>>> Traits_2::Curve_2      Curve_2;
>>>
>>> ...
>>> insert_curve(arr,  Curve_2(*eit));
>>> ...
>>>
>>> but still get an error. So what exactly do you mean with "extract".
>> By extract I mean that the information for constructing the curve or
>> even the curve itself is available in the record pointed by (*eit),
>> and should be obtained from there. Please consult the documentation.
>>>
>>> Thank you,
>>> Paul
>>>
>>>
>>> [hidden email] schrieb:
>>>> Quoting [hidden email]:
>>>>
>>>>> Hi List,
>>>>> I'm new to CGAL and I'd like to do the following:
>>>>>
>>>>> Insert the voronoi edges into an arrangement. Like this:
>>>>>
>>>>>
>>>>> typedef CGAL::Voronoi_diagram_2<SDG2,SDG2_AT2,SDG2_AP2>   VD;
>>>>> typedef CGAL::Arr_conic_traits_2<Rat_kernel,
>>>>>                                  Alg_kernel,
>>>>>                                  Nt_traits>             Traits_2;
>>>>> typedef CGAL::Arrangement_2<Traits_2>                  
>>>>> Arrangement_2;
>>>>>
>>>>> VD vd;
>>>>> Arrangement_2 arr;
>>>>>
>>>>> Edge_iterator eit = vd.edges_begin();
>>>>> for ( ; eit != vd.edges_end(); ++eit) {
>>>>>       insert_curve(arr,  *eit);
>>>>> }
>>>>>
>>>>> *eit is no curve, so I get an error, but how can I do it otherwise ?
>>>>
>>>> You got it. You have to insert the curve. Extract the curve from
>>>> the Voronoi edge iterator, and insert it.
>>>>>
>>>>> Can someone help me?
>>>>>
>>>>> Thank you very much in advance,
>>>>> Paul
>>>>> --
>>>>> You are currently subscribed to cgal-discuss.
>>>>> To unsubscribe or access the archives, go to
>>>>> https://lists-sop.inria.fr/wws/info/cgal-discuss
>>>>>
>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss