Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Meshing Polyhedral Domain

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Meshing Polyhedral Domain


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Meshing Polyhedral Domain
  • Date: Tue, 31 Jan 2012 17:05:48 +0100

Note that in CGAL, both the 2D surface mesh and 3D mesh can be generated
at the same time. What I mean is that you should use (if possible) the
input of the surface mesher directly in Mesh_3.

Sebastien.

On 01/30/2012 03:51 PM, EDMONDSON R.H. wrote:
Hi,

I'm very new to CGAL and am working on a project to create a 3D mesh of
a section of a geological strata. I have created the surface mesh fine
and am using this as a polyhedral domain for the 3D mesh generation.

The program compiles fine but when run fails with:

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted

The relevant code is attached below (it is effectively just one of the
standard CGAL examples). I have also attached the input file for the 3D
meshing along with a visualization of the surface mesh.


I am at a total loss and any help would be greatly appreciated,

Rowan



// Create input polyhedron
Polyhedron polyhedron;
std::ifstream input("data/strata_mesh.off");
input >> polyhedron;

// Create domain
Mesh_domain domain(polyhedron);


// Mesh criteria
Mesh_criteria criteria(facet_angle=50, facet_size=2, facet_distance=2,
cell_radius_edge=10);

// Mesh generation
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);

// Output
std::ofstream medit_file("out_1.mesh");
c3t3.output_to_medit(medit_file);
medit_file.close();







Archive powered by MHonArc 2.6.16.

Top of Page