Version: 6.5.0
Home
 All Data Structures Namespaces Files Functions Variables Groups
Functions | Variables
Auxiliary methods and structures

Functions

def DegreesToRadians
 Converts an angle from degrees to radians.
def ParseParameters
 Return list of variable values from salome notebook.
def ParseAngles
def __initPointStruct
def __initAxisStruct
def IsEqual
def GetName
 Gets object name.
def TreatHypoStatus
 Prints error message if a hypothesis was not assigned.
def AssureGeomPublished
 Private method.
def FirstVertexOnCurve
 publish
def init_smesh
 Sets the current study and Geometry component.
def GetPointStruct
 Gets PointStruct from vertex.
def GetDirStruct
 Gets DirStruct from vector.
def MakeDirStruct
 Makes DirStruct from a triplet.
def GetAxisStruct
 Get AxisStruct from object.
def SetName
 Sets the given name to the object.
def SetEmbeddedMode
 Sets the current mode.
def IsEmbeddedMode
 Gets the current mode.
def SetCurrentStudy
 Sets the current study.
def GetCurrentStudy
 Gets the current study.
def GetSubShapesId
 From SMESH_Gen interface.
def SetBoundaryBoxSegmentation
 Sets number of segments per diagonal of boundary box of geometry by which default segment length of appropriate 1D hypotheses is defined.
def MeshDimension
 Returns the mesh dimension depending on the dimension of the underlying shape.
def GetLog
 Returns the log of nodes and elements added or removed since the previous clear of the log.
def ClearLog
 Clears the log of nodes and elements added or removed since the previous clear.
def SetAutoColor
 Toggles auto color mode on the object.
def GetAutoColor
 Gets flag of object auto color mode.
def GetId
 Gets the internal ID.
def GetStudyId
 Get the study Id.
def HasDuplicatedGroupNamesMED
 Checks the group names for duplications.
def GetIDSource
 Wrap a list of IDs of elements or nodes into SMESH_IDSource which can be passed as argument to accepting mesh, group or sub-mesh.
def GetMEDMesh
 Gets MED Mesh.
def SplitQuadsNearTriangularFacets
 Splits quadrangle faces near triangular facets of volumes.
def SplitHexaToTetras
 Splits hexahedrons into tetrahedrons.
def SplitHexaToPrisms
 Split hexahedrons into prisms.
def GetLastCreatedNodes
 If during the last operation of MeshEditor some nodes were created, this method returns the list of their IDs,
if new nodes were not created - returns empty list.
def GetLastCreatedElems
 If during the last operation of MeshEditor some elements were created this method returns the list of their IDs,
if new elements were not created - returns empty list.

Variables

 POINT = SMESH_MeshEditor.POINT
 AXIS = SMESH_MeshEditor.AXIS
 PLANE = SMESH_MeshEditor.PLANE
 LAPLACIAN_SMOOTH = SMESH_MeshEditor.LAPLACIAN_SMOOTH
 CENTROIDAL_SMOOTH = SMESH_MeshEditor.CENTROIDAL_SMOOTH
int PrecisionConfusion = 1
 notebook = salome_notebook.notebook
string var_separator = ":"
string NO_NAME = "NoName"
tuple studyID = mesh.smeshpyD.GetCurrentStudy()
 set the study
tuple name = mesh.geompyD.SubShapeName(geom, mesh.geom)
 get a name

Detailed Description

Function Documentation

def smesh.DegreesToRadians (   AngleInDegrees)

Converts an angle from degrees to radians.

def smesh.ParseParameters (   args)

Return list of variable values from salome notebook.

The last argument, if is callable, is used to modify values got from notebook

def smesh.ParseAngles (   args)
def smesh.__initPointStruct (   point,
  args 
)
private
def smesh.__initAxisStruct (   ax,
  args 
)
private
def smesh.IsEqual (   val1,
  val2,
  tol = PrecisionConfusion 
)
def smesh.GetName (   obj)

Gets object name.

def smesh.TreatHypoStatus (   status,
  hypName,
  geomName,
  isAlgo 
)

Prints error message if a hypothesis was not assigned.

def smesh.AssureGeomPublished (   mesh,
  geom,
  name = '' 
)

Private method.

Add geom (sub-shape of the main shape) into the study if not yet there

def smesh.FirstVertexOnCurve (   edge)

publish

Return the first vertex of a geomertical edge by ignoring orienation

def smesh.init_smesh (   self,
  theStudy,
  geompyD 
)

Sets the current study and Geometry component.

def smesh.GetPointStruct (   self,
  theVertex 
)

Gets PointStruct from vertex.

Parameters
theVertexa GEOM object(vertex)
Returns
SMESH.PointStruct
def smesh.GetDirStruct (   self,
  theVector 
)

Gets DirStruct from vector.

Parameters
theVectora GEOM object(vector)
Returns
SMESH.DirStruct
def smesh.MakeDirStruct (   self,
  x,
  y,
  z 
)

Makes DirStruct from a triplet.

Parameters
x,y,zvector components
Returns
SMESH.DirStruct
def smesh.GetAxisStruct (   self,
  theObj 
)

Get AxisStruct from object.

Parameters
theObja GEOM object (line or plane)
Returns
SMESH.AxisStruct
def smesh.SetName (   self,
  obj,
  name 
)

Sets the given name to the object.

