Skip to content

Distances¤

compas_model.geometry.distances ¤

Functions:¤

closestpoint_point_box ¤

closestpoint_point_box(point: Point, box: Box) -> Point

Compute the closest point from a point to a box.

Parameters:

  • point (Point) –

    The source point.

  • box (Box) –

    The target box.

Returns:

  • Point –

    The closest point on the box.

distance_point_box ¤

distance_point_box(point: Point, box: Box) -> float

Compute the distance between a point and a box.

Parameters:

  • point (Point) –

    The source point.

  • box (Box) –

    The target box.

Returns:

  • float –

    The distance between the point and the box.