coords.Coords.directional_width#

Coords.directional_width(n)#

Returns the width of a Coords in the given direction.

Parameters#

n: a single int or a float array_like (3,)

The direction of the normal to the plane. If an int, it is the number of a global axis. Else it is a vector with 3 components.

Returns#

float

The size of the Coords in the direction n. This is the distance between the extreme planes with normal n touching the Coords.

See also#

Notes#

This is like directional_size() but only returns the difference between dmax and dmin.

Examples#

>>> X = Coords([[[0.,0.,0.],[3.,0.,0.],[0.,3.,0.]]])
>>> print(X.directional_width([1,0,0]))
3.0