为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

错误 参数类型错误

2017-09-19 3页 doc 17KB 47阅读

用户头像

is_266065

暂无简介

举报
错误 参数类型错误                  错误 参数类型错误 当我运行程序后,输入插入点,提示:错误:参数类型错误:numberp: nil 为什么? 我用autolisp编制绘向心球轴承的二维图形,程序如下: (defun c:zch1 (/ p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 pc1 pc2 a fx1 fx2 t1 ) (setq d (getreal"\n 输入轴承外径")) (setq d1 (getreal"\n 输入轴承内径")) (set...
错误 参数类型错误
                  错误 参数类型错误 当我运行程序后,输入插入点,提示:错误:参数类型错误:numberp: nil 为什么? 我用autolisp编制绘向心球轴承的二维图形,程序如下: (defun c:zch1 (/ p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 pc1 pc2 a fx1 fx2 t1 ) (setq d (getreal"\n 输入轴承外径")) (setq d1 (getreal"\n 输入轴承内径")) (setq b (getreal"\n 输入轴承宽度")) (if (> d 40) (setq t1 1.5) ;t1为绘制刨面线的线间距比例因子 (setq t2 0.7) ) (setq a (/ (- d d1) 2.0) ) ;计算三个中间参数值 (setq fx1 (/ pi 2)) (setq fx2 (/ (* 3 pi) 2)) ) (setq p0 (getpoint"\n 输入图形插入点:")) (setq p1 (polar p0 fx1 (/ d 2.0))) (setq p2 (polar p1 0 b)) (setq pc1 (list (+ (car p0) (/ b 2.0)) (+ (cadr p0) (/ (- d a) 2.0)))) (setq pc2 (polar pc1 fx2 (- d a))) (setq p9 (polar pc1 (/ (* pi 11) 6) (/ a 4))) (setq p8 (polar pc1 (/ (* pi 7) 6) (/ a 4))) (setq p4 (polar pc1 (/ pi 6) (/ a 4))) (setq p5 (polar pc1 (/ (* pi 5) 6) (/ a 4))) (setq p3 (list (car p2) (cadr p4))) (setq p6 (list (car p1) (cadr p5))) (setq p7 (list (car p1) (cadr p8))) (setq p10 (list (car p2) (cadr p9))) (setq p11 (polar p2 fx2 a)) (setq p12 (polar p1 fx2 a)) (setq p13 (polar p0 fx2 (/ d1 2.0))) (setq p14 (polar p13 0 b)) (setq p15 (polar p2 fx2 (/ d 2.0))) (setq p16 (polar p15 0 b)) (nlayer) ;调用层设置函数 (command "zoom" "w" (polar p1 fx1 10) (polar p16 fx2 10)) (command "layer" "s" 1 "") ;绘制轴承的上半部分 (command "pline" p1 p2 p3 p4 "") (command "arc" p4 "ce" pc1 "a" 120) (command "pline" p5 p6 p1 "") (command "pline" p6 p7 p8 "") (command "arc" p8 "ce" pc1 "a" 120) (command "pline" p9 p10 p11 p12 p7 "") (command "pline" p3 p10 "") (command "arc" p9 "ce" pc1 p4) (command "arc" p5 "ce" pc1 p8) (command "mirror" "w" p1 p11 "" p0 (polar p0 0 b) "") ;镜像绘制轴承的下半部分 (command "pline" p12 p13 "") (command "pline" p11 p14 "") (command "layer" "s" 0 "") (command "hatch" "ansi31" t1 "0" "w" p1 p3 "") ;绘制剖面线 (command "hatch" "ansi31" t1 "90" "w" p7 p11 "") (command "hatch" "ansi31" t1 "90" "w" p13 (polar p16 fx1 (/ a 2)) "") (command "hatch" "ansi31" t1 "0" "w" p15 (polar p16 fx1 (/ a 2)) "") (command "layer" "s" 3 "") (command "pline" (polar p0 pi 2) (polar p0 0 (+ b 2)) "") ;绘制轴承中心线 (command "pline" (polar pc1 fx1 (* 1.2 (/ a 4.0))) ;绘制滚珠中心线 (polar pc1 fx2 (* 1.2 (/ a 4.0))) "") (command "pline" (polar pc1 pi (* 1.2 (/ a 4.0))) (polar pc1 0 (* 1.2 (/ a 4.0))) "") (command "pline" (polar pc2 fx1 (* 1.2 (/ a 4.0))) (polar pc2 fx2 (* 1.2 (/ a 4.0))) "") (command "pline" (polar pc1 pi (* 1.2 (/ a 4.0))) (polar pc2 0 (* 1.2 (/ a 4.0))) "") (command "zoom" "a") (command "regen") ) (defun nlayer () (command "layer" "n" 1 "c" 1 1 "1" "continuous" 1 "") (command "layer" "n" 2 "c" 2 2 "1" "dashed" 2 "") (command "layer" "n" 3 "c" 3 3 "1" "center2" 3 "") (command "layer" "n" 4 "c" 4 4 "1" "divide2" 4 "") )
/
本文档为【错误 参数类型错误】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索