Hello,
I have been using CSectionPolygon to create custom shaped cross-sections for yarns. I have been using C++ code to do this. In the TexGen scripting guide section 2.2.1 "Set Resolution" for the function that only takes "NumSectionPoints" for an argument, it is specified that the number of slave nodes are calculated such that the distance between them is equal to the average distance between section points. My CSectionPolygon does not have equally spaced section points and I believe that when generating the mesh, the cross-section is being adjusted due to this characteristic of the slave nodes. Is there a way to have the coordinates of the slave nodes be exactly the same as the coordinates of the CSectionPolygon section points? That way the cross-section defined is identical to the mesh and rendered solid.
Thanks for the help,
Matt
CSectionPolygon Slave Nodes
Moderators: Martin, Developers
Re: CSectionPolygon Slave Nodes
Hi Matt,
At the moment slave nodes are always equispaced. The cross-sections are generated at the slave nodes by interpolating between the two cross-sections closest on either side. The only way I can think of that you could force them to coincide is to generate your cross-sections at equispaced intervals along the yarn and then use the version of SetResolution which specified the number of slave nodes, setting it equal to the number of cross-sections.
That's the best option I can think of at the moment.
Louise
At the moment slave nodes are always equispaced. The cross-sections are generated at the slave nodes by interpolating between the two cross-sections closest on either side. The only way I can think of that you could force them to coincide is to generate your cross-sections at equispaced intervals along the yarn and then use the version of SetResolution which specified the number of slave nodes, setting it equal to the number of cross-sections.
That's the best option I can think of at the moment.
Louise