明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1534|回复: 7

各位幫忙一下!

[复制链接]
发表于 2004-9-2 13:42:00 | 显示全部楼层 |阅读模式
我的程序哪出错了,灰色(;后串)为问题所在点,帮忙一下,小弟功力尚浅,不知道为何出错? ;已知:圆心o,同心圆直径d1 d2 d3 ,
;求做:同心圆及中心线,标注,
(defun c:txy (/ o d1 d2 d3 f r1)
(graphscr)
(setvar "cmdecho" 0)
(setq o (getpoint "\nenter center of circle:"))
(initget 7)
(setq d1 (getdist "\nenter the first circle diameter:"))
(setq d2 (getdist "\nenter the second circle diameter:"))
(setq d3 (getdist "\nenter the third circle diameter:"))
(command "layer" "make" "xx" "color" "2" "xx" "")
;(command "layer" "ltype" "continuous" "")
(command "circle" o "d" d1)
(command "circle" o "d" d2)
(command "circle" o "d" d3)
(if (>= d1 d2)
(setq f d1)
(setq f d2)
)
(if (< f d3)
(setq f d3)
)
(command "layer" "make" "center" "color" "1" "center" "")
; (command "layer" "ltype" "center" "")
(setq x (car o))
(setq y (cadr o))
(setq y1 (- y f))
(setq y2 (+ y f))
(setq x1 (- x f))
(setq x2 (+ x f))
(setq p1 (list x y1 ))
(setq p2 (list x y2 ))
(setq p3 (list x1 y ))
(setq p4 (list x2 y ))
(command "line" p1 p2 "")
(command "line" p3 p4 "")
;(command "dimdiameter" d1 "")
(setvar "cmdecho" 1)
(princ)
)
发表于 2004-9-2 13:53:00 | 显示全部楼层
程序可以运行. 不太了解你要解决的问题目的. 可能你没有在程序加上设计OSSNAP为0 所以有会会出少少的错误吧.
 楼主| 发表于 2004-9-2 14:01:00 | 显示全部楼层
 楼主| 发表于 2004-9-2 14:11:00 | 显示全部楼层
编一程:(1):以O为圆心,D1.D2,D3为直径三同心圆;圆要在xx层;(2)并且画出圆的中心线,中心线在CENTER,线型:"center";(3)标注同心圆


 谢谢!
 楼主| 发表于 2004-9-2 14:18:00 | 显示全部楼层
我想要:XX图层线型为"continuous";CENTER图层的线型为“"center".但是程序总是出错
发表于 2004-9-2 15:12:00 | 显示全部楼层
(command "layer" "make" "center" "color" "1" "center" "") (command "-linetype" "l" "center" "" "") (command "layer" "ltype" "center" "" "")

 楼主| 发表于 2004-9-3 08:54:00 | 显示全部楼层
如何在一个圆上标注尺寸:( command "dimdiameter " .........),好象有问题。
发表于 2004-9-3 09:18:00 | 显示全部楼层
已经回了,看前面的帖子。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-30 18:37 , Processed in 0.202054 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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