Twist Transform Question

Discussion in 'ShapeJS' started by boxthoughts, May 6, 2016.

  1. boxthoughts
    boxthoughts Member
    What does the number that is passed to the twist transform actually specify? If I want to twist one full rotation around, 360 degrees, what would it have to be set to? The only information I could find was that a lower number means a higher rate of twist.
  2. AlanHudson
    AlanHudson Shapeways Employee Dev Team
    // length at which the transform performs complete 360 degree twist
    protected DoubleParameter mp_period = new DoubleParameter("period","Rotation angle",1);

    I suspect inverting this concept might have been smart. But the basic idea is the smaller the number the more twist you get.
  3. boxthoughts
    boxthoughts Member
    Thanks for the info! FYI the twist transform is missing from the documentation, so adding this info there would help anyone else trying to figure it out.
  4. u3objects
    u3objects Member
    Any insight on how to equate the input value for the twist transform to radians or degrees? It seems 10 is equivalent to no twist and .01 is a complete twist. Most of the twist occurs between .01 and .9, but then achieve no twist you have to go up to 10. I would love to be able to have an input that goes from 1 to 270 for a customer to rotate an object, so it makes sense to them.
  5. skwirrel
    skwirrel Member
    I know its an old post but... I just came across the same problem. By my reckoning this makes things much more intuitive...

    function twistDegrees( angle,length ) {
    return (length*360)/angle;

    i.e. if you want to twist through 90 degrees over a distance of 100mm you would use...
    new Twist(twistDegrees(90,100*MM))