Salome HOME
updated copyright message
[modules/shaper.git] / src / ModelAPI / Test / Test2241.py
index 319ce2d0969b155af4bd14f7884cfc13f156f96b..37154f5cdb70eaa0bfe8855df241810358d5155d 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-2023  CEA, EDF
+#
+# 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
+#
 
 from salome.shaper import model
 
@@ -52,20 +51,20 @@ SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_4.result())
 SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_6.result())
 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_3.result())
 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_5.result())
-SketchArc_1 = Sketch_1.addArc(4.151438510550382e-034, -3.089278765476956e-034, 81.26217508737108, 0, 0, 81.26217508737108, False)
+SketchArc_1 = Sketch_1.addArc(4.151438510550382e-34, -3.089278765476956e-34, 81.26217508737108, 0, 0, 81.26217508737108, False)
 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchArc_1.center())
 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchLine_9.endPoint(), SketchArc_1.startPoint())
 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_2.result(), SketchArc_1.endPoint())
 SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchArc_1.endPoint())
 SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_7.result())
-SketchArc_2 = Sketch_1.addArc(4.151438510550382e-034, -3.089278765476956e-034, 76.26217508737108, 0, 0, 76.26217508737108, False)
+SketchArc_2 = Sketch_1.addArc(4.151438510550382e-34, -3.089278765476956e-34, 76.26217508737108, 0, 0, 76.26217508737108, False)
 SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchArc_2.center())
 SketchConstraintCoincidence_16.setName("SketchConstraintCoincidence_23")
 SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchLine_9.result(), SketchArc_2.startPoint())
 SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_24")
 SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchLine_10.result(), SketchArc_2.endPoint())
 SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_25")
-SketchConstraintDistance_1 = Sketch_1.setDistance(SketchArc_1.endPoint(), SketchArc_2.endPoint(), 5)
+SketchConstraintDistance_1 = Sketch_1.setDistance(SketchArc_1.endPoint(), SketchArc_2.endPoint(), 5, False)
 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_7.result(), "2*l")
 SketchConstraintLength_1.setName("SketchConstraintLength_2")
 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_6.result(), "l")
@@ -93,20 +92,26 @@ SketchCircle_10 = Sketch_2.addCircle(49.58498153094326, 15.18789884296047, 2.552
 SketchCircle_11 = Sketch_2.addCircle(66.22695092615982, 10.77677442495125, 4.536925074373645)
 SketchCircle_12 = Sketch_2.addCircle(50.98852111849166, 6.165144351577979, 3.547307159201085)
 model.do()
-Face_1 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_9f-SketchLine_10r-SketchArc_2_2f")])
-Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Wire-SketchLine_9f-SketchLine_10r-SketchArc_1_2f-SketchArc_2_2r")])
-Face_3 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_2_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_3_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_4_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_5_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_6_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_7_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_9_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_8_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_10_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_12_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_11_2")])
-Face_4 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_2/Edge-SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_2_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_3_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_4_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_5_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_7_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_6_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_9_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_8_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_10_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_12_2"), model.selection("EDGE", "Sketch_2/Edge-SketchCircle_11_2"), model.selection("WIRE", "Sketch_1/Wire-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_9f-SketchLine_10r-SketchArc_2_2f")])
-Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/XOY"))
+Face_1 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchLine_1r-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_9f-SketchArc_2_2f-SketchLine_10r_wire")])
+Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchLine_9f-SketchArc_1_2f-SketchLine_10r-SketchArc_2_2r_wire")])
+Face_3_objects = [model.selection("EDGE", "Sketch_2/SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/SketchCircle_2_2"), model.selection("EDGE", "Sketch_2/SketchCircle_3_2"), model.selection("EDGE", "Sketch_2/SketchCircle_4_2"), model.selection("EDGE", "Sketch_2/SketchCircle_5_2"), model.selection("EDGE", "Sketch_2/SketchCircle_6_2"), model.selection("EDGE", "Sketch_2/SketchCircle_7_2"), model.selection("EDGE", "Sketch_2/SketchCircle_9_2"), model.selection("EDGE", "Sketch_2/SketchCircle_8_2"), model.selection("EDGE", "Sketch_2/SketchCircle_10_2"), model.selection("EDGE", "Sketch_2/SketchCircle_12_2"), model.selection("EDGE", "Sketch_2/SketchCircle_11_2")]
+Face_3 = model.addFace(Part_1_doc, Face_3_objects)
+Face_4_objects = [model.selection("EDGE", "Sketch_2/SketchCircle_1_2"), model.selection("EDGE", "Sketch_2/SketchCircle_2_2"), model.selection("EDGE", "Sketch_2/SketchCircle_3_2"), model.selection("EDGE", "Sketch_2/SketchCircle_4_2"), model.selection("EDGE", "Sketch_2/SketchCircle_5_2"), model.selection("EDGE", "Sketch_2/SketchCircle_7_2"), model.selection("EDGE", "Sketch_2/SketchCircle_6_2"), model.selection("EDGE", "Sketch_2/SketchCircle_9_2"), model.selection("EDGE", "Sketch_2/SketchCircle_8_2"), model.selection("EDGE", "Sketch_2/SketchCircle_10_2"), model.selection("EDGE", "Sketch_2/SketchCircle_12_2"), model.selection("EDGE", "Sketch_2/SketchCircle_11_2"), model.selection("WIRE", "Sketch_1/Face-SketchLine_1r-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_9f-SketchArc_2_2f-SketchLine_10r_wire")]
+Face_4 = model.addFace(Part_1_doc, Face_4_objects)
+Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
 SketchLine_11 = Sketch_3.addLine(40, 0, 30, 0)
-SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Face_1_1/Edge_6&Face_1_1/Edge_7"))
+SketchPoint_1 = Sketch_3.addPoint(model.selection("VERTEX", "Face_1_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"))
 SketchConstraintCoincidence_19 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchPoint_1.result())
+SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_19")
 SketchLine_12 = Sketch_3.addLine(30, 0, 30, 10)
 SketchLine_13 = Sketch_3.addLine(30, 10, 40, 10)
 SketchLine_14 = Sketch_3.addLine(40, 10, 40, 0)
 SketchConstraintCoincidence_20 = Sketch_3.setCoincident(SketchLine_14.endPoint(), SketchLine_11.startPoint())
+SketchConstraintCoincidence_20.setName("SketchConstraintCoincidence_20")
 SketchConstraintCoincidence_21 = Sketch_3.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint())
+SketchConstraintCoincidence_21.setName("SketchConstraintCoincidence_21")
 SketchConstraintCoincidence_22 = Sketch_3.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint())
+SketchConstraintCoincidence_22.setName("SketchConstraintCoincidence_22")
 SketchConstraintCoincidence_23 = Sketch_3.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint())
 SketchConstraintCoincidence_23.setName("SketchConstraintCoincidence_26")
 SketchConstraintHorizontal_4 = Sketch_3.setHorizontal(SketchLine_11.result())
@@ -118,24 +123,26 @@ SketchConstraintEqual_5.setName("SketchConstraintEqual_6")
 SketchConstraintLength_3 = Sketch_3.setLength(SketchLine_13.result(), "l")
 SketchConstraintLength_3.setName("SketchConstraintLength_4")
 model.do()
