钢筋弯曲系数的lisp
我需要帮助,使lisp帮助做圆角根据钢筋直径如下例。当我键入6时,圆角半径为20
当8圆角半径24时
当10圆角半径32时
当12圆角半径36时
当16圆角半径48时
当20圆角半径60时
当25圆角半径75时
当32圆角半径96时
当36圆角半径108时
当40圆角半径120时 6*3=18
8*3=24
10*3=30
...*3=...
40*3=120 可能
initget getkword ;for validation
(setq r (cadr(assoc i LST))) ; (setq LST '((6 20)(8 24)(10 32)....(36 108)(40 120)))
(setvar 'filletrad r)
@哦,试试看。。 这里有一个。对于较大的半径,它为2.5 d,较小的为3.0 d
https://www.civilinfrabnl.nl/index.php/forum/9-algemene-vragen/2581-fillet-line-and-or-pline 需要检查钢筋弯曲标准是否正确? 是的是3*bd,直到直径20大于20是4*bd 好心的lisp不工作
当然,如果你从来没有试着去写它,它就不起作用了
以下是示例
(defun c:test ( / l i r )
(setq l '((6 8 10 12 16 20 25 32 36 40) (20 24 32 36 48 60 75 96 108 120)))
(initget 1 (apply 'strcat (mapcar ''((x)(strcat(itoa x) " "))(car l))))
;(initget 1 "6 8 10 12 16 20 25 32 36 40 "); same validation
(and
(setq i (getkword "\nEnter size? "))
(setq r (cadr (assoc (atoi i) (apply 'mapcar (cons 'list l))))) ;Doug Wilson's transpose
;((6 20) (8 24) (10 32) (12 36) (16 48) (20 60) (25 75) (32 96) (36 108) (40 120))
(setvar 'filletrad r)) ;new fillet radius value, r
(vl-cmdf "_FILLET" "p") ;invoke command fillet
(princ)
)
(defun C:test ( / input )
(if (setq input (getreal "\nEnter a number: "))
(alert
(rtos
(if (< input 20)
(* 3 input)
(* 4 input)
)
2 2
)
)
)
(princ)
)
但这意味着输入10的值将为30,输入36的值将为144。
也许两者之间有某种联系:
(defun C:test ( / n v )
(if (setq n (getreal "\nEnter a number: "))
(alert
(rtos
(if (setq v (cadr (assoc n '((6 20) (8 24) (10 32) (12 36) (16 48) (20 60) (25 75) (32 96) (36 108) (40 120)))))
v
(if (< n 20)
(* 3 n)
(* 4 n)
)
)
2 2
)
)
)
(princ)
) lisp显示了直径的弯曲系数,当我在两条线之间输入钢筋直径时,我希望圆角可以发生
页:
[1]