Box.from_diagonal

classmethod Box.from_diagonal(diagonal)

Construct a box from its main diagonal.

Parameters

diagonal ([point, point] | Line) – The diagonal of the box, represented by a pair of points in space.

Returns

Box – The resulting box.

Examples

>>> diagonal = [0.0, 0.0, 0.0], [1.0, 1.0, 1.0]
>>> box = Box.from_diagonal(diagonal)