Cross Section Options

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
Ross
Regular
Posts: 12
Joined: Wed Oct 31, 2007 4:57 pm
Location: College Station, TX

Cross Section Options

Post by Ross »

Martin,
What are the cross-section options when using Python scripts? Is there a way to create a completely general cross-section (i.e. define a cross section with splines by specifying points along the cross-section outline).

I am also wondering if there is anything more than the scripting guide which would could give me more insight into the class structures of TexGen. I know that there are a lot more options for generating weaves than the scripting guide covers; I just don't know where to find them. Any suggestions?

-Ross
Ross McLendon
Graduate Researcher
Texas A&M University
Martin
Project Leader
Posts: 70
Joined: Wed Mar 28, 2007 9:05 am
Location: Nottingham
Contact:

Post by Martin »

Sorry I didn't get back to you sooner. It appears there is a problem with the email notification I usually get when somebody posts something on the forum.

Anyway. The best place to look is in the Application Programming Interface (API) documentation generated by Doxygen. You can find that here:

http://texgen.sourceforge.net/api/

or also in the installation folder of TexGen. There are a number of classes starting with CSection... You can use any of those to assign to your yarns. Notably there is CSectionBezier and CSectionPolygon which may be of interest to you.

CSectionBezier allows you to specify a number of points in 2D to which a bezier curve will be fitted. You can either specify the whole cross-section or just 1 quadrant and have it fill in the rest to make a symmetrical cross-section.

CSectionPolygon allows you to do the same except it interpolates linearly between the points creating a polygon rather than doing it with a bezier curve.

And finally you have the option of creating your own class in C++ derived from the CSection class where you are completely free to do whatever you like. For example you could create a square cross-section which takes width and height as parameters. If you want to do this, the best approach is to start from one of the existing cross-sections and modify it.
Post Reply