Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Inconsistent results in 3D booleans on Nef

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Inconsistent results in 3D booleans on Nef


Chronological Thread 
  • From: Peter Hachenberger <>
  • To:
  • Subject: Re: [cgal-discuss] Inconsistent results in 3D booleans on Nef
  • Date: Sat, 31 Jan 2009 00:58:26 +0100
  • Importance: Normal
  • Sensitivity:

Hi Bart,

you can patch Nef_3 in the following way to get
rid of the inconsistencies:

- we need to manipulate the random number generator.
Therefore you add the following include line to
binop_intersection_test.h

#include <CGAL/Random.h>

and add

CGAL::Random dummy(12345);

in the beginning of function

  void operator()(Callback& cb0,
                  Callback& cb1,
                  SNC_structure& sncp,
                  SNC_structure& snc1i)

in the same file.

- the other patch is needed in the is_twin()
functions of Halffacet, Halfedge, SHalfedge,
and SHalfloop. Change the functions as follows:

Halfedge:
bool is_twin() const
{ return twin_->source()->point() < center_vertex_->point(); }

Halffacet:
bool is_twin() const
{ return (CGAL::ORIGIN + twin_->plane().orthogonal_vector()) < (CGAL::ORIGIN +  supporting_plane_.orthogonal_vector()); }

SHalfedge, SHalfloop:
{ return (CGAL::ORIGIN + twin_->circle().orthogonal_vector()) < (CGAL::ORIGIN +  circle_.orthogonal_vector()); }

That's unfortunately slower than the current solution,
but I don't know a solution that is as efficient as
the current one and avoids the inconsistencies. I plan
to rewrite some of the items at some time. Then there
will be a better solution for that. The classes are
either defined in SNC_items.h (CGAL 3.3.1 and older)
or in separate files (CGAL 3.4).

Now that already two people needed that patch, I will
put it into the next CGAL release.

Peter

----- wrote: -----

To:
From: Bart Janssens <>
Sent by:
Date: 01/30/2009 11:30AM
Subject: Re: [cgal-discuss] Inconsistent results in 3D booleans on Nef

On Fri, Jan 30, 2009 at 10:18 AM, Max <> wrote:
> Would you please give me a pointer with which I could locate
> this part of code in K-3D easily?

Hi Max,

The code can be viewed online at
http://k3d.svn.sourceforge.net/viewvc/k3d/trunk/modules/cgal/

If you want to build K-3D, instructions can be found on
http://www.k-3d.org/wiki/Getting_Started

Regards,

--
Bart
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page