Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] RE: Error in CGAL bool operation to the OFF files

Subject: CGAL users discussion list

List archive

[cgal-discuss] RE: Error in CGAL bool operation to the OFF files


Chronological Thread 
  • From: JuanLu <>
  • To:
  • Subject: [cgal-discuss] RE: Error in CGAL bool operation to the OFF files
  • Date: Sat, 15 Sep 2012 08:38:27 -0700 (PDT)

Hi Tang,

I could see the source of the problem. You have at least two faces
(triangles) in a1.off with vertices they are linear combination.

(a1.off)
Line 356 defines wrong face --> 3 133 65 106
Line 448 defines wrong face --> 3 123 133 106

Vertices 106 and 133 has the same value.

Line 109 defines vertex 106: -0.045 5.51091e-018 -0.45
Line 136 defines vertex 133: -0.045 5.51091e-018 -0.45

The conversion from Polyhedron_3 to Nef_polyhedron (line 53 of your main.cpp
source code) requires to calculate the normals for each of faces in your
polyhedron. It's not possible to calculate the normal for the above faces.

Your program should throw an error message "Error !!!!!" in line 106 of
polyhedron_3_to_nef_3.h

Later, the program crash in following assert:

terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: pe_prev->is_border() ||
!internal::Plane_constructor<Plane>::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate()
File: ../../dev/CGAL-4.1-beta1/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h
Line: 252

These faces in your file define a segment instead of a triangle due to the
linear combination.

Regards,
Juan Luis.



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Error-in-CGAL-bool-operation-to-the-OFF-files-tp4655853p4655861.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page