<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https:///api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wr</id>
	<title>TexGen - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https:///api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wr"/>
	<link rel="alternate" type="text/html" href=""/>
	<updated>2026-06-18T02:56:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id></id>
		<title>Compiling from Source</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2007-09-28T15:01:18Z</updated>

		<summary type="html">&lt;p&gt;Wr: /* Install TexGen from source */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to compile TexGen and &amp;#039;&amp;#039;&amp;#039;all&amp;#039;&amp;#039;&amp;#039; of its modules, the following software is required:&lt;br /&gt;
&lt;br /&gt;
The following programs are needed to build TexGen:&lt;br /&gt;
* [http://www.cmake.org/ CMake]&lt;br /&gt;
* [http://www.swig.org/ SWIG]&lt;br /&gt;
&lt;br /&gt;
The following libraries are needed to link to TexGen:&lt;br /&gt;
* [http://www.vtk.org/ VTK]&lt;br /&gt;
* [http://www.wxwidgets.org/ wxWidgets]&lt;br /&gt;
* [http://www.opencascade.org/ OpenCascade]&lt;br /&gt;
* [http://www.python.org/ Python]&lt;br /&gt;
&lt;br /&gt;
However to perform a minimum build of TexGen with none of the additional modules you only require CMake and a C++ compiler. It is recommended to begin with a minimum build, once that is working try adding modules one at a time. A list of modules along with dependencies is shown below:&lt;br /&gt;
&lt;br /&gt;
* Python interface: Python, SWIG&lt;br /&gt;
* Renderer: VTK&lt;br /&gt;
* Export: OpenCascade&lt;br /&gt;
* GUI: wxWidgets, Renderer, Python interface&lt;br /&gt;
* Unit tests: CPPUnit&lt;br /&gt;
&lt;br /&gt;
A graphical representation of the modules and their dependencies can also be found in the [http://texgen.sourceforge.net/api/ TexGen API].&lt;br /&gt;
&lt;br /&gt;
If you want to get the source code from the Subversion repository you will need to install [http://subversion.tigris.org/ Subversion] by following the instructions below. Note that this is the very latest development source and so may it contain some bugs and unfinished features. However it is very easy to keep up to date with the latest version of TexGen using this method and will allow you to keep any modifications you have made to the source when updating. If you find a bug or implement new features that may be usefull to the rest of the community they can also be submited as patch and incorporated into TexGen following review.&lt;br /&gt;
&lt;br /&gt;
Alternatively the stable source code can be downloaded as a [http://sourceforge.net/project/showfiles.php?group_id=181000 tarball]. Download the latest file release named &amp;#039;&amp;#039;texgen-3.x.x.tar.gz&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Windows compile ==&lt;br /&gt;
=== Microsoft Visual Studio C++ ===&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Cygwin and gcc ===&lt;br /&gt;
A limited build (without graphics) can be made under cygwin, this is a UNIX emulation environment available at [http://www.cygwin.com www.cygwin.com]. &lt;br /&gt;
This can exist peacefully next to the native windows version. &lt;br /&gt;
Cygwin creates a unix-style file system within your windows installation. If you choose c:/cygwin as your install directory, your HOME will be at c:/cygwin/home/&amp;lt;username&amp;gt;/. &lt;br /&gt;
&lt;br /&gt;
==== Download cygwin and install packages ====&lt;br /&gt;
Install gcc, g++, wget, make and cmake using the setup.exe program from the cygwin website. &lt;br /&gt;
For the mesh generator and python interface to work we currently need VTK and swig. &lt;br /&gt;
&lt;br /&gt;
This downloads and installs swig from source (when starting the cygwin shell you can paste this into the command line, otherwise write it to a file and run it with sh). &lt;br /&gt;
 mkdir progs&lt;br /&gt;
 cd progs &lt;br /&gt;
 SWIG=swig-1.3.31&lt;br /&gt;
 wget -nc http://kent.dl.sourceforge.net/sourceforge/swig/$SWIG.tar.gz&lt;br /&gt;
 tar xzvf $SWIG.tar.gz &lt;br /&gt;
 cd $SWIG&lt;br /&gt;
 ./configure &lt;br /&gt;
 make &lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
This downloads and installs VTK from source, in the ccmake stage, use the cmake graphical commands to get a working install. &lt;br /&gt;
 VTK=vtk-5.0.3&lt;br /&gt;
 wget -nc http://www.vtk.org/files/release/5.0/$VTK.tar.gz&lt;br /&gt;
 tar xzvf $VTK.tar.gz&lt;br /&gt;
 mkdir vtkbin&lt;br /&gt;
 cd vtkbin&lt;br /&gt;
 ccmake ../VTK&lt;br /&gt;
 make &lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Install TexGen from source ====&lt;br /&gt;
Now we can proceed to install texgen, as an example we&amp;#039;ll work in ~/temp/texgen&lt;br /&gt;
 cd ~; mkdir temp; cd temp; mkdir texgen; cd texgen&lt;br /&gt;
 svn checkout https://texgen.svn.sourceforge.net/svnroot/texgen/TexGen/trunk/ TexGen&lt;br /&gt;
 cd .. ; mkdir tbin; cd tbin&lt;br /&gt;
 ccmake ../texgen&lt;br /&gt;
 make &lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
This should result in a working texgen install in ~/temp/texgen/tbin.&lt;br /&gt;
&lt;br /&gt;
== Unix compile ==&lt;br /&gt;
=== Notes ===&lt;br /&gt;
If you are installing to a system where you don&amp;#039;t have root access (i.e. this computer does not belong to you) you won&amp;#039;t be able to install the software using the default configure script. This is because by default software is installed to the /usr/local directory. If you are not a systems administrator then you will quite rightly not have write access to this folder. All is not lost! You can still install software into your home directory. In order to do this you should always call the configure script with the following parameter: --prefix=$HOME. This goes for all the software to be installed below. All executables will then be placed in ~/bin, libraries in ~/lib, includes in ~/include, etc...&lt;br /&gt;
&lt;br /&gt;
In the guide below the parameter is included in italic. If you do in fact have root access then it is recommended to omit this parameter and install to the default directory so that other users will also have access to the software.&lt;br /&gt;
&lt;br /&gt;
=== Get TexGen from Subversion repository ===&lt;br /&gt;
&lt;br /&gt;
==== Install Subversion ====&lt;br /&gt;
[http://subversion.tigris.org/servlets/ProjectDocumentList?collapseFolder=260&amp;amp;folderID=260 Download Subversion] and unpack.&lt;br /&gt;
Open a shell in extracted folder and type:&lt;br /&gt;
 ./configure --with-ssl &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* You will need to install Subversion with SSL support since TexGen is hosted on sourceforge which uses SSL. If you don&amp;#039;t configure with the --with-ssl flag you will get an error when trying to checkout TexGen in the next step.&lt;br /&gt;
* If you have trouble installing the latest version of Subversion, try installing version 1.3 as it does not require a seperate dependencies package.&lt;br /&gt;
&lt;br /&gt;
==== Checkout ====&lt;br /&gt;
Open a shell in folder you wish to place TexGen (e.g. ~/):&lt;br /&gt;
 svn checkout https://texgen.svn.sourceforge.net/svnroot/texgen/TexGen/trunk/ TexGen&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The first parameter tells SVN to get the files for the first time&lt;br /&gt;
* The second parameter is the location of the TexGen svn repository&lt;br /&gt;
* The final parameter is the subfolder to put the files in&lt;br /&gt;
&lt;br /&gt;
==== Update ====&lt;br /&gt;
The checkout command only needs to performed once. SVN keeps track of where the code was originally obtained and can update to the latest version without having to re-specify the location. In order to do that open a shell in the folder where TexGen was originally checkout (e.g. ~/TexGen) and type:&lt;br /&gt;
 svn update&lt;br /&gt;
or if you are in a hurry you can type the shorter version:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
=== Compile source ===&lt;br /&gt;
&lt;br /&gt;
==== Install CMake ====&lt;br /&gt;
&lt;br /&gt;
[http://www.cmake.org/HTML/Download.html Download CMake] and unpack.&lt;br /&gt;
Open a shell in extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Compile TexGen core ====&lt;br /&gt;
Open a shell in the folder with the TexGen source code (e.g. ~/TexGen):&lt;br /&gt;
 mkdir bin&lt;br /&gt;
 cd bin&lt;br /&gt;
 ccmake ../&lt;br /&gt;
Press &amp;#039;c&amp;#039; to configure. When a warning pops up telling you it can&amp;#039;t find such and such a file press &amp;#039;e&amp;#039; to close it. You will now need to specify which components of TexGen to build and where their dependencies can be found. Use the up and down arrows to move the caret and press enter to modify options. Do this to set BUILD_GUI, BUILD_PYTHON_INTERFACE and BUILD_RENDERER to OFF. You are basically telling CMake not to attempt to build these components, which means that you won&amp;#039;t need to have installed their dependencies.&lt;br /&gt;
&lt;br /&gt;
Similarly to the --prefix=$HOME parameter to the configure script, you can tell CMake to install TexGen to your home directory by changing CMAKE_INSTALL_PREFIX to ~/. Note that it won&amp;#039;t actually install anything until you get type make install.&lt;br /&gt;
&lt;br /&gt;
Now press &amp;#039;c&amp;#039; again to update the changes.&lt;br /&gt;
&lt;br /&gt;
Hopefully now that all the additional modules have been switched off no errors will be shown. Press &amp;#039;g&amp;#039; to generate the makefiles and exit. At the shell type:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Note that at this point you have only built and installed the TexGen Core library which doesn&amp;#039;t actually do anything on its own. If you plan to incorporate TexGen into your own C++ program then this is enough, however if you would like to interface with TexGen from a Python script or Graphical User Interface then follow the steps below.&lt;br /&gt;
&lt;br /&gt;
=== Compiling optional modules ===&lt;br /&gt;
==== Python interface ====&lt;br /&gt;
[http://www.python.org/download/ Download Python] and unpack.&lt;br /&gt;
Open a shell in the extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
[http://www.swig.org/download.html Download SWIG] and unpack.&lt;br /&gt;
Open a shell in the extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Open a shell in the folder where you called ccmake from for the first time (e.g. ~/TexGen/bin):&lt;br /&gt;
 ccmake ../&lt;br /&gt;
&lt;br /&gt;
Use the up and down arrows to reach BUILD_PYTHON_INTERFACE and press Enter to set it to ON. Then press &amp;#039;c&amp;#039; to configure. You will probably get a warning saying you need to specify the location of SWIG and/or Python, press &amp;#039;e&amp;#039; to close it.&lt;br /&gt;
&lt;br /&gt;
Set the PYTHON_INCLUDE_PATH, PYTHON_LIBRARY, PYTHON_SITEPACKAGES_DIR, SWIG_DIR and SWIG_EXECUTABLE parameters correctly where necessary. If you have installed packages to your home directory then they should look something like this:&lt;br /&gt;
&lt;br /&gt;
 PYTHON_INCLUDE_PATH: ~/include/python2.5&lt;br /&gt;
 PYTHON_LIBRARY: ~/lib/python2.5/config/libpython2.5.a&lt;br /&gt;
 PYTHON_SITEPACKAGES_DIR: ~/lib/python2.5/site-packages&lt;br /&gt;
 SWIG_DIR: ~/bin&lt;br /&gt;
 SWIG_EXECUTABLE: ~/bin/swig&lt;br /&gt;
&lt;br /&gt;
Once that is done press &amp;#039;c&amp;#039; again. You may need perform this process over several iterations. When everything is set correctly press &amp;#039;g&amp;#039; to generate the makefiles.&lt;br /&gt;
&lt;br /&gt;
At the shell type:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Assuming the build completed without errors you should now be able to access TexGen functions from within Python. In order to check everything worked as planned open Python in interactive mode by typing:&lt;br /&gt;
 python&lt;br /&gt;
&lt;br /&gt;
Then from within Python type:&lt;br /&gt;
 from TexGen.Core import *&lt;br /&gt;
 CTexGen.GetInstance().GetVersion()&lt;br /&gt;
&lt;br /&gt;
This should display the version of TexGen installed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Q:&amp;#039;&amp;#039;&amp;#039; I get the following error when linking _Core.so:&lt;br /&gt;
 libpython2.5.a(abstract.o): relocation R_X86_64_32 against `a local symbol&amp;#039;&lt;br /&gt;
 can not be used when making a shared object; recompile with -fPIC&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;A:&amp;#039;&amp;#039;&amp;#039; Try removing libpython2.5.a from the libraries to link to by setting PYTHON_LIBRARY to a bogus path, e.g.:&lt;br /&gt;
&lt;br /&gt;
PYTHON_LIBRARY: ~/&lt;br /&gt;
&lt;br /&gt;
By doing so you may receive a warning similar to this:&lt;br /&gt;
 Warning: Ignoring path found in link libraries for target: _Core, path is:&lt;br /&gt;
 /home/username. Expected a library name or a full path to a library name.&lt;br /&gt;
This warning may be ignored.&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Compiling from Source</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2007-09-28T14:56:02Z</updated>

		<summary type="html">&lt;p&gt;Wr: /* Download cygwin and install packages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to compile TexGen and &amp;#039;&amp;#039;&amp;#039;all&amp;#039;&amp;#039;&amp;#039; of its modules, the following software is required:&lt;br /&gt;
&lt;br /&gt;
The following programs are needed to build TexGen:&lt;br /&gt;
* [http://www.cmake.org/ CMake]&lt;br /&gt;
* [http://www.swig.org/ SWIG]&lt;br /&gt;
&lt;br /&gt;
The following libraries are needed to link to TexGen:&lt;br /&gt;
* [http://www.vtk.org/ VTK]&lt;br /&gt;
* [http://www.wxwidgets.org/ wxWidgets]&lt;br /&gt;
* [http://www.opencascade.org/ OpenCascade]&lt;br /&gt;
* [http://www.python.org/ Python]&lt;br /&gt;
&lt;br /&gt;
However to perform a minimum build of TexGen with none of the additional modules you only require CMake and a C++ compiler. It is recommended to begin with a minimum build, once that is working try adding modules one at a time. A list of modules along with dependencies is shown below:&lt;br /&gt;
&lt;br /&gt;
* Python interface: Python, SWIG&lt;br /&gt;
* Renderer: VTK&lt;br /&gt;
* Export: OpenCascade&lt;br /&gt;
* GUI: wxWidgets, Renderer, Python interface&lt;br /&gt;
* Unit tests: CPPUnit&lt;br /&gt;
&lt;br /&gt;
A graphical representation of the modules and their dependencies can also be found in the [http://texgen.sourceforge.net/api/ TexGen API].&lt;br /&gt;
&lt;br /&gt;
If you want to get the source code from the Subversion repository you will need to install [http://subversion.tigris.org/ Subversion] by following the instructions below. Note that this is the very latest development source and so may it contain some bugs and unfinished features. However it is very easy to keep up to date with the latest version of TexGen using this method and will allow you to keep any modifications you have made to the source when updating. If you find a bug or implement new features that may be usefull to the rest of the community they can also be submited as patch and incorporated into TexGen following review.&lt;br /&gt;
&lt;br /&gt;
Alternatively the stable source code can be downloaded as a [http://sourceforge.net/project/showfiles.php?group_id=181000 tarball]. Download the latest file release named &amp;#039;&amp;#039;texgen-3.x.x.tar.gz&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Windows compile ==&lt;br /&gt;
=== Microsoft Visual Studio C++ ===&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Cygwin and gcc ===&lt;br /&gt;
A limited build (without graphics) can be made under cygwin, this is a UNIX emulation environment available at [http://www.cygwin.com www.cygwin.com]. &lt;br /&gt;
This can exist peacefully next to the native windows version. &lt;br /&gt;
Cygwin creates a unix-style file system within your windows installation. If you choose c:/cygwin as your install directory, your HOME will be at c:/cygwin/home/&amp;lt;username&amp;gt;/. &lt;br /&gt;
&lt;br /&gt;
==== Download cygwin and install packages ====&lt;br /&gt;
Install gcc, g++, wget, make and cmake using the setup.exe program from the cygwin website. &lt;br /&gt;
For the mesh generator and python interface to work we currently need VTK and swig. &lt;br /&gt;
&lt;br /&gt;
This downloads and installs swig from source (when starting the cygwin shell you can paste this into the command line, otherwise write it to a file and run it with sh). &lt;br /&gt;
 mkdir progs&lt;br /&gt;
 cd progs &lt;br /&gt;
 SWIG=swig-1.3.31&lt;br /&gt;
 wget -nc http://kent.dl.sourceforge.net/sourceforge/swig/$SWIG.tar.gz&lt;br /&gt;
 tar xzvf $SWIG.tar.gz &lt;br /&gt;
 cd $SWIG&lt;br /&gt;
 ./configure &lt;br /&gt;
 make &lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
This downloads and installs VTK from source, in the ccmake stage, use the cmake graphical commands to get a working install. &lt;br /&gt;
 VTK=vtk-5.0.3&lt;br /&gt;
 wget -nc http://www.vtk.org/files/release/5.0/$VTK.tar.gz&lt;br /&gt;
 tar xzvf $VTK.tar.gz&lt;br /&gt;
 mkdir vtkbin&lt;br /&gt;
 cd vtkbin&lt;br /&gt;
 ccmake ../VTK&lt;br /&gt;
 make &lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Install TexGen from source ====&lt;br /&gt;
Now we can proceed to install texgen, as an example we&amp;#039;ll work in ~/temp/texgen&lt;br /&gt;
 cd ~; mkdir temp; cd temp; mkdir texgen; cd texgen&lt;br /&gt;
 svn checkout https://texgen.svn.sourceforge.net/svnroot/texgen/TexGen/trunk/ TexGen&lt;br /&gt;
 mkdir tbin&lt;br /&gt;
 cd tbin&lt;br /&gt;
 ccmake ../texgen&lt;br /&gt;
 make &lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
This should result in a working texgen install in ~/temp/texgen/tbin.&lt;br /&gt;
&lt;br /&gt;
== Unix compile ==&lt;br /&gt;
=== Notes ===&lt;br /&gt;
If you are installing to a system where you don&amp;#039;t have root access (i.e. this computer does not belong to you) you won&amp;#039;t be able to install the software using the default configure script. This is because by default software is installed to the /usr/local directory. If you are not a systems administrator then you will quite rightly not have write access to this folder. All is not lost! You can still install software into your home directory. In order to do this you should always call the configure script with the following parameter: --prefix=$HOME. This goes for all the software to be installed below. All executables will then be placed in ~/bin, libraries in ~/lib, includes in ~/include, etc...&lt;br /&gt;
&lt;br /&gt;
In the guide below the parameter is included in italic. If you do in fact have root access then it is recommended to omit this parameter and install to the default directory so that other users will also have access to the software.&lt;br /&gt;
&lt;br /&gt;
=== Get TexGen from Subversion repository ===&lt;br /&gt;
&lt;br /&gt;
==== Install Subversion ====&lt;br /&gt;
[http://subversion.tigris.org/servlets/ProjectDocumentList?collapseFolder=260&amp;amp;folderID=260 Download Subversion] and unpack.&lt;br /&gt;
Open a shell in extracted folder and type:&lt;br /&gt;
 ./configure --with-ssl &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* You will need to install Subversion with SSL support since TexGen is hosted on sourceforge which uses SSL. If you don&amp;#039;t configure with the --with-ssl flag you will get an error when trying to checkout TexGen in the next step.&lt;br /&gt;
* If you have trouble installing the latest version of Subversion, try installing version 1.3 as it does not require a seperate dependencies package.&lt;br /&gt;
&lt;br /&gt;
==== Checkout ====&lt;br /&gt;
Open a shell in folder you wish to place TexGen (e.g. ~/):&lt;br /&gt;
 svn checkout https://texgen.svn.sourceforge.net/svnroot/texgen/TexGen/trunk/ TexGen&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The first parameter tells SVN to get the files for the first time&lt;br /&gt;
* The second parameter is the location of the TexGen svn repository&lt;br /&gt;
* The final parameter is the subfolder to put the files in&lt;br /&gt;
&lt;br /&gt;
==== Update ====&lt;br /&gt;
The checkout command only needs to performed once. SVN keeps track of where the code was originally obtained and can update to the latest version without having to re-specify the location. In order to do that open a shell in the folder where TexGen was originally checkout (e.g. ~/TexGen) and type:&lt;br /&gt;
 svn update&lt;br /&gt;
or if you are in a hurry you can type the shorter version:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
=== Compile source ===&lt;br /&gt;
&lt;br /&gt;
==== Install CMake ====&lt;br /&gt;
&lt;br /&gt;
[http://www.cmake.org/HTML/Download.html Download CMake] and unpack.&lt;br /&gt;
Open a shell in extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Compile TexGen core ====&lt;br /&gt;
Open a shell in the folder with the TexGen source code (e.g. ~/TexGen):&lt;br /&gt;
 mkdir bin&lt;br /&gt;
 cd bin&lt;br /&gt;
 ccmake ../&lt;br /&gt;
Press &amp;#039;c&amp;#039; to configure. When a warning pops up telling you it can&amp;#039;t find such and such a file press &amp;#039;e&amp;#039; to close it. You will now need to specify which components of TexGen to build and where their dependencies can be found. Use the up and down arrows to move the caret and press enter to modify options. Do this to set BUILD_GUI, BUILD_PYTHON_INTERFACE and BUILD_RENDERER to OFF. You are basically telling CMake not to attempt to build these components, which means that you won&amp;#039;t need to have installed their dependencies.&lt;br /&gt;
&lt;br /&gt;
Similarly to the --prefix=$HOME parameter to the configure script, you can tell CMake to install TexGen to your home directory by changing CMAKE_INSTALL_PREFIX to ~/. Note that it won&amp;#039;t actually install anything until you get type make install.&lt;br /&gt;
&lt;br /&gt;
Now press &amp;#039;c&amp;#039; again to update the changes.&lt;br /&gt;
&lt;br /&gt;
Hopefully now that all the additional modules have been switched off no errors will be shown. Press &amp;#039;g&amp;#039; to generate the makefiles and exit. At the shell type:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Note that at this point you have only built and installed the TexGen Core library which doesn&amp;#039;t actually do anything on its own. If you plan to incorporate TexGen into your own C++ program then this is enough, however if you would like to interface with TexGen from a Python script or Graphical User Interface then follow the steps below.&lt;br /&gt;
&lt;br /&gt;
=== Compiling optional modules ===&lt;br /&gt;
==== Python interface ====&lt;br /&gt;
[http://www.python.org/download/ Download Python] and unpack.&lt;br /&gt;
Open a shell in the extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
[http://www.swig.org/download.html Download SWIG] and unpack.&lt;br /&gt;
Open a shell in the extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Open a shell in the folder where you called ccmake from for the first time (e.g. ~/TexGen/bin):&lt;br /&gt;
 ccmake ../&lt;br /&gt;
&lt;br /&gt;
Use the up and down arrows to reach BUILD_PYTHON_INTERFACE and press Enter to set it to ON. Then press &amp;#039;c&amp;#039; to configure. You will probably get a warning saying you need to specify the location of SWIG and/or Python, press &amp;#039;e&amp;#039; to close it.&lt;br /&gt;
&lt;br /&gt;
Set the PYTHON_INCLUDE_PATH, PYTHON_LIBRARY, PYTHON_SITEPACKAGES_DIR, SWIG_DIR and SWIG_EXECUTABLE parameters correctly where necessary. If you have installed packages to your home directory then they should look something like this:&lt;br /&gt;
&lt;br /&gt;
 PYTHON_INCLUDE_PATH: ~/include/python2.5&lt;br /&gt;
 PYTHON_LIBRARY: ~/lib/python2.5/config/libpython2.5.a&lt;br /&gt;
 PYTHON_SITEPACKAGES_DIR: ~/lib/python2.5/site-packages&lt;br /&gt;
 SWIG_DIR: ~/bin&lt;br /&gt;
 SWIG_EXECUTABLE: ~/bin/swig&lt;br /&gt;
&lt;br /&gt;
Once that is done press &amp;#039;c&amp;#039; again. You may need perform this process over several iterations. When everything is set correctly press &amp;#039;g&amp;#039; to generate the makefiles.&lt;br /&gt;
&lt;br /&gt;
At the shell type:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Assuming the build completed without errors you should now be able to access TexGen functions from within Python. In order to check everything worked as planned open Python in interactive mode by typing:&lt;br /&gt;
 python&lt;br /&gt;
&lt;br /&gt;
Then from within Python type:&lt;br /&gt;
 from TexGen.Core import *&lt;br /&gt;
 CTexGen.GetInstance().GetVersion()&lt;br /&gt;
&lt;br /&gt;
This should display the version of TexGen installed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Q:&amp;#039;&amp;#039;&amp;#039; I get the following error when linking _Core.so:&lt;br /&gt;
 libpython2.5.a(abstract.o): relocation R_X86_64_32 against `a local symbol&amp;#039;&lt;br /&gt;
 can not be used when making a shared object; recompile with -fPIC&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;A:&amp;#039;&amp;#039;&amp;#039; Try removing libpython2.5.a from the libraries to link to by setting PYTHON_LIBRARY to a bogus path, e.g.:&lt;br /&gt;
&lt;br /&gt;
PYTHON_LIBRARY: ~/&lt;br /&gt;
&lt;br /&gt;
By doing so you may receive a warning similar to this:&lt;br /&gt;
 Warning: Ignoring path found in link libraries for target: _Core, path is:&lt;br /&gt;
 /home/username. Expected a library name or a full path to a library name.&lt;br /&gt;
This warning may be ignored.&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Compiling from Source</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2007-09-28T14:48:42Z</updated>

		<summary type="html">&lt;p&gt;Wr: /* Cygwin and gcc */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to compile TexGen and &amp;#039;&amp;#039;&amp;#039;all&amp;#039;&amp;#039;&amp;#039; of its modules, the following software is required:&lt;br /&gt;
&lt;br /&gt;
The following programs are needed to build TexGen:&lt;br /&gt;
* [http://www.cmake.org/ CMake]&lt;br /&gt;
* [http://www.swig.org/ SWIG]&lt;br /&gt;
&lt;br /&gt;
The following libraries are needed to link to TexGen:&lt;br /&gt;
* [http://www.vtk.org/ VTK]&lt;br /&gt;
* [http://www.wxwidgets.org/ wxWidgets]&lt;br /&gt;
* [http://www.opencascade.org/ OpenCascade]&lt;br /&gt;
* [http://www.python.org/ Python]&lt;br /&gt;
&lt;br /&gt;
However to perform a minimum build of TexGen with none of the additional modules you only require CMake and a C++ compiler. It is recommended to begin with a minimum build, once that is working try adding modules one at a time. A list of modules along with dependencies is shown below:&lt;br /&gt;
&lt;br /&gt;
* Python interface: Python, SWIG&lt;br /&gt;
* Renderer: VTK&lt;br /&gt;
* Export: OpenCascade&lt;br /&gt;
* GUI: wxWidgets, Renderer, Python interface&lt;br /&gt;
* Unit tests: CPPUnit&lt;br /&gt;
&lt;br /&gt;
A graphical representation of the modules and their dependencies can also be found in the [http://texgen.sourceforge.net/api/ TexGen API].&lt;br /&gt;
&lt;br /&gt;
If you want to get the source code from the Subversion repository you will need to install [http://subversion.tigris.org/ Subversion] by following the instructions below. Note that this is the very latest development source and so may it contain some bugs and unfinished features. However it is very easy to keep up to date with the latest version of TexGen using this method and will allow you to keep any modifications you have made to the source when updating. If you find a bug or implement new features that may be usefull to the rest of the community they can also be submited as patch and incorporated into TexGen following review.&lt;br /&gt;
&lt;br /&gt;
Alternatively the stable source code can be downloaded as a [http://sourceforge.net/project/showfiles.php?group_id=181000 tarball]. Download the latest file release named &amp;#039;&amp;#039;texgen-3.x.x.tar.gz&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Windows compile ==&lt;br /&gt;
=== Microsoft Visual Studio C++ ===&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Cygwin and gcc ===&lt;br /&gt;
A limited build (without graphics) can be made under cygwin, this is a UNIX emulation environment available at [http://www.cygwin.com www.cygwin.com]. &lt;br /&gt;
This can exist peacefully next to the native windows version. &lt;br /&gt;
Cygwin creates a unix-style file system within your windows installation. If you choose c:/cygwin as your install directory, your HOME will be at c:/cygwin/home/&amp;lt;username&amp;gt;/. &lt;br /&gt;
&lt;br /&gt;
== Download cygwin and install packages ==&lt;br /&gt;
Install gcc, g++, wget, make and cmake using the setup.exe program from the cygwin website. &lt;br /&gt;
For the mesh generator and python interface to work we currently need VTK and swig. &lt;br /&gt;
&lt;br /&gt;
This downloads and installs swig from source (when starting the cygwin shell you can paste this into the command line, otherwise write it to a file and run it with sh). &lt;br /&gt;
 mkdir progs&lt;br /&gt;
 cd progs &lt;br /&gt;
 SWIG=swig-1.3.31&lt;br /&gt;
 wget -nc http://kent.dl.sourceforge.net/sourceforge/swig/$SWIG.tar.gz&lt;br /&gt;
 tar xzvf $SWIG.tar.gz &lt;br /&gt;
 cd $SWIG&lt;br /&gt;
 ./configure &lt;br /&gt;
 make &lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
This downloads and installs VTK from source, in the ccmake stage, use the cmake graphical commands to get a working install. &lt;br /&gt;
 VTK=vtk-5.0.3&lt;br /&gt;
 wget -nc http://www.vtk.org/files/release/5.0/$VTK.tar.gz&lt;br /&gt;
 tar xzvf $VTK.tar.gz&lt;br /&gt;
 mkdir vtkbin&lt;br /&gt;
 cd vtkbin&lt;br /&gt;
 ccmake ../VTK&lt;br /&gt;
 make &lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Now we can proceed to install texgen, as an example we&amp;#039;ll work in ~/temp/texgen&lt;br /&gt;
 cd ~; mkdir temp; cd temp; mkdir texgen; cd texgen&lt;br /&gt;
 svn checkout https://texgen.svn.sourceforge.net/svnroot/texgen/TexGen/trunk/ TexGen&lt;br /&gt;
 mkdir tbin&lt;br /&gt;
 cd tbin&lt;br /&gt;
 ccmake ../texgen&lt;br /&gt;
 make &lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
This should result in a working texgen install in ~/temp/texgen/tbin.&lt;br /&gt;
&lt;br /&gt;
== Unix compile ==&lt;br /&gt;
=== Notes ===&lt;br /&gt;
If you are installing to a system where you don&amp;#039;t have root access (i.e. this computer does not belong to you) you won&amp;#039;t be able to install the software using the default configure script. This is because by default software is installed to the /usr/local directory. If you are not a systems administrator then you will quite rightly not have write access to this folder. All is not lost! You can still install software into your home directory. In order to do this you should always call the configure script with the following parameter: --prefix=$HOME. This goes for all the software to be installed below. All executables will then be placed in ~/bin, libraries in ~/lib, includes in ~/include, etc...&lt;br /&gt;
&lt;br /&gt;
In the guide below the parameter is included in italic. If you do in fact have root access then it is recommended to omit this parameter and install to the default directory so that other users will also have access to the software.&lt;br /&gt;
&lt;br /&gt;
=== Get TexGen from Subversion repository ===&lt;br /&gt;
&lt;br /&gt;
==== Install Subversion ====&lt;br /&gt;
[http://subversion.tigris.org/servlets/ProjectDocumentList?collapseFolder=260&amp;amp;folderID=260 Download Subversion] and unpack.&lt;br /&gt;
Open a shell in extracted folder and type:&lt;br /&gt;
 ./configure --with-ssl &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* You will need to install Subversion with SSL support since TexGen is hosted on sourceforge which uses SSL. If you don&amp;#039;t configure with the --with-ssl flag you will get an error when trying to checkout TexGen in the next step.&lt;br /&gt;
* If you have trouble installing the latest version of Subversion, try installing version 1.3 as it does not require a seperate dependencies package.&lt;br /&gt;
&lt;br /&gt;
==== Checkout ====&lt;br /&gt;
Open a shell in folder you wish to place TexGen (e.g. ~/):&lt;br /&gt;
 svn checkout https://texgen.svn.sourceforge.net/svnroot/texgen/TexGen/trunk/ TexGen&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The first parameter tells SVN to get the files for the first time&lt;br /&gt;
* The second parameter is the location of the TexGen svn repository&lt;br /&gt;
* The final parameter is the subfolder to put the files in&lt;br /&gt;
&lt;br /&gt;
==== Update ====&lt;br /&gt;
The checkout command only needs to performed once. SVN keeps track of where the code was originally obtained and can update to the latest version without having to re-specify the location. In order to do that open a shell in the folder where TexGen was originally checkout (e.g. ~/TexGen) and type:&lt;br /&gt;
 svn update&lt;br /&gt;
or if you are in a hurry you can type the shorter version:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
=== Compile source ===&lt;br /&gt;
&lt;br /&gt;
==== Install CMake ====&lt;br /&gt;
&lt;br /&gt;
[http://www.cmake.org/HTML/Download.html Download CMake] and unpack.&lt;br /&gt;
Open a shell in extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Compile TexGen core ====&lt;br /&gt;
Open a shell in the folder with the TexGen source code (e.g. ~/TexGen):&lt;br /&gt;
 mkdir bin&lt;br /&gt;
 cd bin&lt;br /&gt;
 ccmake ../&lt;br /&gt;
Press &amp;#039;c&amp;#039; to configure. When a warning pops up telling you it can&amp;#039;t find such and such a file press &amp;#039;e&amp;#039; to close it. You will now need to specify which components of TexGen to build and where their dependencies can be found. Use the up and down arrows to move the caret and press enter to modify options. Do this to set BUILD_GUI, BUILD_PYTHON_INTERFACE and BUILD_RENDERER to OFF. You are basically telling CMake not to attempt to build these components, which means that you won&amp;#039;t need to have installed their dependencies.&lt;br /&gt;
&lt;br /&gt;
Similarly to the --prefix=$HOME parameter to the configure script, you can tell CMake to install TexGen to your home directory by changing CMAKE_INSTALL_PREFIX to ~/. Note that it won&amp;#039;t actually install anything until you get type make install.&lt;br /&gt;
&lt;br /&gt;
Now press &amp;#039;c&amp;#039; again to update the changes.&lt;br /&gt;
&lt;br /&gt;
Hopefully now that all the additional modules have been switched off no errors will be shown. Press &amp;#039;g&amp;#039; to generate the makefiles and exit. At the shell type:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Note that at this point you have only built and installed the TexGen Core library which doesn&amp;#039;t actually do anything on its own. If you plan to incorporate TexGen into your own C++ program then this is enough, however if you would like to interface with TexGen from a Python script or Graphical User Interface then follow the steps below.&lt;br /&gt;
&lt;br /&gt;
=== Compiling optional modules ===&lt;br /&gt;
==== Python interface ====&lt;br /&gt;
[http://www.python.org/download/ Download Python] and unpack.&lt;br /&gt;
Open a shell in the extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
[http://www.swig.org/download.html Download SWIG] and unpack.&lt;br /&gt;
Open a shell in the extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Open a shell in the folder where you called ccmake from for the first time (e.g. ~/TexGen/bin):&lt;br /&gt;
 ccmake ../&lt;br /&gt;
&lt;br /&gt;
Use the up and down arrows to reach BUILD_PYTHON_INTERFACE and press Enter to set it to ON. Then press &amp;#039;c&amp;#039; to configure. You will probably get a warning saying you need to specify the location of SWIG and/or Python, press &amp;#039;e&amp;#039; to close it.&lt;br /&gt;
&lt;br /&gt;
Set the PYTHON_INCLUDE_PATH, PYTHON_LIBRARY, PYTHON_SITEPACKAGES_DIR, SWIG_DIR and SWIG_EXECUTABLE parameters correctly where necessary. If you have installed packages to your home directory then they should look something like this:&lt;br /&gt;
&lt;br /&gt;
 PYTHON_INCLUDE_PATH: ~/include/python2.5&lt;br /&gt;
 PYTHON_LIBRARY: ~/lib/python2.5/config/libpython2.5.a&lt;br /&gt;
 PYTHON_SITEPACKAGES_DIR: ~/lib/python2.5/site-packages&lt;br /&gt;
 SWIG_DIR: ~/bin&lt;br /&gt;
 SWIG_EXECUTABLE: ~/bin/swig&lt;br /&gt;
&lt;br /&gt;
Once that is done press &amp;#039;c&amp;#039; again. You may need perform this process over several iterations. When everything is set correctly press &amp;#039;g&amp;#039; to generate the makefiles.&lt;br /&gt;
&lt;br /&gt;
At the shell type:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Assuming the build completed without errors you should now be able to access TexGen functions from within Python. In order to check everything worked as planned open Python in interactive mode by typing:&lt;br /&gt;
 python&lt;br /&gt;
&lt;br /&gt;
Then from within Python type:&lt;br /&gt;
 from TexGen.Core import *&lt;br /&gt;
 CTexGen.GetInstance().GetVersion()&lt;br /&gt;
&lt;br /&gt;
This should display the version of TexGen installed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Q:&amp;#039;&amp;#039;&amp;#039; I get the following error when linking _Core.so:&lt;br /&gt;
 libpython2.5.a(abstract.o): relocation R_X86_64_32 against `a local symbol&amp;#039;&lt;br /&gt;
 can not be used when making a shared object; recompile with -fPIC&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;A:&amp;#039;&amp;#039;&amp;#039; Try removing libpython2.5.a from the libraries to link to by setting PYTHON_LIBRARY to a bogus path, e.g.:&lt;br /&gt;
&lt;br /&gt;
PYTHON_LIBRARY: ~/&lt;br /&gt;
&lt;br /&gt;
By doing so you may receive a warning similar to this:&lt;br /&gt;
 Warning: Ignoring path found in link libraries for target: _Core, path is:&lt;br /&gt;
 /home/username. Expected a library name or a full path to a library name.&lt;br /&gt;
This warning may be ignored.&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Compiling from Source</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2007-09-28T13:53:31Z</updated>

		<summary type="html">&lt;p&gt;Wr: /* Microsoft Visual Studio C++ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to compile TexGen and &amp;#039;&amp;#039;&amp;#039;all&amp;#039;&amp;#039;&amp;#039; of its modules, the following software is required:&lt;br /&gt;
&lt;br /&gt;
The following programs are needed to build TexGen:&lt;br /&gt;
* [http://www.cmake.org/ CMake]&lt;br /&gt;
* [http://www.swig.org/ SWIG]&lt;br /&gt;
&lt;br /&gt;
The following libraries are needed to link to TexGen:&lt;br /&gt;
* [http://www.vtk.org/ VTK]&lt;br /&gt;
* [http://www.wxwidgets.org/ wxWidgets]&lt;br /&gt;
* [http://www.opencascade.org/ OpenCascade]&lt;br /&gt;
* [http://www.python.org/ Python]&lt;br /&gt;
&lt;br /&gt;
However to perform a minimum build of TexGen with none of the additional modules you only require CMake and a C++ compiler. It is recommended to begin with a minimum build, once that is working try adding modules one at a time. A list of modules along with dependencies is shown below:&lt;br /&gt;
&lt;br /&gt;
* Python interface: Python, SWIG&lt;br /&gt;
* Renderer: VTK&lt;br /&gt;
* Export: OpenCascade&lt;br /&gt;
* GUI: wxWidgets, Renderer, Python interface&lt;br /&gt;
* Unit tests: CPPUnit&lt;br /&gt;
&lt;br /&gt;
A graphical representation of the modules and their dependencies can also be found in the [http://texgen.sourceforge.net/api/ TexGen API].&lt;br /&gt;
&lt;br /&gt;
If you want to get the source code from the Subversion repository you will need to install [http://subversion.tigris.org/ Subversion] by following the instructions below. Note that this is the very latest development source and so may it contain some bugs and unfinished features. However it is very easy to keep up to date with the latest version of TexGen using this method and will allow you to keep any modifications you have made to the source when updating. If you find a bug or implement new features that may be usefull to the rest of the community they can also be submited as patch and incorporated into TexGen following review.&lt;br /&gt;
&lt;br /&gt;
Alternatively the stable source code can be downloaded as a [http://sourceforge.net/project/showfiles.php?group_id=181000 tarball]. Download the latest file release named &amp;#039;&amp;#039;texgen-3.x.x.tar.gz&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Windows compile ==&lt;br /&gt;
=== Microsoft Visual Studio C++ ===&lt;br /&gt;
Todo...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Cygwin and gcc ===&lt;br /&gt;
A limited build (without graphics) can be made under cygwin, this is a UNIX emulation environment available at [http://www.cygwin.com www.cygwin.com]. &lt;br /&gt;
This can exist peacefully next to the native windows version. &lt;br /&gt;
Cygwin creates a unix-style file system within your windows installation. If you choose c:/cygwin as your install directory, your HOME will be at c:/cygwin/home/&amp;lt;username&amp;gt;/. &lt;br /&gt;
&lt;br /&gt;
Further instructions presume you operate from the cygwin shell. &lt;br /&gt;
&lt;br /&gt;
Use svn as described on [http://sourceforge.net/svn/?group_id=181000 texgen svn instructions].&lt;br /&gt;
Checkout the full source in a directory within&lt;br /&gt;
&lt;br /&gt;
== Unix compile ==&lt;br /&gt;
=== Notes ===&lt;br /&gt;
If you are installing to a system where you don&amp;#039;t have root access (i.e. this computer does not belong to you) you won&amp;#039;t be able to install the software using the default configure script. This is because by default software is installed to the /usr/local directory. If you are not a systems administrator then you will quite rightly not have write access to this folder. All is not lost! You can still install software into your home directory. In order to do this you should always call the configure script with the following parameter: --prefix=$HOME. This goes for all the software to be installed below. All executables will then be placed in ~/bin, libraries in ~/lib, includes in ~/include, etc...&lt;br /&gt;
&lt;br /&gt;
In the guide below the parameter is included in italic. If you do in fact have root access then it is recommended to omit this parameter and install to the default directory so that other users will also have access to the software.&lt;br /&gt;
&lt;br /&gt;
=== Get TexGen from Subversion repository ===&lt;br /&gt;
&lt;br /&gt;
==== Install Subversion ====&lt;br /&gt;
[http://subversion.tigris.org/servlets/ProjectDocumentList?collapseFolder=260&amp;amp;folderID=260 Download Subversion] and unpack.&lt;br /&gt;
Open a shell in extracted folder and type:&lt;br /&gt;
 ./configure --with-ssl &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* You will need to install Subversion with SSL support since TexGen is hosted on sourceforge which uses SSL. If you don&amp;#039;t configure with the --with-ssl flag you will get an error when trying to checkout TexGen in the next step.&lt;br /&gt;
* If you have trouble installing the latest version of Subversion, try installing version 1.3 as it does not require a seperate dependencies package.&lt;br /&gt;
&lt;br /&gt;
==== Checkout ====&lt;br /&gt;
Open a shell in folder you wish to place TexGen (e.g. ~/):&lt;br /&gt;
 svn checkout https://texgen.svn.sourceforge.net/svnroot/texgen/TexGen/trunk/ TexGen&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* The first parameter tells SVN to get the files for the first time&lt;br /&gt;
* The second parameter is the location of the TexGen svn repository&lt;br /&gt;
* The final parameter is the subfolder to put the files in&lt;br /&gt;
&lt;br /&gt;
==== Update ====&lt;br /&gt;
The checkout command only needs to performed once. SVN keeps track of where the code was originally obtained and can update to the latest version without having to re-specify the location. In order to do that open a shell in the folder where TexGen was originally checkout (e.g. ~/TexGen) and type:&lt;br /&gt;
 svn update&lt;br /&gt;
or if you are in a hurry you can type the shorter version:&lt;br /&gt;
 svn up&lt;br /&gt;
&lt;br /&gt;
=== Compile source ===&lt;br /&gt;
&lt;br /&gt;
==== Install CMake ====&lt;br /&gt;
&lt;br /&gt;
[http://www.cmake.org/HTML/Download.html Download CMake] and unpack.&lt;br /&gt;
Open a shell in extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Compile TexGen core ====&lt;br /&gt;
Open a shell in the folder with the TexGen source code (e.g. ~/TexGen):&lt;br /&gt;
 mkdir bin&lt;br /&gt;
 cd bin&lt;br /&gt;
 ccmake ../&lt;br /&gt;
Press &amp;#039;c&amp;#039; to configure. When a warning pops up telling you it can&amp;#039;t find such and such a file press &amp;#039;e&amp;#039; to close it. You will now need to specify which components of TexGen to build and where their dependencies can be found. Use the up and down arrows to move the caret and press enter to modify options. Do this to set BUILD_GUI, BUILD_PYTHON_INTERFACE and BUILD_RENDERER to OFF. You are basically telling CMake not to attempt to build these components, which means that you won&amp;#039;t need to have installed their dependencies.&lt;br /&gt;
&lt;br /&gt;
Similarly to the --prefix=$HOME parameter to the configure script, you can tell CMake to install TexGen to your home directory by changing CMAKE_INSTALL_PREFIX to ~/. Note that it won&amp;#039;t actually install anything until you get type make install.&lt;br /&gt;
&lt;br /&gt;
Now press &amp;#039;c&amp;#039; again to update the changes.&lt;br /&gt;
&lt;br /&gt;
Hopefully now that all the additional modules have been switched off no errors will be shown. Press &amp;#039;g&amp;#039; to generate the makefiles and exit. At the shell type:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Note that at this point you have only built and installed the TexGen Core library which doesn&amp;#039;t actually do anything on its own. If you plan to incorporate TexGen into your own C++ program then this is enough, however if you would like to interface with TexGen from a Python script or Graphical User Interface then follow the steps below.&lt;br /&gt;
&lt;br /&gt;
=== Compiling optional modules ===&lt;br /&gt;
==== Python interface ====&lt;br /&gt;
[http://www.python.org/download/ Download Python] and unpack.&lt;br /&gt;
Open a shell in the extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
[http://www.swig.org/download.html Download SWIG] and unpack.&lt;br /&gt;
Open a shell in the extracted folder and type:&lt;br /&gt;
 ./configure &amp;#039;&amp;#039;--prefix=$HOME&amp;#039;&amp;#039;&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Open a shell in the folder where you called ccmake from for the first time (e.g. ~/TexGen/bin):&lt;br /&gt;
 ccmake ../&lt;br /&gt;
&lt;br /&gt;
Use the up and down arrows to reach BUILD_PYTHON_INTERFACE and press Enter to set it to ON. Then press &amp;#039;c&amp;#039; to configure. You will probably get a warning saying you need to specify the location of SWIG and/or Python, press &amp;#039;e&amp;#039; to close it.&lt;br /&gt;
&lt;br /&gt;
Set the PYTHON_INCLUDE_PATH, PYTHON_LIBRARY, PYTHON_SITEPACKAGES_DIR, SWIG_DIR and SWIG_EXECUTABLE parameters correctly where necessary. If you have installed packages to your home directory then they should look something like this:&lt;br /&gt;
&lt;br /&gt;
 PYTHON_INCLUDE_PATH: ~/include/python2.5&lt;br /&gt;
 PYTHON_LIBRARY: ~/lib/python2.5/config/libpython2.5.a&lt;br /&gt;
 PYTHON_SITEPACKAGES_DIR: ~/lib/python2.5/site-packages&lt;br /&gt;
 SWIG_DIR: ~/bin&lt;br /&gt;
 SWIG_EXECUTABLE: ~/bin/swig&lt;br /&gt;
&lt;br /&gt;
Once that is done press &amp;#039;c&amp;#039; again. You may need perform this process over several iterations. When everything is set correctly press &amp;#039;g&amp;#039; to generate the makefiles.&lt;br /&gt;
&lt;br /&gt;
At the shell type:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Assuming the build completed without errors you should now be able to access TexGen functions from within Python. In order to check everything worked as planned open Python in interactive mode by typing:&lt;br /&gt;
 python&lt;br /&gt;
&lt;br /&gt;
Then from within Python type:&lt;br /&gt;
 from TexGen.Core import *&lt;br /&gt;
 CTexGen.GetInstance().GetVersion()&lt;br /&gt;
&lt;br /&gt;
This should display the version of TexGen installed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Q:&amp;#039;&amp;#039;&amp;#039; I get the following error when linking _Core.so:&lt;br /&gt;
 libpython2.5.a(abstract.o): relocation R_X86_64_32 against `a local symbol&amp;#039;&lt;br /&gt;
 can not be used when making a shared object; recompile with -fPIC&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;A:&amp;#039;&amp;#039;&amp;#039; Try removing libpython2.5.a from the libraries to link to by setting PYTHON_LIBRARY to a bogus path, e.g.:&lt;br /&gt;
&lt;br /&gt;
PYTHON_LIBRARY: ~/&lt;br /&gt;
&lt;br /&gt;
By doing so you may receive a warning similar to this:&lt;br /&gt;
 Warning: Ignoring path found in link libraries for target: _Core, path is:&lt;br /&gt;
 /home/username. Expected a library name or a full path to a library name.&lt;br /&gt;
This warning may be ignored.&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Talk:Compiling from Source</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2007-01-04T10:02:13Z</updated>

		<summary type="html">&lt;p&gt;Wr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Just a quick note on the installation of OpenCASCADE on debian linux amd64, I&lt;br /&gt;
didn&amp;#039;t find it entirely trivial, so here it goes:&lt;br /&gt;
&lt;br /&gt;
Apt install the following packages, more may be needed, but this was what&lt;br /&gt;
I needed on top of what I had:&lt;br /&gt;
&lt;br /&gt;
    apt-get install sun-java5-jdk&lt;br /&gt;
    apt-get install g++-3.4&lt;br /&gt;
    apt-get install libstlport5-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install in whatever directory you find suitable, I install things in&lt;br /&gt;
$HOME/progs. &lt;br /&gt;
&lt;br /&gt;
get OpenCASCADE_Linux.tgz from the download section. &lt;br /&gt;
&lt;br /&gt;
in $HOME/progs&lt;br /&gt;
    mkdir OpenCASCADE&lt;br /&gt;
    mv OpenCASCADE_Linux.tgz OpenCASCADE&lt;br /&gt;
    cd OpenCASCADE &lt;br /&gt;
    tar xzvf OpenCASCADE_Linux.tgz&lt;br /&gt;
    cd Linux&lt;br /&gt;
    java -cp setup.jar run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in $HOME/progs/OpenCASCADE/Linux/ros/run_all.sh (if that is where you&lt;br /&gt;
installshielded the thing to) write the following (adjust options to what you&lt;br /&gt;
need/want/have, but make sure that you don&amp;#039;t use gcc-4x):&lt;br /&gt;
    csh env.csh&lt;br /&gt;
    export CC=gcc-3.4&lt;br /&gt;
    export CXX=g++-3.4&lt;br /&gt;
    export JAVAHOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.10&lt;br /&gt;
    export CASROOT=$HOME/progs/OpenCASCADE/Linux/ros&lt;br /&gt;
    ./configure --with-java-include=$JAVAHOME/include \&lt;br /&gt;
        --with-gl-include=/usr/include/ --with-gl-library=/usr/lib/ --with-x \&lt;br /&gt;
        --with-pic --with-xmu-include=/usr/include/X11/ \&lt;br /&gt;
        --with-xmu-library=/usr/lib/ \&lt;br /&gt;
        --with-stlport-include=/usr/include/c++/3.4/ \&lt;br /&gt;
        --with-stlport-libname=stlport \&lt;br /&gt;
        --with-stlport-library=/usr/lib/ \&lt;br /&gt;
        --enable-debug &lt;br /&gt;
    make &lt;br /&gt;
&lt;br /&gt;
open &amp;quot;configure&amp;quot; and edit from line 14772 so that the following lines read:&lt;br /&gt;
   if test &amp;quot;X$enable_debug&amp;quot; = &amp;quot;Xyes&amp;quot;; then&lt;br /&gt;
     CFLAGS=&amp;quot;$CFLAGS -g -DDEB -D_DEBUG -DCSFDB&amp;quot;  &lt;br /&gt;
     CXXFLAGS=&amp;quot;$CXXFLAGS -g -DDEB -D_DEBUG -DCSFDB&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     CFLAGS=&amp;quot;$CFLAGS -DNDEBUG  -DNo_Exception -DCSFDB &amp;quot;&lt;br /&gt;
     CXXFLAGS=&amp;quot;$CXXFLAGS -DNDEBUG  -DNo_Exception -DCSFDB &amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
&lt;br /&gt;
and change the lines in &amp;quot;configure&amp;quot; to set the following entries&lt;br /&gt;
   TCL_INCLUDE_FLAG=&amp;quot;-I/usr/include/tcl8.4/&amp;quot;&lt;br /&gt;
   TK_INCLUDE_FLAG=&amp;quot;-I/usr/include/tcl8.4/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
then, on the command line: &lt;br /&gt;
    chmod +x configure &lt;br /&gt;
    chmod +x run_all.sh&lt;br /&gt;
    ./run_all.sh&lt;br /&gt;
&lt;br /&gt;
And then wait and wait and wait and wait....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I don&amp;#039;t know how (sub)optimal such an install is, I&amp;#039;ll try to provide updates as&lt;br /&gt;
I get them. &lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
W&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Talk:Compiling from Source</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2007-01-03T17:11:38Z</updated>

		<summary type="html">&lt;p&gt;Wr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Just a quick note on the installation of OpenCASCADE on debian linux amd64, I&lt;br /&gt;
didn&amp;#039;t find it entirely trivial, so here it goes:&lt;br /&gt;
&lt;br /&gt;
Apt install the following packages, more may be needed, but this was what&lt;br /&gt;
I needed on top of what I had:&lt;br /&gt;
&lt;br /&gt;
    apt-get install sun-java5-jdk&lt;br /&gt;
    apt-get install g++-3.4&lt;br /&gt;
    apt-get install libstlport5-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install in whatever directory you find suitable, I install things in&lt;br /&gt;
$HOME/progs. &lt;br /&gt;
&lt;br /&gt;
get OpenCASCADE_Linux.tgz from the download section. &lt;br /&gt;
&lt;br /&gt;
in $HOME/progs&lt;br /&gt;
    mkdir OpenCASCADE&lt;br /&gt;
    mv OpenCASCADE_Linux.tgz OpenCASCADE&lt;br /&gt;
    cd OpenCASCADE &lt;br /&gt;
    tar xzvf OpenCASCADE_Linux.tgz&lt;br /&gt;
    cd Linux&lt;br /&gt;
    java -cp setup.jar run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in $HOME/progs/OpenCASCADE/Linux/ros/run_all.sh (if that is where you&lt;br /&gt;
installshielded the thing to) write the following (adjust options to what you&lt;br /&gt;
need/want/have, but make sure that you don&amp;#039;t use gcc-4x):&lt;br /&gt;
    csh env.csh&lt;br /&gt;
    export CC=gcc-3.4&lt;br /&gt;
    export CXX=g++-3.4&lt;br /&gt;
    export JAVAHOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.10&lt;br /&gt;
    export CASROOT=$HOME/progs/OpenCASCADE/Linux/ros&lt;br /&gt;
    ./configure --with-java-include=$JAVAHOME/include \&lt;br /&gt;
        --with-gl-include=/usr/include/ --with-gl-library=/usr/lib/ --with-x \&lt;br /&gt;
        --with-pic --with-xmu-include=/usr/include/X11/ \&lt;br /&gt;
        --with-xmu-library=/usr/lib/ \&lt;br /&gt;
        --with-stlport-include=/usr/include/c++/3.4/ \&lt;br /&gt;
        --with-stlport-libname=stlport \&lt;br /&gt;
        --with-stlport-library=/usr/lib/ \&lt;br /&gt;
        --enable-debug &lt;br /&gt;
    make &lt;br /&gt;
&lt;br /&gt;
open &amp;quot;configure&amp;quot; and edit from line 14772 so that the following lines read:&lt;br /&gt;
   if test &amp;quot;X$enable_debug&amp;quot; = &amp;quot;Xyes&amp;quot;; then&lt;br /&gt;
     CFLAGS=&amp;quot;$CFLAGS -g -DDEB -D_DEBUG -DCSFDB&amp;quot;  &lt;br /&gt;
     CXXFLAGS=&amp;quot;$CXXFLAGS -g -DDEB -D_DEBUG -DCSFDB&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     CFLAGS=&amp;quot;$CFLAGS -DNDEBUG  -DNo_Exception -DCSFDB &amp;quot;&lt;br /&gt;
     CXXFLAGS=&amp;quot;$CXXFLAGS -DNDEBUG  -DNo_Exception -DCSFDB &amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then, on the command line: &lt;br /&gt;
    chmod +x configure &lt;br /&gt;
    chmod +x run_all.sh&lt;br /&gt;
    ./run_all.sh&lt;br /&gt;
&lt;br /&gt;
And then wait and wait and wait and wait....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I don&amp;#039;t know how (sub)optimal such an install is, I&amp;#039;ll try to provide updates as&lt;br /&gt;
I get them. &lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
W&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Talk:Compiling from Source</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2007-01-03T17:04:00Z</updated>

		<summary type="html">&lt;p&gt;Wr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Just a quick note on the installation of OpenCASCADE on debian linux amd64, I&lt;br /&gt;
didn&amp;#039;t find it entirely trivial, so here it goes:&lt;br /&gt;
&lt;br /&gt;
Apt install the following packages, more may be needed, but this was what&lt;br /&gt;
I needed on top of what I had:&lt;br /&gt;
&lt;br /&gt;
    apt-get install sun-java5-jdk&lt;br /&gt;
    apt-get install g++-3.4&lt;br /&gt;
    apt-get install libstlport5-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install in whatever directory you find suitable, I install things in&lt;br /&gt;
$HOME/progs. &lt;br /&gt;
&lt;br /&gt;
get OpenCASCADE_Linux.tgz from the download section. &lt;br /&gt;
&lt;br /&gt;
in $HOME/progs&lt;br /&gt;
    mkdir OpenCASCADE&lt;br /&gt;
    mv OpenCASCADE_Linux.tgz OpenCASCADE&lt;br /&gt;
    cd OpenCASCADE &lt;br /&gt;
    tar xzvf OpenCASCADE_Linux.tgz&lt;br /&gt;
    cd Linux&lt;br /&gt;
    java -cp setup.jar run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in $HOME/progs/OpenCASCADE/Linux/ros/run_all.sh (if that is where you&lt;br /&gt;
installshielded the thing to) write the following (adjust options to what you&lt;br /&gt;
need/want/have, but make sure that you don&amp;#039;t use gcc-4x):&lt;br /&gt;
    csh env.csh&lt;br /&gt;
    export CC=gcc-3.4&lt;br /&gt;
    export CXX=g++-3.4&lt;br /&gt;
    export JAVAHOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.10&lt;br /&gt;
    export CASROOT=/home/wout/progs/OpenCASCADE/Linux/ros&lt;br /&gt;
    ./configure --with-java-include=$JAVAHOME/include \&lt;br /&gt;
        --with-gl-include=/usr/include/ --with-gl-library=/usr/lib/ --with-x \&lt;br /&gt;
        --with-pic --with-xmu-include=/usr/include/X11/ \&lt;br /&gt;
        --with-xmu-library=/usr/lib/ \&lt;br /&gt;
        --with-stlport-include=/usr/include/c++/3.4/ \&lt;br /&gt;
        --with-stlport-libname=stlport \&lt;br /&gt;
        --with-stlport-library=/usr/lib/ \&lt;br /&gt;
        --enable-debug &lt;br /&gt;
    make &lt;br /&gt;
&lt;br /&gt;
open &amp;quot;configure&amp;quot; and edit from line 14772 so that the following lines read:&lt;br /&gt;
   if test &amp;quot;X$enable_debug&amp;quot; = &amp;quot;Xyes&amp;quot;; then&lt;br /&gt;
     CFLAGS=&amp;quot;$CFLAGS -g -DDEB -D_DEBUG -DCSFDB&amp;quot;  &lt;br /&gt;
     CXXFLAGS=&amp;quot;$CXXFLAGS -g -DDEB -D_DEBUG -DCSFDB&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     CFLAGS=&amp;quot;$CFLAGS -DNDEBUG  -DNo_Exception -DCSFDB &amp;quot;&lt;br /&gt;
     CXXFLAGS=&amp;quot;$CXXFLAGS -DNDEBUG  -DNo_Exception -DCSFDB &amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then, on the command line: &lt;br /&gt;
    chmod +x configure &lt;br /&gt;
    chmod +x run_all.sh&lt;br /&gt;
    ./run_all.sh&lt;br /&gt;
&lt;br /&gt;
And then wait and wait and wait and wait....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I don&amp;#039;t know how (sub)optimal such an install is, I&amp;#039;ll try to provide updates as&lt;br /&gt;
I get them. &lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
W&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Talk:Compiling from Source</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2006-12-29T16:53:56Z</updated>

		<summary type="html">&lt;p&gt;Wr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Talk:Compiling from Source</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2006-12-29T16:06:09Z</updated>

		<summary type="html">&lt;p&gt;Wr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Just a quick note on the installation of OpenCASCADE on debian linux amd64, I&lt;br /&gt;
didn&amp;#039;t find it entirely trivial, so here it goes:&lt;br /&gt;
&lt;br /&gt;
Apt install the following packages, more may be needed, but this was what&lt;br /&gt;
I needed on top of what I had:&lt;br /&gt;
&lt;br /&gt;
    apt-get install sun-java5-jdk&lt;br /&gt;
    apt-get install g++-3.4&lt;br /&gt;
    apt-get install libstlport5-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install in whatever directory you find suitable, I install things in&lt;br /&gt;
$HOME/progs. &lt;br /&gt;
&lt;br /&gt;
get OpenCASCADE_Linux.tgz from the download section. &lt;br /&gt;
&lt;br /&gt;
in $HOME/progs&lt;br /&gt;
    mkdir OpenCASCADE&lt;br /&gt;
    mv OpenCASCADE_Linux.tgz OpenCASCADE&lt;br /&gt;
    cd OpenCASCADE &lt;br /&gt;
    tar xzvf OpenCASCADE_Linux.tgz&lt;br /&gt;
    cd Linux&lt;br /&gt;
    java -cp setup.jar run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in $HOME/progs/OpenCASCADE/Linux/ros/run_all.sh (if that is where you&lt;br /&gt;
installshielded the thing to) write the following (adjust options to what you&lt;br /&gt;
need/want/have, but make sure that you don&amp;#039;t use gcc-4x):&lt;br /&gt;
    csh env.csh&lt;br /&gt;
    export CC=gcc-3.4&lt;br /&gt;
    export CXX=g++-3.4&lt;br /&gt;
    export JAVAHOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.10&lt;br /&gt;
    export CASROOT=$HOME/progs/OpenCASCADE/Linux/ros&lt;br /&gt;
    ./configure --with-java-include=$JAVAHOME/include \&lt;br /&gt;
        --with-gl-include=/usr/include/ --with-gl-library=/usr/lib/ --with-x \&lt;br /&gt;
        --with-pic --with-xmu-include=/usr/include/X11/ \&lt;br /&gt;
        --with-xmu-library=/usr/lib/ \&lt;br /&gt;
        --with-stlport-include=/usr/include/c++/3.4/ \&lt;br /&gt;
        --with-stlport-libname=libstlport.so \&lt;br /&gt;
        --with-stlport-library=/usr/lib/ \&lt;br /&gt;
        --enable-debug &lt;br /&gt;
    make &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then, on the command line: &lt;br /&gt;
    chmod +x configure &lt;br /&gt;
    chmod +x run_all.sh&lt;br /&gt;
    ./run_all.sh&lt;br /&gt;
&lt;br /&gt;
And then wait and wait and wait and wait....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I don&amp;#039;t know how (sub)optimal such an install is, I&amp;#039;ll try to provide updates as&lt;br /&gt;
I get them. &lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
W&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Talk:Compiling from Source</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2006-12-29T16:04:09Z</updated>

		<summary type="html">&lt;p&gt;Wr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Just a quick note on the installation of OpenCASCADE on debian linux amd64, I&lt;br /&gt;
didn&amp;#039;t find it entirely trivial, so here it goes:&lt;br /&gt;
&lt;br /&gt;
Apt install the following packages, more may be needed, but this was what&lt;br /&gt;
I needed on top of what I had:&lt;br /&gt;
&lt;br /&gt;
    apt-get install sun-java5-jdk&lt;br /&gt;
    apt-get install g++-3.4&lt;br /&gt;
    apt-get install libstlport5-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
install in whatever directory you find suitable, I install things in&lt;br /&gt;
$HOME/progs. &lt;br /&gt;
&lt;br /&gt;
get OpenCASCADE_Linux.tgz from the download section. &lt;br /&gt;
&lt;br /&gt;
in $HOME/progs&lt;br /&gt;
    mkdir OpenCASCADE&lt;br /&gt;
    mv OpenCASCADE_Linux.tgz OpenCASCADE&lt;br /&gt;
    cd OpenCASCADE &lt;br /&gt;
    tar xzvf OpenCASCADE_Linux.tgz&lt;br /&gt;
    cd Linux&lt;br /&gt;
    java -cp setup.jar run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in $HOME/progs/OpenCASCADE/Linux/ros/run_all.sh (if that is where you&lt;br /&gt;
installshielded the thing to) write the following (adjust options to what you&lt;br /&gt;
need/want/have, but make sure that you don&amp;#039;t use gcc-4x):&lt;br /&gt;
    csh env.csh&lt;br /&gt;
    export CC=gcc-3.4&lt;br /&gt;
    export CXX=g++-3.4&lt;br /&gt;
    export JAVAHOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.10&lt;br /&gt;
    export CASROOT=/home/wout/progs/OpenCASCADE/Linux/ros&lt;br /&gt;
    ./configure --with-java-include=$JAVAHOME/include \&lt;br /&gt;
        --with-gl-include=/usr/include/ --with-gl-library=/usr/lib/ --with-x \&lt;br /&gt;
        --with-pic --with-xmu-include=/usr/include/X11/ \&lt;br /&gt;
        --with-xmu-library=/usr/lib/ \&lt;br /&gt;
        --with-stlport-include=/usr/include/c++/3.4/ \&lt;br /&gt;
        --with-stlport-libname=libstlport.so \&lt;br /&gt;
        --with-stlport-library=/usr/lib/ \&lt;br /&gt;
        --enable-debug &lt;br /&gt;
    make &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then, on the command line: &lt;br /&gt;
    chmod +x configure &lt;br /&gt;
    chmod +x run_all.sh&lt;br /&gt;
    ./run_all.sh&lt;br /&gt;
&lt;br /&gt;
And then wait and wait and wait and wait....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I don&amp;#039;t know how (sub)optimal such an install is, I&amp;#039;ll try to provide updates as&lt;br /&gt;
I get them. &lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
W&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>User Guide</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2006-12-19T13:39:23Z</updated>

		<summary type="html">&lt;p&gt;Wr: /* Example 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are several ways to interface with TexGen. A little bit of technical information is necessary to understand how this all fits together. The core TexGen functionality has been written in C++, on top of this a Python interface exists that has access to all the C++ functions of TexGen. There are many advantages of a Python interface that may not be immediatly obvious to the end user.&lt;br /&gt;
&lt;br /&gt;
A user friendly Graphical User Interface has been built on top of the Python interface to provide a quick and easy method to interface with TexGen. But the real power comes with writing small Python scripts which will be discussed later.&lt;br /&gt;
&lt;br /&gt;
==Graphical User Interface==&lt;br /&gt;
&lt;br /&gt;
The GUI is the easiest way to use TexGen, although a lot of TexGen features are not accessible via the graphical user interface. It is a good starting point to explore the capabilites of TexGen, but for the serious user the Python interface is recommended.&lt;br /&gt;
&lt;br /&gt;
===Layout===&lt;br /&gt;
&lt;br /&gt;
The GUI layout is similar to that of ABAQUS CAE for those familiar with it.&lt;br /&gt;
&lt;br /&gt;
The left side of the screen contains the controls to interact with TexGen. These controls are identical to the ones shown in the drop down menu at the top. Use which ever is most convenient.&lt;br /&gt;
&lt;br /&gt;
The right of the screen contains the 3d rendering of the model(s). Several models can be opened at once, all operations apply to the current model in view.&lt;br /&gt;
&lt;br /&gt;
Finally, the bottom of the screen contains an interactive &amp;#039;&amp;#039;Python Console&amp;#039;&amp;#039; along with two log windows. The interactive console allows the user to input Python commands directly. This can be useful for small operations and learning how to use the python scripting interface. For inputting a large number of Python commands it is more convenient to save it in a Python script and execute it all at once.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;Python Output&amp;#039;&amp;#039; log window displays all the Python code executed by the GUI. Essentially every button pressed in the user interface will create a Python command. This is done by design, making it possible to record Python scripts while interacting with the GUI. If you know how to do something with the GUI, you then automatically know how to do it with a Python script because the code is displayed.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;TexGen Output&amp;#039;&amp;#039; log window displays log and error messages from TexGen. These generally include information on what TexGen is doing, if something goes wrong it is useful to read the log to find out what happened. Error messages will be displayed in red so that they can be easily located.&lt;br /&gt;
&lt;br /&gt;
If new messages are posted one of the log windows while it is inactive, the icon above the window will change. In the case of receiving an error message the icon will change to an error icon.&lt;br /&gt;
&lt;br /&gt;
==Python Interface==&lt;br /&gt;
[http://www.python.org/ Python] is a high level interpreted programming language. In this case it is used as a scripting language to allow easy access to TexGen functionality. Python has been embedded in the TexGen GUI which allows the GUI to run python scripts. The goal of this tutorial is not to teach Python programming, there are plenty of resources online for that. A few of them are listed below:&lt;br /&gt;
&lt;br /&gt;
* [http://www.poromenos.org/tutorials/python Learn Python in 10 minutes] - Quick introduction to Python for competent programmers.&lt;br /&gt;
* [http://docs.python.org/tut/tut.html Python Tutorial] - Official Python tutorial (requires some programming knowledge).&lt;br /&gt;
* [http://www.greenteapress.com/thinkpython/ How to Think Like a Computer Scientist: Learning with Python] - Book on Python programming for beginners. [http://www.greenteapress.com/thinkpython/html/ HTML Version]&lt;br /&gt;
* [http://diveintopython.org/ Dive Into Python] - In depth book covering advanced subjects in a comprehensive manner. [http://diveintopython.org/toc/index.html HTML Version]&lt;br /&gt;
&lt;br /&gt;
An advanced knowledge of Python is not needed in order to write simple TexGen scripts. However, bear in mind that Python is a very powerful language with many libraries included for performing common tasks. I suggest you try to follow through the examples below and if you get stuck refer to one of the documents above.&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
First of all, a Python script is just a plain ASCII text file with a .py extension. To create one simply open up your favorite text editor. Notepad will do if you have nothing else but I suggest a more powerful freeware text editor like [http://www.pspad.com/ PSPad]. Code that goes into the python script will be displayed like so:&lt;br /&gt;
&lt;br /&gt;
 # All Python code will be shown in a box like this one.&lt;br /&gt;
 # Lines begining with a &amp;#039;#&amp;#039; character are comments&lt;br /&gt;
&lt;br /&gt;
In this example, we will create a simple 2x2 plain weave model with a Python script. Its time to dive in and see some actual Python code. At this point if you are completely lost please refer back to the resources on Python programming. The first step is to create an instance of the &amp;lt;code&amp;gt;CTextileWeave2D&amp;lt;/code&amp;gt; class and give it a name, &amp;lt;code&amp;gt;weave&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # Create a 2D weave textile&lt;br /&gt;
 weave = CTextileWeave2D(2, 2, 1, 0.2, True)&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;CTextileWeave2D&amp;lt;/code&amp;gt; class takes 5 parameters in the order shown below:&lt;br /&gt;
* Number of weft yarns in the unit cell&lt;br /&gt;
* Number of warp yarns in the unit cell&lt;br /&gt;
* Spacing between the yarns&lt;br /&gt;
* Thickness of the fabrics&lt;br /&gt;
* Refine model (True/False)&lt;br /&gt;
&lt;br /&gt;
The only parameter that really needs an explanation here is the Refine model option, this controls whether or not the interference correction algorithm will be applied to keep the yarn volumes from intersecting which is a common problem. The interference correction algorithm generally does a good job but is not instantaneous so sometimes it can be beneficial to switch it off.&lt;br /&gt;
&lt;br /&gt;
This is the bare minimum information necessary to create a 2D woven fabric. In the following steps we will add more information to create the model the way we want it.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s set the weave pattern, this determines whether a warp or weft yarn will appear on top at a particular cross over. Cross overs are arranged in 2d grid where the size of the grid depends on the number of warp and weft yarns created. To swap the positions of the weft and warp yarns, we call the function &amp;lt;code&amp;gt;SwapPosition&amp;lt;/code&amp;gt; with the grid coordinates of the cross over. In order to create a plain weave we need to do this on two diagonally opposite cross overs like so:&lt;br /&gt;
&lt;br /&gt;
 # Set the weave pattern&lt;br /&gt;
 weave.SwapPosition(0, 0)&lt;br /&gt;
 weave.SwapPosition(1, 1)&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s add our &amp;lt;code&amp;gt;weave&amp;lt;/code&amp;gt; model to the database of models so that TexGen can render it:&lt;br /&gt;
&lt;br /&gt;
 # Add the textile&lt;br /&gt;
 AddTextile(weave)&lt;br /&gt;
&lt;br /&gt;
Thats it! This is a very simple script but it will generate a plain weave model. To recap your Python script should look like this:&lt;br /&gt;
&lt;br /&gt;
 # Create a 2D weave textile&lt;br /&gt;
 weave = CTextileWeave2D(2, 2, 1, 0.2, True)&lt;br /&gt;
 &lt;br /&gt;
 # Set the weave pattern&lt;br /&gt;
 weave.SwapPosition(0, 0)&lt;br /&gt;
 weave.SwapPosition(1, 1)&lt;br /&gt;
 &lt;br /&gt;
 # Add the textile&lt;br /&gt;
 AddTextile(weave)&lt;br /&gt;
&lt;br /&gt;
Save it to disk as &amp;#039;&amp;#039;PlainWeave.py&amp;#039;&amp;#039; or give it whatever name you want as long as it has a &amp;#039;&amp;#039;.py&amp;#039;&amp;#039; extension.&lt;br /&gt;
&lt;br /&gt;
In order to test the Script we need to load it into TexGen. So start up the TexGen GUI and from the &amp;#039;&amp;#039;Python menu&amp;#039;&amp;#039; select &amp;#039;&amp;#039;Run Script&amp;#039;&amp;#039;. Select the file you have just saved and click ok. With a bit of luck you should see a 2d plain weave on screen.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have created your first TexGen Python script!&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
In the first example we made use of the &amp;lt;code&amp;gt;CTextileWeave2D&amp;lt;/code&amp;gt; which is the reason the script is so compact. This was great for creating a 2D Weave, but what if we want to create something other than a 2D Weave? In this example we will create yarns directly rather than through one of the textile sub-classes.&lt;br /&gt;
&lt;br /&gt;
First we will define a general textile and call it &amp;lt;code&amp;gt;Textile&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # Create a textile&lt;br /&gt;
 Textile = CTextile()&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;CTextile&amp;lt;/code&amp;gt; class doesn&amp;#039;t take any parameters, instead yarns will be created and added to it. Next we will create 4 yarns to go inside our textile, it is convenient to make use of the Python lists to do this. Create a list called &amp;lt;code&amp;gt;Yarns&amp;lt;/code&amp;gt; with 4 elements, each one an instance of the class &amp;lt;code&amp;gt;CYarn&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # Create a python list containing 4 yarns&lt;br /&gt;
 Yarns = [CYarn(), CYarn(), CYarn(), CYarn()]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Yarns&amp;lt;/code&amp;gt; now contains 4 empty yarns. Note that the yarns are not currently associated with the Textile, first we must fill in the details then make them a part of the textile. The first thing to do is define their paths with nodes. This is done like so:&lt;br /&gt;
&lt;br /&gt;
 # Add nodes to the yarns to describe their paths&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0, 0, 0)))&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0.22, 0, 0.05)))&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0.44, 0, 0)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0, 0.22, 0.05)))&lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0.22, 0.22, 0)))&lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0.44, 0.22, 0.05)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0, 0.05)))&lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0.22, 0)))&lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0.44, 0.05)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0, 0)))&lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0.22, 0.05)))&lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0.44, 0)))&lt;br /&gt;
&lt;br /&gt;
We have added 3 nodes to each yarn creating a woven pattern. The number in the square brackets after &amp;lt;code&amp;gt;Yarns&amp;lt;/code&amp;gt; refers to a particular yarn in the list. The function &amp;lt;code&amp;gt;AddNode&amp;lt;/code&amp;gt; is then called for the yarn. The function takes an instance of the class &amp;lt;code&amp;gt;CNode&amp;lt;/code&amp;gt; which in turn is constructed with an instance of the class &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt; representing the position of the node. The class &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt; is constructed with 3 numbers representing the X, Y and Z coordinates of the point.&lt;br /&gt;
&lt;br /&gt;
We still need to define a few more things to obtain a model. For the sake of simplicity, we will give all the yarns the same cross sectional shape, width, height, etc... The easiest way to do this is to loop over the yarns and assign the same properties to each yarn one by one. The syntax for looping over &amp;lt;code&amp;gt;Yarns&amp;lt;/code&amp;gt; is shown here:&lt;br /&gt;
&lt;br /&gt;
 # Loop over all the yarns in the list&lt;br /&gt;
 for Yarn in Yarns:&lt;br /&gt;
&lt;br /&gt;
Inside the loop, the variable &amp;lt;code&amp;gt;Yarn&amp;lt;/code&amp;gt; refers to the current yarn in the list. So within the loop we just assign properties to &amp;lt;code&amp;gt;Yarn&amp;lt;/code&amp;gt; and they will be applied to all the yarns in the list. In python the begining and end of a loop are defined by indentation, hence the following lines are indented to represent the contents of the loop.&lt;br /&gt;
&lt;br /&gt;
Let us define periodic cubic spline interpolation between the nodes:&lt;br /&gt;
&lt;br /&gt;
     # Set the interpolation function&lt;br /&gt;
     Yarn.AssignInterpolation(CInterpolationCubic())&lt;br /&gt;
&lt;br /&gt;
This is done with the function &amp;lt;code&amp;gt;AssignInterpolation&amp;lt;/code&amp;gt; which takes an instance of a class derived from &amp;lt;code&amp;gt;CInterpolation&amp;lt;/code&amp;gt;. In this case we used &amp;lt;code&amp;gt;CInterpolationCubic&amp;lt;/code&amp;gt; to specify periodic cubic spline interpolation.&lt;br /&gt;
&lt;br /&gt;
Next we need to define a cross section for the yarn, to keep things simple a constant cross section all along the length of the yarn will be defined:&lt;br /&gt;
&lt;br /&gt;
     # Assign a constant cross-section all along the yarn of elliptical shape&lt;br /&gt;
     Yarn.AssignSection(CYarnSectionConstant(CSectionEllipse(0.18, 0.04)))&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;AssignSection&amp;lt;/code&amp;gt; takes an instance of a class derived from &amp;lt;code&amp;gt;CYarnSection&amp;lt;/code&amp;gt;. In this case we used &amp;lt;code&amp;gt;CYarnSectionConstant&amp;lt;/code&amp;gt; which in turns take an instance of a class derived from &amp;lt;code&amp;gt;CSection&amp;lt;/code&amp;gt; as a constructor. &amp;lt;code&amp;gt;CSectionEllipse&amp;lt;/code&amp;gt; defines an elliptical cross section with given width and height defined by the first and second parameters respectively.&lt;br /&gt;
&lt;br /&gt;
     # Set the resolution of the surface mesh created&lt;br /&gt;
     Yarn.SetResolution(20)&lt;br /&gt;
&lt;br /&gt;
This line sets the resolution of the surface mesh created. The first parameter to the function &amp;lt;code&amp;gt;SetResolution&amp;lt;/code&amp;gt; represents the number of points around a cross section. The number of points along the length of the yarns is automatically calculated such that the distance between points is similar to around the cross section.&lt;br /&gt;
&lt;br /&gt;
Next we must add repeat vectors to define how the yarns are repeated.&lt;br /&gt;
&lt;br /&gt;
     # Add repeat vectors to the yarn&lt;br /&gt;
     Yarn.AddRepeat(XYZ(0.44, 0, 0))&lt;br /&gt;
     Yarn.AddRepeat(XYZ(0, 0.44, 0))&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;AddRepeat&amp;lt;/code&amp;gt; takes an instance of the class &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt;. As we saw earlier the class &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt; is constructed with 3 numbers defining the X, Y and Z components.&lt;br /&gt;
&lt;br /&gt;
Finally the yarn is fully defined, it can now be added to &amp;lt;code&amp;gt;Textile&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
     # Add the yarn to our textile&lt;br /&gt;
     Textile.AddYarn(Yarn)&lt;br /&gt;
&lt;br /&gt;
This is the end of the loop, hence the following lines return to the original indentation. Now let&amp;#039;s define a Domain within which the textile will be placed:&lt;br /&gt;
&lt;br /&gt;
 Textile.AssignDomain(CDomainPlanes(XYZ(0, 0, -0.02), XYZ(0.44, 0.44, 0.07)))&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;AssignDomain&amp;lt;/code&amp;gt; takes an instance of a class derived from &amp;lt;code&amp;gt;CDomain&amp;lt;/code&amp;gt;. In this case we will create a box shaped domain, this can be accomplished by using the class &amp;lt;code&amp;gt;CDomainPlanes&amp;lt;/code&amp;gt;. A box can be created by passing in opposite corners of the box (the minimum and maximum coordinates). This is done again with the class &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
And finally &amp;lt;code&amp;gt;Textile&amp;lt;/code&amp;gt; must be added to so that it can be rendered. Each Textile added must be assigned a name to identify it, this is the name that will appear at the top in the TexGen GUI. This name can either be generated automatically or we can specify it explicitly like so:&lt;br /&gt;
&lt;br /&gt;
 # Add the textile with the name &amp;quot;polyester&amp;quot;&lt;br /&gt;
 AddTextile(&amp;quot;polyester&amp;quot;, Textile)&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it! You now have the knowledge to create any type of fabric imaginable. Well, almost. The model created here is pretty simple, there is plenty of oppertunity to create more complex shapes. For example non-constant cross sections can be defined, complex domain shapes defined by arbritrary planes, different interpolation functions.&lt;br /&gt;
&lt;br /&gt;
Here is the completed script:&lt;br /&gt;
&lt;br /&gt;
 # Create a textile&lt;br /&gt;
 Textile = CTextile()&lt;br /&gt;
 &lt;br /&gt;
 # Create a python list containing 4 yarns&lt;br /&gt;
 Yarns = [CYarn(), CYarn(), CYarn(), CYarn()]&lt;br /&gt;
 &lt;br /&gt;
 # Add nodes to the yarns to describe their paths&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0, 0, 0)))&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0.22, 0, 0.05)))&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0.44, 0, 0)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0, 0.22, 0.05)))&lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0.22, 0.22, 0)))&lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0.44, 0.22, 0.05)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0, 0.05)))&lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0.22, 0)))&lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0.44, 0.05)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0, 0)))&lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0.22, 0.05)))&lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0.44, 0)))&lt;br /&gt;
 &lt;br /&gt;
 # Loop over all the yarns in the list&lt;br /&gt;
 for Yarn in Yarns:&lt;br /&gt;
 &lt;br /&gt;
     # Set the interpolation function&lt;br /&gt;
     Yarn.AssignInterpolation(CInterpolationCubic())&lt;br /&gt;
 &lt;br /&gt;
     # Assign a constant cross-section all along the yarn of elliptical shape&lt;br /&gt;
     Yarn.AssignSection(CYarnSectionConstant(CSectionEllipse(0.18, 0.04)))&lt;br /&gt;
 &lt;br /&gt;
     # Set the resolution of the surface mesh created&lt;br /&gt;
     Yarn.SetResolution(20)&lt;br /&gt;
 &lt;br /&gt;
     # Add repeat vectors to the yarn&lt;br /&gt;
     Yarn.AddRepeat(XYZ(0.44, 0, 0))&lt;br /&gt;
     Yarn.AddRepeat(XYZ(0, 0.44, 0))&lt;br /&gt;
 &lt;br /&gt;
     # Add the yarn to our textile&lt;br /&gt;
     Textile.AddYarn(Yarn)&lt;br /&gt;
 &lt;br /&gt;
 # Create a domain and assign it to the textile&lt;br /&gt;
 Textile.AssignDomain(CDomainPlanes(XYZ(0, 0, -0.02), XYZ(0.44, 0.44, 0.07)))&lt;br /&gt;
 &lt;br /&gt;
 # Add the textile with the name &amp;quot;polyester&amp;quot;&lt;br /&gt;
 AddTextile(&amp;quot;polyester&amp;quot;, Textile)&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>User Guide</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2006-12-19T13:30:20Z</updated>

		<summary type="html">&lt;p&gt;Wr: /* Layout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are several ways to interface with TexGen. A little bit of technical information is necessary to understand how this all fits together. The core TexGen functionality has been written in C++, on top of this a Python interface exists that has access to all the C++ functions of TexGen. There are many advantages of a Python interface that may not be immediatly obvious to the end user.&lt;br /&gt;
&lt;br /&gt;
A user friendly Graphical User Interface has been built on top of the Python interface to provide a quick and easy method to interface with TexGen. But the real power comes with writing small Python scripts which will be discussed later.&lt;br /&gt;
&lt;br /&gt;
==Graphical User Interface==&lt;br /&gt;
&lt;br /&gt;
The GUI is the easiest way to use TexGen, although a lot of TexGen features are not accessible via the graphical user interface. It is a good starting point to explore the capabilites of TexGen, but for the serious user the Python interface is recommended.&lt;br /&gt;
&lt;br /&gt;
===Layout===&lt;br /&gt;
&lt;br /&gt;
The GUI layout is similar to that of ABAQUS CAE for those familiar with it.&lt;br /&gt;
&lt;br /&gt;
The left side of the screen contains the controls to interact with TexGen. These controls are identical to the ones shown in the drop down menu at the top. Use which ever is most convenient.&lt;br /&gt;
&lt;br /&gt;
The right of the screen contains the 3d rendering of the model(s). Several models can be opened at once, all operations apply to the current model in view.&lt;br /&gt;
&lt;br /&gt;
Finally, the bottom of the screen contains an interactive &amp;#039;&amp;#039;Python Console&amp;#039;&amp;#039; along with two log windows. The interactive console allows the user to input Python commands directly. This can be useful for small operations and learning how to use the python scripting interface. For inputting a large number of Python commands it is more convenient to save it in a Python script and execute it all at once.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;Python Output&amp;#039;&amp;#039; log window displays all the Python code executed by the GUI. Essentially every button pressed in the user interface will create a Python command. This is done by design, making it possible to record Python scripts while interacting with the GUI. If you know how to do something with the GUI, you then automatically know how to do it with a Python script because the code is displayed.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;TexGen Output&amp;#039;&amp;#039; log window displays log and error messages from TexGen. These generally include information on what TexGen is doing, if something goes wrong it is useful to read the log to find out what happened. Error messages will be displayed in red so that they can be easily located.&lt;br /&gt;
&lt;br /&gt;
If new messages are posted one of the log windows while it is inactive, the icon above the window will change. In the case of receiving an error message the icon will change to an error icon.&lt;br /&gt;
&lt;br /&gt;
==Python Interface==&lt;br /&gt;
[http://www.python.org/ Python] is a high level interpreted programming language. In this case it is used as a scripting language to allow easy access to TexGen functionality. Python has been embedded in the TexGen GUI which allows the GUI to run python scripts. The goal of this tutorial is not to teach Python programming, there are plenty of resources online for that. A few of them are listed below:&lt;br /&gt;
&lt;br /&gt;
* [http://www.poromenos.org/tutorials/python Learn Python in 10 minutes] - Quick introduction to Python for competent programmers.&lt;br /&gt;
* [http://docs.python.org/tut/tut.html Python Tutorial] - Official Python tutorial (requires some programming knowledge).&lt;br /&gt;
* [http://www.greenteapress.com/thinkpython/ How to Think Like a Computer Scientist: Learning with Python] - Book on Python programming for beginners. [http://www.greenteapress.com/thinkpython/html/ HTML Version]&lt;br /&gt;
* [http://diveintopython.org/ Dive Into Python] - In depth book covering advanced subjects in a comprehensive manner. [http://diveintopython.org/toc/index.html HTML Version]&lt;br /&gt;
&lt;br /&gt;
An advanced knowledge of Python is not needed in order to write simple TexGen scripts. However, bear in mind that Python is a very powerful language with many libraries included for performing common tasks. I suggest you try to follow through the examples below and if you get stuck refer to one of the documents above.&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
First of all, a Python script is just a plain ASCII text file with a .py extension. To create one simply open up your favorite text editor. Notepad will do if you have nothing else but I suggest a more powerfull freeware text editor like [http://www.pspad.com/ PSPad]. Code that goes into the python script will be displayed like so:&lt;br /&gt;
&lt;br /&gt;
 # All Python code will be shown in a box like this one.&lt;br /&gt;
 # Lines begining with a &amp;#039;#&amp;#039; character are comments&lt;br /&gt;
&lt;br /&gt;
In this example, we will create a simple 2x2 plain weave model with a Python script. Its time to dive in and see some actual Python code. At this point if you are completely lost please refer back to the resources on Python programming. The first step is to create an instance of the &amp;lt;code&amp;gt;CTextileWeave2D&amp;lt;/code&amp;gt; class and give it a name, &amp;lt;code&amp;gt;weave&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # Create a 2D weave textile&lt;br /&gt;
 weave = CTextileWeave2D(2, 2, 1, 0.2, True)&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;CTextileWeave2D&amp;lt;/code&amp;gt; class takes 5 parameters in the order shown below:&lt;br /&gt;
* Number of weft yarns in the unit cell&lt;br /&gt;
* Number of warp yarns in the unit cell&lt;br /&gt;
* Spacing between the yarns&lt;br /&gt;
* Thickness of the fabrics&lt;br /&gt;
* Refine model (True/False)&lt;br /&gt;
&lt;br /&gt;
The only parameter that really needs an explanation here is the Refine model option, this controls whether or not the interference correction algorithm will be applied to keep the yarn volumes from intersecting which is a common problem. The interference correction algorithm generally does a good job but is not instantaneous so sometimes it can be beneficial to switch it off.&lt;br /&gt;
&lt;br /&gt;
This is the bare minimum information necessary to create a 2D woven fabric. In the following steps we will add more information to create the model the way we want it.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s set the weave pattern, this determines whether a warp or weft yarn will appear on top at a particular cross over. Cross overs are arranged in 2d grid where the size of the grid depends on the number of warp and weft yarns created. To swap the positions of the weft and warp yarns, we call the function &amp;lt;code&amp;gt;SwapPosition&amp;lt;/code&amp;gt; with the grid coordinates of the cross over. In order to create a plain weave we need to do this on two diagonally opposite cross overs like so:&lt;br /&gt;
&lt;br /&gt;
 # Set the weave pattern&lt;br /&gt;
 weave.SwapPosition(0, 0)&lt;br /&gt;
 weave.SwapPosition(1, 1)&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s add our &amp;lt;code&amp;gt;weave&amp;lt;/code&amp;gt; model to the database of models so that TexGen can render it:&lt;br /&gt;
&lt;br /&gt;
 # Add the textile&lt;br /&gt;
 AddTextile(weave)&lt;br /&gt;
&lt;br /&gt;
Thats it! This is a very simple script but it will generate a plain weave model. To recap your Python script should look like this:&lt;br /&gt;
&lt;br /&gt;
 # Create a 2D weave textile&lt;br /&gt;
 weave = CTextileWeave2D(2, 2, 1, 0.2, True)&lt;br /&gt;
 &lt;br /&gt;
 # Set the weave pattern&lt;br /&gt;
 weave.SwapPosition(0, 0)&lt;br /&gt;
 weave.SwapPosition(1, 1)&lt;br /&gt;
 &lt;br /&gt;
 # Add the textile&lt;br /&gt;
 AddTextile(weave)&lt;br /&gt;
&lt;br /&gt;
Save it to disk as &amp;#039;&amp;#039;PlainWeave.py&amp;#039;&amp;#039; or give it whatever name you want as long as it has a &amp;#039;&amp;#039;.py&amp;#039;&amp;#039; extension.&lt;br /&gt;
&lt;br /&gt;
In order to test the Script we need to load it into TexGen. So start up the TexGen GUI and from the &amp;#039;&amp;#039;Python menu&amp;#039;&amp;#039; select &amp;#039;&amp;#039;Run Script&amp;#039;&amp;#039;. Select the file you have just saved and click ok. With a bit of luck you should see a 2d plain weave on screen.&lt;br /&gt;
&lt;br /&gt;
Congratulations you have created your first TexGen Python script!&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
In the first example we made use of the &amp;lt;code&amp;gt;CTextileWeave2D&amp;lt;/code&amp;gt; which is the reason the script is so compact. This was great for creating a 2D Weave, but what if we want to create something other than a 2D Weave? In this example we will create yarns directly rather than through one of the textile sub-classes.&lt;br /&gt;
&lt;br /&gt;
First we will define a general textile and call it &amp;lt;code&amp;gt;Textile&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # Create a textile&lt;br /&gt;
 Textile = CTextile()&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;CTextile&amp;lt;/code&amp;gt; class doesn&amp;#039;t take any parameters, instead yarns will be created and added to it. Next we will create 4 yarns to go inside our textile, it is convenient to make use of the Python lists to do this. Create a list called &amp;lt;code&amp;gt;Yarns&amp;lt;/code&amp;gt; with 4 elements, each one an instance of the class &amp;lt;code&amp;gt;CYarn&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 # Create a python list containing 4 yarns&lt;br /&gt;
 Yarns = [CYarn(), CYarn(), CYarn(), CYarn()]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Yarns&amp;lt;/code&amp;gt; now contains 4 empty yarns. Note that the yarns are not currently associated with the Textile, first we must fill in the details then make them a part of the textile. The first thing to do is define their paths with nodes. This is done like so:&lt;br /&gt;
&lt;br /&gt;
 # Add nodes to the yarns to describe their paths&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0, 0, 0)))&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0.22, 0, 0.05)))&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0.44, 0, 0)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0, 0.22, 0.05)))&lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0.22, 0.22, 0)))&lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0.44, 0.22, 0.05)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0, 0.05)))&lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0.22, 0)))&lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0.44, 0.05)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0, 0)))&lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0.22, 0.05)))&lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0.44, 0)))&lt;br /&gt;
&lt;br /&gt;
We have added 3 nodes to each yarn creating a woven pattern. The number in the square brackets after &amp;lt;code&amp;gt;Yarns&amp;lt;/code&amp;gt; refers to a particular yarn in the list. The function &amp;lt;code&amp;gt;AddNode&amp;lt;/code&amp;gt; is then called for the yarn. The function takes an instance of the class &amp;lt;code&amp;gt;CNode&amp;lt;/code&amp;gt; which in turn is constructed with an instance of the class &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt; representing the position of the node. The class &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt; is constructed with 3 numbers representing the X, Y and Z coordinates of the point.&lt;br /&gt;
&lt;br /&gt;
We still need to define a few more things to obtain a model. For the sake of simplicity, we will give all the yarns the same cross sectional shape, width, height, etc... The easiest way to do this is to loop over the yarns and assign the same properties to each yarn one by one. The syntax for looping over &amp;lt;code&amp;gt;Yarns&amp;lt;/code&amp;gt; is shown here:&lt;br /&gt;
&lt;br /&gt;
 # Loop over all the yarns in the list&lt;br /&gt;
 for Yarn in Yarns:&lt;br /&gt;
&lt;br /&gt;
Inside the loop, the variable &amp;lt;code&amp;gt;Yarn&amp;lt;/code&amp;gt; refers to the current yarn in the list. So within the loop we just assign properties to &amp;lt;code&amp;gt;Yarn&amp;lt;/code&amp;gt; and they will be applied to all the yarns in the list. In python the begining and end of a loop are defined by indentation, hence the following lines are indented to represent the contents of the loop.&lt;br /&gt;
&lt;br /&gt;
Let us define periodic cubic spline interpolation between the nodes:&lt;br /&gt;
&lt;br /&gt;
     # Set the interpolation function&lt;br /&gt;
     Yarn.AssignInterpolation(CInterpolationCubic())&lt;br /&gt;
&lt;br /&gt;
This is done with the function &amp;lt;code&amp;gt;AssignInterpolation&amp;lt;/code&amp;gt; which takes an instance of a class derived from &amp;lt;code&amp;gt;CInterpolation&amp;lt;/code&amp;gt;. In this case we used &amp;lt;code&amp;gt;CInterpolationCubic&amp;lt;/code&amp;gt; to specify periodic cubic spline interpolation.&lt;br /&gt;
&lt;br /&gt;
Next we need to define a cross section for the yarn, to keep things simple a constant cross section all along the length of the yarn will be defined:&lt;br /&gt;
&lt;br /&gt;
     # Assign a constant cross-section all along the yarn of elliptical shape&lt;br /&gt;
     Yarn.AssignSection(CYarnSectionConstant(CSectionEllipse(0.18, 0.04)))&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;AssignSection&amp;lt;/code&amp;gt; takes an instance of a class derived from &amp;lt;code&amp;gt;CYarnSection&amp;lt;/code&amp;gt;. In this case we used &amp;lt;code&amp;gt;CYarnSectionConstant&amp;lt;/code&amp;gt; which in turns take an instance of a class derived from &amp;lt;code&amp;gt;CSection&amp;lt;/code&amp;gt; as a constructor. &amp;lt;code&amp;gt;CSectionEllipse&amp;lt;/code&amp;gt; defines an elliptical cross section with given width and height defined by the first and second parameters respectively.&lt;br /&gt;
&lt;br /&gt;
     # Set the resolution of the surface mesh created&lt;br /&gt;
     Yarn.SetResolution(20)&lt;br /&gt;
&lt;br /&gt;
This line sets the resolution of the surface mesh created. The first parameter to the function &amp;lt;code&amp;gt;SetResolution&amp;lt;/code&amp;gt; represents the number of points around a cross section. The number of points along the length of the yarns is automatically calculated such that the distance between points is similar to around the cross section.&lt;br /&gt;
&lt;br /&gt;
Next we must add repeat vectors to define how the yarns are repeated.&lt;br /&gt;
&lt;br /&gt;
     # Add repeat vectors to the yarn&lt;br /&gt;
     Yarn.AddRepeat(XYZ(0.44, 0, 0))&lt;br /&gt;
     Yarn.AddRepeat(XYZ(0, 0.44, 0))&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;AddRepeat&amp;lt;/code&amp;gt; takes an instance of the class &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt;. As we saw earlier the class &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt; is constructed with 3 numbers defining the X, Y and Z components.&lt;br /&gt;
&lt;br /&gt;
Finally the yarn is fully defined, it can now be added to &amp;lt;code&amp;gt;Textile&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
     # Add the yarn to our textile&lt;br /&gt;
     Textile.AddYarn(Yarn)&lt;br /&gt;
&lt;br /&gt;
This is the end of the loop, hence the following lines return to the original indentation. Now let&amp;#039;s define a Domain within which the textile will be placed:&lt;br /&gt;
&lt;br /&gt;
 Textile.AssignDomain(CDomainPlanes(XYZ(0, 0, -0.02), XYZ(0.44, 0.44, 0.07)))&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;AssignDomain&amp;lt;/code&amp;gt; takes an instance of a class derived from &amp;lt;code&amp;gt;CDomain&amp;lt;/code&amp;gt;. In this case we will create a box shaped domain, this can be accomplished by using the class &amp;lt;code&amp;gt;CDomainPlanes&amp;lt;/code&amp;gt;. A box can be created by passing in opposite corners of the box (the minimum and maximum coordinates). This is done again with the class &amp;lt;code&amp;gt;XYZ&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
And finally &amp;lt;code&amp;gt;Textile&amp;lt;/code&amp;gt; must be added to so that it can be rendered. Each Textile added must be assigned a name to identify it, this is the name that will appear at the top in the TexGen GUI. This name can either be generated automatically or we can specify it explicitly like so:&lt;br /&gt;
&lt;br /&gt;
 # Add the textile with the name &amp;quot;polyester&amp;quot;&lt;br /&gt;
 AddTextile(&amp;quot;polyester&amp;quot;, Textile)&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it! You now have the knowledge to create any type of fabric imaginable. Well, almost. The model created here is pretty simple, there is plenty of oppertunity to create more complex shapes. For example non-constant cross sections can be defined, complex domain shapes defined by arbritrary planes, different interpolation functions.&lt;br /&gt;
&lt;br /&gt;
Here is the completed script:&lt;br /&gt;
&lt;br /&gt;
 # Create a textile&lt;br /&gt;
 Textile = CTextile()&lt;br /&gt;
 &lt;br /&gt;
 # Create a python list containing 4 yarns&lt;br /&gt;
 Yarns = [CYarn(), CYarn(), CYarn(), CYarn()]&lt;br /&gt;
 &lt;br /&gt;
 # Add nodes to the yarns to describe their paths&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0, 0, 0)))&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0.22, 0, 0.05)))&lt;br /&gt;
 Yarns[0].AddNode(CNode(XYZ(0.44, 0, 0)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0, 0.22, 0.05)))&lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0.22, 0.22, 0)))&lt;br /&gt;
 Yarns[1].AddNode(CNode(XYZ(0.44, 0.22, 0.05)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0, 0.05)))&lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0.22, 0)))&lt;br /&gt;
 Yarns[2].AddNode(CNode(XYZ(0, 0.44, 0.05)))&lt;br /&gt;
 &lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0, 0)))&lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0.22, 0.05)))&lt;br /&gt;
 Yarns[3].AddNode(CNode(XYZ(0.22, 0.44, 0)))&lt;br /&gt;
 &lt;br /&gt;
 # Loop over all the yarns in the list&lt;br /&gt;
 for Yarn in Yarns:&lt;br /&gt;
 &lt;br /&gt;
     # Set the interpolation function&lt;br /&gt;
     Yarn.AssignInterpolation(CInterpolationCubic())&lt;br /&gt;
 &lt;br /&gt;
     # Assign a constant cross-section all along the yarn of elliptical shape&lt;br /&gt;
     Yarn.AssignSection(CYarnSectionConstant(CSectionEllipse(0.18, 0.04)))&lt;br /&gt;
 &lt;br /&gt;
     # Set the resolution of the surface mesh created&lt;br /&gt;
     Yarn.SetResolution(20)&lt;br /&gt;
 &lt;br /&gt;
     # Add repeat vectors to the yarn&lt;br /&gt;
     Yarn.AddRepeat(XYZ(0.44, 0, 0))&lt;br /&gt;
     Yarn.AddRepeat(XYZ(0, 0.44, 0))&lt;br /&gt;
 &lt;br /&gt;
     # Add the yarn to our textile&lt;br /&gt;
     Textile.AddYarn(Yarn)&lt;br /&gt;
 &lt;br /&gt;
 # Create a domain and assign it to the textile&lt;br /&gt;
 Textile.AssignDomain(CDomainPlanes(XYZ(0, 0, -0.02), XYZ(0.44, 0.44, 0.07)))&lt;br /&gt;
 &lt;br /&gt;
 # Add the textile with the name &amp;quot;polyester&amp;quot;&lt;br /&gt;
 AddTextile(&amp;quot;polyester&amp;quot;, Textile)&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
	<entry>
		<id></id>
		<title>Compiling from Source</title>
		<link rel="alternate" type="text/html" href=""/>
		<updated>2006-12-08T14:12:37Z</updated>

		<summary type="html">&lt;p&gt;Wr: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
More to come on compiling from source...&lt;br /&gt;
&lt;br /&gt;
The following programs are needed to build TexGen:&lt;br /&gt;
* [http://www.cmake.org/ CMake]&lt;br /&gt;
* [http://www.swig.org/ SWIG]&lt;br /&gt;
&lt;br /&gt;
The following libraries are needed to link to TexGen:&lt;br /&gt;
* [http://www.vtk.org/ VTK]&lt;br /&gt;
* [http://www.wxwidgets.org/ wxWidgets]&lt;br /&gt;
* [http://www.opencascade.org/ OpenCascade]&lt;br /&gt;
* [http://www.python.org/ Python]&lt;br /&gt;
&lt;br /&gt;
However it is possible to build modules individually without compiling modules you do not need. Refer to the [http://texgen.sourceforge.net/api/ TexGen API] for a list of modules and their dependencies.&lt;br /&gt;
&lt;br /&gt;
The latest source release can be [http://sourceforge.net/project/showfiles.php?group_id=181000 downloaded here]. Download the latest file release named &amp;#039;&amp;#039;texgen-3.x.x.tar.gz&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Alternatively the very latest development source can be downloaded using the [http://subversion.tigris.org/ Subversion] version control system. This code may be unstable, it is not recommended unless there is a good reason to have the very latest version. The Subversion server is hosted on SourceForge, instructions on downloading from it are available [http://sourceforge.net/svn/?group_id=181000 here].&lt;/div&gt;</summary>
		<author><name>Wr</name></author>
	</entry>
</feed>