Lee Mac Posted May 4, 2009 Posted May 4, 2009 I seem to be having a problem with splines when using vlax-curve-GetPointAtDist, as it doesn't ever return nil when it has reached the end of the spline - it will just return a constant point which lies some way off the spline. I wondered if anyone else suffered with this issue? And if they found a way to fix it? My question is in reference to this thread: http://www.cadtutor.net/forum/showthread.php?t=35741 I had to use a work-around which was far from ideal... Cheers Lee Quote
Lee Mac Posted May 19, 2009 Author Posted May 19, 2009 Has no-one else ever encountered this issue? Quote
CAB Posted May 19, 2009 Posted May 19, 2009 Perhaps a test to prevent this incorrect distance? (setq MaxDist (vlax-curve-getdistatparam curve-obj (vlax-curve-getendparam curve-obj))) (<loop> (if (<= Dist MaxDist) (<do your thing>) BTW how are you getting the color codeing in your posted code? I seem to remember a post about that but my memory is going. Quote
Lee Mac Posted May 20, 2009 Author Posted May 20, 2009 Perhaps a test to prevent this incorrect distance? (setq MaxDist (vlax-curve-getdistatparam curve-obj (vlax-curve-getendparam curve-obj))) (<loop> (if (<= Dist MaxDist) (<do your thing>) Thanks CAB, I resorted to a test similar to this in fact - but I just wondered why the function would throw up such an error, and keep the loop. - But I suppose its just the stubbornness of Splines. BTW how are you getting the color codeing in your posted code? I seem to remember a post about that but my memory is going. I have modified a LISP posted on here ages ago by David Bethel to incorporate VLIDE colours and add the required tags to the code before posting Quote
CAB Posted May 20, 2009 Posted May 20, 2009 Yes I have experienced the same problem but don't remember which routine I it was that needed corrective code. It would take some research to dig it up so I posted what I remembered as the fix. That too is how I remember it but I can't find the COLOR lisp by David. I'm sure I would have saved it. What is the defun c: ? Quote
Lee Mac Posted May 20, 2009 Author Posted May 20, 2009 I could email the code to you if you wish? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.