<?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: Best Linear Cut Optimizers in Inventor Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/9977814#M123125</link>
    <description>&lt;P&gt;For a single set of lengths to optimize the solutions are relatively narrow and limited to&lt;/P&gt;&lt;P&gt;the best combination that can be fit within a stock length to cut from.&lt;/P&gt;&lt;P&gt;However if the need is for multiple sets not all known at one time, now that's where there&lt;/P&gt;&lt;P&gt;is no absolute best as strategies come in to play. As with poker, odds and choice strategies.&lt;/P&gt;&lt;P&gt;I have extensive experience in this area, over 30 years and many thousands of optimizations.&lt;/P&gt;&lt;P&gt;Anyone with questions may feel free to contact me about some of these techniques&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jan 2021 23:27:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-01-04T23:27:47Z</dc:date>
    <item>
      <title>Best Linear Cut Optimizers</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/9967542#M123122</link>
      <description>&lt;P&gt;All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good morning!&amp;nbsp; I was recently asked by a client what the best linear cut optimizers are out there for Inventor.&amp;nbsp; I didn't see anything in the Inventor App Store, so I some digging and found a couple of online calculators and a couple of Excel based options.&amp;nbsp; However, it dawned on me that I should reach out to the community to see what everyone else has / is using.&amp;nbsp; If you could please provide links to the optimizers below, I'd love to evaluate them.&amp;nbsp; If you have any questions, please do not hesitate to contact me.&amp;nbsp; Below is a list that I've at least taken a cursory look at:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsmartcut.pro%2F&amp;amp;data=04%7C01%7Cpeter.strycharske%40teamd3.com%7Caa724666c0eb46cb9d7208d8a8196906%7Cb07986d5f67243cc9ebe131045c83337%7C0%7C0%7C637444174387754679%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=ccjqTv%2BNs3T6xsVygYHG91QH4uPRIegyqS%2FRd4l7A3s%3D&amp;amp;reserved=0" target="_blank"&gt;https://smartcut.pro/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.cutoptimizeronline.com%2F&amp;amp;data=04%7C01%7Cpeter.strycharske%40teamd3.com%7Caa724666c0eb46cb9d7208d8a8196906%7Cb07986d5f67243cc9ebe131045c83337%7C0%7C0%7C637444174387754679%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=nAfnZKzTBwGjmWkNvXthMAKvKoxDZg0SZxw1g90B%2Fww%3D&amp;amp;reserved=0" target="_blank"&gt;https://www.cutoptimizeronline.com/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.optimalon.com%2Flength_cutting_excel.htm&amp;amp;data=04%7C01%7Cpeter.strycharske%40teamd3.com%7Caa724666c0eb46cb9d7208d8a8196906%7Cb07986d5f67243cc9ebe131045c83337%7C0%7C0%7C637444174387764637%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=%2F1fVuDRpubJqyUs9B74PmjvVjWsyzsjvn%2FcKqjYQqI4%3D&amp;amp;reserved=0" target="_blank"&gt;https://www.optimalon.com/length_cutting_excel.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmetalopt.com%2Ffree_optimizer.html&amp;amp;data=04%7C01%7Cpeter.strycharske%40teamd3.com%7Caa724666c0eb46cb9d7208d8a8196906%7Cb07986d5f67243cc9ebe131045c83337%7C0%7C0%7C637444174387764637%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=0y3fKFbjlvtAL2dnoS5v0CAKxDpyWQo0YRIMUOIS9CQ%3D&amp;amp;reserved=0" target="_blank"&gt;https://metalopt.com/free_optimizer.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for any thoughts!&amp;nbsp; Hope all is well and have a most blessed day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Peace,&lt;/P&gt;
