Mesh

Inheritance diagram

Inheritance diagram of ORSModel.ors.Mesh, ORSModel.ors.UnstructuredGrid, ORSModel.ors.Node, ORSModel.ors.Managed, ORSModel.ors.ORSBaseClass

Classes

Mesh

class ORSModel.ors.Mesh

Bases: ORSModel.ors.UnstructuredGrid

brief_description: A visual that represents a author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005 A visual that represents a VisualMesh.

addUpdateEdgeScalar(scalarCollection, scalarName, unit=None, timestep=0)
cleanMeshWinding(iTIndex)

all cell of the mesh generated by the scipy spatial convexhull does not have the same winding so make sure they are all in same order. vtkPolyDataNormals filter is used here to clean the mesh.

return true if the clean up was well done.

computeAnisotropyMappingFromSurfaceNormals(self, iTIndex: int, channelToFill: ORSModel.ors.Channel, vectorFieldEigenvectorMax: ORSModel.ors.VectorField, channelToFillNormOfGradient: ORSModel.ors.Channel, channelToFillDivergence: ORSModel.ors.Channel, vectorFielCurl: ORSModel.ors.VectorField, channelToFillNormOfCurl: ORSModel.ors.Channel, radiusOfInfluence: float, useProjectionBasedAnisotropy: bool, IProgress: ORSModel.ors.Progress) → bool

Computes the anisotropy mapping of a mesh at the specified locations, using the surface normals.

Note

The vector field object will be cleared before being filled with the current information.

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • channelToFill (ORSModel.ors.Channel) – the channel (anisotropy) to fill at each voxel location (a Channel)
  • vectorFieldEigenvectorMax (ORSModel.ors.VectorField) – the vector field (eigenvector associated to the highest eigenvalue) to fill at each voxel location of the given channel (a VectorField)
  • channelToFillNormOfGradient (ORSModel.ors.Channel) – the channel (norm of the gradient of the orientation) to fill at each voxel location (a Channel)
  • channelToFillDivergence (ORSModel.ors.Channel) – the channel (divergence of the orientation) to fill at each voxel location (a Channel)
  • vectorFielCurl (ORSModel.ors.VectorField) – the vector field (curl of the orientation) to fill at each voxel location of the given channel (a VectorField)
  • channelToFillNormOfCurl (ORSModel.ors.Channel) – the channel (norm of the curl of the orientation) to fill at each voxel location (a Channel)
  • radiusOfInfluence (float) – distance from the analysis point to the last considered anisotropy element (a double)
  • useProjectionBasedAnisotropy (bool) – anisotropy computation method. If true, the projection based method is used; if false, the eigenvalues from the tensor of inertia are taken (a bool)
  • IProgress (ORSModel.ors.Progress) – an optional progress object (a Progress)
Returns:

output (bool) – true if the computation was completed successfully, false otherwise

convertToVTKPolyData(currentTimeStep, includeScalar=False, vertexXScaleFactor=1.0, vertexYScaleFactor=1.0, vertexZScaleFactor=1.0, progress=None)
static createFromVTKPolyData(vtkPolyData, currentTimeStep=0, includeScalar=False, generatedMeshisFaceVertex=True, progress=None)
findMeshContourPointsAndConnectionOnAPlane(self, cuttingPlane: ORSModel.ors.Plane, anOctreeBox: ORSModel.ors.Octree, iTIndex: int, oPoints: ORSModel.ors.ArrayDouble, oPointsConnection: ORSModel.ors.ArrayUnsignedLONGLONG, outNbOfPts: int, outNbOfConnection: int) → None

Find points of the mesh on a plane and all connection between those points.

Parameters:
  • cuttingPlane (ORSModel.ors.Plane) – a cutting plane (Plane)
  • anOctreeBox (ORSModel.ors.Octree) – an octree, if the octree is none a default one will be created (Octree)
  • iTIndex (int) – the time step (a uint32_t)
  • oPoints (ORSModel.ors.ArrayDouble) – output points collection (ArrayDouble)
  • oPointsConnection (ORSModel.ors.ArrayUnsignedLONGLONG) – output points connection (edges with size = 2) collection (ArrayUnsignedLongLong)
  • outNbOfPts (int) – number of point that make the contour on plane (int)
  • outNbOfConnection (int) – number of edges that make the contour on plane (int)
fromVTKPolyData(vtkPolyData, currentTimeStep=0, includeScalar=False, progress=None)
getArea(self, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4, IProgress: ORSModel.ors.Progress) → float

Gets the one sided area from closed mesh.

Note

Result for an open mesh is undefined.

Parameters:
  • iTIndex (int) – the T index to compute (a uint32_t)
  • aWorldTransformMatrix (ORSModel.ors.Matrix4x4) – a transformation matrix (an Matrix4x4)
  • IProgress (ORSModel.ors.Progress) – a progress object (an Progress) or NULL for no progress
Returns:

output (float) – the area (a double)

getAsMeshProjectedOnPlane(self, aPlane: ORSModel.ors.Plane, iTIndex: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4, inMesh: ORSModel.ors.Mesh) → Mesh
Parameters:
Returns:

output (ORSModel.ors.Mesh) –

getAsMeshWithEdgesDecimatedSmallerThan(self, value: float, IProgress: ORSModel.ors.Progress, worldTransform: ORSModel.ors.Matrix4x4, inoutMesh: ORSModel.ors.Mesh) → Mesh

Decimates all edges with a length smaller than a threshold value.

Note

This method is recursive and will decimate edges until all edges length are greater than the supplied threshold value.

Parameters:
Returns:

output (ORSModel.ors.Mesh) –

getAsROI(self, iTIndex: int, worldTransform: ORSModel.ors.Matrix4x4, pOutputROI: ORSModel.ors.ROI, progress: ORSModel.ors.Progress) → None
Parameters:
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getContourAreaForPlane(self, nax: float, nby: float, ncz: float, nd: float, iTIndex: int) → float

Gets area of contours of mesh for plane.

Note

Results for an open contour is undefined.

Note

Only works for triangular primitive type mesh.

Note

The algorithm uses winding to find the inside part of faces. Thus the result for meshes with wrong winding is undefined.

Parameters:
  • nax (float) – the a value of the plane (a float)
  • nby (float) – the b value of the plane (a float)
  • ncz (float) – the c value of the plane (a float)
  • nd (float) – the d value of the plane (a float)
  • iTIndex (int) –
Returns:

output (float) – the area (a float)

getContourMeshForPlane(self, nax: float, nby: float, ncz: float, nd: float, iTIndex: int, inoutMesh: ORSModel.ors.Mesh) → Mesh

Returns a mesh representing the contour of the mesh intersecting the specifed plane.

Note

If a target mesh is supplied, data is written to it and returned, otherwise a new mesh is created.

Note

The general plane equation is ax + by + cz + dw = 0.

Parameters:
  • nax (float) – The a coefficient of the plane (a float)
  • nby (float) – The b coefficient of the plane (a float)
  • ncz (float) – The c coefficient of the plane (a float)
  • nd (float) – The d coefficient of the plane (a float)
  • iTIndex (int) – the target mesh (a Mesh, see note below)
  • inoutMesh (ORSModel.ors.Mesh) –
Returns:

output (ORSModel.ors.Mesh) – the resulting mesh (an VisualMesh)

getCurrentFaceScalarValuesSlot(self) → int

gets the current face scalar.

Note

The scalar index is zero-based, and thus should be less than getFaceScalarValuesSlotCount().

Note

Use -1 to indicate no current scalar

Returns:output (int) – the scalar slot index (a int32_t, see not)
getDefaultColor(self) → Color

Gets the mesh default color.

Note

Each color value goes between 0 (none) and 1 (full).

Returns:output (ORSModel.ors.Color) – a color (an Color)
getDefaultMeshAlphaColor(self) → float

Queries the mesh to get its default alpha color.

Deprecated since version (unknown): Use

Returns:output (float) – Default alpha color used for the mesh (a double)
getDistanceFromRays(self, aLineSegment: ORSModel.ors.LineSegment, rotationAxis: ORSModel.ors.Vector3, rayCount: int, timeStep: int, octree: ORSModel.ors.Octree, outputArray: ORSModel.ors.ArrayDouble) → ArrayDouble

Get the unsigned distance between theLineSegment, rotated around rotationAxis arayCount number of times, a and the surface of the mesh. If the ray does not collide a triangle (for instance the start member of the line segmenet is out of the mesh) return 0.

Parameters:
  • aLineSegment (ORSModel.ors.LineSegment) – the line segment (LineSegment )
  • rotationAxis (ORSModel.ors.Vector3) – rotation Axis (Vector3)
  • rayCount (int) – ray Count arount the axis (a uint32_t)
  • timeStep (int) – timeStep of the receiving Mesh to considered (a uint32_t)
  • octree (ORSModel.ors.Octree) – the octree (optional), useful when calling more than once on the same mesh(octree)
  • outputArray (ORSModel.ors.ArrayDouble) –
Returns:

output (ORSModel.ors.ArrayDouble) – the Output Array Double (ArrayDouble)

getDistanceFromRaysWithFibonaciDistristributionOnSphere(self, centerOfTheSphere: ORSModel.ors.Vector3, rayCount: int, timeStep: int, octree: ORSModel.ors.Octree, outputArray: ORSModel.ors.ArrayDouble) → ArrayDouble

Get the distance then center of the provided sphere and rayCount points on it surface. The points are distributed using the Fibonacci algorithm (http://extremelearning.com.au/evenly-distributing-points-on-a-sphere/)

Parameters:
  • centerOfTheSphere (ORSModel.ors.Vector3) – the center of the sphere (Vector3 )
  • rayCount (int) – number of point on the surface (Vector3)
  • timeStep (int) – ray Count arount the axis (a uint32_t)
  • octree (ORSModel.ors.Octree) – timeStep of the receiving Mesh to considered (a uint32_t)
  • outputArray (ORSModel.ors.ArrayDouble) – the octree (optional), useful when calling more than once on the same mesh(octree)
Returns:

output (ORSModel.ors.ArrayDouble) – the Output Array Double (ArrayDouble)

getEdgeCount(self, iTIndex: int) → int

Returns the number of edges.

Parameters:iTIndex (int) – the the time step (a uint32_t)
Returns:output (int) – an uint64_t
getEdgeCountPerFace(self) → int
Returns:output (int) –
getEdges(self, iTIndex: int) → ArrayUnsignedLong

Get the edge array.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayUnsignedLong) – an array of int32_t (an ArrayLong)
getEulerCharacteristicNumber(self, iTIndex: int) → int

