Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

[cgal-discuss] Minimum edge size on make_surface_mesh


Chronological Thread 
  • From: Ignacio Javier Osorio Wallace <>
  • To:
  • Subject: [cgal-discuss] Minimum edge size on make_surface_mesh
  • Date: Thu, 08 Jun 2017 14:59:46 -0400
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:Tdy6pR2VcON5FXr7smDT+DRfVm0co7zxezQtwd8Zse0VKfad9pjvdHbS+e9qxAeQG96KtLQc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q89pDXYQhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7S60/Vza/4KdxUBLnhzsIOTE3/m/XlMJ+kaFVoR2vqBFk347ZYoOVOOZicq7HY98XQ3dKUMZLVyxGB4Oxd4gBD+UHPelCs4b9plwOpga6Cwa2GuPvyyFHhmXr1qMjyOQhFhvG3A0nH9kTsHvbttH1NKMIXu+p0qbD0DLOb/JR2Tfm74jIaBEhofaXULJtbMXe11UgGxnZgVWUsIHoOS6e2OcVs2WD8uZtVfyjh3Qlpgx+uDSj28YhhpPUio4L0lzI6CV0zJgvKdC6R0N3e8OoHZpKuyyVK4d7RN4pTXtytyYg0LIGvIa2fCgUx5QjwB7Sc/mHfJKJ4hLnTuqRPCp3i2x5d76lmxmy9VCsyuz6VsaqzFZHtjdJn9nSunwX1RHe5dKLRuZ880u7xDqDyRjf6uReLkA1karbJYQhwrk1lpcLsETDGTT2mELsjK+XcUUp4fWo5Pn5bbr6vJOTK4t0hhnkMqsygsy/Hfg4Mg8WUmeH9uSzzrnj8VTkT7VLlf05jrTZsIvBJckAva64AwpV0p455BqlDjem1s4YnXgdI15fdhKHlduhB1abK//xCbKzgk+njSxw7/HAJLzoRJvXfVbZl7K0XLl74kVdz0IRxM5e6ogcLaoGOvP0EnD4sNjRBRJxZw2z2OH9CdJVy48TUiSEBvnKY+vprVaU67d3cKG3b4gPtWOlJg==

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.

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;



Archive powered by MHonArc 2.6.18.

Top of Page