# 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
#
#
#
# ---- 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 )
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
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 :)
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(salome.myStudyId)
-idmesh = salome.ObjectToID(mesh)
+idmesh = salome.ObjectToID(mesh)
smeshgui.SetName( idmesh, "Mesh_mechanic" )
print "-------------------------- NumberOfSegments"
mesh.AddHypothesis( shape_mesh, algoReg1D ) # Regular 1D/wire discretisation
mesh.AddHypothesis( shape_mesh, algoMef ) # MEFISTO 2D
-print "-------------------------- add hypothesis and algorithm to sub face 1"
+print "-------------------------- add hypothesis and algorithm to sub face 1"
submesh = mesh.GetSubMesh(sub_face1, "SubMeshFace1")
mesh.AddHypothesis( sub_face1, algoQuad ) # Quadrangle 2D
mesh.AddHypothesis( sub_face1, hypArea35 ) # max area
-print "-------------------------- add hypothesis and algorithm to sub face 2"
+print "-------------------------- add hypothesis and algorithm to sub face 2"
submesh = mesh.GetSubMesh(sub_face2, "SubMeshFace2")
mesh.AddHypothesis( sub_face2, algoQuad ) # Quadrangle 2D
mesh.AddHypothesis( sub_face2, hypArea35 ) # max area
-print "-------------------------- add hypothesis and algorith to sub face 3"
+print "-------------------------- add hypothesis and algorith to sub face 3"
submesh = mesh.GetSubMesh(sub_face3, "SubMeshFace3")
mesh.AddHypothesis( sub_face3, algoQuad ) # Quadrangle 2D
mesh.AddHypothesis( sub_face3, hypArea35 ) # max area
-print "-------------------------- add hypothesis and algorith to sub face 4"
+print "-------------------------- add hypothesis and algorith to sub face 4"
submesh = mesh.GetSubMesh(sub_face4, "SubMeshFace4")