Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Splitting Nefs

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Splitting Nefs


Chronological Thread 
  • From: Noel Warren <>
  • To:
  • Subject: Re: [cgal-discuss] Splitting Nefs
  • Date: Mon, 11 Mar 2013 18:32:28 +0100

Hi Sebastien

I actually use CGAL wrapped in ruby.  You can checkout my repo at (https://github.com/noelwarr/rgal).  Let me know if you want any licenses put anywhere.  (I do know about the cgal-bindings project but I couldn't get my head around swig.)

Because it is a pain to compile the whole RGAL repo I have put together a little cpp file and nef file that fails to create a nef from one of the volumes.  The interesting thing is that even though the same volume fails, it throws a different error.  The cpp file complains about a segmentation fault whereas my ruby wrapped code produces...

CGAL ERROR: assertion violation! (RuntimeError)
Expr: cet->get_index() == ce->twin()->get_index()
File: /usr/local/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1169

Even wierder is the fact that if I don't regularize the nef, the cpp code produces a result but my ruby code continues to fail.

Let me know if you need something else.

2013/3/11 Sebastien Loriot (GeometryFactory) <>
Dear Noel,

could you please provide a complete compilable example showing the problem?

Thanks,

Sebastien.


On 03/07/2013 01:13 PM, Noel Warren wrote:
I have a function that splits Nefs into smaller nefs from the shells of
the volumes.  I am doing it using an undocumented Nef constructor.  In
the majority of cases it works a charm but ocasionally it fails.  I have
attatched a nef that fails (infact it only has one volume so should
return an Array of length 1 containing a Nef) when trying to split.

Here is a code snippet

vector<Nef_polyhedron_3> nefs;
Nef_polyhedron_3::Volume_const_iterator vi = ++N.volumes_begin();
Nef_polyhedron_3::Shell_entry_const_iterator si;
CGAL_forall_volumes(vi,N) {
if(vi->mark()) {
Nef_polyhedron_3::Shell_entry_const_iterator si;
CGAL_forall_shells_of(si, vi) {
Nef_polyhedron_3::SFace_const_handle sfch(si);
Nef_polyhedron_3 O(N,sfch);
nefs.push_back(O);
}
}
}

Here is the error...

CGAL ERROR: assertion violation! (RuntimeError)
Expr: itl != it->second.end()
File: /usr/local/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1102

If I shouldn't be using this Nef constructor, how should I go about
"splitting" a nef into smaller ones.  Thanks in advance for your time.


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



Attachment: unsplittable.zip
Description: Zip archive




Archive powered by MHonArc 2.6.18.

Top of Page