<?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: [CRASH] - component.flatPattern.bendLinesBody on component with no bends in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11702320#M4617</link>
    <description>&lt;P&gt;Thank you for providing the f3z + image, I was able to reproduce this and identify the issue. Will get this fixed!&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2023 17:07:04 GMT</pubDate>
    <dc:creator>john.kirchner</dc:creator>
    <dc:date>2023-01-24T17:07:04Z</dc:date>
    <item>
      <title>[CRASH] - component.flatPattern.bendLinesBody on component with no bends</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11700565#M4613</link>
      <description>&lt;P&gt;Was in the process of writing add-in that processes sheet metal components.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Found that&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;component.flatPattern.bendLinesBody &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;component.flatPattern.extentLinesBody&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;against a component with no bends causes crash.&amp;nbsp; Seems like&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;component.flatPattern.bodies&lt;/STRONG&gt; also causes a crash.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Crash report&amp;nbsp;336849264 sent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Glenn.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 03:46:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11700565#M4613</guid>
      <dc:creator>gvisca44</dc:creator>
      <dc:date>2023-01-24T03:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: [CRASH] - component.flatPattern.bendLinesBody on component with no bends</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11700824#M4614</link>
      <description>&lt;P&gt;A crash is never good, and even when you do something wrong, the API should fail and never crash. However, I created a very simple test case where I made a new design that contained a sheet metal part, inserted it into a new design, and then used the API to call the bendLinesBody property. I'm not seeing a crash, and it returns the body, so there must be something else that's causing it to crash. Can you post a test case and the code that reproduces the crash?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 05:52:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11700824#M4614</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2023-01-24T05:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: [CRASH] - component.flatPattern.bendLinesBody on component with no bends</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11700855#M4615</link>
      <description>&lt;P&gt;Will do&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5741855"&gt;@BrianEkins&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to be clear - because I mis-interpreted the symptoms initially.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The crash appears on sheet metal components that dont have bends (where initially I thought it was on linked components).&amp;nbsp; Just happened that my original tests included linked components that didnt have bends.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 06:18:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11700855#M4615</guid>
      <dc:creator>gvisca44</dc:creator>
      <dc:date>2023-01-24T06:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: [CRASH] - component.flatPattern.bendLinesBody on component with no bends</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11700894#M4616</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5741855"&gt;@BrianEkins&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As requested.&amp;nbsp; The embedded image (which I have also included as attachment just in case) shows the progression of the script to the point of crash.&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;&lt;LI-CODE lang="python"&gt;import adsk.core 
import adsk.fusion 
import traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)
        if not design:
            ui.messageBox('No active Fusion design', 'No Design')
            return

        allComps: adsk.fusion.Components = design.allComponents

        for component in allComps:
            for body in component.bRepBodies:
                if body.isSheetMetal:
                    msg = f'Component \t "{component.name}" has sheet metal body'
                    app.log(msg)
                    adsk.doEvents()

                    bendLinesBody = component.flatPattern.bendLinesBody

                    for BRepEdge in bendLinesBody.edges:

                        (retval, isBendUp, bendAngle) = component.flatPattern.getBendInfo(BRepEdge)
                        msg = f'\tretval:{retval} isBendUp:{isBendUp} bendAngle:{bendAngle}' 
                        app.log(msg)
                        adsk.doEvents()

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picture1.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1166282iFF74172C7564E4BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="picture1.png" alt="picture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 06:40:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11700894#M4616</guid>
      <dc:creator>gvisca44</dc:creator>
      <dc:date>2023-01-24T06:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: [CRASH] - component.flatPattern.bendLinesBody on component with no bends</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11702320#M4617</link>
      <description>&lt;P&gt;Thank you for providing the f3z + image, I was able to reproduce this and identify the issue. Will get this fixed!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 17:07:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11702320#M4617</guid>
      <dc:creator>john.kirchner</dc:creator>
      <dc:date>2023-01-24T17:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: [CRASH] - component.flatPattern.bendLinesBody on component with no bends</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11702797#M4618</link>
      <description>Thanks John.&lt;BR /&gt;&lt;BR /&gt;Is there somewhere I can track the fix ? Or will I receive notification ?&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jan 2023 20:25:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11702797#M4618</guid>
      <dc:creator>gvisca44</dc:creator>
      <dc:date>2023-01-24T20:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: [CRASH] - component.flatPattern.bendLinesBody on component with no bends</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11705263#M4619</link>
      <description>&lt;P&gt;Unfortunately we don't have any public facing bug fix tracking, this specific fix should be out within the next month or so though.&lt;BR /&gt;&lt;BR /&gt;In the meantime one workaround I can suggest is to compare the flatPattern.flatBody.faces.count (shouldn't crash) to the component.bRepBodies[0].faces.count - the counts are equal, then that means there are no bends in the flatpattern.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 17:19:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/crash-component-flatpattern-bendlinesbody-on-component-with-no/m-p/11705263#M4619</guid>
      <dc:creator>john.kirchner</dc:creator>
      <dc:date>2023-01-25T17:19:28Z</dc:date>
    </item>
  </channel>
</rss>

