lgx9612 发表于 2014-7-17 22:25
知道了,不好意思,可以了,我打开捕捉点,关掉就可以了.
受益非浅,谢谢Gu_xl!!- ;;;经典,费点工夫理解
- (SETQ lst
- (mapcar '(lambda (a b)
- (vlax-curve-getClosestPointToProjection curve a b t))
- (list p1 p2 p3 p4)
- '((1.0 0 0) (0 -1.0 0) (-1.0 0 0) (0 1.0 0))
- )
- )
- ;;;按我的思路如果罗嗦成下面这样,我就很容易理解了。
- (setq p1 (vlax-curve-getClosestPointToProjection curve p1 (list 1.0 0 0) t))
- (setq p2 (vlax-curve-getClosestPointToProjection curve p2 (list 0 -1.0 0) t))
- (setq p3 (vlax-curve-getClosestPointToProjection curve p3 (list -1.0 0 0) t))
- (setq p4 (vlax-curve-getClosestPointToProjection curve p4 (list 0 1.0 0) t))
- (SETQ lst (list p1 p2 p3 p4))
- (vla-GetBoundingBox obj 'p1 'p3);;确保这个函数能够包容整个曲线,如果不能就会出错,
- ;;曾经我遇到几个spline线就是不能全包住,就是ug转图的,我现在不能确认是不像刚才一样打开
- ;;捕捉点了
|