;+++++++++++++++++++++++++++++++++++++
;+  已知箍筋总面积求根数、直径及间距[mini_rein_cale4]  +
;+++++++++++++++++++++++++++++++++++++

(apply
	'(lambda( / x )
		(or mai_pile_text
			(not (setq x (mai_panel_search "谜你结构专业设置文件[mini_jiegou_config].lsp")))
			(load x)
		)
	)
	nil
)

(defun c:mini_rein_cale4 ( / old_cmd as bar shear_as)

(defun shear_as ( as bar / ty d leg dd)
	(setq
		ty (if (= bar 1) "R" "T")
		d (if (= bar 1) 6 10)
		leg 0
		dd 0
	)
	(while (< dd 100)
		(setq
			leg (+ leg 2)
			dd (* (fix (/ (* pi d d 250. leg) as)) 10)
		)
	)
	(princ (strcat "\n   " ty (itoa d) "@" (itoa dd) "(" (itoa leg) ")"))
	(while (< d (if (= bar 1) 10 14))
		(setq
			d (+ d 2)
			dd 0
			leg (if (= bar 1) (- leg 2) 0)
		)
		(while (< dd 100)
			(setq
				leg (+ leg 2)
				dd (* (fix (/ (* pi d d 250. leg) as)) 10)
			)
		) ;while end
		(princ (strcat "   " ty (itoa d) "@" (itoa dd) "(" (itoa leg) ")"))
	) ;while end
	(princ)
) ;defun shear_as end


	(mini_start nil)
	(mai_last_com "mini_rein_cale4")
	(princ "\n已知箍筋总面积求根数、直径及间距")
	(setq
		as (getint "\n   箍筋等级:<1>")
		bar (if as as 1)
		as (getreal "\n   箍筋总面积<mm2/m>=")
	)
	(if as (shear_as as bar))
	(mai_end)
) ;defun c:a4 end
