TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Peter2 on August 07, 2017, 04:08:59 AM

Title: (vlax-curve-getpointatparam haupt_achse 0) -> nil?
Post by: Peter2 on August 07, 2017, 04:08:59 AM
I supposed that the "param 0" would return the starting point of my curve - but it returns nil. The end-param (9 in my example) returns the endpoinbt, and the "dist 0" returns also the starting point. Can it be explained why the "start parameter 0" returns nil instead of the starting point???

Code - Auto/Visual Lisp: [Select]
  1. nil
  2.  
  3. Befehl: (vlax-curve-getpointatparam haupt_achse 9)
  4. (811474.0 184382.0 0.0)
  5.  
  6. Befehl: (vlax-curve-getpointatparam haupt_achse 0.000001)
  7. (811350.0 184319.0 0.0)
  8.  
  9. Befehl: (vlax-curve-getpointatdist haupt_achse 0.00000)
  10. (811350.0 184319.0 0.0)
  11.  
Title: Re: (vlax-curve-getpointatparam haupt_achse 0) -> nil?
Post by: roy_043 on August 07, 2017, 04:27:23 AM
Move the object closer to the origin and repeat the test.
Title: Re: (vlax-curve-getpointatparam haupt_achse 0) -> nil?
Post by: Peter2 on August 07, 2017, 04:59:27 AM
Although this could only be an experimental solution - I still get nil
Title: Re: (vlax-curve-getpointatparam haupt_achse 0) -> nil?
Post by: roy_043 on August 07, 2017, 09:12:53 AM
What does this return?:
Code - Auto/Visual Lisp: [Select]
Title: Re: (vlax-curve-getpointatparam haupt_achse 0) -> nil?
Post by: Peter2 on August 07, 2017, 11:11:35 AM
0.00000000
Title: Re: (vlax-curve-getpointatparam haupt_achse 0) -> nil?
Post by: roy_043 on August 07, 2017, 12:33:59 PM
The issue is of course: Zero? Or almost zero?

But from a discussion with Bricsys I know that the AutoCAD curve functions can produce unexpected results.
I suggest you create a workaround.
Title: Re: (vlax-curve-getpointatparam haupt_achse 0) -> nil?
Post by: Lee Mac on August 07, 2017, 01:05:19 PM
How about:
Code - Auto/Visual Lisp: [Select]
Title: Re: (vlax-curve-getpointatparam haupt_achse 0) -> nil?
Post by: ribarm on August 07, 2017, 01:20:26 PM
Code - Auto/Visual Lisp: [Select]

That's the same as just :

Code - Auto/Visual Lisp: [Select]