明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: wei186

[LISP] array后如何选择画出的图形???

  [复制链接]
 楼主| 发表于 2004-3-31 14:49:00 | 显示全部楼层
(defun c:bsg()
(setq pt00 (getpoint "\npt00:"))
(setq pt01 (polar pt00 (/ pi 2) 6310))
(setq pt1 (polar pt00 (/ pi 2) 5000))
(setq pt2 (polar pt1 (* (/ pi 2) 3) 850))
(setq pt3 (polar pt1 (/ pi 2) 200))
(setq pt4 (polar pt3 (/ pi 2) 300))
(setq pt6 (polar pt3 pi 850))
(setq pt5 (polar pt4 pi 850))
(command "line" pt3 pt4 "")
(setq zx1 (entlast))
(command "line" pt4 pt5 "")
(setq zx2 (entlast))
(command "line" pt5 pt6 "")
(setq zx3 (entlast))
(command "line" pt6 pt3 "")
(setq zx4 (entlast))
(command "pedit" zx1 "" "j" zx1 zx2 zx3 zx4 "" "")
(setq zx (entlast))
(command "revolve" zx "" pt1 pt2 "")
(command "circle" pt1 850 "")
(setq en1 (entlast))
(command "extrude" en1 "" 200 "")
(setq en1 (entlast))
(command "circle" pt1 800 "")
(setq en2 (entlast))
(command "extrude" en2 "" 200 "")
(setq en2 (entlast))
(command "subtract" en1 "" en2 "")
(setq en1 (entlast));
(command "circle" pt1 800 "")
(setq en2 (entlast))
(command "circle" pt1 850 "")
(setq en3 (entlast))
(command "extrude" en2 "" -200 "")
(setq en2 (entlast))
(command "extrude" en3 "" -200 "")
(setq en3 (entlast))
(command "subtract" en3 "" en2 "")
(setq en2 (entlast))
(command "union" en1 en2 "")
(setq en1 (entlast));
(command "circle" pt2 100 "")
(setq en4 (entlast))
(command "extrude" en4 "" 100 "")
(setq en4 (entlast))
(command "rotate3d" en4 "" "x" pt2 -90 "")
(setq en4 (entlast))
(command "intersect" en4 en1 "")
(setq en4 (entlast))
(command "array" en4 "" "p" pt1 5 360 "y")
(setq en41 (entnext en4))
(setq en42 (entnext en41))
(setq en43 (entnext en42))
(setq en44 (entnext en43))
(command "union" en4 en41 en42 en43 en44 "")
(setq en4 (entlast))
(command "circle" pt1 850 "")
(setq en1 (entlast))
(command "extrude" en1 "" 200 "")
(setq en1 (entlast))
(command "circle" pt1 800 "")
(setq en2 (entlast))
(command "extrude" en2 "" 200 "")
(setq en2 (entlast))
(command "subtract" en1 "" en2 "")
(setq en1 (entlast));
(command "circle" pt1 800 "")
(setq en2 (entlast))
(command "circle" pt1 850 "")
(setq en3 (entlast))
(command "extrude" en2 "" -200 "")
(setq en2 (entlast))
(command "extrude" en3 "" -200 "")
(setq en3 (entlast))
(command "subtract" en3 "" en2 "")
(setq en2 (entlast))
(command "union" en1 en2 "")
(setq en1 (entlast))
(command "subtract" en1 "" en4 "")
(setq en1 (entlast))
(command "rotate3d" en1 "" "x" pt1 90)
(prin1)
) 我最后还是用array画的,但还是想了解3darray如何用好??
发表于 2004-3-31 17:43:00 | 显示全部楼层
如果你说你的程序有问题,你应该给个有问题的程序,我好看问题在哪儿啊。。。你给的这个程序我不知道你想说有什么问题,我执行了,结果如下:(我自己旋转了一下视角,着了一下色),,,另外,再仔细看一下7楼和8楼。。。


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-27 22:30 , Processed in 0.159808 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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