Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Transform scale is confusing

Anonymous

Transform scale is confusing

Anonymous
Not applicable

Hi

 

I have a model with a transformed component, but the scale seems to be wrong when using the Python API to get the transform. The position of the sphere is at (100, 0, 0), and the box is as (0,0,0):

 

Screen Shot 2018-08-16 at 09.36.04.png

but is reported as (10, 0, 0). Here's the code:

 

try:
    app = adsk.core.Application.get()
    design = adsk.fusion.Design.cast(app.activeProduct)
    for occ in design.rootComponent.allOccurrences:
        trans = occ.transform
        print(occ.name, trans.translation.x, trans.translation.y, trans.translation.z)
except:
    print('Failed:\n{}'.format(traceback.format_exc()))

and the output:

>>> Sphere:1 10.0 0.0 0.0
Block:1 0.0 0.0 0.0

Am I missing something?

Thanks

Ben

0 Likes
Reply
Accepted solutions (1)
436 Views
1 Reply
Reply (1)

Anonymous
Not applicable
Accepted solution
0 Likes