Author Topic: Why don't return 0.579176?  (Read 1903 times)

0 Members and 1 Guest are viewing this topic.

2e4lite

  • Guest
Why don't return 0.579176?
« on: August 23, 2014, 04:07:35 AM »
As following:
Code: [Select]
(vlax-curve-getParamAtPoint obj '(269.17 53.9658 0.0))return: nil

Code: [Select]
_$ p0
(269.17 53.9658 0.0)
_$ (vlax-curve-getParamAtPoint obj p0)
0.579176
     

Stefan

  • Bull Frog
  • Posts: 319
  • The most I miss IRL is the Undo button
Re: Why don't return 0.579176?
« Reply #1 on: August 23, 2014, 04:36:44 AM »
The numbers in the list are truncated.
Try
Code: [Select]
(equal p0 '(269.17 53.9658 0.0))
To see the differences, try
Code: [Select]
(mapcar '(lambda (x) (rtos x 2 16)) p0)
(mapcar '(lambda (x) (rtos x 2 16)) '(269.17 53.9658 0.0))

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Why don't return 0.579176?
« Reply #2 on: August 23, 2014, 11:28:47 AM »
Try this:
Code - Auto/Visual Lisp: [Select]
  1. (vlax-curve-getParamAtPoint obj  (vlax-curve-getClosestPointTo obj '(269.17 53.9658 0.0)))
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

2e4lite

  • Guest
Re: Why don't return 0.579176?
« Reply #3 on: August 23, 2014, 09:15:29 PM »
Very thanks for your helpful reply!