Subject: CGAL users discussion list
List archive
- From: "peter heppel" <>
- To: <>
- Subject: ??intersection bug??
- Date: Fri, 31 Aug 2007 16:48:58 +0200
- Organization: pha
Hello
I'm getting a lot of precondition violations with 2D polygon boolean
operations using CGAL::Exact_predicates_inexact_constructions_kernel
Here's just one test case which failed. The enclosed PDF shows the data. If
anyone can replicate the failure I'd appreciate some advice on a
work-around. An exact data type isnt an option because of the run-time.
The output is
' CGAL error: precondition violation!
Expr: comp_f(object, nodeP->object) != LARGER
File: c:\program files\cgal-3.3\include\cgal\multiset.h
Line: 2141
Explanation:Make sure the insertion does not violate the tree order(2)'
This occurs while executing
theSet.intersection(pgn);
where the declarations are
Polygon_2 pgn;
Polygon_set_2 theSet;
And the values are
Pgn is:
7.1268867, 0.411146536
9.1268867, 0.411146536
9.1268867, 17.9511202
7.1268867, 17.9511202
theSet consists of a single pwh which doesnt have holes.
It is simple and concave.
This pwh's outer boundary is
9.14120777, 5.38700087
9.59561777, 6.40550604
10.6611309, 6.70322293
11.7893212, 6.78156949
11.6326281, 7.65905087
10.0186891, 7.50235776
10.2067209, 8.58354018
9.8070098, 8.59920949
7.90838222, 8.97393861
5.7516079, 7.62491375
5.77658984, 7.27516657
6.07637315, 7.30014851
6.35950182, 7.38342165
6.78419483, 7.50000404
7.02568694, 7.40840359
7.19223322, 7.15025686
7.11728739, 6.95872864
6.93408648, 6.86712818
6.69259438, 6.8754555
6.6426305, 7.00869252
6.80084946, 7.10862029
6.93408648, 7.10862029
6.90910454, 7.21687537
6.71757632, 7.30847582
6.50106616, 7.18356611
6.36782913, 6.90876475
6.32619257, 6.68392728
6.70924901, 6.54236294
6.95906843, 6.55069025
7.28383367, 6.69225459
7.56696234, 6.64229071
7.62525354, 6.41745323
7.6585628, 5.97610559
7.57528966, 5.64301303
7.38376144, 5.53475795
7.03401425, 5.47646675
6.32619257, 5.49312138
6.30953794, 5.6846496
6.32619257, 6.08436067
6.71757632, 6.22592501
7.13394202, 6.30919815
7.09230545, 6.1010153
6.84248603, 6.05937873
6.60932124, 5.94279633
6.6426305, 5.77625005
6.93408648, 5.801232
7.23386979, 5.84286857
7.28383367, 6.14265187
7.25885173, 6.45076249
6.44277496, 6.32585278
5.88484493, 6.09268799
5.81822641, 5.15170151
5.74328059, 4.56046222
5.76826253, 4.05249607
6.1679736, 3.86929516
7.10063276, 3.78602202
7.63358086, 4.04416875
7.76681788, 4.4938437
7.716854, 4.95184597
7.23386979, 5.09341031
6.41779302, 5.03511911
6.40113839, 4.65206267
6.97572305, 4.62708073
7.10063276, 4.82693626
7.37543412, 4.84359089
7.38376144, 4.57711684
7.01735962, 4.35227937
6.65095781, 4.31897011
6.1096824, 4.39391594
6.13466434, 4.63540804
6.14299166, 4.81028164
6.10135509, 4.93519134
6.27622868, 5.04344643
6.19295554, 5.15170151
6.67593975, 5.24330196
7.40874338, 5.30992047
7.75849057, 5.22664733
8.11656507, 5.39319361
8.10823775, 5.07675568
8.23314746, 4.91853672
8.11656507, 4.51882565
8.21190456, 3.56246812
7.51549076, 3.19491639
6.70300801, 3.15622674
6.37414594, 2.65326122
6.6256287, 2.45981294
7.28335283, 2.74998536
7.55418042, 2.20833019
7.07055973, 2.20833019
6.78038732, 1.87946812
6.35480111, 2.11160605
6.25807697, 1.55060605
6.43218042, 1.12501984
5.9292149, 0.699433634
6.25807697, 0.660743978
6.84630743, 0.274603014
9.84630743, 0.274603014
12.8463074, 2.27460301
13.5839186, 4.39401721
12.8304808, 5.96938726
11.5975825, 5.96938726
10.2276954, 5.83239856
9.95371805, 4.46251156
10.0907067, 3.4350963
11.323605, 3.91455675
11.7345712, 4.73648896
12.2437312, 4.50951949
12.1653847, 3.89841638
11.7423133, 3.3186519
11.2879033, 2.89558052
10.5827843, 2.77022604
9.72097225, 2.89558052
9.45459397, 3.30298259
9.29790087, 4.00810156
Peter
email:
(SUI) +41 218 621 015
(mob) +33 681307652
Home +33 2 97 82 19 30
Peter Heppel Associates
8 rue du Faubourg Poissonnière
75010 Paris France
www.peterheppel.com
-----Original Message-----
From: Zorglub78
[mailto:]
Sent: Wednesday, August 29, 2007 8:12 AM
To:
Subject: [cgal-discuss] Bug in Nef_polyhedron_3 (II v_first, II v_last) ?
Hi all,
When I try to use this very trivial code:
#include <CGAL/basic.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Nef_polyhedron_3.h>
typedef CGAL::Gmpz NT;
typedef CGAL::Homogeneous<NT> Kernel3D;
typedef Kernel3D::Point_3 Point3D;
typedef CGAL::Iso_cuboid_3<Kernel3D> Cuboid3D;
typedef CGAL::Nef_polyhedron_3<Kernel3D> Polyhedron3D;
using std::vector;
int main(int argc, char** argv)
{
Cuboid3D c1(Point3D(0,0,0), Point3D(3,3,3));
vector<Point3D> vp;
for(u_int i=0; i<8; ++i)
vp.push_back(c1[i]);
Polyhedron3D p(vp.begin(), vp.end(), true);
}
Execution fails with the following error:
"Conversion from vertex cycle to Nef_polyhedron_3 was not successful.
Error history: Direction of projection is 'z'. -> Different vertices are
projected to same location! Now, direction of projection is 'x'. ->
Different vertices are projected to same location! Now, direction of
projection is 'y'. -> Different vertices are projected to same location!
Finally, empty Nef_polyhedron_3 was constructed."
Am I doing wrong something, or is there a bug in Nef_polyhedron_3 (II
v_first, II v_last) ?
Thanks for responses.
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
Attachment:
failedintersect.pdf
Description: Adobe PDF document
- Bug in Nef_polyhedron_3 (II v_first, II v_last) ?, Zorglub78, 08/29/2007
- Re: [cgal-discuss] Bug in Nef_polyhedron_3 (II v_first, II v_last) ?, Peter Hachenberger, 08/29/2007
- ??intersection bug??, peter heppel, 08/31/2007
Archive powered by MHonArc 2.6.16.