Hi Varun,
I'm afraid that I can't open the postscript file that you sent. As long as the Up vectors are not close to the yarn tangent (so that a cross product between the two works) they will be fine. These are not the issue here.
The problem is with the function which finds whether the point at the centre of the voxel is within the yarn and is to do with the fact that, in the problem areas, the yarn doubles back on itself. This means that one of the tests in the function which checks whether the point is inbetween the normals at consecutive nodes is giving incorrect results. Basically the function needs some rewriting.
The version I sent you clearly improved things but hasn't solved the problem completely. I would suggest that you add extra node(s). You basically need to ensure that the normals at the nodes are such that any point you test which lies between them will give a distance with the same sign (see p28,29 here: http://eprints.nottingham.ac.uk/10303/1 ... -final.pdf).
Hope that helps,
Louise
Voxel Mesh - only generates part of yarn
Moderators: Martin, Developers