Get euler characteristic number to describe shape of mesh.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (int) – a int64_t
getExtractedSubMesh(self, IMeshROI: ORSModel.ors.MeshFacesROI, IOutputMesh: ORSModel.ors.Mesh, bExtractSubMeshROI: bool) → Mesh
Parameters:
Returns:

output (ORSModel.ors.Mesh) –

getFaceCount(self, iTIndex: int) → int

Gets the number of faces.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (int) – an uint64_t
getFaceScalarSlotIndexForDescription(self, sValue: str, iTIndex: int) → int

Gets the scalar slot index from a face scalar description.

Parameters:
  • sValue (str) – the slot description (an std::wstring)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (int) – the index or -1 if not found

getFaceScalarValue(self, nScalarValueSlotIndex: int, scalarValueFaceIndex: int, iTIndex: int) → float

Gets the value of a face scalar.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • scalarValueFaceIndex (int) – the face index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the value of a face scalar (a double)

getFaceScalarValueDescription(self, nScalarValueSlotIndex: int, iTIndex: int) → str

Gets a face scalar description.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (str) – the description (a std::wstring)

getFaceScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, iTIndex: int) → DimensionUnit

Gets the dimension unit of a face scalar.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)

getFaceScalarValueMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

method getFaceScalarValueMax

Deprecated since version (unknown): use getFaceScalarValuesWindowMax instead

Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getFaceScalarValueMaxs(self, iTIndex: int) → ArrayDouble

method getFaceScalarValueMaxs

Deprecated since version (unknown): use getFaceScalarValuesWindowMaxs instead

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getFaceScalarValueMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar min value.

Deprecated since version (unknown): use getFaceScalarValuesWindowMin instead

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValueMins(self, iTIndex: int) → ArrayDouble

method getFaceScalarValueMins

Deprecated since version (unknown): use getFaceScalarValuesWindowMins instead

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getFaceScalarValueOffset(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar offset value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar offset value (a double)

getFaceScalarValueOffsets(self, iTIndex: int) → ArrayDouble

Get the face scalar offset values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayDouble) – the scalar offset values (an ArrayDouble)
getFaceScalarValueSlope(self, scalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar slope value.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar slope value (a double)

getFaceScalarValueSlopes(self, iTIndex: int) → ArrayDouble

Get the face scalar slope values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayDouble) – the scalar slope values (an ArrayDouble)
getFaceScalarValueSlotLookUpTable(self, nScalarValueSlotIndex: int, iTIndex: int) → dict
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (dict) –

getFaceScalarValues(self, nScalarValueSlotIndex: int, iTIndex: int) → Array

Gets the values of a face scalar.

Note

The array of values is of length getFaceCount() * getFaceScalarValuesSlotCount().

Note

The scalar value in the slot s of the face v is located at the index (getFaceScalarValuesSlotCount() * v) + s of the array.

Parameters:
  • nScalarValueSlotIndex (int) – the face scalar value slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (ORSModel.ors.Array) – an array of values (an ArrayFloat)

getFaceScalarValuesAsPandaDataFrame()
getFaceScalarValuesCollection(self) → ScalarValuesCollection

Queries the scalar values collection of the faces.

Returns:output (ORSModel.ors.ScalarValuesCollection) – the ScalarValuesCollection of the faces.
getFaceScalarValuesDatatype(self, nScalarValueSlotIndex: int) → int
Parameters:nScalarValueSlotIndex (int) –
Returns:output (int) –
getFaceScalarValuesId(self, nScalarValueSlotIndex: int, iTIndex: int) → str

Gets the scalar slot id from a face scalar values slot.

Parameters:
  • nScalarValueSlotIndex (int) – the index of the slot (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (str) –

getFaceScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValuesRangeMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValuesRangeMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a face scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValuesSlotCount(self) → int

Gets the number of slots for face scalar values.

Returns:output (int) – the number of slots (a uint16_t)
getFaceScalarValuesWindowMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getFaceScalarValuesWindowMaxs(self, iTIndex: int) → ArrayDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getFaceScalarValuesWindowMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Gets a face scalar window min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getFaceScalarValuesWindowMins(self, iTIndex: int) → ArrayDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getHideOutOfRangeFaceScalarValues(self) → bool

Indicate if out of range values should be hiden.

Returns:output (bool) – (a bool)
getMeshContourOnPlane(self, aPlane: ORSModel.ors.Plane, iTIndex: int, pResultEdgesMap: ORSModel.ors.ArrayUnsignedLong) → ArrayDouble
Parameters:
Returns:

output (ORSModel.ors.ArrayDouble) –

getMinMaxFaceScalarValue(self, nScalarValueSlotIndex: int, iTIndex: int, fMinValue: float, fMaxValue: float) → None
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
  • fMinValue (float) –
  • fMaxValue (float) –
getMinimumAndMaximumDistanceOnPlaneFromCenterOf(self, anOrientedPlane: ORSModel.ors.OrientedPlane, iTIndex: int, minValue: float, maxValue: float) → None
Parameters:
getNormalsMomentOfInertia(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) → Matrix4x4
Parameters:
Returns:

output (ORSModel.ors.Matrix4x4) –

getSignedVerticesDistance(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, iTIndex: int, pProgress: ORSModel.ors.Progress) → ArrayFloat

Get signed distance between vertices of two meshes.

Parameters:
Returns:

output (ORSModel.ors.ArrayFloat) –

getSphericalEquiRectangularHeightProjection(self, aSphere: ORSModel.ors.Sphere, xSize: int, ySize: int, timeStep: int, aChannel: ORSModel.ors.Channel) → Channel

Get the signed distance between the sphere and the surface of the mesh, in a Equirectangular projection.

Parameters:
  • aSphere (ORSModel.ors.Sphere) – aSphere target (Sphere )
  • xSize (int) – xSize of the output Channel (a uint32_t)
  • ySize (int) – ySize of the output Channel (a uint32_t)
  • timeStep (int) – timeStep of the receiving Mesh to considered (a uint32_t)
  • aChannel (ORSModel.ors.Channel) – output Channel, can be None (Channel)
Returns:

output (ORSModel.ors.Channel) – the Output Channel (Channel)

getTransformed(self, aTransformationMatrix: ORSModel.ors.Matrix4x4, pInOutMesh: ORSModel.ors.Mesh) → Mesh
Parameters:
Returns:

output (ORSModel.ors.Mesh) –

getUVs(self, iTIndex: int) → ArrayFloat

Gets the UV values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayFloat) – an array of float (an ArrayFloat)
getUnstructuredGridHelperClass()
getUseDefaultMeshAlphaColor(self) → bool

Queries the mesh to see if it uses its default alpha color.

Deprecated since version (unknown): use getUseDefaultVertexAlphaColor instead

Returns:output (bool) – true if a default alpha color is used for the mesh, false otherwise
getUseDefaultMeshColor(self) → bool

Queries the mesh to see if it uses its default color.

Deprecated since version (unknown): use getUseDefaultVertexColor instead

Returns:output (bool) – true if the mesh uses its default color, false otherwise
getUseFaceScalarValues(self) → bool

Sets the mesh to have face scalar values or not.

Returns:output (bool) – TRUE to use scalar values, FALSE otherwise
getVertexScalarValuesAsPandaDataFrame()
getVerticesClosestFacesId(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, iTIndex: int, pProgress: ORSModel.ors.Progress, oMapping: ORSModel.ors.ArrayLong, oCollisionPoints: ORSModel.ors.ArrayDouble) → None

Get for each vertex of a mesh the closest faces id of an other mesh.

Parameters:
getVerticesDistance(self, target: ORSModel.ors.Mesh, targetOctree: ORSModel.ors.Octree, iTIndex: int, pProgress: ORSModel.ors.Progress) → ArrayFloat

Get absolute distance between vertices of two meshes.

Parameters:
Returns:

output (ORSModel.ors.ArrayFloat) –

getVerticesNormals(self, iTIndex: int) → ArrayFloat

Gets the normals.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayFloat) – the normals data (an ArrayFloat)
getVolume(self, aPlane: ORSModel.ors.Plane, timeStep: int, aWorldTransformMatrix: ORSModel.ors.Matrix4x4, IProgress: ORSModel.ors.Progress) → float

Gets the volume from closed mesh.

Note

Result for an open mesh is undefined.

Note

Only works for triangular primitive type mesh.

Note

The algorithm uses winding to find the inside part of faces. Thus the result for meshes with wrong winding is undefined.

Parameters:
Returns:

output (float) – the volume (a double)

getWorldTransform(timestep=0)

Get the Matrix4x4 for transforming from local to world coordinates

Parameters:timestep (int) –
Return:
Rtype:ORSModel.ors.Matrix4x4
isWindingSoThatFaceNormalAreOutside(self, iTIndex: int, progress: ORSModel.ors.Progress) → bool

Check if face vertex normal direction point outside of the mesh.

Parameters:
  • iTIndex (int) – the time step (a uint32_t)
  • progress (ORSModel.ors.Progress) – a progress object (a Progress) or none for no progress
Returns:

output (bool) –

labelizeMesh(self, nScalarValueSlotIndex: int, iTIndex: int) → int

Labelizes mesh vertices based on connectivity.

Note

The scalar for the specified index should be already initialized.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar index where to place labels (a uint16_t)
  • iTIndex (int) –
Returns:

output (int) – the number of labels found (an uint32_t)

laplacianSmooth(self, nNbIterations: int, iTIndex: int, relaxationFactor: float) → None

Smooth the mesh using Laplacien algorithm.

Parameters:
  • nNbIterations (int) – number of smooth iteration (uint16_t)
  • iTIndex (int) – time step to smooth (uint32_t)
  • relaxationFactor (float) – relaxation factor (double) , must be between 0 and 1
