Salome HOME
Deleted Study parameter
[plugins/hexoticplugin.git] / doc / salome / examples / hexoticdemo.py
old mode 100755 (executable)
new mode 100644 (file)
index c898c6a..f221c72
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 
 import salome
 salome.salome_init()
-import GEOM
+
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
-import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 # create a sphere
@@ -33,23 +32,23 @@ sphere = geompy.MakeSphereR(100.)
 geompy.addToStudy(sphere, "sphere")
 
 # create a mesh on the sphere
-hexoticMesh = smesh.Mesh(sphere,"sphere: BLSurf and Hexotic mesh")
+mghexaMesh = smesh.Mesh(sphere,"sphere: MG-CADSurf and MG-Hexa mesh")
 
-# create a BLSurf algorithm for faces
-BLSURF = hexoticMesh.Triangle(algo=smeshBuilder.BLSURF)
-BLSURF.SetGeometricMesh( 1 )
+# create a MG-CADSurf algorithm for faces
+MG_CADSurf = mghexaMesh.Triangle(algo=smeshBuilder.MG_CADSurf)
+MG_CADSurf.SetGeometricMesh( 1 )
 
-# create a Hexotic algorithm for volumes
-HEXOTIC = hexoticMesh.Hexahedron(algo=smeshBuilder.Hexotic)
+# create a MG-Hexa algorithm for volumes
+MG_Hexa = mghexaMesh.Hexahedron(algo=smeshBuilder.MG_Hexa)
 
 ## compute the mesh
-#hexoticMesh.Compute()
+#mghexaMesh.Compute()
 
 # Change the level of subdivision
-HEXOTIC.SetMinMaxHexes(4, 8)
+MG_Hexa.SetMinMaxHexes(4, 8)
 
 ## compute the mesh
-#hexoticMesh.Compute()
+#mghexaMesh.Compute()
 
 # Local size
 
@@ -57,10 +56,10 @@ HEXOTIC.SetMinMaxHexes(4, 8)
 faces = geompy.SubShapeAll(sphere, geompy.ShapeType["FACE"])
 
 # Set a local size on the face
-HEXOTIC.SetMinMaxSize(10, 20)
-HEXOTIC.SetSizeMap(faces[0], 10)
+MG_Hexa.SetMinMaxSize(10, 20)
+MG_Hexa.SetSizeMap(faces[0], 10)
 
 # compute the mesh
-hexoticMesh.Compute()
+mghexaMesh.Compute()
 
 # End of script