Arrow
- class compas_view2.shapes.Arrow(position=[0, 0, 0], direction=[0, 0, 1], head_portion=0.3, head_width=0.1, body_width=0.02)[source]
Bases:
ShapeA Arrow is defined by its location and direction vector.
- Parameters:
position (list of float or compas.geometry.Vector) – The start position of arrow
direction (list of float or compas.geometry.Vector) – The height of the cone.
- Attributes:
head_portion (float) – The portion of head of the arrow
head_width (float) – The head width relative to the length of arrow
body_width (float) – The body width relative to the length of arrow
Examples
>>> from compas.geometry import Arrow >>> arrow = Arrow([0, 0, 0], [0, 0, 1])Methods
Construct a Arrow from its data representation.
Returns a list of vertices and faces.
Transform the Arrow.
Inherited Methods
Converts the instance to a string.
Make an independent copy of the data object.
Construct an object from serialized data contained in a JSON file.
Construct an object from serialized data contained in a JSON string.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation.
Serialize the data representation of an object to a JSON file.
Serialize the data representation of an object to a JSON string.
Returns a transformed copy of this geometry.
Validate the object's data against its data schema.
Validate the object's data against its json schema.