Parameters
objthe object to rename
namea new object name
def smesh.SetEmbeddedMode (   self,
  theMode 
)

Sets the current mode.

def smesh.IsEmbeddedMode (   self)

Gets the current mode.

def smesh.SetCurrentStudy (   self,
  theStudy,
  geompyD = None 
)

Sets the current study.

def smesh.GetCurrentStudy (   self)

Gets the current study.

def smesh.GetSubShapesId (   self,
  theMainObject,
  theListOfSubObjects 
)

From SMESH_Gen interface.

Returns
the list of integer values
def smesh.SetBoundaryBoxSegmentation (   self,
  nbSegments 
)

Sets number of segments per diagonal of boundary box of geometry by which default segment length of appropriate 1D hypotheses is defined.

Default value is 10

def MeshDimension (   self)

Returns the mesh dimension depending on the dimension of the underlying shape.

Returns
mesh dimension as an integer value [0,3]

References Mesh.geom.

def GetLog (   self,
  clearAfterGet 
)

Returns the log of nodes and elements added or removed since the previous clear of the log.

Parameters
clearAfterGetlog is emptied after Get (safe if concurrents access)
Returns
list of log_block structures: commandType number coords indexes
def ClearLog (   self)

Clears the log of nodes and elements added or removed since the previous clear.

Must be used immediately after GetLog if clearAfterGet is false.

def SetAutoColor (   self,
  theAutoColor 
)

Toggles auto color mode on the object.

Parameters
theAutoColorthe flag which toggles auto color mode.
def GetAutoColor (   self)

Gets flag of object auto color mode.

Returns
True or False
def GetId (   self)

Gets the internal ID.

Returns
integer value, which is the internal Id of the mesh
def GetStudyId (   self)

Get the study Id.

Returns
integer value, which is the study Id of the mesh
def HasDuplicatedGroupNamesMED (   self)

Checks the group names for duplications.

Consider the maximum group name length stored in MED file.

Returns
True or False
def GetIDSource (   self,
  ids,
  elemType 
)

Wrap a list of IDs of elements or nodes into SMESH_IDSource which can be passed as argument to accepting mesh, group or sub-mesh.

Returns
an instance of SMESH_IDSource

References Mesh.GetMeshEditor().

def GetMEDMesh (   self)

Gets MED Mesh.

Returns
an instance of SALOME_MED::MESH
def SplitQuadsNearTriangularFacets (   self)

Splits quadrangle faces near triangular facets of volumes.

References Mesh.GetElementsByType(), Mesh.GetElementType(), Mesh.GetElemNbNodes(), Mesh.GetNodeInverseElements(), and Mesh.SplitQuad().

def SplitHexaToTetras (   self,
  theObject,
  theNode000,
  theNode001 
)

Splits hexahedrons into tetrahedrons.

This operation uses pattern mapping functionality for splitting.

Parameters
theObjectthe object from which the list of hexahedrons is taken; this is mesh, submesh or group.
theNode000,theNode001within the range [0,7]; gives the orientation of the pattern relatively each hexahedron: the (0,0,0) key-point of the pattern will be mapped into theNode000-th node of each volume, the (0,0,1) key-point will be mapped into theNode001-th node of each volume. The (0,0,0) key-point of the used pattern corresponds to a non-split corner.
Returns
TRUE in case of success, FALSE otherwise.

References Mesh.mesh, and Mesh.SplitQuadsNearTriangularFacets().

def SplitHexaToPrisms (   self,
  theObject,
  theNode000,
  theNode001 
)

Split hexahedrons into prisms.

Uses the pattern mapping functionality for splitting.

Parameters
theObjectthe object (mesh, submesh or group) from where the list of hexahedrons is taken;
theNode000,theNode001(within the range [0,7]) gives the orientation of the pattern relatively each hexahedron: keypoint (0,0,0) of the pattern will be mapped into the theNode000-th node of each volume, keypoint (0,0,1) will be mapped into the theNode001-th node of each volume. Edge (0,0,0)-(0,0,1) of used pattern connects two not split corners.
Returns
TRUE in case of success, FALSE otherwise.

References Mesh.mesh, Mesh.Smooth(), and Mesh.SplitQuadsNearTriangularFacets().

def GetLastCreatedNodes (   self)

If during the last operation of MeshEditor some nodes were created, this method returns the list of their IDs,
if new nodes were not created - returns empty list.

Returns
the list of integer values (can be empty)
def GetLastCreatedElems (   self)

If during the last operation of MeshEditor some elements were created this method returns the list of their IDs,
if new elements were not created - returns empty list.

Returns
the list of integer values (can be empty)

Variable Documentation

POINT = SMESH_MeshEditor.POINT
AXIS = SMESH_MeshEditor.AXIS
PLANE = SMESH_MeshEditor.PLANE
LAPLACIAN_SMOOTH = SMESH_MeshEditor.LAPLACIAN_SMOOTH
CENTROIDAL_SMOOTH = SMESH_MeshEditor.CENTROIDAL_SMOOTH
int PrecisionConfusion = 1
notebook = salome_notebook.notebook
string var_separator = ":"
string NO_NAME = "NoName"
tuple studyID = mesh.smeshpyD.GetCurrentStudy()

set the study

string name = mesh.geompyD.SubShapeName(geom, mesh.geom)

get a name

Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS