TexGen
Core
TextileLayerToLayer.h
Go to the documentation of this file.
1
/*=============================================================================
2
TexGen: Geometric textile modeller.
3
Copyright (C) 2011 Louise Brown
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License
6
as published by the Free Software Foundation; either version 2
7
of the License, or (at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, 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
23
namespace
TexGen
24
{
25
using namespace
std;
26
27
30
class
CLASS_DECLSPEC
CTextileLayerToLayer
:
public
CTextile3DWeave
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
92
int
m_iNumBinderLayers
;
93
bool
m_bShapeBinders
;
94
};
95
};
// namespace TexGen
CLASS_DECLSPEC
#define CLASS_DECLSPEC
Definition:
Misc.h:35
SectionPowerEllipse.h
Textile3DWeave.h
TexGen::CTextile3DWeave
Represents a 3D woven textile.
Definition:
Textile3DWeave.h:68
TexGen::CTextile
Represents a textile cell containing yarns.
Definition:
Textile.h:39
TexGen::CTextileLayerToLayer
Definition:
TextileLayerToLayer.h:31
TexGen::CTextileLayerToLayer::GetType
virtual string GetType() const
Derived class should return the class name.
Definition:
TextileLayerToLayer.h:50
TexGen::CTextileLayerToLayer::m_bShapeBinders
bool m_bShapeBinders
Definition:
TextileLayerToLayer.h:93
TexGen::CTextileLayerToLayer::Copy
virtual CTextile * Copy() const
Definition:
TextileLayerToLayer.h:49
TexGen::CTextileLayerToLayer::m_iNumBinderLayers
int m_iNumBinderLayers
Definition:
TextileLayerToLayer.h:92
TexGen
Namespace containing a series of customised math operations not found in the standard c++ library.
Definition:
AdjustMeshInterference.h:27
TexGen::BOTTOM_TO_TOP
@ BOTTOM_TO_TOP
Definition:
Textile3DWeave.h:49
TexGen::OUTPUT_TYPE
OUTPUT_TYPE
Definition:
Misc.h:105
Generated by
1.9.2