Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Minimum edge size on make_surface_mesh

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Minimum edge size on make_surface_mesh


Chronological Thread 
  • From: "Laurent Rineau (CGAL/GeometryFactory)" <>
  • To:
  • Cc: Ignacio Javier Osorio Wallace <>
  • Subject: Re: [cgal-discuss] Minimum edge size on make_surface_mesh
  • Date: Fri, 09 Jun 2017 11:20:06 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:Xyb0rh/RfVcl+/9uRHKM819IXTAuvvDOBiVQ1KB21ugcTK2v8tzYMVDF4r011RmSDNqds6oMotGVmpioYXYH75eFvSJKW713fDhBt/8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1Ifn+FpLPg8it2e2//5/ebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTFUACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMNboRr4oRzut86ZrSAfpiCgZMT457HrXgdF0gK5CvR6tuwBzz4vSbYqINvRxY7ndcMsaS2RfQ8hfWS9PAoS+YIsBAOUPMvpXopLhp1UTtxayGRWgCP/xxjJOm3T43bc60+MkEQze0gAuGcgBsGnOrNrrMqcSTf2+wrXJzTXFcfxZwyr945XMfh0/oP+BQbR+fdHQx0YxEAPFi0ufqZD/PzKV1uoCqXSU7/ZnVeK1i28rrg99qSWoy8cokIbJm5gVxU7C9SVl2oo1P9y4SEhlbtG+DZtdrD2VN4RsTcMmWW1ovzw6yrIftJO9YSMExpMnxxvFZPyGdYiF+g7sVOmLLjd8nn5lf6i/hxmq/Uiv1OL8Ucy030hWripfktjMuGoC2ADP6siAUPt8/l2t1iqI1wDW7OxPPEM6lbLDJpI8wbM9lYAfvVnCEyL2gkn7jK6bel859uS25Onrerrrq56GO4NpiQzzPL4il8O7DOgiLwQDUWeW9OKh37P550L5Wq9Fjvgun6nZrp/aIcMbq7akDwJbyIoj7hG/Aja83NQdh3YHLVZFdAuAj4j0J1HCOvf4Dem/g1i2ljdk2ezGMqXgApXLMHfDjK/scat+5kNf0gY/0NFS6pJOBrwBIf//QFL9uMLXAxMhNgy72efnCNFz1oMEXmKPB7eUMKfIvl+V/OIgPe+MZJMPtDbnKvgl4eDhgmUkmVIGYaap0oEYaHSiEvRhOUWZbmLggs0dHmcSogo+UOvqhUWeXj5cfXmyW7sw6Sw6CIK9EYjDW5utgKea0SegHpxWY3hGBUqWHXfpcYWEQfYMZziILs9viDxXHYSmHoQu3BXruA7hwKd8NcLV/DcZvNTtzotb/erWwFsW/CFuAsKBm1uMSWx9gytIbBAf+OdQrEt4x0uZwIZxiOBfD80SrbsdVg4nL5Pa06pgCtb/Ux/pddiATBChWNrwUmJ5dc4439JbOxU1IN6llB2WmnPyW7I=
  • Organization: GeometryFactory

Le Thursday, June 8, 2017 8:59:46 PM CEST Ignacio Javier Osorio Wallace a ?
crit :
> Hello CGAL community, I need a small help with a surface extraction that
> I need to implement.
>
> I'm creating a surface for a finite element algorithm. And I need the
> edges to have a minimum size restriction. I would be perfect if the SD
> of all the edges were as small as possible.

Hi,

You cannot define a minimal size for edges (or triangles) when using
`CGAL::make_surface_mesh`. If the size of edges is significantly smaller than
the size criterion given to the critera object
(`CGAL::Surface_mesh_default_criteria_3`), then that probably means that the
geometry of the domain surface has locally a small feature size.

You may try post-process the result of `CGAL::make_surface_mesh` with a
surface simplification algorithm: export the `c2t3` object to a polyhedron,
and then use the methods from the CGAL chapter "Triangulated Surface Mesh
Simplification":

http://doc.cgal.org/4.10/Surface_mesh_simplification/index.html

But the global guaranties (no self-intersection) will no longer be
guaranteed.

> Here is a the code.
> Thx for the help, btw.
> Best regards,
> Ignacio.
>
> typedef CGAL::Simple_cartesian<double> Kernel;
> typedef Kernel::Point_2 Point_2;
>
> // default triangulation for Surface_mesher
> typedef CGAL::Surface_mesh_default_triangulation_3 Tr;
> // c2t3
> typedef CGAL::Complex_2_in_triangulation_3<Tr> C2t3;
> typedef Tr::Geom_traits GT;
>
> typedef CGAL::Gray_level_image_3<GT::FT, GT::Point_3> Gray_level_image;
> typedef CGAL::Implicit_surface_3<GT, Gray_level_image> Surface_3;
>
> Tr tr; // 3D-Delaunay triangulation
> C2t3 c2t3 (tr); // 2D-complex in 3D-Delaunay triangulation
> char *inriaFile;
> char *outputFile;
>
> Gray_level_image image(inriaFile, 0.3);
>
> GT::Point_3 bounding_sphere_center(109,109,67);
>
> GT::FT bounding_sphere_squared_radius = float(218) * float(218) *
> float(2);
>
> GT::Sphere_3 bounding_sphere(bounding_sphere_center,
> bounding_sphere_squared_radius);
>
> Surface_3 surface(image, bounding_sphere, 0.00001);
>
> CGAL::Surface_mesh_default_criteria_3<Tr> criteria(30,2,2);
>
> CGAL::make_surface_mesh(c2t3, surface, criteria, CGAL::Manifold_tag());
>
> //for(C2t3::Vertex_iterator iter(c2t3.vertices_begin()); iter !=
> c2t3.vertices_end(); iter++ ) {
> //std::cout << iter->point().x() << iter->point().y() << iter->point()
> << std::endl;
> ////Point p(iter->point());
> //}
>
> std::ofstream out(outputFile);
> CGAL::output_surface_facets_to_off (out, c2t3);
> std::cout << c2t3.number_of_facets() << std::endl;
>
> std::cout << "qRx : Surface, final number of points: " <<
> tr.number_of_vertices() << "\n";
> std::cout << "qRx: Surface, end!!" << std::endl;



--
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