Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Missing SurfaceMeshComplex_2InTriangulation_3 constructor

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Missing SurfaceMeshComplex_2InTriangulation_3 constructor


Chronological Thread 
  • From: "Laurent Rineau (CGAL/GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Missing SurfaceMeshComplex_2InTriangulation_3 constructor
  • Date: Wed, 14 May 2014 14:26:33 +0200
  • Organization: GeometryFactory

Le Wednesday 14 May 2014 11:50:07 Per Zetterlund a écrit :
> Thank you for clearing that up.
>
> So I have a Delaunay_triangulation_3 from which
> I'd like to extract a triangular mesh. I have a
> "FacetSelector" functor to indicate what facets
> to extract. My plan was to use the missing constructor
> and then use CGAL::output_surface_facets_to_polyhedron
> to get a polyhedron object representing my mesh.
> How should I do it instead? Build the complex manually
> by adding facets? Or can I plug in my functor into
> make_surface_mesh() somehow?

You can also implement the missing constructor! :-)

- construct the c2t3 object from the Delaunay_triangulation_3 reference,
- loop on all facets of the triangulation, and if the fonctor result is
positive, call:
add_to_complex (Facet f);

That would be something like:

C2t3 c3t3(tr);
for (Finite_facets_iterator fit = tr.finite_facets_begin();
fit != tr.finite_facets_end(); ++fit)
{
if(functor(*fit)) {
c2t3.add_to_complex(*fit);
}
}

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




Archive powered by MHonArc 2.6.18.

Top of Page