Author Topic: Getpoint Precision.  (Read 7450 times)

0 Members and 1 Guest are viewing this topic.

Didge

  • Bull Frog
  • Posts: 211
Getpoint Precision.
« on: February 22, 2006, 09:57:39 AM »
I feel pretty stupid for asking this, I suspect this'll lead to one of those "DOH!!-slap head" moments.

Anyway, I have a Map3D 2006 dwg that refuses to return accurate (getpoint) coords.  It does it's thing as usual but rounds the returned coords up or down to the nearest unit.  It appears to be 'dwg' specific so Im guessing it's a system variable issue.

I've checked through the usual tweaks such as  Dimzin, Lunits, luprec, Unitmode, -dwgunits  but no joy. 

Am I missing something blindingly obvious? :oops:

I forgot to mention, everything seems to work fine in paper space.
Think Slow......

LE

  • Guest
Re: Getpoint Precision.
« Reply #1 on: February 22, 2006, 10:10:58 AM »
Are you simple calling something like:

Code: [Select]
(setq pt (getpoint "\nPick a point: "))

?

I do not have A2006.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Getpoint Precision.
« Reply #2 on: February 22, 2006, 10:15:48 AM »
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.

Didge

  • Bull Frog
  • Posts: 211
Re: Getpoint Precision.
« Reply #3 on: February 22, 2006, 10:40:05 AM »
Nothing as extravagent as that LE, just a solitary  (getpoint)  in model space.

Thanks CAB, but nothing in that thread seems to help in this case.

I've attached a 2000 version of the 'dwg' in question, no objects, just an empty dwg.
Think Slow......

LE

  • Guest
Re: Getpoint Precision.
« Reply #4 on: February 22, 2006, 10:54:18 AM »
I tested your drawing... and...
It might be my eyes... but seems that getpoint is returning the right output....

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Getpoint Precision.
« Reply #5 on: February 22, 2006, 10:55:57 AM »
Well the get point returns an accurate number but does not display it.

Code: [Select]
Command: (setq a (getpoint))
(586922.0 191777.0 0.0)

Command: !a
(586922.0 191777.0 0.0)

Command: (- (car a) 586922.0)
0.187917

You see the fraction is there.
That is the nature of ACAD when the numbers get that large.
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.

LE

  • Guest
Re: Getpoint Precision.
« Reply #6 on: February 22, 2006, 11:02:48 AM »
What are you doing with those points?

One way to get more precision is to use:

(setq pt (getpoint "\nPoint: "))
(rtos (car pt) 2 16)
(rtos (cadr pt) 2 16)
(rtos (caddr pt) 2 16)

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Getpoint Precision.
« Reply #7 on: February 22, 2006, 11:06:29 AM »
LE,

Funny you post that...I just put this together:

Code: [Select]
(setq pt (getpoint "\nPick a point: ")
       x (rtos (car pt)2 15)
       y (rtos (cadr pt)2 15)
       z (rtos (caddr pt)2 15)
      pt (list x y z)
)

How would the list be converted back to a usable point and keep the precision?

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Getpoint Precision.
« Reply #8 on: February 22, 2006, 11:10:12 AM »
I have found that the precision is always there, it just doesn't always display right.  What they are showing is a way to SEE it correctly.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Getpoint Precision.
« Reply #9 on: February 22, 2006, 11:28:24 AM »
Quote
Reals
A real is a number containing a decimal point. Numbers between –1 and 1
must contain a leading zero. Real numbers are stored in double-precision
floating-point format, providing at least 14 significant digits of precision
Note that VLISP does not show you all the significant digits.
Reals can be expressed in scientific notation, which has an optional e or E followed
by the exponent of the number (for example, 0.0000041 is the same
as 4.1e-6). Numbers such as 3.1, 0.23, –56.123, and 21,000,000.0 are valid
AutoLISP reals.
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.

LE

  • Guest
Re: Getpoint Precision.
« Reply #10 on: February 22, 2006, 11:30:30 AM »
^
What CAB... found too....

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Getpoint Precision.
« Reply #11 on: February 22, 2006, 11:45:38 AM »
Also read this thread.
http://tinyurl.com/nbzue
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.

Didge

  • Bull Frog
  • Posts: 211
Re: Getpoint Precision.
« Reply #12 on: February 22, 2006, 11:45:55 AM »
The following demonstrates the problem, (not sure how to post an image here)
Notice how 'ID' and 'Getpoint' return different values for the same point. Maybe this is a Map3D issue I'm unfamiliar with.

LINE Specify first point:
Specify next point or [Undo]:
Specify next point or [Undo]:

Command: id
Specify point: _endp of  X = 15024.689     Y = -127900.431     Z = 0.000

Command: (getpoint)
_endp of (15024.7 -127900.0 0.0)
Think Slow......

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Getpoint Precision.
« Reply #13 on: February 22, 2006, 11:48:11 AM »
Try this.
Code: [Select]
(foreach i (getpoint)
 (princ (strcat "\n " (rtos i 2 4)))
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

LE

  • Guest
Re: Getpoint Precision.
« Reply #14 on: February 22, 2006, 11:52:19 AM »
What are you doing with those points?

Update me....  :whistle: