在autolisp中,遇到这样的提示“错误: 参数类型错误: 二维/三维点: nil” 10
初学autolisp,在尝试写一个简单的调用粗糙度的小程序,但是一直提示说:错误:参数类型错误:二维/三维点:nil在此求助,感激不尽。下面是源程序:(defunc:cc...
初学autolisp,在尝试写一个简单的调用粗糙度的小程序,但是一直提示说:错误: 参数类型错误: 二维/三维点: nil
在此求助,感激不尽。下面是源程序:
(defun c:ccd(/ pa pb pc pd pm)
(setvar "cmdecho" 0)(setvar "blipmode" 0)
(setq pm 6)(setq pa (getpoint "指定插入点:"))
(setq pb (polar pa(/pi 3) pm))
(setq pc (polar pb(/pi 3) pm))
(setq pd (polar pb (pi) pm))
(command "line" pa pc "")
(command "line" pa pd "")
(command "line" pb pd "")
(prin1)
)
(prin1) 展开
在此求助,感激不尽。下面是源程序:
(defun c:ccd(/ pa pb pc pd pm)
(setvar "cmdecho" 0)(setvar "blipmode" 0)
(setq pm 6)(setq pa (getpoint "指定插入点:"))
(setq pb (polar pa(/pi 3) pm))
(setq pc (polar pb(/pi 3) pm))
(setq pd (polar pb (pi) pm))
(command "line" pa pc "")
(command "line" pa pd "")
(command "line" pb pd "")
(prin1)
)
(prin1) 展开
展开全部
可以设断点追踪各参数的数,看看是不是你要的结果,以下这3行很明显格式都不一样啊:
(setq pb (polar pa(/pi 3) pm))
(setq pc (polar pb(/pi 3) pm))
(setq pd (polar pb (pi) pm))
(setq pb (polar pa(/pi 3) pm))
(setq pc (polar pb(/pi 3) pm))
(setq pd (polar pb (pi) pm))
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
(defun c:test (/ pa pb pc pd pm)
(setvar "cmdecho" 0)
(setvar "blipmode" 0)
(setq os (getvar "osmode"))
(setq pm 6)
(setq pa (getpoint "\n指定插入点:"))
(setq pb (polar pa (/ pi 3) pm))
(setq pc (polar pb (/ pi 3) pm))
(setq pd (polar pb pi pm))
(setvar "osmode" 0)
(command "line" pa pc "")
(command "line" pa pd "")
(command "line" pb pd "")
(setvar "osmode" os)
(prin1)
)
(setvar "cmdecho" 0)
(setvar "blipmode" 0)
(setq os (getvar "osmode"))
(setq pm 6)
(setq pa (getpoint "\n指定插入点:"))
(setq pb (polar pa (/ pi 3) pm))
(setq pc (polar pb (/ pi 3) pm))
(setq pd (polar pb pi pm))
(setvar "osmode" 0)
(command "line" pa pc "")
(command "line" pa pd "")
(command "line" pb pd "")
(setvar "osmode" os)
(prin1)
)
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询