Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Precondition fail in intersection check

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Precondition fail in intersection check


Chronological Thread 
  • From: Francesc Vila <>
  • To:
  • Subject: Re: [cgal-discuss] Precondition fail in intersection check
  • Date: Thu, 12 Aug 2010 15:00:17 +0200

When I change the kernel type, I obtain compilation errors:

d:\cgal-3.6.1\include\cgal\compute_outer_frame_margin.h(113) : error C2664: 'boost::optional<T>::optional(boost::none_t)' : cannot convert parameter 1 from 'boost::optional<T>' to 'boost::none_t'
with
[
T=KFT
]
and
[
T=CGAL::Lazy_exact_nt<CGAL::Gmpq>
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
d:\cgal-3.6.1\include\cgal\create_offset_polygons_2.h(92) : see reference to function template instantiation 'boost::optional<T> CGAL::compute_outer_frame_margin<PointIterator,FT>(ForwardPointIterator,ForwardPointIterator,FT)' being compiled
with
[
T=KFT,
PointIterator=std::_Vector_iterator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>>>,std::allocator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>>>>>,
FT=double,
ForwardPointIterator=std::_Vector_iterator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>>>,std::allocator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>>>>>
]
d:\cgal-3.6.1\include\cgal\create_offset_polygons_2.h(319) : see reference to function template instantiation 'boost::shared_ptr<T> CGAL::CGAL_SS_i::create_partial_exterior_straight_skeleton_2<FT,std::_Vector_iterator<_Ty,_Alloc>,SsK>(const FT &,PointIterator,PointIterator,const K &)' being compiled
with
[
T=CGAL::Straight_skeleton_2<CGAL::Exact_predicates_inexact_constructions_kernel>,
FT=double,
_Ty=CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>>>,
_Alloc=std::allocator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>>>>,
SsK=CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>>,
PointIterator=std::_Vector_iterator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>>>,std::allocator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>>>>>,
K=CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>>
]
d:\cgal-3.6.1\include\cgal\create_offset_polygons_2.h(334) : see reference to function template instantiation 'std::vector<_Ty> CGAL::create_exterior_skeleton_and_offset_polygons_2<FT,Polygon,OfK,CGAL::Filtered_kernel<CK>>(const FT &,const Polygon &,const OfK &,const SsK &)' being compiled
with
[
_Ty=PolygonPtr,
FT=double,
Polygon=CGAL::Polygon_2<K>,
OfK=CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>>,
CK=CGAL::Simple_cartesian<double>,
SsK=CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>>
]
d:\cgal-3.6.1\include\cgal\create_offset_polygons_2.h(343) : see reference to function template instantiation 'std::vector<_Ty> CGAL::create_exterior_skeleton_and_offset_polygons_2<FT,Polygon,CGAL::Lazy_kernel<Exact_kernel>>(const FT &,const Polygon &,const OfK &)' being compiled
with
[
_Ty=PolygonPtr,
FT=double,
Polygon=CGAL::Polygon_2<K>,
Exact_kernel=CGAL::Simple_cartesian<CGAL::Gmpq>,
OfK=CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>>
]
d:\l2b_dll\library.cpp(231) : see reference to function template instantiation 'std::vector<_Ty> CGAL::create_exterior_skeleton_and_offset_polygons_2<double,CGAL::Polygon_2<Traits_P>>(const FT &,const Polygon &)' being compiled
with
[
_Ty=PolygonPtr,
Traits_P=K,
FT=double,
Polygon=CGAL::Polygon_2<K>
]

When I call create_exterior_skeleton_and_offset_polygons_2.

This function uses Exact_predicates_inexact_constructions by default, and I don't know how to change this behaviour.

Francesc

El 12/08/2010 12:08,

escribió:
You should use exact predicates and exact constructions. After all you construct new points. I've tried it and wasn't able to reproduce (with an exact construction kernel). I get 2 intersections.

Quoting "Francesc Vila"
<>:

Hi,

I am doing an intersections check using CGAL::compute_intersection_points. I am using an exact predicates and inexact constructions kernel.

When I compute the intersections I receive an exception when is checking the precondition "comp_f(object, nodeP->object)" in CGAL::multiset. Could anyone explain why this exception is thrown?

In the comments it says that they are checking that the tree order is not violated, but I don't see why do those segments violate the order.

The contents of all the intersection segments is: (each line is a segment)

( 38029.437251200005, -91970.562748799988) ( 38029.437251200005, 38029.437251200005)
( 38029.437251200005, 38029.437251200005) (-128029.43725120000, 38029.437251200005)
(-128029.43725120000, 38029.437251200005) (-128029.43725119998, 21970.675886262117)
(-128029.43725119998, 21970.675886262117) ( 21970.562748800003, 21971.675886262114)
( 21970.562748800003, 21971.675886262114) ( 21970.562748799999, -108028.50010501972)
( 21970.562748799999, -108028.50010501972) ( 258029.43725120003, -108029.37439714751)
( 258029.43725120003, -108029.37439714751) ( 258029.43725120003, -91970.562748799988)
( 258029.43725120003, -91970.562748799988) ( 38029.437251200005, -91970.562748799988)
(-145000.00000000000, 5000.0000000000000) ( 275000.00000000000, 5000.0000000000000)

Thanks in advance,

Francesc Vila



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








Archive powered by MHonArc 2.6.16.

Top of Page