TexGen

Introduction

Welcome to the documentation of TexGen, a tool for modelling the geometry of textiles.

Modules

TexGen has been split into several modules as illustrated in the graph below:

dot_texgenmodules.png
TexGen modules

The documentation provided here documents the Core, Renderer and Export modules mainly. The python interface is automatically generated by SWIG allowing python to call functions within the core and renderer modules hence the documentation here also applies to the python modules. The GUI has not yet been documentated.

API Reference

The API reference guide has been generated by DoxyGen from the source code. It can be accessed from the various buttons at the top of the page. A quick rundown of the classes found in the within the core module and how they relate to each other is shown below:

dot_texgenimp.png
Core module structure

Python STL templates

The following templates have been defined which should be used for the Python versions of functions in place of the STL declarations in the corresponding C++ functions (shown in the documentation). For example, a string vector would be declared as StringVector() in a Python script and used in place of a vector<string> shown in the C++ version of the function declaration.

template(StringVector) vector<string>;
template(PlaneVector) vector<TexGen::PLANE>;
template(XYZPair) pair<TexGen::XYZ, TexGen::XYZ>;
template(YarnList) list<TexGen::CYarn>;
template(YarnVector) vector<TexGen::CYarn>;
template(YarnVectorPtr) vector<TexGen::CYarn*>;
template(TextileVector) vector<TexGen::CTextile*>;

template(TextileMap) map<string, TexGen::CTextile*>;
template(NodeVector) vector<TexGen::CNode>;
template(SlaveNodeVector) vector<TexGen::CSlaveNode>;
template(XYZVector) vector<TexGen::XYZ>;
template(XYVector) vector<TexGen::XY>;
template(DoubleVector) vector<double>;
template(IntPair) pair<int, int>;
template(IntPairVector) vector<pair<int, int> >;
template(PointInfoVector) vector<TexGen::POINT_INFO>;
template(DoubleXYZPair) pair<double, TexGen::XYZ>;
template(DoubleXYZPairVector) vector< pair<double, TexGen::XYZ> >;
template(BoolPair) pair<bool, bool>;
template(IntList) list<int>;
template(IntVector) vector<int>;
template(BoolVector) vector<bool>;
template(ElementDataList) list<TexGen::MESHER_ELEMENT_DATA>;
template(MeshDataVector) vector<TexGen::CMeshDataBase*>;
template(LinearTransformationVector) vector<CLinearTransformation>;
template(FloatVector) vector<float>;
template(MeshVector) vector<TexGen::CMesh>;

Guide

Refer to the website for a guide on using TexGen:

http://texgen.sourceforge.net/