Skip to Content.
Sympa Menu

cgal-discuss - Boolean Operations (Nef_3) creating thin (e-16) slabs

Subject: CGAL users discussion list

List archive

Boolean Operations (Nef_3) creating thin (e-16) slabs


Chronological Thread 
  • From: Stephen Wong <>
  • To: "" <>
  • Subject: Boolean Operations (Nef_3) creating thin (e-16) slabs
  • Date: Mon, 21 Jan 2008 12:51:07 -0800
  • Accept-language: en-US, en-CA
  • Acceptlanguage: en-US, en-CA

Hello,

 

I’m finding that since CGAL is using exact representations of numbers in Boolean operations, working with datasets with floating-point data can produce correct, but less-than-desirable results.  In one example, I have two cubes, one inside another, with two faces flush against each other.  Since the numerical representation is double, during conversion to Gmpq or Gmpz, they are not the same plane and, thus after a CSG subtraction, a thin 1.0e-16 width slab is left (instead of removing part of that face).  In another case the slab was as small as 1.0e-300.

 

A numerical example is as such:

 

Cube1 (0,0,0) – (3,3,3)

Cube2 (1.0e-10, 0, 0) – (2, 2, 2)

When Cube1 minus cube2 is performed, a slab of width 1.0e-10 is left.

 

Is there a way for Nef_polyhedron_3 to remove very thin slabs based on a certain tolerance value?  Rounding the input values will not always solve this problem.

 

Thanks.

 

Stephen




Archive powered by MHonArc 2.6.16.

Top of Page