&lt;P&gt;Pete&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 14:38:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/9967542#M123122</guid>
      <dc:creator>petestrycharske</dc:creator>
      <dc:date>2020-12-29T14:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Best Linear Cut Optimizers</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/9968061#M123123</link>
      <description>&lt;P&gt;Oops, I meant to ask for others to provide links.&amp;nbsp; I merely wanted to list the ones that I'd already looked at to see if others had any feedback on them.&amp;nbsp; Sorry for any confusion.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 19:05:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/9968061#M123123</guid>
      <dc:creator>petestrycharske</dc:creator>
      <dc:date>2020-12-29T19:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Best Linear Cut Optimizers</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/9972421#M123124</link>
      <description>&lt;P&gt;Hi Pete,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sorry that I don't have much to offer here since I am ignorant of "Linear Cut Optimizer." I am not aware of an Autodesk solution. I think what you have found is much more information than I can offer.&lt;/P&gt;
&lt;P&gt;There is a trick I use for inquiries like this. I usually search for a solution provided for our competitors. Sometimes, the same solution might be available to Inventor also. For example, there are some online viewers and robotic analysis tools.&amp;nbsp;Please share what you find.&lt;/P&gt;
&lt;P&gt;Merry Christmas and Happy New Year!&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jan 2021 16:46:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/9972421#M123124</guid>
      <dc:creator>johnsonshiue</dc:creator>
      <dc:date>2021-01-01T16:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Best Linear Cut Optimizers</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/9977814#M123125</link>
      <description>&lt;P&gt;For a single set of lengths to optimize the solutions are relatively narrow and limited to&lt;/P&gt;&lt;P&gt;the best combination that can be fit within a stock length to cut from.&lt;/P&gt;&lt;P&gt;However if the need is for multiple sets not all known at one time, now that's where there&lt;/P&gt;&lt;P&gt;is no absolute best as strategies come in to play. As with poker, odds and choice strategies.&lt;/P&gt;&lt;P&gt;I have extensive experience in this area, over 30 years and many thousands of optimizations.&lt;/P&gt;&lt;P&gt;Anyone with questions may feel free to contact me about some of these techniques&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 23:27:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/9977814#M123125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-04T23:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Best Linear Cut Optimizers</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/9979067#M123126</link>
      <description>&lt;P&gt;Hey Pete,&lt;/P&gt;&lt;P&gt;Another thought, would you be able to create a nesting template for bar stock(or whatever you/client is using) and use that?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 13:22:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/9979067#M123126</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-01-05T13:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Best Linear Cut Optimizers</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/10728775#M123127</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104212"&gt;@petestrycharske&lt;/a&gt;&amp;nbsp;Did you have any success with this search?&amp;nbsp; This would be HUGE for us, and I'm surprised that there aren't any options in the app store.&amp;nbsp; We are always generating cut lists from our BOM and manually determining how many sticks of metal would be required for ordering / cutting processes in the shop.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@Anonymous&amp;nbsp;Could you elaborate on what tools you could use for this?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 21:20:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/10728775#M123127</guid>
      <dc:creator>paulZKN98</dc:creator>
      <dc:date>2021-11-01T21:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Best Linear Cut Optimizers</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/10730231#M123128</link>
      <description>&lt;P&gt;I recently used Inventor Nesting to solve this problem for rubber strips.&amp;nbsp; It is part of the PDMC subscription, but a separate install.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I followed the AU class here:&amp;nbsp;&lt;A href="https://www.autodesk.com/autodesk-university/class/Inventor-Nesting-Isnt-Just-Sheet-Metal-2020" target="_blank"&gt;https://www.autodesk.com/autodesk-university/class/Inventor-Nesting-Isnt-Just-Sheet-Metal-2020&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worked fine for my needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 13:06:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/10730231#M123128</guid>
      <dc:creator>swalton</dc:creator>
      <dc:date>2021-11-02T13:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Best Linear Cut Optimizers</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/10730624#M123129</link>
      <description>Wow, I've played around with Inventor Nesting but thought it was only for Sheetmetal. This is big! Thankyou!</description>
      <pubDate>Tue, 02 Nov 2021 15:55:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/10730624#M123129</guid>
      <dc:creator>paulZKN98</dc:creator>
      <dc:date>2021-11-02T15:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Best Linear Cut Optimizers</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/14067283#M409020</link>
      <description>&lt;P&gt;Hello! I’ve been using &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;smartcut.pro&lt;/SPAN&gt;&lt;/SPAN&gt; for a while — it provides decent results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Recently, I started working on my own solution. It’s still in beta, but in my tests it already delivers very competitive (and sometimes better) results compared to other tools.&lt;/P&gt;&lt;P&gt;I would really appreciate it if you could try it out and share your feedback:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cut1d.xyz/" target="_blank" rel="noopener"&gt;https://cut1d.xyz/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Benchmark setup&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Stock length: &lt;STRONG&gt;1250&lt;/STRONG&gt; (unlimited quantity)&lt;/LI&gt;&lt;/UL&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;Test Case 1 – Details&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Length Quantity &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;TD&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;460&lt;/TD&gt;&lt;TD&gt;53&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;620&lt;/TD&gt;&lt;TD&gt;6&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;Results (Test Case 1)&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Tool&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bars&amp;nbsp; Max Waste&amp;nbsp; &amp;nbsp; &amp;nbsp;Time &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;smartcut.pro&lt;/TD&gt;&lt;TD&gt;32&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;TD&gt;5s&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;metalopt&lt;/TD&gt;&lt;TD&gt;32&lt;/TD&gt;&lt;TD&gt;750&lt;/TD&gt;&lt;TD&gt;3s&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;cut1d&lt;/TD&gt;&lt;TD&gt;32&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;TD&gt;1s&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;Test Case 2 – Details&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Length Quantity &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;TD&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;620&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;460&lt;/TD&gt;&lt;TD&gt;53&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1200&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;P&gt;&lt;STRONG&gt;Results (Test Case 2)&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Tool&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Bars&amp;nbsp; &amp;nbsp;Max Waste&amp;nbsp; &amp;nbsp; Time &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;smartcut.pro&lt;/TD&gt;&lt;TD&gt;57&lt;/TD&gt;&lt;TD&gt;790&lt;/TD&gt;&lt;TD&gt;5s&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;metalopt&lt;/TD&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;TD&gt;750&lt;/TD&gt;&lt;TD&gt;3s&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;cut1d&lt;/TD&gt;&lt;TD&gt;52&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;TD&gt;1s&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;P&gt;These are simple test cases, but they already show promising performance.&lt;/P&gt;&lt;P&gt;Thanks in advance for your time — any feedback is highly appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2026 11:58:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/14067283#M409020</guid>
      <dc:creator>mik_korepanov</dc:creator>
      <dc:date>2026-03-26T11:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Best Linear Cut Optimizers</title>
      <link>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/14088764#M409710</link>
      <description>&lt;P&gt;It's still very much a work in progress but I'm trying to build one with iLogic&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Option Explicit