mapScalarValuesFromAnOtherMesh(self, referenceMesh: ORSModel.ors.Mesh, mapping: ORSModel.ors.ArrayLong, collisionPoints: ORSModel.ors.ArrayDouble, referenceSlotIndex: int, sourceSlotIndex: int, referenceTIndex: int, sourceTIndex: int, defaultScalarValue: float) → None

Maps vertices scalar values of a reference mesh to a source mesh.

Parameters:
  • referenceMesh (ORSModel.ors.Mesh) – the reference mesh (a Mesh)
  • mapping (ORSModel.ors.ArrayLong) – an array that give which face ID of the reference mesh match with the source mesh (an ArrayLong)
  • collisionPoints (ORSModel.ors.ArrayDouble) – an array that give the collision point on the reference mesh (an ArrayDouble)
  • referenceSlotIndex (int) – the slot of the reference mesh to map (a uint32_t)
  • sourceSlotIndex (int) – the slot destination of the source mesh (a uint32_t)
  • referenceTIndex (int) – the time step of the reference mesh (a uint32_t)
  • sourceTIndex (int) – the time step of the soruce mesh (a uint32_t)
  • defaultScalarValue (float) – a default value in case that no match is found between a vertexe and a face (double)
none() → Mesh

Returns a none object, equivalent to a non-existent object (or null).

Returns:output (Mesh) –
removeDuplicateVertices(self, fEpsilon: float, iTIndex: int, pInOutMesh: ORSModel.ors.Mesh) → Mesh

Removes duplicate vertices of the mesh.

Note

If a target mesh is supplied, data is written to it and returned, otherwise a new mesh is created.

Parameters:
  • fEpsilon (float) – an epsilon value (a float)
  • iTIndex (int) – the time step (a uint32_t)
  • pInOutMesh (ORSModel.ors.Mesh) – the output mesh (a Mesh)
Returns:

output (ORSModel.ors.Mesh) – the result mesh (a Mesh)

setCurrentFaceScalarValuesSlot(self, slotIndex: int) → None

Sets the current face scalar.

Note

The scalar index is zero-based, and thus should be less than getFaceScalarValuesSlotCount().

Note

Use -1 to indicate no current scalar

Parameters:slotIndex (int) – the current scalar slot index (an int32_t)
setDefaultColor(self, IColor: ORSModel.ors.Color) → None

Sets the mesh default color.

Note

Each color value goes between 0 (none) and 1 (full).

Note

You need to call setUseDefaultColor(TRUE) for the default color to be used.

Note

You need to call initializeVisual after color changes for them to be visible on the screen.

Parameters:IColor (ORSModel.ors.Color) – a color (an Color)
setDefaultMeshAlphaColor(self, value: float) → None

Sets the mesh its default alpha color.

Deprecated since version (unknown): use

Parameters:value (float) – Alpha color (double)
setEdgeCountPerFace(self, value: int) → None
Parameters:value (int) –
setFaceScalarValue(self, nScalarValueSlotIndex: int, scalarValueFaceIndex: int, aValue: float, iTIndex: int) → None

Sets the value of a face scalar.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • scalarValueFaceIndex (int) – the face index (an uint32_t)
  • aValue (float) – the value of a face scalar to set (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValueDescription(self, nScalarValueSlotIndex: int, value: str, iTIndex: int) → None
Parameters:
  • nScalarValueSlotIndex (int) –
  • value (str) –
  • iTIndex (int) –
setFaceScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, pDimensionUnit: ORSModel.ors.DimensionUnit, iTIndex: int) → None