-Face_5 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_3/Wire-SketchLine_11r-SketchLine_12r-SketchLine_13r-SketchLine_14r")])
-MultiTranslation_1 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Face_5_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
-Recover_1 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_4&Face_4_1/Edge_5"))
-MultiTranslation_2 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_1_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
-Recover_2 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_2&Face_4_1/Edge_3"))
-MultiTranslation_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "l", 4)
-Recover_3 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "LinearCopy_3_1/Translated_Edge_1_4&LinearCopy_3_1/Translated_Edge_1_3"))
-MultiTranslation_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "l", 3)
-Recover_4 = model.addRecover(Part_1_doc, MultiTranslation_1, [Face_5.result()])
-Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Face_4_1/Edge_6&Face_4_1/Edge_7"), model.selection("VERTEX", "Face_4_1/Edge_1&Face_4_1/Edge_9"))
-MultiTranslation_5 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_4_1")], model.selection("EDGE", "PartSet/OX"), "l", 2)
-Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "LinearCopy_4_1_2"), model.selection("FACE", "LinearCopy_1_1_8"), model.selection("FACE", "LinearCopy_1_1_4"), model.selection("FACE", "LinearCopy_1_1_3"), model.selection("FACE", "LinearCopy_1_1_6"), model.selection("FACE", "LinearCopy_1_1_2"), model.selection("FACE", "LinearCopy_1_1_7"), model.selection("FACE", "LinearCopy_2_1_3"), model.selection("FACE", "LinearCopy_3_1_4"), model.selection("FACE", "LinearCopy_2_1_8"), model.selection("FACE", "LinearCopy_2_1_4"), model.selection("FACE", "LinearCopy_2_1_7"), model.selection("FACE", "LinearCopy_4_1_3"), model.selection("FACE", "LinearCopy_1_1_1"), model.selection("FACE", "LinearCopy_5_1_2"), model.selection("FACE", "LinearCopy_4_1_1"), model.selection("FACE", "LinearCopy_5_1_1"), model.selection("FACE", "LinearCopy_3_1_3"), model.selection("FACE", "LinearCopy_3_1_2"), model.selection("FACE", "LinearCopy_3_1_1"), model.selection("FACE", "LinearCopy_2_1_6"), model.selection("FACE", "LinearCopy_2_1_2"), model.selection("FACE", "LinearCopy_2_1_5"), model.selection("FACE", "LinearCopy_2_1_1"), model.selection("FACE", "LinearCopy_1_1_5")])
+Face_5 = model.addFace(Part_1_doc, [model.selection("WIRE", "Sketch_3/Face-SketchLine_14r-SketchLine_13r-SketchLine_12r-SketchLine_11r_wire")])
+LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Face_5_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
+Recover_1 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_1_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_6_StartVertex&Sketch_1/SketchLine_5_EndVertex"))
+LinearCopy_2 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_1_1")], model.selection("EDGE", "PartSet/OX"), "l", 4, model.selection("EDGE", "PartSet/OY"), "l", 2)
+Recover_2 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
+Translation_2 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_2_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_4_StartVertex&Sketch_1/SketchLine_3_EndVertex"))
+LinearCopy_3 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "l", 4)
+Recover_3 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
+Translation_3 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_3_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "LinearCopy_3_1_1/MV:Translated&Sketch_3/SketchLine_12_EndVertex&Sketch_3/SketchLine_13_StartVertex"))
+LinearCopy_4 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "l", 3)
+Recover_4 = model.addRecover(Part_1_doc, LinearCopy_1, [Face_5.result()])
+Translation_4 = model.addTranslation(Part_1_doc, [model.selection("FACE", "Recover_4_1")], model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_9_StartVertex&Sketch_1/SketchLine_7_EndVertex"), model.selection("VERTEX", "Face_4_1/Modified_Vertex&Sketch_1/SketchLine_10_StartVertex&Sketch_1/SketchLine_1_StartVertex"))
+LinearCopy_5 = model.addMultiTranslation(Part_1_doc, [model.selection("FACE", "Translation_4_1")], model.selection("EDGE", "PartSet/OX"), "l", 2)
+Group_1_objects = [model.selection("FACE", "LinearCopy_4_1_2"), model.selection("FACE", "LinearCopy_1_1_8"), model.selection("FACE", "LinearCopy_1_1_4"), model.selection("FACE", "LinearCopy_1_1_3"), model.selection("FACE", "LinearCopy_1_1_6"), model.selection("FACE", "LinearCopy_1_1_2"), model.selection("FACE", "LinearCopy_1_1_7"), model.selection("FACE", "LinearCopy_2_1_3"), model.selection("FACE", "LinearCopy_3_1_4"), model.selection("FACE", "LinearCopy_2_1_8"), model.selection("FACE", "LinearCopy_2_1_4"), model.selection("FACE", "LinearCopy_2_1_7"), model.selection("FACE", "LinearCopy_4_1_3"), model.selection("FACE", "LinearCopy_1_1_1"), model.selection("FACE", "LinearCopy_5_1_2"), model.selection("FACE", "LinearCopy_4_1_1"), model.selection("FACE", "LinearCopy_5_1_1"), model.selection("FACE", "LinearCopy_3_1_3"), model.selection("FACE", "LinearCopy_3_1_2"), model.selection("FACE", "LinearCopy_3_1_1"), model.selection("FACE", "LinearCopy_2_1_6"), model.selection("FACE", "LinearCopy_2_1_2"), model.selection("FACE", "LinearCopy_2_1_5"), model.selection("FACE", "LinearCopy_2_1_1"), model.selection("FACE", "LinearCopy_1_1_5")]
+Group_1 = model.addGroup(Part_1_doc, Group_1_objects)
 Group_1.setName("Group_3")
 Group_1.result().setName("assemblages")
-Group_2 = model.addGroup(Part_1_doc, [model.selection("FACE", "Face_2_1"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_12")])
+Group_2_objects = [model.selection("FACE", "Face_2_1"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_12")]
+Group_2 = model.addGroup(Part_1_doc, Group_2_objects)
 Group_2.setName("Group_1")
 Group_2.result().setName("eau")
 Group_2.result().setColor(0, 170, 255)
@@ -143,41 +150,30 @@ Group_3 = model.addGroup(Part_1_doc, [model.selection("FACE", "Face_4_1")])
 Group_3.setName("Group_2")
 Group_3.result().setName("acier")
 Group_3.result().setColor(170, 85, 0)
-Shell_1 = model.addShell(Part_1_doc, [model.selection("FACE", "LinearCopy_1_1_1"), model.selection("FACE", "LinearCopy_1_1_2"), model.selection("FACE", "LinearCopy_1_1_3"), model.selection("FACE", "LinearCopy_1_1_4"), model.selection("FACE", "LinearCopy_1_1_5"), model.selection("FACE", "LinearCopy_1_1_6"), model.selection("FACE", "LinearCopy_1_1_7"), model.selection("FACE", "LinearCopy_2_1_4"), model.selection("FACE", "LinearCopy_2_1_5"), model.selection("FACE", "LinearCopy_2_1_6"), model.selection("FACE", "LinearCopy_2_1_7"), model.selection("FACE", "LinearCopy_2_1_8"), model.selection("FACE", "LinearCopy_2_1_1"), model.selection("FACE", "LinearCopy_2_1_2"), model.selection("FACE", "LinearCopy_2_1_3"), model.selection("FACE", "LinearCopy_3_1_4"), model.selection("FACE", "LinearCopy_3_1_3"), model.selection("FACE", "LinearCopy_3_1_2"), model.selection("FACE", "LinearCopy_3_1_1"), model.selection("FACE", "LinearCopy_4_1_1"), model.selection("FACE", "LinearCopy_4_1_2"), model.selection("FACE", "LinearCopy_4_1_3"), model.selection("FACE", "LinearCopy_5_1_1"), model.selection("FACE", "LinearCopy_5_1_2"), model.selection("FACE", "LinearCopy_1_1_8")])
-Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_4_1"), model.selection("FACE", "Face_2_1"), model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_12"), model.selection("SHELL", "Shell_1_1")])
-Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPOUND", "Partition_1_1"))
-Remove_SubShapes_1.setSubShapesToKeep([model.selection("FACE", "Partition_1_1_2"), model.selection("FACE", "Partition_1_1_3"), model.selection("FACE", "Partition_1_1_4"), model.selection("FACE", "Partition_1_1_5"), model.selection("FACE", "Partition_1_1_6"), model.selection("FACE", "Partition_1_1_7"), model.selection("FACE", "Partition_1_1_8"), model.selection("FACE", "Partition_1_1_9")])
+Shell_1_objects = [model.selection("FACE", "LinearCopy_1_1_1"), model.selection("FACE", "LinearCopy_1_1_2"), model.selection("FACE", "LinearCopy_1_1_3"), model.selection("FACE", "LinearCopy_1_1_4"), model.selection("FACE", "LinearCopy_1_1_5"), model.selection("FACE", "LinearCopy_1_1_6"), model.selection("FACE", "LinearCopy_1_1_7"), model.selection("FACE", "LinearCopy_2_1_4"), model.selection("FACE", "LinearCopy_2_1_5"), model.selection("FACE", "LinearCopy_2_1_6"), model.selection("FACE", "LinearCopy_2_1_7"), model.selection("FACE", "LinearCopy_2_1_8"), model.selection("FACE", "LinearCopy_2_1_1"), model.selection("FACE", "LinearCopy_2_1_2"), model.selection("FACE", "LinearCopy_2_1_3"), model.selection("FACE", "LinearCopy_3_1_4"), model.selection("FACE", "LinearCopy_3_1_3"), model.selection("FACE", "LinearCopy_3_1_2"), model.selection("FACE", "LinearCopy_3_1_1"), model.selection("FACE", "LinearCopy_4_1_1"), model.selection("FACE", "LinearCopy_4_1_2"), model.selection("FACE", "LinearCopy_4_1_3"), model.selection("FACE", "LinearCopy_5_1_1"), model.selection("FACE", "LinearCopy_5_1_2"), model.selection("FACE", "LinearCopy_1_1_8")]
+Shell_1 = model.addShell(Part_1_doc, Shell_1_objects)
+Partition_1_objects = [model.selection("FACE", "Face_3_1"), model.selection("FACE", "Face_3_2"), model.selection("FACE", "Face_4_1"), model.selection("FACE", "Face_2_1"), model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_3_5"), model.selection("FACE", "Face_3_3"), model.selection("FACE", "Face_3_4"), model.selection("FACE", "Face_3_7"), model.selection("FACE", "Face_3_6"), model.selection("FACE", "Face_3_8"), model.selection("FACE", "Face_3_9"), model.selection("FACE", "Face_3_10"), model.selection("FACE", "Face_3_11"), model.selection("FACE", "Face_3_12"), model.selection("SHELL", "Shell_1_1")]
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects)
+model.do()
 model.end()
 
 # move groups
 model.begin()
-Part_1_doc.moveFeature(Group_1.feature(), Remove_SubShapes_1.feature())
+Part_1_doc.moveFeature(Group_1.feature(), Partition_1.feature())
 Part_1_doc.moveFeature(Group_2.feature(), Group_1.feature())
 Part_1_doc.moveFeature(Group_3.feature(), Group_2.feature())
 model.end()
 
-# check that group 2 is correct (some subs are removed), but Group_1 and Group_3 elements are removed (because shell is removed)
+# check that all groups are correct
 from ModelAPI import *
 aFactory = ModelAPI_Session.get().validators()
 
-assert(Group_2.groupList().size() != 0)
-for a in range(Group_2.groupList().size()):
-  if not Group_1.groupList().value(a).context() is None:
-    assert(len(Group_1.groupList().value(a).namingName()) == 0)
-
-#assert(aFactory.validate(Group_3.feature()))
-#assert(Group_3.groupList().size() != 0)
-#for a in range(Group_3.groupList().size()):
-#  assert(Group_3.groupList().value(a).value().shapeTypeStr() == "FACE")
-#  assert(len(Group_3.groupList().value(a).namingName()) > 0)
+for Group in [Group_1, Group_2, Group_3]:
+  assert(aFactory.validate(Group.feature()))
+  assert(Group.groupList().size() != 0)
+  for a in range(Group.groupList().size()):
+    assert(Group.groupList().value(a).value().shapeTypeStr() == "FACE")
+    assert(len(Group.groupList().value(a).namingName()) > 0)
 
-# for Group in [Group_1, Group_2, Group_3]:
-#   if Group == Group_2:
-#     assert(aFactory.validate(Group.feature()))
-#   assert(Group.groupList().size() != 0)
-#   for a in range(Group.groupList().size()):
-#     if Group != Group_2:
-#       assert(len(Group.groupList().value(a).namingName()) == 0)
-#     else:
-#       assert(Group.groupList().value(a).value().shapeTypeStr() == "FACE")
-#       assert(len(Group.groupList().value(a).namingName()) > 0)
+# for the issue #2892 check fix
+assert(model.checkPythonDump())