<?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 error to get controlPoints from SketchControlPointsSpline in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11433996#M5380</link>
    <description>&lt;P&gt;thanks for your further investigation and responses&lt;/P&gt;&lt;P&gt;for now, the best solution, respective workaround is to replace the Nurbs3D curve&lt;/P&gt;&lt;P&gt;as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12364171"&gt;@Jorge_Jaramillo&lt;/a&gt;&amp;nbsp;which I accepted in the original post&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2022 16:36:16 GMT</pubDate>
    <dc:creator>jiri.manak</dc:creator>
    <dc:date>2022-09-20T16:36:16Z</dc:date>
    <item>
      <title>Getting error to get controlPoints from SketchControlPointsSpline</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11421513#M5375</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;this is connected to issue&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/fusion-360-api-and-scripts/bug-inside-offset-of-a-loop-of-sketchcontrolpointsplines-creates/td-p/11414024" target="_blank"&gt;https://forums.autodesk.com/t5/fusion-360-api-and-scripts/bug-inside-offset-of-a-loop-of-sketchcontrolpointsplines-creates/td-p/11414024&lt;/A&gt;&lt;/P&gt;&lt;P&gt;but other problem.&lt;/P&gt;&lt;P&gt;I am trying to use SketchControlPointSpline.controlPoints property to edit start and end points but my script fails at this statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why it doesn't work? Tried&amp;nbsp; with Capture history on / off,&amp;nbsp; during sketch editing,&amp;nbsp; allways the same.&lt;/P&gt;&lt;P&gt;Script is attached. The object in the sketch is a loop made of 8&amp;nbsp;SketchControlPointSpline segments.&lt;/P&gt;&lt;P&gt;DXF is&amp;nbsp; attached to the post with the bug description.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="Screenshot 2022-09-14 200630.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1115756i152DCA0865A8DFEB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-09-14 200630.png" alt="Screenshot 2022-09-14 200630.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 18:33:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11421513#M5375</guid>
      <dc:creator>jiri.manak</dc:creator>
      <dc:date>2022-09-14T18:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error to get controlPoints from SketchControlPointsSpline</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11424880#M5376</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7057558"&gt;@jiri.manak&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried it.&lt;/P&gt;
&lt;P&gt;The log shows a "SketchFittedSpline" object.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 549px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1116482iFE2133073004D04A/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, the "SketchFittedSpline" object does not have a controlPoints property.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-GUID-6fc8b90c-e04a-4f4f-ac0d-f511e7237a77" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-GUID-6fc8b90c-e04a-4f4f-ac0d-f511e7237a77&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have not tried it, but the fitPoints property should be able to get the transit points.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I could not understand why it is possible to cast to SketchControlPointSpline.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 00:18:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11424880#M5376</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2022-09-16T00:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error to get controlPoints from SketchControlPointsSpline</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11427585#M5377</link>
      <description>&lt;P&gt;Hi @&lt;SPAN class=""&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3787950" target="_self"&gt;&lt;SPAN class=""&gt;kandennti&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;thanks for trying.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But what's going on here?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I get SketchControlPointSpline. I tried again both curves from the original post&amp;nbsp; loop.dxf, loop2.dxf.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jirimanak_0-1663391274343.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1117137i10CC43660C101914/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jirimanak_0-1663391274343.png" alt="jirimanak_0-1663391274343.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Its strange that you get something different.&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Fusion 360&amp;nbsp; version&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;2.0.14110,&amp;nbsp; &amp;nbsp;Windows 11&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Sep 2022 05:12:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11427585#M5377</guid>
      <dc:creator>jiri.manak</dc:creator>
      <dc:date>2022-09-17T05:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error to get controlPoints from SketchControlPointsSpline</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11427677#M5378</link>
      <description>&lt;P&gt;I believe your problem is the result of some unexpected behavior in Fusion. Notice that when you import your DXF file you don't see the control polygon of the curves. You're also not able to interactively move the endpoints of any of the curves. You can move the entire curve but you can't change the shape of the curve. The API is constrained by the same limitation and attempting to move the endpoints will not do anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's an obscure command you can use in this case. With the sketch active, you can right-click on one of the curves and run the "Display Control Frame" command from the context menu. Now, the control frame will be displayed and the curve can be edited. The API is currently missing the ability to turn on the control frame. Some support for control point curves was recently added to the API, but this is still missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to work around the current limitations by executing the equivalent commands but for some reason, it's not working as I would have expected. I think you might have to wait for the ability to turn on the control frame to be added to the API.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Sep 2022 05:47:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11427677#M5378</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2022-09-17T05:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error to get controlPoints from SketchControlPointsSpline</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11427729#M5379</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for Fusion360 version&amp;nbsp;&lt;SPAN&gt;2.0.14106,&amp;nbsp;&lt;/SPAN&gt;ControlPoints could be obtained from&amp;nbsp; &lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-e0427c5e-b669-49a8-a5a8-79a0e57d53ec" target="_blank" rel="noopener"&gt;SketchContolPointSpline.geometry.getData()&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;On Python, look for second returned value.&lt;/P&gt;&lt;P&gt;On C++ are returned on the first argument.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope Fusion360 team could clarify the usage of the controlPoints property.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;&lt;STRONG&gt;Jorge&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 01:04:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11427729#M5379</guid>
      <dc:creator>Jorge_Jaramillo</dc:creator>
      <dc:date>2023-08-29T01:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error to get controlPoints from SketchControlPointsSpline</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11433996#M5380</link>
      <description>&lt;P&gt;thanks for your further investigation and responses&lt;/P&gt;&lt;P&gt;for now, the best solution, respective workaround is to replace the Nurbs3D curve&lt;/P&gt;&lt;P&gt;as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12364171"&gt;@Jorge_Jaramillo&lt;/a&gt;&amp;nbsp;which I accepted in the original post&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 16:36:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11433996#M5380</guid>
      <dc:creator>jiri.manak</dc:creator>
      <dc:date>2022-09-20T16:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error to get controlPoints from SketchControlPointsSpline</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11441766#M5381</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12364171"&gt;@Jorge_Jaramillo&lt;/a&gt;, What you're seeing is because Python does not support returning passing an argument by reference where if it is modified in the function, the modified value will be returned. Instead, you need to return the information as the return value. The return value doesn't have to be a single value but can be multiple values in a tuple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An example in the Fusion API is the Cylinder.getData function. Below is how it is defined internally. It returns the origin, axis, and radius through output arguments. It also has a bool return value to indicate if the call was successful or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;bool getData(out Point3D origin, out Vector3D axis, out double radius);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since C++ supports by-reference arguments, this function is essentially the same in the public C++ API.&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Ptr&amp;lt;Point3D&amp;gt; origin;
