Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] error converting Polyhedron_3 to Nef_polyhedron_3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] error converting Polyhedron_3 to Nef_polyhedron_3


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] error converting Polyhedron_3 to Nef_polyhedron_3
  • Date: Thu, 28 Mar 2013 08:41:12 +0100
  • Organization: GeometryFactory

Hello,

the polygon is actually invalid
(increase the check level to 3
if (!poly.is_valid(false,3)) {
std::cout << "poly is invalid\n";
}
).

You have a dangling face with make the surface non-manifold.

One solution is to use this:

if (!poly.is_valid(false,3)) {
std::cout << "poly is invalid\n";
stream.open("poly.off");
nef_polyhedron nef;
CGAL::OFF_to_nef_3 (stream, nef);
std::cout << "created nef\n";
}


Sebastien.


On 03/27/2013 09:28 PM, Cody Rose wrote:
Hello,

I receive an assertion failure when trying to convert the attached
polyhedron to a nef polyhedron. The attached sample code demonstrates my
problem. I am running this with CGAL 4.1, Boost 1.47, and LEDA 6.3. I am
not sure if there is something about this polyhedron that causes the
problem, but I could not find anything in the documentation to help me
resolve this issue, and a cursory inspection of the .off doesn't show
anything wrong to me (I'm probably just missing something simple).

The example program out is as follows:

loaded good poly with 16 vertices
CGAL error: assertion violation!
Expression : pe_prev->is_border() ||
internal::Plane_constructor<Plane>::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).
has_on(pe_prev->opposite()->vertex()->point())
File : c:\program files
(x86)\cgal\include\cgal\nef_3\polyhedron_3_to_nef_3.h
Line : 254
Explanation:
Refer to the bug-reporting instructions at
http://www.cgal.org/bug_report.html

Thank you,
Cody Rose





Archive powered by MHonArc 2.6.18.

Top of Page