# Closest Points

## <img src="/files/FnDkKi7cajuwakmt2RnJ" alt="" data-size="line"> Closest Points

The ClosestPt command creates a point object at the closest point from a specified location to a selected object or on two objects where they are closest to each other.

<div align="left"><img src="/files/WTeMbEKufUpZmhcvHa2c" alt=""></div>

## **Steps**

1. Select the target object or objects.
2. Pick the base point for the closest point calculation.

**Note**

* The closest point on all of the objects is calculated.
* If more than one object is selected, the closest point will appear on only one object. To find the closest point on each object, use the ClosestPt command on each object individually.
* The distance is printed on the command line.

### Command-line options

**Object:**&#x20;

Calculates the closest point between two objects.

**To calculate the closest point to an object**

* Select a curve or point object.\
  To select parts of objects, use sub-object selection.\
  The closest point from that object to the originally selected object is calculated.\
  Point objects are created at the closest points.\
  This is especially useful for testing two curve objects.

\
![](/files/7hORi78D12N7nUTibAX0)

**CreateLine:** Draw a line between the base point and the closest point on the object.

**SubCrv:** Type subcrv to select part of a curve as input.

For more information, please refer to the [Rhino documentation](https://docs.mcneel.com/rhino/8/help/en-us/commands/closestpt.htm).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rhinoartisan.com/commands/analyze/measurement/closest-points.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
