<?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: Detecting polygon closure in LISP in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389283#M114664</link>
    <description>&lt;P&gt;Thanks Kent...this looks like it might do the trick....just have to learn enough&amp;nbsp;about LISP to make it work now! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2017 01:14:51 GMT</pubDate>
    <dc:creator>Kyudos</dc:creator>
    <dc:date>2017-09-19T01:14:51Z</dc:date>
    <item>
      <title>Detecting polygon closure in LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389075#M114660</link>
      <description>&lt;P&gt;I found the attached file online and I'd like to modify it to&amp;nbsp;so that it can detect closure of the selection polygon - i.e., if I select the same point again, it executes the command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have no idea how to start &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Can you even get at the individual points while pline is active?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Additionally, if it could also detect closure via crossing of the lines too that would be awesome!)&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 22:13:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389075#M114660</guid>
      <dc:creator>Kyudos</dc:creator>
      <dc:date>2017-09-18T22:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting polygon closure in LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389183#M114661</link>
      <description>&lt;P&gt;How about if you just teach your users the proper use of the PLINE command?&lt;/P&gt;
&lt;P&gt;Or, pay someone to teach them?&lt;/P&gt;
&lt;P&gt;Like teach them where the "C" key is.&lt;/P&gt;
&lt;P&gt;We are here to help others learn how to use AutoLisp/Visual Lisp so that they can help themselves, not to compensate for IDTENT errors.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Every now and then I tend to get nasty; hopefully it's not my normal temperament.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 23:47:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389183#M114661</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-09-18T23:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting polygon closure in LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389198#M114662</link>
      <description>&lt;P&gt;I'm a developer trying to provide tools to make my users life easier, especially as they are transitioning from a different CAD platform.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obviously users can learn to use the LSP as is, but that doesn't mean it can't be improved. I see you posted from a computer, good job we didn't just stop at 'learn to use an abacus' eh?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"We are here to help others learn how to use AutoLisp/Visual Lisp"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You&amp;nbsp;aren't doing a very good job then, so if you having nothing helpful or constructive to add, just refrain from posting&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 23:58:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389198#M114662</guid>
      <dc:creator>Kyudos</dc:creator>
      <dc:date>2017-09-18T23:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting polygon closure in LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389270#M114663</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/542776"&gt;@Kyudos&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;...I'd like to modify it to&amp;nbsp;so that it can detect closure of the selection polygon - i.e., if I select the same point again, it executes the command.....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you only want to detect closure &lt;EM&gt;to the start point&lt;/EM&gt;, and not the selection of just &lt;EM&gt;any&lt;/EM&gt;&amp;nbsp; ol' same point a second time, and if you're talking about a &lt;EM&gt;line&lt;/EM&gt;-segmented-only Polyline, you could probably do it by &lt;FONT color="#ff0000"&gt;saving the start point&lt;/FONT&gt; and &lt;FONT color="#0000ff"&gt;comparing each point given along the way&lt;/FONT&gt;, something like [untested]:&lt;BR /&gt;....&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (prompt "Draw selection polygon: ")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (command ".pline" &lt;FONT color="#ff0000"&gt;(setq pt1 (getpoint))&lt;/FONT&gt;)&lt;BR /&gt;&amp;nbsp; (setq flag T)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (while (setq pt2 (getpoint (getvar 'lastpoint))); rubber-banded from previous point&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (command (if&amp;nbsp;&lt;FONT color="#0000ff"&gt;(equal pt1 pt2 1e-4)&lt;/FONT&gt; "" pt2); [edit precision as desired]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; feed Enter to end Pline if at start point again, otherwise feed point to Pline command&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ); while&lt;BR /&gt;&amp;nbsp; (setq flag nil)&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 01:03:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389270#M114663</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2017-09-19T01:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting polygon closure in LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389283#M114664</link>
      <description>&lt;P&gt;Thanks Kent...this looks like it might do the trick....just have to learn enough&amp;nbsp;about LISP to make it work now! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 01:14:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389283#M114664</guid>
      <dc:creator>Kyudos</dc:creator>
      <dc:date>2017-09-19T01:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting polygon closure in LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389307#M114665</link>
      <description>&lt;P&gt;A simple yet sage solution. &amp;nbsp;I really do owe apologies to&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/542776"&gt;@Kyudos&lt;/a&gt;. &amp;nbsp;I certainly wasn't being helpful at all.&lt;/P&gt;
