Line ==== .. py:class:: py3dm.Line Line(start: Point3d, end: Point3d) Python bindings for the openNURBS ``ON_Line`` class. .. py:method:: __eq__(other: object) -> bool .. py:method:: __getitem__(index: int) -> Point3d .. py:method:: __ne__(other: object) -> bool .. py:method:: __setitem__(index: int, value: Point3d) -> None .. py:method:: create(start: Point3d, end: Point3d) -> bool Create a line from two points. :param start: Point at the start of line segment :type start: Point3d :param end: Point at end of line segment :type end: Point3d :returns: **success** -- ``True`` if ``start`` and ``end`` are distinct points. :rtype: bool .. py:method:: distance_to(test_point: Point3d, finite_chord: bool = False) -> float Returns the distance from the point on the line that is closest to the ``test_point``. If ``finite_chord`` is ``True``, the distance is reported to the line as a finite chord. .. py:method:: is_valid() -> bool Returns ``True`` if start ``!=`` end and both start and end are valid points. .. py:method:: length() -> float Returns the length of the line. .. py:method:: point_at(parameter: float) -> Point3d Returns a point on the (infinite) line, calculated as: ``(1 - parameter) * line.start + parameter * line.end``.