<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is there a need for optimization in the algorithm used by Inventor for Sheet Metal Flat Pattern views? in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12518540#M162924</link>
    <description>&lt;P&gt;What size does Flat Extent show?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FlatExtend-02.jpg" style="width: 276px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1317987i3F39A67FE38A3D53/image-size/large?v=v2&amp;amp;px=999" role="button" title="FlatExtend-02.jpg" alt="FlatExtend-02.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jan 2024 19:36:46 GMT</pubDate>
    <dc:creator>Frederick_Law</dc:creator>
    <dc:date>2024-01-24T19:36:46Z</dc:date>
    <item>
      <title>Is there a need for optimization in the algorithm used by Inventor for Sheet Metal Flat Pattern views?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12518505#M162922</link>
      <description>&lt;P&gt;Hello everyone,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Let me know if I am missing anything&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/486618"&gt;@johnsonshiue&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/105031"&gt;@Curtis_Waguespack&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3323487"&gt;@Gabriel_Watson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;Picture - 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iLimbani_0-1706123093286.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1317971i42A8D21A0B61241B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="iLimbani_0-1706123093286.png" alt="iLimbani_0-1706123093286.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Picture - 2&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iLimbani_1-1706123131282.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1317972i9DCABFE35F91A0DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="iLimbani_1-1706123131282.png" alt="iLimbani_1-1706123131282.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 19:21:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12518505#M162922</guid>
      <dc:creator>iLimbani</dc:creator>
      <dc:date>2024-01-24T19:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a need for optimization in the algorithm used by Inventor for Sheet Metal Flat Pattern views?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12518540#M162924</link>
      <description>&lt;P&gt;What size does Flat Extent show?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FlatExtend-02.jpg" style="width: 276px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1317987i3F39A67FE38A3D53/image-size/large?v=v2&amp;amp;px=999" role="button" title="FlatExtend-02.jpg" alt="FlatExtend-02.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 19:36:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12518540#M162924</guid>
      <dc:creator>Frederick_Law</dc:creator>
      <dc:date>2024-01-24T19:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a need for optimization in the algorithm used by Inventor for Sheet Metal Flat Pattern views?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12518596#M162925</link>
      <description>&lt;P&gt;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.&amp;nbsp; It would require a bit of Inventor API code to access, but may be worth it, if it works better for you.&amp;nbsp; The &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-FlatPattern" target="_blank" rel="noopener"&gt;FlatPattern&lt;/A&gt; API object has a direct property (&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=FlatPattern_OrientedMinimumRangeBox" target="_blank" rel="noopener"&gt;FlatPattern.OrientedMinimumRangeBox&lt;/A&gt;) which is supposed to ignore the model's X, Y, &amp;amp; Z orientation with respect to the model's origin, to get true minimum size in any orientation.&amp;nbsp; That property returns an &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-OrientedBox" target="_blank" rel="noopener"&gt;OrientedBox&lt;/A&gt; API object.&amp;nbsp; We can get the 3 directional lengths from that object using the following process.&amp;nbsp; Its &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=OrientedBox_DirectionOne" target="_blank" rel="noopener"&gt;DirectionOne&lt;/A&gt;, &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=OrientedBox_DirectionTwo" target="_blank" rel="noopener"&gt;DirectionTwo&lt;/A&gt;, and &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=OrientedBox_DirectionThree" target="_blank" rel="noopener"&gt;DirectionThree&lt;/A&gt;&amp;nbsp;properties return a &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-Vector" target="_blank" rel="noopener"&gt;Vector&lt;/A&gt; API object.&amp;nbsp; That Vector has a &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=Vector_Length" target="_blank" rel="noopener"&gt;Length&lt;/A&gt; property, which we can get that measurement from.&amp;nbsp; 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example iLogic rule using this technique, but just shows the resulting size in a message.&amp;nbsp; Those values could also be written to iProperties or Parameters.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	If ThisDoc.Document.SubType &amp;lt;&amp;gt; "{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 = " &amp;amp; oList(0).ToString &amp;amp; " x " &amp;amp; oList(1).ToString &amp;amp; " x " &amp;amp; oList(2).ToString, vbInformation, "FlatPattern Size")
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN&gt;&lt;STRONG&gt; ACCEPT SOLUTION &lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@7401B55A0A518861312A0F851CD29320/emoticons/1f44d.png" alt=":thumbs_up:" title=":thumbs_up:" /&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 20:08:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12518596#M162925</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-01-24T20:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a need for optimization in the algorithm used by Inventor for Sheet Metal Flat Pattern views?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12558375#M163671</link>
      <description>&lt;P&gt;Thank you, &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;, 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.&lt;/P&gt;&lt;P&gt;Below are the logical steps for the solution I propose:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Identify the occurrence of issues when two lines are parallel, while the remaining lines are not perpendicular to the parallel lines.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Sketch on the flat pattern generated by Inventor.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Project the geometry to obtain the four longest lines within the sketch.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Check for parallelism among the four longest lines to determine the orientation of the flat pattern.&lt;BR /&gt;&lt;BR /&gt;Thank you&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 13 Feb 2024 20:18:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12558375#M163671</guid>
      <dc:creator>iLimbani</dc:creator>
      <dc:date>2024-02-13T20:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a need for optimization in the algorithm used by Inventor for Sheet Metal Flat Pattern views?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12558442#M163672</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12242757"&gt;@iLimbani&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;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.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Most user will sent flat to nesting software which will fit the parts efficiently.&lt;/P&gt;&lt;P&gt;Part rotation in IV have no effect there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand you're trying to estimate material for quote.&lt;/P&gt;&lt;P&gt;I've done 3-axis to 5-axis CNC, laser, waterjet, plasma, CNC punch.&lt;/P&gt;&lt;P&gt;Some time material grain direction is important.&lt;/P&gt;&lt;P&gt;There is no "perfect" "estimate".&amp;nbsp; There is good enough estimate.&lt;/P&gt;&lt;P&gt;Just find a easy, fast "good enough" estimate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the other hand.&lt;/P&gt;&lt;P&gt;The user creating the model and flat could rotate the flat.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flat-05.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1325741i7A610F7E13E733C2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Flat-05.jpg" alt="Flat-05.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This won't solve your problem.&lt;/P&gt;&lt;P&gt;Maybe reduce the pain.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 21:00:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12558442#M163672</guid>
      <dc:creator>Frederick_Law</dc:creator>
      <dc:date>2024-02-13T21:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a need for optimization in the algorithm used by Inventor for Sheet Metal Flat Pattern views?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12558473#M163676</link>
      <description>&lt;P&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 21:14:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/is-there-a-need-for-optimization-in-the-algorithm-used-by/m-p/12558473#M163676</guid>
      <dc:creator>iLimbani</dc:creator>
      <dc:date>2024-02-13T21:14:08Z</dc:date>
    </item>
  </channel>
</rss>

