Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Groups
Measurements

Functions

def MinDistance
 Get minimum distance between two objects. More...
 
def GetMinDistance
 Get measure structure specifying minimum distance data between two objects. More...
 
def BoundingBox
 Get bounding box of the specified object(s) More...
 
def GetBoundingBox
 Get measure structure specifying bounding box data of the specified object(s) More...
 
def GetLength
 Get sum of lengths of all 1D elements in the mesh object. More...
 
def GetArea
 Get sum of areas of all 2D elements in the mesh object. More...
 
def GetVolume
 Get sum of volumes of all 3D elements in the mesh object. More...
 
def GetFreeBorders
 Verify whether a 2D mesh element has free edges (edges connected to one face only)
Return a list of special structures (borders). More...
 
def MinDistance
 Get minimum distance between two nodes, elements or distance to the origin. More...
 
def GetMinDistance
 Get measure structure specifying minimum distance data between two objects. More...
 
def BoundingBox
 Get bounding box of the specified object(s) More...
 
def GetBoundingBox
 Get measure structure specifying bounding box data of the specified object(s) More...
 
def FunctorValue
 Return value of a functor for a given element. More...
 
def GetLength
 Get length of 1D element or sum of lengths of all 1D mesh elements. More...
 
def GetArea
 Get area of 2D element or sum of areas of all 2D mesh elements. More...
 
def GetVolume
 Get volume of 3D element or sum of volumes of all 3D mesh elements. More...
 
def GetMaxElementLength
 Get maximum element length. More...
 
def GetAspectRatio
 Get aspect ratio of 2D or 3D element. More...
 
def GetWarping
 Get warping angle of 2D element. More...
 
def GetMinimumAngle
 Get minimum angle of 2D element. More...
 
def GetTaper
 Get taper of 2D element. More...
 
def GetSkew
 Get skew of 2D element. More...
 
def GetMinMax
 Return minimal and maximal value of a given functor. More...
 

Detailed Description

Function Documentation

def MinDistance (   self,
  src1,
  src2 = None,
  id1 = 0,
  id2 = 0,
  isElem1 = False,
  isElem2 = False 
)

Get minimum distance between two objects.

If src2 is None, and id2 = 0, distance from src1 / id1 to the origin is computed. If src2 is None, and id2 != 0, it is assumed that both id1 and id2 belong to src1.

Parameters
src1first source object
src2second source object
id1node/element id from the first source
id2node/element id from the second (or first) source
isElem1True if id1 is element id, False if it is node id
isElem2True if id2 is element id, False if it is node id
Returns
minimum distance value
See Also
GetMinDistance()

References smeshBuilder.GetMinDistance().

def GetMinDistance (   self,
  src1,
  src2 = None,
  id1 = 0,
  id2 = 0,
  isElem1 = False,
  isElem2 = False 
)

Get measure structure specifying minimum distance data between two objects.

If src2 is None, and id2 = 0, distance from src1 / id1 to the origin is computed. If src2 is None, and id2 != 0, it is assumed that both id1 and id2 belong to src1.

Parameters
src1first source object
src2second source object
id1node/element id from the first source
id2node/element id from the second (or first) source
isElem1True if id1 is element id, False if it is node id
isElem2True if id2 is element id, False if it is node id
Returns
Measure structure or None if input data is invalid
See Also
MinDistance()
def BoundingBox (   self,
  objects 
)

Get bounding box of the specified object(s)

Parameters
objectssingle source object or list of source objects
Returns
tuple of six values (minX, minY, minZ, maxX, maxY, maxZ)
See Also
GetBoundingBox()

References smeshBuilder.GetBoundingBox().

def GetBoundingBox (   self,
  objects 
)

Get measure structure specifying bounding box data of the specified object(s)

Parameters
objectssingle source object or list of source objects
Returns
Measure structure
See Also
BoundingBox()
def GetLength (   self,
  obj 
)

Get sum of lengths of all 1D elements in the mesh object.

Parameters
objmesh, submesh or group
Returns
sum of lengths of all 1D elements
def GetArea (   self,
  obj 
)

Get sum of areas of all 2D elements in the mesh object.

Parameters
objmesh, submesh or group
Returns
sum of areas of all 2D elements
def GetVolume (   self,
  obj 
)

Get sum of volumes of all 3D elements in the mesh object.

Parameters
objmesh, submesh or group
Returns
sum of volumes of all 3D elements
def GetFreeBorders (   self)

Verify whether a 2D mesh element has free edges (edges connected to one face only)
Return a list of special structures (borders).

Returns
a list of SMESH.FreeEdges.Border structure: edge id and ids of two its nodes.

References Mesh.mesh.

def MinDistance (   self,
  id1,
  id2 = 0,
  isElem1 = False,
  isElem2 = False 
)

Get minimum distance between two nodes, elements or distance to the origin.

