DTrans Bug?

edited October 9 in Python scripting

Hallo folks,
am I doing something wrong, when calling

from pya import * 
trans1=DTrans(50,50)

Which produces a transformation object, but with displacement vector (0,0) on Windows with python 3.7
same in Ruby

Comments

  • edited October 10

    Make sure you use floats.

    trans1 = DTrans(50.0, 50.0) 
    

    works.

    The problem is some ambiguity here and a match with this constructor:

    DTrans(int rot, bool mirr = false, const DVector u = 0,0)
    

    The safest way is to be explicit using a Vector:

    trans1 = DTrans(DVector(50, 50)) 
    

    Matthias

  • Hello Matthias,
    thank you. For clarifying.

Sign In or Register to comment.