Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss]  Boolean operations on Nef Polyhedra

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss]  Boolean operations on Nef Polyhedra


Chronological Thread 
  • From: Peter Hachenberger <>
  • To:
  • Subject: Re: [cgal-discuss]  Boolean operations on Nef Polyhedra
  • Date: Fri, 20 Mar 2009 15:12:04 +0100
  • Importance: Normal
  • Sensitivity:

Hi Christoph,

Nef polyhedra do not work with doubles. Try to use the
Exact_predicates_exact_constructions_kernel as shown
in examples/Nef_3/handling_double_coordinates.cpp.

Peter

-----Christoph Conrad <> wrote: -----

To:
From: Christoph Conrad <>
Date: 03/20/2009 02:22PM
Subject: [cgal-discuss] Boolean operations on Nef Polyhedra

Hello!

I am new to CGAL and i am having two questions, wondering (after reading
some parts of the documentation) whether our requirements could be
fulfilled by the library.

We have OFF files describing surfaces of bone structures in 3d. Boolean
operations in 3d require Nef polyhedra, not only Polyhedron_3. I
inspected the example source files. All source code examples of Nef
Polyhedra are built with GMP integers.

typedef CGAL::Gmpz  NT;
typedef CGAL::Homogeneous<NT>  Kernel;

Is it possible to built a nef polyhedra e.g. with

typedef CGAL::Simple_cartesian<double>  Kernel;

When i try that, a multitude of error messages occurs from several
headers (see below). When i use Gmpz the program compiles but does not
read in the OFF files, cause they contain float values.

My program so far consists of:

- reading in two polyhedra as in
  "CGAL/examples/Polyhedron_IO/off2stl.cpp"

- converting the polygon p with the Nef_polyhedron constructor:
  Nef_polyhedron N1(P);

- Subtracting the nef polyhedra
  N2 -= N1;

- converting the nef polyhedra back to a polyhedra_3
  N2.convert_to_Polyhedron(P);

- and writing this polyhedra back to a file, like in the example
  "off2stl.cpp".

See below for the declarations and error messages. Some advice or hint
would be very nice. Thank you.

Kind regards,
Christoph

typedef CGAL::Simple_cartesian<double>  Kernel;

typedef Kernel::Point_3                 Point;
typedef Kernel::Vector_3                Vector;
typedef CGAL::Polyhedron_3<Kernel>      Polyhedron;
typedef Polyhedron::Vertex_iterator     Vertex_iterator;
typedef Polyhedron::Facet_iterator      Facet_iterator;
typedef Polyhedron::Halfedge_handle     Halfedge_handle;

#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron;

i had to translate the error messages back to english (german msvc++).

*** multiple times:
Fehler 3 error C2676: Binärer Operator '*=': 'CGAL::Null_tag' operator
or conversion not defined
C:\Programme\CGAL-3.3.1\include\CGAL\Nef_S2\Normalizing.h 306

*** multiple times:
Fehler 18 error C2440: '<function-style-cast>': 'CGAL::Null_tag' can't
be converted to 'FT'
C:\Programme\CGAL-3.3.1\include\CGAL\Nef_S2\Normalizing.h 323

*** multiple times:
Fehler 1 error C2064: _expression_ does not evaluate to a function taking
three arguments
übernimmt C:\Programme\CGAL-3.3.1\include\CGAL\Nef_S2\Normalizing.h 300
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page