<?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>tema Re: Please help! A line is failing my parallel test lisp that I want to pass en AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750863#M1030922</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yes thank you! Wrote it as a condition but it worked all the same. Cheers!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="toreyrueschhoff_0-1600267534244.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/819952iD344D6BB361E079F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="toreyrueschhoff_0-1600267534244.png" alt="toreyrueschhoff_0-1600267534244.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;And ignore the fuzz on that clips now I'm seeing how precise I can get it &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@38DF24EF580240D512020314976B5FC8/emoticons/1f642.png" alt=":cara_con_una_leve_sonrisa:" title=":cara_con_una_leve_sonrisa:" /&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That doesn't look right to me.&amp;nbsp; First condition: their directions are close enough to equal -- fine.&amp;nbsp; Second condition: the direction to be compared is close enough to pi &lt;EM&gt;no matter what the reference direction is!&lt;/EM&gt;&amp;nbsp; &amp;nbsp;Third condition: the direction to be compared is close enough to 0 &lt;EM&gt;no matter what the reference direction is!&lt;/EM&gt;&amp;nbsp; &amp;nbsp;You would get things considered parallel even with wildly different directions, as long as the 'comangle' line is horizontal.&amp;nbsp; I assume that's not what you want, but that you need to include consideration of &lt;EM&gt;both&lt;/EM&gt; the reference and compared directions within each condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As to the precision:&amp;nbsp; Just use scientific notation, instead of all those strung-out zeros.&amp;nbsp; 0.001 can be expressed as &lt;FONT color="#000000"&gt;&lt;STRONG&gt;1e-3&lt;/STRONG&gt;&lt;/FONT&gt; [the &lt;FONT color="#000000"&gt;&lt;STRONG&gt;e&lt;/STRONG&gt;&lt;/FONT&gt; is for the &lt;FONT color="#000000"&gt;&lt;STRONG&gt;e&lt;/STRONG&gt;&lt;/FONT&gt;xponent on 10, so it = 1 x 10 to the minus-3rd power, or 1 divided by 10 to the 3rd power], and you can go with &lt;FONT color="#000000"&gt;&lt;STRONG&gt;1e-12&lt;/STRONG&gt;&lt;/FONT&gt; as in my earlier suggestion [equivalent to your initial decimal], and crank that up to 1e-13, 1e-14, etc.&amp;nbsp; But understand what you're asking:&amp;nbsp; 1e-14 in radians is &lt;EM&gt;one hundred-trillionth of a radian&lt;/EM&gt;, which [if my calculation is right] in degress/minutes/seconds comes to roughly a &lt;EM&gt;five-hundred-millionth of an arc second&lt;/EM&gt;.&amp;nbsp; At some point it becomes meaningless....&amp;nbsp; An arc through that sweep angle with a radius of &lt;EM&gt;1000&lt;/EM&gt;&amp;nbsp; drawing units is about &lt;EM&gt;one&amp;nbsp;hundred-billionth&lt;/EM&gt;&amp;nbsp; of a drawing unit long.&amp;nbsp; And AutoCAD can keep track of only 16 significant figures, so you'll soon hit the limit of its ability to distinguish, and may as well leave out the fuzz factor entirely, and just ask for "exact" equality -- that's your maximum precision.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Sep 2020 17:34:43 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2020-09-16T17:34:43Z</dc:date>
    <item>
      <title>Please help! A line is failing my parallel test lisp that I want to pass</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750280#M1030885</link>
      <description>&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having trouble with a few lines that are failing my Parallel line test lisp that I want to be passing. I pulled one of the lines into a new drawing and attached it. I have noticed that if I mirror the line, the new line will pass. However if I draw a completely new line and mirror that, both will pass. So I am stumped, please if anyone has any insight as to what is different about this line (its the yellow one on the top right) or can help me correct me lisp please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="toreyrueschhoff_0-1600264382514.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/819924i424F056DF82322E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="toreyrueschhoff_0-1600264382514.png" alt="toreyrueschhoff_0-1600264382514.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 13:54:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750280#M1030885</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-16T13:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Please help! A line is failing my parallel test lisp that I want to pass</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750329#M1030886</link>
      <description>&lt;P&gt;My guess is that this happens only with lines that are &lt;EM&gt;horizontal&lt;/EM&gt;&amp;nbsp; within your tolerance value.&amp;nbsp; Some [considering those drawn from left to right] are going to be just barely &lt;EM&gt;over&lt;/EM&gt;&amp;nbsp; 0, at angles such as 0.OOOOOOOOOOO&lt;FONT color="#FF0000"&gt;371&lt;/FONT&gt; radians, and some are going to be just barely &lt;EM&gt;under&lt;/EM&gt;&amp;nbsp; 2pi, at angles such as 6.283185307179&lt;FONT color="#FF0000"&gt;426&lt;/FONT&gt; radians [instead of 2pi to the same number of decimal places = 6.283185307179&lt;FONT color="#0000FF"&gt;587&lt;/FONT&gt;].&amp;nbsp; Those just barely under are going to remain just barely under pi after your&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp; (rem (vla-get-angle vlaEnt...) pi)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;functions, so the comparison to barely over 0 will fail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you need some kind of&amp;nbsp;&amp;nbsp;&lt;FONT color="#000000"&gt;(or)&lt;/FONT&gt;&amp;nbsp; situation to cover that possibility.&amp;nbsp; &lt;FONT color="#FF6600"&gt;EDIT:&lt;/FONT&gt;&amp;nbsp; There may be a more concise way, but this should do it [untested]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;;if angle is equal to reference, turn to color red
  (if
    (or
      (equal refangle comangle 1e-12); basic same-direction check
      (and ; straddling horizontal?
        (or (equal refangle 0 1e-12) (equal refangle pi 1e-12))
        (or (equal comangle 0 1e-12) (equal comangle pi 1e-12))
      ); and
    ); or
    (vlax-put-property vlaEntcom 'Color 1); then
    (vlax-put-property vlaEntcom 'Color 2); else
  ); if
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 14:34:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750329#M1030886</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-09-16T14:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Please help! A line is failing my parallel test lisp that I want to pass</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750350#M1030887</link>
      <description>&lt;P&gt;That makes a ton of sense, thank you! I am going to try to write that in and I'll get back to you.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 14:18:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750350#M1030887</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-16T14:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Please help! A line is failing my parallel test lisp that I want to pass</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750367#M1030888</link>
      <description>&lt;P&gt;Seems like your test is acting correctly. The yellow line is non-parallel. See command log. The bottom right line is off but not enough to trigger your parallel test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Command: (rtos (vla-get-angle(vlax-ename-&amp;gt;vla-object(car(entsel)))) 2 14)
Select object: "0.00000000000000" ;reference line
Command: (rtos (vla-get-angle(vlax-ename-&amp;gt;vla-object(car(entsel)))) 2 14)
Select object: "3.14159265358979" ;top left red test line
Command: (rtos (vla-get-angle(vlax-ename-&amp;gt;vla-object(car(entsel)))) 2 14)
Select object: "3.14159265358975" ;top right yellow test line
Command: (rtos (vla-get-angle(vlax-ename-&amp;gt;vla-object(car(entsel)))) 2 14)
Select object: "3.14159265358979" ;bottom left red test line
Command: (rtos (vla-get-angle(vlax-ename-&amp;gt;vla-object(car(entsel)))) 2 14)
Select object: "3.14159265358984" ;bottom right red test line&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 14:26:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750367#M1030888</guid>
      <dc:creator>dbroad</dc:creator>
      <dc:date>2020-09-16T14:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Please help! A line is failing my parallel test lisp that I want to pass</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750378#M1030889</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;... I am going to try to write that in ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I edited my reply to include something, if it saves you the trouble [and if it actually works].&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 14:29:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750378#M1030889</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-09-16T14:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Please help! A line is failing my parallel test lisp that I want to pass</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750417#M1030892</link>
      <description>&lt;P&gt;Yes thank you! Wrote it as a condition but it worked all the same. Cheers!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="toreyrueschhoff_0-1600267534244.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/819952iD344D6BB361E079F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="toreyrueschhoff_0-1600267534244.png" alt="toreyrueschhoff_0-1600267534244.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;And ignore the fuzz on that clips now I'm seeing how precise I can get it &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@38DF24EF580240D512020314976B5FC8/emoticons/1f642.png" alt=":cara_con_una_leve_sonrisa:" title=":cara_con_una_leve_sonrisa:" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 14:46:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750417#M1030892</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-16T14:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Please help! A line is failing my parallel test lisp that I want to pass</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750863#M1030922</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yes thank you! Wrote it as a condition but it worked all the same. Cheers!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="toreyrueschhoff_0-1600267534244.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/819952iD344D6BB361E079F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="toreyrueschhoff_0-1600267534244.png" alt="toreyrueschhoff_0-1600267534244.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;And ignore the fuzz on that clips now I'm seeing how precise I can get it &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@38DF24EF580240D512020314976B5FC8/emoticons/1f642.png" alt=":cara_con_una_leve_sonrisa:" title=":cara_con_una_leve_sonrisa:" /&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That doesn't look right to me.&amp;nbsp; First condition: their directions are close enough to equal -- fine.&amp;nbsp; Second condition: the direction to be compared is close enough to pi &lt;EM&gt;no matter what the reference direction is!&lt;/EM&gt;&amp;nbsp; &amp;nbsp;Third condition: the direction to be compared is close enough to 0 &lt;EM&gt;no matter what the reference direction is!&lt;/EM&gt;&amp;nbsp; &amp;nbsp;You would get things considered parallel even with wildly different directions, as long as the 'comangle' line is horizontal.&amp;nbsp; I assume that's not what you want, but that you need to include consideration of &lt;EM&gt;both&lt;/EM&gt; the reference and compared directions within each condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As to the precision:&amp;nbsp; Just use scientific notation, instead of all those strung-out zeros.&amp;nbsp; 0.001 can be expressed as &lt;FONT color="#000000"&gt;&lt;STRONG&gt;1e-3&lt;/STRONG&gt;&lt;/FONT&gt; [the &lt;FONT color="#000000"&gt;&lt;STRONG&gt;e&lt;/STRONG&gt;&lt;/FONT&gt; is for the &lt;FONT color="#000000"&gt;&lt;STRONG&gt;e&lt;/STRONG&gt;&lt;/FONT&gt;xponent on 10, so it = 1 x 10 to the minus-3rd power, or 1 divided by 10 to the 3rd power], and you can go with &lt;FONT color="#000000"&gt;&lt;STRONG&gt;1e-12&lt;/STRONG&gt;&lt;/FONT&gt; as in my earlier suggestion [equivalent to your initial decimal], and crank that up to 1e-13, 1e-14, etc.&amp;nbsp; But understand what you're asking:&amp;nbsp; 1e-14 in radians is &lt;EM&gt;one hundred-trillionth of a radian&lt;/EM&gt;, which [if my calculation is right] in degress/minutes/seconds comes to roughly a &lt;EM&gt;five-hundred-millionth of an arc second&lt;/EM&gt;.&amp;nbsp; At some point it becomes meaningless....&amp;nbsp; An arc through that sweep angle with a radius of &lt;EM&gt;1000&lt;/EM&gt;&amp;nbsp; drawing units is about &lt;EM&gt;one&amp;nbsp;hundred-billionth&lt;/EM&gt;&amp;nbsp; of a drawing unit long.&amp;nbsp; And AutoCAD can keep track of only 16 significant figures, so you'll soon hit the limit of its ability to distinguish, and may as well leave out the fuzz factor entirely, and just ask for "exact" equality -- that's your maximum precision.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 17:34:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750863#M1030922</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-09-16T17:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Please help! A line is failing my parallel test lisp that I want to pass</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750883#M1030925</link>
      <description>&lt;P&gt;Ahh I see you have a good point&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 17:25:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750883#M1030925</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-16T17:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Please help! A line is failing my parallel test lisp that I want to pass</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750927#M1030933</link>
      <description>&lt;P&gt;You are correct, thanks again. I got focused on passing my horizontal lines so much that I forgot to consider my design intent. And thank you for the tip of scientific notation!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 17:47:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750927#M1030933</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-16T17:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Please help! A line is failing my parallel test lisp that I want to pass</title>
      <link>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750928#M1030934</link>
      <description>&lt;P&gt;This code has been tested and works.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 17:48:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-forum/please-help-a-line-is-failing-my-parallel-test-lisp-that-i-want/m-p/9750928#M1030934</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-16T17:48:15Z</dc:date>
    </item>
  </channel>
</rss>

