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
Line2dusing the specified line distance type.- Parameters:
l1 (
Line2d) – First 2D line segmentl2 (
Line2d) – Second 2D line segmenttype (
LineMetricType) – Line distance type
- 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
Line3dusing the specified line distance type.- Parameters:
l1 (
Line3d) – First 3D line segmentl2 (
Line3d) – Second 3D line segmenttype (
LineMetricType) – Line distance type
- 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
Line2dusing the specified line distance type.- Parameters:
lines (list[
Line2d]) – List of 2D line segmentstype (
LineMetricType) – Line distance type
- 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
Line3dusing the specified line distance type.- Parameters:
lines – List of 3D line segments
- Returns:
The computed pairwise distance matrix
- Return type:
np.array