Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Intersections with a Nef_polyhedron_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Intersections with a Nef_polyhedron_3


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Intersections with a Nef_polyhedron_3
  • Date: Fri, 29 Jun 2012 16:12:22 +0200

On 06/28/2012 05:19 PM, Hugo Mercier wrote:
Hi all,

I am trying to figure out how to test the intersection (and retrieve the
result of intersection as a second step) between some primitives and a
Nef_polyhedron_3.

If I want to test the intersection with a >=2-dimension primitive, I
think a good way is to build a Polyhedron_3 from that primitive and
substract it from the Nef_polyhedron.

But what about points and lines ?

You should use this [1] package for that purpose.
The idea is to reduce intersection test at the face level.

(Note that you can use a polyhedron instead of a nef-polyhedron).

You can also test the intersection between two polyhedra with this package.



About points, there is a locate( Point_3 ) method, but I cannot figure
out how to know if the resulting volume is the bounded one (my
nef_polyhedron) or the unbounded "outter" volume (A similar question has
been asked some time ago on this list without answer).

If you constructed a nef polyhedron, if you call mark() member function
of the volume, true means its in the model.



About line segments, I cannot rely on the point test, since a line
segment can intersects a volume, but not its two vertices.

I am currently thinking of converting the Nef_polyhedron to a Polyhedron
(If I understand correctly, it is done using triangulation underneath,
right ?) and use intersection tests between Segment_3 and Triangle_3 for
the "naive" option and AABB trees for something more efficient.
Is there a more "direct" way to do that with CGAL ?


Sebastien.

[1] http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Box_intersection_d/Chapter_main.html




Archive powered by MHonArc 2.6.18.

Top of Page