Line

../../../_images/steno3d_line.png

Steno3D Lines are 1D resources. The steps to construct the line resource pictured above can be found online in the example notebooks.

class steno3d.line.Line(project=None, **kwargs)[source]

Contains all the information about a 1D line set

Required Properties:

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

Optional Properties:

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

Meshes

class steno3d.line.Mesh1D(**metadata)[source]

Contains spatial information of a 1D line set

Required Properties:

  • opts (_Mesh1DOptions): Options, an instance of _Mesh1DOptions, Default: new instance of _Mesh1DOptions
  • segments (Array): Segment endpoint indices, a list or numpy array of <type ‘int’> with shape (*, 2)
  • vertices (Array): Mesh vertices, 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 lines is simply using a dictionary containing location (either nodes/vertices, ‘N’, or cell centers/segments, ‘CC’) and data, a DataArray.

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

Under the surface, this dictionary becomes a _LineBinder.

Binding data to Lines requires the data array to correspond to mesh vertices or mesh segments, for node and cell-center data, respectively.

class steno3d.line._LineBinder(**metadata)[source]

Contains the data on a 1D line set with location information

Required Properties:

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

Options

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

>> ...
>> my_line = steno3d.Line(...)
>> ...
>> my_line.opts = dict(
       color='red',
       opacity=0.75
   )

This dictionary then becomes _LineOptions.

class steno3d.line._LineOptions(**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.line._Mesh1DOptions(**metadata)[source]

Optional Properties:

  • view_type (StringChoice): Display 1D lines or tubes/boreholes/extruded lines, either “line” or “tube”, Default: line