Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (CGAL/GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] return of nan value
- Date: Fri, 29 Jul 2016 11:57:45 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:A057jR0/ZPceLasusmDT+DRfVm0co7zxezQtwd8ZsegQLvad9pjvdHbS+e9qxAeQG96Ks7Qa2qGP7+jJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL2PbrnD61zMOABK3bVMzfbWtXNCDxJ3rn8mJuLTrKz1SgzS8Zb4gZD6Xli728vcsvI15N6wqwQHIqHYbM85fxGdvOE7B102kvpT4r9Zf9HFbtPslssJBSq7nZL8QTLpCDT1gPXpmytfssEyJaQKS/HYaTi0skxxFChWNrDrVd7O2nSb9s+dhwji0NMbqSqolGH7qu6NiVQXljjtBLT8//WjKosd/haYdpwiu8U8si7XIaZ2YYaItNpjWeskXEDJM
- Organization: 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/
- [cgal-discuss] return of nan value, Wellington Castro, 07/27/2016
- Re: [cgal-discuss] return of nan value, Laurent Rineau (CGAL/GeometryFactory), 07/28/2016
- Re: [cgal-discuss] return of nan value, Wellington Castro, 07/28/2016
- Re: [cgal-discuss] return of nan value, Laurent Rineau (CGAL/GeometryFactory), 07/29/2016
- Re: [cgal-discuss] return of nan value, Wellington Castro, 07/28/2016
- Re: [cgal-discuss] return of nan value, Laurent Rineau (CGAL/GeometryFactory), 07/28/2016
Archive powered by MHonArc 2.6.18.