<?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: Create isosceles triangle in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673854#M54310</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp; What is with your Expert elite signature. It shows message "Image doesn't exist or no longer available "&lt;/P&gt;</description>
    <pubDate>Thu, 07 Oct 2021 18:30:08 GMT</pubDate>
    <dc:creator>hak_vz</dc:creator>
    <dc:date>2021-10-07T18:30:08Z</dc:date>
    <item>
      <title>Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673622#M54300</link>
      <description>&lt;P&gt;Hello boys.&lt;BR /&gt;Could you help me with a lisp, to create an isosceles triangle.&lt;BR /&gt;I have a base line that would be the base of the triangle.&lt;BR /&gt;And I have a line where the third vertex of the triangle has to pass.&lt;BR /&gt;But I need to draw two sides of the triangle that are equal.&lt;/P&gt;&lt;P&gt;I am attaching a dwg file so that you can understand me better.&lt;BR /&gt;The cyan lines are what I need to draw, (in the example they are not the same, because I could not make them remain the same in the drawing)&lt;/P&gt;&lt;P&gt;Beforehand thank you very much.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 16:20:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673622#M54300</guid>
      <dc:creator>carlos_m_gil_p</dc:creator>
      <dc:date>2021-10-07T16:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673683#M54301</link>
      <description>&lt;P&gt;Command POLYGON (POL) in edge mode with three sides creates perfect isosceles triangle&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 16:46:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673683#M54301</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-10-07T16:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673696#M54302</link>
      <description>&lt;P&gt;1.&amp;nbsp; Draw a vertical line the length of the triangle height.&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; Offset the line half of the base length, once to the left and once to the right.&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; Draw a polyline from endpoint to endpoint to endpoint and close.&lt;/P&gt;
