Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] K-3D and Nef 3D booleans - (almost) success

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] K-3D and Nef 3D booleans - (almost) success


Chronological Thread 
  • From: Bart Janssens <>
  • To:
  • Subject: Re: [cgal-discuss] K-3D and Nef 3D booleans - (almost) success
  • Date: Sat, 8 Sep 2007 20:40:31 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:message-id:sender; b=dzW+III1eIUM4jGHNZQZoURXhQeDlcTscPSegG+fmTHXExG8j+H5ld0M/hgtZCbpDiv/dH4GgOfIA/Sv3pum8OlNk2A0FLQv80Tsuke7/ZVg1lTXqvpPQOkcaqx3Z5LIOKxF2wuvtn67Enb+27Du18rpH1nX3dyFctCPgLG3h9k=

On Monday 03 September 2007 11:14:20 Peter Hachenberger wrote:
> that will be no problem. The code was written for exact geometry and
> there are a few assertion, which test for the exact geometry. I see a
> good chance that you will succeed with your approach, but we need to
> throw out a few assertion. Note, that the same assertions would come up
> when you don't use the SNC_indexed_item, but then removing them won't
> help you. So, just remove this assertion and also remove others that
> come into your way in the class SNC_external_structure.h, but send me a
> list of the removed assertions and ask me if you get assertions in other
> classes.

Hi peter,

Attached is a patch against CGAL 3.3.1 of the changes I made. I still get one
error when intersecting a cylinder and a sphere, where the sphere just
touches the caps of the cylinder: the assertion on line 2008 of
Nef_S2/SM_overlayer.h fails. This goes away when I make the cylinder a little
longer so it no longer touches the poles of the sphere.

I also changed the threshold_number class to use Gmpq internally instead of
double, so all calculations are done in exact math, but the comparisons are
up to a threshold. This seems to improve things a lot.

regards,

Bart

diff -Naur include/CGAL/Nef_3/ID_support_handler.h /usr/local/include/CGAL/Nef_3/ID_support_handler.h
--- include/CGAL/Nef_3/ID_support_handler.h	2007-08-25 21:01:33.000000000 +0200
+++ /usr/local/include/CGAL/Nef_3/ID_support_handler.h	2007-09-08 13:37:11.000000000 +0200
@@ -260,8 +260,6 @@
 		      SHalfedge_const_handle se1) {
     if(!equal_not_opposite(se->circle(), se1->circle()))
        se1 = se1->twin();
-    CGAL_assertion(normalized(se->circle()) == 
-		   normalized(se1->circle()));
     se->set_index(se1->get_index());
     se->twin()->set_index(se1->twin()->get_index());
     CGAL_NEF_TRACEN("se " << se->source()->point()
diff -Naur include/CGAL/Nef_3/SNC_external_structure.h /usr/local/include/CGAL/Nef_3/SNC_external_structure.h
--- include/CGAL/Nef_3/SNC_external_structure.h	2007-08-25 21:01:33.000000000 +0200
+++ /usr/local/include/CGAL/Nef_3/SNC_external_structure.h	2007-09-08 13:43:27.000000000 +0200
@@ -1161,14 +1161,12 @@
       CGAL_NEF_TRACEN("");
 
       CGAL_assertion( cet->get_index() == ce->twin()->get_index());
-      CGAL_assertion( cet->twin()->get_index() == ce->get_index());
-      CGAL_assertion( normalized(cet->circle()) == normalized(ce->circle().opposite()) ); 
+      CGAL_assertion( cet->twin()->get_index() == ce->get_index()); 
       CGAL_assertion( cet->source()->twin() == ce->source()); 
       CGAL_For_all(ce,cee) { 
 	CGAL_NEF_TRACEN("circles " << cet->circle() << "   " << ce->circle() << 
 			" sources " << cet->target()->point() << 
-			"   " << ce->target()->point());
-	CGAL_assertion( normalized(cet->circle()) == normalized(ce->circle().opposite())); 
+			"   " << ce->target()->point()); 
 	CGAL_assertion( cet->source()->twin() == ce->source()); 
 	CGAL_assertion(ce->mark()==cet->mark());
 	link_as_prev_next_pair(cet->twin(),ce);



Archive powered by MHonArc 2.6.16.

Top of Page