Cylinder.from_line_and_radius
- classmethod Cylinder.from_line_and_radius(line, radius)[source]
Construct a cylinder from a line and a radius.
- Parameters:
- line
compas.geometry.Line
The line.
- radiusfloat
The radius.
- line
- 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)