明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

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

我是新手,求助入门

  [复制链接]
 楼主| 发表于 2004-4-27 13:17:00 | 显示全部楼层
我在书上找到另一种写法。我也不是很懂。



(defun C:Star()


                 (initget 1)


         (setq Center(getpoint"星的中心:"))


         (initget(+ 1 2 4))


                (setq OutRad (getdist"外圆半径:"Center))


         (initget(+1 2 4))


         (setq InRad (getdist"内圆半径:"Center))


         (initget(+1 2 4))


         (setq Points(getint"角点数:"))


        )


(setq Incr (/(* 2 pi) Points))


(setq Incr2 (/Incr2))


(command "LINE")


(setq Count 0)


(while (<Count Points)


                         (command (polar Center (* Count Incr ) OutRad))


                         (if (=Count 0)


                                                                 (command "width" "0" "0"))


                         (command (polar Center (+(* Count Incr)Incr2) inRad))


                         (setq Count (1+count ))


)


(command "close")


(princ)


)


修改稿
 楼主| 发表于 2004-4-27 16:06:00 | 显示全部楼层
(if (=Count 0)
                                                                 (command "width" "0" "0"))是什么意思啊?特别是"width" "0" "0"是什么参数呢?
 楼主| 发表于 2004-4-27 20:59:00 | 显示全部楼层
我还有一个问题,关于六楼的图。圆环里面套小圆,那些小圆是不能相交的,怎么样才能确保小圆不相交,用什么条件呢?真正的轴承是怎样的呢?


救命啊,各位大哥。!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-10-1 12:55 , Processed in 0.149484 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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