TexGen
|
Class which tetrahedralizes a textile using Tetgen software. More...
#include <TetgenMesh.h>
Public Member Functions | |
CTetgenMesh (double Seed) | |
virtual | ~CTetgenMesh (void) |
void | SaveTetgenMesh (CTextile &Textile, string OutputFilename, string Parameters, bool bPeriodic, int FileType) |
Save a textile as a tetrahedralized mesh using Tetgen. More... | |
void | MeshDomainPlanes (bool bPeriodic) |
Protected Member Functions | |
void | SaveMesh (CTextile &Textile) |
Save tetgenio data to CMesh. More... | |
void | SaveToAbaqus (string Filename, CTextile &Textile) |
Save output mesh to Abaqus export file. More... | |
void | SaveToVTK (string Filename) |
Save output mesh to VTK format. More... | |
bool | Triangulate (vector< vector< XY > > &PolygonPoints, vector< XY > &HolePoints, CMesh &OutputMesh, PLANEPARAMS &ConvertRef) |
Triangulate the domain faces. More... | |
bool | ConvertDomainPointsTo2D (const list< int > &Indices, CMesh &DomainMesh, int numNodes, vector< XY > &Points2D, PLANEPARAMS &ConvertRef) |
Convert points on one domain surface to local 2D points. More... | |
void | Convert2DTo3DCoordinates (vector< XY > &Points2D, vector< XYZ > &Points3D, PLANEPARAMS &ConvertRef) |
Convert local 2D coordinates to global 3D coordinates. More... | |
void | Convert3DTo2DCoordinates (vector< XYZ > &Points3D, PLANEPARAMS &ConvertRef, vector< XY > &Points2D) |
Convert global 3D coordinates to local 2D coordinates. More... | |
void | SeedSides (vector< XY > &Points) |
Calculates seed points along domain edge. More... | |
void | OffsetMeshPoints (CMesh &Mesh, XYZ &Normal, double dDist) |
Offsets points in mesh by given distance in direction of normal. More... | |
Protected Attributes | |
CMesh | m_Mesh |
Mesh used to store input node points and elements. More... | |
tetgenio | m_in |
Tetgen input and output structures. More... | |
tetgenio | m_out |
CMesh | m_OutputMesh |
Mesh used to store output nodes and elements. More... | |
vector< POINT_INFO > | m_ElementsInfo |
Element information for output mesh. More... | |
vector< CMesh > | m_DomainMeshes |
Vector of meshes used to store domain plane meshes. More... | |
vector< CMesh > | m_TriangulatedMeshes |
Vector of triangulated domain plane meshes. More... | |
double | m_Seed |
Seed used for calculating boundary edge points. More... | |
vector< vector< int > > | m_PolygonNumVertices |
Number of polygon vertices on each face. Number of outer vector members = number of faces. More... | |
bool | m_bFillEnds |
True if yarn areas are to be removed from domain. More... | |
Class which tetrahedralizes a textile using Tetgen software.
The surface mesh and domain are used as tetgen input, the domain boundaries first being triangulated such that opposite boundaries have the same input mesh. (This assumes that the domain is specified to be a whole number of textile repeats).
Definition at line 35 of file TetgenMesh.h.
CTetgenMesh::CTetgenMesh | ( | double | Seed | ) |
Definition at line 32 of file TetgenMesh.cpp.
|
virtual |
Definition at line 37 of file TetgenMesh.cpp.
|
protectedinherited |
Convert local 2D coordinates to global 3D coordinates.
Definition at line 403 of file MeshDomainPlane.cpp.
References TexGen::PLANEPARAMS::RefPoint, TexGen::XYZ::x, TexGen::PLANEPARAMS::XAxis, TexGen::XYZ::y, and TexGen::PLANEPARAMS::YAxis.
Referenced by TexGen::CMeshDomainPlane::Triangulate().
|
protectedinherited |
Convert global 3D coordinates to local 2D coordinates.
Definition at line 199 of file MeshDomainPlane.cpp.
References TexGen::DotProduct(), TexGen::PLANEPARAMS::RefPoint, TexGen::XY::x, TexGen::PLANEPARAMS::XAxis, TexGen::XY::y, and TexGen::PLANEPARAMS::YAxis.
Referenced by TexGen::CMeshDomainPlane::ConvertDomainPointsTo2D(), and TexGen::CMeshDomainPlane::MeshDomainPlanes().
|
protectedinherited |
Convert points on one domain surface to local 2D points.
Definition at line 172 of file MeshDomainPlane.cpp.
References TexGen::CMeshDomainPlane::Convert3DTo2DCoordinates(), TexGen::CrossProduct(), TexGen::CMesh::GetNode(), TexGen::PLANEPARAMS::Normal, TexGen::Normalise(), TexGen::PLANEPARAMS::RefPoint, TexGen::PLANEPARAMS::XAxis, and TexGen::PLANEPARAMS::YAxis.
Referenced by TexGen::CMeshDomainPlane::MeshDomainPlanes().
|
inherited |
Definition at line 43 of file MeshDomainPlane.cpp.
References TexGen::CMeshDomainPlane::Convert3DTo2DCoordinates(), TexGen::CMeshDomainPlane::ConvertDomainPointsTo2D(), TexGen::DotProduct(), TexGen::CMesh::GetIndices(), TexGen::GetLength(), TexGen::CMesh::GetNumNodes(), TexGen::CMeshDomainPlane::m_DomainMeshes, TexGen::CMeshDomainPlane::m_PolygonNumVertices, TexGen::CMeshDomainPlane::m_TriangulatedMeshes, TexGen::PLANEPARAMS::Normal, TexGen::CMeshDomainPlane::OffsetMeshPoints(), TexGen::CMesh::POLYGON, TexGen::CMesh::QUAD, TexGen::PLANEPARAMS::RefPoint, TexGen::CMeshDomainPlane::SeedSides(), TGERROR, TexGen::CMesh::TRI, and TexGen::CMeshDomainPlane::Triangulate().
Referenced by TexGen::CSurfaceMesh::SaveSurfaceMesh(), and SaveTetgenMesh().
|
protectedinherited |
Offsets points in mesh by given distance in direction of normal.
Definition at line 213 of file MeshDomainPlane.cpp.
References TexGen::CMesh::GetNode(), TexGen::CMesh::GetNumNodes(), and TexGen::CMesh::SetNode().
Referenced by TexGen::CMeshDomainPlane::MeshDomainPlanes().
|
protected |
Save tetgenio data to CMesh.
Definition at line 288 of file TetgenMesh.cpp.
References TexGen::CMesh::AddElement(), TexGen::CMesh::AddNode(), TexGen::CMesh::Clear(), TexGen::CMesh::GetElementCenters(), TexGen::CTextile::GetPointInformation(), m_ElementsInfo, m_out, m_OutputMesh, TexGen::CMesh::QUADRATIC_TET, TexGen::CMesh::TET, TexGen::XYZ::x, TexGen::XYZ::y, and TexGen::XYZ::z.
void CTetgenMesh::SaveTetgenMesh | ( | CTextile & | Textile, |
string | OutputFilename, | ||
string | Parameters, | ||
bool | bPeriodic, | ||
int | FileType | ||
) |
Save a textile as a tetrahedralized mesh using Tetgen.
Textile | Textile to be meshed |
Filename | for Tetgen output files |
Parameters | tetgen flags to be applied during tetrahedralization |
bPeriodic | If set true, opposite faces of mesh will be replicated |
Definition at line 41 of file TetgenMesh.cpp.
References TexGen::CMesh::AddNode(), TexGen::CTextile::AddSurfaceToMesh(), TexGen::CMesh::ConvertQuadstoTriangles(), TexGen::CMesh::GetClosestNodeDistance(), TexGen::CMesh::GetIndices(), TexGen::CMesh::GetNumElements(), TexGen::CMesh::GetNumNodes(), TexGen::CMeshDomainPlane::m_DomainMeshes, m_in, m_Mesh, TexGen::CMeshDomainPlane::m_PolygonNumVertices, TexGen::CMeshDomainPlane::m_TriangulatedMeshes, TexGen::CMeshDomainPlane::MeshDomainPlanes(), NULL, TexGen::CMesh::NUM_ELEMENT_TYPES, TexGen::CMesh::POLYGON, TexGen::CMesh::QUAD, TGERROR, and TexGen::CMesh::TRI.
|
protected |
Save output mesh to Abaqus export file.
Definition at line 325 of file TetgenMesh.cpp.
References m_ElementsInfo, m_OutputMesh, and TexGen::CMesh::SaveToABAQUS().
|
protected |
Save output mesh to VTK format.
Definition at line 331 of file TetgenMesh.cpp.
References TexGen::CMeshDataBase::ELEMENT, TexGen::CMeshData< T >::m_Data, m_ElementsInfo, m_OutputMesh, and TexGen::CMesh::SaveToVTK().
|
protectedinherited |
Calculates seed points along domain edge.
Definition at line 224 of file MeshDomainPlane.cpp.
References TexGen::GetLength(), and TexGen::CMeshDomainPlane::m_Seed.
Referenced by TexGen::CMeshDomainPlane::MeshDomainPlanes().
|
protectedinherited |
Triangulate the domain faces.
Definition at line 261 of file MeshDomainPlane.cpp.
References TexGen::CMesh::AddNode(), TexGen::CMeshDomainPlane::Convert2DTo3DCoordinates(), TexGen::CMesh::GetIndices(), TexGen::CMeshDomainPlane::m_bFillEnds, TexGen::CMeshDomainPlane::m_Seed, TexGen::CMesh::TRI, TexGen::XY::x, and TexGen::XY::y.
Referenced by TexGen::CMeshDomainPlane::MeshDomainPlanes().
|
protectedinherited |
True if yarn areas are to be removed from domain.
Definition at line 74 of file MeshDomainPlane.h.
Referenced by TexGen::CMeshDomainPlane::CMeshDomainPlane(), and TexGen::CMeshDomainPlane::Triangulate().
|
protectedinherited |
Vector of meshes used to store domain plane meshes.
Definition at line 66 of file MeshDomainPlane.h.
Referenced by TexGen::CMeshDomainPlane::MeshDomainPlanes(), TexGen::CSurfaceMesh::SaveSurfaceMesh(), and SaveTetgenMesh().
|
protected |
Element information for output mesh.
Definition at line 58 of file TetgenMesh.h.
Referenced by SaveMesh(), SaveToAbaqus(), and SaveToVTK().
|
protected |
Tetgen input and output structures.
Definition at line 54 of file TetgenMesh.h.
Referenced by SaveTetgenMesh().
|
protected |
Mesh used to store input node points and elements.
Definition at line 52 of file TetgenMesh.h.
Referenced by SaveTetgenMesh().
|
protected |
Definition at line 54 of file TetgenMesh.h.
Referenced by SaveMesh().
|
protected |
Mesh used to store output nodes and elements.
Definition at line 56 of file TetgenMesh.h.
Referenced by SaveMesh(), SaveToAbaqus(), and SaveToVTK().
|
protectedinherited |
Number of polygon vertices on each face. Number of outer vector members = number of faces.
Definition at line 72 of file MeshDomainPlane.h.
Referenced by TexGen::CMeshDomainPlane::MeshDomainPlanes(), and SaveTetgenMesh().
|
protectedinherited |
Seed used for calculating boundary edge points.
Definition at line 70 of file MeshDomainPlane.h.
Referenced by TexGen::CMeshDomainPlane::CMeshDomainPlane(), TexGen::CMeshDomainPlane::SeedSides(), and TexGen::CMeshDomainPlane::Triangulate().
|
protectedinherited |
Vector of triangulated domain plane meshes.
Definition at line 68 of file MeshDomainPlane.h.
Referenced by TexGen::CMeshDomainPlane::MeshDomainPlanes(), TexGen::CSurfaceMesh::SaveSurfaceMesh(), and SaveTetgenMesh().