Is there a need for optimization in the algorithm used by Inventor for Sheet Metal Flat Pattern views?

Is there a need for optimization in the algorithm used by Inventor for Sheet Metal Flat Pattern views?

iLimbani
Contributor Contributor
512 Views
5 Replies
Message 1 of 6

Is there a need for optimization in the algorithm used by Inventor for Sheet Metal Flat Pattern views?

iLimbani
Contributor
Contributor

Hello everyone,

I'm facing an issue with the Flat Pattern Length and Width Dimensions obtained from the Flat Pattern view in Autodesk Inventor. When I create a Flat Pattern view, I understand that Inventor rotates the part to align the largest edge with the X-axis. The dimensions I get from this view differ significantly from the dimensions I obtain when manually rotating the flat pattern view.

In Picture - 1, the Flat Pattern view created by Inventor shows dimensions of 1207.3 mm and 2936.92 mm. In Picture - 2, I manually adjusted the flat pattern view (rotated the part), resulting in dimensions of 1217.63 mm and 2813.95 mm.

Upon calculating the area using these dimensions, Picture - 2 has a smaller area than Picture - 1. I believe that Picture - 2 is more desirable, as it facilitates better nesting and reduces material consumption.

Consider another sheet metal part that is longer than the one attached. If I follow the approach in Picture - 1 and obtain dimensions exceeding 3048 mm, which is the length of a 10-ft sheet, I would need to purchase a 12-ft sheet. However, if I rotate the part and the dimensions come in just under 3048 mm, I can efficiently utilize a 10-ft sheet without the need to buy a larger 12-ft sheet.

My question is why doesn't Inventor take into account the combination of area and the rotation of the longest edge to provide users with the best output, ultimately minimizing material consumption? I've attached the Sheet Metal Part file for reference.

Let me know if I am missing anything @johnsonshiue @Curtis_Waguespack @Gabriel_Watson 

Thank you

Picture - 1 

iLimbani_0-1706123093286.png


Picture - 2

iLimbani_1-1706123131282.png



513 Views
5 Replies
Replies (5)
Message 2 of 6

Frederick_Law
Mentor
Mentor

What size does Flat Extent show?

FlatExtend-02.jpg

0 Likes
Message 3 of 6

WCrihfield
Mentor
Mentor

I am not sure how those standard sheet metal length and width specs are figured/obtained behind the scenes, but there is another option that might possibly result in more accurate or conservative values, if odd orientations is an issue.  It would require a bit of Inventor API code to access, but may be worth it, if it works better for you.  The FlatPattern API object has a direct property (FlatPattern.OrientedMinimumRangeBox) which is supposed to ignore the model's X, Y, & Z orientation with respect to the model's origin, to get true minimum size in any orientation.  That property returns an OrientedBox API object.  We can get the 3 directional lengths from that object using the following process.  Its DirectionOne, DirectionTwo, and DirectionThree properties return a Vector API object.  That Vector has a Length property, which we can get that measurement from.  However, that measurement will be in 'database units' (always centimeters, for distance/length), instead of 'document units', so some units conversion may be needed to get the results in something other than centimeters units.

 

Here is an example iLogic rule using this technique, but just shows the resulting size in a message.  Those values could also be written to iProperties or Parameters.

Sub Main
	If ThisDoc.Document.SubType <> "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then Return
	Dim oPDoc As PartDocument = ThisDoc.Document
	Dim oSMDef As SheetMetalComponentDefinition = oPDoc.ComponentDefinition
	Dim oFP As FlatPattern = Nothing
	If oSMDef.HasFlatPattern Then
		oFP = oSMDef.FlatPattern
	Else
		Try
			oSMDef.Unfold()
			oFP = oSMDef.FlatPattern
			oFP.ExitEdit
		Catch
			Logger.Error("Error unfolding Sheet Metal part to get FlatPattern.")
		End Try
	End If
	If oFP Is Nothing Then Return
	Dim oBox As OrientedBox = oFP.OrientedMinimumRangeBox
	Dim oList As New List(Of Double)
	'convert centimeter units to document units, then round the value off to 3 decimal places
	oList.Add(Round(oPDoc.UnitsOfMeasure.ConvertUnits(oBox.DirectionOne.Length, "cm", oPDoc.UnitsOfMeasure.LengthUnits), 3))
	oList.Add(Round(oPDoc.UnitsOfMeasure.ConvertUnits(oBox.DirectionTwo.Length, "cm", oPDoc.UnitsOfMeasure.LengthUnits), 3))
	oList.Add(Round(oPDoc.UnitsOfMeasure.ConvertUnits(oBox.DirectionThree.Length, "cm", oPDoc.UnitsOfMeasure.LengthUnits), 3))
	oList.Sort()
	MsgBox("FlatPattern Min Size = " & oList(0).ToString & " x " & oList(1).ToString & " x " & oList(2).ToString, vbInformation, "FlatPattern Size")
End Sub

If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 4 of 6

iLimbani
Contributor
Contributor

Thank you, @WCrihfield, for your response. While your solution effectively addresses the flat pattern lengths and widths, I was seeking a solution that prioritizes the orientation of the DXF file to simplify the programming process. The goal is to minimize the complexity for the programming team while obtaining necessary flat pattern orientation for defining custom parameters.

Below are the logical steps for the solution I propose:

  1. Identify the occurrence of issues when two lines are parallel, while the remaining lines are not perpendicular to the parallel lines.

  2. Sketch on the flat pattern generated by Inventor.

  3. Project the geometry to obtain the four longest lines within the sketch.

  4. Check for parallelism among the four longest lines to determine the orientation of the flat pattern.

    Thank you 

0 Likes
Message 5 of 6

Frederick_Law
Mentor
Mentor

@iLimbani wrote:


My question is why doesn't Inventor take into account the combination of area and the rotation of the longest edge to provide users with the best output, ultimately minimizing material consumption? I've attached the Sheet Metal Part file for reference.


Most user will sent flat to nesting software which will fit the parts efficiently.

Part rotation in IV have no effect there.

 

I understand you're trying to estimate material for quote.

I've done 3-axis to 5-axis CNC, laser, waterjet, plasma, CNC punch.

Some time material grain direction is important.

There is no "perfect" "estimate".  There is good enough estimate.

Just find a easy, fast "good enough" estimate.

 

On the other hand.

The user creating the model and flat could rotate the flat.

Flat-05.jpg

 

This won't solve your problem.

Maybe reduce the pain.

0 Likes
Message 6 of 6

iLimbani
Contributor
Contributor

In our company, we often deal with a large number of .ipt files, each containing iPart members. Manually opening each .ipt file to select edges for rotating flat patterns is not efficient, especially when dealing with hundreds of parts. The headache of rotating DXF files in nesting software due to imprecise corner selection further complicates matters. To streamline this process, I've developed an iLogic solution. This iLogic script automates the rotation of flat patterns and extracts precise material order estimates, addressing the challenges associated with manual selection and rotation of DXF files.

0 Likes