TexGen
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
TexGen::CBasicVolumes Class Reference

Class for meshing fabric unit cells. More...

#include <BasicVolumes.h>

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

Classes

struct  PROJECTED_REGION
 Struct representing a region projected onto the XY plane. More...
 
struct  ProjectedRegionArea
 Functor defining the < operator based on the projected region's area. More...
 

Public Member Functions

 CBasicVolumes (void)
 
 ~CBasicVolumes (void)
 
bool CreateBasicVolumes (CTextile &Textile)
 
bool CreateBasicVolumes (string TextileName)
 
void SetSeed (double dSeed)
 
double GetSeed ()
 
void SetPeriodic (bool bPeriodic)
 
bool GetPeriodic ()
 
void SetDebug (bool bDebug)
 
bool GetDebug ()
 

Protected Types

enum  LINE_STATE { FORWARD = 1 , REVERSE = 2 }
 

Protected Member Functions

void SaveProjectedContoursToVTK (string Filename)
 
void SaveProjectedAreasToVTK (string Filename)
 
bool ValidProjectedMesh ()
 
int SplitLinesByNodes (CMesh &Mesh)
 
int SplitLinesByLines (CMesh &Mesh)
 
int MergeStraightLines (CMesh &Mesh)
 
int RemoveDuplicateSegments (CMesh &Mesh)
 
int RemoveDegenerateSegments (CMesh &Mesh)
 
CMesh GetProjectedMesh (const CMesh &Mesh)
 
bool GetCommonEdgeIndices (int Indices1[3], int Indices2[3], int Common[2])
 
bool CreateProjectedAreas ()
 
bool SeedOuterBoundary ()
 
bool RemoveOuterBoundary ()
 
double GetRegionArea (const PROJECTED_REGION &Region)
 
bool CreateProjectedCenters ()
 
bool PointInsideRegion (XYZ Point, int iRegion)
 
void CalculateYarnIndices ()
 
bool MeshProjectedAreas ()
 
bool GetMeshVerticalBounds (const CMesh &Mesh, XYZ Point, double &dMinZ, double &dMaxZ, bool bForceFind=false)
 

Protected Attributes

CMesh m_ProjectedMesh
 
CMesh m_DomainMesh
 
vector< CMeshm_YarnMeshes
 
vector< PROJECTED_REGIONm_ProjectedRegions
 
vector< int > m_TriangleRegions
 
double m_dTolerance
 
CTextilem_pTextile
 
double m_dSeed
 
bool m_bCreatePeriodic
 
bool m_bDebug
 

Detailed Description

Class for meshing fabric unit cells.

Definition at line 32 of file BasicVolumes.h.

Member Enumeration Documentation

◆ LINE_STATE

Enumerator
FORWARD 
REVERSE 

Definition at line 51 of file BasicVolumes.h.

Constructor & Destructor Documentation

◆ CBasicVolumes()

CBasicVolumes::CBasicVolumes ( void  )

Definition at line 31 of file BasicVolumes.cpp.

◆ ~CBasicVolumes()

CBasicVolumes::~CBasicVolumes ( void  )

Definition at line 40 of file BasicVolumes.cpp.

Member Function Documentation

◆ CalculateYarnIndices()

void CBasicVolumes::CalculateYarnIndices ( )
protected

Definition at line 826 of file BasicVolumes.cpp.

References GetMeshVerticalBounds(), m_ProjectedRegions, and m_YarnMeshes.

Referenced by CreateBasicVolumes().

◆ CreateBasicVolumes() [1/2]

bool CBasicVolumes::CreateBasicVolumes ( CTextile Textile)

◆ CreateBasicVolumes() [2/2]

bool CBasicVolumes::CreateBasicVolumes ( string  TextileName)

Definition at line 44 of file BasicVolumes.cpp.

References CreateBasicVolumes(), and TEXGEN.

◆ CreateProjectedAreas()

bool CBasicVolumes::CreateProjectedAreas ( )
protected

◆ CreateProjectedCenters()

bool CBasicVolumes::CreateProjectedCenters ( )
protected

◆ GetCommonEdgeIndices()

bool CBasicVolumes::GetCommonEdgeIndices ( int  Indices1[3],
int  Indices2[3],
int  Common[2] 
)
protected

Definition at line 217 of file BasicVolumes.cpp.

Referenced by GetProjectedMesh().

◆ GetDebug()

bool TexGen::CBasicVolumes::GetDebug ( )
inline

Definition at line 48 of file BasicVolumes.h.

◆ GetMeshVerticalBounds()

bool CBasicVolumes::GetMeshVerticalBounds ( const CMesh Mesh,
XYZ  Point,
double &  dMinZ,
double &  dMaxZ,
bool  bForceFind = false 
)
protected

Find the intersections between a line passing through Point and parallel to the Z axis and the given mesh, then return the lowest and highest of those intersections.

Parameters
MeshThe mesh with which to perform the intersection test
PointThe point through which the line passes through (the z component is redundant)
dMinZThe returned lowest intersection point
dMaxZThe returned highest intersection point
bForceFindForce the algorithm to find at least one intersection, what this means is that it will find the intersection with the closest triangle and use that intersection as the maximum and minimum returned bounds. This is usefull for cases where the vertical line just misses the mesh and the closest intersection is needed.

