TexGen
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TexGen::CSurfaceMesh Class Reference

Class which generates a surface mesh with triangulated domain boundaries. More...

#include <SurfaceMesh.h>

Inheritance diagram for TexGen::CSurfaceMesh:
Inheritance graph
[legend]

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< CMeshm_DomainMeshes
 Vector of meshes used to store domain plane meshes. More...
 
vector< CMeshm_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CSurfaceMesh()

CSurfaceMesh::CSurfaceMesh ( double  Seed,
bool  bFillEnds = true 
)

Constructor for surface mesh class.

Parameters
SeedSeed size for meshing domain surfaces
bFillEndsTrue if yarn areas in domain surfaces are to be meshed

Definition at line 27 of file SurfaceMesh.cpp.

◆ ~CSurfaceMesh()

CSurfaceMesh::~CSurfaceMesh ( void  )
virtual

Definition at line 31 of file SurfaceMesh.cpp.

Member Function Documentation

◆ Convert2DTo3DCoordinates()

void CMeshDomainPlane::Convert2DTo3DCoordinates ( vector< XY > &  Points2D,
vector< XYZ > &  Points3D,
PLANEPARAMS ConvertRef 
)
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().

◆ Convert3DTo2DCoordinates()

void CMeshDomainPlane::Convert3DTo2DCoordinates ( vector< XYZ > &  Points3D,
PLANEPARAMS ConvertRef,
vector< XY > &  Points2D 
)
protectedinherited

◆ ConvertDomainPointsTo2D()

bool CMeshDomainPlane::ConvertDomainPointsTo2D ( const list< int > &  Indices,
CMesh DomainMesh,
int  numNodes,
vector< XY > &  Points2D,
PLANEPARAMS ConvertRef 
)
protectedinherited

◆ MeshDomainPlanes()

void CMeshDomainPlane::MeshDomainPlanes ( bool  bPeriodic)
inherited

◆ OffsetMeshPoints()

void CMeshDomainPlane::OffsetMeshPoints ( CMesh Mesh,
XYZ Normal,
double  dDist 
)
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().

◆ SaveSurfaceMesh()

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.

Parameters
TextileTextile to be meshed
bSaveYarnsTrue if yarn surfaces to be saved
bSaveDomainTrue if domain surfaces to be saved
bTrimToDomainTrue 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.

◆ SaveToSCIRun()

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().

◆ SaveToSTL()

void CSurfaceMesh::SaveToSTL ( string  Filename,
bool  bBinary 
)

Save surface mesh data to STL file.

Parameters
FilenameFilename to save data to
bBinaryTrue 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().

◆ SaveToVTK()

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().

◆ SeedSides()

void CMeshDomainPlane::SeedSides ( vector< XY > &  Points)
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().

◆ Triangulate()

bool CMeshDomainPlane::Triangulate ( vector< vector< XY > > &  PolygonPoints,
vector< XY > &  HolePoints,
CMesh OutputMesh,
PLANEPARAMS ConvertRef 
)
protectedinherited

Member Data Documentation

◆ m_bFillEnds

bool TexGen::CMeshDomainPlane::m_bFillEnds
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().

◆ m_DomainMeshes

vector<CMesh> TexGen::CMeshDomainPlane::m_DomainMeshes
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().

◆ m_Mesh

CMesh TexGen::CSurfaceMesh::m_Mesh
protected

Mesh used to store node points and elements.

Definition at line 65 of file SurfaceMesh.h.

Referenced by SaveSurfaceMesh(), SaveToSCIRun(), SaveToSTL(), and SaveToVTK().

◆ m_PolygonNumVertices

vector<vector<int> > TexGen::CMeshDomainPlane::m_PolygonNumVertices
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().

◆ m_Seed

double TexGen::CMeshDomainPlane::m_Seed
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().

◆ m_TriangulatedMeshes

vector<CMesh> TexGen::CMeshDomainPlane::m_TriangulatedMeshes
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().


The documentation for this class was generated from the following files: