45 CTextileWeave(
int iNumYYarns,
int iNumXYarns,
double dSpacing,
double dThickness);
50 virtual string GetType()
const {
return "CTextileWeave"; }
51 virtual void PopulateTiXmlElement(TiXmlElement &Element,
OUTPUT_TYPE OutputType);
58 void SetThickness(
double dThickness,
bool bAdjustYarnHeights =
true);
60 void SetXYarnWidths(
int iIndex,
double dWidth);
62 void SetYYarnWidths(
int iIndex,
double dWidth);
64 void SetXYarnHeights(
int iIndex,
double dHeight);
66 void SetYYarnHeights(
int iIndex,
double dHeight);
68 void SetXYarnSpacings(
int iIndex,
double dSpacing);
70 void SetYYarnSpacings(
int iIndex,
double dSpacing);
73 double GetXYarnWidths(
int iIndex)
const;
75 double GetYYarnWidths(
int iIndex)
const;
77 double GetXYarnHeights(
int iIndex)
const;
79 double GetYYarnHeights(
int iIndex)
const;
81 double GetXYarnSpacings(
int iIndex)
const;
83 double GetYYarnSpacings(
int iIndex)
const;
85 double GetXYarnGapSize(
int iIndex)
const;
87 double GetYYarnGapSize(
int iIndex)
const;
90 void SetXYarnWidths(
double dWidth);
92 void SetYYarnWidths(
double dWidth);
94 void SetXYarnHeights(
double dHeight);
96 void SetYYarnHeights(
double dHeight);
98 void SetXYarnSpacings(
double dSpacing);
100 void SetYYarnSpacings(
double dSpacing);
103 void SetYarnWidths(
double dWidth);
105 void SetYarnHeights(
double dHeight);
107 void SetYarnSpacings(
double dSpacing);
110 void SetGapSize(
double dGapSize);
113 void SetResolution(
int iResolution);
116 void AssignSectionMesh(
const CSectionMesh &SectionMesh);
119 virtual CDomainPlanes GetDefaultDomain(
bool bSheared =
false,
bool bAddedHeight =
true );
125 void AssignDefaultDomain(
bool bSheared =
false,
bool bAddedHeight =
true );
136 bool FlattenYarns(
double dFlatLevel,
int iUpDownBoth=0);
138 virtual string GetDefaultName()
const;
141 virtual void RefineTextile(
bool bCorrectWidths =
true,
bool bCorrectInterference =
true,
bool bPeriodic =
true ){};
142 void CorrectEdgeInterference();
147 double GetWidth()
const;
148 double GetHeight()
const;
154 double GetAverageYarnWidth()
const;
155 const vector<PATTERN2D> &GetCell(
int x,
int y)
const;
157 vector<CYarn*> GetXYarns(
int iIndex);
158 vector<CYarn*> GetYYarns(
int iIndex);
159 int GetYarnIndex(
int x,
int y,
int z)
const;
184 virtual bool BuildTextile()
const;
191 virtual void CorrectInterference()
const;
192 bool NeedsMidSection(
int iYarn,
int iSection)
const;
200 void CorrectYarnWidths()
const;
205 pair<int, int> GetCellCoordinates(
int iIndex)
const;
206 vector<PATTERN2D> &GetCell(
int x,
int y);
Domain implementation described using planes, the simplest of which would be a box.
Object container to help handle memory management issues.
Abstract base class to create a 2D mesh of a section.
Represents a textile cell containing yarns.
Represents a woven textile.
virtual string GetType() const
Derived class should return the class name.
double m_dFabricThickness
CObjectContainer< CSectionMesh > m_pSectionMesh
virtual CTextile * Copy() const
CPatternDraft m_PatternDraft
Class for generating pattern draft from weave pattern.
vector< vector< PATTERN2D > > m_Pattern
int GetResolution() const
CPatternDraft & GetPatternDraft()
double GetGapSize() const
vector< vector< int > > m_XYarns
vector< vector< int > > m_YYarns
virtual void RefineTextile(bool bCorrectWidths=true, bool bCorrectInterference=true, bool bPeriodic=true)
Call refine functions for textile weave. Currently only defined for 2D weave to allow refinement afte...
vector< YARNDATA > m_XYarnData
double GetFabricThickness() const
virtual void ConvertToPatternDraft()
double GetAverageYarnSpacing() const
vector< YARNDATA > m_YYarnData
Namespace containing a series of customised math operations not found in the standard c++ library.
Data structure to keep track of yarn parameters.