Line.from_point_direction_length
- classmethod Line.from_point_direction_length(point, direction, length)[source]
Construct a line from a point, a direction and a length.
- Parameters:
- point
compas.geometry.Point
The start point of the line.
- direction
compas.geometry.Vector
The direction of the line.
- lengthfloat
The length of the line.
- point
- Returns:
Line
The constructed line.
See also
Examples
>>> from compas.geometry import Point, Vector >>> line = Line.from_point_direction_length(Point(0, 0, 0), Vector(1, 1, 1), 1) >>> print(line.start) Point(x=0.000, y=0.000, z=0.000) >>> print(line.end) Point(x=0.577, y=0.577, z=0.577)