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

Class for creating realistic fabric geometry using FE. More...

#include <GeometrySolver.h>

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

Classes

struct  NODE
 
struct  PLATE
 
struct  PROJECTED_NODE
 
struct  RAISED_NODE
 
struct  SPRING
 

Public Member Functions

 CGeometrySolver (void)
 
 ~CGeometrySolver (void)
 
bool CreateSystem (CTextile &Textile)
 Create the finite element system of equations for a given textile. More...
 
bool CreateSystem (string TextileName)
 Create the finite element system of equations for a given textile. More...
 
int SolveSystem ()
 Solve the system of equations. More...
 
void SaveToVTK (string Filename)
 Save the results to a VTK file. More...
 
void DeformTextile ()
 Deform the textile with the results. More...
 
CTextileGetDeformedCopyOfTextile ()
 Create a copy of the textile and deform it, leaving the original textile intact. More...
 
void SetTensileStress (double dTensileStress)
 
void SetLongitudinalBendingModulus (double dBendingModulus)
 
void SetTransverseBendingModulus (double dBendingModulus)
 
void SetContactStiffness (double dContactStiffness)
 
void SetDisabledStiffness (double dDisabledStiffness)
 
double GetTensileStress ()
 
double GetLongitudinalBendingModulus ()
 
double GetTransverseBendingModulus ()
 
double GetContactStiffness ()
 
double GetDisabledStiffness ()
 
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 ()
 
virtual void DeformTextile (CTextile &Textile, bool bDeformDomain=true)
 
CTextileGetDeformedCopyOfTextile (CTextile &Textile, bool bDeformDomain=true)
 
const CLinearTransformationGetRepeatVectorDeformation () const
 
void SetRepeatVectorDeformation (CLinearTransformation RepeatDeformation)
 

Protected Types

enum  LINE_STATE { FORWARD = 1 , REVERSE = 2 }
 

Protected Member Functions

void RaiseNodes (int iIndex)
 
double GetAverageLength (int iIndex)
 
double GetArea (int iIndex)
 
void CreateSurfaceMesh ()
 
void CreatePlateElements ()
 
void AssignFibreDirectionToElements ()
 
void ApplyPeriodicBoundaryConditions (vector< XYZ > Repeats)
 
double GetDisplacement (XYZ Pos, int iYarn, XYZ &Disp) const
 
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

vector< SPRINGm_Springs
 
vector< PLATEm_PlateElements
 
vector< NODEm_Nodes
 
vector< PROJECTED_NODEm_ProjectedNodes
 
vector< pair< int, double > > m_DOFConstraints
 
vector< pair< int, int > > m_DOFLinks
 
double m_dHeightTolerance
 
double m_dDisabledStiffness
 
double m_dContactStiffness
 
double m_dLongitudinalBendingModulus
 
double m_dTransverseBendingModulus
 
double m_dTensileStress
 
CMesh m_SurfaceMesh
 
bool m_bAdjustThickness
 
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
 
CLinearTransformation m_RepeatDeformation
 

Private Member Functions

void CreateDebugSystem ()
 

Detailed Description

Class for creating realistic fabric geometry using FE.

This class implements a method where the mid-surface of the yarns are represented by triangular plate elements with bending stiffness and tension components.

Definition at line 35 of file GeometrySolver.h.

Member Enumeration Documentation

◆ LINE_STATE

enum TexGen::CBasicVolumes::LINE_STATE
protectedinherited
Enumerator
FORWARD 
REVERSE 

Definition at line 51 of file BasicVolumes.h.

Constructor & Destructor Documentation

◆ CGeometrySolver()

CGeometrySolver::CGeometrySolver ( void  )

Definition at line 30 of file GeometrySolver.cpp.

◆ ~CGeometrySolver()

CGeometrySolver::~CGeometrySolver ( void  )

Definition at line 41 of file GeometrySolver.cpp.

Member Function Documentation

◆ ApplyPeriodicBoundaryConditions()

void CGeometrySolver::ApplyPeriodicBoundaryConditions ( vector< XYZ Repeats)
protected

Definition at line 481 of file GeometrySolver.cpp.

References TexGen::CMesh::GetNodePairs(), m_DOFLinks, m_Nodes, and m_SurfaceMesh.

Referenced by CreateDebugSystem(), and CreateSystem().

◆ AssignFibreDirectionToElements()

void CGeometrySolver::AssignFibreDirectionToElements ( )
protected

◆ CalculateYarnIndices()

void CBasicVolumes::CalculateYarnIndices ( )
protectedinherited

◆ CreateBasicVolumes() [1/2]

