Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash
Chronological Thread
- From: "Laurent Rineau (CGAL/GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash
- Date: Wed, 07 Jan 2015 12:45:39 +0100
- Organization: GeometryFactory
Le Tuesday 06 January 2015 17:18:02 Marius Kintel a écrit :
> Hi all,
>
> This is a bit long, but I believe itâs a valid issue:
>
> Iâve encountered another corner case, eventually causing a segmentation
> fault in CGAL. See attached test program and nef3 file. The nef3 file was
> serialized from the result of a union.
>
> What Iâm doing:
> o Iterate over all facets in the Nef polyhedron and collect vertices for all
> cycles. This gives me polygons (possibly with holes). o Extract the plane
> normal vector from each facetâs plane.
> o Pass each polygon and normal to the constrained delaunay triangulator
> (using filtered projection traits) o (for simplicity I ignore holes in this
> test program)
>
> What goes wrong:
> o One of the planes reports a wrong normal vector
> o When passing this normal vector to the delaunay triangulator, it goes into
> an infinite recursion while repeatedly reporting "intersection not insideâ
> o ..and eventually crashes (stack overflow)
>
> FYI: One of the polygons in question:
> 6, -25, 29.285714285714285
> 6, -26.732050855686023, 29.020513307787397
> 6, -26.732050855686026, 29.020513307787397
> 6, -26, 29.132600433972414
>
> ..with the (clearly wrong) normal vector [14, -3.751289, 24.5]
>
> I can reproduce the problem by passing _only_ this polygon and normal
> directly to the CDT, but I can see how a proper normal is a valid
> precondition.
To begin with, let me remind you that projection traits class you use,
CGAL::Triangulation_2_filtered_projection_traits_3<K> is not documented. it
was a toy exercise of mines. I must admit that its indented use case is
exactly the same as yours: be able to compute Delaunay triangulations of
arbitrary co-planar polygons, to triangulate facets of polyhedrons.
The polygon you have quoted is coplanar: it is clearly in the plane of
equation x=6. But it is very degenerate: almost a segment. But I wonder how
you have computed the normal. Probably, those coordinates are the rounding in
doubles of other coordinates, and the polygon is not in the plane x=6. That
would explain the strange normal.
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash, Marius Kintel, 01/06/2015
- Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash, Marius Kintel, 01/07/2015
- Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash, Marius Kintel, 01/09/2015
- Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash, Sebastien Loriot (GeometryFactory), 01/12/2015
- Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash, Marius Kintel, 01/09/2015
- Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash, Laurent Rineau (CGAL/GeometryFactory), 01/07/2015
- Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash, Marius Kintel, 01/07/2015
- Re: [cgal-discuss] Nef3: Wrong normal vector reported, causes triangulator crash, Marius Kintel, 01/07/2015
Archive powered by MHonArc 2.6.18.