Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3
  • Date: Tue, 31 Jul 2007 17:58:19 +0200

Camille Wormser wrote:
Bernhard Kornberger a écrit :
This solves the problem. Sure, this is documented, but a programmer
can not expect that behavior.
I agree with you.
When I checked your code, I assumed that it was a bug (and not a feature...), and I corrected it. I attach modified versions of the HalfedgeDS_items_decorator and the Polyhedron_builder_3 which work "as expected" (that is, when the Supports_face_plane flag is true, the equation is computed).

Hi Camille,

Note that it is a feature not a bug to not compute the plane.
So please don't hastily commit it to svn, but first discuss it
on the developer mailing list.

Note that the tag is a tag and not a variable which can change
the state at runtime, and it has "Supports" in the name, and
not "Computes".

With these files, your program works fine (without valgrind...).
And even worse, the function returns
a wrong plane instead of some error message. Shouldn't the function
have an assertion like assert(plane_is_valid()); ??
The problem is that the Supports_face_plane flag triggers a curious behavior: when it is true, a Plane data member is present in the HDS Face base, BUT it is not computed. Even stranger is the fact that Supports_face_plane is true by default. If it were false, you would have had a compile time error, as expected.


I guess what we might do is to add a boolean variable to the polyhedron
class or the face class that is true if the plane is computed, and when
one wants to access it, one checks the flag.

best,

andreas



Archive powered by MHonArc 2.6.16.

Top of Page