<?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: How to compare PathEntities to sketch curves in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-compare-pathentities-to-sketch-curves/m-p/8239108#M15556</link>
    <description>&lt;P&gt;Well, it turns out that code was actually working.&amp;nbsp; I&amp;nbsp;seemed to be getting inconsistent results, but it turns out the&amp;nbsp;order of curves in&amp;nbsp;a Path can reverse, depending on which curve&amp;nbsp;was used to create it&lt;SPAN&gt;.&amp;nbsp; I won't mark my own post as a solution, though, since I didn't answer my question about evaluators.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Aug 2018 21:55:16 GMT</pubDate>
    <dc:creator>metd01567</dc:creator>
    <dc:date>2018-08-31T21:55:16Z</dc:date>
    <item>
      <title>How to compare PathEntities to sketch curves</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-compare-pathentities-to-sketch-curves/m-p/8238509#M15555</link>
      <description>&lt;P&gt;I've created a path from a user selected SketchCurve,&lt;SPAN&gt;&amp;nbsp;using the tangentChainCurves option.&amp;nbsp; &lt;/SPAN&gt;I'd like to find out where&amp;nbsp;along&amp;nbsp;the Path the user selected SketchCurve lies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I iterate on the Path object, I get&amp;nbsp;&lt;SPAN&gt;PathEntities, which (I think) are transient curves derived from the&amp;nbsp;chained SketchCurves.&amp;nbsp; That makes sense as the path should be a sequence of curves with a common direction, and SketchCurve direction isn't deterministic.&amp;nbsp; Fortunately PathEntities have an entity member&amp;nbsp;that "gets the sketch curve or edge this entity was derived from."&amp;nbsp; I printed the&amp;nbsp;classType of the first entity was SketchLine, which&amp;nbsp;is correct for my sketch.&amp;nbsp; I tried iterating through the Path, and casting its entities as SketchCurve,&amp;nbsp;in the hope&amp;nbsp;an equality operator&amp;nbsp;might detect&amp;nbsp;identity with my&amp;nbsp;original SketchCurve.&amp;nbsp; Doesn't seem to work though.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    segCount = 0
    for thisSegment in path:
        thisCurve = adsk.fusion.SketchCurve.cast(thisSegment.entity)
        ui.messageBox("curve type: " + thisCurve.classType())
        if thisCurve == selectedCurve:
            ui.messageBox ("found the user's SketchCurve: ", str(segCount))
        segCount += 1&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I could&amp;nbsp;compare start/end points, but that's messy and I think I'm missing something.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'd also like to understand evaluators better, maybe I could use them for my purpose.&amp;nbsp; What is a CurveEvaluator3D "parameter position"?&amp;nbsp; I thought it might be length along the curve, but if that were true the&amp;nbsp;"getLengthAtPosition" method wouldn't make sense.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 16:46:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-compare-pathentities-to-sketch-curves/m-p/8238509#M15555</guid>
      <dc:creator>metd01567</dc:creator>
      <dc:date>2018-08-31T16:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare PathEntities to sketch curves</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-compare-pathentities-to-sketch-curves/m-p/8239108#M15556</link>
      <description>&lt;P&gt;Well, it turns out that code was actually working.&amp;nbsp; I&amp;nbsp;seemed to be getting inconsistent results, but it turns out the&amp;nbsp;order of curves in&amp;nbsp;a Path can reverse, depending on which curve&amp;nbsp;was used to create it&lt;SPAN&gt;.&amp;nbsp; I won't mark my own post as a solution, though, since I didn't answer my question about evaluators.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 21:55:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-compare-pathentities-to-sketch-curves/m-p/8239108#M15556</guid>
      <dc:creator>metd01567</dc:creator>
      <dc:date>2018-08-31T21:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare PathEntities to sketch curves</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-compare-pathentities-to-sketch-curves/m-p/8239206#M15557</link>
      <description>&lt;P&gt;Here's a link to a paper I wrote for a class at Autodesk University 10 years ago that discusses the evaluator concept for the Inventor API.&amp;nbsp; The concepts are the same for Fusion 360, so hopefully, it will help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://modthemachine.typepad.com/files/mathgeometry.pdf" target="_blank"&gt;http://modthemachine.typepad.com/files/mathgeometry.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Sep 2018 00:28:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-compare-pathentities-to-sketch-curves/m-p/8239206#M15557</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2018-09-01T00:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare PathEntities to sketch curves</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-compare-pathentities-to-sketch-curves/m-p/8239460#M15558</link>
      <description>&lt;P&gt;I took the red pill, now everything looks different in parameter space.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Sep 2018 10:53:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-compare-pathentities-to-sketch-curves/m-p/8239460#M15558</guid>
      <dc:creator>metd01567</dc:creator>
      <dc:date>2018-09-01T10:53:58Z</dc:date>
    </item>
  </channel>
</rss>

