For get the shareware.
Works with just LINES and you don't need to tell it anything.
Based off a stud wall, will scan for other side, but to only a given
distance.
Modify as you wish, I also have a different one for point to point.
I wrote it about 5 years ago, playing around.
(defun C:ha1 (/ tpick pt ent b1 b2 owinf
basept inf entla entdis entang dist1 dist2
opbase cnt
)
(setq ent nil)
(setq ent (entsel "\nSelect wall..."))
(setq tpick (getvar "pickbox"))
(setvar "pickbox" tpick)
(if ent
(setq basept (cdr ent)
inf (entget (car ent))
b1 (cdr (assoc 10 inf))
b2 (cdr (assoc 11 inf))
entla (cdr (assoc 8 inf))
entty (cdr (assoc 0 inf))
entdis (distance b1 b2)
entang (angle b1 b2)
dist1 (distance b1 (car basept))
dist2 (distance b2 (car basept))
)
)
(if (not (= entty "LINE"))(setq ent nil))
(if ent
(setq cnt 1)
)
(while cnt
(if (and ent (<= dist1 dist2))
(setq a (angle b1 b2))
(setq a (angle b2 b1))
)
(if (and ent (<= dist1 dist2))
(setq opbase (polar b1 (+ a (dtr 0)) dist1)
pt b1
)
(setq opbase (polar b2 (+ a (dtr 0)) dist2)
pt b2
)
)
(setq cnt nil)
)
(setvar "pickbox" 0)
(if ent
(setq cnt 1)
)
(while cnt
(if cnt
(setq owid1 (polar opbase (+ a (dtr 90)) cnt))
)
(if (and ent (nentselp owid1))
(princ (ha-wall-layer1))
)
(if cnt
(setq cnt (+ cnt 1))
)
(if (and cnt (= cnt 13))
(setq cnt nil)
)
)
(if (and ent (= owinf nil))
(setq cnt 1)
)
(while cnt
(if cnt
(setq owid1 (polar opbase (+ a (dtr -90)) cnt))
)
(if (and ent (nentselp owid1))
(princ (ha-wall-layer1))
)
(if cnt
(setq cnt (+ cnt 1))
)
(if (and cnt (= cnt 13))
(setq cnt nil)
)
)
(setvar "pickbox" tpick)
(if ent
(princ (c:ha1))
)
(setq ent nil)
(princ)
)
(princ)
(defun ha-wall-layer1 (/ tru-ent owb1 owb2
owentla owentdis owentang cl ndis
basept2 nang npoint npoint2 tmp1 tmp2
)
(setq tru-ent (nentselp owid1))
(if tru-ent
(setq owinf (entget (car tru-ent))
basept2 (cdr tru-ent)
owb1 (cdr (assoc 10 owinf))
owb2 (cdr (assoc 11 owinf))
owentla (cdr (assoc 8 owinf))
owentty (cdr (assoc 0 owinf))
owentdis (distance owb1 owb2)
owentang (angle owb1 owb2)
)
)
(if (and ent (= owentla entla)(= owentty "LINE"))
(progn
(setq nang (angle (car basept) (car basept2)))
(setq npoint (inters (car basept) (car basept2) owb1 owb2 nil))
(setq ndis (distance (car basept) npoint))
(setq npoint2(inters npoint (car basept) b1 b2 nil))
(setq tmp1 (polar npoint (+ entang (dtr 90)) 100))
(setq tmp2 (polar npoint (+ entang (dtr -90)) 100))
(setq npoint (inters tmp1 tmp2 owb1 owb2))
(setq nang (angle npoint2 npoint))
(setq ndis (distance npoint npoint2))
(setq owb1 (polar b1 (+ nang (dtr 0)) ndis))
(setq owb2 (polar b2 (+ nang (dtr 0)) ndis))
(setq cl (getvar "clayer"))
(setvar "clayer" cl)
(setvar "pickbox" tpick)
(if (= (tblsearch "layer" "screen1") nil)
(command "layer" "m" "screen1" "c" "c" "screen1" "")
)
(setvar "clayer" "screen1")
(setq cnt nil)
(command "hatch" "ansi31" "20" (+ (rtd entang) 45) "" "n" b1 b2 owb2
owb1 "c" "")
(setvar "clayer" cl)
)
)
(princ)
)
Rudy@cadentity.com
"vbecerra" wrote in message
news:f0fd4ee.-1@WebX.maYIadrTaRb...
Is there a way to hatch between two lines even though they are not enclosed?