Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] 3D Polyhedrons intersections

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] 3D Polyhedrons intersections


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] 3D Polyhedrons intersections
  • Date: Thu, 14 Dec 2006 11:50:42 +0100


Hello,

CGAL should offe the feature to triangulate the faces of a
Polyhedron. It's on my todo list.

As it currently doesn't, the easiest solution would probably be to
triangulate a face with a Constrained_triangulation
and split the polyhedron faces along edges of the triangulation.

andreas



FEYEL Frederic. wrote:
Hello,

I made several experiments around your suggestions.

First of all, I really had to use an extended precision kernel,
otherwise all creation of the second
nef fail (this is normal, since it describes a thin structure).

Both the constructor (from a Polyhedron) and the OFF_to_nef_3 work.

On my problems, the computation of the substraction (N2-N1) is
reasonably fast. The creation
of the Nefs from the Polyhedrons using the constructor is much faster
that the OFF_to_nef_3 (of course,
the limitation are more restrictive using the constructor).

So I would say that in my case, the bottleneck is not the boolean
operation itself, but clearly the
creation of the Nefs.

Now, I want to mesh the surface of the resulting Nef. I transformed it
back to a Polyhedron.

I had a look at the mesher class, and a solution would perhaps to define
an implicit surface (and mesh
the 0 isovalue) by computing the signed distance (using a projection
operator) of any point to the polyhedron.

It seems however a little bit complex.

Do you have any ideas to change my Polyhedron so that it contains only
triangles (and not general N-nodes faces) ?

Thank you for everything !






Peter Hachenberger a écrit :
Hi Frederic,

your files do not work for two reasons:

1. If you use the homogeneous kernel and load double coordinates, the
coordinates will all be rounded to integers.
2. We only convert Polyhedron_3 to Nef_polyhedron_3, if the former is a
2-manifold, but your second file consists of several facets, if I see
correctly.
You can do the following:

- You can try the Kernels Cartesian<Gmpq> and Simple_cartesian<Gmpq>.
Unfortunatly, Nef_3 is quite slow in combination with cartesian kernels
at the moment. In the next release we will change that.
- You can try the function OFF_to_nef_3 (see documentation). This
converter can handle nearly every off file, i.e., it handles double
coordinate, wrong orientations, several surfaces with boundary, self
intersecting surfaces, etc. Because of it's versatility, this function
is not very fast.

- We provide further undocumented constructors. Try
Polygon_constructor.h for your second file. The usage is shown in
examples/Nef_3/polygon_construction.h.

- I just wrote new I/O routines and can now convert coordinates. If I
find time, I send you a small program that converts off files with
doubles into our nef3 file format with homogeneous integer coordinates
as long as the off file is a 2-manifold.

Peter








Archive powered by MHonArc 2.6.16.

Top of Page