Hello Dr. Louise,
The path of weft yarns somehow are straight line when we check the CT pictures especailly inner yarns. Unfortunately, my scripts showing the weft yarns much curved.
Due to this, my idea is that compare z coordinate of the adject nodes, to make the difference be less than one value. My doubt is that how to move the nodes of the yarn.
for i in range(4,1,-1): # i means number of weft yarns
for j in range(8): # j means number of nodes on a yarn
iyarn=Yarns
node[j]=iyarn.GetNode(j)
node[j+1]=iyarn.GetNode(j+1)
coor1=node[j].GetPosition()
coor2=node[j+1].GetPosition()
coor=coor2.z-coor1.z
if abs(coor)>0.4:
if coor2.z>coor1.z:
coor2.z=coor2.z-0.4
elif coor2.z<coor1.z:
coor2.z=coor2.z+0.4
For example how to move the node[j+1]? Or is there any other ways to do this?
Thank you for your support.
Have a nice day for you and your team!
how to make the weft yarns be straight
Moderators: Martin, Developers
Re: how to make the weft yarns be straight
hello Dr. Louise,
I think function ReplaceNode() can solve my question.
I have one more question followed this about the intersection between yarns after i changed the position of weft yarns.
How can i solve this?
Have a nice day for you and your team!
I think function ReplaceNode() can solve my question.
I have one more question followed this about the intersection between yarns after i changed the position of weft yarns.
How can i solve this?
Have a nice day for you and your team!
Re: how to make the weft yarns be straight
Hello,
Glad you found the ReplaceNode function. If there are intersections you will need to adjust your model, either by changing the node positions or, if you are sure the node positions are correct by changing the cross-sections. Do you have information from your CT data as to what shape the cross sections actually look like? They are rarely elliptical. You can also rotate the cross-sections but, again, you might need to look at the CT data to see if this is what is actually happening in the data.
It may be possible to automate a method of correcting intersections. If they are small you can use the intersection correction in the dry fibre export to correct intersections. I think there have been some threads on the forum about this.
You can also find information about refinements of textiles in some of the TexGen publications: http://texgen.sourceforge.net/index.php/Publications
I hope that helps,
Louise
Glad you found the ReplaceNode function. If there are intersections you will need to adjust your model, either by changing the node positions or, if you are sure the node positions are correct by changing the cross-sections. Do you have information from your CT data as to what shape the cross sections actually look like? They are rarely elliptical. You can also rotate the cross-sections but, again, you might need to look at the CT data to see if this is what is actually happening in the data.
It may be possible to automate a method of correcting intersections. If they are small you can use the intersection correction in the dry fibre export to correct intersections. I think there have been some threads on the forum about this.
You can also find information about refinements of textiles in some of the TexGen publications: http://texgen.sourceforge.net/index.php/Publications
I hope that helps,
Louise
Re: how to make the weft yarns be straight
Hello Dr. Louise,
Thank you for your quickly feedback.
Yes, you are right. The real section from the CT point of view is quite complex and it is not elliptical.
Background is that I want to create the surface yarns followed the layer to layer method as we already discussed it. Currently, i have already finished the layer to layer model, i need to adjust some nodes position of weft yarns in order to create new surface warp yarns.
I am thinking whether there is a way like defining a user function to handle this intersection issues after i read section 2.11 of Martin's PhD thesis(2007).
Do you have some detailed information about this?
Have a nice day for you and your team!
Thank you for your quickly feedback.
Yes, you are right. The real section from the CT point of view is quite complex and it is not elliptical.
Background is that I want to create the surface yarns followed the layer to layer method as we already discussed it. Currently, i have already finished the layer to layer model, i need to adjust some nodes position of weft yarns in order to create new surface warp yarns.
I am thinking whether there is a way like defining a user function to handle this intersection issues after i read section 2.11 of Martin's PhD thesis(2007).
Do you have some detailed information about this?
Have a nice day for you and your team!
Re: how to make the weft yarns be straight
Hello,
The method described in section 2.11 of Martin Sherburn's thesis is implemented in the Render-> Yarn Interference option in TexGen. This identifies where intersections are but doesn't make any adjustment. It is possible to use this information in your own script.
The intersection correction implemented in the Dry Fibre export option uses these intersection points and makes adjustments where the intersections are small (smaller than one volume element depth). At the moment you can use this option via the dry fibre export http://texgen.sourceforge.net/index.php ... Fibre_File. The next TexGen release will have an option to access this directly from the GUI.
Otherwise it is a case of you working out how you need to adjust the model to reduce the intersections.
Hope that helps,
Louise
The method described in section 2.11 of Martin Sherburn's thesis is implemented in the Render-> Yarn Interference option in TexGen. This identifies where intersections are but doesn't make any adjustment. It is possible to use this information in your own script.
The intersection correction implemented in the Dry Fibre export option uses these intersection points and makes adjustments where the intersections are small (smaller than one volume element depth). At the moment you can use this option via the dry fibre export http://texgen.sourceforge.net/index.php ... Fibre_File. The next TexGen release will have an option to access this directly from the GUI.
Otherwise it is a case of you working out how you need to adjust the model to reduce the intersections.
Hope that helps,
Louise
Re: how to make the weft yarns be straight
Hello Dr. Louise,
Do you have a roughly data for the next release version of TexGen?
In order to keep the weft yarns be almost straight. First, i need to move some nodes of weft yarns. Secondly, there is a lot of intersections after moving the nodes of weft yarns. I have no idea how to go on with this intersection issuse. Could you please give me some more support?
Thank you. Have a nice day!
Do you have a roughly data for the next release version of TexGen?
In order to keep the weft yarns be almost straight. First, i need to move some nodes of weft yarns. Secondly, there is a lot of intersections after moving the nodes of weft yarns. I have no idea how to go on with this intersection issuse. Could you please give me some more support?
Thank you. Have a nice day!
Re: how to make the weft yarns be straight
Hello,
I'm hoping to get a new release out towards the end of August (but this is not guaranteed).
Section 11 of the scripting guide shows how to call the intersection correction from a script. If the intersections are too large then you need to work out what changes you need to make to your model in order to remove the intersections, eg which nodes you need to move or which cross-sections you need to change. It would be worth doing a search in the forum as I think that there have been other threads on this subject.
Best wishes,
Louise
I'm hoping to get a new release out towards the end of August (but this is not guaranteed).
Section 11 of the scripting guide shows how to call the intersection correction from a script. If the intersections are too large then you need to work out what changes you need to make to your model in order to remove the intersections, eg which nodes you need to move or which cross-sections you need to change. It would be worth doing a search in the forum as I think that there have been other threads on this subject.
Best wishes,
Louise
Re: how to make the weft yarns be straight
Hello Dr. Louise,
Indeed, i already did some search using the keyword 'intersection' and found no topic like mine.
BTW, there is no section 11 in the scriptingguide v31 which i download from the web. There is only 9 chapters.
And i tried to download the scripting guide v3.1 from your suggestion but failed. There was always error while i click the download button.
Have a nice day!
Indeed, i already did some search using the keyword 'intersection' and found no topic like mine.
BTW, there is no section 11 in the scriptingguide v31 which i download from the web. There is only 9 chapters.
And i tried to download the scripting guide v3.1 from your suggestion but failed. There was always error while i click the download button.
Have a nice day!
Re: how to make the weft yarns be straight
Hello,
I'm not sure what's going on here. The scripting guide pdf previews and downloads fine on my system. The only thing I can think of is that it's a browser issue. I am using Firefox. Could you try a different browser and see if that makes a difference?
Kind regards,
Louise
I'm not sure what's going on here. The scripting guide pdf previews and downloads fine on my system. The only thing I can think of is that it's a browser issue. I am using Firefox. Could you try a different browser and see if that makes a difference?
Kind regards,
Louise