Box.from_corner_corner_height

classmethod Box.from_corner_corner_height(corner1, corner2, height)[source]

Construct a box from the opposite corners of its base and its height.

Parameters:
corner1[float, float, float] | compas.geometry.Point

The XYZ coordinates of the bottom left corner of the base of the box.

corner2[float, float, float] | compas.geometry.Point

The XYZ coordinates of the top right corner of the base of the box.

heightfloat

The height of the box.

Returns:
compas.geometry.Box

The resulting box.

Examples

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