明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 825|回复: 0

请教一个画圆的问题

[复制链接]
明经网友  发表于 2009-10-8 17:45:00 |阅读模式

我做了一个简单的画圆程序 不知道怎么回事无法实现 ,请高手帮忙看看问题出在哪啊。

LISP程序

(defun c:rect()
 (setq dcl_id (load_dialog "circle"))
 (new_dialog "rect" dcl_id)
 (action_tile "accept" "(sae_alue)")
 (start_dialog) (unload_dialog dcl_id)
)
(defun c:yuan()
 (setq pt (getpoint "输入圆心坐标:"))
 (setq r (getreal "输入半径"))
 (command "circle" pt r )
)
(defun sae_alue ()
 (setq r (atof (get_tile "react_h"))
 (setq pt (atof (get_tile "react_w"))
 (done_dialog)
)

DCL程序

rect:dialog
{ label="画圆程序" ;
:edit_box
{ label="输入圆心 : " ;
key="rect_w" ;
edit_limit=16;
edit_width=20;
fixed_width=true;
}
:edit_box
{ label="输入半径 :" ;
key="rect_h" ;
edit_limit=16;
edit_width=20;
fixed_width=true;
}
ok_cancel;
}

回复

使用道具

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

本版积分规则

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

GMT+8, 2024-10-1 15:12 , Processed in 0.169306 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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