TexGen
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
TexGen::CExporter Class Reference

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
 

Detailed Description

Class to re-create geometry in OpenCASCADE and in turn export to IGES or STEP.

Definition at line 14 of file Exporter.h.

Constructor & Destructor Documentation

◆ CExporter()

CExporter::CExporter ( )

Definition at line 34 of file Exporter.cpp.

◆ ~CExporter()

CExporter::~CExporter ( )

Definition at line 42 of file Exporter.cpp.

Member Function Documentation

◆ ConfineYarnsToDomain()

bool CExporter::ConfineYarnsToDomain ( TopTools_HSequenceOfShape &  Yarns,
const TopoDS_Shape &  Domain 
)
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().

◆ ConvertDomain()

TopoDS_Shape CExporter::ConvertDomain ( const CDomain Domain)
protected

◆ ConvertSection()

TopoDS_Wire CExporter::ConvertSection ( const vector< XYZ > &  SectionPoints)
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().

◆ ConvertTextile()

void CExporter::ConvertTextile ( TopTools_HSequenceOfShape &  Shapes,
CTextile Textile 
)
protected

◆ ConvertYarn()

void CExporter::ConvertYarn ( TopTools_HSequenceOfShape &  Shapes,
CYarn Yarn,
const CDomain pDomain = NULL 
)
protected

◆ CopyShapesToRange()

void CExporter::CopyShapesToRange ( TopTools_HSequenceOfShape &  Shapes,
XYZ  Vector,
int  iLowerLimit,
int  iUpperLimit 
)
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().

◆ GetExportDomain()

bool TexGen::CExporter::GetExportDomain ( )
inline

Definition at line 36 of file Exporter.h.

References m_bExportDomain.

◆ GetFaceted()

bool TexGen::CExporter::GetFaceted ( )
inline

Definition at line 35 of file Exporter.h.

References m_bFaceted.

◆ GetSubtractYarns()

bool TexGen::CExporter::GetSubtractYarns ( )
inline

Definition at line 37 of file Exporter.h.

References m_bSubtractYarns.

◆ OutputDomainToIGES()

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.

◆ OutputDomainToSTEP()

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.

◆ OutputTextileToIGES() [1/2]

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().

◆ OutputTextileToIGES() [2/2]

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().

◆ OutputTextileToSTEP() [1/2]

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().

◆ OutputTextileToSTEP() [2/2]

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().

◆ SaveToIGES()

bool CExporter::SaveToIGES ( char  szFileName[],
TopTools_HSequenceOfShape &  Shapes 
)
protected

Save sequence of shapes to IGES file.

Definition at line 113 of file Exporter.cpp.

Referenced by OutputDomainToIGES(), and OutputTextileToIGES().

◆ SaveToSTEP()

bool CExporter::SaveToSTEP ( char  szFileName[],
TopTools_HSequenceOfShape &  Shapes 
)
protected

Save sequence of shapes to STEP file.

Definition at line 96 of file Exporter.cpp.

Referenced by OutputDomainToSTEP(), and OutputTextileToSTEP().

◆ SetExportDomain()

void TexGen::CExporter::SetExportDomain ( bool  bExportDomain)
inline

Definition at line 40 of file Exporter.h.

References m_bExportDomain.

◆ SetFaceted()

void TexGen::CExporter::SetFaceted ( bool  bFaceted)
inline

Definition at line 39 of file Exporter.h.

References m_bFaceted.

◆ SetJoinYarns()

void TexGen::CExporter::SetJoinYarns ( bool  bJoinYarns)
inline

Definition at line 42 of file Exporter.h.

References m_bJoinYarns.

◆ SetSubtractYarns()

void TexGen::CExporter::SetSubtractYarns ( bool  bSubtractYarns)
inline

Definition at line 41 of file Exporter.h.

References m_bSubtractYarns.

◆ SubtractYarnsFromDomain()

void CExporter::SubtractYarnsFromDomain ( TopoDS_Shape &  Domain,
const TopTools_HSequenceOfShape &  Yarns 
)
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().

Member Data Documentation

◆ m_bExportDomain

bool TexGen::CExporter::m_bExportDomain
protected

Definition at line 70 of file Exporter.h.

Referenced by ConvertTextile(), GetExportDomain(), and SetExportDomain().

◆ m_bFaceted

bool TexGen::CExporter::m_bFaceted
protected

Definition at line 69 of file Exporter.h.

Referenced by ConvertSection(), ConvertYarn(), GetFaceted(), and SetFaceted().

◆ m_bJoinYarns

bool TexGen::CExporter::m_bJoinYarns
protected

Definition at line 72 of file Exporter.h.

Referenced by ConvertYarn(), and SetJoinYarns().

◆ m_bSubtractYarns

bool TexGen::CExporter::m_bSubtractYarns
protected

Definition at line 71 of file Exporter.h.

Referenced by ConvertTextile(), GetSubtractYarns(), and SetSubtractYarns().


The documentation for this class was generated from the following files: