cadop / fusion360descriptor

A URDF Exporter for Fusion 360
12 stars 3 forks source link

Using isVisible #45

Open cadop opened 9 months ago

cadop commented 9 months ago

For some reason the bodies are all exporting even when they are not visible. It seems like the top level component can use the isLightBulbOn https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-90B68AA9-EADE-4597-8201-1371CCA96E38 but that doesn't consider if its visible in the scene. IsVisible cares about visibility https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-bc2399ce-a9b0-4247-9779-e4aae936abad

I can't remember why we did this and not isVisible I think it might have been because we turned off the lightbulb at some point, and was then just checking if it was on as well?

apric0ts commented 9 months ago

I believe some insight may be found in this commit, in io file around line 60: https://github.com/cadop/fusion360descriptor/commit/1d07e48313d9c510d4f139b7a20a7322be9fa8f1 From what I remember, we were turning off lightbulbs and only appending visible bodies to be exported. IIRC, the behavior of exporting STLs when lightbulb was off was that it would only export bodies with light bulb on, as long as all parent bodies had light bulbs on. to reword, body X would be exported if all of body X's ancestors/parents had lightbulb on and body X had lightbulb on