
Not applicable
08-16-2018
12:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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):
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
Solved! Go to Solution.