bool CBasicVolumes::CreateBasicVolumes ( CTextile Textile)
inherited

◆ CreateBasicVolumes() [2/2]

bool CBasicVolumes::CreateBasicVolumes ( string  TextileName)
inherited

Definition at line 44 of file BasicVolumes.cpp.

References TexGen::CBasicVolumes::CreateBasicVolumes(), and TEXGEN.

◆ CreateDebugSystem()

void CGeometrySolver::CreateDebugSystem ( )
private

◆ CreatePlateElements()

void CGeometrySolver::CreatePlateElements ( )
protected

◆ CreateProjectedAreas()

bool CBasicVolumes::CreateProjectedAreas ( )
protectedinherited

◆ CreateProjectedCenters()

bool CBasicVolumes::CreateProjectedCenters ( )
protectedinherited

◆ CreateSurfaceMesh()

void CGeometrySolver::CreateSurfaceMesh ( )
protected

◆ CreateSystem() [1/2]

bool CGeometrySolver::CreateSystem ( CTextile Textile)

◆ CreateSystem() [2/2]

bool CGeometrySolver::CreateSystem ( string  TextileName)

Create the finite element system of equations for a given textile.

Definition at line 85 of file GeometrySolver.cpp.

References CreateSystem(), and TEXGEN.

◆ DeformTextile() [1/2]

void CGeometrySolver::DeformTextile ( )

Deform the textile with the results.

Definition at line 834 of file GeometrySolver.cpp.

References TexGen::CTextileDeformer::DeformTextile(), and TexGen::CBasicVolumes::m_pTextile.

◆ DeformTextile() [2/2]

void CTextileDeformer::DeformTextile ( CTextile Textile,
bool  bDeformDomain = true 
)
virtualinherited

◆ GetArea()

double CGeometrySolver::GetArea ( int  iIndex)
protected

Definition at line 338 of file GeometrySolver.cpp.

References m_PlateElements.

Referenced by CreateSystem().

◆ GetAverageLength()

double CGeometrySolver::GetAverageLength ( int  iIndex)
protected

◆ GetCommonEdgeIndices()

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

Definition at line 217 of file BasicVolumes.cpp.

Referenced by TexGen::CBasicVolumes::GetProjectedMesh().

◆ GetContactStiffness()

double TexGen::CGeometrySolver::GetContactStiffness ( )
inline

Definition at line 67 of file GeometrySolver.h.

◆ GetDebug()

bool TexGen::CBasicVolumes::GetDebug ( )
inlineinherited

Definition at line 48 of file BasicVolumes.h.

◆ GetDeformedCopyOfTextile() [1/2]

CTextile * CGeometrySolver::GetDeformedCopyOfTextile ( )

Create a copy of the textile and deform it, leaving the original textile intact.

Definition at line 840 of file GeometrySolver.cpp.

References TexGen::CTextileDeformer::GetDeformedCopyOfTextile(), TexGen::CBasicVolumes::m_pTextile, and NULL.

◆ GetDeformedCopyOfTextile() [2/2]

CTextile * CTextileDeformer::GetDeformedCopyOfTextile ( CTextile Textile,
bool  bDeformDomain = true 
)
inherited

◆ GetDisabledStiffness()

double TexGen::CGeometrySolver::GetDisabledStiffness ( )
inline

Definition at line 68 of file GeometrySolver.h.

◆ GetDisplacement()

double CGeometrySolver::GetDisplacement ( XYZ  Pos,
int  iYarn,
XYZ Disp 
) const
protectedvirtual

Get the displacement of a given point

Parameters
PosThe position of which the displacement is requested
iYarnThe yarn number for which the displacement is requested this is necessary because sometimes yarns may overlap and the yarns may have different displacements at the same point in space
DispThe displacement value should be filled in here by the function
Returns
Should give an idea of how accurate the displacement value is, a value higher than 0 is considered to be very accurate if the value is less then it may represent an extrapolated estimate. This function may be called several times for the same point but offset by different repeat vectors and the displacement with highest value will be chosen.

Implements TexGen::CTextileDeformer.

Definition at line 848 of file GeometrySolver.cpp.

References TexGen::Convert(), TexGen::CGeometrySolver::NODE::dDisplacement, TexGen::GetBarycentricCoordinates(), TexGen::CMesh::GetIndices(), TexGen::CGeometrySolver::NODE::iYarnIndex, m_Nodes, m_SurfaceMesh, TexGen::CGeometrySolver::NODE::Position, TexGen::CMesh::TRI, TexGen::XYZ::x, TexGen::XYZ::y, and TexGen::XYZ::z.

