Precision of polyline

Bill Barrows

Usenet Archive
Joined
Mar 5, 2001
Messages
8
Reaction score
0
How can I change the precision I am getting from the polyline entity list?
(Acad 2000i)

I setvar luprec to 8, but when I use:
(setq en (car (entsel "\nSelect polyline: ")))
(setq el (entget en))
The first vertex has only 4 decimal places. (10 0.0 12.6346)

When I list the polyline the same vertex is at:
at point X=0.00000000 Y=12.63464111 Z=0.00000000

Thanks,
Bill
 
Try this on a LWPOLYLINE

(setq en (car (entsel "\nSelect polyline: ")))
(setq el (entget en))
(setq v (cdr (assoc 10 el)))
(setq vx (rtos (car v) 2 16)
vy (rtos (cadr v) 2 16))
(alert (strcat "X = " vx "\nY = " vy))

Hint: The values you see are rounded, use (rtos) to see complete value.
 
The precision is there. AutoCAD just doesn't display it.

Try (rtos (caddr "firstvertexvar")) 2 22)
and it should read "12.6346411100000000000000"

Bill
 
Interesting, I'm not sure how you are getting 22 decimal places, since there are only 15 significant digits available.

(rtos 1 2 22) = "1.000000000000000"
 
Must have one of the new CPU's (128 bit). ?
Couldn't resist.
 
Okay wise guys.

(setq e 1e-122)

(rtos e 2 22)

"0.0000000000000000000000"

Works for me.

Bill
 

Latest threads

Back
Top