Malfunctions with the latest update of Fusion

Malfunctions with the latest update of Fusion

maurizio_mottarellaP385U
Contributor Contributor
815 Views
4 Replies
Message 1 of 5

Malfunctions with the latest update of Fusion

maurizio_mottarellaP385U
Contributor
Contributor

Hi Fusion 360

after installing the latest Fusion update (about a week ago), I encountered numerous malfunctions in my application, some even serious.
Here's what happens to me in particular

1 I found different behavior in the transform2 function of the occurence object. My application can create a component by extruding a DXF file. Many DXFs do not have the origin coinciding with a point of its bounding box, and therefore, after having extruded the component, I translate it so that its origin coincides with a point of its bounding box and I do this by executing the attached code (problem code 1, TranslateToNewOrigin function, see attached Code.txt). The component is actually correctly translated, but as soon as I do something on the component (for example I open a sketch on one of its faces, using Fusion menus), the component is retranslated by Fusion to its original position. In my opinion this is not correct and above all I don't know how to solve this problem.

2 If I call the function that deletes my axis origin tripod inside a preview function (problem code 2, DeleteTripod function), my application crashes.

3 If I enable the AngleValueCommandInput objects with the isEnabled method inside a validationinput event, the manipulators are positioned incorrectly and only after having clicked a bit on the viewport or selected the angle values ​​in the dialog box, they are positioned correctly and start working

All these problems were not present in previous versions and in particular the first one prevents my application from working at all.

Am I doing something wrong or is there a problem in the API?

Is there a danger that an add-in installed on one of my client's PCs stops working correctly after a Fusion update?

 

Thank you,

 

Maurizio

0 Likes
816 Views
4 Replies
Replies (4)
Message 2 of 5

BrianEkins
Mentor
Mentor

I spent quite a while last week debugging a similar problem. A fundamental change has been made in Fusion that is having a bigger impact than I would have expected. It manifests differently, so it's not always obvious when it is the cause.

 

A new "Ground to Parent" functionality was added to the last release, and the default is that it is enabled. To verify if this is causing your problems, you can turn it off and then run your code to see if the behavior is the same as before. The new preference that controls this setting is shown below.

 

BrianEkins_0-1717747436726.png

 

I think the simplest thing is to modify your code so that whenever you create an occurrence and need to reposition it, you check to see if it is grounded to parent, and turn it off.

 

occ = occs.addNewComponent(adsk.core.Matrix3D.create())
if occ.isGroundToParent:
    occ.isGroundToParent = False

 

 

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 5

maurizio_mottarellaP385U
Contributor
Contributor

Hi Brian, you solution worked, I modified my code and now the component do not move anymore. But look what happens in the attached screenshots. When I instantiate a TriadCommandInput I pass it the Matrix3D where to position itself inside the viewport, with the "transform" function. I pass the matrix corresponding to the position of my axis origin tripod. As you can see, in the component where no translation is made at the beginning (Component_1.png), the triad is positioned correctly. But in the component in which the initial translation is made (Component_2.png), the triad is referred to the origin of the dxf, not to the translated origin.

0 Likes
Message 4 of 5

BrianEkins
Mentor
Mentor

Is it possible to create a small sample that demonstrates the problem?

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 5 of 5

maurizio_mottarellaP385U
Contributor
Contributor

Hi Brian, I am writing it ... it takes still some time .. 

0 Likes