&lt;P&gt;4.&amp;nbsp; Erase the lines.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 16:56:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673696#M54302</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-10-07T16:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673699#M54303</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, isosceles, but specifically equilateral.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 16:58:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673699#M54303</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-10-07T16:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673703#M54304</link>
      <description>&lt;P&gt;Hi brother.&lt;BR /&gt;With the POL command it doesn't work.&lt;BR /&gt;The POL command makes equilateral triangles and I need isosceles.&lt;BR /&gt;The isosceles triangle has two equal sides and one unequal side.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 17:00:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673703#M54304</guid>
      <dc:creator>carlos_m_gil_p</dc:creator>
      <dc:date>2021-10-07T17:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673712#M54305</link>
      <description>&lt;P&gt;Ok working on code&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 17:03:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673712#M54305</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-10-07T17:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673767#M54306</link>
      <description>&lt;P&gt;Try this [in simplest terms, minimally tested]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:WHATEVER (/ basesel base base1 base2 basemid peak)
  (setq
    basesel (entsel "\nTriangle base line: ")
    base (car basesel)
    base1 (vlax-curve-getStartPoint base)
    base2 (vlax-curve-getEndPoint base)
    basemid (osnap (cadr basesel) "_mid")
    peak (car (entsel "\nLine that peak must meet: "))
  )
  (command "_.line"
    "_non" basemid
    (polar basemid (+ (angle base1 base2) (/ pi 2)) 1)
    ""
  ); command
  (setq mid (entlast))
  (command "_.line"
    base1
    (inters
      (vlax-curve-getStartPoint peak) (vlax-curve-getEndPoint peak)
      (vlax-curve-getStartPoint mid) (vlax-curve-getEndPoint mid)
      nil
    ); inters
    base2
    ""
  ); command
  (entdel mid)
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 17:56:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673767#M54306</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-10-07T17:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673771#M54307</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:iso_triangle (/ getintersections adoc e c eo co p1 p2 p3 l lo)
	(defun *error* ( msg )
		(if (not (member msg '("Function cancelled" "quit / exit abort")))
			(princ)
		)
		(if (and adoc) (vla-endundomark adoc))
		(setvar 'cmdecho 1)
		(princ)
	)
	(defun getintersections	(obj1 obj2 / var)
		(setq var (vlax-variant-value (vla-intersectwith obj1 obj2 1)))
		(if (&amp;lt; 0 (vlax-safearray-get-u-bound var acExtendThisEntity))
		(vlax-safearray-&amp;gt;list var)
		) 
	) 
	(setq adoc (vla-get-ActiveDocument (vlax-get-acad-object)) blocks (vla-get-blocks adoc))
	(setq e (car (entsel "\nSelect triangle baseline &amp;gt;")))
	(setq c (car (entsel "\nSelect line where third points lie &amp;gt;")))
	(cond
		((and e c)
				(vla-endundomark adoc)
			(vla-startundomark adoc)
			(setq eo (vlax-ename-&amp;gt;vla-object e))
			(setq co (vlax-ename-&amp;gt;vla-object c))
			(setq p1 (vlax-curve-getStartPoint eo))
			(setq p2 (vlax-curve-getEndPoint eo))
			(setq l
				(entmakex
					(list
						(cons 0 "LINE")
						(cons 100 "ACDbEntity")
						(cons 100 "ACDbLine")
						(cons 10 (mapcar '* (mapcar '+ p1 p2) '(0.5 0.5 0.5)))
						(cons 11 (polar (mapcar '* (mapcar '+ p1 p2) '(0.5 0.5 0.5))(+ (angle p1 p2) (* 0.5 PI)) 1))
					)
				)
			)
			(setq lo (vlax-ename-&amp;gt;vla-object l))
			(setq p3 (getintersections lo co ))
			(entdel l)
			(setvar 'cmdecho 0)
			(command "_.line" "_none" p1 "_none" p3 "")
			(command "_.line" "_none" p2 "_none" p3 "")
			(setvar 'cmdecho 1)
			(vla-endundomark adoc)
		)
	)
	(princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 17:48:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673771#M54307</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-10-07T17:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673810#M54308</link>
      <description>&lt;P&gt;Alrighty then,&lt;/P&gt;
&lt;P&gt;This simple one lets you draw the triangle at any angle...&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:isosceles ( / p1 p2 p3 ang ht)
  (and
    (setq p1 (getpoint "\n1st end of base line: "))
    (setq p2 (getpoint p1 "\n2nd end of base line: "))
    (setq ht (getdist "\nHeight of triangle: "))
    (setq ang (angle p1 p2))
    (setq p3 (polar p1 ang (* 0.5 (distance p1 p2))))
    (setq p3 (polar p3 (+ ang (/ pi 2)) ht))
    (vl-cmdf "_.pline" "_non" p1 "_non" p2 "_non" p3 "_C")
  )
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 17:59:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673810#M54308</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-10-07T17:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673846#M54309</link>
      <description>&lt;P&gt;&lt;FONT color="#0000FF"&gt;Bonjour &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2573929"&gt;@carlos_m_gil_p&lt;/a&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;I propose this lsp with which you only have to write the two lines, (base first, objective second) &lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;I am at your disposal to improve it if necessary (color, layer...)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;;|
demande sur le forum anglais de carlos.gil.p du 07 octobre 2021
tracé triangle isocèle depuis ligne de base et ligne objectif
les deux lignes sont à sélectionner à l'écran
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673622#M421555
|;
(defun c:TRIS2L (/ int l1 l2 p1 p2 p3 p4 pmil proj int)
  (setq oldosmode (getvar "osmode"))
  (setq l1 (car (entsel "\nBase Line\n")))
  (setq l2 (car (entsel "\nLine Object\n")))
  (if
    (and (= "LINE" (cdr (assoc 0 (entget l1))))
           (= "LINE" (cdr (assoc 0 (entget l1))))
           )
    (progn
      (setq p1 (cdr (assoc 10 (entget l1)))
            p2 (cdr (assoc 11 (entget l1)))
            p3 (cdr (assoc 10 (entget l2)))
            p4 (cdr (assoc 11 (entget l2)))
            pmil (mapcar '(lambda (a b ) (/ (+ a b) 2.0)) p1 p2)
            proj (polar pmil (- (angle p1 p2) (/ pi 2.0)) 1)
            int (inters pmil proj p3 p4 nil)
            )
      (entmake (cons '(0 . "LINE") (mapcar 'cons '(10 11) (list p1 int))))
      (entmake (cons '(0 . "LINE") (mapcar 'cons '(10 11) (list p2 int))))
      )
    (progn
      (alert "incorrect selection of entities")
      (setvar "osmode" oldosmode)
      )
    )
)
(prompt "Command Name : TRIS2L TRiangle ISosceles 2 Lines")
(princ)

      
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;Amicalement&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 18:21:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673846#M54309</guid>
      <dc:creator>-didier-</dc:creator>
      <dc:date>2021-10-07T18:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673854#M54310</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp; What is with your Expert elite signature. It shows message "Image doesn't exist or no longer available "&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 18:30:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673854#M54310</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-10-07T18:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673867#M54311</link>
      <description>&lt;P&gt;&lt;FONT color="#0000FF"&gt;Bonjour &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;I sympathize with John because putting elite signatures is not very simple!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;Amicalemeny&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 18:24:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673867#M54311</guid>
      <dc:creator>-didier-</dc:creator>
      <dc:date>2021-10-07T18:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673943#M54312</link>
      <description>&lt;P&gt;Hello boys how are you.&lt;BR /&gt;All the options work very well.&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636" target="_self"&gt;&lt;SPAN class="login-bold"&gt;john.uhden&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;In this case I don't know the height, but it may work for another time.&lt;BR /&gt;Thank you very much to all.&lt;BR /&gt;Thank you for helping me and teaching me every new day more.&lt;BR /&gt;Greetings.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Oct 2021 18:59:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10673943#M54312</guid>
      <dc:creator>carlos_m_gil_p</dc:creator>
      <dc:date>2021-10-07T18:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create isosceles triangle</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10674004#M54313</link>
      <description>Thanks, &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;.  I'm glad you mentioned it.&lt;BR /&gt;Back when, &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/32637"&gt;@Jeff_M&lt;/a&gt; (Jeff Mishler) gave me his avatar to use.  So I just&lt;BR /&gt;pasted it and changed the name.  But not too long ago, the image&lt;BR /&gt;(referenced from on-line somewhere) disappeared.  And I don't know how to&lt;BR /&gt;get one back or use another.</description>
      <pubDate>Thu, 07 Oct 2021 19:30:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-isosceles-triangle/m-p/10674004#M54313</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-10-07T19:30:27Z</dc:date>
    </item>
  </channel>
</rss>

