Point

../../../_images/steno3d_point.png

Steno3D Points are 0D resources. The steps to construct the point resource pictured above can be found online in the example notebooks.

class steno3d.point.Point(project=None, **kwargs)[source]

Contains all the information about a 0D point cloud

Required Properties:

  • mesh (Mesh0D): Mesh, an instance of Mesh0D, Default: new instance of Mesh0D
  • opts (_PointOptions): Options, an instance of _PointOptions, Default: new instance of _PointOptions
  • project (a list of Project): Project containing the resource, a list (each item is an instance of Project)

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
  • textures (a list of Texture2DImage): Textures, a list (each item is an instance of Texture2DImage)
  • title (String): Title of the model., a unicode string

Meshes

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 points) and data, a DataArray.

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

Under the surface, this dictionary becomes a _PointBinder.

Binding data to Points 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_point = steno3d.Point(...)
>> ...
>> my_point.opts = dict(
       color='red',
       opacity=0.75
   )

This dictionary then becomes _PointOptions.

class steno3d.point._PointOptions(**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]