Elements Resources

3D spatial element classes that hold object geometry and associated data

../_images/lfview_resources_spatial_elements.png

Doc links: _BaseElement _BaseElementLineSet _BaseElementPointSet _BaseElementSurface _BaseElementVolume _BaseResource _BaseUIDModel ElementLineSet ElementPointSet ElementSurface ElementSurfaceGrid ElementVolumeGrid HasProperties

class lfview.resources.spatial.elements._BaseElement(**kwargs)

Base class for elements

Required Properties:

  • data (a list of DataBasic instance or UID, a list of DataCategory instance or UID): Data defined on the element, a list (each item is an instance of DataBasic or a valid uid property of that class or an instance of DataCategory or a valid uid property of that class) with length between 0 and 100

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string
class lfview.resources.spatial.elements._BaseElementPointSet(**kwargs)

Base class for point-set elements

Required Properties:

  • data (a list of DataBasic instance or UID, a list of DataCategory instance or UID, a list of TextureProjection instance or UID): Data defined on the element, a list (each item is an instance of DataBasic or a valid uid property of that class or an instance of DataCategory or a valid uid property of that class or an instance of TextureProjection or a valid uid property of that class) with length between 0 and 100
  • defaults (OptionsPoints): Default visualization options, an instance of OptionsPoints, Default: {‘visible’: True, ‘color’: {‘value’: ‘random’}, ‘opacity’: {‘value’: 1.0}}

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string
class lfview.resources.spatial.elements._BaseElementLineSet(**kwargs)

Base class for line-set elements

Required Properties:

  • data (a list of DataBasic instance or UID, a list of DataCategory instance or UID): Data defined on the element, a list (each item is an instance of DataBasic or a valid uid property of that class or an instance of DataCategory or a valid uid property of that class) with length between 0 and 100
  • defaults (OptionsLines, OptionsTubes): Default visualization options, an instance of OptionsLines or an instance of OptionsTubes, Default: {‘visible’: True, ‘color’: {‘value’: ‘random’}, ‘opacity’: {‘value’: 1.0}}

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string
class lfview.resources.spatial.elements._BaseElementSurface(**kwargs)

Base class for surface elements

Required Properties:

  • data (a list of DataBasic instance or UID, a list of DataCategory instance or UID, a list of TextureProjection instance or UID): Data defined on the element, a list (each item is an instance of DataBasic or a valid uid property of that class or an instance of DataCategory or a valid uid property of that class or an instance of TextureProjection or a valid uid property of that class) with length between 0 and 100
  • defaults (OptionsSurface): Default visualization options, an instance of OptionsSurface, Default: {‘visible’: True, ‘color’: {‘value’: ‘random’}, ‘opacity’: {‘value’: 1.0}, ‘wireframe’: {‘active’: False}, ‘textures’: []}

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string
class lfview.resources.spatial.elements._BaseElementVolume(**kwargs)

Base class for volume elements

Required Properties:

  • data (a list of DataBasic instance or UID, a list of DataCategory instance or UID): Data defined on the element, a list (each item is an instance of DataBasic or a valid uid property of that class or an instance of DataCategory or a valid uid property of that class) with length between 0 and 100
  • defaults (OptionsBlockModel, OptionsVolumeSlices): Default visualization options, an instance of OptionsBlockModel or an instance of OptionsVolumeSlices, Default: {‘visible’: True, ‘color’: {‘value’: ‘random’}, ‘opacity’: {‘value’: 1.0}, ‘wireframe’: {‘active’: False}}

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string
class lfview.resources.spatial.elements.ElementPointSet(**kwargs)

Point-set element with geometry defined array of vertices

Required Properties:

  • data (a list of DataBasic instance or UID, a list of DataCategory instance or UID, a list of TextureProjection instance or UID): Data defined on the element, a list (each item is an instance of DataBasic or a valid uid property of that class or an instance of DataCategory or a valid uid property of that class or an instance of TextureProjection or a valid uid property of that class) with length between 0 and 100
  • defaults (OptionsPoints): Default visualization options, an instance of OptionsPoints, Default: {‘visible’: True, ‘color’: {‘value’: ‘random’}, ‘opacity’: {‘value’: 1.0}}
  • vertices (Array instance or UID): Spatial coordinates of points, must be of shape N x 3, an instance of Array or a valid uid property of that class

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string
class lfview.resources.spatial.elements.ElementLineSet(**kwargs)

Line-set element with geometry defined by vertices and segments

