 - ;; bzbh(标注板厚) 需要e派工具箱(XCAD)的支持:http://xyp1964.ys168.com
- ;; 板厚以80厚为基础,以递增10变颜色。
- ;; 板厚分别为80~300,板厚不同颜色不同
- (defun c:tt (/ t2 co p0 p1 p2 s1)
- (cmdlasc0)
- (xyp-initSet '(high) '(120))
- (setq high (Uint 7 "" "板厚" high))
- (if (and (<= 80 high 300)
- (= (rem high 10) 0)
- )
- (progn
- (setq t2 (strcat "h=" (itoa high))
- co (/ high 2)
- )
- (while (setq p0 (getpoint "\n请输入标注板厚的中心点: "))
- (setq p1 (polar p0 (* PI 0.5) (* xyp-sc 300))
- p2 (polar p0 0 (* xyp-sc 500))
- s1 (xyp-Text 5 p0 t2)
- )
- (xyp-put "color" s1 co)
- (command "ellipse" "c" p0 p1 p2)
- (xyp-put "color" (entlast) co)
- )
- )
- )
- (cmdla1)
- )
|