<?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: Revolve an arc to form a patch surface in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8922376#M13843</link>
    <description>&lt;P&gt;I think problem is you arc is not closed hence it is not a profile that is why API fails to create revolve. If you close it then it might work. But I know UI allows to choose open arc curves as profile to create revolve.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure if there is any workaround available other than closing curve.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jul 2019 09:00:11 GMT</pubDate>
    <dc:creator>goyals</dc:creator>
    <dc:date>2019-07-22T09:00:11Z</dc:date>
    <item>
      <title>Revolve an arc to form a patch surface</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8921615#M13842</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Capture.PNG" style="width: 232px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/659515i5C81BB895967A362/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm trying to revolve an arc around an axis (picture above) to form a patch surface of a half sphere. I tried to create the revolve feature using profile, but since the arc isn't a profile, I created an ObjectCollection for it. But I got the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;RunTimeError: 3: invalid profile(s) for Revolve Feature.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG border="0" width="240" height="400" /&gt;&lt;/P&gt;&lt;P&gt;Anyone can advise how to revolve an arc to form a patch surface? Below is my code:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        # Create the axis of rotation and the arc
        sketch3 = rootComp.sketches.add(rootComp.yZConstructionPlane)
        lines = sketch3.sketchCurves.sketchLines
        axis = lines.addByTwoPoints(adsk.core.Point3D.create(-5.5,2.3,0), adsk.core.Point3D.create(-5.5,8,0))
         
        arcs = sketch3.sketchCurves.sketchArcs
        center = adsk.core.Point3D.create(-5.5,2.3,0)
        start = adsk.core.Point3D.create(-5.5,9.3,0)
        ang = math.pi
        arc = arcs.addByCenterStartSweep(center, start, ang)  
        
        # Create a revolve patch
        prof = adsk.core.ObjectCollection.create()
        prof.add(sketch3.sketchCurves.item(0))
        revolves = rootComp.features.revolveFeatures
        revInput = revolves.createInput(prof, axis, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        revInput.setAngleExtent(True, math.pi/4)

        revInput.isSolid = False      
        revolves.add(revInput)&lt;/PRE&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jul 2019 16:10:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8921615#M13842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-21T16:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Revolve an arc to form a patch surface</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8922376#M13843</link>
      <description>&lt;P&gt;I think problem is you arc is not closed hence it is not a profile that is why API fails to create revolve. If you close it then it might work. But I know UI allows to choose open arc curves as profile to create revolve.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure if there is any workaround available other than closing curve.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 09:00:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8922376#M13843</guid>
      <dc:creator>goyals</dc:creator>
      <dc:date>2019-07-22T09:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Revolve an arc to form a patch surface</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8923398#M13844</link>
      <description>&lt;P&gt;You should be able to use the createOpenProfile method on the Component object to create a profile of the arc.&amp;nbsp; However, I wrote a little test case and there are some problems either with the profile or with the revolve functionality.&amp;nbsp; The code below successfully creates a profile from the arc and extrudes it but if you change the "if True:" statement to "if False:" then it attempts to create a revolve feature and fails.&amp;nbsp; It does end up creating a revolve in the timeline but when you edit it you'll see the arc and the line were included in the profile which caused it to fail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then tried to use the API to examine the profile that was created to see if it actually contained both the arc and line but the API is failing to return information for an open profile.&amp;nbsp; Both of these would seem to be a bug in the API because they should be working.&amp;nbsp; Maybe Shyam can take a look.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;def run(context):
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        des = adsk.fusion.Design.cast(app.activeProduct)
        root = des.rootComponent
        
        sk = root.sketches.add(root.xYConstructionPlane)
        arcs = sk.sketchCurves.sketchArcs
        arc = arcs.addByCenterStartSweep(adsk.core.Point3D.create(0,0,0),
                                         adsk.core.Point3D.create(10,0,0),
                                         math.pi * 0.4)
                                                               
        prof = root.createOpenProfile(arc, False)
        
        if True:
            extrudeInput = root.features.extrudeFeatures.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
            extrudeInput.isSolid = False
            extrudeInput.setDistanceExtent(False, adsk.core.ValueInput.createByReal(10))
            extrude = root.features.extrudeFeatures.add(extrudeInput)
        else:
            centerLine = sk.sketchCurves.sketchLines.addByTwoPoints(adsk.core.Point3D.create(0,0,0),
                                                                    adsk.core.Point3D.create(0,10,0))                        
            revolveInput = root.features.revolveFeatures.createInput(prof, centerLine, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
            revolveInput.isSolid = False           
            revolve = root.features.revolveFeatures.add(revolveInput)
    except:
        app = adsk.core.Application.get()
        ui = app.userInterface
        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;</description>
      <pubDate>Mon, 22 Jul 2019 16:15:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8923398#M13844</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2019-07-22T16:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Revolve an arc to form a patch surface</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8934701#M13845</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;I am able to reproduce both the issues and will take a look. Thanks for taking a look.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2019 12:42:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8934701#M13845</guid>
      <dc:creator>goyals</dc:creator>
      <dc:date>2019-07-28T12:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Revolve an arc to form a patch surface</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8938900#M13846</link>
      <description>&lt;P&gt;Thank you. Yes, for now I closed the arc to form a closed profile and it works to create the revolve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 15:30:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8938900#M13846</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-30T15:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Revolve an arc to form a patch surface</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8938902#M13847</link>
      <description>&lt;P&gt;Hi Brain,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's interesting. Looking forward to hearing the latest update on this method.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 15:31:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8938902#M13847</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-30T15:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Revolve an arc to form a patch surface</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8940272#M13848</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;, your test case fails because the revolve angle is not given to revolveInput. It works fine on adding the following line to the script -&amp;nbsp;&lt;/P&gt;&lt;P&gt;revolveInput.setAngleExtent(True, adsk.core.ValueInput.createByReal(math.pi))&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Revolve.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/662692iCE82705654BA7E6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Revolve.png" alt="Revolve.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 09:21:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/revolve-an-arc-to-form-a-patch-surface/m-p/8940272#M13848</guid>
      <dc:creator>saurabh.singhKD42F</dc:creator>
      <dc:date>2019-07-31T09:21:32Z</dc:date>
    </item>
  </channel>
</rss>

