<?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: Extrude Surfaces same plane (not on the same plane error) in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-surfaces-same-plane-not-on-the-same-plane-error/m-p/6409509#M19653</link>
    <description>&lt;P&gt;I'm not finding a way that works with an open profile.&amp;nbsp; We're in the process of changing the concept of a Profile so that Profiles should only be used for closed 2D sections.&amp;nbsp; Paths should be used for open and/or 3D sets of connected curves.&amp;nbsp; With this new concept, you should be creating a Path instead of a Profile, but I tested that too and it also has a problem.&amp;nbsp; I've logged both of the issues so we can get them fixed.&amp;nbsp; The only thing I found that worked is if I just extrude one curve at a time.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jun 2016 22:48:49 GMT</pubDate>
    <dc:creator>ekinsb</dc:creator>
    <dc:date>2016-06-28T22:48:49Z</dc:date>
    <item>
      <title>Extrude Surfaces same plane (not on the same plane error)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-surfaces-same-plane-not-on-the-same-plane-error/m-p/6408873#M19650</link>
      <description>&lt;P&gt;Hola!&lt;/P&gt;&lt;P&gt;I am having some problems with a script that will slice a part&amp;nbsp;with a plane, then project&amp;nbsp;the intersection of the part with the plane on a sketch. Finally, it will extrude&amp;nbsp;those profiles (as surfaces).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The script works fine for most geometries but occasionally crashes giving the error:&amp;nbsp;"input curves are not on the same plane". I don't understand how this is happening since the input curves were created by the plane to begin with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas? Is this a bug?&lt;/P&gt;&lt;P&gt;I am attaching a sample file where this problem occurs as well as the script where this occurs (it is attached as txt because it wouldn't let me upload a .py file).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;PRE&gt;#Author-
#Description-

import adsk.core, adsk.fusion, adsk.cam, traceback
app = adsk.core.Application.get()
if app:
    ui = app.userInterface

def run(context):
    try:
        activeDoc = adsk.core.Application.get().activeDocument

        design = activeDoc.design

        rootComp = design.rootComponent 

        rootComp.occurrences.addNewComponent (adsk.core.Matrix3D.create()).component.name=("extrusions")

        modelMinZ=rootComp.boundingBox.minPoint.z+0.002

        planes=rootComp.constructionPlanes

        planeInOff=planes.createInput()

        planeInOff.setByOffset(rootComp.xYConstructionPlane,adsk.core.ValueInput.createByReal(modelMinZ))

        planeMin=planes.add(planeInOff)

        planeMin.isLightBulbOn=False

        sketches= rootComp.sketches

        sketch = sketches.add(planeMin)

        body = rootComp.bRepBodies.item(0)

        sketch.projectCutEdges(body)

        extrudesComp = rootComp.occurrences.itemByName("extrusions:1").component

        extrudes = extrudesComp.features.extrudeFeatures

        distance = adsk.core.ValueInput.createByReal(2)

        curves=sketch.sketchCurves.item(0)

        profileCollection = adsk.core.ObjectCollection.create()

        profileCollection.add(rootComp.createOpenProfile(curves))

        extrudeInput = extrudes.createInput(profileCollection, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
    
        extrudeInput.isSolid = False

        extrudeInput.setDistanceExtent(False, distance)

        extrude = extrudes.add(extrudeInput)


    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/PRE&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;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/251153i3B706B87306FFEDB/image-size/large?v=v2&amp;amp;px=-1" border="0" alt="Error Message" title="Error Message" align="left" /&gt;&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;&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;&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;&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;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 18:30:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-surfaces-same-plane-not-on-the-same-plane-error/m-p/6408873#M19650</guid>
      <dc:creator>sebmorales</dc:creator>
      <dc:date>2016-06-28T18:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Extrude Surfaces same plane (not on the same plane error)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-surfaces-same-plane-not-on-the-same-plane-error/m-p/6409032#M19651</link>
      <description>&lt;P&gt;There does appear to be a problem in the API that I'll log a bug for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, there's another approach that is better and works.&amp;nbsp; If you remove the crossed out lines below and add the code in red, it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;STRIKE&gt;        curves=sketch.sketchCurves.item(0)&lt;/STRIKE&gt;

&lt;STRIKE&gt;        profileCollection = adsk.core.ObjectCollection.create()&lt;/STRIKE&gt;

&lt;STRIKE&gt;        profileCollection.add(rootComp.createOpenProfile(curves))&lt;/STRIKE&gt;
        
        &lt;FONT color="#ff0000"&gt;prof = sketch.profiles.item(0)
&lt;/FONT&gt;
        extrudeInput = extrudes.createInput(&lt;FONT color="#ff0000"&gt;prof&lt;/FONT&gt;, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jun 2016 19:01:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-surfaces-same-plane-not-on-the-same-plane-error/m-p/6409032#M19651</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-06-28T19:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extrude Surfaces same plane (not on the same plane error)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-surfaces-same-plane-not-on-the-same-plane-error/m-p/6409166#M19652</link>
      <description>&lt;P&gt;Awesome! This works pretty well. Do you know how this could work in case the profile was open? Lets say the input body is not solid but a surface?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 20:03:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-surfaces-same-plane-not-on-the-same-plane-error/m-p/6409166#M19652</guid>
      <dc:creator>sebmorales</dc:creator>
      <dc:date>2016-06-28T20:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Extrude Surfaces same plane (not on the same plane error)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-surfaces-same-plane-not-on-the-same-plane-error/m-p/6409509#M19653</link>
      <description>&lt;P&gt;I'm not finding a way that works with an open profile.&amp;nbsp; We're in the process of changing the concept of a Profile so that Profiles should only be used for closed 2D sections.&amp;nbsp; Paths should be used for open and/or 3D sets of connected curves.&amp;nbsp; With this new concept, you should be creating a Path instead of a Profile, but I tested that too and it also has a problem.&amp;nbsp; I've logged both of the issues so we can get them fixed.&amp;nbsp; The only thing I found that worked is if I just extrude one curve at a time.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 22:48:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-surfaces-same-plane-not-on-the-same-plane-error/m-p/6409509#M19653</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-06-28T22:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Extrude Surfaces same plane (not on the same plane error)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-surfaces-same-plane-not-on-the-same-plane-error/m-p/6409592#M19654</link>
      <description>&lt;P&gt;That sounds ideal, and thoughts for when this might be released? I just want to know if I should try to fix it now another way or if I should just wait.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for taking a dive at it though!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sebastian&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 00:08:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/extrude-surfaces-same-plane-not-on-the-same-plane-error/m-p/6409592#M19654</guid>
      <dc:creator>sebmorales</dc:creator>
      <dc:date>2016-06-29T00:08:43Z</dc:date>
    </item>
  </channel>
</rss>

