Arrow

class Arrow[source]

Bases: compas.geometry.shapes._shape.Shape

A Arrow is defined by its location and direction vector.

Parameters
positionlist of float or compas.geometry.Vector

The start position of arrow

directionlist of float or compas.geometry.Vector

The height of the cone.

Examples

>>> from compas.geometry import Arrow
>>> arrow = Arrow([0, 0, 0], [0, 0, 1])
Attributes
head_portionfloat

The portion of head of the arrow

head_widthfloat

The head width relative to the length of arrow

body_widthfloat

The body width relative to the length of arrow

Methods

from_data

Construct a Arrow from its data representation.

to_vertices_and_faces

Returns a list of vertices and faces.

transform

Transform the Arrow.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_data

Convert an object to its native data representation.

to_json

Serialize the data representation of an object to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

transformed

Returns a transformed copy of this geometry.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.