Parameters
id1first node/element id
id2second node/element id (if 0, distance from id1 to the origin is computed)
isElem1True if id1 is element id, False if it is node id
isElem2True if id2 is element id, False if it is node id
Returns
minimum distance value
See Also
GetMinDistance()

References smeshBuilder.GetMinDistance(), and Mesh.GetMinDistance().

def GetMinDistance (   self,
  id1,
  id2 = 0,
  isElem1 = False,
  isElem2 = False 
)

Get measure structure specifying minimum distance data between two objects.

Parameters
id1first node/element id
id2second node/element id (if 0, distance from id1 to the origin is computed)
isElem1True if id1 is element id, False if it is node id
isElem2True if id2 is element id, False if it is node id
Returns
Measure structure
See Also
MinDistance()
def BoundingBox (   self,
  objects = None,
  isElem = False 
)

Get bounding box of the specified object(s)

Parameters
objectssingle source object or list of source objects or list of nodes/elements IDs
isElemif objects is a list of IDs, True value in this parameters specifies that objects are elements, False specifies that objects are nodes
Returns
tuple of six values (minX, minY, minZ, maxX, maxY, maxZ)
See Also
GetBoundingBox()

References smeshBuilder.GetBoundingBox(), and Mesh.GetBoundingBox().

def GetBoundingBox (   self,
  IDs = None,
  isElem = False 
)

Get measure structure specifying bounding box data of the specified object(s)

Parameters
IDssingle source object or list of source objects or list of nodes/elements IDs
isElemif IDs is a list of IDs, True value in this parameters specifies that objects are elements, False specifies that objects are nodes
Returns
Measure structure
See Also
BoundingBox()

References Mesh.mesh.

def FunctorValue (   self,
  funcType,
  elemId,
  isElem = True 
)

Return value of a functor for a given element.

Parameters
funcTypean item of SMESH.FunctorType enum Type "SMESH.FunctorType._items" in the Python Console to see all items.
elemIdelement or node ID
isElemelemId is ID of element or node
Returns
the functor value or zero in case of invalid arguments

References Mesh._getFunctor(), and Mesh.GetElementType().

def GetLength (   self,
  elemId = None 
)

Get length of 1D element or sum of lengths of all 1D mesh elements.

Parameters
elemIdmesh element ID (if not defined - sum of length of all 1D elements will be calculated)
Returns
element's length value if elemId is specified or sum of all 1D mesh elements' lengths otherwise

References Mesh.FunctorValue().

def GetArea (   self,
  elemId = None 
)

Get area of 2D element or sum of areas of all 2D mesh elements.

Parameters
elemIdmesh element ID (if not defined - sum of areas of all 2D elements will be calculated)
Returns
element's area value if elemId is specified or sum of all 2D mesh elements' areas otherwise

References Mesh.FunctorValue().

def GetVolume (   self,
  elemId = None 
)

Get volume of 3D element or sum of volumes of all 3D mesh elements.

Parameters
elemIdmesh element ID (if not defined - sum of volumes of all 3D elements will be calculated)
Returns
element's volume value if elemId is specified or sum of all 3D mesh elements' volumes otherwise

References Mesh.FunctorValue().

def GetMaxElementLength (   self,
  elemId 
)

Get maximum element length.

Parameters
elemIdmesh element ID
Returns
element's maximum length value

References Mesh.FunctorValue(), and Mesh.GetElementType().

def GetAspectRatio (   self,
  elemId 
)

Get aspect ratio of 2D or 3D element.

Parameters
elemIdmesh element ID
Returns
element's aspect ratio value

References Mesh.FunctorValue(), and Mesh.GetElementType().

def GetWarping (   self,
  elemId 
)

Get warping angle of 2D element.

Parameters
elemIdmesh element ID
Returns
element's warping angle value

References Mesh.FunctorValue().

def GetMinimumAngle (   self,
  elemId 
)

Get minimum angle of 2D element.

Parameters
elemIdmesh element ID
Returns
element's minimum angle value

References Mesh.FunctorValue().

def GetTaper (   self,
  elemId 
)

Get taper of 2D element.

Parameters
elemIdmesh element ID
Returns
element's taper value

References Mesh.FunctorValue().

def GetSkew (   self,
  elemId 
)

Get skew of 2D element.

Parameters
elemIdmesh element ID
Returns
element's skew value

References Mesh.FunctorValue().

def GetMinMax (   self,
  funType,
  meshPart = None 
)

Return minimal and maximal value of a given functor.

Parameters
funTypea functor type, an item of SMESH.FunctorType enum (one of SMESH.FunctorType._items)
meshParta part of mesh (group, sub-mesh) to treat
Returns
tuple (min,max)

References Mesh._getFunctor(), Mesh.GetIDSource(), and Mesh.mesh.