CSectionPolygon Slave Nodes

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
mst105
Posts: 1
Joined: Fri Aug 07, 2020 12:33 pm

CSectionPolygon Slave Nodes

Post by mst105 »

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
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: CSectionPolygon Slave Nodes

Post by louisepb »

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
Post Reply