Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Nef Polyhedra take 2 (boolean ops)

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Nef Polyhedra take 2 (boolean ops)


Chronological Thread 
  • From: Rob Pieké <>
  • To:
  • Subject: Re: [cgal-discuss] Nef Polyhedra take 2 (boolean ops)
  • Date: Tue, 08 Jan 2008 08:58:17 +0000
  • Organization: The Moving Picture Company

CGAL ships with some demo programs that do OFF->Nef that you might want to look at. The first one I tried seemed to work with your models no problem.

nef_3_filtered loadoff shark_simple.off loadoff shark_rev.off union saveoff out.off

And out.off definitely looks like a mutant two-headed hammerhead shark.

Cheers!


Gilbert Bernstein wrote:
Hello again,

I've been trying to get boolean operations up and working now, and am running into a bit of trouble. I was able to get a union of two offset cubes to compute just fine, but when I tried to union a shark model with a reflected version of itself I got the following error dump:

CGAL error: assertion violation!
Expr: c.has_on(p1)&&c.has_on(p2)
File: /usr/local/CGAL-3.3.1/include/CGAL/Nef_S2/Sphere_segment.h
Line: 57
Explanation:
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: c.has_on(p1)&&c.has_on(p2)
File: /usr/local/CGAL-3.3.1/include/CGAL/Nef_S2/Sphere_segment.h
Line: 57
CGAL error: assertion violation!
Expr: 0
File: /usr/local/CGAL-3.3.1/include/CGAL/Nef_3/SNC_io_parser.h
Line: 1277
Explanation:SNC_io_parser::read: no SNC header.
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: 0
File: /usr/local/CGAL-3.3.1/include/CGAL/Nef_3/SNC_io_parser.h
Line: 1277
Explanation: SNC_io_parser::read: no SNC header.
Abort trap

Following is a tarball of all relevant code and models. The program off2nef (included) was used to convert the shark into a Nef polyhedron. The reflection was performed before reading the shark into CGAL. (ie. with off2nef) The program "test" was then run on the two .nef files to produce the above error message.

If anyone has the time to peek at all this, or just has the time for helpful suggestions, they would be much appreciated.


-- Gilbert



Archive powered by MHonArc 2.6.16.

Top of Page