How to switch transform from global to local with python script. Are there any example codes?
By the way, where can I found the setting of the transform attribute in python code?
I can create a transform and set translation on local manually. But are there any code could change translation from global to Local with python code?
I checked github code found: setCoordinateReference(LOCAL)
, while a error happen as follows:
âvTransformr.setCoordinateReference(LOCAL)
Traceback (most recent call last):
File ââ, line 1, in
AttributeError: âvtkCommonTransformsPython.vtkTransformâ object has no attribute 'setCoordinateReferenceâ
Local/global means if translation is performed before or after the rotation. You can achieve this by decomposing transformation into a translation and rotation part and changing up their order.
1 Like