Message 1 of 3
identity matrix - causing problems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi WhomInTheKnow,
I have spent quite few hours trying to debug some dynamic code. I would have never considered that identity matrix will show malicious behaviour, but it did!
It turns that moveFeature can not accept identity matrix as an argument.
It is hard to believe, isn't it?
Please check it yourself by running moveFeature sample script while commenting one line (red marker):
# Create a transform to do move
vector = adsk.core.Vector3D.create(0.0, 10.0, 0.0)
transform = adsk.core.Matrix3D.create()
#transform.translation = vector
The error is symptomatically cryptic:
moveFeats.add(moveFeatureInput)
File "C:/Users/MichaelT/AppData/Local/Autodesk/webdeploy/production/20eba7b8590bd15aa5cf30169381ceca41f2dc77/Api/Python/packages\adsk\fusion.py", line 18803, in add
return _fusion.MoveFeatures_add(self, *args)
RuntimeError: 3 : invalid transform
Sincerely
MichaelT
MichaelT