<?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: Getting Bend Information Sheet Metal Part in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-bend-information-sheet-metal-part/m-p/11700827#M4612</link>
    <description>&lt;P&gt;I think that will work. I thought maybe a dimple or some other shape that extends out of the flat might change how the part is positioned relative to 0,0,0, but that doesn't seem to make a difference, and it's the top face on the Z zero plane. Even if you use 0, I would still do the comparison within a tolerance.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jan 2023 05:57:16 GMT</pubDate>
    <dc:creator>BrianEkins</dc:creator>
    <dc:date>2023-01-24T05:57:16Z</dc:date>
    <item>
      <title>Getting Bend Information Sheet Metal Part</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-bend-information-sheet-metal-part/m-p/11700663#M4609</link>
      <description>&lt;P&gt;I am working on a script that processes a design and extracts all sorts of component information (for the creation of a purchase order to my supplier).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the required attributes is the quantity of sheet metal folds/bends. I have happened across the &lt;STRONG&gt;FlatPattern.getBendInfo Method&lt;/STRONG&gt; (and ignore my other post for the moment - refer: &lt;A href="https://forums.autodesk.com/t5/fusion-360-api-and-scripts/crash-component-flatpattern-bendlinesbody-on-linked-sheet-metal/td-p/11700565" target="_blank"&gt;here&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run this method - I end up with 4 bends (as in - 4 x BRepEdge)... where my component has only 2 sheet metal folds. I assume there is a topside set of bends and a bottomside set of bends - but how do I &lt;STRONG&gt;know&lt;/STRONG&gt; which bends are related to the top and which are related to the bottom ?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;bendLinesBody = component.flatPattern.bendLinesBody

for BRepEdge in bendLinesBody.edges:

      (retval, isBendUp, bendAngle) = component.flatPattern.getBendInfo(BRepEdge)
      ##remainder of code##&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Glenn.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 03:22:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-bend-information-sheet-metal-part/m-p/11700663#M4609</guid>
      <dc:creator>gvisca44</dc:creator>
      <dc:date>2023-01-24T03:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Bend Information Sheet Metal Part</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-bend-information-sheet-metal-part/m-p/11700801#M4610</link>
      <description>&lt;P&gt;You can see in the graphics window that there is a line on both sides of the flat pattern for each bend. It would be nice if the bend information included some additional information to tell you if the input edge is on the top or bottom. However, it's fairly easy to figure out. Here's a modified version of your code. I didn't run it so there could be a syntax error or two but it demonstrates the concept.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import math

fp = component.flatPattern
topFaceZ = fp.topFace.pointOnFace.z
bendLinesBody = fp.bendLinesBody
for BRepEdge in bendLinesBody.edges:
    # Check if this edge is in the same Z plane as the top face.
    # Because of issues with floating point comparisons, it uses
    # a tolerance.
    if math.fabs(BRepEdge.pointOnEdge.z - topFaceZ) &amp;lt; 0.00001:
        (retval, isBendUp, bendAngle) = component.flatPattern.getBendInfo(BRepEdge)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 05:29:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-bend-information-sheet-metal-part/m-p/11700801#M4610</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2023-01-24T05:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Bend Information Sheet Metal Part</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-bend-information-sheet-metal-part/m-p/11700819#M4611</link>
      <description>&lt;P&gt;Marvellous&amp;nbsp;&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;I landed in a similar place mentally ...&amp;nbsp;Anecdotally it appears as though 0,0,0 is x,y=lower left corner/z=top face - so I wondered about using that as a baseline - and finding all edges z=0.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Glenn.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 05:48:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-bend-information-sheet-metal-part/m-p/11700819#M4611</guid>
      <dc:creator>gvisca44</dc:creator>
      <dc:date>2023-01-24T05:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Bend Information Sheet Metal Part</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-bend-information-sheet-metal-part/m-p/11700827#M4612</link>
      <description>&lt;P&gt;I think that will work. I thought maybe a dimple or some other shape that extends out of the flat might change how the part is positioned relative to 0,0,0, but that doesn't seem to make a difference, and it's the top face on the Z zero plane. Even if you use 0, I would still do the comparison within a tolerance.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 05:57:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-bend-information-sheet-metal-part/m-p/11700827#M4612</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2023-01-24T05:57:16Z</dc:date>
    </item>
  </channel>
</rss>

