Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash


Chronological Thread 
  • From: Marius Kintel <>
  • To:
  • Subject: Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash
  • Date: Wed, 7 Jan 2015 15:17:48 -0500

On Jan 7, 2015, at 06:45 AM, Laurent Rineau (CGAL/GeometryFactory)
<>
wrote:
> To begin with, let me remind you that projection traits class you use,
> CGAL::Triangulation_2_filtered_projection_traits_3<K> is not documented.

I’m painfully aware of that ;)

Here’s a more valid case:

See attached program cdtcrash.cpp.
In this program I construct a polygon with 8 vertices. two of these are very
close together.
I calculate a newell normal (0.760789,9.70298e-16,-0.649) and pass it to the
CDT.
This causes a crash.

The polygon was extracted from the attached Nef polyhedron (facet number 32).

Note that in this case, using the plane given by the Nef3, it does succeed.
The Nef normal looks weird though:
(4.15889101382737184616892980048e+95,2.11676335917591658980901575636e+80,2.11676335917591658980901575636e+80)

The problem I’m having is that this CDT is very fragile and minor changes in
the normal vector causes it to crash.
The workaround I mentioned earlier (Use newell normals) works in many cases,
but causes crashes which previously didn’t happen.

Again, the core challenge I’m having is “simply” to export a Nef polyhedron
to an STL or OFF file, but avoiding the build-in export function as it’s not
robust enough.

If I could understand which aspect of my code triggers a non-robust code path
in CGAL, I can try to work around it.

-Marius

Attachment: cdtcrash.cpp
Description: Binary data

Attachment: issue1105c.nef3
Description: Binary data




Archive powered by MHonArc 2.6.18.

Top of Page