◆ GetLongitudinalBendingModulus()

double TexGen::CGeometrySolver::GetLongitudinalBendingModulus ( )
inline

Definition at line 65 of file GeometrySolver.h.

◆ GetMeshVerticalBounds()

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

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(), TexGen::CBasicVolumes::m_dTolerance, and TexGen::XYZ::z.

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

◆ GetPeriodic()

bool TexGen::CBasicVolumes::GetPeriodic ( )
inlineinherited

Definition at line 45 of file BasicVolumes.h.

◆ GetProjectedMesh()

CMesh CBasicVolumes::GetProjectedMesh ( const CMesh Mesh)
protectedinherited

◆ GetRegionArea()

double CBasicVolumes::GetRegionArea ( const PROJECTED_REGION Region)
protectedinherited

◆ GetRepeatVectorDeformation()

const CLinearTransformation & TexGen::CTextileDeformer::GetRepeatVectorDeformation ( ) const
inlineinherited

Definition at line 46 of file TextileDeformer.h.

◆ GetSeed()

double TexGen::CBasicVolumes::GetSeed ( )
inlineinherited

Definition at line 42 of file BasicVolumes.h.

◆ GetTensileStress()

double TexGen::CGeometrySolver::GetTensileStress ( )
inline

Definition at line 64 of file GeometrySolver.h.

◆ GetTransverseBendingModulus()

double TexGen::CGeometrySolver::GetTransverseBendingModulus ( )
inline

Definition at line 66 of file GeometrySolver.h.

◆ MergeStraightLines()

int CBasicVolumes::MergeStraightLines ( CMesh Mesh)
protectedinherited

◆ MeshProjectedAreas()

bool CBasicVolumes::MeshProjectedAreas ( )
protectedinherited

◆ PointInsideRegion()

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

◆ RaiseNodes()

void CGeometrySolver::RaiseNodes ( int  iIndex)
protected

◆ RemoveDegenerateSegments()

int CBasicVolumes::RemoveDegenerateSegments ( CMesh Mesh)
protectedinherited

◆ RemoveDuplicateSegments()

int CBasicVolumes::RemoveDuplicateSegments ( CMesh Mesh)
protectedinherited

◆ RemoveOuterBoundary()

bool CBasicVolumes::RemoveOuterBoundary ( )
protectedinherited

◆ SaveProjectedAreasToVTK()

void CBasicVolumes::SaveProjectedAreasToVTK ( string  Filename)
protectedinherited

◆ SaveProjectedContoursToVTK()

void CBasicVolumes::SaveProjectedContoursToVTK ( string  Filename)
protectedinherited

◆ SaveToVTK()

void CGeometrySolver::SaveToVTK ( string  Filename)

◆ SeedOuterBoundary()

bool CBasicVolumes::SeedOuterBoundary ( )
protectedinherited

◆ SetContactStiffness()

void CGeometrySolver::SetContactStiffness ( double  dContactStiffness)

Definition at line 75 of file GeometrySolver.cpp.

References m_dContactStiffness.

◆ SetDebug()

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

Definition at line 47 of file BasicVolumes.h.

◆ SetDisabledStiffness()

void CGeometrySolver::SetDisabledStiffness ( double  dDisabledStiffness)

Definition at line 80 of file GeometrySolver.cpp.

References m_dDisabledStiffness.

◆ SetLongitudinalBendingModulus()

void CGeometrySolver::SetLongitudinalBendingModulus ( double  dBendingModulus)

Definition at line 55 of file GeometrySolver.cpp.

References m_dLongitudinalBendingModulus, and m_PlateElements.

◆ SetPeriodic()

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

Definition at line 44 of file BasicVolumes.h.

Referenced by CreateSystem().

◆ SetRepeatVectorDeformation()

void TexGen::CTextileDeformer::SetRepeatVectorDeformation ( CLinearTransformation  RepeatDeformation)
inlineinherited

Definition at line 47 of file TextileDeformer.h.

◆ SetSeed()

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

Definition at line 41 of file BasicVolumes.h.

◆ SetTensileStress()

void CGeometrySolver::SetTensileStress ( double  dTensileStress)

Definition at line 45 of file GeometrySolver.cpp.

References m_dTensileStress, and m_PlateElements.

◆ SetTransverseBendingModulus()

void CGeometrySolver::SetTransverseBendingModulus ( double  dBendingModulus)

Definition at line 65 of file GeometrySolver.cpp.

References m_dTransverseBendingModulus, and m_PlateElements.

◆ SolveSystem()

