There are several new enhancements in this update and a couple that open some new doors on what can be done with the Fusion API.
-
The first of these is the ability to customize the context menu, or as it's called in Fusion, the marking menu. You do this by responding to the MarkingMenuDisplaying event which is fired just before the marking menu is shown to the user. Here, you have a chance to find out what's currently selected in the UI (which is what defines the context) and then add and remove commands from the linear and radial marking menus. Below is an example where a new custom "Design Notes" command is being added to the marking menu when the user right-clicks on the root component.
-
There are a couple of breaking changes in this release that we decided to go ahead and make because the functionality being changed is new and/or we believe the likelihood of impact on existing code to be very low. These are:
-
The various add methods to create new sketch dimensions have a new "isDriving" argument to allow you to create driving or driven dimensions. This is an optional argument with the default value being True to create a driving dimension, which is the same as before. Because it's an optional argument that defaults to the same result as before, there is no impact to Python or JavaScript programs because they're interpreted and will automatically use the optional argument. C++ code will need to be recompiled.
-
In the last update we added some changes to bring the API in sync with the user-interface for creating extrusions. There were a couple of mistakes that we need to clean up in this update. The first is that the taperAngleOne and taperAngleTwo properties were typed to return a base.Core object. This has been corrected so they're typed to return a ModelParameter object.
The second issue is that there were two settings to control the direction of a through-all extent extrusion which was confusing. We've removed the "isPositiveDirection" argument from the create method of the ThroughAllExtentDefinition class. If you've used this you'll need to update your code to remove setting that argument and continue to use the "direction" argument on the setOneSideExtent method of the ExtrudeFeatureInput object.
-
-
With the recent changes to the Extrude feature the API to create extrusions got quite a bit more complicated. However, we recognized that even though the feature is more powerful and provides a lot more capabilities, the majority of the time people still create simple finite extrusions. To make this more common workflow easier, we've added a new addSimple. method to the ExtrudeFeatures collection. This makes creating an extrusion much simpler than it ever was before with a single API call.
-
Fusion recently added the ability to choose which bodies will be affected when creating certain features; extrude, hole, loft, revolve, and sweep. The input objects for each of those features and the feature objects themselves all now support a "participantBodies" property that lets you specify the set of bodies that will participate in the feature. The default is that all visible bodies that intersect the feature will be used, which was also the previous default so existing programs shouldn't see any change of behavior.
-
An entirely new feature in this update is the ability for an add-in to fire an event to itself. This may seem like a strange thing to do but it opens up some new capabilities for some add-ins. Because all add-ins run in the main thread of Fusion, when the add-in code is actively executing everything else is blocked. This behavior is typical of most applications that have a user-interface. Changes to Fusion data, (both interactively and through the API), is done by code running in the main thread. However, there are cases where an add-in wants to do some separate work outside of Fusion and doesn't want to block the user interacting with Fusion while this work occurs. It's possible to create a new thread where this separate work can happen so the main thread isn't blocked but it hasn't been possible for that worker thread to communicate back to the add-in in the main thread. This new event provides that capability. See the new Working in a Separate Thread topic in the user manual for more information.
-
A new command input to allow the user to enter an angle, both in a command dialog and in the graphics window is now supported. The AngleValueCommandInput will allow you to create an input like that used to define the angle in the Revolve feature command, like shown below.
-
In response to ross.korsky's question in the forum we've added a new deleteEntities method on the Design object. This takes in an array of entities and deletes them all at once which is much simpler and faster than deleting them one at a time, which is what you had to do before. This is similar to selecting several entities and pressing the Delete key in the user-interface.
-
We've also fixed several issues we found in our testing and the following problems that were reported on the forum.
-
darinAZY43 reported a problem where the creation of Patch features was failing when the input curves were non-planar. This has now been fixed.
-
GeoffPacker7777 reported a problem where the setByDistanceOnPath method of the ConstructionPlaneInput object was not allowing a Path as input but only single entities. This has now been fixed.
-
It was reported that TableCommandInputs don't work correctly when your command dialog has tabs with tables on each tab. This has now been fixed.
-
-Brian