Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Nef_polyhedron compile error in bounding_box_3.h

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Nef_polyhedron compile error in bounding_box_3.h


Chronological Thread 
  • From: Richard Downe <>
  • To: <>
  • Subject: Re: [cgal-discuss] Nef_polyhedron compile error in bounding_box_3.h
  • Date: Sun, 21 Aug 2011 21:58:40 -0500

I'm not certain, but as far as I can tell (e.g., in my experience), NEF_polyhedra require use of an exact kernel.
In my code, I use the Exact_predicates_exact_constructions_kernel for my NEF_polyhedra, and then use a polyhedral builder to convert them into Polyhedron_3<Exact_predicates_inexact_constructions_kernel> before meshing.
For the conversion, there's a perfectly serviceable class in demo/Polyhedron/Scene_nef_polyhedron_item.cpp in the source tree that takes as template arguments the source kernel and the destination kernel, though if you're not doing anything that requires the inexact constructions kernel you may be fine with the EPECK kernel throughout.
--rd

On 08/21/2011 04:53 PM, Garrett Bodily wrote:
I am attempting to create a simple test case for Nef_Polyhedron but keep
running into a compile error and am not sure what to try next.

below is my entire program:

/////////////////////// Start of Program /////////////////////////////
#include&lt;CGAL/Simple_cartesian.h&gt;
#include&lt;CGAL/Polyhedron_3.h&gt;
#include&lt;CGAL/Nef_polyhedron_3.h&gt;

typedef CGAL::Simple_cartesian<double> Kernel;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron;
typedef Nef_polyhedron::Plane_3 Plane_3;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef Polyhedron::HalfedgeDS HalfedgeDS;
typedef CGAL::Point_3<Kernel> Point;

#include<iostream>

int main()
{
Point p1(0.0, 0.0, 0.0);
Point p2(2.0, 0.0, 0.0);
Point p3(1.0, 2.0, 0.0);
Point p4(1.0, 1.0, 2.0);

Polyhedron P1;
P1.make_tetrahedron(p1, p2, p3, p4);


Nef_polyhedron N1(P1);


std::cout<< "Done."<< std::endl;
return 0;
}
/////////////////////// End of Program /////////////////////////////

When I try to compile this program i get a compiler error in the header file
bounding_box_3.h that says that "hi" and "lo" (on lines 89 and 90 of the
header file) are not members of CGAL::Box_intersection_d::Box_d.

Has anyone run into this error before?

Any suggestions?

Thanks
Garrett B





Archive powered by MHonArc 2.6.16.

Top of Page