Salome HOME
Deleted Study parameter
[plugins/hexoticplugin.git] / doc / salome / examples / hexoticdemo.py
index bf02fc8344c784d10ff467d4d50c8356f4013b38..f221c72c6f706e234749caf62e17ae6d2c0226fb 100644 (file)
@@ -1,13 +1,30 @@
+# 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
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 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
@@ -15,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
 
@@ -39,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