Box.from_diagonal
- classmethod Box.from_diagonal(diagonal)[source]
Construct a box from its main diagonal.
- Parameters:
- diagonal[point, point] |
compas.geometry.Line
The diagonal of the box, represented by a pair of points in space.
- diagonal[point, point] |
- Returns:
compas.geometry.Box
The resulting box.
Examples
>>> diagonal = [0.0, 0.0, 0.0], [1.0, 1.0, 1.0] >>> box = Box.from_diagonal(diagonal)