TexGen
|
#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 |
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.
CPatternDraft::CPatternDraft | ( | ) |
Definition at line 25 of file PatternDraft.cpp.
|
virtual |
Definition at line 30 of file PatternDraft.cpp.
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().
void CPatternDraft::ClearWeavePattern | ( | ) |
Definition at line 39 of file PatternDraft.cpp.
References m_WeavePattern.
Referenced by TexGen::CTextileWeave2D::ConvertToPatternDraft(), TexGen::CTextile3DWeave::ConvertToPatternDraft(), TexGen::CTextileLayerToLayer::ConvertToPatternDraft(), and TexGen::CTextileOrthogonal::ConvertToPatternDraft().
|
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().
|
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().
|
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().
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.
|
inline |
Definition at line 47 of file PatternDraft.h.
|
inline |
Definition at line 46 of file PatternDraft.h.
|
inline |
Definition at line 40 of file PatternDraft.h.
int CPatternDraft::GetNumWarps | ( | ) |
Definition at line 52 of file PatternDraft.cpp.
References m_WeavePattern.
int CPatternDraft::GetNumWefts | ( | ) |
Definition at line 59 of file PatternDraft.cpp.
References m_WeavePattern.
Referenced by CreateChainDraft().
|
inline |
Definition at line 45 of file PatternDraft.h.
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().
|
protected |
Definition at line 63 of file PatternDraft.h.
Referenced by CreateChainDraft(), and Output().
|
protected |
Definition at line 60 of file PatternDraft.h.
Referenced by CreateChainDraft(), CreateColumnsVector(), and CreateHeddleDraft().
|
protected |
Definition at line 62 of file PatternDraft.h.
Referenced by CreateChainDraft(), CreateHeddleDraft(), and Output().
|
protected |
Definition at line 64 of file PatternDraft.h.
Referenced by CreateChainDraft(), CreateColumnsVector(), CreateHeddleDraft(), and Output().
|
protected |
Definition at line 61 of file PatternDraft.h.
Referenced by CreateColumnsVector(), and CreateHeddleDraft().
|
protected |
Definition at line 59 of file PatternDraft.h.
Referenced by AddRow(), ClearWeavePattern(), CreateChainDraft(), CreateColumnsVector(), CreatePatternDraft(), GetNumWarps(), GetNumWefts(), and Output().