81 CTextile3DWeave(
int iNumXYarns,
int iNumYYarns,
double dXSpacing,
double dYSpacing,
82 double dXHeight,
double dYHeight,
bool bRefine =
false);
87 virtual string GetType()
const {
return "CTextile3DWeave"; }
88 virtual void PopulateTiXmlElement(TiXmlElement &Element,
OUTPUT_TYPE OutputType);
94 void SetThickness(
double dThickness);
96 void SetMaxVolFraction(
double dVolFraction );
98 void SetXYarnWidths(
int iIndex,
double dWidth);
100 void SetYYarnWidths(
int iIndex,
double dWidth);
102 void SetXYarnHeights(
int iIndex,
double dHeight);
104 void SetYYarnHeights(
int iIndex,
double dHeight);
106 void SetXYarnSpacings(
int iIndex,
double dSpacing);
108 void SetYYarnSpacings(
int iIndex,
double dSpacing);
112 double GetXYarnWidths(
int iIndex)
const;
114 double GetYYarnWidths(
int iIndex)
const;
116 double GetXYarnHeights(
int iIndex)
const;
118 double GetYYarnHeights(
int iIndex)
const;
120 double GetXYarnSpacings(
int iIndex)
const;
122 double GetYYarnSpacings(
int iIndex)
const;
124 double GetXYarnGapSize(
int iIndex)
const;
126 double GetYYarnGapSize(
int iIndex)
const;
129 void SetXYarnWidths(
double dWidth);
131 void SetYYarnWidths(
double dWidth);
133 void SetWarpYarnWidths(
double dWidth );
135 void SetBinderYarnWidths(
double dWidth );
137 void SetXYarnHeights(
double dHeight);
139 void SetYYarnHeights(
double dHeight);
141 void SetWarpYarnHeights(
double dHeight );
143 void SetBinderYarnHeights(
double dHeight );
145 void SetXYarnSpacings(
double dSpacing);
147 void SetYYarnSpacings(
double dSpacing);
149 void SetWarpYarnSpacings(
double dWidth );
151 void SetBinderYarnSpacings(
double dWidth );
164 void SetYarnLinearDensity(
int iYarnType,
double dValue,
string Units =
"kg/m" );
170 void SetFibreDensity(
int iYarnType,
double dValue,
string Units =
"kg/m^3" );
176 void SetFibreArea(
int iYarnType,
double dValue,
string Units =
"m^2" );
181 void SetFibresPerYarn(
int iYarnType,
int iNumFibres );
187 void SetFibreDiameter(
int iYarnType,
double dValue,
string Units =
"m" );
194 double GetFibreArea(
int iYarnType,
string Units );
197 void SetYarnWidths(
double dWidth);
199 void SetYarnHeights(
double dHeight);
201 void SetYarnSpacings(
double dSpacing);
205 void AddYLayers(
int x,
int iNumberLayers);
207 void AddXLayers(
int y,
int iNumberLayers);
209 void AddYLayers(
int iNumberLayers = 1);
211 void AddXLayers(
int iNumberLayers = 1);
213 void AddXYarn(
int y,
PATTERN3D Pattern );
215 void AddYYarn(
int x,
PATTERN3D Pattern );
219 void AddBinderLayer();
221 void AddNoYarnLayer();
223 void DeleteYLayers(
int x,
int iNumberLayers);
225 void DeleteXLayers(
int y,
int iNumberLayers);
227 void DeleteYLayers(
int iNumberLayers = 1);
229 void DeleteXLayers(
int iNumberLayers = 1);
231 void SwapPosition(
int x,
int y,
int iLevel1,
int iLevel2);
234 int GetNumYLayers(
int x)
const;
236 int GetNumXLayers(
int y)
const;
238 int GetMaxNumLayers()
const;
240 virtual int GetNumBinderLayers()
const;
243 void GetWarpYarnInfo(
int& iNumBinderYarns,
int& iNumWarpYarns,
int& iBinderRatio,
int& iWarpRatio,
YARNDATA& AveWarp,
YARNDATA& AveBinder )
const;
246 bool IsBinderYarn(
int index )
const;
248 int GetXYarnIndex(
int YarnInd );
251 int FindNextCellIndex(
int index )
const;
253 int FindNextYCellIndex(
int Starti,
int j,
int k )
const;
255 int FindPrevYCellIndex(
int Starti,
int j,
int k )
const;
258 void SetWarpRatio(
int iWarpRatio );
260 void SetBinderRatio(
int iBinderRatio );
262 void SetBinderPattern();
264 void SetBinderPattern( vector<bool> &BinderPattern );
267 virtual void SetupLayers(
int iNumWarpLayers,
int iNumWeftLayers,
int iNumBinderLayers = 1 );
270 void SetGapSize(
double dGapSize);
273 void SetResolution(
int iResolution);
276 void AssignSectionMesh(
const CSectionMesh &SectionMesh);
279 CDomainPlanes GetDefaultDomain(
bool bAddedDomainHeight =
true );
285 void AssignDefaultDomain(
bool bAddedDomainHeight =
true );
287 void SetDomainZValues();
289 virtual void FindMinMaxZ(
double& dMinZ,
double& dMaxZ );
293 void CheckUpVectors(
int WarpIndex,
bool Yarn =
PATTERN3D_XYARN,
bool bYarnsIndex =
false )
const;
295 virtual string GetDefaultName()
const;
302 virtual void SetupWeftRow( vector<int>& Layers, vector<int>& Row,
int NumWarps,
int Weft );
306 void ShapeWeftYarns()
const;
308 virtual void ConvertToPatternDraft(
int iWeftOrder =
BOTTOM_TO_TOP );
309 bool NoYarnCell( vector<PATTERN3D> &Cell );
312 virtual double GetWidth()
const;
313 double GetHeight()
const;
320 double GetAverageYarnWidth()
const;
321 const vector<PATTERN3D> &GetCell(
int x,
int y)
const;
323 vector<CYarn*> GetXYarns(
int iIndex);
324 vector<CYarn*> GetYYarns(
int iIndex);
325 int GetYarnIndex(
int x,
int y,
int z)
const;
331 double GetAverageWeftYarnWidth()
const;
332 double GetAverageWeftYarnHeight()
const;
333 vector<PATTERN3D> &GetCell(
int x,
int y);
337 void CalculateReedDesign(
string Filename );
357 virtual bool BuildTextile()
const;
373 CSection* GetCrossSection(
int YarnIndex,
int Node = -1 )
const;
376 XYZ GetUpVector(
XYZ CheckNodes[],
bool bYarn )
const;
383 void InsertBinderNode(
CSectionPowerEllipse* YarnSection,
double t,
XYZ& WeftNode,
int& CurrentNode,
int BinderYarnIndex,
double Offset,
bool bInsert =
true )
const;
391 void InsertBinderNode(
CSection* YarnSection,
double t,
XYZ& WeftNode,
int& CurrentNode,
int BinderYarnIndex,
double Offset,
bool bInsert =
true )
const;
394 void ReplaceLastNode(
int BinderYarnIndex,
XYZ& NewNode,
XYZ& BinderNode )
const;
400 bool AdjustPowerEllipseSectionWidth(
double &HeightReduction,
double &MaxWidth,
double TargetArea,
CSectionPowerEllipse* YarnSection )
const;
402 void FindPowerEllipseSectionHeight(
double& MaxHeight,
double& TargetArea,
CSectionPowerEllipse* YarnSection )
const;
404 bool AdjustPowerEllipsePower(
double &HeightReduction,
double TargetArea,
CSectionPowerEllipse* YarnSection,
double MinPower )
const;
408 void SetYarnProperties(
CYarn& Yarn,
int iType )
const;
410 pair<int, int> GetCellCoordinates(
int iIndex)
const;
412 int FindWeftHeight(
const vector<PATTERN3D>& Cell )
const;
414 int AddWeftNodes(
int CurrentNode,
int XNode,
int i,
int j )
const;
416 void InsertWeftNode(
CSection* YarnSection,
double t,
XYZ& WarpNode,
int& CurrentNode,
int WeftYarnIndex,
double Offset,
bool bInsert =
true )
const;
418 int FindWarpAboveIndex(
const vector<PATTERN3D> &Cell,
int iIndex )
const;
419 int FindWarpBelowIndex(
const vector<PATTERN3D> &Cell,
int iIndex )
const;
421 void RemoveCell(
int x,
int y);
423 bool CheckCells()
const;
426 bool BinderYarns()
const;
Domain implementation described using planes, the simplest of which would be a box.
Object container to help handle memory management issues.
Class to store properties related to a textile and/or yarn.
Abstract base class respresenting a yarn cross-section.
Abstract base class to create a 2D mesh of a section.
Represents a 3D woven textile.
double GetAverageYarnSpacing() const
void SetWeftYarnPower(double dPower)
Set the power for power ellipse section for yarns parallel to Y axis.
vector< YARNDATA > m_XYarnData
vector< vector< int > > m_XYarns
double m_dFabricThickness
double GetGapSize() const
void SetBinderYarnPower(double dPower)
Set the power for power ellipse section for yarns parallel to X axis in binder yarn positions.
void SetWarpYarnPower(double dPower)
Set the power for power ellipse section for yarns parallel to X axis in warp yarn positions.
double GetWarpPower() const
virtual string GetType() const
Derived class should return the class name.
void SetWeftRepeat(bool WeftRepeat)
double m_dMaxVolumeFraction
vector< bool > m_BinderPattern
CPatternDraft & GetPatternDraft()
virtual double GetAverageWeftYarnSpacing() const
double GetBinderPower() const
vector< YARNDATA > m_YYarnData
vector< vector< PATTERN3D > > m_Pattern
int GetResolution() const
virtual CTextile * Copy() const
vector< vector< int > > m_YYarns
double GetWeftPower() const
CPatternDraft m_PatternDraft
Class for generating pattern draft from weave pattern.
CObjectContainer< CSectionMesh > m_pSectionMesh
double GetMaxVolFraction() const
double GetFabricThickness() const
Represents a textile cell containing yarns.
Represents a yarn consisting of master nodes, section and interpolation function.
Namespace containing a series of customised math operations not found in the standard c++ library.
Struct for representing points in 3D space.
Data structure to keep track of yarn parameters.