明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1810|回复: 0

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

[复制链接]
发表于 2004-3-24 14:22:00 | 显示全部楼层 |阅读模式
可是有点小缺憾,几何计算器cal,中的ptl命令怎么用? 求1/4点的时候我用了2句,有点麻烦 (Defun C:loadq ( / pt1 pt2 pt0 pt3 pt4 pt5 pt6 qh qle qan n ent )
(setvar "cmdecho" 1)
(command "layer" "m" "loadq" "C" 2 "loadq" "")
(command "linetype" "S" "BYLAYER" "")
(setq pt1 (getpoint "均布荷载起点a:"))
(setq pt2 (getpoint pt1 "\n均布荷载终点:"))
(setq pt0 (getpoint pt2 "\n均布荷载高度h:"))
(setq qh (distance pt2 pt0))
(setq qan (angle pt1 pt2))
(setq pt3 (polar pt2 (+ qan (/ pi 2)) qh))
(setq pt4 (polar pt1 (+ qan (/ pi 2)) qh))
(command "_.pline" pt1 "w" 0 0 pt4 pt3 pt2 "c")
(setq qlen (distance pt1 pt2))
(setq n (fix (/ qlen qh)))
(if (< n 6)
(setq n 6)
)
(if (null cal)(arxload"geomcal"))
(setq pt5 (c:cal "(pt1 + pt4) / 2"))
(setq pt6 (c:cal "(pt1 + pt5) / 2"))

(command "_.pline" pt1 "w" 0 (/ qh 8) pt6 "w" 0 0 pt4 "")
(setq ent (entlast))
(command "_.ucs" "n" "3" pt1 pt2 pt3)
(command "array" ent "" "" "" (+ n 1) (/ qlen n)
(command "_.ucs" "w" )
)
)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-27 23:41 , Processed in 0.155453 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表