lei6699 发表于 2004-3-24 14:22:00

[分享]-array中,用ucs进行有角度阵列

可是有点小缺憾,几何计算器cal,中的ptl命令怎么用?


求1/4点的时候我用了2句,有点麻烦



(Defun C:loadq ( / pt1 pt2 pt0 pt3 pt4 pt5 pt6 qh qle qan n ent )<BR>       (setvar "cmdecho" 1)<BR>       (command "layer" "m" "loadq" "C" 2 "loadq" "")<BR>       (command "linetype" "S" "BYLAYER" "")<BR>       (setq pt1 (getpoint "均布荷载起点a:"))<BR>       (setq pt2 (getpoint pt1 "\n均布荷载终点:"))<BR>       (setq pt0 (getpoint pt2 "\n均布荷载高度h:"))<BR>       (setq qh (distance pt2 pt0))<BR>       (setq qan (angle pt1 pt2))<BR>       (setq pt3 (polar pt2 (+ qan (/ pi 2)) qh))<BR>       (setq pt4 (polar pt1 (+ qan (/ pi 2)) qh))<BR>       (command "_.pline" pt1 "w" 0 0 pt4 pt3 pt2 "c")<BR>       (setq qlen (distance pt1 pt2))<BR>       (setq n (fix (/ qlen qh)))<BR>       (if (&lt; n 6)<BR>                       (setq n 6)<BR>       )<BR><FONT color=#ff0000>       (if (null cal)(arxload"geomcal"))<BR>       (setq pt5 (c:cal "(pt1 + pt4) / 2"))<BR>       (setq pt6 (c:cal "(pt1 + pt5) / 2"))</FONT><BR>       (command "_.pline" pt1 "w" 0 (/ qh 8) pt6 "w" 0 0 pt4 "")<BR>       (setq ent (entlast))<BR>       (command "_.ucs" "n" "3" pt1 pt2 pt3)<BR>       (command "array" ent "" "" "" (+ n 1) (/ qlen n)<BR>       (command "_.ucs" "w" )<BR>       )<BR>)
页: [1]
查看完整版本: [分享]-array中,用ucs进行有角度阵列