def init_smesh(self,theStudy,geompyD = None):
#print "init_smesh"
self.SetCurrentStudy(theStudy,geompyD)
-
- ## Creates an empty Mesh. This mesh can have an underlying geometry.
- # @param obj the Geometrical object on which the mesh is built. If not defined,
- # the mesh will have no underlying geometry.
+ if theStudy:
+ global notebook
+ notebook.myStudy = theStudy
+
+ ## Creates a mesh. This can be either an empty mesh, possibly having an underlying geometry,
+ # or a mesh wrapping a CORBA mesh given as a parameter.
+ # @param obj either (1) a CORBA mesh (SMESH._objref_SMESH_Mesh) got e.g. by calling
+ # salome.myStudy.FindObjectID("0:1:2:3").GetObject() or
+ # (2) a Geometrical object for meshing or
+ # (3) none.
# @param name the name for the new mesh.
# @return an instance of Mesh class.
# @ingroup l2_construct
# Triangles are transformed in prisms, and quadrangles in hexahedrons.
# @param theDomains - list of groups of volumes
# @param createJointElems - if TRUE, create the elements
+ # @param onAllBoundaries - if TRUE, the nodes and elements are also created on
+ # the boundary between \a theDomains and the rest mesh
# @return TRUE if operation has been completed successfully, FALSE otherwise
- def DoubleNodesOnGroupBoundaries(self, theDomains, createJointElems ):
- return self.editor.DoubleNodesOnGroupBoundaries( theDomains, createJointElems )
+ def DoubleNodesOnGroupBoundaries(self, theDomains, createJointElems, onAllBoundaries=False ):
+ return self.editor.DoubleNodesOnGroupBoundaries( theDomains, createJointElems, onAllBoundaries )
## Double nodes on some external faces and create flat elements.
# Flat elements are mainly used by some types of mechanic calculations.
def GetSkew(self, elemId):
return self._valueFromFunctor(SMESH.FT_Skew, elemId)
+ ## Return minimal and maximal value of a given functor.
+ # @param funType a functor type, an item of SMESH.FunctorType enum
+ # (one of SMESH.FunctorType._items)
+ # @return tuple (min,max)
+ # @ingroup l1_measurements
+ def GetMinMax(self, funType):
+ fun = self._getFunctor( funType )
+ if fun:
+ hist = fun.GetHistogram( 1, False )
+ if hist:
+ return hist[0].min, hist[0].max
+ return None
+
pass # end of Mesh class
## Helper class for wrapping of SMESH.SMESH_Pattern CORBA class