Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Assertion failed: intersect Nef polyhedron with plane

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Assertion failed: intersect Nef polyhedron with plane


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Assertion failed: intersect Nef polyhedron with plane
  • Date: Fri, 23 Jan 2015 08:30:48 +0100
  • Organization: GeometryFactory

On 01/20/2015 11:10 PM, Marius Kintel wrote:
Hi all,

I’m trying to intersect a Nef polyhedron with a plane in order to get a 2D
cross section.
However, I frequently experience assertion errors when doing this, even
though my Nef polyhedrons appear to be simple and valid 2-manifolds:
CGAL::Assertion_exception: CGAL ERROR: assertion violation!
Expr: target(s1).vertex()==target(s2).vertex()
File:
/Users/kintel/code/OpenSCAD/libraries/install/include/CGAL/Nef_3/SNC_FM_decorator.h
Line: 218

As an example, I’ve attached a minimal test program which intersects an
object with the XY plane.
A failing .nef3 file can be found here:
http://files.openscad.org/projection.nef3.gz

FYI: The Nef polyhedron was created by importing an STL mesh into a
Polyhedron_3 and creating the Nef polyhedron from there.

I had expected this intersection to be numerically stable, but perhaps I’ve
slightly misunderstood the limitations of operations on Nef polyhedrons. Any
ideas?


There is a header CGAL/Polyhedron_slicer_3.h that is doing what you want but on a polyhedron. The code is not totally robust (in particular when you have coplanar facets in the plane) for now but the upcoming version will be (code is ready but we're in code freeze so it will be in 4.7).

I can share the robust version of the code if needed.

Sebastien.

Kind Regards,

-Marius






Archive powered by MHonArc 2.6.18.

Top of Page