int CGeometrySolver::SolveSystem ( )

◆ SplitLinesByLines()

int CBasicVolumes::SplitLinesByLines ( CMesh Mesh)
protectedinherited

◆ SplitLinesByNodes()

int CBasicVolumes::SplitLinesByNodes ( CMesh Mesh)
protectedinherited

◆ ValidProjectedMesh()

bool CBasicVolumes::ValidProjectedMesh ( )
protectedinherited

Member Data Documentation

◆ m_bAdjustThickness

bool TexGen::CGeometrySolver::m_bAdjustThickness
protected

Definition at line 149 of file GeometrySolver.h.

Referenced by CreateSystem(), SaveToVTK(), and SolveSystem().

◆ m_bCreatePeriodic

bool TexGen::CBasicVolumes::m_bCreatePeriodic
protectedinherited

◆ m_bDebug

bool TexGen::CBasicVolumes::m_bDebug
protectedinherited

Definition at line 124 of file BasicVolumes.h.

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

◆ m_dContactStiffness

double TexGen::CGeometrySolver::m_dContactStiffness
protected

Definition at line 144 of file GeometrySolver.h.

Referenced by SetContactStiffness(), and SolveSystem().

◆ m_dDisabledStiffness

double TexGen::CGeometrySolver::m_dDisabledStiffness
protected

Definition at line 143 of file GeometrySolver.h.

Referenced by SetDisabledStiffness(), and SolveSystem().

◆ m_dHeightTolerance

double TexGen::CGeometrySolver::m_dHeightTolerance
protected

Definition at line 142 of file GeometrySolver.h.

Referenced by CreateSurfaceMesh().

◆ m_dLongitudinalBendingModulus

double TexGen::CGeometrySolver::m_dLongitudinalBendingModulus
protected

Definition at line 145 of file GeometrySolver.h.

Referenced by CreatePlateElements(), and SetLongitudinalBendingModulus().

◆ m_DOFConstraints

vector<pair<int, double> > TexGen::CGeometrySolver::m_DOFConstraints
protected

Definition at line 140 of file GeometrySolver.h.

Referenced by CreateDebugSystem(), CreateSystem(), and SolveSystem().

◆ m_DOFLinks

vector<pair<int, int> > TexGen::CGeometrySolver::m_DOFLinks
protected

Definition at line 141 of file GeometrySolver.h.

Referenced by ApplyPeriodicBoundaryConditions(), and SolveSystem().

◆ m_DomainMesh

CMesh TexGen::CBasicVolumes::m_DomainMesh
protectedinherited

◆ m_dSeed

double TexGen::CBasicVolumes::m_dSeed
protectedinherited

◆ m_dTensileStress

double TexGen::CGeometrySolver::m_dTensileStress
protected

Definition at line 147 of file GeometrySolver.h.

Referenced by CreatePlateElements(), and SetTensileStress().

◆ m_dTolerance

double TexGen::CBasicVolumes::m_dTolerance
protectedinherited

◆ m_dTransverseBendingModulus

double TexGen::CGeometrySolver::m_dTransverseBendingModulus
protected

Definition at line 146 of file GeometrySolver.h.

Referenced by CreatePlateElements(), and SetTransverseBendingModulus().

◆ m_Nodes

vector<NODE> TexGen::CGeometrySolver::m_Nodes
protected

◆ m_PlateElements

vector<PLATE> TexGen::CGeometrySolver::m_PlateElements
protected

◆ m_ProjectedMesh

CMesh TexGen::CBasicVolumes::m_ProjectedMesh
protectedinherited

◆ m_ProjectedNodes

vector<PROJECTED_NODE> TexGen::CGeometrySolver::m_ProjectedNodes
protected

Definition at line 139 of file GeometrySolver.h.

Referenced by CreateSurfaceMesh(), CreateSystem(), and RaiseNodes().

◆ m_ProjectedRegions

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

◆ m_pTextile

CTextile* TexGen::CBasicVolumes::m_pTextile
protectedinherited

◆ m_RepeatDeformation

CLinearTransformation TexGen::CTextileDeformer::m_RepeatDeformation
protectedinherited

◆ m_Springs

vector<SPRING> TexGen::CGeometrySolver::m_Springs
protected

Definition at line 136 of file GeometrySolver.h.

Referenced by CreateDebugSystem(), CreateSystem(), SaveToVTK(), and SolveSystem().

◆ m_SurfaceMesh

CMesh TexGen::CGeometrySolver::m_SurfaceMesh
protected

◆ m_TriangleRegions

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

◆ m_YarnMeshes

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

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