<?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: Encountering a problem projecting curves from one sketch to another in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6670296#M19071</link>
    <description>&lt;P&gt;I've narrowed the case of buggy projection of an offset ellipse down to the use of&amp;nbsp;isComputeDeferred on the source sketch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what i've observed:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Sketch.offset will return always a result list no matter what the state of&amp;nbsp;&lt;SPAN&gt;isComputeDeferred is&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Sketch.project will ONLY return a result list if&amp;nbsp;isComputeDeferred = False&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;If the source sketch has&amp;nbsp;isComputeDeferred = False set then the following may error&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;sketch1.isComputeDeferred = False
offset_curves = sketch1.offset(some_ellipse, some_point, some_distance)
for c in offset_curves:
  sketch2.project(c)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Changing isComputeDeferred to True on sketch1 prevents the error from occurring.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 06 Nov 2016 15:55:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-11-06T15:55:00Z</dc:date>
    <item>
      <title>Encountering a problem projecting curves from one sketch to another</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6666728#M19067</link>
      <description>&lt;P&gt;This one is starting to drive me nuts. I've tried to work around it but I just keep hitting new variations of the same issue. In short what I have a sketch that was created from a plainer face. I then offset each loop&amp;nbsp;- at this point all is well. As I've found that deleting sketch curves is extremely slow I'm trying to project just those offset curves onto a new sketch which sometimes results in the error below. This happens when projecting the offset curve of circles, ellipses, or closed splines. I've tried deleting constraints, this fixes some cases, I've tried deleting the curve which I offset from, this fixes other cases - but there are still some cases where this problem&amp;nbsp;persists&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've managed to workaround this issue for the most part but I've found no getting around dealing with a body which was extruded from a simple square with a circle and an ellipse cut out of it then the body was split at an angle. When trying to deal with the split surface all of my workarounds fail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... This Body is very stubborn&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YGyTVri" style="width: 273px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/289150i97CB8D18D560B250/image-size/large?v=v2&amp;amp;px=999" role="button" title="YGyTVri" alt="YGyTVri" /&gt;&lt;/span&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This really feels like a bug in the Fusion API as I can change the behavior by messing with removing constraints or deleting the edge which was offset and manually I have no problem projecting the edges which are causing my script to fail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---------------------------&lt;BR /&gt;Fusion 360&lt;BR /&gt;---------------------------&lt;BR /&gt;Failed:&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "E:/Archive/Programming/Fusion360 Scripts/DXF4Laser\Fission\fission.py", line 207, in notify&lt;BR /&gt;callback(*args)&lt;BR /&gt;File "E:/Archive/Programming/Fusion360 Scripts/DXF4Laser/DXF4Laser.py", line 60, in on_execute&lt;BR /&gt;cutouts_sketch.project(edge)&lt;BR /&gt;File "C:/Users/.../AppData/Local/Autodesk/webdeploy/production/1c390f736d162708dcf21ff0d9d996bd09400ac2/Api/Python/packages\adsk\fusion.py", line 22014, in project&lt;BR /&gt;return _fusion.Sketch_project(self, *args)&lt;BR /&gt;RuntimeError: 2 : InternalValidationError : Utils::getObjectPath(entity, logicalPath, occurrence(), Xl::Fusion::DesignUtils::objectPathTo(parentComp.get()))&lt;/P&gt;&lt;P&gt;---------------------------&lt;BR /&gt;Ok&lt;BR /&gt;---------------------------&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 02:43:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6666728#M19067</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-04T02:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Encountering a problem projecting curves from one sketch to another</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6668134#M19068</link>
      <description>&lt;P&gt;I'm not following exactly the problem is. &amp;nbsp;Can you post a model and possibly the minimal code to reproduce the problem?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 16:43:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6668134#M19068</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-11-04T16:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Encountering a problem projecting curves from one sketch to another</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6668904#M19069</link>
      <description>&lt;P&gt;Here's my set of test shapes&amp;nbsp;&lt;A href="http://a360.co/2fa2pFe" target="_blank"&gt;http://a360.co/2fa2pFe&lt;/A&gt; Any shapes defined with splines will exhibit the issue i'm seeing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The attached code uses my Fission library which handles most of the grunt work for me - the interesting code is entirely inside the on_preview method so this abstraction shouldn't get in the way of understanding how&amp;nbsp;the issue i'm seeing exhibits itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interestingly while making this minimum sample code I accidentally found another workaround which appears to work more reliably. In fact the issue appears to go away entirely if I perform the projection immediately after I offset the source curves, however, if i delay the projection until after I've offset all loops then the issue occurs as I've been observing it. As this is the case this issue is likely the product of coupled code under the hood where somehow offsetting or projecting curves "invalidates" the handle i have to previously offset curves.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;As a side note i've identified why i previously was not getting a list of curves from sketch.project - project always returns and empty list if&amp;nbsp;isComputeDeferred is True&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 23:59:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6668904#M19069</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-04T23:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Encountering a problem projecting curves from one sketch to another</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6669047#M19070</link>
      <description>&lt;P&gt;After rolling this into my real code I'm hitting a new issue with projecting offset ellipse - sometimes I get the error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;RuntimeError: 3 : Projection of the selected spline/curve would result in a degenerate segment and cause future modeling problems!&lt;/PRE&gt;&lt;P&gt;Mind you that the offset &lt;SPAN&gt;ellipse&amp;nbsp;&lt;/SPAN&gt;appears just fine on the sketch in which it was generated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Strangely enough increasing the amount i'm offsetting by "fixes" it... e.g. its fine at an offset of 0.075mm but fails at 0.1mm and fails at 0.5mm but succeeds at 1mm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm already special case handling circles but ellipses&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;are much more complex shapes and I'd rather not try to figure out how to 'copy' one from one sketch to another.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2016 04:03:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6669047#M19070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-05T04:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Encountering a problem projecting curves from one sketch to another</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6670296#M19071</link>
      <description>&lt;P&gt;I've narrowed the case of buggy projection of an offset ellipse down to the use of&amp;nbsp;isComputeDeferred on the source sketch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what i've observed:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Sketch.offset will return always a result list no matter what the state of&amp;nbsp;&lt;SPAN&gt;isComputeDeferred is&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Sketch.project will ONLY return a result list if&amp;nbsp;isComputeDeferred = False&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;If the source sketch has&amp;nbsp;isComputeDeferred = False set then the following may error&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;sketch1.isComputeDeferred = False
