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

#include <PatternDraft.h>

Public Member Functions

 CPatternDraft ()
 
virtual ~CPatternDraft (void)
 
void AddRow (string Row)
 Add a row representing one weft insertion '1' indicates warp up, '0' warp down and '2' no yarn. More...
 
void ClearWeavePattern ()
 
int GetNumWarps ()
 
int GetNumWefts ()
 
int GetNumHeddles ()
 
void Output (string Filename)
 Output the complete pattern draft in a text file. More...
 
bool CreatePatternDraft ()
 Calculates the pattern draft based on the weave pattern. More...
 
const vector< string > & GetWeavePattern ()
 
const vector< int > & GetHeddleDraft ()
 
const vector< bool > & GetChainDraft ()
 

Protected Member Functions

void CreateColumnsVector ()
 Creates vector of strings where each string represents one unique column of the weave pattern. More...
 
bool CreateHeddleDraft ()
 Create heddle draft. Stored as vector of int. More...
 
bool CreateChainDraft ()
 

Protected Attributes

vector< string > m_WeavePattern
 
vector< string > m_Columns
 
vector< string > m_UniqueColumns
 
vector< int > m_HeddleDraft
 
vector< bool > m_ChainDraft
 
int m_NumHeddles
 

Detailed Description

Class used to calculate a pattern draft from a weave pattern Also used to set up 3D model from a weave pattern

Definition at line 29 of file PatternDraft.h.

Constructor & Destructor Documentation

◆ CPatternDraft()

CPatternDraft::CPatternDraft ( )

Definition at line 25 of file PatternDraft.cpp.

◆ ~CPatternDraft()

CPatternDraft::~CPatternDraft ( void  )
virtual

Definition at line 30 of file PatternDraft.cpp.

Member Function Documentation

◆ AddRow()

void CPatternDraft::AddRow ( string  Row)

Add a row representing one weft insertion '1' indicates warp up, '0' warp down and '2' no yarn.

Definition at line 44 of file PatternDraft.cpp.

References m_WeavePattern.

Referenced by TexGen::CTextileWeave2D::ConvertToPatternDraft(), TexGen::CTextile3DWeave::ConvertToPatternDraft(), TexGen::CTextileLayerToLayer::ConvertToPatternDraft(), and TexGen::CTextileOrthogonal::ConvertToPatternDraft().

◆ ClearWeavePattern()

void CPatternDraft::ClearWeavePattern ( )

◆ CreateChainDraft()

bool CPatternDraft::CreateChainDraft ( )
protected

Chain draft calculated from weave pattern and heddle draft. Stored as vector of bools Width = number of heddles Height = number of wefts

Definition at line 141 of file PatternDraft.cpp.

References GetNumWefts(), m_ChainDraft, m_Columns, m_HeddleDraft, m_NumHeddles, and m_WeavePattern.

Referenced by CreatePatternDraft().

◆ CreateColumnsVector()

void CPatternDraft::CreateColumnsVector ( )
protected

Creates vector of strings where each string represents one unique column of the weave pattern.

Definition at line 87 of file PatternDraft.cpp.

References m_Columns, m_NumHeddles, m_UniqueColumns, and m_WeavePattern.

Referenced by CreatePatternDraft().

◆ CreateHeddleDraft()

bool CPatternDraft::CreateHeddleDraft ( )
protected

Create heddle draft. Stored as vector of int.

Heddle draft entry corresponds to the index into the unique columns which matches the column in the weave pattern

Definition at line 121 of file PatternDraft.cpp.

References m_Columns, m_HeddleDraft, m_NumHeddles, and m_UniqueColumns.

Referenced by CreatePatternDraft().

◆ CreatePatternDraft()

bool CPatternDraft::CreatePatternDraft ( )

Calculates the pattern draft based on the weave pattern.

Definition at line 66 of file PatternDraft.cpp.

References CreateChainDraft(), CreateColumnsVector(), CreateHeddleDraft(), m_WeavePattern, and TGERROR.

◆ GetChainDraft()

const vector< bool > & TexGen::CPatternDraft::GetChainDraft ( )
inline

Definition at line 47 of file PatternDraft.h.

◆ GetHeddleDraft()

const vector< int > & TexGen::CPatternDraft::GetHeddleDraft ( )
inline

Definition at line 46 of file PatternDraft.h.

◆ GetNumHeddles()

int TexGen::CPatternDraft::GetNumHeddles ( )
inline

Definition at line 40 of file PatternDraft.h.

◆ GetNumWarps()

int CPatternDraft::GetNumWarps ( )

Definition at line 52 of file PatternDraft.cpp.

References m_WeavePattern.

◆ GetNumWefts()

int CPatternDraft::GetNumWefts ( )

Definition at line 59 of file PatternDraft.cpp.

References m_WeavePattern.

Referenced by CreateChainDraft().

◆ GetWeavePattern()

const vector< string > & TexGen::CPatternDraft::GetWeavePattern ( )
inline

Definition at line 45 of file PatternDraft.h.

◆ Output()

void CPatternDraft::Output ( string  Filename)

Output the complete pattern draft in a text file.

Definition at line 164 of file PatternDraft.cpp.

References TexGen::AddExtensionIfMissing(), m_ChainDraft, m_HeddleDraft, m_NumHeddles, m_WeavePattern, and Output().

Referenced by Output().

Member Data Documentation

◆ m_ChainDraft

vector<bool> TexGen::CPatternDraft::m_ChainDraft
protected

Definition at line 63 of file PatternDraft.h.

Referenced by CreateChainDraft(), and Output().

◆ m_Columns

vector<string> TexGen::CPatternDraft::m_Columns
protected

Definition at line 60 of file PatternDraft.h.

Referenced by CreateChainDraft(), CreateColumnsVector(), and CreateHeddleDraft().

◆ m_HeddleDraft

vector<int> TexGen::CPatternDraft::m_HeddleDraft
protected

Definition at line 62 of file PatternDraft.h.

Referenced by CreateChainDraft(), CreateHeddleDraft(), and Output().

◆ m_NumHeddles

int TexGen::CPatternDraft::m_NumHeddles
protected

Definition at line 64 of file PatternDraft.h.

Referenced by CreateChainDraft(), CreateColumnsVector(), CreateHeddleDraft(), and Output().

◆ m_UniqueColumns

vector<string> TexGen::CPatternDraft::m_UniqueColumns
protected

Definition at line 61 of file PatternDraft.h.

Referenced by CreateColumnsVector(), and CreateHeddleDraft().

◆ m_WeavePattern

vector<string> TexGen::CPatternDraft::m_WeavePattern
protected

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