Capsule.from_line_and_radius

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

Construct a capsule from a line and a radius.

Parameters:
linecompas.geometry.Line

The line.

radiusfloat

The radius.

Returns:
compas.geometry.Capsule

The constructed capsule.

Examples

>>> line = Line(Point(0, 0, 0), Point(0, 0, 1))
>>> capsule = Capsule.from_line_and_radius(line, 0.3)