Membuat Arsir

;Membuat arsir horizontal
;Membuat arsir vertical
;Membuat arsir 45 derajat

(defun c:rr(/ p osm rr r)(setq rr *error* *error* merr)
(setq osm(getvar"osmode") r 0)(setvar"osmode"0)
(prompt" Boundary Area\n Select internal point: ")
(while(setq p(getpoint))
(if(C:boundary p)(progn(princ" Next point: ")(setq r(1+ r))) )
)(command "cmdecho""0" "area""a")
(repeat r(command"e"(entlast)"")(entdel(entlast)) )(command"")
(REDRAW)
(setvar"osmode"osm)(setq *error* rr)(princ))

(defun arsir(A FAN DI / A FAN DI p lay rr osm)
(setq rr *error* *error* merr)(setq lay(getvar"clayer"))
(setq osm(getvar"osmode"))(setvar"osmode"0)
(prompt" Boundary HATCH\n ")
(while(setq p(getpoint"Select internal point: "))(command"-boundary" p"")
(command"layer""m"A"" "hatch""u"FAN DI"n""l""")
)(REDRAW)(setvar"clayer"lay)(setvar"osmode"osm)(setq *error* rr)(princ))

(defun c:vv()(arsir"hatch""90""1"))
(defun c:hh()(arsir"hatch""0""1"))
(defun c:h4()(arsir"hatch""45""3"))
(defun c:h5()(arsir"hatch""-45""3"))
(defun c:h2()(arsir"hatch""45""2"))
(defun c:h6()(arsir"hatch""45""1"))

(defun ahatch(ahat sc / A FAN DI p osm lay rr)
(setq rr *error* *error* merr)(setq lay(getvar"clayer"))
(setq osm(getvar"osmode"))(setvar"osmode"0)
(princ ahat)(prompt" Boundary HATCH\n ")
(while(setq p(getpoint"Select internal point: "))(if(c:bpoly p)
(command"layer""m""HATCH""" "hatch"ahat sc"0""l""" "erase""p"""))
)(REDRAW)(setvar"clayer"lay)(setvar"osmode"osm)(setq *error* rr)(princ))

(defun c:36()(ahatch"ANSI36""15" ))
(defun c:H3()(ahatch"AR-CONC""0.75"))
(defun c:H7()(ahatch"AR-SAND""0.75"))
(defun c:Hd()(ahatch"DOTS""5"))
(defun c:HC()(ahatch"CROSS""5"))

(defun C:44(/ lay p1 p2 e1 e2 sd l d)(setq lay(getvar"clayer"))
(setq p1(getp"\n First point: ") p2(getpoint p1"\n To point: "))
(if(and p1 p2)(progn(if(>(cadr p1)(cadr p2))(setq sd 45 l -)(setq sd -45 l +))
(command"line""non"p1"non"p2"" "offset""2"(list(setq e1(entlast))p1)"non"(list(car p1)(-(cadr p1)50))"")
(setq e2(entlast))
(command"layer""m""artanah""" "hatch""*u"sd"2"""e1 e2"" "erase" e1 e2 "")
(setq d(distance(cdr(assoc 10(entget(entlast))))(cdr(assoc 11(entget(entlast))))))
(command"line""non"p1"non"(strcat"@"(rtos(l 0 d))"<"(rtos sd))"" "line""non"p2"non"(strcat"@"(rtos(l 0 d))"<"(rtos sd))"")
(setvar"clayer"lay)))(princ))

(defun c:ur(/ p lay rr osm)
(setq rr *error* *error* merr)(setq lay(getvar"clayer"))
(setq osm(getvar"osmode"))(setvar"osmode"0)
(prompt" Boundary HATCH\n ")
(while(setq p(getpoint"Select internal point: "))(if(c:-boundary p)
(command"layer""m""arbang""" "hatch""u""45""2""y""l""" "erase""p"""))
)(REDRAW)(setvar"clayer"lay)(setvar"osmode"osm)(setq *error* rr)(princ))

(defun c:ga (/ a ar pt sc pt1)
(setq pt1 (getpoint "Select point inside area to be calculated: "))
(command "-boundary" pt1 "")
(setq a (ssget "L"))
(setq unts (getvar "lunits"))
(setvar "lunits" 2)
(command "area" "e" a )
(setq ar (getvar "area"))
(setvar "lunits" unts)
(setq pt (getpoint "select location for area note: "))
(command"erase"a"")
(command "text" pt"""" ar)
)

0 Komentar::

Posting Komentar

Pesan Anda: