TexGen
TextileLayerToLayer.h
Go to the documentation of this file.
1/*=============================================================================
2TexGen: Geometric textile modeller.
3Copyright (C) 2011 Louise Brown
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program; if not, write to the Free Software
16Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17=============================================================================*/
18
19#pragma once
20#include "Textile3DWeave.h"
21#include "SectionPowerEllipse.h"
22
23namespace TexGen
24{
25 using namespace std;
26
27
31 {
32 public:
33
35
44 CTextileLayerToLayer(int iNumXYarns, int iNumYYarns, double dXSpacing, double dYSpacing,
45 double dXHeight, double dYHeight, int iNumBinderLayers, bool bShapeBinders = true);
46 CTextileLayerToLayer(TiXmlElement &Element);
47 virtual ~CTextileLayerToLayer(void);
48
49 virtual CTextile* Copy() const { return new CTextileLayerToLayer(*this); }
50 virtual string GetType() const { return "CTextileLayerToLayer"; }
51 virtual void PopulateTiXmlElement(TiXmlElement &Element, OUTPUT_TYPE OutputType);
52
54
59 virtual void SetupLayers( int iNumWarpLayers, int iNumWeftLayers, int iNumBinderLayers = 1 );
61 virtual bool BuildTextile() const;
62 bool BuildLayerToLayerTextile() const;
63
65
67 void SetBinderPosition( int x, int y, int zOffset );
69
73 void MoveBinderYarns( int x, int y, int iLevel1, int iLevel2 );
75 int GetBinderOffset( int x, int y );
77 virtual int GetNumBinderLayers() const;
79 void ShapeBinderYarns() const;
80
81 virtual void ConvertToPatternDraft( int iWeftOrder = BOTTOM_TO_TOP );
82
83 protected:
85 int FindTopBinderYarn( vector<PATTERN3D>& Cell );
86
88 int AddBinderNodes( int CurrentNode, int i, int j, int Height ) const;
89
90 virtual int FindBinderHeight( const vector<PATTERN3D>& Cell, int Height ) const;
91
94 };
95}; // namespace TexGen
#define CLASS_DECLSPEC
Definition: Misc.h:35
Represents a 3D woven textile.
Represents a textile cell containing yarns.
Definition: Textile.h:39
virtual string GetType() const
Derived class should return the class name.
virtual CTextile * Copy() const
Namespace containing a series of customised math operations not found in the standard c++ library.
@ BOTTOM_TO_TOP
OUTPUT_TYPE
Definition: Misc.h:105