;; | ---------------------------------------------------------------------------- ;; | MI_IsPointOnCurve ;; | ---------------------------------------------------------------------------- ;; | Function : Determines if the two points are on a curved path along a curve ;; | or not. ;; | Arguments: 'ename' - Name of the curve object along which to check ;; | 'pt' - First point on curve to check ;; | 'SamplingInt' - Sampling Interval ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun MI_IsPointOnCurve ( ename pt SamplingInt / OnCurve oname param1 param2 d fd1 fd2 ) (setq OnCurve nil oname (vlax-ename->vla-object ename) param1 (vlax-curve-getParamAtPoint oname pt) ) (if param1 (progn (setq fd1 (vlax-curve-getFirstDeriv oname param1)) (if fd1 (progn (setq d (vlax-curve-getDistAtParam oname param1)) (if d (progn (setq d (+ d SamplingInt) param2 (vlax-curve-getParamAtDist oname d) ) (if param2 (progn (setq fd2 (vlax-curve-getFirstDeriv oname param2)) (if fd2 (progn (if (not (equal fd1 fd2)) (setq OnCurve T) ) )) )) )) )) )) (vlax-release-object oname) OnCurve )