geo2d.geometry.get_perpendicular_to

geo2d.geometry.get_perpendicular_to(obj, at_point=None)[source]

Creates a new Vector or Line perpendicular with obj (Vector or Line-like) depending on at_point parameter.

The perpendicular vector to the obj is not necessarily the unit Vector.

Parameters :

obj : vector, line-like

The object to retreive the perpendicular vector to.

at_point : point-like, optional

If this is given then a Line is returned instead, perpendicular to obj and passing through at_point.

Returns :

out : vector

A new Vector or Line passing through at_point with the components in such a way it is perpendicular with obj..

Raises :

TypeError: :

If obj is not Vector nor Line-like or if at_point is not point-like.

Previous topic

geo2d.utils.cached_property

Next topic

geo2d.geometry.GeometricObject

This Page