Subject: CGAL users discussion list
List archive
- From: Ignacio Javier Osorio Wallace <>
- To:
- Subject: Re: [cgal-discuss] Minimum edge size on make_surface_mesh
- Date: Wed, 21 Jun 2017 13:42:24 -0400
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:NjsuWhcUq+Tuqm8y/U1mHrEDlGMj4u6mDksu8pMizoh2WeGdxcS5Zx7h7PlgxGXEQZ/co6odzbGH7Oa4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9GiTe5Y75+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM2/33YhMN+gqxbvhyvuh5ww4DXboCaOvVzZb/dcNAYRWZdQspcTS5MD4WhZIUPFeoBOuNYopH+qVsBqxuxHxWjBOLoyjRVgnH5x7M60+U/HgHcwQcuBskOsHPOrNX0M6cZTOC6w7PMzTXHdfxZxSny45XPfxAgpvGMRrVwcdDQyUkoDA7Fk0ifppL5MD+PyusNt3GW4ux9XuyhjG4nrht+ojmpxso0lobJiZgaylTe+SV+2oY1KsW0SEF6Yd64EJtQqjqVO5FqTcMlRmFkoCk6xaMBuZ6+YicK1I4nxh7Ra/Odb4eI/hXjVPyRIDtimH1lf7e/ihCv+kaj0u3xTtS43VZUoiZfkNTBuWoB2wHS58SdV/dx4F+t1SuP2gzN8O1JI085mbDGJ5Mg2LI9mYYfvELeFSHsgkr2lrWZdkA89+io9evnZrLmq4eZN4BuiwH+Nr4imtGiDusmLgcCRXSU+eCk2L3i+032XqlKg+UrnqTZrpzWP8YWq6GjDwNI04sv8QuzAym+3NQdh3YHLVZFeBydj4juPlHDOPH4DfCkg1SrijdrxvfGM6b8AprQMHfMjK3tcqp560JE0go80chf545ICrEGOP/8RkDxu8bcDhMgLgO0wv3nB8lg1oMFQmKCGbSZMaPXsV+Q/O0jOeiMZIkPuDb8Mfcp/fDujWVq0WMaKKKm1J9SZHGjFel9OG2YZ2Dti5EPCzQkpA07Gc3ljlSJUDkbRX+sXq8mrhYgD5inCs/8T4SpibeMlHO6GYZRfGFBIk2AHHyufIHSCKREUz6bPsI0ym9MbrOmUYJ0jRw=
Thx a lot Laurent,
So I'm reading about it. And in order to use the minimum length required as the stop predicate of the function. I need to:
#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_stop_predicate.h>
which is not being found. I wonder if I need to link other flags to the compiler? (I already have CGAL, CGAL_CORE and CGAL_ImageIO, and boost stuff).
I did follow the documentation: http://doc.cgal.org/latest/Surface_mesh_simplification/index.html
found how to convert the c2t3 to a polyhedron: http://doc.cgal.org/Manual/3.6.1/include/CGAL/IO/output_surface_facets_to_polyhedron.h
and I'm trying to make the algorithm work with the edge_length_stop_predicate using this example: https://github.com/CGAL/cgal/blob/master/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_all_short_edges.cpp
I hope I'm on the right path.
Thx a lot for the support,
best regards,
Ignacio.
El 2017-06-09 05:20, Laurent Rineau (CGAL/GeometryFactory) escribió:
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/
- [cgal-discuss] Minimum edge size on make_surface_mesh, Ignacio Javier Osorio Wallace, 06/08/2017
- Re: [cgal-discuss] Minimum edge size on make_surface_mesh, Laurent Rineau (CGAL/GeometryFactory), 06/09/2017
- Re: [cgal-discuss] Minimum edge size on make_surface_mesh, Ignacio Javier Osorio Wallace, 06/21/2017
- Re: [cgal-discuss] Minimum edge size on make_surface_mesh, Andreas Fabri, 06/22/2017
- [cgal-discuss] Specific edge length, Ignacio Javier Osorio Wallace, 06/27/2017
- Re: [cgal-discuss] Minimum edge size on make_surface_mesh, Andreas Fabri, 06/22/2017
- Re: [cgal-discuss] Minimum edge size on make_surface_mesh, Ignacio Javier Osorio Wallace, 06/21/2017
- Re: [cgal-discuss] Minimum edge size on make_surface_mesh, Laurent Rineau (CGAL/GeometryFactory), 06/09/2017
Archive powered by MHonArc 2.6.18.