Line distances

Distances between line segments, selected by LineMetricType.

class limap.geometry.LineMetricType

Enum of supported line distance types.

Members:

ANGULAR

ENDPOINTS

MIDPOINT

MIDPOINT_PERPENDICULAR

OVERLAP

BIOVERLAP

PERPENDICULAR_ONEWAY

PERPENDICULAR

INNERSEG

ANGULAR = <LineMetricType.ANGULAR: 0>
BIOVERLAP = <LineMetricType.BIOVERLAP: 5>
ENDPOINTS = <LineMetricType.ENDPOINTS: 1>
INNERSEG = <LineMetricType.INNERSEG: 8>
MIDPOINT = <LineMetricType.MIDPOINT: 2>
MIDPOINT_PERPENDICULAR = <LineMetricType.MIDPOINT_PERPENDICULAR: 3>
OVERLAP = <LineMetricType.OVERLAP: 4>
PERPENDICULAR = <LineMetricType.PERPENDICULAR: 7>
PERPENDICULAR_ONEWAY = <LineMetricType.PERPENDICULAR_ONEWAY: 6>
LineMetricType.name -> str
property value
limap.geometry.compute_distance_2d(l1: limap._limap._geometry.Line2d, l2: limap._limap._geometry.Line2d, type: limap._limap._geometry.LineMetricType) float

Compute distance between two Line2d using the specified line distance type.

Parameters:
Returns:

The computed distance

Return type:

float

limap.geometry.compute_distance_3d(l1: limap._limap._geometry.Line3d, l2: limap._limap._geometry.Line3d, type: limap._limap._geometry.LineMetricType) float

Compute distance between two Line3d using the specified line distance type.

Parameters:
Returns:

The computed distance

Return type:

float

limap.geometry.compute_pairwise_distance_2d(lines: collections.abc.Sequence[limap._limap._geometry.Line2d], type: limap._limap._geometry.LineMetricType) Eigen::Matrix<double, -1, -1, 0, -1, -1>

Compute pairwise distance among a list of Line2d using the specified line distance type.

Parameters:
Returns:

The computed pairwise distance matrix

Return type:

np.array

limap.geometry.compute_pairwise_distance_3d(lines: collections.abc.Sequence[limap._limap._geometry.Line3d], type: limap._limap._geometry.LineMetricType) Eigen::Matrix<double, -1, -1, 0, -1, -1>

Compute pairwise distance among a list of Line3d using the specified line distance type.

Parameters:

lines – List of 3D line segments

Returns:

The computed pairwise distance matrix

Return type:

np.array