<?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: Angle between lines in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/angle-between-lines/m-p/12679639#M1728</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9409752"&gt;@CADacombs&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Didn't even think of that.&lt;/P&gt;&lt;P&gt;My bad.&lt;/P&gt;&lt;P&gt;That worked.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2024 21:13:36 GMT</pubDate>
    <dc:creator>brad.bylls</dc:creator>
    <dc:date>2024-04-01T21:13:36Z</dc:date>
    <item>
      <title>Angle between lines</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/angle-between-lines/m-p/12676292#M1726</link>
      <description>&lt;P&gt;I am trying to find the angle between two lines.&lt;/P&gt;&lt;P&gt;The lines are in different sketches and on different planes that are perpendicular to each other.&lt;/P&gt;&lt;P&gt;This is the code I have been working with.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;sketch2 = sketches.addWithoutEdges(plane)
recCenter = sketch2.modelToSketchSpace(endPoint)
centerPoint = lineX.endSketchPoint.worldGeometry
point1 = sketch2.modelToSketchSpace(centerPoint)
lines = sketch2.sketchCurves.sketchLines
lineEndPoint = adsk.core.Point3D.create(point1.x + .5, point1.y, point.z)
lineY = lines.addByTwoPoints(point1, lineEndPoint)
vector1: adsk.core.Vector3D = lineX.geometry.asInfiniteLine().direction
vector2: adsk.core.Vector3D = lineY.geometry.asInfiniteLine().direction
newAng = math.degrees(vector1.angleTo(vector2))
newAngStr = "%.16f" % float(newAng)&lt;/LI-CODE&gt;&lt;P&gt;The lineX and lineY appear to be 90 degrees apart, but in Debugging I get this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-30 083040.png" style="width: 273px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1343883i1C5ABE99CEA15C85/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-03-30 083040.png" alt="Screenshot 2024-03-30 083040.png" /&gt;&lt;/span&gt;&amp;nbsp;newAng = Radians&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-30 083055.png" style="width: 252px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1343886iD8C7219596AF3B6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-03-30 083055.png" alt="Screenshot 2024-03-30 083055.png" /&gt;&lt;/span&gt;&amp;nbsp;newAngStr = Degrees&lt;/P&gt;&lt;P&gt;This is the screen capture I am referring to.&lt;/P&gt;&lt;P&gt;LineX is created higher in the code.&lt;/P&gt;&lt;P&gt;The selected surface plane is what the user clicks on to create the sketch that contains lineX.&lt;/P&gt;&lt;P&gt;LineY is in a sketch on a construction plane perpendicular to the Selected surface plane.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-30 083147.png" style="width: 732px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1343887i57672F008087AA55/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-03-30 083147.png" alt="Screenshot 2024-03-30 083147.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any and all help appreciated.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2024 17:42:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/angle-between-lines/m-p/12676292#M1726</guid>
      <dc:creator>brad.bylls</dc:creator>
      <dc:date>2024-03-30T17:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Angle between lines</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/angle-between-lines/m-p/12676761#M1727</link>
      <description>&lt;P&gt;Try replacing &lt;STRONG&gt;geometry&lt;/STRONG&gt; with &lt;STRONG&gt;worldGeometry&lt;/STRONG&gt; in lines 8 and 9.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2024 01:06:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/angle-between-lines/m-p/12676761#M1727</guid>
      <dc:creator>CADacombs</dc:creator>
      <dc:date>2024-03-31T01:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Angle between lines</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/angle-between-lines/m-p/12679639#M1728</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/9409752"&gt;@CADacombs&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Didn't even think of that.&lt;/P&gt;&lt;P&gt;My bad.&lt;/P&gt;&lt;P&gt;That worked.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 21:13:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/angle-between-lines/m-p/12679639#M1728</guid>
      <dc:creator>brad.bylls</dc:creator>
      <dc:date>2024-04-01T21:13:36Z</dc:date>
    </item>
  </channel>
</rss>

