+# Copyright (C) 2005 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
#####################################################################
#Created :17/02/2005
#Auhtor :MASLOV Eugeny, KOVALTCHUK Alexey
geompy.addToStudy(Chamfer_2, "Chamfer_2")
#Import of the shape from "slots.brep"
-print "Import multi-rotation from the KERNEL_ROOT_DIR/examples/slots.brep"
-thePath = os.getenv("KERNEL_ROOT_DIR")
-theFileName = thePath + "/examples/slots.brep"
+print "Import multi-rotation from the DATA_DIR/Shapes/Brep/slots.brep"
+thePath = os.getenv("DATA_DIR")
+theFileName = thePath + "/Shapes/Brep/slots.brep"
theShapeForCut = geompy.ImportBREP(theFileName)
geompy.addToStudy(theShapeForCut, "slot.brep_1")
#HYPOTHESIS CREATION
print "-------------------------- Average length"
theAverageLength = 5
-hAvLength = smesh.CreateHypothesis( "LocalLength", "libStdMeshersEngine.so" )
+hAvLength = smesh.CreateHypothesis( "LocalLength", "StdMeshersEngine" )
hAvLength.SetLength( theAverageLength )
print hAvLength.GetName()
print hAvLength.GetId()
print "-------------------------- MaxElementArea"
theMaxElementArea = 20
-hArea20 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
+hArea20 = smesh.CreateHypothesis( "MaxElementArea", "StdMeshersEngine" )
hArea20.SetMaxElementArea( theMaxElementArea )
print hArea20.GetName()
print hArea20.GetId()
print "-------------------------- MaxElementVolume"
theMaxElementVolume = 150
-hVolume150 = smesh.CreateHypothesis( "MaxElementVolume", "libStdMeshersEngine.so" )
+hVolume150 = smesh.CreateHypothesis( "MaxElementVolume", "StdMeshersEngine" )
hVolume150.SetMaxElementVolume( theMaxElementVolume )
print hVolume150.GetName()
print hVolume150.GetId()
print "-------------------------- Regular_1D"
-algoReg1D = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" )
+algoReg1D = smesh.CreateHypothesis( "Regular_1D", "StdMeshersEngine" )
listHyp = algoReg1D.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
smeshgui.SetName(salome.ObjectToID(algoReg1D), "Wire discretisation")
print "-------------------------- MEFISTO_2D"
-algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" )
+algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "StdMeshersEngine" )
listHyp = algoMef.GetCompatibleHypothesis()
for hyp in listHyp:
print hyp
print "-------------------------- NETGEN_3D"
-algoNg = smesh.CreateHypothesis( "NETGEN_3D", "libNETGENEngine.so" )
+algoNg = smesh.CreateHypothesis( "NETGEN_3D", "NETGENEngine" )
print algoNg.GetName()
print algoNg.GetId()
smeshgui.SetName(salome.ObjectToID(algoNg), "Tetrahedron (NETGEN)")