序列圆的帮助。
问候语。我一直在做一些非常简单的例行程序。
其中一个用于绘制具有半径增量值的圆序列和z坐标。
不幸的是,在我无法理解(我仍然是基本的)的情况下,例程有时可以正常工作,而不是其他人,绘制圆,但不改变z坐标。
在例行程序希望进行演化以绘制由圆组成的球体之后,但我知道,在这里,要求很复杂,因为每个圆的半径都有一个适当的值。
谢谢你的帮助。
;;v1
(defun c:scir ()
(setq pnt1 (getpoint "\n Sets center point of 1s circle:"))
(setq rcir (getreal "\n Sets the radius of circle:"))
(setq rinc (getreal "\n Sets a radius increment:"))
(setq incz (getreal "\n Sets z coord increment:"))
(setq ncir (getint "\n Sets n of circles:"))
(repeat ncir
(command "circle" pnt1 rcir)
(setq xpnt1 (car pnt1))
(setq ypnt1 (cadr pnt1))
(setq zpnt1 (+(caddr pnt1)incz))
(setq pnt1 (list xpnt1 ypnt1 zpnt1))
(setq rcir (+ rcir rinc))
);repeat
(princ)
);defun
(prompt "\nType SCIR")
当没有Z增量时,可以激活OSNAP模式-输入中心点时尝试禁用它:
(command "_circle" "_non" pnt1 rcir)
当做
米尔恰 对代码的一些快速修订:
不过,您可能还想考虑使用entmake来完成此任务以提高性能,因为创建简单实体(例如圆/线)相对容易,例如:
当然,这个简单的例子并不能说明UCS的变化 msasu:坦克求救
李:一如既往,太棒了。坦克! 不客气!
页:
[1]