&lt;P&gt;BTW, I presume that's exactly how the REVCLOUD function works, except that is must be using grread because when the pointer is close enough to the start point, it just closes and finishes (I think)&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 01:30:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389307#M114665</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-09-19T01:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting polygon closure in LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389317#M114666</link>
      <description>&lt;P&gt;I owe you apologies. &amp;nbsp;All you wanted was a little help to make your workers' lives better.&lt;/P&gt;
&lt;P&gt;Thankfully, Kent's answer is a good one. &amp;nbsp;Wishing you well. - John&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 01:34:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389317#M114666</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2017-09-19T01:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting polygon closure in LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389318#M114667</link>
      <description>&lt;P&gt;For "individual points while pline is active?"&lt;/P&gt;
&lt;P&gt;start your education with a search, here, or google,&lt;/P&gt;
&lt;P&gt;for the first thing you can think of.&lt;/P&gt;
&lt;P&gt;Like; " +autolisp&amp;nbsp; command&amp;nbsp; active"&lt;/P&gt;
&lt;P&gt;Then inspect a few examples and you are started.&lt;/P&gt;
&lt;P&gt;An example of one mehtod:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;; demo of CMDACTIVE, stevor&lt;BR /&gt;&amp;nbsp;(defun C:PPL ( / GP )&lt;BR /&gt;&amp;nbsp; (setq GPL nil) (command "_.PLINE") (graphscr)&lt;BR /&gt;&amp;nbsp; (while (&amp;gt; (getvar 'CMDACTIVE) 0) (princ"\n Pic a Pt: ")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (command PAUSE)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (setq GP (getvar "lastpoint")&amp;nbsp; GPL (cons GP GPL)) &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (Princ " Pt: ") (prin1 GP) &amp;nbsp;&lt;BR /&gt;&amp;nbsp; )&lt;BR /&gt;&amp;nbsp; (textscr) (Princ " Gotten: ") (prin1 GPL) &amp;nbsp;&lt;BR /&gt;&amp;nbsp; (princ)&lt;BR /&gt;&amp;nbsp;) ; def&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another methods would be to collect a list of points,&lt;/P&gt;
&lt;P&gt;then make the Pline.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 01:34:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389318#M114667</guid>
      <dc:creator>stevor</dc:creator>
      <dc:date>2017-09-19T01:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting polygon closure in LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389327#M114668</link>
      <description>&lt;P&gt;Yeah...as always I have Google in hand - though I think you are giving me too much credit... At this stage I'm still learning how to 'read' LISP and figure out what it is doing in terms of functions and declarations etc.... actually using it to do stuff it doesn't already do will have to wait a bit!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 01:41:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389327#M114668</guid>
      <dc:creator>Kyudos</dc:creator>
      <dc:date>2017-09-19T01:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting polygon closure in LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389340#M114669</link>
      <description>&lt;P&gt;Hmmm...based on your example&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/100035"&gt;@stevor&lt;/a&gt;, I could use the &lt;STRONG&gt;&lt;EM&gt;member&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;function to see if any of new points are already in &lt;STRONG&gt;GPL&lt;/STRONG&gt;...&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 01:50:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389340#M114669</guid>
      <dc:creator>Kyudos</dc:creator>
      <dc:date>2017-09-19T01:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting polygon closure in LISP</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389354#M114670</link>
      <description>&lt;P&gt;Yes, you could use the 'member function;&lt;/P&gt;
&lt;P&gt;or, the 'equal is a loop or subroutine to&lt;/P&gt;
&lt;P&gt;determine if there are near duplicates.&lt;/P&gt;
&lt;P&gt;And examples abound, one with adjustable precision:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.lee-mac.com/uniqueduplicate.html" target="_blank"&gt;http://www.lee-mac.com/uniqueduplicate.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;since your 'detect closure of the selection polygon'&lt;/P&gt;
&lt;P&gt;could include the common problem of apparent closure.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 02:03:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/detecting-polygon-closure-in-lisp/m-p/7389354#M114670</guid>
      <dc:creator>stevor</dc:creator>
      <dc:date>2017-09-19T02:03:44Z</dc:date>
    </item>
  </channel>
</rss>

