Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Nef Polyhedra test cases

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Nef Polyhedra test cases


Chronological Thread 
  • From: Gilbert Bernstein <>
  • To:
  • Subject: Re: [cgal-discuss] Nef Polyhedra test cases
  • Date: Sun, 20 Jan 2008 06:08:55 -0600
  • Domainkey-signature: s=main; d=mail.utexas.edu; c=nofws; q=dns; h=Received:Received:Received:Mime-Version:In-Reply-To: References:Content-Type:Message-Id:From:Subject:Date: To:X-Mailer; b=YrwRTybPJloUOWMXnFNUc8jXtn9i/KzQnJGLB6xhFP2bFWgHEJQoR 5xfFMH/YQRlDo1BVcxhtincbge6+nG8foL8VgnpnXgxBlR9iOA3Cl 5cRlrMXgoNCfE5f55fR3FDBMOxikGG4MZ4LY5LcEwBLYxNCPyxros LlF30VSK5ub8=;

Sorry about getting back to you so much later on this.  I finally got around to testing things out.

I ran an octopus model through the conversion, which probably has self-intersections induced by mesh simplification. (I am not sure of this, however)

complex construction gives me the following:
Nef vertices: 1751
Nef edges: 5158
Nef facets: 3415
Nef volumes: 7
number of discarded facets: 0

The original unsimplified octopus model consisted of 4 simply connected components: the two eyes, the main body and some dealie on the bottom of the main body.

I've attached the original off file, and conversion programs.  The nef file was too large to politely post to the list, but should be easily regenerated.  When attempting to convert back to a regular polyhedron to output to off the is_simple() test fails.  Should I circumvent this test, or does it mean that there is definitely something wrong upstream?

Thanks for any time you have,
-- Gilbert

Attachment: octopus.off
Description: Binary data

Attachment: nef2off.cpp
Description: Binary data

Attachment: off2nef.cpp
Description: Binary data

(octopus model is simplified from version available on online repository http://shapes.aim-at-shape.net/ Please make sure to check there and acknowledge them appropriately if you use it)


On Jan 9, 2008, at 6:04 AM, Peter Hachenberger wrote:

On Wed, 2008-01-09 at 04:57 -0600, Gilbert Bernstein wrote:

Peter,


I just tried DNDEBUG and it reduced the time to convert the cat from  

off to nef down to ~30 seconds, which seems like it should make sense.


So, as the next entry in the never ending story, I just tried to  

perform the shark union with a much  higher polycount shark model and  

discovered the following error upon trying to convert the result back  

from nef to off:


CGAL error: precondition violation!

Expr: it1.e_ == it2.e_

File: /usr/local/include/CGAL/iterator.h

Line: 563

Explanation:

terminate called after throwing an instance of  

'CGAL::Precondition_exception'

   what():  CGAL ERROR: precondition violation!

Expr: it1.e_ == it2.e_

File: /usr/local/include/CGAL/iterator.h

Line: 563


I don't know this error, which is probably because I never use the

filtered kernel (Homogeneous<leda_integer> is most efficient at the

moment). But my first try know would be to look closer at the input

file. Many off-files have features that are pretty hard to handle. There

are facets intersecting one another, empty facets, etc. So, try to

convert the off-file with the example program complex_construction. You

might want to change it a bit in advance, because it does not output the

result. This program will convert the off-file most likely and tell you

whether there were problems with some facets. From that output and the

resulting file you can find out whether there was something wrong with

the off-file.


Warning, this might take 10 minutes.


Peter





Archive powered by MHonArc 2.6.16.

Top of Page