Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to detect the hole features and select them using API? Or can we auto select hole features when user moves mouse close to any hole entity in a model?

1 REPLY 1
Reply
Message 1 of 2
navalkishor.sahKWL5T
376 Views, 1 Reply

Is it possible to detect the hole features and select them using API? Or can we auto select hole features when user moves mouse close to any hole entity in a model?

@BrianEkins @MattWynn 

We want to find & select hole features from the model for some CAM operations. The model is imported from external CAD applications, therefore it has no information about the hole feature. We tried using the inbuilt 'Find Features' command but it could not find the holes present in the model. We confirmed that it works as expected if we create a hole in Fusion 360.

 

The following lines give the count of hole features if the holes are created through Fusion 360. The holes which are created in different CAD applications are not detected.

 

Ptr<Features> feats = rootComp->features();

if (!feats) return false;

Ptr<HoleFeatures> holes = feats->holeFeatures();

int nCount = holes->count();

 

Find Features.png

 

Can we get the APIs(Backend logic) used for the below hole/boundary selection?

Select hole.png

 

1 REPLY 1
Message 2 of 2

There are two issues in the workflow you described.  The first is finding the "hole" features and the second is using that information to define the geometry associated with an operation.

 

I'll start with the second. The API support for CAM is currently limited. The CAM team did recently add the ability to access and edit the values associated with an operation. However, it's not currently possible to define the geometry for an operation. So even if you can find the edges associated with a hole, you won't be able to add them to an operation. This would be extremely useful and has limited some of the work I've wanted to do but I don't know when that will be supported.

 

For finding specific features in a non-parametric model, there aren't any feature recognition capabilities exposed by the API. This also tends to be very specific for different use cases. However, the API does fully expose the geometry and topology that make up the model. In most cases, it's possible to use that to write your own feature recognition. You can read more about this at a high level in the user manual topic on B-Rep.

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report