vlax-curve-getClosestPointTo

(vlax-curve-getClosestPointTo ename point [extension_flag])

The vlax-curve-getClosestPointTo function returns the coordinates of the point on a specified entity closest to a specified point.

Arguments

ename specifies an entity to relate to.

point specifies specifies the point from which to search as a list of three floating-point numbers representing the WCS coordinates of that point.

extension_flag is a flag. If specified and not nil, the function extends the entity when searching for the nearest point.

Return Value

The function returns the point on the specified entity nearest to the specified point as a list of three floating-point numbers representing the WCS coordinates of the calculated point. If the function fails, it returns nil.

Example

: (setq pt '(6.0 0.5 0.0))

(6 0.5 0)

: (setq en (entlast))

<EName:  055d4b60>

: (vlax-curve-getClosestPointTo en pt)

(6.0 1.5 0.0)