TexGen
ShellElementExport.h
Go to the documentation of this file.
1/*=============================================================================
2TexGen: Geometric textile modeller.
3Copyright (C) 2019 Louise Brown
4
5This program is free software; you can redistribute it and/or
6modify it under the terms of the GNU General Public License
7as published by the Free Software Foundation; either version 2
8of the License, or (at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18=============================================================================*/
19
20#pragma once
21
22#include <iterator>
23#include "Mesh.h"
24#include "Materials.h"
25
26namespace TexGen
27{
28 using namespace std;
29
32 {
33 public:
34 CShellElementExport( bool bWholeSurfaces, bool bTrimSurface = true );
36
38
43 bool SaveShellElementToABAQUS(string Filename, CTextile& Textile );
44
45 const CMesh &GetMesh() { return m_SurfaceMesh; }
46
47 protected:
49 void GetElementInfo( CTextile& Textile );
51 void BuildIndexOffsets();
52
53 typedef int YarnNumber;
54 void CreateSurfaceDefinitions( int iNumYarns, const vector<XYZ> &Repeats, map<string, vector< pair<int,int> > > &SurfaceDefinitions);
55 void GetYarnSurfaces(int iYarn, const vector<XYZ> &Repeats, vector<pair<int,int> > &UpperFaces, vector<pair<int,int> > &LowerFaces );
56 void GetYarnSurface(int iYarn, vector<pair<int,int> > &Elements );
57 void CreateSurfaces(ostream &Output, map< string, vector<pair<YarnNumber,int> > > &SurfaceDefinitions);
58 int GetGlobalElementIndex(pair<YarnNumber,int> Element);
59
60 void CreateContacts(ostream &Output, const CTextile &Textile);
61 void CreateContacts(ostream &Output, const CTextileWeave &Weave);
62 void CreateContacts(ostream &Output, const CTextile3DWeave &Weave);
63 void OutputContacts( ostream &Output, set<pair<int, int> > &Contacts );
64 void CreateContact(ostream &Output, string Name1, string Name2, string InteractionName);
65 void CreateInteractions( ostream &Output );
66
68 vector<CMesh> m_YarnMeshes;
69 vector<POINT_INFO> m_ElementInfo;
70
71 map<YarnNumber, int> m_ElementIndexOffsets;
72 map<YarnNumber, int> m_NodeIndexOffsets;
73
79
82 };
83
84}; // namespace TexGen
#define CLASS_DECLSPEC
Definition: Misc.h:35
Defines the nodes and elements of a surface or volume mesh.
Definition: Mesh.h:58
Class for exporting surface mesh to ABAQUS.
map< YarnNumber, int > m_NodeIndexOffsets
CTextileMaterials * m_Materials
Class for export of material properties.
bool m_bTrimSurface
True if surfaces to be trimmed to domain.
map< YarnNumber, int > m_ElementIndexOffsets
bool m_bExportDomain
True if domain surface is to be exported.
vector< POINT_INFO > m_ElementInfo
Represents a 3D woven textile.
Represents a textile cell containing yarns.
Definition: Textile.h:39
Represents a woven textile.
Definition: TextileWeave.h:41
Namespace containing a series of customised math operations not found in the standard c++ library.