(defun c:beam()
(setq x(getreal "Enter length of the beam: "))
(setq y(getreal "Enter Height of the Beam: "))
(setq sth(getreal "Enter Height of the Steel: "))
(setq e(getstring 1 "Normal Steel: "))
(setq ex(getstring 1 "Extra Steel: "))
(setq c(strcat "0" "," (rtos (/ x 2)))) ;;0,2000
(setq pdstl1(* 0.65 x))
(setq pdstl(/ pdstl1 2)) ;;1300
(setq m(- y sth)) ;;575
(setq pt1(strcat "0" "," "0")) ;;0,0
(setq pt2(strcat (rtos x) "," "0")) ;;4000,0
(setq pt3(strcat "0" "," (rtos sth))) ;;0,25
(setq pt4(strcat (rtos x) "," (rtos sth))) ;;4000,25
(setq pt5(strcat "0" "," (rtos m))) ;;0,575
(setq pt6(strcat (rtos x) "," (rtos m))) ;;4000,575
(setq pt7(strcat "0" "," (rtos y))) ;;0,600
(setq pt8(strcat (rtos x) "," (rtos y))) ;;4000,600
(setq left(- (/ x 2) pdstl)) ;;700
(setq pt9(strcat (rtos left) "," (rtos sth))) ;;700,25
(setq pt10(strcat (rtos (- left (* sth 3))) "," (rtos (* sth 3)))) ;;650,50
(setq right(+ (/ x 2) pdstl)) ;;3300
(setq righth(* sth 3)) ;;50
(setq pt11(strcat (rtos right) "," (rtos sth))) ;;3300,25
(setq pt12(strcat (rtos (+ right righth)) "," (rtos righth))) ;;3350,50
(setq top(* 0.3 x)) ;;1200
(setq pt13(strcat (rtos top) "," (rtos m))) ;;1200,575
(setq pt14(strcat (rtos (+ top righth)) "," (rtos (- y righth)))) ;;1250,550
(setq pt15(strcat (rtos (- x top)) "," (rtos m))) ;;2800,575
(setq pt16(strcat (rtos (- (- x top) righth)) "," (rtos (- y righth)))) ;;2750,550
(setq c1(strcat (rtos (/ top 2)) "," (rtos m))) ;;600,575
(setq c2(strcat (rtos (/ top 2)) "," (rtos (+ m 300)))) ;;600,875
(setq c3(strcat (rtos (+ (/ top 2) 300)) "," (rtos (+ m 300)))) ;;900,875
(setq c4(strcat (rtos (/ x 2)) "," (rtos m))) ;;2000,575
(setq c5(strcat (rtos (/ x 2)) "," (rtos (+ m 300)))) ;;2000,875
(setq c6(strcat (rtos (+ (/ x 2) 300)) "," (rtos (+ m 300)))) ;;2300,875
(setq c7(strcat (rtos (+ (- x top) (/ top 2))) "," (rtos m))) ;;3400,575
(setq s(+ (- x top) (/ top 2))) ;;3400
(setq c8(strcat (rtos s) "," (rtos (+ m 300)))) ;;3400,875
(setq c9(strcat (rtos (+ s 300)) "," (rtos (+ m 300)))) ;;3700,875
(setq c10 (strcat (rtos (/ top 2) ) "," (rtos sth))) ;;600,25
(setq c11(strcat (rtos (/ top 2)) "," (rtos (- sth 300)))) ;;600,-275
(setq c12(strcat (rtos (+ (/ top 2) 300)) "," (rtos (- sth 300)))) ;;900,-275
(setq c13(strcat (rtos (/ x 2)) "," (rtos sth))) ;;2000,25
(setq c14(strcat (rtos (/ x 2)) "," (rtos (- sth 300)))) ;;2000,-275
(setq c15(strcat (rtos (+ (/ x 2) 300)) "," (rtos (- sth 300)))) ;;2300,-275
(setq c16(strcat (rtos s) "," (rtos sth))) ;;3400,25
(setq c17(strcat (rtos s) "," (rtos (- sth 300)))) ;;3400,-275
(setq c18(strcat (rtos (- s 300)) "," (rtos (- sth 300)))) ;;3100,-275
(setq c2a(strcat (rtos (/ top 2)) "," (rtos (+ m 350))))
(setq c5a(strcat (rtos (/ x 2)) "," (rtos (+ m 350))))
(setq c8a(strcat (rtos s) "," (rtos (+ m 350))))
(setq c11a(strcat (rtos (/ top 2)) "," (rtos (- sth 450))))
(setq c14a(strcat (rtos (/ x 2)) "," (rtos (- sth 450))))
(setq c18a(strcat (rtos (- s 300)) "," (rtos (- sth 450))))
(command "line" pt1 pt2 "")
(command "line" pt3 pt4 "")
(command "line" pt5 pt6 "")
(command "line" pt7 pt8 "")
(command "line" pt9 pt10 "")
(command "line" pt11 pt12 "")
(command "line" pt13 pt14 "")
(command "line" pt15 pt16 "")
(command "line" c1 c2 "")
(command "line" c2 c3 "")
(command "line" c4 c5 "")
(command "line" c5 c6 "")
(command "line" c7 c8 "")
(command "line" c8 c9 "")
(command "line" c10 c11 "")
(command "line" c11 c12 "")
(command "line" c13 c14 "")
(command "line" c14 c15 "")
(command "line" c16 c17 "")
(command "line" c17 c18 "")
(command "text" c2a "100" "" ex)
(command "text" c5a "100" "0" e)
(command "text" c8a "100" "0" ex)
(command "text" c11a "100" "0" e)
(command "text" c14a "100" "0" ex)
(command "text" c18a "100" "0" e)
)
No comments:
Post a Comment