TexGen
Core
TexGen.h
Go to the documentation of this file.
1
/*=============================================================================
2
TexGen: Geometric textile modeller.
3
Copyright (C) 2006 Martin Sherburn
4
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License
7
as published by the Free Software Foundation; either version 2
8
of the License, or (at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
=============================================================================*/
19
20
#pragma once
21
#include "
Misc.h
"
22
#include "
Logger.h
"
23
#include "
ObjectContainer.h
"
24
#include "
Singleton.h
"
25
#include "
Section.h
"
26
#include "
SectionEllipse.h
"
27
#include "
SectionPowerEllipse.h
"
28
#include "
SectionLenticular.h
"
29
#include "
SectionBezier.h
"
30
#include "
SectionPolygon.h
"
31
#include "
SectionHybrid.h
"
32
#include "
SectionRotated.h
"
33
#include "
SectionScaled.h
"
34
#include "
SectionRectangle.h
"
35
#include "
Textile.h
"
36
#include "
TextileWeave.h
"
37
#include "
TextileWeave2D.h
"
38
#include "
TextileWeave3D.h
"
39
#include "
Domain.h
"
40
#include "
DomainPlanes.h
"
41
#include "
DomainPrism.h
"
42
#include "
Mesher.h
"
43
#include "
TextileDeformer.h
"
44
#include "
TextileDeformerVolumeMesh.h
"
45
#include "
GeometrySolver.h
"
46
#include "
Simulation.h
"
47
#include "
SimulationAbaqus.h
"
48
#include "
VoxelMesh.h
"
49
#include "
RectangularVoxelMesh.h
"
50
#include "
ShearedVoxelMesh.h
"
51
#include "
StaggeredVoxelMesh.h
"
52
#include "
OctreeVoxelMesh.h
"
53
#include "
RotatedVoxelMesh.h
"
54
#include "
PrismVoxelMesh.h
"
55
#include "
TetgenMesh.h
"
56
#include "
SurfaceMesh.h
"
57
#include "
PeriodicBoundaries.h
"
58
#include "
Textile3DWeave.h
"
59
#include "
TextileOrthogonal.h
"
60
#include "
TextileAngleInterlock.h
"
61
#include "
TextileLayerToLayer.h
"
62
#include "
TextileDecoupledLToL.h
"
63
#include "
TextileOffsetAngleInterlock.h
"
64
#include "
ShearedPeriodicBoundaries.h
"
65
#include "
StaggeredPeriodicBoundaries.h
"
66
#include "
RotatedPeriodicBoundaries.h
"
67
#include "
ShearedTextileWeave2D.h
"
68
#include "
TextileLayered.h
"
69
#include "
PatternDraft.h
"
70
#include "
AdjustMeshInterference.h
"
71
#include "
Materials.h
"
72
#include "
ShellElementExport.h
"
73
#include "
MeshDomainPlane.h
"
74
76
#define TEXGEN (CTexGen::GetInstance())
77
78
namespace
TexGen
79
{
80
class
CLogger;
81
82
using namespace
std;
83
85
class
CLASS_DECLSPEC
CTexGen
:
public
CSingleton
<CTexGen>
86
{
87
public
:
88
89
CTexGen
(
void
);
90
~CTexGen
(
void
);
91
93
96
string
GetName(
const
CTextile
* pTextile)
const
;
97
99
103
CTextile
* GetTextile(
string
TextileName =
""
);
105
111
bool
AddTextile(
string
TextileName,
const
CTextile
&Textile,
bool
bOverwrite =
false
);
113
117
string
AddTextile(
const
CTextile
&Textile);
119
123
bool
DeleteTextile(
string
TextileName);
125
void
PopulateTiXmlElement(TiXmlElement &Element,
string
TextileName =
""
,
OUTPUT_TYPE
OutputType =
OUTPUT_STANDARD
);
127
bool
LoadTiXmlElement(TiXmlElement &Element);
129
134
void
SaveToXML(
string
FileName,
string
TextileName =
""
,
OUTPUT_TYPE
OutputType =
OUTPUT_STANDARD
);
136
bool
ReadFromXML(
string
FileName);
138
void
DeleteTextiles();
140
void
SetLogger(
const
CLogger
&Logger);
142
void
SetTextileCallback(
void
(*pTextileCallback)(
string
TextileName,
bool
bAdded));
144
string
GetVersion()
const
;
146
void
SetMessages(
bool
bMessagesOn,
const
CLogger
&Logger );
148
void
SetMessages(
bool
bMessagesOn );
150
bool
GetMessagesOn
( )
const
{
return
m_bMessagesOn; }
152
void
GetTextileNames( vector<string> &Names );
153
154
// Accessor methods
155
const
map<string, CTextile*> &
GetTextiles
()
const
{
return
m_Textiles; }
156
CLogger
&
GetLogger
()
const
{
return
*m_pLogger; }
157
158
protected
:
159
map<string, CTextile*>
m_Textiles
;
160
CLogger
*
m_pLogger
;
161
bool
m_bMessagesOn
;
// Messages on/off
162
void (*m_pTextileCallback)(
string
TextileName,
bool
bAdded);
163
int
m_iMajorVersion
;
164
int
m_iMinorVersion
;
165
int
m_iRevision
;
166
};
167
168
};
// namespace TexGen
169
170
AdjustMeshInterference.h
Domain.h
DomainPlanes.h
DomainPrism.h
GeometrySolver.h
Logger.h
Materials.h
MeshDomainPlane.h
Mesher.h
Misc.h
CLASS_DECLSPEC
#define CLASS_DECLSPEC
Definition:
Misc.h:35
ObjectContainer.h
OctreeVoxelMesh.h
PatternDraft.h
PeriodicBoundaries.h
PrismVoxelMesh.h
RectangularVoxelMesh.h
RotatedPeriodicBoundaries.h
RotatedVoxelMesh.h
Section.h
SectionBezier.h
SectionEllipse.h
SectionHybrid.h
SectionLenticular.h
SectionPolygon.h
SectionPowerEllipse.h
SectionRectangle.h
SectionRotated.h
SectionScaled.h
ShearedPeriodicBoundaries.h
ShearedTextileWeave2D.h
ShearedVoxelMesh.h
ShellElementExport.h
Simulation.h
SimulationAbaqus.h
Singleton.h
StaggeredPeriodicBoundaries.h
StaggeredVoxelMesh.h
SurfaceMesh.h
TetgenMesh.h
Textile3DWeave.h
Textile.h
TextileAngleInterlock.h
TextileDecoupledLToL.h
TextileDeformer.h
TextileDeformerVolumeMesh.h
TextileLayerToLayer.h
TextileLayered.h
TextileOffsetAngleInterlock.h
TextileOrthogonal.h
TextileWeave2D.h
TextileWeave3D.h
TextileWeave.h
VoxelMesh.h
TexGen::CLogger
Abstract base class to act as an interface between texgen and the logger.
Definition:
Logger.h:85
TexGen::CSingleton
Template used as a base class for creating singletons.
Definition:
Singleton.h:32
TexGen::CTexGen
Singleton class holding the Textiles in a database.
Definition:
TexGen.h:86
TexGen::CTexGen::m_Textiles
map< string, CTextile * > m_Textiles
List of textiles created.
Definition:
TexGen.h:159
TexGen::CTexGen::m_pLogger
CLogger * m_pLogger
Logger used to keep track of how error messages and log messages displayed or stored.
Definition:
TexGen.h:160
TexGen::CTexGen::m_iRevision
int m_iRevision
Definition:
TexGen.h:165
TexGen::CTexGen::m_iMinorVersion
int m_iMinorVersion
Definition:
TexGen.h:164
TexGen::CTexGen::GetMessagesOn
bool GetMessagesOn() const
Get messages on/off.
Definition:
TexGen.h:150
TexGen::CTexGen::m_iMajorVersion
int m_iMajorVersion
Definition:
TexGen.h:163
TexGen::CTexGen::m_bMessagesOn
bool m_bMessagesOn
Definition:
TexGen.h:161
TexGen::CTexGen::GetLogger
CLogger & GetLogger() const
Definition:
TexGen.h:156
TexGen::CTexGen::GetTextiles
const map< string, CTextile * > & GetTextiles() const
Definition:
TexGen.h:155
TexGen::CTextile
Represents a textile cell containing yarns.
Definition:
Textile.h:39
TexGen
Namespace containing a series of customised math operations not found in the standard c++ library.
Definition:
AdjustMeshInterference.h:27
TexGen::OUTPUT_TYPE
OUTPUT_TYPE
Definition:
Misc.h:105
TexGen::OUTPUT_STANDARD
@ OUTPUT_STANDARD
Definition:
Misc.h:107
Generated by
1.9.2