]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/Test/Test2654.py
Salome HOME
Copyright update 2022
[modules/shaper.git] / src / SketchPlugin / Test / Test2654.py
index 066d5e292a4a67ff288e1e2925bc6d6171a3dbb9..b5cda035420c0e1c2c4c75a8ee6e2669edc10913 100644 (file)
@@ -1,22 +1,21 @@
-## Copyright (C) 2018-20xx  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) 2018-2022  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
+#
 
 """
     Test2654.py
@@ -113,13 +112,13 @@ SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchLine_1.startPoint(
 SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_23")
 SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_11.result(), SketchArc_2.startPoint(), 7.37, True)
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6r-SketchLine_7r-SketchLine_8r-SketchLine_9r-SketchLine_10r-SketchArc_1_2r-SketchArc_2_2f-SketchArc_3_2f")], model.selection(), "h", 0)
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_3"))
-SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3&Extrusion_1_1/From_Face_1"), False)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchArc_3_2f-SketchLine_10r-SketchArc_1_2r-SketchLine_9r-SketchLine_8r-SketchLine_7r-SketchLine_6r-SketchArc_2_2f")], model.selection(), "h", 0)
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_7"))
+SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_8][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_7][Extrusion_1_1/From_Face]"), False)
 SketchPoint_2 = SketchProjection_3.createdFeature()
-SketchProjection_4 = Sketch_2.addProjection(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2&Extrusion_1_1/From_Face_1"), False)
+SketchProjection_4 = Sketch_2.addProjection(model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_7][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_6][Extrusion_1_1/From_Face]"), False)
 SketchPoint_3 = SketchProjection_4.createdFeature()
-SketchProjection_5 = Sketch_2.addProjection(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_4&Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"), False)
+SketchProjection_5 = Sketch_2.addProjection(model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_8][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_7][Extrusion_1_1/To_Face]"), False)
 SketchPoint_4 = SketchProjection_5.createdFeature()
 SketchLine_13 = Sketch_2.addLine(6.005577592461473, 0, -5.994422407538528, 0)
 SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchAPI_Point(SketchPoint_2).coordinates(), SketchLine_13.startPoint())
@@ -129,7 +128,7 @@ SketchConstraintCoincidence_20.setName("SketchConstraintCoincidence_26")
 SketchLine_14 = Sketch_2.addLine(-5.994422407538528, 0, -5.994422407538528, -3.5)
 SketchConstraintCoincidence_21 = Sketch_2.setCoincident(SketchLine_13.endPoint(), SketchLine_14.startPoint())
 SketchConstraintCoincidence_21.setName("SketchConstraintCoincidence_27")
-SketchProjection_6 = Sketch_2.addProjection(model.selection("VERTEX", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1"), False)
+SketchProjection_6 = Sketch_2.addProjection(model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_7][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_6][Extrusion_1_1/To_Face]"), False)
 SketchPoint_5 = SketchProjection_6.createdFeature()
 SketchConstraintCoincidence_22 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchPoint_5.result())
 SketchConstraintCoincidence_22.setName("SketchConstraintCoincidence_28")
@@ -161,7 +160,7 @@ SketchConstraintVertical_6 = Sketch_2.setVertical(SketchLine_17.result())
 SketchConstraintLength_6 = Sketch_2.setLength(SketchLine_17.result(), 7)
 SketchConstraintEqual_2 = Sketch_2.setEqual(SketchLine_17.result(), SketchLine_15.result())
 model.do()
-Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_13f-SketchLine_14f-SketchLine_15f-SketchLine_16r-SketchLine_17r-SketchArc_5_2f")], model.selection(), "h", 0)
+Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_13f-SketchLine_14f-SketchLine_15f-SketchArc_5_2f-SketchLine_17r-SketchLine_16r")], model.selection(), "h", 0)
 model.do()
 
 
@@ -178,9 +177,6 @@ assert(Split_1.feature().error() != "")
 Part_1_doc.removeFeature(Split_1.feature())
 model.do()
 model.checkSketch(Sketch_2, 0)
-
-Part_1_doc.setCurrentFeature(Extrusion_2.feature(), True)
-
 model.end()
 
 assert(model.checkPythonDump())