5 from SALOME_utilities import *
7 #=============================================================================
14 #--------------------------------------------------------------------------
18 self._geom = salome.lcc.FindOrLoadComponent("FactoryServer","Geometry")
19 self._smesh = salome.lcc.FindOrLoadComponent("FactoryServer","SMESH")
21 MESSAGE( "exception in smeshpy:__init__" )
22 self._studyId = salome.myStudyId
24 #--------------------------------------------------------------------------
26 def Init(self, shapeId):
28 shape = salome.IDToObject(shapeId)
29 aMesh = self._smesh.Init(self._geom, self._studyId, shape)
32 MESSAGE( "exception in smeshpy:Init" )
35 #--------------------------------------------------------------------------
37 def CreateHypothesis(self, name):
39 hyp = self._smesh.CreateHypothesis(name,self._studyId)
42 MESSAGE( "exception in smeshpy:CreateHypothesis" )
45 #--------------------------------------------------------------------------
47 def Compute(self, mesh, shapeId):
49 shape = salome.IDToObject(shapeId)
50 ret=self._smesh.Compute(mesh, shape)
53 MESSAGE( "exception in smeshpy:Compute" )
56 #=============================================================================
57 ## #--------------------------------------------------------------------------
59 ##def SmeshInit(shapeId):
62 ## geom = salome.lcc.FindOrLoadComponent("FactoryServer", "Geometry")
63 ## smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
64 ## shape = salome.IDToObject(shapeId)
65 ## studyId = salome.myStudyId
66 ## MESSAGE( str(studyId) )
67 ## aMesh = smesh.Init(geom, studyId, shape)
70 ## #--------------------------------------------------------------------------