- 积分
- 1438
- 明经币
- 个
- 注册时间
- 2004-1-4
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
陈老师,
我做到这步就做不下去了,向您请教。运行时,几个command命令之间,不连贯;在获取剖面线那一步,我用了repeat,但不知为什么运行时总是说 <Selection set: 30> 0 ; error: bad argument type: consp <Entity name: 4007a408>
另外,您有办法将得到的新长度平分给剖面线的两个端点,再将点联成线,成为新的边界曲线吗?非常感谢!
(Defun bl (l ll) (vl-load-com) (setq a (getpoint "\n internal point:")) (setq p (getpoint "\n base point:")) (command "-boundary" a "") (command "move" "l" "" p) (command "color" 9) (command "hatch" "u" 0 0.1 "n") (command "explode" "L" "") mission is get the lengh of lines,bring into nonlinear function. (vl-load-com) (setq ss (ssget "x" '((62 . 9)))) (setq i 0) (repeat (sslength ss) (setq ent (ssname ss i)) (setq ens (vlax-Ename->Vla-Object (car ent))) (setq l (vlax-curve-getdistatparam ens (vlax-curve-getendparam ens ))) (alert (strcat "Length = " (rtos l))) (setq ll (+ (EXPT l 3.0) l 1.0)) (entdel ent) (setq i (1+ i)) )
从这步以下,还没检查。 (set dx(/(l'-l) 2))
(setq pt1x (cdr (assoc 10 l))) (setq pt1y (cdr (assoc 20 l))) (setq pt2x (cdr (assoc 11 l))) (setq pt2y (cdr (assoc 21 l))) (set ncl(list (- pt1x dx))) (set ncr(list (+ pt2x dx)));change the x coordinates of start and end points,but how to put back to points?
)
|
|