John Uhden
Usenet Archive
- Joined
- Jul 3, 2003
- Messages
- 330
- Reaction score
- 0
Okay, the WCS2OCS thing is hopefully working, BUT:
I still have this annoying problem with the fact that the (xentselx) functions return the pick point without any meaningful Z value. I've complained about this before. Suppose you want to pick a segment of a 3DPolyline (nested or not). An (osnap pt "_quick,_near") might find a point on another nearby object. A (vlax-curve-getclosestpointto) might find a different segment because the distance is affected by the Z values.
Example:
Command: (command "_.3dpoly")(mapcar 'command '((0 0 100)(10 10 110)(20 20 120) "")) _.3dpoly Specify start point of polyline:
Specify endpoint of line or [Undo]:
Specify endpoint of line or [Undo]:
Specify endpoint of line or [Close/Undo]:
Command: (nil nil nil nil)
Command: (setq pick (nentselp '(14.99 15.01)))
(<Entity name: 400b7de8> (14.99 15.01 0.0))
Command: (setq object (vlax-ename->vla-object (entlast))) #<VLA-OBJECT IAcad3DPolyline 025f6904>
Command: (vlax-curve-getclosestpointto object (cadr pick))
(0.0 0.0 100.0)
Anyone care to propose a solution to getting the correct point?
I still have this annoying problem with the fact that the (xentselx) functions return the pick point without any meaningful Z value. I've complained about this before. Suppose you want to pick a segment of a 3DPolyline (nested or not). An (osnap pt "_quick,_near") might find a point on another nearby object. A (vlax-curve-getclosestpointto) might find a different segment because the distance is affected by the Z values.
Example:
Command: (command "_.3dpoly")(mapcar 'command '((0 0 100)(10 10 110)(20 20 120) "")) _.3dpoly Specify start point of polyline:
Specify endpoint of line or [Undo]:
Specify endpoint of line or [Undo]:
Specify endpoint of line or [Close/Undo]:
Command: (nil nil nil nil)
Command: (setq pick (nentselp '(14.99 15.01)))
(<Entity name: 400b7de8> (14.99 15.01 0.0))
Command: (setq object (vlax-ename->vla-object (entlast))) #<VLA-OBJECT IAcad3DPolyline 025f6904>
Command: (vlax-curve-getclosestpointto object (cadr pick))
(0.0 0.0 100.0)
Anyone care to propose a solution to getting the correct point?