Sets the dimension unit of a face scalar.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • pDimensionUnit (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValueMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a face scalar max value.

Deprecated since version (unknown): use setFaceScalarValuesWindowMax instead

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (a uint16_t)
  • value (float) – scalar max value (a double)
  • iTIndex (int) – time step (a uint32_t)
setFaceScalarValueMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

method setFaceScalarValueMaxs

Deprecated since version (unknown): use setFaceScalarValuesWindowMaxs instead

Parameters:
setFaceScalarValueMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

method setFaceScalarValueMin

Deprecated since version (unknown): use setFaceScalarValuesWindowMin instead

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValueMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

method setFaceScalarValueMins

Deprecated since version (unknown): use setFaceScalarValuesWindowMins instead

Parameters:
setFaceScalarValueOffset(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a face scalar offset value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the scalar offset value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValueOffsets(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Set the face scalar offset values.

Parameters:
  • pScalarValues (ORSModel.ors.ArrayDouble) – scalar offset values (an ArrayDouble)
  • iTIndex (int) – time step (a uint32_t)
setFaceScalarValueSlope(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Gets a face scalar slope value.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (a uint16_t)
  • value (float) – scalar slope value (a double)
  • iTIndex (int) – time step (a uint32_t)
setFaceScalarValueSlopes(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Set the face scalar slope values.

Parameters:
  • pScalarValues (ORSModel.ors.ArrayDouble) – scalar slope values (an ArrayDouble)
  • iTIndex (int) – time step (a uint32_t)
setFaceScalarValueSlotLookUpTable(self, lookUpTable: dict, nScalarValueSlotIndex: int, iTIndex: int) → None
Parameters:
  • lookUpTable (dict) –
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
setFaceScalarValueUnit(self, nScalarValueSlotIndex: int, value: int, iTIndex: int) → None

method setFaceScalarValueUnit

Deprecated since version (unknown): use setFaceScalarValueDimensionUnit instead

Parameters:
  • nScalarValueSlotIndex (int) –
  • value (int) –
  • iTIndex (int) –
setFaceScalarValues(self, pScalarValues: ORSModel.ors.Array, nScalarValueSlotIndex: int, iTIndex: int) → None

Sets the values of a face scalar.

Note

The array of values is of length getFaceCount() * getFaceScalarValuesSlotCount().

Note

The scalar value in the slot s of the face v is located at the index (getFaceScalarValuesSlotCount() * v) + s of the array.

Parameters:
  • pScalarValues (ORSModel.ors.Array) – an array of values (an ArrayFloat)
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesDatatype(self, iSlotIndex: int, nFaceScalarValuesDatatype: int) → None
Parameters:
  • iSlotIndex (int) –
  • nFaceScalarValuesDatatype (int) –
setFaceScalarValuesFromPandaDataFrame(dataFrame, iTIndex=0)
setFaceScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesRangeMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesRangeMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a face scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesSlotCount(self, value: int) → None

Sets the number of slots for face scalar values.

Parameters:value (int) – the number of slots (a uint16_t)
setFaceScalarValuesWindowMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a face scalar max value.

Parameters:
  • nScalarValueSlotIndex (int) – scalar slot index (a uint16_t)
  • value (float) – scalar max value (a double)
  • iTIndex (int) – time step (a uint32_t)
setFaceScalarValuesWindowMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None
Parameters:
setFaceScalarValuesWindowMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

method setFaceScalarValuesWindowMin

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setFaceScalarValuesWindowMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None
Parameters:
setHideOutOfRangeFaceScalarValues(self, value: bool) → None

Indicate if out of range values should be hiden.

Parameters:value (bool) –
setUseDefaultMeshAlphaColor(self, value: bool) → None

Sets the mesh to use its default alpha color.

Deprecated since version (unknown): Use

Parameters:value (bool) – TRUE for using a default alpha color for the mesh, FALSE otherwise (bool)
setUseDefaultMeshColor(self, value: bool) → None

Sets the mesh to use its default color.

Deprecated since version (unknown): use setUseDefaultVertexColor instead

Parameters:value (bool) – TRUE to use the mesh default color, FALSE otherwise
setUseFaceScalarValues(self, value: bool) → None

Gets the status of face scalar values usage.

Parameters:value (bool) –
setVertexScalarValuesFromPandaDataFrame(dataFrame, iTIndex=0)
updateVerticesNormal(self, iTIndex: int) → None
Parameters:iTIndex (int) –

UnstructuredGrid

class ORSModel.ors.UnstructuredGrid

Bases: ORSModel.ors.Node

addUpdateVertexScalar(scalarCollection, scalarName, unit=None, timestep=0)
getAllFeretDiameter(self, dMin: float, dMean: float, dMax: float, iTIndex: int, iAngleSampling: int) → bool

Get Sorted feret diameter.

Parameters:
  • dMin (float) – the T index (a uint32_t)
  • dMean (float) – the angle sampling, steps between each angle iteration (a uint16_t)
  • dMax (float) –
  • iTIndex (int) –
  • iAngleSampling (int) –
Returns:

output (bool) – true if worked, else false (bool)

getBoundingBox(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) → Box
Parameters:
Returns:

output (ORSModel.ors.Box) –

getBoundingBoxAlignWithBox(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4, aBox: ORSModel.ors.Box) → Box
Parameters:
Returns:

output (ORSModel.ors.Box) –

getBoundingBoxPlusEpsilon(timestep, worldMatrix, epsilon=0.01)
getCenterOfMass(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) → Vector3
Parameters:
Returns:

output (ORSModel.ors.Vector3) –

getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getClipBox(timestep=0, display=None)

Gets the clip box of the channel

Parameters:
Returns:

aClipBox (ORSModel.ors.Box) – the clip box

getClosestVertexIndexToPoint(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4, pPoint: ORSModel.ors.Vector3) → int

Gets the index of the closest vertex to a given point.

Note

Return value is -1 if an error occurs of if mesh is empty.

Parameters:
  • iTIndex (int) – a view in which to test (a View)
  • aWorldTransform (ORSModel.ors.Matrix4x4) – the point (an Vector3)
  • pPoint (ORSModel.ors.Vector3) – true if coordinate is supplied in local coordinates, false if in world coordinates
Returns:

output (int) – a vertex index (a int32_t)

getCurrentVertexScalarValuesSlot(self) → int

gets the current vertex scalar.

Note

The scalar index is zero-based, and thus should be less than getVertexScalarValuesSlotCount().

Note

Use -1 to indicate no current scalar

Returns:output (int) – the scalar slot index (an int32_t)
getDefaultVertexAlphaColor(self) → float

Queries the unstructured grid to get its default alpha color.

Returns:output (float) – Default alpha color used for the unstructured grid (a double)
getDefaultVertexColor(self) → Color

Gets the vertex default color of the unstructured grid.

Note

Each color value goes between 0 (none) and 1 (full).

Returns:output (Color) – a color (an Color)
getFeretBox(self, iTIndex: int, iAngleSampling: int) → Box

Get Feret box.

Note

Default value for angle sampling is 5

Parameters:
  • iTIndex (int) – the T index (a uint32_t)
  • iAngleSampling (int) – the angle sampling, steps between each angle iteration (a uint16_t)
Returns:

output (Box) –

getFrameTransformationMatrix(aView)
getHideOutOfRangeVertexScalarValues(self) → bool

Indicate if out of range values should be hiden.

Returns:output (bool) – (a bool)
getMinMaxVertexScalarValue(self, scalarValueSlotIndex: int, iTIndex: int, fMinValue: float, fMaxValue: float) → None
Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
  • fMinValue (float) –
  • fMaxValue (float) –
getMinimalBox(self, iTIndex: int) → Box

Get miminal box (also know as Oriented BoundingBox in litterature)

Parameters:iTIndex (int) – the T index (a uint32_t)
Returns:output (Box) –
getMinimumBoundingBox(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) → Box
Parameters:
Returns:

output (ORSModel.ors.Box) –

getMomentOfInertia(self, iTIndex: int, aWorldTransform: ORSModel.ors.Matrix4x4) → Matrix4x4
Parameters:
Returns:

output (ORSModel.ors.Matrix4x4) –

getNetworkX(timestep=0)
getTSize(self) → int

Gets the number of time steps for the mesh.

Returns:output (int) – a number (a uint32_t)
getUseDefaultVertexAlphaColor(self) → bool

Queries the unstructured grid to see if it uses its default alpha color.

Returns:output (bool) – TRUE if a default alpha color is used for the unstructured grid, FALSE otherwise
getUseDefaultVertexColor(self) → bool

Queries the unstructured grid to see if it uses its default color.

Returns:output (bool) – TRUE if the unstructured grid uses its default color, FALSE otherwise
getUseVertexScalarValues(self) → bool

Sets the mesh to have vertex scalar values or not.

Returns:output (bool) – true to use scalar values, false otherwise
getVertexAtIndex(self, iTIndex: int, vertexIndex: int, x: float, y: float, z: float) → None

Gets a specific vertex.

Parameters:
  • iTIndex (int) – the time step (a uint32_t)
  • vertexIndex (int) – the vertex index (an uint64_t )
  • x (float) – the X value (a double*)
  • y (float) – the Y value (a double*)
  • z (float) – the Z value (a double*)
getVertexCount(self, iTIndex: int) → int

Returns the number of vertices.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (int) – an uint64_t
getVertexDatatype(self) → int
Returns:output (int) –
getVertexScalarSlotIndexForDescription(self, sValue: str, iTIndex: int) → int

Gets the scalar slot index from a vertex scalar description.

Parameters:
  • sValue (str) – the slot description (an std::wstring)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (int) – the index or -1 if not found

getVertexScalarValue(self, scalarValueSlotIndex: int, scalarValueVertexIndex: int, iTIndex: int) → float

Gets the value of a vertex scalar.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (an uint16_t)
  • scalarValueVertexIndex (int) – the vertex index (an uint64_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the value of a vertex scalar (a double)

getVertexScalarValueDescription(self, scalarValueSlotIndex: int, iTIndex: int) → str
Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (str) –

getVertexScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, iTIndex: int) → DimensionUnit

Gets the dimension unit of a vertex scalar.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)

getVertexScalarValueMax(self, scalarValueSlotIndex: int, iTIndex: int) → float

method getVertexScalarValueMax

Deprecated since version (unknown): use getVertexScalarValuesWindowMax instead

Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getVertexScalarValueMaxs(self, iTIndex: int) → ArrayDouble

method getVertexScalarValueMaxs

Deprecated since version (unknown): use getVertexScalarValuesWindowMaxs instead

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getVertexScalarValueMin(self, scalarValueSlotIndex: int, iTIndex: int) → float

method getVertexScalarValueMin

Deprecated since version (unknown): use getVertexScalarValuesWindowMin instead

Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getVertexScalarValueMins(self, iTIndex: int) → ArrayDouble

method getVertexScalarValueMins

Deprecated since version (unknown): use getVertexScalarValuesWindowMins instead

Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getVertexScalarValueOffset(self, scalarValueSlotIndex: int, iTIndex: int) → float

Gets a vertex scalar offset value.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (an uint32_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar offset value (a double)

getVertexScalarValueOffsets(self, iTIndex: int) → ArrayDouble

Get the vertex scalar offset values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayDouble) – the scalar offset value (a double array)
getVertexScalarValueSlope(self, scalarValueSlotIndex: int, iTIndex: int) → float

Get a vertex scalar slope value.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (an uint32_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – the scalar slope value (a double)

getVertexScalarValueSlopes(self, iTIndex: int) → ArrayDouble

Get the vertex scalar slope values.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.ArrayDouble) – the scalar slope value (a double array)
getVertexScalarValueSlotLookUpTable(self, nScalarValueSlotIndex: int, iTIndex: int) → dict
Parameters:
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (dict) –

getVertexScalarValues(self, iSlotIndex: int, iTIndex: int) → Array

Gets the values of a vertex scalar.

Note

The array of values is of length getVertexCount() * getVertexScalarValuesSlotCount().

Note

The scalar value in the slot s of the vertex v is located at the index (getVertexScalarValuesSlotCount() * v) + s of the array.

Parameters:
  • iSlotIndex (int) – the time step (a uint32_t)
  • iTIndex (int) –
Returns:

output (ORSModel.ors.Array) – an array of values (an Array)

getVertexScalarValuesCollection(self) → ScalarValuesCollection
Returns:output (ORSModel.ors.ScalarValuesCollection) –
getVertexScalarValuesDatatype(self, iSlotIndex: int) → int
Parameters:iSlotIndex (int) –
Returns:output (int) –
getVertexScalarValuesId(self, nScalarValueSlotIndex: int, iTIndex: int) → str

Gets the scalar slot id from a vertex scalar values slot.

Parameters:
  • nScalarValueSlotIndex (int) – the index of the slot (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (str) –

getVertexScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a vertex scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getVertexScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a vertex scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getVertexScalarValuesRangeMax(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a vertex scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getVertexScalarValuesRangeMin(self, nScalarValueSlotIndex: int, iTIndex: int) → float

Get a vertex scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (float) – a double

getVertexScalarValuesSlotCount(self) → int

Gets the number of slots for vertex scalar values.

Returns:output (int) – the number of slots (an uint32_t)
getVertexScalarValuesWindowMax(self, scalarValueSlotIndex: int, iTIndex: int) → float
Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getVertexScalarValuesWindowMaxs(self, iTIndex: int) → ArrayDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getVertexScalarValuesWindowMin(self, scalarValueSlotIndex: int, iTIndex: int) → float
Parameters:
  • scalarValueSlotIndex (int) –
  • iTIndex (int) –
Returns:

output (float) –

getVertexScalarValuesWindowMins(self, iTIndex: int) → ArrayDouble
Parameters:iTIndex (int) –
Returns:output (ORSModel.ors.ArrayDouble) –
getVerticeDistancesFromPoint(self, aPoint: ORSModel.ors.Vector3, timeStep: int, outputCollection: ORSModel.ors.ArrayDouble) → ArrayDouble

Get unsigned distance between the point and the the vertices of theMesh.

Parameters:
  • aPoint (ORSModel.ors.Vector3) – aPoint (Vector3 )
  • timeStep (int) – timeStep of the receiving Mesh to considered (a uint32_t)
  • outputCollection (ORSModel.ors.ArrayDouble) – output ArrayDouble, can be None (ArrayDouble)
Returns:

output (ORSModel.ors.ArrayDouble) – the Output ArrayDouble (ArrayDouble)

getVertices(self, iTIndex: int) → Array

Gets the vertices.

Parameters:iTIndex (int) – the time step (a uint32_t)
Returns:output (ORSModel.ors.Array) – an array of float (an Array)
getVerticesIndicesIncludedInBox(self, aBox: ORSModel.ors.Box, iTIndex: int) → ArrayUnsignedLong

Get all the indices of vertices that are include in the provided box.

Parameters:
  • aBox (ORSModel.ors.Box) – the box (Box)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (ORSModel.ors.ArrayUnsignedLong) – -an array containing all the vertices include in the box (ArrayUnsignedLong)

getVerticesIndicesNotIncludedInBox(self, aBox: ORSModel.ors.Box, iTIndex: int) → ArrayUnsignedLong

Get all the indices of vertices that are not include in the provided box.

Parameters:
  • aBox (ORSModel.ors.Box) – the box (Box)
  • iTIndex (int) – the time step (a uint32_t)
Returns:

output (ORSModel.ors.ArrayUnsignedLong) – -an array containing all the vertices include in the box (ArrayUnsignedLong)

logOOMError(log)
mapScalarValuesFromAMultiROI(self, referenceMultiROI: ORSModel.ors.MultiROI, multiROIScalarValueSlotIndex: int, sourceScalarValuesSlotIndex: int, multiROITIndex: int, sourceTIndex: int, aDefaultScalarValue: float) → None

Map a scalar values slot from aMultiROI to a unstructured grid.

Parameters:
  • referenceMultiROI (ORSModel.ors.MultiROI) – the multiROI modele (an MultiROI)
  • multiROIScalarValueSlotIndex (int) – the index of the MultiROI scalar values slot to map (a uint16_t)
  • sourceScalarValuesSlotIndex (int) – the index of the destination scalar values lot (a uint16_t)
  • multiROITIndex (int) – the multiROI time step (a uint32_t)
  • sourceTIndex (int) – the unstructured grid time step (a uint32_t)
  • aDefaultScalarValue (float) – a default scalar value in case that no match is possible for a vertex between the structured grid and the MultiROI (a double)
mapScalarValuesFromChannel(self, aReferenceChannel: ORSModel.ors.Channel, sourceScalarValuesSlotIndex: int, channelTimeStep: int, sourceTIndex: int, aDefaultScalarValue: float) → None

Map aChannel to a unstructured grid.

Parameters:
  • aReferenceChannel (ORSModel.ors.Channel) – the Channel modele (an Channel)
  • sourceScalarValuesSlotIndex (int) – the index of the destination scalar values lot (a uint16_t)
  • channelTimeStep (int) – the channel time step (a uint32_t)
  • sourceTIndex (int) – the unstructured grid time step (a uint32_t)
  • aDefaultScalarValue (float) – a default scalar value in case that no match is possible for a vertex between the structured grid and the MultiROI (a double)
none() → UnstructuredGrid

Returns a none object, equivalent to a non-existent object (or null).

Returns:output (UnstructuredGrid) –
offsetVertices(self, x: float, y: float, z: float) → None

Offsets the mesh vertices.

Note

Each vertice is offset by the given relative coordinates.

Parameters:
  • x (float) – an X offset value (a double)
  • y (float) – a Y offset value (a double)
  • z (float) – a Z offset value (a double)
removeAVertexScalarValuesSlot(self, nScalarValueSlotIndex: int) → None

Remove a scalar slot from the vertex scalars values slot.

Parameters:nScalarValueSlotIndex (int) – the index of the slot to be removed (a uint16_t)
setCurrentVertexScalarValuesSlot(self, nCurrentScalarValueSlotIndex: int) → None

Sets the current vertex scalar.

Note

The scalar index is zero-based, and thus should be less than getVertexScalarValuesSlotCount().

Note

Use -1 to indicate no current scalar

Parameters:nCurrentScalarValueSlotIndex (int) – the scalar slot index (a int32_t, see not)
setDefaultVertexAlphaColor(self, value: float) → None

Sets the unstructured grid its default alpha color.

Parameters:value (float) – Alpha color (double)
setDefaultVertexColor(self, color: ORSModel.ors.Color) → None

Sets the vertex default color of the unstructured grid.

Note

Each color value goes between 0 (none) and 1 (full).

Note

You need to call getUseDefaultVertexColor(true) for the default color to be used.

Note

You need to call initializeVisual after color changes for them to be visible on the screen.

Parameters:color (Color) – a color (an Color)
setHideOutOfRangeVertexScalarValues(self, value: bool) → None

Indicate if out of range values should be hiden.

Parameters:value (bool) –
setOutOfRangeScalarValue(self, value: float) → None

Sets a scalar out or range value.

Parameters:value (float) – the value (a float)
setTSize(self, tSize: int) → None

Sets the number of time steps for the mesh.

Parameters:tSize (int) – a number (a uint32_t)
setUseDefaultVertexAlphaColor(self, value: bool) → None

Sets the unstructured grid to use its default alpha color.

Parameters:value (bool) – TRUE for using a default alpha color for the unstructured grid, FALSE otherwise (bool)
setUseDefaultVertexColor(self, value: bool) → None

Sets the unstructured grid to use its vertex default color.

Parameters:value (bool) – TRUE to use the default color, FALSE otherwise
setUseVertexScalarValues(self, value: bool) → None

Gets the status of vertex scalar values usage.

Parameters:value (bool) –
setVertexAtIndex(self, iTIndex: int, vertexIndex: int, x: float, y: float, z: float) → None

Sets a specific vertex.

Parameters:
  • iTIndex (int) – the time step (a uint32_t)
  • vertexIndex (int) – the vertex index (an uint64_t)
  • x (float) – the X value (a double)
  • y (float) – the Y value (a double)
  • z (float) – the Z value (a double)
setVertexDatatype(self, nVertexDatatype: int) → None
Parameters:nVertexDatatype (int) –
setVertexScalarValue(self, scalarValueSlotIndex: int, scalarValueVertexIndex: int, aValue: float, iTIndex: int) → None

Sets the value of a vertex scalar.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (an uint32_t)
  • scalarValueVertexIndex (int) – the vertex index (an uint32_t)
  • aValue (float) – the value of a vertex scalar to set (a double)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValueDescription(self, scalarValueSlotIndex: int, value: str, iTIndex: int) → None
Parameters:
  • scalarValueSlotIndex (int) –
  • value (str) –
  • iTIndex (int) –
setVertexScalarValueDimensionUnit(self, nScalarValueSlotIndex: int, pDimensionUnit: ORSModel.ors.DimensionUnit, iTIndex: int) → None

Sets the dimension unit of a vertex scalar.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • pDimensionUnit (ORSModel.ors.DimensionUnit) – the dimension unit (a DimensionUnit)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValueMax(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None

method setVertexScalarValueMax

Deprecated since version (unknown): use setVertexScalarValuesWindowMax instead

Parameters:
  • scalarValueSlotIndex (int) –
  • value (float) –
  • iTIndex (int) –
setVertexScalarValueMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

method setVertexScalarValueMaxs

Deprecated since version (unknown): use setVertexScalarValuesWindowMaxs instead

Parameters:
setVertexScalarValueMin(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None

method setVertexScalarValueMin

Deprecated since version (unknown): use setVertexScalarValuesWindowMin instead

Parameters:
  • scalarValueSlotIndex (int) –
  • value (float) –
  • iTIndex (int) –
setVertexScalarValueMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

method setVertexScalarValueMins

Deprecated since version (unknown): use setVertexScalarValuesWindowMins instead

Parameters:
setVertexScalarValueOffset(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None

Sets a vertex scalar offset value.

Parameters:
  • scalarValueSlotIndex (int) – the scalar slot index (an uint32_t)
  • value (float) – the scalar offset value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValueOffsets(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Set the vertex scalar offset values.

Parameters:
  • pScalarValues (ORSModel.ors.ArrayDouble) – scalar offset value (a double array)
  • iTIndex (int) – time step (a uint32_t)
setVertexScalarValueSlope(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a vertex scalar slope value.

Parameters:
  • scalarValueSlotIndex (int) – scalar slot index (an uint32_t)
  • value (float) – scalar slope value (a double)
  • iTIndex (int) – time step (a uint32_t)
setVertexScalarValueSlopes(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None

Set the vertex scalar slope values.

Parameters:
  • pScalarValues (ORSModel.ors.ArrayDouble) – scalar slope value (a double array)
  • iTIndex (int) – time step (a uint32_t)
setVertexScalarValueSlotLookUpTable(self, lookUpTable: dict, nScalarValueSlotIndex: int, iTIndex: int) → None
Parameters:
  • lookUpTable (dict) –
  • nScalarValueSlotIndex (int) –
  • iTIndex (int) –
setVertexScalarValueUnit(self, scalarValueSlotIndex: int, value: int, iTIndex: int) → None

setVertexScalarValueUnit

Deprecated since version (unknown): use setVertexScalarValueDimensionUnit instead

Parameters:
  • scalarValueSlotIndex (int) –
  • value (int) –
  • iTIndex (int) –
setVertexScalarValues(self, pScalarValues: ORSModel.ors.Array, iSlotIndex: int, iTIndex: int) → None

Sets the values of a vertex scalar.

Note

The array of values is of length getVertexCount() * getVertexScalarValuesSlotCount().

Note

The scalar value in the slot s of the vertex v is located at the index (getVertexScalarValuesSlotCount() * v) + s of the array.

Parameters:
  • pScalarValues (ORSModel.ors.Array) – an array of values (an Array)
  • iSlotIndex (int) – the the time step (a uint32_t)
  • iTIndex (int) –
setVertexScalarValuesDatatype(self, iSlotIndex: int, nVertexScalarValuesDatatype: int) → None
Parameters:
  • iSlotIndex (int) –
  • nVertexScalarValuesDatatype (int) –
setVertexScalarValuesRangeBoundaryMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a vertex scalar range max boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValuesRangeBoundaryMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a vertex scalar range min boundary value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValuesRangeMax(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a vertex scalar range max value.

Parameters:
  • nScalarValueSlotIndex (int) – the slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValuesRangeMin(self, nScalarValueSlotIndex: int, value: float, iTIndex: int) → None

Set a vertex scalar range min value.

Parameters:
  • nScalarValueSlotIndex (int) – the scalar slot index (a uint16_t)
  • value (float) – the value (a double)
  • iTIndex (int) – the time step (a uint32_t)
setVertexScalarValuesSlotCount(self, value: int) → None

Sets the number of slots for vertex scalar values.

Parameters:value (int) – the number of slots (an uint32_t)
setVertexScalarValuesWindowMax(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None
Parameters:
  • scalarValueSlotIndex (int) –
  • value (float) –
  • iTIndex (int) –
setVertexScalarValuesWindowMaxs(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None
Parameters:
setVertexScalarValuesWindowMin(self, scalarValueSlotIndex: int, value: float, iTIndex: int) → None
Parameters:
  • scalarValueSlotIndex (int) –
  • value (float) –
  • iTIndex (int) –
setVertexScalarValuesWindowMins(self, pScalarValues: ORSModel.ors.ArrayDouble, iTIndex: int) → None
Parameters:
setVertices(self, pVertices: ORSModel.ors.Array, iTIndex: int) → None

Sets the vertices.

Parameters:
  • pVertices (ORSModel.ors.Array) – the vertices(an Array)
  • iTIndex (int) – the time step (a uint32_t)
toWorld(iTIndex, setDataDirty=True)

Node

class ORSModel.ors.Node

Bases: ORSModel.ors.Managed

brief_description: An abstract class for any object that can be a node in the visualization flow. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

addTransformationToStack(matrix, registrationMethod=None)
attachChild(self, anINode: ORSModel.ors.Node) → bool

Attaches a child node.

Note

Certain parent-child relationships are forbidden, hence the need to verify the result.

Note

Calling this method several times will still result in the child node only appearing once in its parent.

Parameters:anINode (ORSModel.ors.Node) – the node to attach (a Node)
Returns:output (bool) – true if child was attached, false otherwise
attachChildAtIndex(self, anINode: ORSModel.ors.Node, index: int) → bool

Attaches a child node at a given index.

Note

Certain parent-child relationships are forbidden, hence the need to verify the result.

Note

Calling this method several times will still result in the child node only appearing once in its parent.

Parameters:
  • anINode (ORSModel.ors.Node) – the node to attach (a Node)
  • index (int) – the index (a uint32_t)
Returns:

output (bool) – true if child was attached, false otherwise

copyGraph(self) → Node

Returns a copy of the node, including its graph.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Returns:output (ORSModel.ors.Node) – a new node (a Node)
detachChild(self, anINode: ORSModel.ors.Node) → bool

Detaches a child node.

Parameters:anINode (ORSModel.ors.Node) – the node to detach (a Node)
Returns:output (bool) – true if child was detached, false otherwise
getAllChildrenNodes(self) → List

Returns a flattened list of the child hierarchy of the node.

Note

The child hierarchy is flattened.

Note

Expect no particular ordering of the nodes.

Returns:output (ORSModel.ors.List) – a list of all nodes below the node (a List)
getAllChildrenOfClass(self, pProgId: str) → List

Returns all the nodes of the specified class found in the child hierarchy.

Note

Result will be an empty list if no match is found.

Note

The search is done breadth-first.

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of nodes (a List)
getAllChildrenOfClassReachableByRenderer(self, pProgId: str) → List

Returns a flattened list of all the child nodes, of the given class, that are renderable.

Note

The list contains only Managed objects (they will need to be typecast to the appropriate class).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of all child nodes that can be rendered (an List)
getAllParentNodes(self) → List

Returns a flattened list of the parent hierarchy of the node.

Note

The parent hierarchy is flattened.

Note

Expect no particular ordering of the nodes.

Returns:output (ORSModel.ors.List) – a list of all nodes above the node (an List)
getAllParentsOfClass(self, pProgId: str) → List

Returns all the nodes of the specified class found in the parent hierarchy.

Note

Result will be an empty list if no match is found.

Note

The search is done breadth-first.

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of nodes (an List)
getChildWithGUID(self, aGUID: str) → Node

Gets an immediate child node with the given GUID.

Note

Only immediate children are searched.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:aGUID (str) – a GUID (a string)
Returns:output (ORSModel.ors.Node) – a child node if found (a Node), none() otherwise
getChildWithTitle(self, aTitle: str) → Node

Gets an immediate child node with the given title.

Note

Only immediate children are searched.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:aTitle (str) – a string (a string)
Returns:output (ORSModel.ors.Node) – a child node if found (a Node), none() otherwise
getChildrenNodes(self) → List

Returns the list of immediate child nodes.

Returns:output (ORSModel.ors.List) – a list of nodes (an List)
getChildrenOfClass(self, pProgId: str) → List

Returns the nodes of the specified class found in the immediate children.

Note

Result will be an empty list if no match is found.

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of nodes (an List)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getFirstChildOfClass(self, pProgId: str) → Node

Returns the first object of the specified class found in the child hierarchy.

Note

The search is done breadth-first.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.Node) – a node if one exists (a Node), none() otherwise
getFirstChildOfClassAndPrivateTitle(self, pProgId: str, privateTitle: str) → Node

Searches the hierarchy for a child node with the specified class and private title.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:
  • pProgId (str) – the ProgId of the class to test against (a string)
  • privateTitle (str) – some text (a string)
Returns:

output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise

getFirstFrameTowardsNode(self, anINode: ORSModel.ors.Node) → ReferenceFrame

Gets the first frame found going up the hierarchy towards a given object.

Parameters:anINode (ORSModel.ors.Node) – the target node (an Node)
Returns:output (ORSModel.ors.ReferenceFrame) – a frame (an ReferenceFrame) or none if no frame is found
getFirstNodeWithClassNameTowardsNode(self, pProgId: str, anINode: ORSModel.ors.Node) → Node

Searches the hierarchy for a parent node with the specified class toward a specific parent nopde.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:
  • pProgId (str) – the ProgId of the class to test against (a string)
  • anINode (ORSModel.ors.Node) – a target node
Returns:

output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise

getFirstParentOfClass(self, pProgId: str) → Node

Returns the first object of the specified class found in the parent hierarchy.

Note

The search is done breadth-first.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.Node) – a node if one exists (a Node), none() otherwise
getFirstParentOfClassAndPrivateTitle(self, pProgId: str, privateTitle: str) → Node

Searches the hierarchy for a parent node with the specified class and private title.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:
  • pProgId (str) – the ProgId of the class to test against (a string)
  • privateTitle (str) – some text (a string)
Returns:

output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise

getFrameTransformationFromNode(self, towardNode: ORSModel.ors.Node, pTimeStep: int) → Matrix4x4
Parameters:
Returns:

output (ORSModel.ors.Matrix4x4) –

getImmediateChildOfClass(self, pProgId: str) → Node

Searches for a child node with the specified class.

Note

Only the immediate children are searched, not the hierarchy.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise
getImmediateParentOfClass(self, pProgId: str) → Node

Searches for a parent node with the specified class.

Note

Only the immediate parents are searched, not the hierarchy.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.Node) – a node if it exists (a Node), none() otherwise
getImmediateParentWithGUID(self, pGUID: str) → Node

Gets a parent node with the given GUID.

Note

Only immediate parents are searched.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:pGUID (str) – a GUID (a string)
Returns:output (ORSModel.ors.Node) – a parent node if found (a Node), none() otherwise
getIsNodeOneOfMyAscendants(self, anINode: ORSModel.ors.Node) → bool

Checks to see if a specified node is in the parent hierarchy of the node.

Note

The parent hierarchy is searched in its entirety for the specified node.

Note

The search is conducted depth-first.

Parameters:anINode (ORSModel.ors.Node) –
Returns:output (bool) – true if the specified node in the parent hierarchy, false otherwise
getIsNodeOneOfMyDescendants(self, anINode: ORSModel.ors.Node) → bool

Checks to see if a specified node is in the child hierarchy of the node.

Note

The child hierarchy is searched in its entirety for the specified node.

Note

The search is conducted depth-first.

Parameters:anINode (ORSModel.ors.Node) –
Returns:output (bool) – true if the specified node in the child hierarchy, false otherwise
getMaxTSizeOfChilden(self) → int

Get Maximum T Size of all children node of this node.

Returns:output (int) –
getParentNodes(self) → List

Gets the immediate parent nodes.

Returns:output (ORSModel.ors.List) – a list of nodes (a List)
getParentWithGUID(self, pGUID: str) → Node

Gets a parent node (from the hierarchy) with the given GUID.

Note

The whole parent hierarchy is searched.

Note

The search is done breadth-first.

Note

You can type the return value of this method to any subclass of ORSNode, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be none().

Parameters:pGUID (str) – a GUID (a string)
Returns:output (ORSModel.ors.Node) – a parent node if found (a Node), none() otherwise
getParentsOfClass(self, pProgId: str) → List

Returns the nodes of the specified class found in the immediate parents.

Note

Result will be an empty list if no match is found.

Note

Use constants defined in ORS_def.h for ProgIds (ex: ORSFrameProgId).

Parameters:pProgId (str) – the ProgId of the class to test against (a string)
Returns:output (ORSModel.ors.List) – a list of nodes (a List)
getVisual(self) → Visual

Gets the visual of a model. Some models have a visual, e.g.Channel has VisualChannel as Visual.

Returns:output (ORSModel.ors.Visual) – the visual of a model (a Visual)
none() → Node

Returns a none object, equivalent to a non-existent object (or null).

Returns:output (Node) –
propagateChildrenNodesOrganizationDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsChildrenNodesOrganizationDirty

Parameters:includeSelf (bool) – True includes the receiver in the propagation, False doesn’t
propagateDataDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsDataDirty

Parameters:includeSelf (bool) – True includes the receiver in the propagation, False doesn’t
propagateDirty(self, dirtyFlag: str, includeSelf: bool) → None

Causes a dirty message to be sent to all children nodes.

Note

See ORS_def.h for default dirty flag (ex: ORSDataDirty).

Note

A dirty message has different results for different objects, but generally causes a refresh on the data.

Note

Message propagation is done depth-first.

Parameters:
  • dirtyFlag (str) – a string dirty flag (a string)
  • includeSelf (bool) – should set this dirty (a bool)
propagateGeometryDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsGeometryDirty

Parameters:includeSelf (bool) – True includes the receiver in the propagation, False doesn’t
propagateHighlightDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsHighlightDirty

Parameters:includeSelf (bool) – True includes the receiver in the propagation, False doesn’t
propagatePropertyDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsPropertyDirty

Parameters:includeSelf (bool) – True includes the receiver in the propagation, False doesn’t
propagateVisibilityDirty(includeSelf=False)

Calls for a propagateDirty with the flag OrsVisibilityDirty

Parameters:includeSelf (bool) – True includes the receiver in the propagation, False doesn’t
refresh()

Refreshes the views related to the current object

refreshAll2DParentViews(self) → None

Causes all 3D views in the parent hierarchy of the node to be refreshed.

refreshAll2DParentViewsIfVisible(self) → None

Causes all 2D views in the parent hierarchy of the node to be refreshed if it is a model and it visuals are visible in the views.

refreshAll3DParentViews(self) → None

Causes all 3D views in the parent hierarchy of the node to be refreshed.

refreshAll3DParentViewsIfVisible(self) → None

Causes all 3D views in the parent hierarchy of the node to be refreshed if it is a model and it visuals are visible in the views.

refreshAllParentViews(self) → None

Causes all views in the parent hierarchy of the node to be refreshed.

refreshAllParentViewsIfVisible(self) → None

Causes all views in the parent hierarchy of the node to be refreshed if it is a model and it visuals are visible in the views.

setAllowRenderingInAllParentViews(self, bValue: bool) → None

Allows or prevents rendering in the views affected by a node.

Parameters:bValue (bool) – true to allow rendering, false to disallow it.
switchOrderOfPrecedenceOfChildrenNodes(self, anINode1: ORSModel.ors.Node, anINode2: ORSModel.ors.Node) → bool

Rearranges the order of child nodes.

Note

When child nodes are not in the desired order, they can be switched with this method (for example, the order in which they are rendered can be undesired).

Note

Both nodes are swapped in the list of nodes. For example, if nodes are A B C D and this call is made switchOrderOfPrecedenceOfChildrenNodes(A, C), the nodes are then in this order: C B A D.

Note

This method dives down in the child hierarchy until it finds a node where both arguments appear, then performs the switch at that level.

Parameters:
Returns:

output (bool) – true if successful, false otherwise

switchOrderOfPrecedenceOfParentNodes(self, anINode1: ORSModel.ors.Node, anINode2: ORSModel.ors.Node) → bool

Rearranges the ordering of immediate parent nodes.

Note

When parent nodes are not in the desired order, they can be switched with this method.

Note

Both nodes are swapped in the list of nodes. For example, if nodes are A B C D and this call is made switchOrderOfPrecedenceOfParentNodes(A, C), the nodes are then in this order: C B A D.

Note

This method acts only on immediate parent nodes, not the entire parent hierarchy.

Parameters:
Returns:

output (bool) – true if successful, false otherwise

Managed

class ORSModel.ors.Managed

Bases: ORSModel.ors.ORSBaseClass

brief_description: An abstract class that implements all the default behavior of managed objects. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

addCallbackToEvent(self, anEventName: str, sCallbackName: str, callbackData: int) → bool

Adds a callback subscription to an event.

Note

The callback name for a given event needs to be unique for that event, i.e. no two callbacks for a given event can have the same name.

Parameters:
  • anEventName (str) – name of the event to subscribe to (a string)
  • sCallbackName (str) – callback name (a string)
  • callbackData (int) – a pointer to a ORS_EVENT_CALLBACK_INFO structure
Returns:

output (bool) – true if subscription succeeded, false otherwise

addToDeleteSet(self, anIObject: ORSModel.ors.Managed) → None

Add an object to the delete set.

Note

All objects have a delete set, which designates those objects that should also be deleted when the receiver gets deleted.

Parameters:anIObject (ORSModel.ors.Managed) – an object (a Managed)
addToSelection(contextInstance)

Adds the instance to the selection of a context

Parameters:contextInstance (plugin instance) – context instance

Note

Only representable object can be selected

applyPreferences()

Helper for setting the attribute of the object following the preferences

atomicLoad(sFilename: str, bPreserveIdentity: bool) → Managed

Creates an object from a file where an object was save.

Parameters:
  • sFilename (str) – path of the file to load
  • bPreserveIdentity (bool) – if true, preserves the identity of the object, false otherwise
Returns:

output (Managed) – a managed object, or none() if the load fails

atomicLoadFrom(self, anXML: str) → None

Loads an object from an XML string.

Parameters:anXML (str) –

Managed.atomicLoadFrom(self, buffer: int, nBytes: int) -> None

Loads an object from a buffer. Used for python pickling.

Parameters:
  • buffer (bytes) – the buffer
  • nBytes (int) – the number of bytes in the buffer (a 64 bit unsigned int)
atomicLoadSpecificNode(self, aFilename: str, aXPathOfTheNodeToLoad: str) → bool

Loads an object from a file containing several objects.

Parameters:
  • aFilename (str) –
  • aXPathOfTheNodeToLoad (str) –
Returns:

output (bool) –

atomicSave(self, aFilename: str, isTemporary: bool) → int

Saves the object to a file.

Parameters:
  • aFilename (str) – path of the file to save
  • isTemporary (bool) – if true, try to keep file in memory
Returns:

output (int) – 0 if successful, otherwise an error code

copy(self) → Managed

Returns a copy of the managed.

Note

Only the immediate attributes of the managed are copied. The graph surrounding the new managed is the same one as the source managed.

Note

You can type the return value of this method to any subclass of Managed, if you know the class of the object being retrieved. If its class doesn’t match the type specified the return will be NULL.

Returns:output (ORSModel.ors.Managed) – a new managed (a Managed)
createScalarValuesCollection(self) → None
deleteObject(self) → None

Explicitly deletes the core object wrapped by this Interface object.

deleteObjectAndAllItsChildren(self) → None

Explicitly deletes the core object wrapped by this Interface object, along with all its children.

getAllGroupsContaining(self, anIObject: ORSModel.ors.Managed) → List

Gets all the groups that contain the given object.

Parameters:anIObject (ORSModel.ors.Managed) –
Returns:output (ORSModel.ors.List) –
classmethod getAllInstances()
getAllInstancesOf(pProgId: str) → List

Gathers all existing objects of the specified class.

Parameters:pProgId (str) –
Returns:output (ORSModel.ors.List) –
classmethod getAllObjectsOfClass(cls_name)
getAllObjectsOfClassAndPrivateTitle(pProgId: str, pPrivateTitle: str) → List

Gathers all existing objects of the specified class, that have a matching private title.

Parameters:
  • pProgId (str) – name of the class (a string)
  • pPrivateTitle (str) – private title to search for (a string)
Returns:

output (ORSModel.ors.List) – all the objects that match the search criteria (a List)

getAllObjectsOfClassAndTitle(pProgId: str, pTitle: str) → List

Gathers all existing objects of the specified class, that have a matching title.

Parameters:
  • pProgId (str) – name of the class (a string)
  • pTitle (str) – title to search for (a string)
Returns:

output (ORSModel.ors.List) – all the objects that match the search criteria (a List)

getAllObjectsOfClassAndUserData(pProgId: str, userDataKey: str, userDataValue: str) → List

Gathers all existing objects of the specified class, that have a matching user data.

Parameters:
  • pProgId (str) – name of the class (a string)
  • userDataKey (str) – key of the user data (a string)
  • userDataValue (str) – value to look for (a string)
Returns:

output (ORSModel.ors.List) – all the objects that match the search criteria (a List)

classmethod getAllRepresentableInstances()
getAllRepresentableInstancesOf(pProgId: str) → List

Gathers all existing objects of the specified class that are representable.

Parameters:pProgId (str) –
Returns:output (ORSModel.ors.List) –
getAllRepresentableObjects(self) → List

Gets all the representable objects of the world.

Returns:output (ORSModel.ors.List) – a list containing all the representable objects
classmethod getAllSubclasses(outputCollection=None)
getAtomicTextRepresentation(self, bSelfContained: bool) → str

Retrieves the object’s atomic text representation.

Parameters:bSelfContained (bool) –
Returns:output (str) –
getBinaryUserInfo(self, pTag: str) → None

Retrieves a user defined binary value. Typed as void* for sip, but it’s in reality an unsigned char*.

Note

If the key doesn’t exist, nullptr is returned

Parameters:pTag (str) – key of the data (a string)
getBinaryUserInfoAsBytes(name)
getBinaryUserInfoSize(self, pTag: str) → int

Retrieves the size of a user defined binary value.

Note

If the key doesn’t exist, 0 is returned

Parameters:pTag (str) – key of the data (a string)
Returns:output (int) – the size of the data (a uint32_t)
getCallbacksEnabled(self) → bool

Queries the object to know if its callbacks are enabled or disabled.

Returns:output (bool) – true if callbacks are enabled, false otherwise
getChildrenNodesOrganizationDirtySignature()

Gets the current dirty signature for the flag OrsChildrenNodesOrganizationDirty

Returns:childrenNodesOrganizationDirtySignature (int) – the dirty signature
classmethod getClassDenomination()
static getClassFromProgId(progId)
getClassName(self) → str

Retrieves the class name of the core object wrapped by this Interface object.

Returns:output (str) – the class name (a string)
getClassNameStatic() → str

getClassNameStatic

Returns:output (str) –
getCreationTime(self) → int

Returns the time Number of seconds since Jan 1 2000 of creation of this object.

Returns:output (int) – a uint32_t
getDataChecksum(self) → str
Returns:output (str) –
getDataDirtySignature()

Gets the current dirty signature for the flag OrsDataDirty

Returns:dataDirtySignature (int) – the dirty signature
getDirtySignature(self, dirtyFlag: str) → int

Gets the current dirty signature.

Note

Objects can be dirty for several aspects, see the ors_def.h file for the different dirty aspects.

Parameters:dirtyFlag (str) – dirty flag name (a string, see note below)
Returns:output (int) – dirty signature (a uint64_t)
getEntireDirtySignature(self) → int

Gets the current dirty signature for all aspects, added up.

Note

Objects can be dirty for several aspects, see the ors_def.h file for the different dirty aspects.

Returns:output (int) – entire dirty signature (a uint64_t)
getEventCallbackEnabled(self, sEventName: str, sCallbackName: str) → bool

Gets the enabled state of a callback subscription to an event.

Parameters:
  • sEventName (str) – event name (a string)
  • sCallbackName (str) – callback name (a string)
Returns:

output (bool) – true if callback is enabled, false if disabled or if the callback subscription did not exist

getGUID(self) → str

Retrieves the GUID of the core object.

Note

The GUID is the unique identifier of the object. No two objects can have the same GUID. Once you have an object’s GUID, at any time you can obtain a reference to that object via its GUID, given that the object is still alive.

Returns:output (str) –
getGeometryDirtySignature()

Gets the current dirty signature for the flag OrsGeometryDirty

Returns:geometryDirtySignature (int) – the dirty signature
getHasCallbacksForEvent(self, anEventName: str) → bool

Checks if the receiver has any callbacks for an event.

Parameters:anEventName (str) – name of the event (a string)
Returns:output (bool) –
getHighlightDirtySignature()

Gets the current dirty signature for the flag OrsHighlightDirty

Returns:highlightDirtySignature (int) – the dirty signature
getIsAllowedToBeDeletedInContext(pluginInstance=None)
getIsAvailableInContext(pluginInstance=None)
getIsDirty(self, dirtyFlag: str) → bool

Gets if the object is dirty for a specific dirty flag.

Parameters:dirtyFlag (str) – dirty flag name (a string, see note below)
Returns:output (bool) – true if object is dirty, false otherwise
getIsDirtyAnyDirtyFlag(self) → bool

Gets if the object is dirty for any of the dirty flags.

Returns:output (bool) – true if object is dirty, false otherwise
getIsEqualTo(self, aManaged: ORSModel.ors.Managed) → bool

Checks if the two objects are equal.

Parameters:aManaged (ORSModel.ors.Managed) – an object to compare with (a Managed)
Returns:output (bool) – true if the receiver and the argument are equal (class dependent), false otherwise
getIsExclusiveToContext(pluginInstance=None)
getIsIdentityPreservedForPickling(self) → bool

Returns True if the GUID is preserved when pickling and unpickling an object.

Returns:output (bool) – Returns True if the GUID is preserved when pickling and unpickling an object
getIsInDeleteSet(self, anIObject: ORSModel.ors.Managed) → bool

Gets if an object is included in the receiver delete set.

Note

The delete set is a list of objects that are to be deleted when the receiver is deleted.

Parameters:anIObject (ORSModel.ors.Managed) – object to look for in the receiver delete set (a Managed)
Returns:output (bool) – true if the object is in the delete set of the receiver, false otherwise
getIsInstanceOf(self, pProgId: str) → bool

Queries the object to know if it is an instance of a certain class.

Parameters:pProgId (str) –
Returns:output (bool) –
getIsInstanceOfAtLeastOneClasses(progIdList)
getIsModifiedAnyAspect()
getIsPrivateInContext(pluginInstance=None)
getIsPublicInAllContexts()
getIsRepresentable(self) → bool

Queries the object to know if it is representable.

Returns:output (bool) –
getIsSameObjectAs(self, anObject: ORSModel.ors.Managed) → bool

Checks to see if the receiver wraps the same underlying object as the supplied argument.

Parameters:anObject (ORSModel.ors.Managed) – an object to compare with (a Managed)
Returns:output (bool) – true if underlying object is the same for both the receiver and the argument, false otherwise
classmethod getIsSubclassOf(parentClass)
getIsToBeKeptAliveUntilExit(self) → bool

Queries the object to know if it is permanent for the life of the application.

Note

Permanent objects survive a new session, i.e. they live until the application is terminated.

Returns:output (bool) – true if object is permanent, false otherwise
getIsToBeSaved(self) → bool

Queries the object to know if it should be saved in a session file.

Returns:output (bool) – true if object should be saved, false otherwise
getMetadataChecksum(self) → str
Returns:output (str) –
getObjectWithGUID(guid: str) → Managed

Retrieves an object from its GUID.

Parameters:guid (str) – a GUID (a string)
Returns:output (ORSModel.ors.Managed) – An object or none if object is not found
getPrivateTitle(self) → str

Gets the private title of the object.

Note

The private title is never shown in the application, but is a means by which an object can be found (getAllObjectsOfClassAndPrivateTitle for example).

Returns:output (str) – private title of the object (a string)
getPropertyDirtySignature()

Gets the current dirty signature for the flag OrsPropertyDirty

Returns:propertyDirtySignature (int) – the dirty signature
getPythonRepresentation(self) → str

Gets a Python evaluable string representation.

Returns:output (str) – The object’s representation (a string)
getReferenceCount(self) → int

Returns the count of references to the object.

Returns:output (int) – the count of references (an int)
getScalarValuesCollection(self) → ScalarValuesCollection
Returns:output (ORSModel.ors.ScalarValuesCollection) –
getTitle(self) → str

Gets the title of the object.

Returns:output (str) – the title (a string)
getUserInfo(self, pTag: str) → str

Retrieves a user defined value.

Note

If the key doesn’t exist an empty string is returned.

Parameters:pTag (str) – key of the data (a string)
Returns:output (str) – the data (a string)
getUserInfoAsArray(self) → ArrayString

Retrieves the user info as a string array.

Note

The user info data is flattened into an array of string pairs, for the key and the value.

Returns:output (ORSModel.ors.ArrayString) – the data (an ArrayString, see note below)
getUserInfoPickledObject(name)
getVisibilityDirtySignature()

Gets the current dirty signature for the flag OrsVisibilityDirty

Returns:visibilityDirtySignature (int) – the dirty signature
isManaged(self) → bool
Returns:output (bool) –
isNone(self) → bool

check if the object is none

Returns:output (bool) –
isNotNone(self) → bool

check if the object is Not none

Returns:output (bool) –
none() → Managed

Returns a none object, equivalent to a non-existent object (or null).

Returns:output (Managed) –
publish()

Sets an object as representable and notifies the Dragonfly UI of a new available object

removeBinaryUserInfo(self, pTag: str) → None

Removes a user defined binary value.

Parameters:pTag (str) – key name of the binary value (a string)
removeCallbackFromEvent(guid: str, sEventName: str, sCallbackName: str, bRemoveInDeletedObject: bool) → bool

Removes a callback subscription to an event.

Parameters:
  • guid (str) – object GUID (a string)
  • sEventName (str) – name of the callback event (a string)
  • sCallbackName (str) – name of the callback (a string)
  • bRemoveInDeletedObject (bool) – if true, the callback will be removed from the object even if that object is in the process of being deleted (a boolean)
Returns:

output (bool) – true callback existed, false otherwise

removeFromDeleteSet(self, anIObject: ORSModel.ors.Managed) → None

Remove an object from the delete set.

Note

The delete set is a list of objects that are to be deleted when the receiver is deleted.

Parameters:anIObject (ORSModel.ors.Managed) – object to be removed from the delete set (a Managed)
removeUserInfo(self, pTag: str) → None

Removes a user defined value.

Parameters:pTag (str) – key of the data (a string)
selectExclusively(contextInstance)

Selects only the current instance for a context

Parameters:contextInstance (plugin instance) – context instance

Note

Only representable object can be selected

setAsTemporaryObject(isTemporaryObject=True)

Helper for setting useful properties when marking an object as a (non-)temporary object.

Parameters:isTemporaryObject (bool) – if True, the object will be set as temporary (not representable, not to be saved, callbacks disabled). Otherwise, these properties are set as the opposite.
setBinaryUserInfo(self, pTag: str, pValue: int, iDataSize: int) → None

Sets a user defined binary value.

Note

Objects can carry user defined data in the form of strings or binary data.

Parameters:
  • pTag (str) – key of the data (a string)
  • pValue (bytes) – the data (an unsigned char* buffer)
  • iDataSize (int) – the size of the data (a uint32_t)
setCallbacksEnabled(self, enabled: bool) → None

Sets the object’s callbacks to be enabled or not.

Note

When an object’s callbacks are disabled, absolutely no callbacks are triggered from the receiver.

Parameters:enabled (bool) – true to enable callbacks, false otherwise
setChildrenNodesOrganizationDirty()

Calls for a setDirty with the flag OrsChildrenNodesOrganizationDirty

setDataDirty()

Calls for a setDirty with the flag OrsDataDirty

setDirty(self, dirtyFlag: str) → None

Sets the object as being dirty for a given aspect.

Note

A dirty object is an object that has changed, giving its observers a chance to refresh their view on the object. Several aspects of an object can be dirty, see ORS_def.h for dirty signature flags.

Parameters:dirtyFlag (str) – dirty flag name (a string)
setEventCallbackEnabled(self, sEventName: str, sCallbackName: str, bValue: bool) → bool

Enables/disables a callback subscription to an event.

Note

Works for all callback types (object, class and global)

Parameters:
  • sEventName (str) – event name (a string)
  • sCallbackName (str) – callback name (a string)
  • bValue (bool) – true to enable the callback, false to disable it
Returns:

output (bool) – true if callback subscription existed, false otherwise

setExclusiveToContext(pluginInstance=None)
setGeometryDirty()

Calls for a setDirty with the flag OrsGeometryDirty

setHighlightDirty()

Calls for a setDirty with the flag OrsHighlightDirty

setIdentityIsPreservedForPickling(self, value: bool) → None

Set to True if the GUID is to be preserved when pickling and unpickling an object.

Parameters:value (bool) –
setIsNotDirty(self) → None

Sets the object as not being dirty for all dirty flags.

setIsRepresentable(self, isRepresentable: bool) → None

Sets the object to be representable or not.

Note

Non representable objects don’t appear in lists and such, the implicit meaning is that these objects are transient and temporary.

Parameters:isRepresentable (bool) – true to make the object representable, false otherwise
setIsToBeKeptAliveUntilExit(self, pFlag: bool) → None

Sets the object to be permanent for the life of the application.

Note

Permanent objects survive a new session, i.e. they live until the application is terminated.

Parameters:pFlag (bool) – true to make the object permanent, false otherwise
setIsToBeSaved(self, pIsToBeSaved: bool) → None

Sets the object to be saved to session files or not.

Parameters:pIsToBeSaved (bool) – true to cause the object to be saved to session files, false otherwise
setPrivateTitle(self, newPrivateTitle: str) → None

Sets the private title of the object.

Note

The private title can later be used to find a reference to that object, given that it’s still alive.

Parameters:newPrivateTitle (str) – a title (a string)
setPropertyDirty()

Calls for a setDirty with the flag OrsPropertyDirty

setPublicInAllContexts()
setTitle(self, newVal: str) → None

Sets the title of the object.

Parameters:newVal (str) –
setUserInfo(self, pTag: str, pValue: str) → None

Sets a user defined value.

Note

Stores the key/value pair in an internal dictionary. If the key already exists its previous value is overwritten.

Parameters:
  • pTag (str) – a key name (a string)
  • pValue (str) – a value (a string)
setUserInfoPickledObject(name: str, picklable_object)
setVisibilityDirty()

Calls for a setDirty with the flag OrsVisibilityDirty

switchAvailabilityToContext(oldContextID, newContextID)

Switches the availability of the object from an old context to a new context. This will be done only if the old context ID is found in the set of available contexts and the new context ID is not already in the set of available contexts. The availability for all other contexts remains unchanged.

The arguments oldContextID and newContextID are used as strings instead of plugin instances to support the situation where the old or new context is not existing (for example, to perform a copy of the objects).

Parameters:
  • oldContextID (str) – old context ID
  • newContextID (str) – new context ID
triggerClassEvent(self, sEventName: str) → bool

Triggers a class event.

Parameters:sEventName (str) –
Returns:output (bool) –
unpublish()

Sets an object as non-representable and notifies the Dragonfly UI of a loss of the availability of the object.

unselect(contextInstance)

Unselects the instance for a context

Parameters:contextInstance (plugin instance) – context instance

ORSBaseClass

class ORSModel.ors.ORSBaseClass

brief_description: An abstract class from which all objects issued from the author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005

getPythonTraceBack() → typing.List[str]

Set the python traceback for a call from python.

Returns:output (typing.List[str]) –
isManaged(self) → bool
Returns:output (bool) –
isNone(self) → bool
Returns:output (bool) –
setPythonTraceBack(tb: ORSModel.ors.typing.List[str]) → None

Set the python traceback for a call from python.

Parameters:tb (typing.List[str]) –