Cylinder.from_line_and_radius

classmethod Cylinder.from_line_and_radius(line, radius)[source]

Construct a cylinder from a line and a radius.

Parameters:
linecompas.geometry.Line

The line.

radiusfloat

The radius.

Returns:
compas.geometry.Cylinder

The cylinder.

Examples

>>> from compas.geometry import Line
>>> from compas.geometry import Cylinder
>>> line = Line([0, 0, 0], [0, 0, 1])
>>> cylinder = Cylinder.from_line_and_radius(line, radius=0.3)