明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1702|回复: 6

求助!!!请教三维中的移动

[复制链接]
发表于 2004-3-19 14:40:00 | 显示全部楼层 |阅读模式
我想对三维图形从基点move到我指定的相当位置,可(setq pt2 (command "move" en14 ""))命令好像不起作用,是不是 "@0,0,rr3用错了?请指教!!! (defun c:zxjsg()
(setq rr3 (getreal "\nrr3:"))
(setq pt1 (getpoint "\npt1:"))
(setq ll1 (getreal "\nll1:"))
(setq ll2 (getreal "\nll2:"))
(setq ww3 (getreal "\nll2:"))
(command "circle" pt1 rr3 "")
(setq en11 (entlast))
(command "circle" pt1 (- rr3 ww3))
(setq en12 (entlast))
(command "extrude" en11 en12 "" ll1 "")
(setq en13 (entlast))
(command "rotate3d" en13 "" "x" pt1 90)
(setq en14 (entlast))
(setq pt2 (command "move" en14 "回复

使用道具 举报

发表于 2004-3-19 15:02:00 | 显示全部楼层
不曉得這個是不是你要的 (setq xxx (strcat "@0,0," (rtos rr3)))
(setq pt2 (command "move" en14 "" pt1 xxx))
 楼主| 发表于 2004-3-19 16:37:00 | 显示全部楼层
非常感谢!!!
 楼主| 发表于 2004-3-19 16:45:00 | 显示全部楼层
命令可以执行完整,但好像没有移动的效果,是不是我写的还有哪里错啦???
发表于 2004-3-19 16:53:00 | 显示全部楼层
(setq pt2 (command "move")....



為何要(setq pt2...


用(command "move")....就好
 楼主| 发表于 2004-3-22 14:08:00 | 显示全部楼层
好像还是不行呀


不知道我写的怎么啦


就是没有发生移动


请指教!!!
发表于 2004-3-22 16:05:00 | 显示全部楼层
"@0,0,rr3"有问题


因为如果你加引号,就是字符串,表示在命令行输入引号内的部分,你想想,如果在命令行输入!0,0,rr3能不出错吗。。。


可以这样写:(strcat "@0,0," (rtos rr3))
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-10-1 19:26 , Processed in 0.177219 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.