明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1182|回复: 1

【求助】填充,不知道哪里用错...谢谢..

[复制链接]
发表于 2005-5-14 21:31:00 | 显示全部楼层 |阅读模式
我写的一个简单的程序,但是无法完成填充,哪位热心人帮我看看好吗?下面的无法展开了,不晓得怎么办了...谢谢 (setq pt0 (getpoint "\n灯杆底部位置:"))
(setq gd (getpoint "\n灯高位置:"))
(setq xx (car pt0) yy (cadr pt0))
(setq xt (car gd) yt (cadr gd))
(setq aa1 (angle pt0 gd))
(setq bb1 (distance pt0 gd))
(setq bb2 (* bb1 (sin aa1)))
(setq bb (/ bb2 18))
(setq xx (car pt0) yy (cadr pt0))
(setq xt (car gd) yt (cadr gd))
(setq aa1 (angle pt0 gd))
(setq bb1 (distance pt0 gd))
(setq bb2 (* bb1 (sin aa1)))
(setq bb (/ bb2 18))
(setq pt1 (list (+ xx (* bb 1)) yy ))
(setq pt2 (list (+ xx (* bb 0.7)) (+ yy (* bb 2.8))))
(setq pt3 (list (car pt2) (+ (* bb 0.9) (cadr pt2))))
(setq pt4 (list (+ xx (* bb 0.35)) (+ (* bb 0.9) (cadr pt3))))
(setq pt5 (list (car pt4) (+ (* bb 10.4) (cadr pt4))))
(setq pt6 (list (+ (car pt5) (* bb 0.1)) (cadr pt5)))
(setq pt7 (list (car pt6) (+ (* bb 1.8) (cadr pt6))))
(setq pt8 (list (- (car pt7) (* bb 0.15)) (+ (cadr pt7) (* bb 0.5))))
(setq pt9 (list xx (cadr pt8)))
(setq pt10 (list (+ (car pt7) (* bb 0.9)) (cadr pt7)))
(setq pt11 (list (+ (car pt10) (* bb 3)) (+ (cadr pt10) (* bb 0.66))))
(setvar "cecolor" (rtos cc1))
(command "line" pt0 pt1 "")
(setq sum (ssadd) first (entlast))
(ssadd (entlast) sum)
(command "arc" pt1 "e" pt2 "a" -31)
(ssadd (entlast) sum)
(command "pline" pt2 pt3 "")
(ssadd (entlast) sum)
(command "arc" pt3 "e" pt4 "a" 118)
(ssadd (entlast) sum)
(command "pline" pt4 pt5 pt6 pt7 "")
(ssadd (entlast) sum)
(command "arc" pt7 "e" pt8 "a" 90)
(ssadd (entlast) sum)
(command "pline" pt8 pt9 "")
(ssadd (entlast) sum)
(command "pline" pt7 pt10 "")
(ssadd (entlast) sum)
(command "arc" pt10 "e" pt11 "a" 160)
(ssadd (entlast) sum)
(command "mirror" sum "" pt0 pt9 "")
(ssadd (entlast) sum)
(setvar "cecolor" (rtos cc1))
(command "hatch" "solid" sum "")
(setq pt12 (polar pt9 (/ pi 2) (* bb 0.3)))
(command "pline" pt9 "w" 3 0 pt12 "")
 楼主| 发表于 2005-5-14 21:41:00 | 显示全部楼层
我晓得了,在填充命令以前加个(sum_ent)就ok了。。还好。。嘿嘿,解决了


但不懂。。

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

本版积分规则

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

GMT+8, 2024-11-17 06:54 , Processed in 0.167662 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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