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: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Minimum edge size on make_surface_mesh
  • Date: Thu, 22 Jun 2017 11:43:49 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:+acykRJW6/vC4l6bqdmcpTZWNBhigK39O0sv0rFitYgfKvnxwZ3uMQTl6Ol3ixeRBMOAuq0C07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9ZDeZwdFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhjoZOT438G/Xjc9+gqxVrx2upRNw34HabZqJNPd9ZK7RYc8WSGRDU8tXSidPApm8b4wKD+cZIetYqZTyp0EQohSkHgmnGePhxSVTiX/s3K0xzuMsHhvA3AM9BdIBrm7brM7vOKccS++617PIzTTYYvNZxzj9743IfQ49ofGWXbNwf9DexlUzFwPClFWRqZbpMC+S1uQIqmWW6fdrW+yoi24isQ5xoz6vy98whYnGnI0VzkrI9SJjwIY6PdG4R097YcKkEJtNrC6WLZd5QsQnQ21wtyY11LoGuZulcygW0pQmxxDfZOabfIiU5RLjTuaQLS1ki3JifbKygQu5/0u4yuDkS8W501VHojBYntTNtn0BzRze58adRvdg8Uqs3S6D2g/S5+1ePEw5lqTWJ4Quz7M0jJYfrErOEyDwlU7rlqGZbF8k9fKt6+n/YrXpuJucN4hshw3gKKgun8u/DfoiPggLRWeb+OC82KTk/U3kXLVGlPo2krfZsJzAI8QUuLK5DxdU0oYl9Rm/Ey+r3MkbkHQENl5JZROKgojzN1zOLv30F+qzjluonTtzwvDJJLzhApHDLnjZl7fheK5w5FRayAUu19BQ+YhbCqobLPL9QED+r8bYDh4iPgy73ennD9B92Z0CWWKVAq6ZPrndvkOU5uIoOemNZJUZtyr6K/gg//Lul2M2mUcBfam12psacGy3Hvt8LEWdeHbjn9YBEXwWsQojV+zqk0aPUSVTZna3R6Iz/Cs3CIOgDYfZR4CimqaN3CmhHs4eWmcTAV+FFTLkdp6PRuwXQCOUOM5o1DIeBpa7TIp0/BeirgLz0PJJJ+DO+2VMvJTvztV8/KvdnBso9BR7AsOY3n2XXm99lX8PXS5w16d69x8ugmyf2LR11qQLXedY4OlEB183
  • Organization: GeometryFactory

Hello,

What do you mean with "which is not found" ??

You find it, but the compiler does not?

Do the examples in examples/Surface_mesh_simplification compile
when unmodified?

andreas

On 21/06/2017 19:42, Ignacio Javier Osorio Wallace wrote:
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/


--
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912 skype: andreas.fabri



Archive powered by MHonArc 2.6.18.

Top of Page