Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] AABB_tree all_intersections: Multiple identical intersections

Subject: CGAL users discussion list

List archive

[cgal-discuss] AABB_tree all_intersections: Multiple identical intersections


Chronological Thread 
  • From: alef <>
  • To:
  • Subject: [cgal-discuss] AABB_tree all_intersections: Multiple identical intersections
  • Date: Mon, 19 Nov 2012 17:05:51 -0800 (PST)

Hello everybody,

Problem: My code computes multiple identical intersections of a segment with
a polyhedron.

I try to solve the following problem from
examples/AABB_tree/AABB_polyhedron_facet_intersection_example.cpp

The kernel is defined exactly as follow:
/typedef CGAL::Gmpq FT;
typedef CGAL::Lazy_exact_nt<FT> RT;
typedef CGAL::Simple_cartesian<RT> K;/

the tetrahedron is defined by:
/Point p1(1.0, 0.0, 0.0);
Point q1(0.0, 1.0, 0.0);
Point r1(0.0, 0.0, 1.0);
Point s1(0.0, 0.0, 0.0);
polyhedron.make_tetrahedron(p1, q1, r1, s1);/

The segment is defined by:
/Point a(0.25, 0.25, 1.0);
Point b(-0.25, -0.25, 1.0);
Segment segment_query(a,b);/

The intersection is performed by:
/std::vector<Object_and_primitive_id> intersections;
tree.all_intersections(segment_query, std::back_inserter(intersections));/

The result should be: 1 intersection at (0,0,1).

But the it gives me 3 intersections each one at (0,0,1). Is it normal or is
it a bug? if it is a bug then what could be the solution?

Cordially,
Adrien



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/AABB-tree-all-intersections-Multiple-identical-intersections-tp4656289.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page