Back to index

salome-smesh  6.5.0
Public Member Functions | Public Attributes
smeshDC.smeshDC Class Reference

List of all members.

Public Member Functions

def DumpPython
 Dump component to the Python script This method overrides IDL function to allow default values for the parameters.
def SetDumpPythonHistorical
 Set mode of DumpPython(), historical or snapshot.
def init_smesh
 Sets the current study and Geometry component.
def Mesh
 Creates an empty Mesh.
def EnumToLong
 Returns a long value from enumeration Should be used for SMESH.FunctorType enumeration.
def ColorToString
 Returns a string representation of the color.
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 CreateMeshesFromUNV
 Creates a Mesh object importing data from the given UNV file.
def CreateMeshesFromMED
 Creates a Mesh object(s) importing data from the given MED file.
def CreateMeshesFromSAUV
 Creates a Mesh object(s) importing data from the given SAUV file.
def CreateMeshesFromSTL
 Creates a Mesh object importing data from the given STL file.
def CreateMeshesFromCGNS
 Creates Mesh objects importing data from the given CGNS file.
def Concatenate
 Concatenate the given meshes into one mesh.
def CopyMesh
 Create a mesh by copying a part of another mesh.
def GetSubShapesId
 From SMESH_Gen interface.
def GetPattern
 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 GetEmptyCriterion
 Creates an empty criterion.
def GetCriterion
 Creates a criterion by the given parameters
Criterion structures allow to define complex filters by combining them with logical operations (AND / OR) (see example below)
def GetFilter
 Creates a filter with the given parameters.
def GetFilterFromCriteria
 Creates a filter from criteria.
def GetFunctor
 Creates a numerical functor by its type.
def CreateHypothesis
 Creates hypothesis.
def GetMeshInfo
 Gets the mesh statistic.
def MinDistance
 Get minimum distance between two objects.
def GetMinDistance
 Get measure structure specifying minimum distance data between two objects.
def BoundingBox
 Get bounding box of the specified object(s)
def GetBoundingBox
 Get measure structure specifying bounding box data of the specified object(s)

Public Attributes


Detailed Description

Definition at line 300 of file

Member Function Documentation

def smeshDC.smeshDC.Concatenate (   self,
  mergeNodesAndElements = False,
  mergeTolerance = 1e-5,
  allGroups = False 

Concatenate the given meshes into one mesh.

an instance of Mesh class
meshesthe meshes to combine into one mesh
uniteIdenticalGroupsif true, groups with same names are united, else they are renamed
mergeNodesAndElementsif true, equal nodes and elements aremerged
mergeTolerancetolerance for merging nodes
allGroupsforces creation of groups of all elements

Definition at line 517 of file

00518                      mergeNodesAndElements = False, mergeTolerance = 1e-5, allGroups = False):
00519         if not meshes: return None
00520         for i,m in enumerate(meshes):
00521             if isinstance(m, Mesh):
00522                 meshes[i] = m.GetMesh()
00523         mergeTolerance,Parameters,hasVars = ParseParameters(mergeTolerance)
00524         meshes[0].SetParameters(Parameters)
00525         if allGroups:
00526             aSmeshMesh = SMESH._objref_SMESH_Gen.ConcatenateWithGroups(
00527                 self,meshes,uniteIdenticalGroups,mergeNodesAndElements,mergeTolerance)
00528         else:
00529             aSmeshMesh = SMESH._objref_SMESH_Gen.Concatenate(
00530                 self,meshes,uniteIdenticalGroups,mergeNodesAndElements,mergeTolerance)
00531         aMesh = Mesh(self, self.geompyD, aSmeshMesh)
00532         return aMesh

Here is the call graph for this function:

Here is the caller graph for this function:

def smeshDC.smeshDC.CopyMesh (   self,
  toCopyGroups = False,
  toKeepIDs = False 

Create a mesh by copying a part of another mesh.

meshParta part of mesh to copy, either a Mesh, a sub-mesh or a group; to copy nodes or elements not contained in any mesh object, pass result of Mesh.GetIDSource( list_of_ids, type ) as meshPart
meshNamea name of the new mesh
toCopyGroupsto create in the new mesh groups the copied elements belongs to
toKeepIDsto preserve IDs of the copied elements or not
an instance of Mesh class

Definition at line 541 of file

00542     def CopyMesh( self, meshPart, meshName, toCopyGroups=False, toKeepIDs=False):
00543         if (isinstance( meshPart, Mesh )):
00544             meshPart = meshPart.GetMesh()
00545         mesh = SMESH._objref_SMESH_Gen.CopyMesh( self,meshPart,meshName,toCopyGroups,toKeepIDs )
00546         return Mesh(self, self.geompyD, mesh)

def smeshDC.smeshDC.CreateHypothesis (   self,
  theLibName = "" 

Creates hypothesis.

theHTypemesh hypothesis type (string)
theLibNamemesh plug-in library name
created hypothesis instance

Definition at line 798 of file

00799     def CreateHypothesis(self, theHType, theLibName=""):
00800         hyp = SMESH._objref_SMESH_Gen.CreateHypothesis(self, theHType, theLibName )
00802         if isinstance( hyp, SMESH._objref_SMESH_Algo ):
00803             return hyp
00805         # wrap hypothesis methods
00806         #print "HYPOTHESIS", theHType
00807         for meth_name in dir( hyp.__class__ ):
00808             if not meth_name.startswith("Get") and \
00809                not meth_name in dir ( SMESH._objref_SMESH_Hypothesis ):
00810                 method = getattr ( hyp.__class__, meth_name )
00811                 if callable(method):
00812                     setattr( hyp, meth_name, hypMethodWrapper( hyp, method ))
00814         return hyp

def smeshDC.smeshDC.DumpPython (   self,
  theIsPublished = True,
  theIsMultiFile = True 

Dump component to the Python script This method overrides IDL function to allow default values for the parameters.

Definition at line 304 of file

00305     def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True):
00306         return SMESH._objref_SMESH_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile)

def smeshDC.smeshDC.SetDumpPythonHistorical (   self,

Set mode of DumpPython(), historical or snapshot.

In the historical mode, the Python Dump script includes all commands performed by SMESH engine. In the snapshot mode, commands relating to objects removed from the Study are excluded from the script as well as commands not influencing the current state of meshes

Definition at line 312 of file

00313     def SetDumpPythonHistorical(self, isHistorical):
00314         if isHistorical: val = "true"
00315         else:            val = "false"
00316         SMESH._objref_SMESH_Gen.SetOption(self, "historical_python_dump", val)

Member Data Documentation

Definition at line 445 of file

The documentation for this class was generated from the following file: