TexGen
|
Class to re-create geometry in OpenCASCADE and in turn export to IGES or STEP. More...
#include <Exporter.h>
Public Member Functions | |
CExporter () | |
~CExporter () | |
bool | OutputDomainToIGES (char szFileName[], CDomain &Domain) |
Output the domain to IGES file format. More... | |
bool | OutputDomainToSTEP (char szFileName[], CDomain &Domain) |
Output the domain to STEP file format. More... | |
bool | OutputTextileToIGES (char szFileName[], CTextile &Textile) |
Output the textile to IGES file format. More... | |
bool | OutputTextileToSTEP (char szFileName[], CTextile &Textile) |
Output the textile to STEP file format. More... | |
bool | OutputTextileToIGES (char szFileName[], string TextileName) |
Output the textile to IGES file format. More... | |
bool | OutputTextileToSTEP (char szFileName[], string TextileName) |
Output the textile to STEP file format. More... | |
bool | GetFaceted () |
bool | GetExportDomain () |
bool | GetSubtractYarns () |
void | SetFaceted (bool bFaceted) |
void | SetExportDomain (bool bExportDomain) |
void | SetSubtractYarns (bool bSubtractYarns) |
void | SetJoinYarns (bool bJoinYarns) |
Protected Member Functions | |
void | ConvertTextile (TopTools_HSequenceOfShape &Shapes, CTextile &Textile) |
Convert textile to a sequence of OpenCascade TopoDS_Shape. More... | |
void | ConvertYarn (TopTools_HSequenceOfShape &Shapes, CYarn &Yarn, const CDomain *pDomain=NULL) |
Convert yarn to a sequence of OpenCascade TopoDS_Shape. More... | |
TopoDS_Wire | ConvertSection (const vector< XYZ > &SectionPoints) |
Convert a yarn section to a OpenCascade wire. More... | |
TopoDS_Shape | ConvertDomain (const CDomain &Domain) |
Convert domain to a OpenCascade TopoDS_Shape. More... | |
void | SubtractYarnsFromDomain (TopoDS_Shape &Domain, const TopTools_HSequenceOfShape &Yarns) |
Subtract yarns from the domain (NOTE: THIS IS UNSTABLE AND VERY SLOW) More... | |
bool | ConfineYarnsToDomain (TopTools_HSequenceOfShape &Yarns, const TopoDS_Shape &Domain) |
Trim the yarns such they fit within the domain. More... | |
bool | SaveToIGES (char szFileName[], TopTools_HSequenceOfShape &Shapes) |
Save sequence of shapes to IGES file. More... | |
bool | SaveToSTEP (char szFileName[], TopTools_HSequenceOfShape &Shapes) |
Save sequence of shapes to STEP file. More... | |
Static Protected Member Functions | |
static void | CopyShapesToRange (TopTools_HSequenceOfShape &Shapes, XYZ Vector, int iLowerLimit, int iUpperLimit) |
Copy the shapes to given range with given repeat vector. More... | |
Protected Attributes | |
bool | m_bFaceted |
bool | m_bExportDomain |
bool | m_bSubtractYarns |
bool | m_bJoinYarns |
Class to re-create geometry in OpenCASCADE and in turn export to IGES or STEP.
Definition at line 14 of file Exporter.h.
CExporter::CExporter | ( | ) |
Definition at line 34 of file Exporter.cpp.
CExporter::~CExporter | ( | ) |
Definition at line 42 of file Exporter.cpp.
|
protected |
Trim the yarns such they fit within the domain.
Definition at line 165 of file Exporter.cpp.
References TGERROR, TGLOG, and TGLOGINDENT.
Referenced by ConvertTextile().
|
protected |
Convert domain to a OpenCascade TopoDS_Shape.
Definition at line 374 of file Exporter.cpp.
References TexGen::CMesh::GetAABB(), TexGen::CDomainPlanes::GetBoxLimits(), TexGen::CDomain::GetMesh(), TexGen::CDomainPlanes::GetPlanes(), TexGen::CDomain::GetType(), TexGen::Max(), TexGen::Min(), TGLOGINDENT, TexGen::XYZ::x, TexGen::XYZ::y, and TexGen::XYZ::z.
Referenced by ConvertTextile(), OutputDomainToIGES(), and OutputDomainToSTEP().
|
protected |
Convert a yarn section to a OpenCascade wire.
Definition at line 251 of file Exporter.cpp.
References TexGen::DotProduct(), m_bFaceted, TexGen::Normalise(), PI, TexGen::XYZ::x, TexGen::XYZ::y, and TexGen::XYZ::z.
Referenced by ConvertYarn().
|
protected |
Convert textile to a sequence of OpenCascade TopoDS_Shape.
Definition at line 130 of file Exporter.cpp.
References ConfineYarnsToDomain(), ConvertDomain(), ConvertYarn(), TexGen::CTextile::GetDomain(), TexGen::CTextile::GetYarns(), m_bExportDomain, m_bSubtractYarns, SubtractYarnsFromDomain(), TGERROR, and TGLOGINDENT.
Referenced by OutputTextileToIGES(), and OutputTextileToSTEP().
|
protected |
Convert yarn to a sequence of OpenCascade TopoDS_Shape.
Definition at line 198 of file Exporter.cpp.
References ConvertSection(), CopyShapesToRange(), TexGen::CDomain::GetRepeatLimits(), TexGen::CYarn::GetRepeats(), TexGen::CYarn::GetSlaveNodes(), m_bFaceted, m_bJoinYarns, TexGen::CYarn::SURFACE, TGLOG, and TGLOGINDENT.
Referenced by ConvertTextile().
|
staticprotected |
Copy the shapes to given range with given repeat vector.
for i in range lowerlimit - upperlimit All the shapes are copied and translated by i * Vector Shapes are then replaced with the newly generated shapes
Definition at line 355 of file Exporter.cpp.
References TexGen::XYZ::x, TexGen::XYZ::y, and TexGen::XYZ::z.
Referenced by ConvertYarn().
|
inline |
Definition at line 36 of file Exporter.h.
References m_bExportDomain.
|
inline |
Definition at line 35 of file Exporter.h.
References m_bFaceted.
|
inline |
Definition at line 37 of file Exporter.h.
References m_bSubtractYarns.
bool CExporter::OutputDomainToIGES | ( | char | szFileName[], |
CDomain & | Domain | ||
) |
Output the domain to IGES file format.
Definition at line 46 of file Exporter.cpp.
References ConvertDomain(), SaveToIGES(), and TGLOGINDENT.
bool CExporter::OutputDomainToSTEP | ( | char | szFileName[], |
CDomain & | Domain | ||
) |
Output the domain to STEP file format.
Definition at line 54 of file Exporter.cpp.
References ConvertDomain(), SaveToSTEP(), and TGLOGINDENT.
bool CExporter::OutputTextileToIGES | ( | char | szFileName[], |
CTextile & | Textile | ||
) |
Output the textile to IGES file format.
Definition at line 62 of file Exporter.cpp.
References ConvertTextile(), SaveToIGES(), and TGLOGINDENT.
Referenced by OutputTextileToIGES().
bool CExporter::OutputTextileToIGES | ( | char | szFileName[], |
string | TextileName | ||
) |
Output the textile to IGES file format.
Definition at line 78 of file Exporter.cpp.
References TexGen::CSingleton< CTexGen >::GetInstance(), TexGen::CTexGen::GetTextile(), and OutputTextileToIGES().
bool CExporter::OutputTextileToSTEP | ( | char | szFileName[], |
CTextile & | Textile | ||
) |
Output the textile to STEP file format.
Definition at line 70 of file Exporter.cpp.
References ConvertTextile(), SaveToSTEP(), and TGLOGINDENT.
Referenced by OutputTextileToSTEP().
bool CExporter::OutputTextileToSTEP | ( | char | szFileName[], |
string | TextileName | ||
) |
Output the textile to STEP file format.
Definition at line 87 of file Exporter.cpp.
References TexGen::CSingleton< CTexGen >::GetInstance(), TexGen::CTexGen::GetTextile(), and OutputTextileToSTEP().
|
protected |
Save sequence of shapes to IGES file.
Definition at line 113 of file Exporter.cpp.
Referenced by OutputDomainToIGES(), and OutputTextileToIGES().
|
protected |
Save sequence of shapes to STEP file.
Definition at line 96 of file Exporter.cpp.
Referenced by OutputDomainToSTEP(), and OutputTextileToSTEP().
|
inline |
Definition at line 40 of file Exporter.h.
References m_bExportDomain.
|
inline |
Definition at line 39 of file Exporter.h.
References m_bFaceted.
|
inline |
Definition at line 42 of file Exporter.h.
References m_bJoinYarns.
|
inline |
Definition at line 41 of file Exporter.h.
References m_bSubtractYarns.
|
protected |
Subtract yarns from the domain (NOTE: THIS IS UNSTABLE AND VERY SLOW)
Definition at line 187 of file Exporter.cpp.
References TGLOG, and TGLOGINDENT.
Referenced by ConvertTextile().
|
protected |
Definition at line 70 of file Exporter.h.
Referenced by ConvertTextile(), GetExportDomain(), and SetExportDomain().
|
protected |
Definition at line 69 of file Exporter.h.
Referenced by ConvertSection(), ConvertYarn(), GetFaceted(), and SetFaceted().
|
protected |
Definition at line 72 of file Exporter.h.
Referenced by ConvertYarn(), and SetJoinYarns().
|
protected |
Definition at line 71 of file Exporter.h.
Referenced by ConvertTextile(), GetSubtractYarns(), and SetSubtractYarns().