# 10.1.4.5. Line¶

Module to implement line.

class Patro.GeometryEngine.Line.Line2D(point, vector)[source]

Class to implement 2D Line.

Construct a Line2D from a point and a vector.

__init__(point, vector)[source]

Construct a Line2D from a point and a vector.

__str__()[source]

Return str(self).

clone()[source]

Clone a primitive instance.

compute_distance(s_list)[source]

Compute distance between a set of abscissae

compute_distance_between_abscissae(s0, s1)[source]

Compute distance between two abscissae

distance_and_abscissa_to_line(point)[source]

Return the distance of a point to the line

distance_to_line(point)[source]

Return the distance of a point to the line

static from_two_points(p0, p1)[source]

Construct a Line2D from two points.

get_x_from_y(y)[source]

Return x corresponding to y

get_x_y_from_bounding_box(interval)[source]

Return the bounding box build on the intersection of the input bounding box with the line

get_y_from_x(x)[source]

Return y corresponding to x

interpolate(s)[source]

Return the Point corresponding to the curvilinear abscissa s

intersection(other)[source]

Return the intersection Point between self and other

intersection_abscissae(l2)[source]

Return the intersection abscissae between l1 and l2

is_infinite

True if the primitive has infinite extend like a line.

Note: a closed primitive cannot be infinite.

is_orthogonal(other)[source]

Self is orthogonal to other

is_parallel(other, return_cross=False)[source]

Self is parallel to other

orthogonal_line_at_abscissa(s)[source]

Return the orthogonal line at abscissa s

point_at_s(s)

Return the Point corresponding to the curvilinear abscissa s

point_at_t(s)

Return the Point corresponding to the curvilinear abscissa s

projected_abscissa(point)[source]

Return the abscissa corresponding to the perpendicular projection of a point to the line

shifted_parallel_line(shift)[source]

Return the shifted parallel line