- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I am trying to get the joint origin coordinates relative to the world coordinates but I am having some issues.
Let me start from what I am doing: I have a bunch of models which have revolute and slider (prismatic) joints and these models are created in separate files in my project. I am creating a new file and inserting these models as linked components. When the model is inserted to the new file, Move/Rotate dialog box opens and I provide a translation and rotation to the models. Finally, I import a model with slider joints and using a rigid joint, I fix that model to the end of the one of the previously inserted models.
Before posting this question, I've found very useful code snippets in Python and C++ and a perfect tutorial in Japanese (thanks, Google Translate! :)) on Fusion 360 assembly context structure. I've tested using some of those examples and they are working fine and I was able to get correct transformation matrices for the models when I provide an initial translation and rotation.
On the other hand, when I fix a model to the end of another model using a rigid joint, I cannot get the correct transformation matrix.
The above explanation probably sounds confusing. I believe you should be able to reproduce the issue by following the steps below.
1. Insert a new model using right click -> Insert Into Current Design
2. Add a random translation and rotate by some degrees, e.g. -45, using the Move/Copy window
3. Insert the same model as (1) using right click -> Insert Into Current Design
4. Add a random translation and rotate by some degrees, e.g. 90, , using the Move/Copy window
5. Add another model using right click -> Insert Into Current Design
7. Do not add any translation or rotation, just click OK button on the Move/Copy window
8. Create a root joint between (5) and (3)
9. Get the transformation matrix of the occurrence (5) relative to root (using the Python API from transform or transform2 properties of the Occurrence object)
Since we haven't added any transformation on step (7), I get a unit transformation matrix when I query the API as described on step (9).
I also used Modify -> Compute All but it didn't change anything.
I am sure I am missing something here but I couldn't find the missing or incorrect thing. I'd appreciate any help or comments at this point.
Thanks!
Solved! Go to Solution.