offset_curves = sketch1.offset(some_ellipse, some_point, some_distance)
for c in offset_curves:
  sketch2.project(c)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Changing isComputeDeferred to True on sketch1 prevents the error from occurring.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2016 15:55:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6670296#M19071</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-06T15:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Encountering a problem projecting curves from one sketch to another</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6678490#M19072</link>
      <description>&lt;P&gt;I've been able to reproduce some problems using the Offset command in the user-interface and have created a bug. Because it's obviously a bug in the internal offset functionality we'll need to wait for the core team to fix it. The API should begin working then.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's interesting what you've found with the isComputeDeferred property. I would expect some data to not be up to date but I would have expected the geometry to be returned but I also don't know the full details of how it's been implemented. I'll have to find out.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 04:25:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6678490#M19072</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-11-10T04:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Encountering a problem projecting curves from one sketch to another</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6685016#M19073</link>
      <description>&lt;P&gt;Thank you for taking the time to dive into these issues.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Nov 2016 17:52:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6685016#M19073</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-13T17:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Encountering a problem projecting curves from one sketch to another</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6704407#M19074</link>
      <description>&lt;P&gt;Ross, was the wagon wheel shape generated with a program?&amp;nbsp; I'm getting a consistent crash with that and the developer wants to know how that model was created.&amp;nbsp; Can you share the code that drew it?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 06:13:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6704407#M19074</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2016-11-23T06:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Encountering a problem projecting curves from one sketch to another</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6705158#M19075</link>
      <description>&lt;P&gt;I just drew it on a sketch (manually) as 2 circles and circular patterned a line 16 times, trimmed, then extruded.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 13:38:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/encountering-a-problem-projecting-curves-from-one-sketch-to/m-p/6705158#M19075</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-23T13:38:38Z</dc:date>
    </item>
  </channel>
</rss>

