Hello Martin,
I use your tool to create 3D weavings.
If I create curved yarns, I randomly get twisted volumes. Sometimes a symmetric U-shaped yarn would twist at one end, and not at the other one. I can’t find out a procedure to avoid this problem.
Is there any setting that is installed to get rid of this?
Robert
Twisted yarns problem
Moderators: Martin, Developers
-
Jon
Hi Robert,
The problem that you are having is almost certainly something to do with 'up vectors'. You may be able to fix it by looping over the nodes within the yarns and calling the CNode::ProjectUp() function, although I haven't used this myself so I'm not certain that it does what you need. Have a go, and I guess Martin may add some more info if I'm well off the mark.
Jon.
The problem that you are having is almost certainly something to do with 'up vectors'. You may be able to fix it by looping over the nodes within the yarns and calling the CNode::ProjectUp() function, although I haven't used this myself so I'm not certain that it does what you need. Have a go, and I guess Martin may add some more info if I'm well off the mark.
Jon.
-
Martin
Hi Robert,
As Jon said, it is probably due to the Up Vectors. By default the Up vector is defined as the vector (0,0,1). This vector is necessary to determine the orientation (or rotation) of a cross section. If you define a plain weave in the x-y plane, you will not get any twisting problems. However if the yarn tangent comes close to the direction of the Up vector as it may in a 3D Weave, twisting may occur.
The way to solve the problem is to specify a different Up Vector on a node by node basis.
Are you doing this with a python script? If so then you can do this when you create a node with the 3rd optional parameter:
this will create a node at position (0,0,0) with unspecified tangent and up vector of (0,1,0). If you wanted to create a U shaped yarn for example you might specify a series of nodes like so:
Note the Up vectors don't need to be of unit length or exactly perpendicular to the tangent of the yarn. TexGen will automatically normalise and project so that they are. But they should be more or less perpendicular otherwise it will be unable to project.
I hope this helps, if not perhaps you can paste some code you have used to create the nodes and i'll see if i can suggest how to fix the problem.
Martin.
As Jon said, it is probably due to the Up Vectors. By default the Up vector is defined as the vector (0,0,1). This vector is necessary to determine the orientation (or rotation) of a cross section. If you define a plain weave in the x-y plane, you will not get any twisting problems. However if the yarn tangent comes close to the direction of the Up vector as it may in a 3D Weave, twisting may occur.
The way to solve the problem is to specify a different Up Vector on a node by node basis.
Are you doing this with a python script? If so then you can do this when you create a node with the 3rd optional parameter:
Code: Select all
node = CNode(XYZ(0, 0, 0), XYZ(), XYZ(0, 1, 0))
Code: Select all
Node Up Vector
---- -----------
(0, 0, 1) (1, 0, 1)
(0, 0, 0) (1, 0, 1)
(1, 0, 0) (-1, 0, 1)
(1, 0, 1) (-1, 0, 1)
(2, 0, 1) (1, 0, 1)
I hope this helps, if not perhaps you can paste some code you have used to create the nodes and i'll see if i can suggest how to fix the problem.
Martin.
-
Robert
Hi Jon and Martin,
thank you very much for the help. I am currently using the Tex-Gen limeted version to create the vector-paths, and TexGen 3 to import these path files and to export them as a STEP-file.
Thaks to your hint I found that I have to avoid starting through-thicknes-yarns with a vector already containing a z-component, but I have to start with a flat vector instead.
I will have to learn how to build my own scripts from now on, since it seems to be the only way to change existing path files easily and introduce slight changes into vectors.
By the way, please keep the ability of your program to define custom vectors. The possebility to create not only pre-defined plain waves, but any 3D geometry, is adding so much to the program in my opinion.
Again many thanks,
Robert
thank you very much for the help. I am currently using the Tex-Gen limeted version to create the vector-paths, and TexGen 3 to import these path files and to export them as a STEP-file.
Thaks to your hint I found that I have to avoid starting through-thicknes-yarns with a vector already containing a z-component, but I have to start with a flat vector instead.
I will have to learn how to build my own scripts from now on, since it seems to be the only way to change existing path files easily and introduce slight changes into vectors.
By the way, please keep the ability of your program to define custom vectors. The possebility to create not only pre-defined plain waves, but any 3D geometry, is adding so much to the program in my opinion.
Again many thanks,
Robert
-
Martin
Alright then, the texgen v2 import is somewhat limited. There is no support for up vectors and varying cross sections. And probably some other features I haven't thought of right now. The reason for this is that I'd like to phase out TexGen v2 over time.
It is currently possible to model any 3D geometry, unfortunately it needs to be done via python script though (or c++ programming). I plan to port the GUI interface to create vectors from TexGen v2 into the new version in the future. This will take some time though, it wasn't a high priority on my list because its not something my supervisor thought was useful. But its good to hear you find it useful, I will try to get on that sooner rather than later.
In the mean time I suggest you look into the python scripting, there is a little tutorial on the website:
http://texgen.sourceforge.net/index.php/User_Guide
And you will probably find that it is necessary to learn the python anyway when you get into things like assigning material orientations.
It is currently possible to model any 3D geometry, unfortunately it needs to be done via python script though (or c++ programming). I plan to port the GUI interface to create vectors from TexGen v2 into the new version in the future. This will take some time though, it wasn't a high priority on my list because its not something my supervisor thought was useful. But its good to hear you find it useful, I will try to get on that sooner rather than later.
In the mean time I suggest you look into the python scripting, there is a little tutorial on the website:
http://texgen.sourceforge.net/index.php/User_Guide
And you will probably find that it is necessary to learn the python anyway when you get into things like assigning material orientations.