Salome HOME
Nerge with PAL/SALOME 2.1.0d
[modules/smesh.git] / src / SMESH_SWIG / SMESH_mechanic_tetra.py
index 3e0232e715b685697c0024349735450e9bb2469e..eee3f87d8ab128ec8e619804077b38ac2b86e628 100644 (file)
@@ -1,21 +1,21 @@
 #  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-# 
-#  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. 
-# 
-#  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  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.
+#
+#  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
 #
 #
 #
@@ -42,7 +42,7 @@ import NETGENPlugin
 # ---- define contigous arcs and segment to define a closed wire
 p1   = geompy.MakeVertex( 100.0,   0.0,  0.0 )
 p2   = geompy.MakeVertex(  50.0,  50.0,  0.0 )
-p3   = geompy.MakeVertex( 100.0, 100.0,  0.0 ) 
+p3   = geompy.MakeVertex( 100.0, 100.0,  0.0 )
 arc1 = geompy.MakeArc( p1, p2, p3 )
 
 p4   = geompy.MakeVertex( 170.0, 100.0, 0.0 )
@@ -75,7 +75,7 @@ pO = geompy.MakeVertex( 0.0, 0.0,   0.0 )
 pz = geompy.MakeVertex( 0.0, 0.0, 100.0 )
 vz = geompy.MakeVector( pO, pz )
 
-prism1 = geompy.MakePrism( face1, vz, 100.0 )
+prism1 = geompy.MakePrismVecH( face1, vz, 100.0 )
 Id_prism1 = geompy.addToStudy( prism1, "prism1")
 
 # ---- create two cylinders
@@ -90,7 +90,7 @@ cyl2  = geompy.MakeCylinder( pc2, vz, radius, height )
 Id_Cyl1 = geompy.addToStudy( cyl1, "cyl1" )
 Id_Cyl2 = geompy.addToStudy( cyl2, "cyl2" )
 
-# ---- cut with cyl1 
+# ---- cut with cyl1
 shape  = geompy.MakeBoolean( prism1, cyl1, 2 )
 
 # ---- fuse with cyl2 to obtain the final mechanic piece :)
@@ -186,7 +186,7 @@ shape_mesh = salome.IDToObject( Id_mechanic  )
 
 mesh = smesh.CreateMesh(shape_mesh)
 
-idmesh = salome.ObjectToID(mesh) 
+idmesh = salome.ObjectToID(mesh)
 smeshgui.SetName( idmesh, "Mesh_mechanic_tetra" )
 
 mesh.AddHypothesis( shape_mesh, hypNbSeg )   # nb segments