Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

A way to infer Sheet Metal component

gvisca44
Advocate Advocate
449 Views
2 Replies
Message 1 of 3

A way to infer Sheet Metal component

gvisca44
Advocate
Advocate

I am writing a Bill of Materials type add-in to assist me costing our solutions (which can be between 50 and 150 individual sheet metal components from various sheet metal thicknesses).

 

Two questions here:

 

Question 1:

I am already aware that none of the sheet metal functionality is currently exposed to the API, but has anyone discovered a way to infer whether a component (or occurrence) is a sheet metal component ?

 

Question 2:

Seeking clarification on what I think I have discovered.

 

In the absence of sheet metal exposure to the API, I have written code calculates the sheet metal thickness by :

1.  iterating through brepfaces of a brepbody to find the largest face (area).

2.  create a collection of tangentiallyConnectedFaces to the largest face.

3.  sum the area of the tangentiallyConnectedFaces and the largest face; which gets me to within approx 1% of the flat pattern single sided face area.  I understand this will be slightly incorrect as the bend allowances/bend deductions aren't factored. 

 

Divide the output of (3) above into the brepBodies.volume to get a sheet metal thickness.

 

The API help says:

 

BRepFace.tangentiallyConnectedFaces Property

Parent Object: BRepFace

Description

Returns the set of faces that are tengentially adjacent to this face. In other words, it is the set of faces that are adjacent to this face's edges and have a smooth transition across those edges.

 

My interpretation of adjacent is just those faces that are immediately adjacent / connected to the chosen face.

 

However, the property appears to return a "chain" of faces (I hope thats the correct term).  As an example, for a simple open box sheet metal part (base flange plus 4 sides), this property will provide a collection of 8 faces (I believe 4 faces representing the folds and 4 faces representing the side flanges).

 

Have I got that correct ?  The maths and tests certainly appear to indicate as such - and assuming I am correct - does the API help need to be amended to reflect accordingly.  Or do we think my interpretation of adjacent is 

 

Glenn.

Reply
Reply
0 Likes
450 Views
2 Replies
Replies (2)
Message 2 of 3

BrianEkins
Mentor
Mentor

I don't know of a completely reliable way to infer if a component is a sheet metal component or not.  You could look at the geometry but there are plenty of fringe cases where you would get the wrong inference.  You can also look at the features and any sheet metal features will exist in the collection of features but return None when you try to get them.  However, it's possible there could be other non-supported features that aren't sheet metal related so that would also give you a false positive.  Hopefully, there will be some support for sheet metal in the future.

 

Regarding your second question, the help documentation should be more explicit but your interpretation is correct and the set of tangentially connected faces, whether they are directly connected to the start face or not, are returned.

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

kandennti
Mentor
Mentor

Hi @gvisca44 .

 

I tried a little.

In the case of GUI, I noticed that the sheet metal body cannot be copied. So I tried this.
・ TemporaryBRepManager.copy
・ Component.features.copyPasteBodies
・ Component.features.moveFeatures
(There was no copy option)
However, these could not be judged.

Reply
Reply
0 Likes