TexGen
Exporter.h
Go to the documentation of this file.
1class TopoDS_Shape;
2class TopTools_HSequenceOfShape;
3class TopoDS_Wire;
4
5#include "../Core/PrecompiledHeaders.h"
6#include "../Core/TexGen.h"
7
8using namespace std;
9
10namespace TexGen
11{
12 class CTextile; // This makes sure that swig knows CTextile is part of the TexGen namespace...
15 {
16 public:
17 CExporter();
18 ~CExporter();
19
21 bool OutputDomainToIGES(char szFileName[], CDomain &Domain);
23 bool OutputDomainToSTEP(char szFileName[], CDomain &Domain);
24
26 bool OutputTextileToIGES(char szFileName[], CTextile &Textile);
28 bool OutputTextileToSTEP(char szFileName[], CTextile &Textile);
29
31 bool OutputTextileToIGES(char szFileName[], string TextileName);
33 bool OutputTextileToSTEP(char szFileName[], string TextileName);
34
35 bool GetFaceted() { return m_bFaceted; }
38
39 void SetFaceted(bool bFaceted) { m_bFaceted = bFaceted; }
40 void SetExportDomain(bool bExportDomain) { m_bExportDomain = bExportDomain; }
41 void SetSubtractYarns(bool bSubtractYarns) { m_bSubtractYarns = bSubtractYarns; }
42 void SetJoinYarns(bool bJoinYarns) { m_bJoinYarns = bJoinYarns; }
43
44 protected:
46
51 static void CopyShapesToRange(TopTools_HSequenceOfShape &Shapes, XYZ Vector, int iLowerLimit, int iUpperLimit);
53 void ConvertTextile(TopTools_HSequenceOfShape &Shapes, CTextile &Textile);
55 void ConvertYarn(TopTools_HSequenceOfShape &Shapes, CYarn &Yarn, const CDomain *pDomain = NULL);
57 TopoDS_Wire ConvertSection(const vector<XYZ> &SectionPoints);
59 TopoDS_Shape ConvertDomain(const CDomain &Domain);
61 void SubtractYarnsFromDomain(TopoDS_Shape &Domain, const TopTools_HSequenceOfShape &Yarns);
63 bool ConfineYarnsToDomain(TopTools_HSequenceOfShape &Yarns, const TopoDS_Shape &Domain);
65 bool SaveToIGES(char szFileName[], TopTools_HSequenceOfShape &Shapes);
67 bool SaveToSTEP(char szFileName[], TopTools_HSequenceOfShape &Shapes);
68
73 };
74}
75
76
#define NULL
Definition: ShinyConfig.h:50
Abstract base class representing the domain in which a textile cell may lie.
Definition: Domain.h:34
Class to re-create geometry in OpenCASCADE and in turn export to IGES or STEP.
Definition: Exporter.h:15
bool OutputTextileToIGES(char szFileName[], CTextile &Textile)
Output the textile to IGES file format.
Definition: Exporter.cpp:62
bool SaveToIGES(char szFileName[], TopTools_HSequenceOfShape &Shapes)
Save sequence of shapes to IGES file.
Definition: Exporter.cpp:113
void SetSubtractYarns(bool bSubtractYarns)
Definition: Exporter.h:41
void ConvertYarn(TopTools_HSequenceOfShape &Shapes, CYarn &Yarn, const CDomain *pDomain=NULL)
Convert yarn to a sequence of OpenCascade TopoDS_Shape.
Definition: Exporter.cpp:198
bool GetSubtractYarns()
Definition: Exporter.h:37
void ConvertTextile(TopTools_HSequenceOfShape &Shapes, CTextile &Textile)
Convert textile to a sequence of OpenCascade TopoDS_Shape.
Definition: Exporter.cpp:130
void SetExportDomain(bool bExportDomain)
Definition: Exporter.h:40
static void CopyShapesToRange(TopTools_HSequenceOfShape &Shapes, XYZ Vector, int iLowerLimit, int iUpperLimit)
Copy the shapes to given range with given repeat vector.
Definition: Exporter.cpp:355
bool OutputDomainToIGES(char szFileName[], CDomain &Domain)
Output the domain to IGES file format.
Definition: Exporter.cpp:46
bool m_bExportDomain
Definition: Exporter.h:70
TopoDS_Shape ConvertDomain(const CDomain &Domain)
Convert domain to a OpenCascade TopoDS_Shape.
Definition: Exporter.cpp:374
bool OutputDomainToSTEP(char szFileName[], CDomain &Domain)
Output the domain to STEP file format.
Definition: Exporter.cpp:54
TopoDS_Wire ConvertSection(const vector< XYZ > &SectionPoints)
Convert a yarn section to a OpenCascade wire.
Definition: Exporter.cpp:251
bool ConfineYarnsToDomain(TopTools_HSequenceOfShape &Yarns, const TopoDS_Shape &Domain)
Trim the yarns such they fit within the domain.
Definition: Exporter.cpp:165
bool GetExportDomain()
Definition: Exporter.h:36
bool m_bSubtractYarns
Definition: Exporter.h:71
bool SaveToSTEP(char szFileName[], TopTools_HSequenceOfShape &Shapes)
Save sequence of shapes to STEP file.
Definition: Exporter.cpp:96
void SubtractYarnsFromDomain(TopoDS_Shape &Domain, const TopTools_HSequenceOfShape &Yarns)
Subtract yarns from the domain (NOTE: THIS IS UNSTABLE AND VERY SLOW)
Definition: Exporter.cpp:187
void SetJoinYarns(bool bJoinYarns)
Definition: Exporter.h:42
bool OutputTextileToSTEP(char szFileName[], CTextile &Textile)
Output the textile to STEP file format.
Definition: Exporter.cpp:70
void SetFaceted(bool bFaceted)
Definition: Exporter.h:39
bool GetFaceted()
Definition: Exporter.h:35
Represents a textile cell containing yarns.
Definition: Textile.h:39
Represents a yarn consisting of master nodes, section and interpolation function.
Definition: Yarn.h:49
Namespace containing a series of customised math operations not found in the standard c++ library.
Struct for representing points in 3D space.
Definition: mymath.h:56