Hello,
I am trying to model individual fibers of a composite that follows the path of some TexGen models I generated. The model in consideration is a one-ply plain weave and I want to extract the path of the yarns from TexGen so I can create my own model for fibers that follow the same path. Is there a way to obtain the control points of the interpolation function?
Thank you,
Milinda
Yarn Interpolation Fuctions
Moderators: Martin, Developers
Re: Yarn Interpolation Fuctions
Hi Milinda,
There are a couple of ways you could do this:
1. Use the CInterpolation::GetSlaveNodes function from within a Python script or C++ program
2. Save the model in TexGen using the Full option. This then saves all of the slave node information. The .tg3 file is basically a renamed xml file so you can open this in an editor and then extract the slave node coordinates from the file.
Hope that helps,
Louise
There are a couple of ways you could do this:
1. Use the CInterpolation::GetSlaveNodes function from within a Python script or C++ program
2. Save the model in TexGen using the Full option. This then saves all of the slave node information. The .tg3 file is basically a renamed xml file so you can open this in an editor and then extract the slave node coordinates from the file.
Hope that helps,
Louise
Re: Yarn Interpolation Fuctions
Hello Louise,
Thank you for the reply.
I did try the following lines using a python script and I keep getting an error.
error: nodes = yarn.GetSlaveNodes(LINE)
NameError: name 'LINE' is not defined
I thought LINE was the correct argument input to use.
Am I doing something wrong here?
Milinda
Thank you for the reply.
I did try the following lines using a python script and I keep getting an error.
Code: Select all
textile = GetTextile()
yarn = textile.GetYarn(0)
nodes = yarn.GetSlaveNodes(LINE)NameError: name 'LINE' is not defined
I thought LINE was the correct argument input to use.
Am I doing something wrong here?
Milinda
Re: Yarn Interpolation Fuctions
Hi Milinda,
You're nearly there. The LINE is part of an enumerator in the CYarn class so you just need to use CYarn.LINE and then it should work.
Best wishes,
Louise
You're nearly there. The LINE is part of an enumerator in the CYarn class so you just need to use CYarn.LINE and then it should work.
Best wishes,
Louise
Re: Yarn Interpolation Fuctions
Okay. That works. Thank you!
Milinda
Milinda