Vector

Steno3D Vectors are points in space with an associated direction. Currently, vector magnitude is unsupported, only direction.

class steno3d.vector.Vector(project=None, **kwargs)[source]

Contains all the information about a vector field

Required Properties:

  • mesh (Mesh0D): Mesh, an instance of Mesh0D, Default: new instance of Mesh0D
  • opts (_VectorOptions): Options, an instance of _VectorOptions, Default: new instance of _VectorOptions
  • project (a list of Project): Project containing the resource, a list (each item is an instance of Project)
  • vectors (Array): Vector, a list or numpy array of <type ‘float’> with shape (*, 3)

Optional Properties:

  • data (a list of _PointBinder): Data, a list (each item is an instance of _PointBinder)
  • description (String): Description of the model., a unicode string
  • title (String): Title of the model., a unicode string

Meshes

Vectors use the same mesh as Points.

class steno3d.point.Mesh0D(**metadata)[source]

Contains spatial information of a 0D point cloud.

Required Properties:

  • opts (_Mesh0DOptions): Mesh0D Options, an instance of _Mesh0DOptions, Default: new instance of _Mesh0DOptions
  • vertices (Array): Point locations, a list or numpy array of <type ‘float’> with shape (*, 3)

Optional Properties:

  • description (String): Description of the model., a unicode string
  • title (String): Title of the model., a unicode string

Data

The intended method of binding data to points is simply using a dictionary containing location (nodes/vertices, ‘N’, is the only available location for vectors) and data, a DataArray.

>> ...
>> my_vector = steno3d.Vector(...)
>> ...
>> my_data = steno3d.DataArray(
       title='Six Numbers',
       array=[0.0, 1.0, 2.0, 3.0, 4.0, 5.0]
   )
>> my_vector.data = [dict(
       location='N',
       data=my_data
   )]

Under the surface, this dictionary becomes a _PointBinder since Vectors use the same mesh as Points.

Binding data to Vectors requires the data array to correspond to mesh vertices.

class steno3d.point._PointBinder(**metadata)[source]

Contains the data on a 0D point cloud

Required Properties:

  • data (DataArray): Data, an instance of DataArray, Default: new instance of DataArray
  • location (StringChoice): Location of the data on mesh, any of “N”, Default: N

Options

Similar to data, options are intended to be constructed simply as a dictionary.

>> ...
>> my_vector = steno3d.Vector(...)
>> ...
>> my_vector.opts = dict(
       color='red',
       opacity=0.75
   )

This dictionary then becomes _VectorOptions.

class steno3d.vector._VectorOptions(**metadata)[source]

Optional Properties:

  • color (Color): Solid color, a color, Default: random
  • opacity (Float): Opacity, a float in range [0.0, 1.0], Default: 1.0
class steno3d.point._Mesh0DOptions(**metadata)[source]