明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1218|回复: 1

用程序画曲线的问题

[复制链接]
发表于 2006-11-15 10:59 | 显示全部楼层 |阅读模式

我LISP代码如下:

(defun c:p_w_x(/ a b c x0 x1 x2 y1 y2 p1 p2)
  (setq a 10)
  (setq b 20)
  (setq c 30)
  (setq x0 (/ (- 0 b) (* 2 a)))
  (setq x1 (- x0 0.2))
  (while (<= x1 (+ x0 0.2))
    (setq h 0.002)
    (setq x1 (+ x1 h))
    (setq y1 (+ (* a x1 x1) (* b x1) c))
    (setq x2 (+ x1 h))
    (setq y2 (+ (* a x2 x2) (* b x2) c))
    (setq p1 (list x1 y1))
    (setq p2 (list x2 y2))
    (command "line" p1 p2 "")
    )
  (setq zx0 (- x0 0.4)
 zy0 (- (+ (* a x1 x1) (* b x1) c) 0.5)
 zx1 (+ zx0 0.7)
 zy1 (+ zy0 0.7))
  (setq pz0 (list zx0 zy0)
 pz1 (list zx0 zy1)
 pz2 (list zx1 zy0)
     )
  (command "layer" "m" 1 "c" 1 "" "")
  (command "qleader" pz1 pz0 "" \e)
  (command "layer" "m" 2 "c" 6 "" "")
  (command "qleader" pz2 pz0 "" \e)
  (command "layer" "m" 0 "on" "" "")
  )

但是在COMMAD命令状态下调用时就是显示不出抛物线和坐标系!

请问是什么原因??请速告诉我!

发表于 2006-11-15 13:05 | 显示全部楼层

1、画得太小了。

2、将捕捉关掉。

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

本版积分规则

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

GMT+8, 2024-5-10 05:26 , Processed in 0.130945 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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