<?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 get Normal vector of a Line? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7310038#M30059</link>
    <description>&lt;P&gt;Lines drawn while the UCS is set to WORLD have no normal vector.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the Normal property returns the 'default' normal vector, which is the WCS Z axis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you draw a line in a non-world UCS, it will have an explicit normal vector and Normal returns that.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Aug 2017 05:10:29 GMT</pubDate>
    <dc:creator>ActivistInvestor</dc:creator>
    <dc:date>2017-08-18T05:10:29Z</dc:date>
    <item>
      <title>How to get Normal vector of a Line?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7309918#M30058</link>
      <description>&lt;P&gt;Hi all. When I try to get the normal vector of a line I get (0,0,1) vector though I tried any rotation with my line. How should I get the normal vector of a line?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Line line = new Line(pt1,pt2);
Vector3d v3d = line.Normal;
ed.WriteMessage(line.Normal.ToString());&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 03:21:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7309918#M30058</guid>
      <dc:creator>nur91m</dc:creator>
      <dc:date>2017-08-18T03:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Normal vector of a Line?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7310038#M30059</link>
      <description>&lt;P&gt;Lines drawn while the UCS is set to WORLD have no normal vector.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the Normal property returns the 'default' normal vector, which is the WCS Z axis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you draw a line in a non-world UCS, it will have an explicit normal vector and Normal returns that.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 05:10:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7310038#M30059</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-08-18T05:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Normal vector of a Line?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7310503#M30060</link>
      <description>&lt;P&gt;Thanks for information. I will just calculate normal with formula&amp;nbsp;&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://forums.autodesk.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 09:57:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7310503#M30060</guid>
      <dc:creator>nur91m</dc:creator>
      <dc:date>2017-08-18T09:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Normal vector of a Line?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7310550#M30061</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;nur91m a écrit&amp;nbsp;:&lt;BR /&gt;
&lt;P&gt;Thanks for information. I will just calculate normal with formula&amp;nbsp;&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://forums.autodesk.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Geometrically, you can not calculate the normal of a line because it does not define a plane (a line belongs to an infinity of planes).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4476837"&gt;@ActivistInvestor&lt;/a&gt; said, AutoCAD defines the "extrusion direction" of a line (Normal property or DXF code 210) with the Z axis of the coordinate system that was active when the line was drawn.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But a line can be drawn not parallel to the current XY plane.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This data is therefore not reliably linked to the geometry of the line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;For example, in the WCS, you can draw a line from (10, 10, 0) to (10, 10, 20).&lt;BR /&gt;The direction of extrusion of the line * would be identical to the axis WCS Z (0 0 1) despite the fact that this line is parallel to this direction.&lt;BR /&gt;&lt;BR /&gt;* You can get it by evaluating the expression LISP: (cdr (assoc 210 (entget (entlast))) after drawing the line.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 10:56:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7310550#M30061</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-08-18T10:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Normal vector of a Line?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7310661#M30062</link>
      <description>&lt;P&gt;Perhaps I misundertood the request.&lt;/P&gt;
&lt;P&gt;If you want the unit vector (normalized) of the line direction, simply do:&lt;/P&gt;
&lt;PRE&gt;line.StartPoint.GetVectorTo(line.Endpoint).GetNormal();&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;(line.EndPoint - line.StartPoint).GetNormal();&lt;/PRE&gt;
&lt;P&gt;If I'm still wrong, please clarify what you're trying to get.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 11:18:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7310661#M30062</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-08-18T11:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Normal vector of a Line?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7311946#M30063</link>
      <description>&lt;P&gt;Just to clarify, as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;mentioned, a line has no normal. The Normal property returns a value that is used by AutoCAD to extrude the line if you give it a thickness.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the line was drawn in the XY plane of the current UCS (and wasn't edited afterwards), the value returned by Normal will be the Z-axis of the UCS that was current when the line was drawn. But, you can't rely on that vector to be perpendicular to the line, because it may not be.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 18:16:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7311946#M30063</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-08-18T18:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Normal vector of a Line?</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7312109#M30064</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Activist_Investor a écrit&amp;nbsp;:&lt;BR /&gt;
&lt;P&gt;Just to clarify, as&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424" target="_blank"&gt;@_gile&lt;/A&gt;&amp;nbsp;mentioned, a line has no normal. The Normal property returns a value that is used by AutoCAD to extrude the line if you give it a thickness.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the line was drawn in the XY plane of the current UCS (and wasn't edited afterwards), the value returned by Normal will be the Z-axis of the UCS that was current when the line was drawn. But, you can't rely on that vector to be perpendicular to the line, because it may not be.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Thanks for clarifying this in good English.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 19:02:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-normal-vector-of-a-line/m-p/7312109#M30064</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-08-18T19:02:54Z</dc:date>
    </item>
  </channel>
</rss>