Required Properties:

  • data (a list of DataBasic instance or UID, a list of DataCategory instance or UID): Data defined on the element, a list (each item is an instance of DataBasic or a valid uid property of that class or an instance of DataCategory or a valid uid property of that class) with length between 0 and 100
  • defaults (OptionsLines, OptionsTubes): Default visualization options, an instance of OptionsLines or an instance of OptionsTubes, Default: {‘visible’: True, ‘color’: {‘value’: ‘random’}, ‘opacity’: {‘value’: 1.0}}
  • segments (Array instance or UID): Pairs of zero-based vertex indices corresponding to line segment endpoints, must be integer values and of shape M x 2, an instance of Array or a valid uid property of that class
  • vertices (Array instance or UID): Spatial coordinates of vertices, must be of shape N x 3, an instance of Array or a valid uid property of that class

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string
class lfview.resources.spatial.elements.ElementSurface(**kwargs)

Surface element with geometry defined by vertices and triangles

Required Properties:

  • data (a list of DataBasic instance or UID, a list of DataCategory instance or UID, a list of TextureProjection instance or UID): Data defined on the element, a list (each item is an instance of DataBasic or a valid uid property of that class or an instance of DataCategory or a valid uid property of that class or an instance of TextureProjection or a valid uid property of that class) with length between 0 and 100
  • defaults (OptionsSurface): Default visualization options, an instance of OptionsSurface, Default: {‘visible’: True, ‘color’: {‘value’: ‘random’}, ‘opacity’: {‘value’: 1.0}, ‘wireframe’: {‘active’: False}, ‘textures’: []}
  • triangles (Array instance or UID): Trios of zero-based vertex indices corresponding to triangle corners, must be integer values and of shape M x 3, an instance of Array or a valid uid property of that class
  • vertices (Array instance or UID): Spatial coordinates of vertices, must be of shape N x 3, an instance of Array or a valid uid property of that class

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string
class lfview.resources.spatial.elements.ElementSurfaceGrid(**kwargs)

Surface element with geometry defined by a grid

The grid is defined by two axes and cell spacing along these axes.

Required Properties:

  • axis_u (Vector3): Vector orientation of u-direction, a 3D Vector of <class ‘float’> with shape (3)
  • axis_v (Vector3): Vector orientation of v-direction, a 3D Vector of <class ‘float’> with shape (3)
  • data (a list of DataBasic instance or UID, a list of DataCategory instance or UID, a list of TextureProjection instance or UID): Data defined on the element, a list (each item is an instance of DataBasic or a valid uid property of that class or an instance of DataCategory or a valid uid property of that class or an instance of TextureProjection or a valid uid property of that class) with length between 0 and 100
  • defaults (OptionsSurface): Default visualization options, an instance of OptionsSurface, Default: {‘visible’: True, ‘color’: {‘value’: ‘random’}, ‘opacity’: {‘value’: 1.0}, ‘wireframe’: {‘active’: False}, ‘textures’: []}
  • origin (Vector3): Grid origin, where axis_u and axis_v vectors extend from, a 3D Vector of <class ‘float’> with shape (3)
  • tensor_u (a list of Float): Grid cell widths, u-direction, a list (each item is a float in range [0, inf]) with length between 0 and 10000
  • tensor_v (a list of Float): Grid cell widths, v-direction, a list (each item is a float in range [0, inf]) with length between 0 and 10000

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • offset_w (Array instance or UID): Node offset perpendicular to the two axes; this must be an array of shape len(tensor_u)+1 x len(tensor_v)+1, flattened with row-major order, an instance of Array or a valid uid property of that class
  • uid (String): Unique object identifier, a unicode string
class lfview.resources.spatial.elements.ElementVolumeGrid(**kwargs)

Volume element with geometry defined by a grid

The grid is defined by three axes and cell spacing along these axes.

Required Properties:

  • axis_u (Vector3): Vector orientation of u-direction, a 3D Vector of <class ‘float’> with shape (3)
  • axis_v (Vector3): Vector orientation of v-direction, a 3D Vector of <class ‘float’> with shape (3)
  • axis_w (Vector3): Vector orientation of w-direction, a 3D Vector of <class ‘float’> with shape (3)
  • data (a list of DataBasic instance or UID, a list of DataCategory instance or UID): Data defined on the element, a list (each item is an instance of DataBasic or a valid uid property of that class or an instance of DataCategory or a valid uid property of that class) with length between 0 and 100
  • defaults (OptionsBlockModel, OptionsVolumeSlices): Default visualization options, an instance of OptionsBlockModel or an instance of OptionsVolumeSlices, Default: {‘visible’: True, ‘color’: {‘value’: ‘random’}, ‘opacity’: {‘value’: 1.0}, ‘wireframe’: {‘active’: False}}
  • origin (Vector3): Grid origin, where axis_u, axis_v, and axis_w vectors extend from, a 3D Vector of <class ‘float’> with shape (3)
  • tensor_u (a list of Float): Tensor cell widths, u-direction, a list (each item is a float in range [0, inf]) with length between 0 and 2000
  • tensor_v (a list of Float): Tensor cell widths, v-direction, a list (each item is a float in range [0, inf]) with length between 0 and 2000
  • tensor_w (a list of Float): Tensor cell widths, w-direction, a list (each item is a float in range [0, inf]) with length between 0 and 2000

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string