<?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 Problem with loft after last Fusion update (plugin doesn't work) in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-loft-after-last-fusion-update-plugin-doesn-t-work/m-p/9517044#M11722</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use loft in my plugins. After last Fusion update this funcitionality doesn't work as before, I mean clients get errors, no matter loft is through profiles with rails or not. Making loft by UI works (but for rails I need to turn off "Chain selection" checkbox).&lt;/P&gt;&lt;P&gt;I prepared sample script to show one of the case. There's no error messages but lofts are not as expected:&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="It seems that loft starts from middle profile" style="width: 860px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/770623iD43C6759D4C10CE8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1.png" alt="It seems that loft starts from middle profile" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;It seems that loft starts from middle profile&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import adsk.core, adsk.fusion

def run(context):
    app = adsk.core.Application.get()
    product = app.activeProduct
    design = adsk.fusion.Design.cast(product)
    rootComp = design.rootComponent

    # Example 1 - same size of profiles but different Z
    sketch1 = rootComp.sketches.add(rootComp.xYConstructionPlane)

    # First profile
    p11 = adsk.core.Point3D.create(0, 2, 0)
    p12 = adsk.core.Point3D.create(2, 0, 0)
    p13 = adsk.core.Point3D.create(0, -1.3, 0)
    p14 = adsk.core.Point3D.create(-1.8, 0, 0)
    p15 = adsk.core.Point3D.create(-1.2, 1, 0)

    sketch1.sketchCurves.sketchLines.addByTwoPoints(p11, p12)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p12, p13)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p13, p14)

    points = adsk.core.ObjectCollection.create()
    points.add(p14)
    points.add(p15)
    points.add(p11)

    sketch1.sketchCurves.sketchFittedSplines.add(points)

    # Second profile
    p21 = adsk.core.Point3D.create(0, 2, 4)
    p22 = adsk.core.Point3D.create(2, 0, 4)
    p23 = adsk.core.Point3D.create(0, -1.3, 4)
    p24 = adsk.core.Point3D.create(-1.8, 0, 4)
    p25 = adsk.core.Point3D.create(-1.2, 1, 4)

    sketch1.sketchCurves.sketchLines.addByTwoPoints(p21, p22)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p22, p23)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p23, p24)

    points = adsk.core.ObjectCollection.create()
    points.add(p24)
    points.add(p25)
    points.add(p21)

    sketch1.sketchCurves.sketchFittedSplines.add(points)

    # Third profile
    p31 = adsk.core.Point3D.create(0, 2, 10)
    p32 = adsk.core.Point3D.create(2, 0, 10)
    p33 = adsk.core.Point3D.create(0, -1.3, 10)
    p34 = adsk.core.Point3D.create(-1.8, 0, 10)
    p35 = adsk.core.Point3D.create(-1.2, 1, 10)

    sketch1.sketchCurves.sketchLines.addByTwoPoints(p31, p32)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p32, p33)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p33, p34)

    points = adsk.core.ObjectCollection.create()
    points.add(p34)
    points.add(p35)
    points.add(p31)

    sketch1.sketchCurves.sketchFittedSplines.add(points)

    # Create loft
    loftFeatures = rootComp.features.loftFeatures
    loftInput = loftFeatures.createInput(adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

    for ip in range(sketch1.profiles.count):
        loftInput.loftSections.add(sketch1.profiles.item(ip))

    loftInput.isSolid = True
    loft = loftFeatures.add(loftInput)

    # Example 2 - different sizes of profiles
    sketch2 = rootComp.sketches.add(rootComp.xYConstructionPlane)
    xShift = 10

    # First profile
    p11 = adsk.core.Point3D.create(0 + xShift, 2, 0)
    p12 = adsk.core.Point3D.create(2 + xShift, 0, 0)
    p13 = adsk.core.Point3D.create(0 + xShift, -1.3, 0)
    p14 = adsk.core.Point3D.create(-1.8 + xShift, 0, 0)
    p15 = adsk.core.Point3D.create(-1.2 + xShift, 1, 0)

    sketch2.sketchCurves.sketchLines.addByTwoPoints(p11, p12)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p12, p13)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p13, p14)

    points = adsk.core.ObjectCollection.create()
    points.add(p14)
    points.add(p15)
    points.add(p11)

    sketch2.sketchCurves.sketchFittedSplines.add(points)

    # Second profile
    p21 = adsk.core.Point3D.create(0 + xShift, 4, 4)
    p22 = adsk.core.Point3D.create(4 + xShift, 0, 4)
    p23 = adsk.core.Point3D.create(0 + xShift, -2.6, 4)
    p24 = adsk.core.Point3D.create(-3.6 + xShift, 0, 4)
    p25 = adsk.core.Point3D.create(-2.4 + xShift, 2, 4)

    sketch2.sketchCurves.sketchLines.addByTwoPoints(p21, p22)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p22, p23)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p23, p24)

    points = adsk.core.ObjectCollection.create()
    points.add(p24)
    points.add(p25)
    points.add(p21)

    sketch2.sketchCurves.sketchFittedSplines.add(points)

    # Third profile
    p31 = adsk.core.Point3D.create(0 + xShift, 3, 10)
    p32 = adsk.core.Point3D.create(3 + xShift, 0, 10)
    p33 = adsk.core.Point3D.create(0 + xShift, -1.95, 10)
    p34 = adsk.core.Point3D.create(-2.7 + xShift, 0, 10)
    p35 = adsk.core.Point3D.create(-1.8 + xShift, 1.5, 10)

    sketch2.sketchCurves.sketchLines.addByTwoPoints(p31, p32)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p32, p33)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p33, p34)

    points = adsk.core.ObjectCollection.create()
    points.add(p34)
    points.add(p35)
    points.add(p31)

    sketch2.sketchCurves.sketchFittedSplines.add(points)

    # Create loft
    loftFeatures = rootComp.features.loftFeatures
    loftInput = loftFeatures.createInput(adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

    for ip in range(sketch2.profiles.count):
        loftInput.loftSections.add(sketch2.profiles.item(ip))

    loftInput.isSolid = True
    loft = loftFeatures.add(loftInput)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I do this by UI it works:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Order is ok" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/770625i09991C505D6C955A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_2.png" alt="Order is ok" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Order is ok&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What should I do to make this work by API?&lt;/P&gt;&lt;P&gt;There's also another problem in case of using rails because I cannot find an equivalent of "Chain Selection" in API. Is it accessible or is it performed on much higher level?&lt;/P&gt;</description>
    <pubDate>Thu, 14 May 2020 19:40:37 GMT</pubDate>
    <dc:creator>marcinszydlowski.1984</dc:creator>
    <dc:date>2020-05-14T19:40:37Z</dc:date>
    <item>
      <title>Problem with loft after last Fusion update (plugin doesn't work)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-loft-after-last-fusion-update-plugin-doesn-t-work/m-p/9517044#M11722</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use loft in my plugins. After last Fusion update this funcitionality doesn't work as before, I mean clients get errors, no matter loft is through profiles with rails or not. Making loft by UI works (but for rails I need to turn off "Chain selection" checkbox).&lt;/P&gt;&lt;P&gt;I prepared sample script to show one of the case. There's no error messages but lofts are not as expected:&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="It seems that loft starts from middle profile" style="width: 860px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/770623iD43C6759D4C10CE8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1.png" alt="It seems that loft starts from middle profile" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;It seems that loft starts from middle profile&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import adsk.core, adsk.fusion

def run(context):
    app = adsk.core.Application.get()
    product = app.activeProduct
    design = adsk.fusion.Design.cast(product)
    rootComp = design.rootComponent

    # Example 1 - same size of profiles but different Z
    sketch1 = rootComp.sketches.add(rootComp.xYConstructionPlane)

    # First profile
    p11 = adsk.core.Point3D.create(0, 2, 0)
    p12 = adsk.core.Point3D.create(2, 0, 0)
    p13 = adsk.core.Point3D.create(0, -1.3, 0)
    p14 = adsk.core.Point3D.create(-1.8, 0, 0)
    p15 = adsk.core.Point3D.create(-1.2, 1, 0)

    sketch1.sketchCurves.sketchLines.addByTwoPoints(p11, p12)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p12, p13)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p13, p14)

    points = adsk.core.ObjectCollection.create()
    points.add(p14)
    points.add(p15)
    points.add(p11)

    sketch1.sketchCurves.sketchFittedSplines.add(points)

    # Second profile
    p21 = adsk.core.Point3D.create(0, 2, 4)
    p22 = adsk.core.Point3D.create(2, 0, 4)
    p23 = adsk.core.Point3D.create(0, -1.3, 4)
    p24 = adsk.core.Point3D.create(-1.8, 0, 4)
    p25 = adsk.core.Point3D.create(-1.2, 1, 4)

    sketch1.sketchCurves.sketchLines.addByTwoPoints(p21, p22)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p22, p23)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p23, p24)

    points = adsk.core.ObjectCollection.create()
    points.add(p24)
    points.add(p25)
    points.add(p21)

    sketch1.sketchCurves.sketchFittedSplines.add(points)

    # Third profile
    p31 = adsk.core.Point3D.create(0, 2, 10)
    p32 = adsk.core.Point3D.create(2, 0, 10)
    p33 = adsk.core.Point3D.create(0, -1.3, 10)
    p34 = adsk.core.Point3D.create(-1.8, 0, 10)
    p35 = adsk.core.Point3D.create(-1.2, 1, 10)

    sketch1.sketchCurves.sketchLines.addByTwoPoints(p31, p32)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p32, p33)
    sketch1.sketchCurves.sketchLines.addByTwoPoints(p33, p34)

    points = adsk.core.ObjectCollection.create()
    points.add(p34)
    points.add(p35)
    points.add(p31)

    sketch1.sketchCurves.sketchFittedSplines.add(points)

    # Create loft
    loftFeatures = rootComp.features.loftFeatures
    loftInput = loftFeatures.createInput(adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

    for ip in range(sketch1.profiles.count):
        loftInput.loftSections.add(sketch1.profiles.item(ip))

    loftInput.isSolid = True
    loft = loftFeatures.add(loftInput)

    # Example 2 - different sizes of profiles
    sketch2 = rootComp.sketches.add(rootComp.xYConstructionPlane)
    xShift = 10

    # First profile
    p11 = adsk.core.Point3D.create(0 + xShift, 2, 0)
    p12 = adsk.core.Point3D.create(2 + xShift, 0, 0)
    p13 = adsk.core.Point3D.create(0 + xShift, -1.3, 0)
    p14 = adsk.core.Point3D.create(-1.8 + xShift, 0, 0)
    p15 = adsk.core.Point3D.create(-1.2 + xShift, 1, 0)

    sketch2.sketchCurves.sketchLines.addByTwoPoints(p11, p12)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p12, p13)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p13, p14)

    points = adsk.core.ObjectCollection.create()
    points.add(p14)
    points.add(p15)
    points.add(p11)

    sketch2.sketchCurves.sketchFittedSplines.add(points)

    # Second profile
    p21 = adsk.core.Point3D.create(0 + xShift, 4, 4)
    p22 = adsk.core.Point3D.create(4 + xShift, 0, 4)
    p23 = adsk.core.Point3D.create(0 + xShift, -2.6, 4)
    p24 = adsk.core.Point3D.create(-3.6 + xShift, 0, 4)
    p25 = adsk.core.Point3D.create(-2.4 + xShift, 2, 4)

    sketch2.sketchCurves.sketchLines.addByTwoPoints(p21, p22)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p22, p23)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p23, p24)

    points = adsk.core.ObjectCollection.create()
    points.add(p24)
    points.add(p25)
    points.add(p21)

    sketch2.sketchCurves.sketchFittedSplines.add(points)

    # Third profile
    p31 = adsk.core.Point3D.create(0 + xShift, 3, 10)
    p32 = adsk.core.Point3D.create(3 + xShift, 0, 10)
    p33 = adsk.core.Point3D.create(0 + xShift, -1.95, 10)
    p34 = adsk.core.Point3D.create(-2.7 + xShift, 0, 10)
    p35 = adsk.core.Point3D.create(-1.8 + xShift, 1.5, 10)

    sketch2.sketchCurves.sketchLines.addByTwoPoints(p31, p32)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p32, p33)
    sketch2.sketchCurves.sketchLines.addByTwoPoints(p33, p34)

    points = adsk.core.ObjectCollection.create()
    points.add(p34)
    points.add(p35)
    points.add(p31)

    sketch2.sketchCurves.sketchFittedSplines.add(points)

    # Create loft
    loftFeatures = rootComp.features.loftFeatures
    loftInput = loftFeatures.createInput(adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

    for ip in range(sketch2.profiles.count):
        loftInput.loftSections.add(sketch2.profiles.item(ip))

    loftInput.isSolid = True
    loft = loftFeatures.add(loftInput)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I do this by UI it works:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Order is ok" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/770625i09991C505D6C955A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_2.png" alt="Order is ok" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Order is ok&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What should I do to make this work by API?&lt;/P&gt;&lt;P&gt;There's also another problem in case of using rails because I cannot find an equivalent of "Chain Selection" in API. Is it accessible or is it performed on much higher level?&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2020 19:40:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-loft-after-last-fusion-update-plugin-doesn-t-work/m-p/9517044#M11722</guid>
      <dc:creator>marcinszydlowski.1984</dc:creator>
      <dc:date>2020-05-14T19:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with loft after last Fusion update (plugin doesn't work)</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-loft-after-last-fusion-update-plugin-doesn-t-work/m-p/9517804#M11723</link>
      <description>&lt;P&gt;Solved. If you have similar problems, try to make each profile in dedicated sketch (no matter profile is CW or CCW). If you need rails they also should be in a separate sketch.&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 04:22:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/problem-with-loft-after-last-fusion-update-plugin-doesn-t-work/m-p/9517804#M11723</guid>
      <dc:creator>marcinszydlowski.1984</dc:creator>
      <dc:date>2020-05-15T04:22:45Z</dc:date>
    </item>
  </channel>
</rss>

