Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] return of nan value

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] return of nan value


Chronological Thread 
  • From: Wellington Castro <>
  • To:
  • Subject: Re: [cgal-discuss] return of nan value
  • Date: Wed, 3 Aug 2016 21:37:35 -0400
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:3knOvBz3tbF/JMvXCy+O+j09IxM/srCxBDY+r6Qd0eMfIJqq85mqBkHD//Il1AaPBtSDraIdwLeL+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2WVTerzWI4CIIHV2nbEwud7yzSteZ0pn//tvx0qWbWx9Piju5bOE6BzSNhiKViPMrh5B/IL060BrDrygAUe1XwWR1OQDbxE6ktY/jtKNl6Dla7vI969ZbA+K9ZLU9VbUeDTI8Mmlz6tesrgjGVQLI530SVSIdnRNMRgTE9xrnRYyijiyvveV03GyWPNb9UKsvcTWk9aZiDhHy2wkdMDtsz2zTjs12g75cplqKrgdj2YmcNJ6YMP5/eKzBetUETmNaQtxWfyNEC4K4KYAICrxSbq5js4Dhqg5W/lOFDg62Cba3xw==

Laurent thanks a lot for your reply. This really helped me.


2016-07-29 5:57 GMT-04:00 Laurent Rineau (CGAL/GeometryFactory) <>:
Le Thursday 28 July 2016 12:33:10 Wellington Castro a écrit :
> Hi Laurent, I think that is the first option. Because some meshes I get
> error and others not. In the cases with error, I am planning to search the
> 3 nearest neighbors and calculate the distance to the plane described by
> then. Do you think os a good ideia ?

I would instead try to filter out the degenerated triangles from the input of
the AABB tree. For example, to construct the AABB tree from facets of a
polyhedron:

      AABB_tree facet_tree; // zero-constructed
      for(Polyhedron::Facet_iterator
          fit = polyhedron->facets_begin(),
          end = polyhedron->facets_end();
          fit!=end; ++fit)
      {
        Polyhedron::Point a(fit->halfedge()->vertex()->point()),
            b(fit->halfedge()->next()->vertex()->point()),
            c(fit->halfedge()->prev()->vertex()->point());

        if(!CGAL::collinear(a,b,c))
          facet_tree.insert(Facet_primitive(fit, *poly_item->polyhedron(),
pmap));
      }
      facet_tree.build();

that way, you remove all facets that have a degenerated triangle.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/


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





  • Re: [cgal-discuss] return of nan value, Wellington Castro, 08/04/2016

Archive powered by MHonArc 2.6.18.

Top of Page