Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Divide by Zero in AABB tree

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Divide by Zero in AABB tree


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Re: Divide by Zero in AABB tree
  • Date: Mon, 10 Jun 2013 07:16:37 +0200
  • Organization: GeometryFactory

On 06/10/2013 01:04 AM, schrodingersnewcat wrote:
Okay, I've done that and it does indeed come back telling me there are
degenerate triangles.

First a note. I had to use this snippet instead of what you posted as
CGAL::orientation was giving me an error.
Strange...


for (Polyhedron::Facet_iterator fit=polyhedron.facets_begin();
fit!=polyhedron.facets_end();
++fit)
{
if ( CGAL::collinear(
fit->halfedge()->vertex()->point(),
fit->halfedge()->next()->vertex()->point(),

fit->halfedge()->opposite()->vertex()->point() ) )
{
std::cout<< "degenerate triangle\n";
}
}

So, now my question is how do I repair a polyhedron that has developed this
pathology and how does it occur in the first place?

As I said before I'm using a kernel with an exact number type. In fact it
is interchangeable with CGAL::Exact_predicates_exact_constructions_kernel.
I just wanted to specify the number and kernel type manually.

The polyhedrons I'm using are the result of boolean operations using Nef
polyhedrons. Each is converted from a Nef polyhedron a few steps before I
create the AABB trees.

Try calling join_facet on the 0-length edges:

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Polyhedron_ref/Class_Polyhedron_3.html#Function_Halfedge_handle_join_facet6_Halfedge_handle_h9;

Sebastien.




--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Divide-by-Zero-in-AABB-tree-tp4657026p4657665.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page