Getting the right position and rotation of an occurrence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a similar problem as this one:
"Background: I'm working on a script that will let me export STLs for all the unique components in my Fusion 360 assembly along with a JSON file containing the position and rotation data info for all the occurrences (aka occurrence.transform.asArray()) . I ultimately want to use this model data to recreate my project on the web using Three.js."
First problem was getting the right transformation form nested parts. Thanks to this post: https://forums.autodesk.com/t5/fusion-360-api-and-scripts/incorrect-transformation-from-occurrence-t... this is solved. But not quite.
The resultant assembly is not showing the right location of the parts since these parts have a "Rigid Joint" and therefore, their location is not the same as the transformation matrix. (see picture below)
Top view: Left-> Fusion; Right-> Viewer
The positioning of the parts directly relates to their respective origins, but I can't get the information remaining, which is the location of the rigid joint of each leg assembly to the top table so I can calculate the resultant final location.
legs offset
So I guess my question is if there is a way of getting the Occurrence/BRepBody position or transformation matrix based on the overall origin and not its own origin?