Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Assertion violation when converting polyhedron to Nef_polyhedron

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Assertion violation when converting polyhedron to Nef_polyhedron


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Re: Assertion violation when converting polyhedron to Nef_polyhedron
  • Date: Mon, 07 Mar 2011 10:41:00 +0100

Adding this:

assert(model.is_pure_triangle());
Polyhedron_3::Face_iterator fit=model.facets_begin();
for (fit!=model.facets_end();++fit){
if (fit->halfedge()->is_border()) continue;
kernal::Plane_3 plane(fit->halfedge()->vertex()->point(),
fit->halfedge()->next()->vertex()->point(),
fit->halfedge()->opposite()->vertex()->point()
);
assert(!plane.is_degenerate());
}

after this:
file>>model;

you will see that your input polyhedron is not a valid input for a Nef_polyhedron_3: at least one facet
is degenerate, it is made of 3 collinear points.

S.

johnzjq wrote:
Dear Sebastien,

Here attached a problematic model.
http://cgal-discuss.949826.n4.nabble.com/file/n3335356/223.off 223.off
The minimal example is as following:
http://cgal-discuss.949826.n4.nabble.com/file/n3335356/example.cpp
example.cpp
I got an assertion like this:
Error !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CGAL error: assertion violation!
Expression : pe_prev->is_border() ||
!pe_prev->facet()->plane().is_degenerate()
File : c:\program files
(x86)\cgal-3.7\include\cgal\nef_3\polyhedron_3_to_
nef_3.h
Line : 261
Explanation:
Refer to the bug-reporting instructions at
http://www.cgal.org/bug_report.html

Thanks for your kindly help.

John

--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Assertion-violation-when-converting-polyhedron-to-Nef-polyhedron-tp3220004p3335356.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.16.

Top of Page