<?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 Parallel lines in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/parallel-lines/m-p/12645485#M1851</link>
    <description>&lt;P&gt;Is it possible to tell if two lines in two different sketches on two different planes are parallel?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Mar 2024 00:00:03 GMT</pubDate>
    <dc:creator>brad.bylls</dc:creator>
    <dc:date>2024-03-17T00:00:03Z</dc:date>
    <item>
      <title>Parallel lines</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/parallel-lines/m-p/12645485#M1851</link>
      <description>&lt;P&gt;Is it possible to tell if two lines in two different sketches on two different planes are parallel?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2024 00:00:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/parallel-lines/m-p/12645485#M1851</guid>
      <dc:creator>brad.bylls</dc:creator>
      <dc:date>2024-03-17T00:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel lines</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/parallel-lines/m-p/12645703#M1852</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Yes, Mr.&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3623640" target="_self"&gt;&lt;SPAN class=""&gt;Brad.Bylls,&lt;/SPAN&gt;&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;... &lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;STRONG&gt;cross product&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt; of two parallel vectors &lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;STRONG&gt;equals 0&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;If there is a &lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;tolerance&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt; involved consider finding an &lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;STRONG&gt;angle between vectors&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Regards&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;MichaelT&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2024 06:20:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/parallel-lines/m-p/12645703#M1852</guid>
      <dc:creator>MichaelT_123</dc:creator>
      <dc:date>2024-03-17T06:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel lines</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/parallel-lines/m-p/12646027#M1853</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3623640"&gt;@brad.bylls&lt;/a&gt;&amp;nbsp;-San.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are several ways to get Vector3D from SketchLine, and this is one example.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# Fusion360API Python script

import traceback
import adsk.core as core
import adsk.fusion as fusion

def run(context):
    ui: core.UserInterface = None
    try:
        app: core.Application = core.Application.get()
        ui = app.userInterface
        des: fusion.Design = app.activeProduct
        root: fusion.Component = des.rootComponent

        line1: fusion.SketchLine = root.sketches[0].sketchCurves.sketchLines[0]
        line2: fusion.SketchLine = root.sketches[1].sketchCurves.sketchLines[0]

        vector1: core.Vector3D = line1.geometry.asInfiniteLine().direction
        vector2: core.Vector3D = line2.geometry.asInfiniteLine().direction

        print(f"is Paralle : {vector1.isParallelTo(vector2)}")

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Vector3D object has a method to determine parallelism.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-1767ab3d-f6a0-4537-9a8f-90aded44f115" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-1767ab3d-f6a0-4537-9a8f-90aded44f115&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2024 12:57:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/parallel-lines/m-p/12646027#M1853</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2024-03-17T12:57:57Z</dc:date>
    </item>
  </channel>
</rss>

