Hi,
I'm new to Python and TexGen and was just looking for some help.
I'm trying to generate a 4 harness satin weave with python but I want to add a rotation angle to a node.
I don't want to apply the rotation to the node co-ordinates but the actually node itself (i.e. Node (0)).
The thing is that i want to make the script shorter by applying this rotation to Node(0) of two orthogonal yarns as their yarn paths are identical.
Could you help me out with hoe to write such a line in the script having defined the angle in radians?
Thanks,
James
cross-section rotation at nodes
Moderators: Martin, Developers
Re: cross-section rotation at nodes
Hi James,
The nodes in TexGen are simply points on the centreline of the yarn. You then define cross-sections for the yarn which are applied along that centreline. You can specify a cross-section which is assigned at a particular node and can also be rotated.
You can see something similar in the shear textile example here: http://texgen.sourceforge.net/index.php ... ate_Models In this case the cross-sections are applied at specific points along the yarn. In order to specify the sections at nodes you need to use CYarnSectionInterpNode. Then use the AddSection function to add sections at each node along the yarn (rotating those that you wish to be rotated). The documentation for CYarnSectionInterpNode is here: http://texgen.sourceforge.net/api/class ... _node.html
You will need to apply the sections to each yarn.
Hope that helps,
Louise
The nodes in TexGen are simply points on the centreline of the yarn. You then define cross-sections for the yarn which are applied along that centreline. You can specify a cross-section which is assigned at a particular node and can also be rotated.
You can see something similar in the shear textile example here: http://texgen.sourceforge.net/index.php ... ate_Models In this case the cross-sections are applied at specific points along the yarn. In order to specify the sections at nodes you need to use CYarnSectionInterpNode. Then use the AddSection function to add sections at each node along the yarn (rotating those that you wish to be rotated). The documentation for CYarnSectionInterpNode is here: http://texgen.sourceforge.net/api/class ... _node.html
You will need to apply the sections to each yarn.
Hope that helps,
Louise