-
- (defun tracecurve ( obj di / cycle st )
- (defun cycle ( st stp seg l )
- (cond
- ( (< (+ st seg) stp )
- (cycle (+ seg st) stp seg
- (cons (vlax-curve-getPointAtParam obj st) l)
- )
- )
- ( t
- (and (< st stp)
- (setq l
- (cons (vlax-curve-getPointAtParam obj st) l)
- )
- )
- (reverse
- (cons (vlax-curve-getPointAtParam obj stp) l)
- )
- )
- )
- )
- (if
- (and (not (minusp di))(not (zerop di))
- (vl-position
- (vla-get-objectname
- (cond
- ( (eq 'ENAME (type obj))(vlax-ename->vla-object obj ))
- ( obj )
- )
- ) '("AcDbCircle" "AcDbArc" "AcDbEllipse" "AcDbSpline")
- )
- )
- (cycle
- (setq st (vlax-curve-getStartParam obj))
- (vlax-curve-getEndParam obj)
- (- (vlax-curve-getParamAtDist obj 0.125) st)
- nil
- )
- )
- )
修改李的建议,虽然我不知道为什么他的方式不适合你。
|