Salome HOME
Copyright update 2020
[modules/shaper.git] / src / FeaturesPlugin / Test / TestPipe.py
index f805375d5fbb98c6f7f407f199d466943f90f5f4..83db0ad588c5b9f4399aae7d95fcc1b645693763 100644 (file)
@@ -1,22 +1,21 @@
-## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
-##
-## 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<mailto:webmaster.salome@opencascade.com>
-##
+# Copyright (C) 2014-2020  CEA/DEN, EDF R&D
+#
+# 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
+#
 
 # Initialization of the test
 from ModelAPI import *
@@ -128,15 +127,16 @@ aBaseObject = aRecover.reference("base_feature")
 aBaseObject.setValue(aPipeFeature)
 aRecoveredObjects = aRecover.reflist("recovered")
 aRecoveredObjects.append(aFaceResult1)
+aRecoveredObjects.append(aWireResult)
 aSession.finishOperation()
 
 # Create pipe with bi-normal
 aSession.startOperation()
 aPipeFeature = aPart.addFeature("Pipe")
 aBaseObjectsList = aPipeFeature.selectionList("base_objects")
-aBaseObjectsList.append(aRecover.firstResult(), None)
+aBaseObjectsList.append(aRecover.lastResult(), None)
 aPathObjectSelection = aPipeFeature.selection("path_object")
-aPathObjectSelection.setValue(aWireResult, None)
+aPathObjectSelection.setValue(aRecover.firstResult(), None)
 aPipeFeature.string("creation_method").setValue("binormal")
 aBinormalObjectSelection = aPipeFeature.selection("binormal")
 aShapeExplorer = GeomAPI_ShapeExplorer(aSketchShape, GeomAPI_Shape.EDGE)
@@ -154,6 +154,7 @@ aBaseObject = aRecover2.reference("base_feature")
 aBaseObject.setValue(aPipeFeature)
 aRecoveredObjects = aRecover2.reflist("recovered")
 aRecoveredObjects.append(aRecover.firstResult())
+aRecoveredObjects.append(aRecover.lastResult())
 aSession.finishOperation()
 
 # Create pipe with locations
@@ -194,7 +195,7 @@ aBaseObjectsList = aPipeFeature.selectionList("base_objects")
 aBaseObjectsList.append(aRecover2.firstResult(), None)
 aBaseObjectsList.append(aFaceResult2, None)
 aPathObjectSelection = aPipeFeature.selection("path_object")
-aPathObjectSelection.setValue(aWireResult, None)
+aPathObjectSelection.setValue(aRecover2.lastResult(), None)
 aPipeFeature.string("creation_method").setValue("locations")
 aSession.finishOperation()