Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Degenerate cases in segment delaunay graph

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Degenerate cases in segment delaunay graph


Chronological Thread 
  • From: Cornelia Auer <>
  • To:
  • Subject: Re: [cgal-discuss] Degenerate cases in segment delaunay graph
  • Date: Thu, 05 Jul 2012 19:56:08 +0200

Thank you very much for your response!

However using the CGAL::Exact_predicates_exact_constructions_kernel the insertion of segments breaks even earlier. I end up in:

CGAL error: assertion violation!
Expression : !(i>s)
File : c:\Users\bzfauerc\MyAmiraVC9\product\include\arch-Win64VC9\CGAL/In Line : 89
Explanation: Variable used before being initialized (or CGAL bug)

All I do is:

p1=Point_2(to_exact(myDoublePoint1.x), to_exact(myDoublePoint1.y) );
p2=Point_2(to_exact(myDoublePoint2.x), to_exact(myDoublePoint2.y) );
v_h=sdg.insert(p1,p2, v_h);

I haven't tried the CGAL::Simple_cartesian<CGAL::Gmpq> Kernel yet, as I have trouble in my working enviroment to get it properly included.

However if you see something obviously wrong the way I'm proceeding above I would be very happy if you let me know. Or could it really be a CGAL bug?

Thanks in advance for your answer!
Best,
Cornelia Auer



Am 05.07.2012 07:56, schrieb Sebastien Loriot (GeometryFactory):
On 07/04/2012 07:46 PM, Cornelia Auer wrote:
Dear CGAL users & developers,

with the help of the segment_delaunay_graph_2 I try to compute the
medial axis for a given *non*-convex polygon.
To build the segment delaunay graph (SDG) I am adding edge by edge of
the initial polygon. This should give me only weakly intersecting
segments.

Now, this works perfectly for most of my polygons, however sometimes the
construction of the SDG crashes:

I try to insert a new segment by
v_h=sdg.insert(p1,p2, v_h);
however within the insert routine the check SDG.is_valid() fails and the
procedure crashes. But for no obvious reason (looking at the polygon).
Due to the high grade of templatization the code is really hard to
debug/step through for me. I also tried to find the answer by reading
the paper of Karavelas, but without success.

I would be extremly thankful for any information how degenerate cases
(!SDG.is_valid()) arise for weakly intersecting input segments.

Or if this could be a numerical issue, as I use the
Filtered_kernel<Simple_cartesian<double> >.
Indeed, you should try with a kernel with exact constructions
(CGAL::Simple_cartesian<CGAL::Gmpq> or
CGAL::Exact_predicates_exact_constructions_kernel).

Sebastien.



Thanks in advance for your help
Best,
Cornelia Auer











Archive powered by MHonArc 2.6.18.

Top of Page