Sub Main()
    Dim app As Inventor.Application = ThisApplication
    Dim tg As TransientGeometry = app.TransientGeometry
    Dim srcAsm As AssemblyDocument = app.ActiveDocument
	Dim basePath As String
	basePath = Left(srcAsm.FullFileName, InStrRev(srcAsm.FullFileName, "\"))

    ' ---------------- Paramètres ----------------
    Dim kerfMM As Double: kerfMM = 3.175          ' 1/8"
    Dim stockLenMM As Double: stockLenMM = 7315.2 ' 288"
    Dim gabaritPath As String
    gabaritPath = "C:\Vault WS\Designs\DIVERS\Mathieu G\Tests iLogic\OptiCutter\OptiCutter-Template.iam"

    ' ---------------- Préparer dictionnaire familles ----------------
    Dim families As New Dictionary(Of String, List(Of Object()))
    Dim keywords() As String: keywords = Split("POUTRE|CORNIÈRE|TUBE|TUYAU|ACIER PLAT|ACIER ROND|HSS", "|")

    ' Collecter récursivement
    Dim occ As ComponentOccurrence
    For Each occ In srcAsm.ComponentDefinition.Occurrences
        CollectParts(occ, families, keywords)
    Next

    If families.Count = 0 Then
        MessageBox.Show("Aucun profilé détecté.", "OptiCutter")
        Exit Sub
    End If

    ' ---------------- FFD + génération ----------------
    Dim fKey As String
    For Each fKey In families.Keys
        Dim parts As List(Of Object())
        parts = families(fKey)
        SortByLengthDesc(parts)

        ' Optimisation: First-Fit Decreasing
        Dim bars As New List(Of List(Of Object()))
        Dim p As Object()
        For Each p In parts
            Dim L As Double: L = CDbl(p(1))
            Dim placed As Boolean: placed = False

            Dim b As List(Of Object())
            For Each b In bars
                Dim used As Double: used = SumLengths(b) + KerfTotal(b.Count, kerfMM)
                Dim extraKerf As Double: extraKerf = IIf(b.Count &amp;gt; 0, kerfMM, 0)
                If used + extraKerf + L &amp;lt;= stockLenMM Then
                    b.Add(p)
                    placed = True
                    Exit For
                End If
            Next
            If Not placed Then
                Dim nb As New List(Of Object())
                nb.Add(p)
                bars.Add(nb)
            End If
        Next

        ' Générer un assemblage par barre
        Dim barIdx As Integer: barIdx = 1
        Dim b2 As List(Of Object())
        For Each b2 In bars
            If Not System.IO.File.Exists(gabaritPath) Then
                MessageBox.Show("Gabarit introuvable: " &amp;amp; gabaritPath, "OptiCutter")
                Exit Sub
            End If

            Dim newAsm As AssemblyDocument
            newAsm = app.Documents.Open(gabaritPath, True)
            newAsm.DisplayName = "PlanCoupe_" &amp;amp; CleanName(fKey) &amp;amp; "_Barre" &amp;amp; barIdx
            Dim compDef As AssemblyComponentDefinition = newAsm.ComponentDefinition

            ' Plans assemblage (mapping)
            Dim asmXY As WorkPlane, asmYZ As WorkPlane, asmXZ As WorkPlane
            asmXY = compDef.WorkPlanes.Item(3)
            asmYZ = compDef.WorkPlanes.Item(1)
            asmXZ = compDef.WorkPlanes.Item(2)

            Dim offsetMM As Double: offsetMM = 0
            Dim first As Boolean: first = True

            Dim q As Object()
            For Each q In b2
                Dim path As String: path = CStr(q(0))
                Dim Lmm As Double: Lmm = CDbl(q(1))
                If Not System.IO.File.Exists(path) Then Continue For

                Dim occNew As ComponentOccurrence
                occNew = compDef.Occurrences.Add(path, tg.CreateMatrix())
                Dim pDef As PartComponentDefinition = TryCast(occNew.Definition, PartComponentDefinition)
                If pDef Is Nothing Then Continue For

                ' Plans pièce (mapping)
                Dim wpXY As WorkPlane, wpYZ As WorkPlane, wpXZ As WorkPlane
                wpXY = pDef.WorkPlanes.Item(3)
                wpYZ = pDef.WorkPlanes.Item(1)
                wpXZ = pDef.WorkPlanes.Item(2)

                ' Proxies
                Dim xyProxy As WorkPlaneProxy, yzProxy As WorkPlaneProxy, xzProxy As WorkPlaneProxy
                occNew.CreateGeometryProxy(wpXY, xyProxy)
                occNew.CreateGeometryProxy(wpYZ, yzProxy)
                occNew.CreateGeometryProxy(wpXZ, xzProxy)

                ' Contraintes
                compDef.Constraints.AddFlushConstraint(asmXZ, xzProxy, 0)
                compDef.Constraints.AddFlushConstraint(asmYZ, yzProxy, 0)
                Dim offCM As Double: offCM = IIf(first, 0, offsetMM / 10.0)
                compDef.Constraints.AddFlushConstraint(asmXY, xyProxy, offCM)
                first = False

                ' Avancer offset
                offsetMM += Lmm
                If Not IsLastInBar(b2, q) Then offsetMM += kerfMM
            Next

            ' Sauvegarder et fermer
            Dim savePath As String
			savePath = basePath &amp;amp; newAsm.DisplayName &amp;amp; ".iam"
            newAsm.SaveAs(savePath, False)
            'newAsm.Close(False)
            barIdx += 1
        Next
    Next

    MessageBox.Show("Optimisation terminée: barres générées par famille.", "OptiCutter")
End Sub

' ===== Helpers =====

Private Sub CollectParts(occ As ComponentOccurrence, ByRef families As Dictionary(Of String, List(Of Object())), ByVal keywords() As String)
    If TypeOf occ.Definition Is PartComponentDefinition Then
        Dim partDoc As Document = occ.Definition.Document
        Dim desc As String, dest As String
        desc = "" : dest = ""
        On Error Resume Next
        desc = CStr(iProperties.Value(occ.Name, "Project", "Description"))
        dest = CStr(iProperties.Value(occ.Name, "Custom", "Destination"))
        On Error GoTo 0

        Dim keep As Boolean: keep = False
        If desc &amp;lt;&amp;gt; "" Then
            Dim up As String: up = UCase(desc)
            Dim k As Integer
            For k = LBound(keywords) To UBound(keywords)
                If InStr(up, keywords(k)) &amp;gt; 0 Then keep = True : Exit For
            Next
        End If
        If LCase(dest) = "scie" Then keep = True

        If keep And desc &amp;lt;&amp;gt; "" Then
            Dim Lmm As Double: Lmm = 0
            On Error Resume Next
            Lmm = CDbl(partDoc.ComponentDefinition.Parameters.UserParameters.Item("Longueur").Value) * 10
            If Err.Number &amp;lt;&amp;gt; 0 Then
                Err.Clear()
                Lmm = CDbl(partDoc.ComponentDefinition.Parameters.UserParameters.Item("G_L").Value) * 10
            End If
            On Error GoTo 0

            If Lmm &amp;gt; 0 Then
                Dim famKey As String: famKey = Trim(UCase(desc))
                If Not families.ContainsKey(famKey) Then families.Add(famKey, New List(Of Object()))
                families(famKey).Add(New Object(){partDoc.FullFileName, Lmm})
            End If
        End If
    ElseIf TypeOf occ.Definition Is AssemblyComponentDefinition Then
        Dim subOcc As ComponentOccurrence
        For Each subOcc In occ.SubOccurrences
            CollectParts(subOcc, families, keywords)
        Next
    End If
End Sub

Private Sub SortByLengthDesc(ByRef lst As List(Of Object()))
    Dim n As Integer: n = lst.Count
    Dim i As Integer, j As Integer
    For i = 0 To n - 2
        For j = i + 1 To n - 1
            If CDbl(lst(i)(1)) &amp;lt; CDbl(lst(j)(1)) Then
                Dim tmp As Object(): tmp = lst(i)
                lst(i) = lst(j)
                lst(j) = tmp
            End If
        Next
    Next
End Sub

Private Function SumLengths(lst As List(Of Object())) As Double
    Dim s As Double: s = 0
    Dim it As Object()
    For Each it In lst
        s = s + CDbl(it(1))
    Next
    SumLengths = s
End Function

Private Function KerfTotal(count As Integer, kerfMM As Double) As Double
    If count &amp;lt;= 1 Then
        KerfTotal = 0
    Else
        KerfTotal = (count - 1) * kerfMM
    End If
End Function

Private Function IsLastInBar(lst As List(Of Object()), item As Object()) As Boolean
    IsLastInBar = (Object.ReferenceEquals(lst(lst.Count - 1), item))
End Function

Private Function CleanName(s As String) As String
    ' Supprime caractères illégaux pour noms de fichiers
    Dim badChars As String: badChars = "\/:*?""&amp;lt;&amp;gt;|"
    Dim c As String
    For Each c In badChars
        s = Replace(s, c, "_")
    Next
    CleanName = s
End Function&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 13 Apr 2026 19:17:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-forum/best-linear-cut-optimizers/m-p/14088764#M409710</guid>
      <dc:creator>mgrenier1</dc:creator>
      <dc:date>2026-04-13T19:17:45Z</dc:date>
    </item>
  </channel>
</rss>

