Flat Pattern Area

Flat Pattern Area

Anonymous
Not applicable
1,369 Views
4 Replies
Message 1 of 5

Flat Pattern Area

Anonymous
Not applicable
I'm looking for a method to get the surface area of a sheet metal flat pattern based on it's OUTSIDE perimeter, i.e. ignoring any internal cutouts. Previously I've used the 'RangeBox' property which is OK for rectangular parts, but the error increases with irregular shapes.
I'd appreciate any guidance on the approach to use.
0 Likes
1,370 Views
4 Replies
Replies (4)
Message 2 of 5

alewer
Advocate
Advocate
This won't be elegant or fast, but you might export flat pattern to .dwg or .dxf such that profiles end up as polylines. Then find the profile in AutoCAD (look for a polyline on the correct layer), and read the area property. I hope there is a better way, but I can't think of one.
0 Likes
Message 3 of 5

Anonymous
Not applicable
I'd thought of that, but was hoping I could keep within Inventor and not have to branch out into ACAD and bring the result back into Inventor
0 Likes
Message 4 of 5

Anonymous
Not applicable

Here is a macro that I think will do what you want.
You need to be on Inventor 2010 or later version.

 

Sanjay-

 

 

Sub FlatPatternArea()
   

    Dim oDoc As PartDocument
    Set oDoc =
ThisApplication.ActiveDocument
   
    Dim
oDef As SheetMetalComponentDefinition
    Set oDef =
oDoc.ComponentDefinition
   
    Dim
oFlatPattern As FlatPattern
    Set oFlatPattern =
oDef.FlatPattern
   
    Dim oTransaction
As Transaction
    Set oTransaction =
ThisApplication.TransactionManager.StartTransaction(oDoc, "Find
area")
   
    Dim oSketch As
PlanarSketch
    Set oSketch =
oFlatPattern.Sketches.Add(oFlatPattern.TopFace)
   

    Dim oEdgeLoop As EdgeLoop
    For Each
oEdgeLoop In
oFlatPattern.TopFace.EdgeLoops
        If
oEdgeLoop.IsOuterEdgeLoop
Then
            Exit
For
        End If
   
Next
   
    Dim oEdge As
Edge
    For Each oEdge In
oEdgeLoop.Edges
        Call
oSketch.AddByProjectingEntity(oEdge)
   
Next
   
    Dim oProfile As
Profile
    Set oProfile =
oSketch.Profiles.AddForSolid
   
    Dim
dArea As Double
    dArea =
oProfile.RegionProperties.Area
   
   
oTransaction.Abort
   
    MsgBox "External
surface area = " & dArea & " cm^2"
End Sub


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
face=Arial size=2>
 
0 Likes
Message 5 of 5

Anonymous
Not applicable
Many thanks Sanjay, it does what I need.

Peter
0 Likes