Ptr&amp;lt;Vector3D&amp;gt; axis;
double radius;
boolean returnValue = cylinder_var-&amp;gt;getData(origin, axis, radius);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To work around the Python limitation, the output arguments are combined with the return value and returned as a tuple. It's the same 4 values as returned above but all as the single return.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;(returnValue, origin, axis, radius) = cylinder_var.getData()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 16:48:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11441766#M5381</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2022-09-23T16:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error to get controlPoints from SketchControlPointsSpline</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11441828#M5382</link>
      <description>&lt;P&gt;Hi&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;I agree with you.&amp;nbsp; What I wrote in the first three lines in my post is what you explain with details in your post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My complain about "&lt;SPAN&gt;I hope Fusion360 team could clarify the usage of the controlPoints property." is based on the fact that the reference to&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;&lt;SPAN&gt;SketchControlPointSpline&lt;/SPAN&gt;&lt;FONT face="inherit"&gt;.controlPoints &lt;/FONT&gt;&lt;/U&gt;always&lt;FONT face="inherit"&gt;&amp;nbsp;returns an error.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="inherit"&gt;Regards,&lt;BR /&gt;&lt;STRONG&gt;Jorge&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 01:04:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11441828#M5382</guid>
      <dc:creator>Jorge_Jaramillo</dc:creator>
      <dc:date>2023-08-29T01:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error to get controlPoints from SketchControlPointsSpline</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11442333#M5383</link>
      <description>&lt;P&gt;The current API doesn't take into account that there is a case when a spline is imported that the control points are not available. You see this in the UI and there's a command to turn them on. This is the case where the API is failing. The API should probably be returning None in this case and provide a way to turn the control points on, so you do have access to them. These control points are the points visible in the UI and editable by the user. Of course, internally the spline geometry has control points and if someone only cares about their position, they can be obtained using the function you already pointed out:&amp;nbsp;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-e0427c5e-b669-49a8-a5a8-79a0e57d53ec" target="_blank" rel="noopener nofollow noreferrer"&gt;SketchContolPointSpline.geometry.getData()&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 22:18:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/getting-error-to-get-controlpoints-from/m-p/11442333#M5383</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2022-09-23T22:18:26Z</dc:date>
    </item>
  </channel>
</rss>