Definition at line 975 of file BasicVolumes.cpp.

References TexGen::CMesh::IntersectLine(), m_dTolerance, and TexGen::XYZ::z.

Referenced by TexGen::CMesher::BuildMidSideNode(), CalculateYarnIndices(), TexGen::CGeometrySolver::RaiseNodes(), and TexGen::CMesher::RaiseNodes().

◆ GetPeriodic()

bool TexGen::CBasicVolumes::GetPeriodic ( )
inline

Definition at line 45 of file BasicVolumes.h.

◆ GetProjectedMesh()

CMesh CBasicVolumes::GetProjectedMesh ( const CMesh Mesh)
protected

◆ GetRegionArea()

double CBasicVolumes::GetRegionArea ( const PROJECTED_REGION Region)
protected

◆ GetSeed()

double TexGen::CBasicVolumes::GetSeed ( )
inline

Definition at line 42 of file BasicVolumes.h.

◆ MergeStraightLines()

int CBasicVolumes::MergeStraightLines ( CMesh Mesh)
protected

◆ MeshProjectedAreas()

bool CBasicVolumes::MeshProjectedAreas ( )
protected

◆ PointInsideRegion()

bool CBasicVolumes::PointInsideRegion ( XYZ  Point,
int  iRegion 
)
protected

◆ RemoveDegenerateSegments()

int CBasicVolumes::RemoveDegenerateSegments ( CMesh Mesh)
protected

Definition at line 332 of file BasicVolumes.cpp.

References TexGen::CMesh::GetIndices(), and TexGen::CMesh::LINE.

Referenced by CreateBasicVolumes().

◆ RemoveDuplicateSegments()

int CBasicVolumes::RemoveDuplicateSegments ( CMesh Mesh)
protected

Definition at line 304 of file BasicVolumes.cpp.

References TexGen::CMesh::GetIndices(), and TexGen::CMesh::LINE.

Referenced by CreateBasicVolumes().

◆ RemoveOuterBoundary()

bool CBasicVolumes::RemoveOuterBoundary ( )
protected

Definition at line 721 of file BasicVolumes.cpp.

References m_ProjectedRegions.

Referenced by CreateBasicVolumes().

◆ SaveProjectedAreasToVTK()

void CBasicVolumes::SaveProjectedAreasToVTK ( string  Filename)
protected

◆ SaveProjectedContoursToVTK()

void CBasicVolumes::SaveProjectedContoursToVTK ( string  Filename)
protected

◆ SeedOuterBoundary()

bool CBasicVolumes::SeedOuterBoundary ( )
protected

◆ SetDebug()

void TexGen::CBasicVolumes::SetDebug ( bool  bDebug)
inline

Definition at line 47 of file BasicVolumes.h.

◆ SetPeriodic()

void TexGen::CBasicVolumes::SetPeriodic ( bool  bPeriodic)
inline

Definition at line 44 of file BasicVolumes.h.

Referenced by TexGen::CGeometrySolver::CreateSystem().

◆ SetSeed()

void TexGen::CBasicVolumes::SetSeed ( double  dSeed)
inline

Definition at line 41 of file BasicVolumes.h.

◆ SplitLinesByLines()

int CBasicVolumes::SplitLinesByLines ( CMesh Mesh)
protected

◆ SplitLinesByNodes()

int CBasicVolumes::SplitLinesByNodes ( CMesh Mesh)
protected

◆ ValidProjectedMesh()

bool CBasicVolumes::ValidProjectedMesh ( )
protected

Definition at line 485 of file BasicVolumes.cpp.

References TexGen::CMesh::GetIndices(), TexGen::CMesh::LINE, and m_ProjectedMesh.

Referenced by CreateBasicVolumes().

Member Data Documentation

◆ m_bCreatePeriodic

bool TexGen::CBasicVolumes::m_bCreatePeriodic
protected

◆ m_bDebug

bool TexGen::CBasicVolumes::m_bDebug
protected

Definition at line 124 of file BasicVolumes.h.

Referenced by CreateBasicVolumes(), and TexGen::CGeometrySolver::SolveSystem().

◆ m_DomainMesh

CMesh TexGen::CBasicVolumes::m_DomainMesh
protected

Definition at line 113 of file BasicVolumes.h.

Referenced by CreateBasicVolumes(), and TexGen::CMesher::RaiseNodes().

◆ m_dSeed

double TexGen::CBasicVolumes::m_dSeed
protected

◆ m_dTolerance

double TexGen::CBasicVolumes::m_dTolerance
protected

◆ m_ProjectedMesh

CMesh TexGen::CBasicVolumes::m_ProjectedMesh
protected

◆ m_ProjectedRegions

vector<PROJECTED_REGION> TexGen::CBasicVolumes::m_ProjectedRegions
protected

◆ m_pTextile

CTextile* TexGen::CBasicVolumes::m_pTextile
protected

◆ m_TriangleRegions

vector<int> TexGen::CBasicVolumes::m_TriangleRegions
protected

◆ m_YarnMeshes

vector<CMesh> TexGen::CBasicVolumes::m_YarnMeshes
protected

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