Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] [REPOST] Why do I get precondition violation here ?

Subject: CGAL users discussion list

List archive

[cgal-discuss] [REPOST] Why do I get precondition violation here ?


Chronological Thread 
  • From: Kim <>
  • To:
  • Subject: [cgal-discuss] [REPOST] Why do I get precondition violation here ?
  • Date: Wed, 13 May 2009 23:49:32 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=dnHnca8ADtOB/+G7sTPHlEYkVsHsc/2zCfDrXR8xtwBe1v5oQbfhKC7FMNN2hW7ghB INrEJYUOYE83Hf0I4JQmg2IYjvEXQfGFPWoIQHoLo5Muf+zH1mXV+bfN89W/CqBpnsMC VlJT8fjMS2iCoCbLeWfn45UMx0Nx0dhQSoY2c=

Hi
sorry ! this is a repost ,,, but I am really stopped.

noone has any idear at all ? any clue is appreciated!
I am sure the start and endpoint are the same ,, since if I input the
same , just as linesegment then it works perfect.

Why is the polygon below failing when
trying to
if (pgn.orientation()==CGAL::CLOCKWISE )   <-- fails with error , see below
Precondition violation.

I can not see any thing wrong !!

Polygon_2(
 (Circle_2(PointC2(1.74193e+006, 44602.1),
1.61312e+006,counterclockwise)) [1.74193e+006 43332 --> 1.7432e+006
44602]
 (Circle_2(PointC2(1.73489e+006, 44595.5),
6.90773e+007,counterclockwise)) [1.7432e+006 44602 --> 1.73847e+006
52099]
 (Circle_2(PointC2(1.73792e+006, 50955.1),
1.60508e+006,counterclockwise)) [1.73847e+006 52099 --> 1.73792e+006
52222]
 (Circle_2(PointC2(1.73792e+006, 50951.9),
1.61312e+006,counterclockwise)) [1.73792e+006 52222 --> 1.73665e+006
50952]
 (Circle_2(PointC2(1.73792e+006, 50952),
1.61415e+006,counterclockwise)) [1.73665e+006 50952 --> 1.73737e+006
49805]
 (Circle_2(PointC2(1.73491e+006, 44606.1), 3.31029e+007,
clockwise))[1.73737e+006 49805 --> 1.74066e+006 44602]
 (Circle_2(PointC2(1.74193e+006, 44602.1),
1.61312e+006,counterclockwise)) [1.74066e+006 44602 --> 1.74193e+006
43332]
)
CGAL error: precondition violation!
Expression : cv1.point_position (p) == EQUAL && cv2.point_position (p) ==
EQUAL
File       : c:\cgal\cgal-3.4\include\cgal\arr_circle_segment_traits_2.h
Line       : 249
Explanation:
Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html

I did use this way to calc the  the curves:

Point_2 ps = Point_2(sx,sy);  //start
Point_2 pm = Point_2(mx,my);  //midpoint
Point_2 pe = Point_2(ex,ey);  //endpoint
Curve c =Curve( ps,pm,pe);
curve = XCurve(c.supporting_circle(),c.source(),c.target(),c.orientation(),0);

TIA
Kim



Archive powered by MHonArc 2.6.16.

Top of Page