Subject: CGAL users discussion list
List archive
[cgal-discuss] ??????[cgal-discuss] ?????? [cgal-discuss] Had any people get this precondition exception?
Chronological Thread
- From: "??????" <>
- To: "cgal-discuss" <>
- Subject: [cgal-discuss] ??????[cgal-discuss] ?????? [cgal-discuss] Had any people get this precondition exception?
- Date: Wed, 2 Jan 2013 17:28:20 +0800
Sebastien, Thank you.
I have use CGAL::to_double solution the question. And the precondition exception is not throwed out now.
best regards.
---------------------------------------
Linker Li
---------------------------------------
Linker Li
------------------ ???????? ------------------
??????: "??????"<>;
????????: 2013??1??2??(??????) ????5:05
??????: "cgal-discuss"<>;
????: [cgal-discuss] ?????? [cgal-discuss] Had any people get this precondition exception?
Sebastien, Thank you.
I have tried just now, but I got an error, because the return value of SPoint_2::x() can not cast to double.
How should I do ?
------------------ ???????? ------------------
??????: "Sebastien Loriot (GeometryFactory)"<>;
????????: 2013??1??2??(??????) ????4:35
??????: "cgal-discuss"<>;
????: Re: [cgal-discuss] Had any people get this precondition exception?
Sebastien.
On 12/30/2012 05:33 PM, ?????? wrote:
> Hello, every one.
> When I intserted 4 segments which form a rectange into a empty
> arrangment_2, I got this exeption :
> Precondition_exception
> library: CGAL
> _expression_: comp_f(object, parentP->object) != SMALLER
> filename: f:\mydev\cgal-4.1\include\cgal\multiset.h
> line_number: 2128
> The under codes were rough wirted without compiling, but the positions
> of the segments are extracted in my really code.
>
> #include <CGAL/Arr_segment_traits_2.h>
> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
> #include <CGAL/Arrangement_2.h>
>
> typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
> typedef CGAL::Point_3<Kernel> Point_3;
> typedef CGAL::Arr_segment_traits_2<Kernel> Traits_2;
> typedef Traits_2::X_monotone_curve_2 Segment_2;
> typedef std::list<Segment_2> Segment_2_List;
> typedef Traits_2::Point_2 SPoint_2;
> typedef CGAL::Arrangement_2<Traits_2> SArrangement_2;
> void main()
> {
> SArrangement_2 rArr;
> Segment_2_List rSegList;
> rSegList.push_back(Segment_2(SPoint_2(512921.36092875537
> ,512921.36092875537), SPoint_2(507017.01928130072, 41693.804962627386)));
> rSegList.push_back(Segment_2(SPoint_2(507017.01928130072
> ,41693.804962627386), SPoint_2(508643.36489923624, 43320.150579188790)));
> rSegList.push_back(Segment_2(SPoint_2(508643.36489923624
> ,43320.150579188790), SPoint_2(514547.70652221481, 37415.808925923731)));
> rSegList.push_back(Segment_2(SPoint_2(514547.70652221481
> ,37415.808925923731), SPoint_2(512921.36092875537, 35789.463329528837)));
>
> try
> {
> CGAL::insert(rArr, rSegList.begin(), rSegList.end());
> }
> catch (CGAL::Failure_exception e)
> {
> std::out<<"CGAL exception:\n library: "<<e.library()
> <<"\n _expression_:"<<e._expression_()
> <<"\n filename:"<<e.filename()
> <<"\n line_number:"<<e.line_number()
> <<"\n message:"<<e.message();
> }
> }
> Who can tell me the reason?
> Is this a bug of arrangment_2 library?
> best regards.
> ---------------------------------------
> Linker Li
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] ??????[cgal-discuss] ?????? [cgal-discuss] Had any people get this precondition exception?, ??????, 01/02/2013
Archive powered by MHonArc 2.6.18.