Salome HOME
20140612_1537 clone to HYBRIDPLUGIN Modify files contents [('GHS3DPLUGIN', 'HYBRIDPLU...
[plugins/hybridplugin.git] / doc / salome / examples / hybrid_enfvert.py
index 319ca32dd77f8ba87e1f8e1d10e925d302be1cf0..0c0424828283924e290a7ba1cf75fe5203f267cd 100644 (file)
@@ -25,44 +25,44 @@ smesh =  smeshBuilder.New(salome.myStudy)
 box = geompy.MakeBoxDXDYDZ(200., 200., 200.)
 geompy.addToStudy(box, "box")
 # create a mesh on the box
-ghs3dMesh = smesh.Mesh(box,"box: Ghs3D and BLSurf mesh")
+hybridMesh = smesh.Mesh(box,"box: Ghs3D and BLSurf mesh")
 # create a BLSurf algorithm for faces
-ghs3dMesh.Triangle(algo=smeshBuilder.BLSURF)
+hybridMesh.Triangle(algo=smeshBuilder.BLSURF)
 # compute the mesh
-ghs3dMesh.Compute()
+hybridMesh.Compute()
 
 # Make a copy of the 2D mesh
-ghs3dMesh_wo_geometry = smesh.CopyMesh( ghs3dMesh, 'Ghs3D wo geometry', 0, 0)
+hybridMesh_wo_geometry = smesh.CopyMesh( hybridMesh, 'Ghs3D wo geometry', 0, 0)
 
 # create a Ghs3D algorithm and hypothesis and assign them to the mesh
-GHS3D = smesh.CreateHypothesis('GHS3D_3D', 'GHS3DEngine')
-GHS3D_Parameters = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine')
-ghs3dMesh.AddHypothesis( GHS3D )
-ghs3dMesh.AddHypothesis( GHS3D_Parameters )
+HYBRID = smesh.CreateHypothesis('HYBRID_3D', 'HYBRIDEngine')
+HYBRID_Parameters = smesh.CreateHypothesis('HYBRID_Parameters', 'HYBRIDEngine')
+hybridMesh.AddHypothesis( HYBRID )
+hybridMesh.AddHypothesis( HYBRID_Parameters )
 # Create the enforced vertex
-GHS3D_Parameters.SetEnforcedVertex( 50, 50, 100, 2) # no group
+HYBRID_Parameters.SetEnforcedVertex( 50, 50, 100, 2) # no group
 # Compute the mesh
-ghs3dMesh.Compute()
+hybridMesh.Compute()
 
 
 # Ex2: Add one vertex enforced by a GEOM vertex at (50,50,100) 
 #      with physical size 5 and add it to a group called "My special nodes"
 
-# Create another GHS3D hypothesis and assign it to the mesh without geometry
-GHS3D_Parameters_wo_geometry = smesh.CreateHypothesis('GHS3D_Parameters', 'GHS3DEngine')
-ghs3dMesh_wo_geometry.AddHypothesis( GHS3D )
-ghs3dMesh_wo_geometry.AddHypothesis( GHS3D_Parameters_wo_geometry )
+# Create another HYBRID hypothesis and assign it to the mesh without geometry
+HYBRID_Parameters_wo_geometry = smesh.CreateHypothesis('HYBRID_Parameters', 'HYBRIDEngine')
+hybridMesh_wo_geometry.AddHypothesis( HYBRID )
+hybridMesh_wo_geometry.AddHypothesis( HYBRID_Parameters_wo_geometry )
 
 # Create the enforced vertex
 p1 = geompy.MakeVertex(150, 150, 100)
 geompy.addToStudy(p1, "p1")
-GHS3D_Parameters_wo_geometry.SetEnforcedVertexGeomWithGroup( p1, 5 , "My special nodes")
-#GHS3D_Parameters.SetEnforcedVertexGeom( p1, 5 ) # no group
+HYBRID_Parameters_wo_geometry.SetEnforcedVertexGeomWithGroup( p1, 5 , "My special nodes")
+#HYBRID_Parameters.SetEnforcedVertexGeom( p1, 5 ) # no group
 
 # compute the mesh
-ghs3dMesh_wo_geometry.Compute()
+hybridMesh_wo_geometry.Compute()
 
 # Erase all enforced vertices
-GHS3D_Parameters.ClearEnforcedVertices()
+HYBRID_Parameters.ClearEnforcedVertices()
 
 # End of script