<?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: Plumbing fittings at intersection of single lines in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160779#M81516</link>
    <description>&lt;P&gt;I have learned a lot in the past year But you gurus always blow my mind.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Nov 2019 22:16:43 GMT</pubDate>
    <dc:creator>DC-MWA</dc:creator>
    <dc:date>2019-11-21T22:16:43Z</dc:date>
    <item>
      <title>Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160104#M81498</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Hard to describe in words what I'm trying to do. So here is an image.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 16:30:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160104#M81498</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T16:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160213#M81499</link>
      <description>&lt;P&gt;[The image didn't attach....]&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 17:14:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160213#M81499</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-11-21T17:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160297#M81500</link>
      <description>&lt;P&gt;Here is the image.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/700337iAA3C93A271A26A1D/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.JPG" alt="1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have tried blocks, but it becomes tedious.&lt;/P&gt;&lt;P&gt;If the lisp would 1. ask user to select the intersection, 2. then draw and trim as shown in image parametrically..&lt;/P&gt;&lt;P&gt;It would save us a lot of time and effort.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 17:53:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160297#M81500</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T17:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160303#M81501</link>
      <description>&lt;P&gt;I'm hoping somebody has done something similar I can use or at least get me going in the right direction programming-wise.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 17:55:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160303#M81501</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T17:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160338#M81502</link>
      <description>&lt;P&gt;You say "&lt;SPAN&gt;parametrically". So what is the parameter? You should probably upload a drawing and be a bit more detailed in your request.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 18:13:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160338#M81502</guid>
      <dc:creator>doaiena</dc:creator>
      <dc:date>2019-11-21T18:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160383#M81503</link>
      <description>&lt;P&gt;The dimensions would always be 1/4" long from intersection x 1/8" wide ( 1/16" from line). These numbers would by multiplied by the current dimscale....&lt;/P&gt;&lt;P&gt;See image to clarify&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.JPG" style="width: 421px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/700353i3CF4443E0F4DFECB/image-dimensions/421x278?v=v2" width="421" height="278" role="button" title="2.JPG" alt="2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 18:34:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160383#M81503</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T18:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160434#M81504</link>
      <description>&lt;P&gt;How about this approach:&lt;BR /&gt;&lt;BR /&gt;-select lines&lt;/P&gt;&lt;P&gt;-find intersections&lt;/P&gt;&lt;P&gt;-draw a rectangle for each line (representing the fitting outline)&lt;/P&gt;&lt;P&gt;-region the rectangles&lt;/P&gt;&lt;P&gt;-break the lines at the point of intersection and at the point where the fitting ends&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That should leave you with a region. If you want it to be a polyline, you can explode the region and join the remaining lines.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 19:05:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160434#M81504</guid>
      <dc:creator>doaiena</dc:creator>
      <dc:date>2019-11-21T19:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160458#M81505</link>
      <description>&lt;P&gt;Seems like selecting lines, then intersection is more clicks than desired.&lt;/P&gt;&lt;P&gt;If I could get the lines and intersection in one click? Not sure how I would do this..&lt;/P&gt;&lt;P&gt;Also, drawing the rectangles from the two midpoints? Not sure how to do this either?&lt;/P&gt;&lt;P&gt;All this is way out of my league.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 19:19:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160458#M81505</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T19:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160464#M81506</link>
      <description>&lt;P&gt;I think using&amp;nbsp;LINEWORKSHRINKWRAP and selecting the rectangles instead of region and explode with work.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 19:22:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160464#M81506</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T19:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160474#M81507</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6400150"&gt;@DC-MWA&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... LINEWORKSHRINKWRAP ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;... is a Civil3D command, not available in plain AutoCAD or other overlay programs.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 19:30:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160474#M81507</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-11-21T19:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160512#M81508</link>
      <description>&lt;P&gt;I'm using ACA. it works.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 19:54:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160512#M81508</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T19:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160517#M81509</link>
      <description>&lt;P&gt;Ok,&lt;/P&gt;&lt;P&gt;I have the angled rectangle by two clicks (midpoints) figured out.&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;LINEWORKSHRINKWRAP to draw boundary around the rectangles after drawing.&lt;/P&gt;&lt;P&gt;Then erase the rectangles.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now need to figure out the intersection point and each line direction from picking the intersection?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 19:57:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160517#M81509</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T19:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160605#M81510</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is my Drainage Program that might be of interests.&lt;/P&gt;&lt;P&gt;&lt;A href="https://autolispprograms.wordpress.com/one/drainage-pipe/" target="_blank" rel="noopener"&gt;https://autolispprograms.wordpress.com/one/drainage-pipe/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 20:46:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160605#M81510</guid>
      <dc:creator>_Tharwat</dc:creator>
      <dc:date>2019-11-21T20:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160644#M81511</link>
      <description>&lt;P&gt;Thank you but we have a long time client that there way of doing things. It's a lot of tedious work, but we would like to keep the client happy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 21:15:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160644#M81511</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T21:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160652#M81512</link>
      <description>&lt;P&gt;Just download the program and test it yourself and definitely you would find out how powerful, fast and accurate this program is as soon as you get familiar to it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 21:20:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160652#M81512</guid>
      <dc:creator>_Tharwat</dc:creator>
      <dc:date>2019-11-21T21:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160677#M81513</link>
      <description>&lt;P&gt;If you are offering software solutions to clients, you should at least try and improve your lisp skills. The function you want to create is almost trivial /basic 2D geometric functions/. Here is a starting point for you /barely tested/.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;(defun c:test ( / DrawRect line1 line2 len width fuzz line1Start line1End line2Start line2End intersPt line1Ang line2Ang p1 p2 p3 p4)

(defun DrawRect (lst)
(entmake (append (list (cons 0 "LWPOLYLINE")
(cons 100 "AcDbEntity")
(cons 100 "AcDbPolyline")
(cons 90 (length lst))
(cons 70 1))
(mapcar (function (lambda (p) (cons 10 p))) lst)))
);defun

(while (not line1) (setq line1 (entsel "\nPick first line: ")))
(while (not line2) (setq line2 (entsel "\nPick second line: ")))

(setq len 80)
(setq width 20)
(setq fuzz 0.01)

(setq line1Start (cdr (assoc 10 (entget (car line1)))))
(setq line1End (cdr (assoc 11 (entget (car line1)))))
(setq line2Start (cdr (assoc 10 (entget (car line2)))))
(setq line2End (cdr (assoc 11 (entget (car line2)))))

;If the 2 lines intersect
(if (setq intersPt (inters line1Start line1End line2Start line2End))
(progn

(setq line1Ang (angle line1Start line1End))
(setq line2Ang (angle line2Start line2End))

(mapcar '(lambda (line / lineStart lineEnd lineAng)

(setq lineStart (car line) lineEnd (cadr line) lineAng (caddr line))

(cond
;Intersection point is on the start point of the line
((equal intersPt lineStart fuzz)
(setq p1 (polar intersPt (- lineAng (/ pi 2)) (/ width 2)))
(setq p2 (polar (polar intersPt lineAng len) (- lineAng (/ pi 2)) (/ width 2)))
(setq p3 (polar (polar intersPt lineAng len) (+ lineAng (/ pi 2)) (/ width 2)))
(setq p4 (polar intersPt (+ lineAng (/ pi 2)) (/ width 2)))
(DrawRect (list p1 p2 p3 p4))
)

;Intersection point is on the end point of the line
((equal intersPt lineEnd fuzz)
(setq p1 (polar intersPt (- lineAng (/ pi 2)) (/ width 2)))
(setq p2 (polar (polar intersPt (+ lineAng pi) len) (- lineAng (/ pi 2)) (/ width 2)))
(setq p3 (polar (polar intersPt (+ lineAng pi) len) (+ lineAng (/ pi 2)) (/ width 2)))
(setq p4 (polar intersPt (+ lineAng (/ pi 2)) (/ width 2)))
(DrawRect (list p1 p2 p3 p4))
)

;Intersection point is in the middle of the line
(T
(setq p1 (polar (polar intersPt lineAng len) (- lineAng (/ pi 2)) (/ width 2)))
(setq p2 (polar (polar intersPt (+ lineAng pi) len) (- lineAng (/ pi 2)) (/ width 2)))
(setq p3 (polar (polar intersPt (+ lineAng pi) len) (+ lineAng (/ pi 2)) (/ width 2)))
(setq p4 (polar (polar intersPt lineAng len) (+ lineAng (/ pi 2)) (/ width 2)))
(DrawRect (list p1 p2 p3 p4))
)
);cond

)
(list (list line1Start line1End line1Ang) (list line2Start line2End line2Ang))
);mapcar

))

(princ)
);defun&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;If you spend some time, im sure this can be written in a far more elegant way, in probably less than half the code.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 21:29:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160677#M81513</guid>
      <dc:creator>doaiena</dc:creator>
      <dc:date>2019-11-21T21:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160696#M81514</link>
      <description>&lt;P&gt;To clarify, I never offered any software to any client. I do a lot of work for them which is tedious. The software is for me to assist me in doing the work. The client knows nothing of my means and methods, only how they want drawings to look when complete.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 21:37:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160696#M81514</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T21:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160702#M81515</link>
      <description>&lt;P&gt;I'm sorry. I misunderstood your previous post. But still, learning a bit of lisp goes a long way.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 21:40:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160702#M81515</guid>
      <dc:creator>doaiena</dc:creator>
      <dc:date>2019-11-21T21:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160779#M81516</link>
      <description>&lt;P&gt;I have learned a lot in the past year But you gurus always blow my mind.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 22:16:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160779#M81516</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T22:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbing fittings at intersection of single lines</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160796#M81517</link>
      <description>&lt;P&gt;Your code works but I ran into a couple things.&lt;/P&gt;&lt;P&gt;What if I have more than two lines? Corners are problematic as well.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.JPG" style="width: 514px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/700432i7E98D2E7031FDB3C/image-dimensions/514x249?v=v2" width="514" height="249" role="button" title="3.JPG" alt="3.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 22:32:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/plumbing-fittings-at-intersection-of-single-lines/m-p/9160796#M81517</guid>
      <dc:creator>DC-MWA</dc:creator>
      <dc:date>2019-11-21T22:32:44Z</dc:date>
    </item>
  </channel>
</rss>

