chrono::cascade::ChCascadeMeshTools Class Reference

Description

Tools to convert an OpenCASCADE shapes into triangle meshes.

#include <ChCascadeMeshTools.h>

Static Public Member Functions

static void fillTriangleMeshFromCascadeFace (geometry::ChTriangleMeshConnected &chmesh, const TopoDS_Face &F)
 This function can be used to convert a OpenCASCADE face into a triangle mesh. More...
 
static void fillTriangleMeshFromCascade (geometry::ChTriangleMeshConnected &chmesh, const TopoDS_Shape &mshape, double deflection=1, bool relative_deflection=false, double angulardeflection=0.5)
 This function can be used to convert a OpenCASCADE shape into a Chrono::Engine ChTriangleMesh triangle mesh. More...
 
static void fillObjFileFromCascade (ChStreamOutAscii &objfile, const TopoDS_Shape &mshape, double deflection=1, bool relative_deflection=false, double angulardeflection=0.5)
 This function can be used to convert a OpenCASCADE shape into a 'obj' file format. More...
 

Member Function Documentation

void ChCascadeMeshTools::fillObjFileFromCascade ( ChStreamOutAscii objfile,
const TopoDS_Shape &  mshape,
double  deflection = 1,
bool  relative_deflection = false,
double  angulardeflection = 0.5 
)
static

This function can be used to convert a OpenCASCADE shape into a 'obj' file format.

The file 'objfile' must be already opened, and empty. Also normals are saved.

Parameters
objfilethe .obj file will be written here
deflectionTolerance on meshing (the lower, the finer the mesh)
relative_deflectionIf true, deflection is relative to face size
void ChCascadeMeshTools::fillTriangleMeshFromCascade ( geometry::ChTriangleMeshConnected chmesh,
const TopoDS_Shape &  mshape,
double  deflection = 1,
bool  relative_deflection = false,
double  angulardeflection = 0.5 
)
static

This function can be used to convert a OpenCASCADE shape into a Chrono::Engine ChTriangleMesh triangle mesh.

Parameters
chmeshMesh that will be filled with triangles
mshapeOpenCASCADE face to be meshed
deflectionTolerance on meshing (the lower, the finer the mesh)
relative_deflectionIf true, deflection is relative to face size
void ChCascadeMeshTools::fillTriangleMeshFromCascadeFace ( geometry::ChTriangleMeshConnected chmesh,
const TopoDS_Face &  F 
)
static

This function can be used to convert a OpenCASCADE face into a triangle mesh.

The face must be already mshed (ex because you called fillTriangleMeshFromCascade before).

Parameters
chmeshMesh that will be filled with triangles
FOpenCASCADE face to be meshed