- ;;;(铝角)----------------------------------------------------
- (defun c:jl ()
- (setvar "cmdecho" 0)
- (setq cl (getvar "clayer")
- unit (getvar "luprec")
- osm (getvar "osmode")
- )
- (setvar "osmode" 0)
- (setvar "luprec" 0)
- (command ".layer" "m" "EXTRU" "c" "GREEN" "" "" )
- (command ".layer" "set" "EXTRU" "" )
-
- (setq l 25)
- (if (> l 0)
- (setq #l l)
- (setq l 25)
- )
- (setq pr1 (strcat "\nHorizontal Length Of Alum. Angle <"(rtos #l)">=")
- )
- (initget 6)
- (if (setq l (getdist pr1))
- nil
- (setq l #l)
- )
-
- (setq w 25)
- (if (> w 0)
- (setq #w w)
- (setq w 25)
- )
- (setq pr2 (strcat "\nVertical Length Of Alum. Angle <"(rtos #w)">= ")
- )
- (initget 6)
- (if (setq w (getdist pr2))
- nil
- (setq w #w)
- )
- (setq th 3)
- (if (> th 0)
- (setq #th th)
- (setq th 3)
- )
- (setq pr3 (strcat "\nThickness Of Alum. Angle <"(rtos #th)">= ")
- )
- (initget 6)
- (if (setq th (getdist pr3))
- nil
- (setq th #th)
- )
- (setq p1 (getpoint "\nBase-point Of Alum. Angle: ")
- p2 (list (+ l (car p1)) (cadr p1))
- p3 (list (car p2) (+ th (cadr p2)))
- p4 (list (+ th (car p1)) (+ th (cadr p1)))
- p5 (list (car p4) (+ w (cadr p1)))
- p6 (list (car p1) (+ w (cadr p1)))
- )
-
- (command ".pline" p1 p2 p3 p4 p5 p6 "c"
- ".layer" "set" cl ""
- ".rotate" "l" "" p1 pause
- )
- (setvar "cmdecho" 1)
- (setvar "luprec" unit)
- (setvar "osmode" osm)
- (prompt "\nAlum. Angle is done.\n")
- )
|