1 # -*- coding: latin-1 -*-
3 # Francis KLOSS - 2009-2010 - CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France
4 # =============================================================================================
7 from HEXABLOCK_ORB import *
11 component = salome.lcc.FindOrLoadComponent("FactoryServer", "HEXABLOCK")
13 component = component._narrow(HEXABLOCK_Gen)
15 for k in dir(component):
18 globals()[k] = getattr(component, k)
22 def mesh(name, doc, dim=3):
23 geom = smesh.geompy.MakeBox(0, 0, 0, 1, 1, 1)
24 smesh.geompy.addToStudy(geom, name)
25 mesh = smesh.Mesh(geom)
27 so = "libHexaBlockEngine.so"
29 algo = smesh.SMESH._objref_SMESH_Gen.CreateHypothesis(smesh.smesh, "HEXABLOCK_3D", so)
30 mesh.mesh.AddHypothesis(geom, algo)
32 hypo = smesh.SMESH._objref_SMESH_Gen.CreateHypothesis(smesh.smesh, "HEXABLOCK_Parameters", so)
33 mesh.mesh.AddHypothesis(geom, hypo)
36 hypo.SetDimension(dim)