Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Intersection of two CONVEX 3D polyhedrons

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Intersection of two CONVEX 3D polyhedrons


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Re: Intersection of two CONVEX 3D polyhedrons
  • Date: Thu, 19 Apr 2012 16:44:08 +0200

On 04/19/2012 04:24 PM, Olivier Devillers wrote:
Le 4/19/12 3:32 PM, ochyomdu a écrit :
Hallo Dimitris.

The easiest way to calculate intersection of two polyhedrons is using of
class Nef_Polyhedron_3.

If You need to use some functions from Polyhedron_3 You can just convert
Polyhedron_3 into Nef_Polyhedron_3 (using constructor), calculate
intersection of polyhedrons and convert the resulting Nef_Polyhedron_3
into
Polyhedron_3 back (using function convert_to_polyhedron()).

Intersection is calculated with operation *
N1*N2

You find more information about Nef_Polyhedron_3 here:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Nef_3/Chapter_main.html


yes,
but it will be quite inneficient if the two polyhedra ere known to be
convex.

by dualization and convex hull you will do it in (N1+N2)log(N1+N2)

(and nef-polyhedra deals with very special cases (degenerate) but for that
they require exact arithmetic and it costs some time)

Olivier is right.
Note that for the dualization, you also need exact constructions as the dualization is a construction. Exact_predicates_exact_constructions can be used for that.

Sebastien.



Archive powered by MHonArc 2.6.16.

Top of Page