<?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: API Extrude 2 sides Through All in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-extrude-2-sides-through-all/m-p/10785501#M7364</link>
    <description>&lt;P&gt;Sorry that's my bad, I thought it worked when it didn't. After further testing, it def seems that the settwosidesextent method is bugged because if either of the sides is a through all extent definition, the other side's value isn't taken into account. Also the set symmetric extent definition only accepts value inputs so you'll probably have to use 2 extrude features (or have fun with text commands but that's probably not worth it for such a simple endeavor).&lt;/P&gt;</description>
    <pubDate>Sat, 27 Nov 2021 17:30:55 GMT</pubDate>
    <dc:creator>tykapl.breuil</dc:creator>
    <dc:date>2021-11-27T17:30:55Z</dc:date>
    <item>
      <title>API Extrude 2 sides Through All</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-extrude-2-sides-through-all/m-p/10785327#M7361</link>
      <description>&lt;P&gt;Trying to Extrude a new body from a Profile, in 2 directions, and 'through all'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I change to 1 direction the extrude works, but something in the code for 2 directions isn't right and I just can't see it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;uProfile = sketch.profiles.item(0)
extrudes = rootComp.features.extrudeFeatures
extrudeInput = extrudes.createInput(uProfile, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

# Create an extent definition of through-all type.          
extent_all = adsk.fusion.ThroughAllExtentDefinition.create()

extrudeInput.setTwoSidesExtent(extent_all, extent_all)

extrude5 = extrudes.add(extrudeInput)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 27 Nov 2021 14:23:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-extrude-2-sides-through-all/m-p/10785327#M7361</guid>
      <dc:creator>info83PHN</dc:creator>
      <dc:date>2021-11-27T14:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: API Extrude 2 sides Through All</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-extrude-2-sides-through-all/m-p/10785455#M7362</link>
      <description>&lt;P&gt;You're right it weirdly doesn't seem to work. Maybe you're meant to use&lt;/P&gt;&lt;LI-CODE lang="python"&gt;extrudeInput.setOneSideExtent(extent_all, adsk.fusion.ExtentDirections.SymmetricExtentDirection)&lt;/LI-CODE&gt;&lt;P&gt;which does work.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 16:36:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-extrude-2-sides-through-all/m-p/10785455#M7362</guid>
      <dc:creator>tykapl.breuil</dc:creator>
      <dc:date>2021-11-27T16:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: API Extrude 2 sides Through All</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-extrude-2-sides-through-all/m-p/10785478#M7363</link>
      <description>&lt;P&gt;using the above suggestion, it is only extruding in the positive direction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        uProfile = sketch.profiles.item(0)

        extrudes = rootComp.features.extrudeFeatures
        extrudeInput = extrudes.createInput(uProfile, adsk.fusion.FeatureOperations.CutFeatureOperation)

        # Create an extent definition of through-all type.          
        extent_all = adsk.fusion.ThroughAllExtentDefinition.create()

        extrudeInput.setOneSideExtent(extent_all, adsk.fusion.ExtentDirections.SymmetricExtentDirection)

        extrude5 = extrudes.add(extrudeInput)

        body5 = extrude5.bodies.item(0)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 27 Nov 2021 17:05:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-extrude-2-sides-through-all/m-p/10785478#M7363</guid>
      <dc:creator>info83PHN</dc:creator>
      <dc:date>2021-11-27T17:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: API Extrude 2 sides Through All</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-extrude-2-sides-through-all/m-p/10785501#M7364</link>
      <description>&lt;P&gt;Sorry that's my bad, I thought it worked when it didn't. After further testing, it def seems that the settwosidesextent method is bugged because if either of the sides is a through all extent definition, the other side's value isn't taken into account. Also the set symmetric extent definition only accepts value inputs so you'll probably have to use 2 extrude features (or have fun with text commands but that's probably not worth it for such a simple endeavor).&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 17:30:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-extrude-2-sides-through-all/m-p/10785501#M7364</guid>
      <dc:creator>tykapl.breuil</dc:creator>
      <dc:date>2021-11-27T17:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: API Extrude 2 sides Through All</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-extrude-2-sides-through-all/m-p/10797975#M7365</link>
      <description>&lt;P&gt;I'm not able to reproduce the problem.&amp;nbsp; It works for me with the script below and the attached design.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def run(context):
    try:
        app = adsk.core.Application.get()
        ui: adsk.core.UserInterface = app.userInterface

        design = adsk.fusion.Design.cast(app.activeProduct)
        root = design.rootComponent

        sk = root.sketches.itemByName('Sketch3')
        prof = sk.profiles.item(0)

        extInput = root.features.extrudeFeatures.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        thruAll = adsk.fusion.ThroughAllExtentDefinition.create()
        extInput.setTwoSidesExtent(thruAll, thruAll)
        root.features.extrudeFeatures.add(extInput)
    except:
        ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 03 Dec 2021 04:32:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/api-extrude-2-sides-through-all/m-p/10797975#M7365</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2021-12-03T04:32:05Z</dc:date>
    </item>
  </channel>
</rss>

