;;;===============================================================
;;; 计算最小配筋率[mini_zxpjl].lsp
;;;===============================================================
(apply
	'(lambda( / x )
		(or mai_pile_text
			(not (setq x (mai_panel_search "谜你结构专业设置文件[mini_jiegou_config].lsp")))
			(load x)
		)
	)
	nil
)



(defun c:mini_zxpjl ( / fix_num old_cmd ban_hou pj_area pj_level bh_scale fy nc
					tc3 tc4 tc5 tc6 tc7 tc8 tc9 fd ft fc txts
					)

(defun fix_num ( n )
	(if (wcmatch n "*.*")
		(vl-string-right-trim "." (vl-string-right-trim "0" n))
		n
	)
)
	(mai_start nil)
	(mai_last_com "mini_zxpjl")

	(or mai_zxpjl
		(setq mai_zxpjl (list 100 0 1000 "二级" "C25"))
	)
	(mapcar 'set '(ban_hou pj_area bh_scale pj_level fd) mai_zxpjl)
	(setq
		nc
			(mai_dcl_model1
				(list (list -15))
				0
				"<计算板最小配筋率>"
				(list 1 1 39 0.3 -15 nil nil)
				;(水平个数 垂直个数 单个宽度 单个高度 图像底色 是否带注释 是否带放大图标)
				(list
					""
					(list "计算板厚:" "real" ban_hou)
					(list "单向板配筋面积<求分布筋面积>:" "real" pj_area)
					(list "调整比例:" "real" bh_scale)
					(list "钢筋强度等级:" (list "RADIO" "一级" "二级" "三级" "四级") pj_level)
					(list "混凝土强度等级:" (list "C20" "C25" "C30" "C35" "C40" "C45" "C50" "C55" "C60" "C65" "C70" "C75" "C80") fd)
				)
				nil
				nil
			)
		nc (cadr nc)
	)
	(or nc (exit))
	(setq mai_zxpjl nc)
	(mapcar 'set '(ban_hou pj_area bh_scale pj_level fd ) nc)
	(mapcar
		'set
		'(nc fy na)
		(assoc
			pj_level
			(list
				(list "一级" 210 "130")
				(list "二级" 300 "131")
				(list "三级" 360 "132")
				(list "四级" 360 "134")
			)
		)
	)
	(mapcar
		'set
		'(fd ft fc)
		(assoc
			fd
			(list
				(list "C20" 1.1 0.2)
				(list "C25" 1.27 0.25)
				(list "C30" 1.43 0.25)
				(list "C35" 1.57 0.25)
				(list "C40" 1.71 0.3)
				(list "C45" 1.8 0.3)
				(list "C50" 1.89 0.3)
				(list "C55" 1.96 0.3)
				(list "C60" 2.04 0.35)
				(list "C65" 2.09 0)
				(list "C70" 2.14 0)
				(list "C75" 2.18 0)
				(list "C80" 2.22 0)
			)
		)
	)
	(setq
		tc3 (max (/ (* 45 ft) fy) 0.2)
		tc4 (* tc3 bh_scale ban_hou 0.01)
		tc5 (* 0.15 pj_area)
		tc6 (* 0.0015 bh_scale ban_hou)
		tc5 (max tc5 tc6)
		tc7 (* 0.001 bh_scale ban_hou)
		tc8 (* 0.01 fc bh_scale ban_hou)
		tc9 (* 0.0015 bh_scale ban_hou)
		txts
			(list
				(strcat
					"1、输入板厚 = "
					(fix_num (rtos ban_hou 2 3))
					"mm 板最小配筋率 = "
					(fix_num (rtos tc3 2 3))
					"% ，钢筋强度等级："
					nc
					" 砼强度等级："
					fd
				)
				""
				(strcat
					"2、板最小配筋面积 = "
					(rtos tc4 2 0)
					" m㎡/m ，板最小分布筋面积 = "
					(rtos tc5 2 0)
					" m㎡/m"
				)
				""
				(strcat
					"3、板有温度、收缩要求时，跨中分布面面积 = "
					(rtos tc7 2 0)
					" m㎡/m ，人防核爆时最小配筋 = "
					(rtos tc8 2 0)
					" m㎡/m"
				)
				""
				(strcat
					"4、板卧置于地基时最小配筋率 = 0.15% ，板配筋面积 = "
					(rtos tc9 2 0)
					" m㎡/m"
				)
			)
		tc6 (mai_dos_tempfile "txt")
	)
	(mai_write_file tc6 txts)
	(mai_shell_ascii_edit tc6 nil)
	(mai_end)
)
