Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Finite Element Analysis

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Finite Element Analysis


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Finite Element Analysis
  • Date: Mon, 21 Mar 2011 18:45:52 +0100

Qianqian Fang wrote:
On 03/21/2011 10:47 AM, Sebastien Loriot (GeometryFactory) wrote:
http://nmr.mgh.harvard.edu/~fangq/temp/post_extract.off

Your off file contains triangles that are not consistently oriented
to describe a polyhedron. You need to reorient triangles.

If you use the Polyhedron demo of CGAL, do:
"Operations -> Orient polygon soup"
To produce a 3D mesh you can then do:
Save in back to an off file and reload it.
Then do:
"Operation -> Create a tetrahedral mesh"
or directly use your code.

I used JMeshLib (http://jmeshlib.sourceforge.net/) to reorient
all triangles, but the output surface mesh still crashed the
polyhedral mesher. The surface meshes before and after
the reorientation can be found here

http://nmr.mgh.harvard.edu/~fangq/temp/pre_cgalpoly.off
http://nmr.mgh.harvard.edu/~fangq/temp/pre_cgalpoly_reorder.off

any more comments?

thanks

Qianqian
Can you provide the code, because it is working fine for me.

If you copied-pasted an example, you should adapt the parameter
values of the criteria because those in the example are proper to the
hard-coded model (in particular size criteria).

The demo and the following worked for me:

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

#include <CGAL/Mesh_triangulation_3.h>
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/Mesh_criteria_3.h>

#include <CGAL/Polyhedral_mesh_domain_3.h>
#include <CGAL/make_mesh_3.h>
#include <CGAL/refine_mesh_3.h>

// IO
#include <CGAL/IO/Polyhedron_iostream.h>

// Domain
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Polyhedron_3<K> Polyhedron;
typedef CGAL::Polyhedral_mesh_domain_3<Polyhedron, K> Mesh_domain;

// Triangulation
typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;

// Criteria
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;

// To avoid verbose function and named parameters call
using namespace CGAL::parameters;

int main()
{
// Create input polyhedron
Polyhedron polyhedron;
std::ifstream input("pre_cgalpoly_reorder.off");
input >> polyhedron;

// Create domain
Mesh_domain domain(polyhedron);

// Mesh criteria (no cell_size set)
Mesh_criteria criteria(facet_angle=25,
facet_size=3.5,
facet_distance=3.5,
cell_radius_edge=3);

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


return 0;
}



Archive powered by MHonArc 2.6.16.

Top of Page