TexGen
|
Class which generates a surface mesh with triangulated domain boundaries. More...
#include <SurfaceMesh.h>
Public Member Functions | |
CSurfaceMesh (double Seed, bool bFillEnds=true) | |
Constructor for surface mesh class. More... | |
virtual | ~CSurfaceMesh (void) |
void | SaveSurfaceMesh (CTextile &Textile, bool bSaveYarns=true, bool bSaveDomain=false, bool bTrimToDomain=true) |
Save a textile as a surface mesh with triangulated domain faces. More... | |
void | SaveToSTL (string Filename, bool bBinary) |
Save surface mesh data to STL file. More... | |
void | SaveToVTK (string Filename) |
Save surface mesh data to VTK file. More... | |
void | SaveToSCIRun (string Filename) |
Save surface mesh data to SCIRun format. More... | |
void | MeshDomainPlanes (bool bPeriodic) |
Protected Member Functions | |
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 node points and elements. 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 generates a surface mesh with triangulated domain boundaries.
(This assumes that the domain is specified to be a whole number of textile repeats).
Definition at line 33 of file SurfaceMesh.h.
CSurfaceMesh::CSurfaceMesh | ( | double | Seed, |
bool | bFillEnds = true |
||
) |
Constructor for surface mesh class.
Seed | Seed size for meshing domain surfaces |
bFillEnds | True if yarn areas in domain surfaces are to be meshed |
Definition at line 27 of file SurfaceMesh.cpp.
|
virtual |
Definition at line 31 of file SurfaceMesh.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 SaveSurfaceMesh(), and TexGen::CTetgenMesh::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().
void CSurfaceMesh::SaveSurfaceMesh | ( | CTextile & | Textile, |
bool | bSaveYarns = true , |
||
bool | bSaveDomain = false , |
||
bool | bTrimToDomain = true |
||
) |
Save a textile as a surface mesh with triangulated domain faces.
Textile | Textile to be meshed |
bSaveYarns | True if yarn surfaces to be saved |
bSaveDomain | True if domain surfaces to be saved |
bTrimToDomain | True if yarns are to be trimmed to domain surfaces |
Definition at line 35 of file SurfaceMesh.cpp.
References TexGen::CTextile::AddSurfaceToMesh(), TexGen::CMesh::Clear(), TexGen::CMesh::ConvertQuadstoTriangles(), TexGen::CTextile::GetDomain(), TexGen::CDomain::GetType(), TexGen::CMesh::InsertMesh(), TexGen::CMeshDomainPlane::m_DomainMeshes, m_Mesh, TexGen::CMeshDomainPlane::m_TriangulatedMeshes, TexGen::CMeshDomainPlane::MeshDomainPlanes(), and TGERROR.
void CSurfaceMesh::SaveToSCIRun | ( | string | Filename | ) |
Save surface mesh data to SCIRun format.
Definition at line 74 of file SurfaceMesh.cpp.
References m_Mesh, and TexGen::CMesh::SaveToSCIRun().
void CSurfaceMesh::SaveToSTL | ( | string | Filename, |
bool | bBinary | ||
) |
Save surface mesh data to STL file.
Filename | Filename to save data to |
bBinary | True to save as binary file, False to save as ASCII |
Definition at line 64 of file SurfaceMesh.cpp.
References m_Mesh, and TexGen::CMesh::SaveToSTL().
void CSurfaceMesh::SaveToVTK | ( | string | Filename | ) |
Save surface mesh data to VTK file.
Definition at line 69 of file SurfaceMesh.cpp.
References m_Mesh, 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(), SaveSurfaceMesh(), and TexGen::CTetgenMesh::SaveTetgenMesh().
|
protected |
Mesh used to store node points and elements.
Definition at line 65 of file SurfaceMesh.h.
Referenced by SaveSurfaceMesh(), SaveToSCIRun(), SaveToSTL(), 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 TexGen::CTetgenMesh::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(), SaveSurfaceMesh(), and TexGen::CTetgenMesh::SaveTetgenMesh().