Salome HOME
updated copyright message
[modules/shaper.git] / src / FeaturesPlugin / Test / Test1942.py
index 93272c18752581d0a4de093c5d518a8128ddfdc8..832c20b9c0e9beb323b5fef1892dc892bba803ca 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
 
@@ -29,25 +28,25 @@ Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
 model.addParameter(Part_1_doc, "a", "100")
 Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/Plane_4"))
-SketchLine_1 = Sketch_1.addLine(-5.023684372475525, -46.5755143466786, -14.75825153820805, -43.01597925234075)
+SketchLine_1 = Sketch_1.addLine(-5.024014514861164, -46.57477619916804, -15.03025649976126, -42.91660461599292)
 SketchLine_1.setName("SketchLine_9")
 SketchLine_1.result().setName("SketchLine_9")
-SketchLine_2 = Sketch_1.addLine(-33.96152175760117, -20.26294727816075, -38.72043789437247, 5.632510332222703)
+SketchLine_2 = Sketch_1.addLine(-34.15308715195452, -20.5925185611531, -39.51293324824182, 6.356619200673476)
 SketchLine_2.setName("SketchLine_10")
 SketchLine_2.result().setName("SketchLine_10")
-SketchLine_3 = Sketch_1.addLine(-5.023684372475525, -46.5755143466786, -30.86227207373359, -37.12739424591874)
+SketchLine_3 = Sketch_1.addLine(-5.024014514861164, -46.57477619916804, -30.86442523156243, -37.12780736470863)
 SketchLine_3.setName("SketchLine_1")
 SketchLine_3.result().setName("SketchLine_1")
 SketchLine_3.setAuxiliary(True)
-SketchLine_4 = Sketch_1.addLine(-30.86227207373359, -37.12739424591874, -38.72043789437247, 5.632510332222703)
+SketchLine_4 = Sketch_1.addLine(-30.86442523156243, -37.12780736470863, -39.51293324824182, 6.356619200673476)
 SketchLine_4.setName("SketchLine_2")
 SketchLine_4.result().setName("SketchLine_2")
 SketchLine_4.setAuxiliary(True)
 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
-SketchLine_5 = Sketch_1.addLine(-20.37351638704503, 39.82660556161157, 5.515492360623621, 50.89855436380311)
+SketchLine_5 = Sketch_1.addLine(-21.88471935002519, 39.79243387785534, 5.516674902531107, 51.5099134867221)
 SketchLine_5.setName("SketchLine_4")
 SketchLine_5.result().setName("SketchLine_4")
-SketchLine_6 = Sketch_1.addLine(5.515492360623621, 50.89855436380311, 32.11790618078412, 35.7788047045564)
+SketchLine_6 = Sketch_1.addLine(5.516674902531107, 51.5099134867221, 32.11790618078412, 35.7788047045564)
 SketchLine_6.setName("SketchLine_5")
 SketchLine_6.result().setName("SketchLine_5")
 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint())
@@ -57,19 +56,19 @@ SketchLine_7.setName("SketchLine_6")
 SketchLine_7.result().setName("SketchLine_6")
 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint())
 SketchConstraintCoincidence_3.setName("SketchConstraintCoincidence_5")
-SketchLine_8 = Sketch_1.addLine(51.23593736581751, -10.42185420425237, 33.52439630860805, -30.08966199583723)
+SketchLine_8 = Sketch_1.addLine(51.23593736581751, -10.42185420425237, 33.52471395405271, -30.09043472300023)
 SketchLine_8.setName("SketchLine_7")
 SketchLine_8.result().setName("SketchLine_7")
 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint())
 SketchConstraintCoincidence_4.setName("SketchConstraintCoincidence_6")
-SketchLine_9 = Sketch_1.addLine(33.52439630860805, -30.08966199583723, -5.023684372475525, -46.5755143466786)
+SketchLine_9 = Sketch_1.addLine(33.52471395405271, -30.09043472300023, -5.024014514861164, -46.57477619916804)
 SketchLine_9.setName("SketchLine_8")
 SketchLine_9.result().setName("SketchLine_8")
 SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_9.startPoint())
 SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_7")
 SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_3.startPoint(), SketchLine_9.endPoint())
 SketchConstraintCoincidence_6.setName("SketchConstraintCoincidence_8")
-SketchArc_1 = Sketch_1.addArc(-4.455634849643539, -14.84052735945157, -33.96152175760117, -20.26294727816075, -14.75825153820805, -43.01597925234075, False)
+SketchArc_1 = Sketch_1.addArc(-4.72938863253667, -14.74051331180418, -34.15308715195452, -20.5925185611531, -15.03025649976126, -42.91660461599292, False)
 SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_2.startPoint())
 SketchConstraintCoincidence_7.setName("SketchConstraintCoincidence_9")
 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_1.endPoint())
@@ -85,7 +84,7 @@ SketchConstraintCoincidence_11.setName("SketchConstraintCoincidence_13")
 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_2.startPoint(), SketchLine_4.result())
 SketchConstraintCoincidence_12.setName("SketchConstraintCoincidence_14")
 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], 30)
-SketchArc_2 = Sketch_1.addArc(-8.152231059872202, 11.25015706261054, -38.72043789437247, 5.632510332222703, -20.37351638704503, 39.82660556161157, True)
+SketchArc_2 = Sketch_1.addArc(-10.08923472882396, 12.20862445002239, -39.51293324824182, 6.356619200673476, -21.88471935002519, 39.79243387785534, True)
 SketchConstraintRadius_2 = Sketch_1.setRadius(SketchArc_2.results()[1], 30)
 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchArc_2.startPoint(), SketchLine_2.endPoint())
 SketchConstraintCoincidence_13.setName("SketchConstraintCoincidence_15")
@@ -175,14 +174,30 @@ SketchConstraintParallel_2 = Sketch_2.setParallel(SketchLine_10.result(), Sketch
 SketchConstraintCoincidence_32 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchPoint_7.coordinates())
 SketchConstraintCoincidence_32.setName("SketchConstraintCoincidence_34")
 model.do()
-Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_9r-SketchLine_10r-SketchLine_4r-SketchLine_5r-SketchLine_6r-SketchLine_7r-SketchLine_8r-SketchArc_1_2f-SketchArc_2_2f-SketchArc_4_2r-SketchArc_3_2r")], model.selection("EDGE", "Sketch_2/Edge-SketchLine_12"), 360, 0)
+Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_8r-SketchLine_7r-SketchLine_6r-SketchLine_5r-SketchLine_4r-SketchArc_2_2f-SketchLine_10r-SketchArc_1_2f-SketchLine_9r-SketchArc_3_2r-SketchArc_4_2r")], model.selection("EDGE", "Sketch_2/SketchLine_12"), 360, 0)
 Partition_1 = model.addPartition(Part_1_doc, [model.selection("FACE", "PartSet/Plane_4"), model.selection("SOLID", "Revolution_1_1")])
 Recover_1 = model.addRecover(Part_1_doc, Partition_1, [Revolution_1.result()])
 Plane_5 = model.addPlane(Part_1_doc, model.selection("EDGE", "PartSet/Axis_4"), model.selection("VERTEX", "PartSet/Point_2"), True)
-Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchArc_2_2"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_5"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_6"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_7"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_8"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_1"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_2")])
-Intersection_1 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Recover_1_1")], [model.selection("FACE", "Face_1_1")])
-Group_1 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_2_1"), model.selection("VERTEX", "Intersection_1_1/Generated_Vertex_2"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_6_1"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_4_1"), model.selection("VERTEX", "Intersection_1_1/Generated_Vertex_3"), model.selection("VERTEX", "Intersection_1_1/Generated_Vertex_1"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_1_1"), model.selection("VERTEX", "Intersection_1_1/Generated_Vertex_4"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_3_1"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_7_1"), model.selection("VERTEX", "Intersection_1_1/Modified_Vertex_5_1")])
-Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Intersection_1_1_7"), model.selection("EDGE", "Intersection_1_1_6"), model.selection("EDGE", "Intersection_1_1_3"), model.selection("EDGE", "Intersection_1_1_11"), model.selection("EDGE", "Intersection_1_1_5"), model.selection("EDGE", "Intersection_1_1_1"), model.selection("EDGE", "Intersection_1_1_4"), model.selection("EDGE", "Intersection_1_1_2"), model.selection("EDGE", "Intersection_1_1_10"), model.selection("EDGE", "Intersection_1_1_9"), model.selection("EDGE", "Intersection_1_1_8")])
+Face_1_objects = [model.selection("EDGE", "Sketch_1/SketchArc_2_2"), model.selection("EDGE", "Sketch_1/SketchLine_4"), model.selection("EDGE", "Sketch_1/SketchLine_5"), model.selection("EDGE", "Sketch_1/SketchLine_6"), model.selection("EDGE", "Sketch_1/SketchLine_7"), model.selection("EDGE", "Sketch_1/SketchLine_8"), model.selection("EDGE", "Sketch_1/SketchLine_1"), model.selection("EDGE", "Sketch_1/SketchLine_2")]
+Face_1 = model.addFace(Part_1_doc, Face_1_objects)
+Intersection_1 = model.addIntersection(Part_1_doc, [model.selection("SOLID", "Recover_1_1"), model.selection("FACE", "Face_1_1")])
+Group_1_objects = [
+model.selection("VERTEX", "Intersection_1_1_3/Modified_Vertex&Sketch_1/SketchLine_1_StartVertex&Sketch_1/SketchLine_8_EndVertex"),
+model.selection("VERTEX", "[Intersection_1_1_1/Intersection_1_1_1]e[weak_name_2]"),
+model.selection("VERTEX", "Intersection_1_1_9/Modified_Vertex&Sketch_1/SketchLine_5_StartVertex&Sketch_1/SketchLine_4_EndVertex"),
+model.selection("VERTEX", "Intersection_1_1_7/Modified_Vertex&Sketch_1/SketchLine_7_StartVertex&Sketch_1/SketchLine_6_EndVertex"),
+model.selection("VERTEX", "[Intersection_1_1_4/Intersection_1_1_4]e[weak_name_2]"),
+model.selection("VERTEX", "[Intersection_1_1_1/Intersection_1_1_1]e[weak_name_1]"),
+model.selection("VERTEX", "Intersection_1_1_2/Modified_Vertex&Sketch_1/SketchLine_2_EndVertex&Sketch_1/SketchArc_2_2_EndVertex"),
+model.selection("VERTEX", "[Intersection_1_1_4/Intersection_1_1_4]e[weak_name_1]"),
+model.selection("VERTEX", "Intersection_1_1_6/Modified_Vertex&Sketch_1/SketchLine_8_StartVertex&Sketch_1/SketchLine_7_EndVertex"),
+model.selection("VERTEX", "Intersection_1_1_10/Modified_Vertex&Sketch_1/SketchLine_4_StartVertex&Sketch_1/SketchArc_2_2_StartVertex"),
+model.selection("VERTEX", "Intersection_1_1_8/Modified_Vertex&Sketch_1/SketchLine_6_StartVertex&Sketch_1/SketchLine_5_EndVertex")]
+
+Group_1 = model.addGroup(Part_1_doc, Group_1_objects)
+Group_2_objects = [model.selection("EDGE", "Intersection_1_1_7"), model.selection("EDGE", "Intersection_1_1_6"), model.selection("EDGE", "Intersection_1_1_3"), model.selection("EDGE", "Intersection_1_1_11"), model.selection("EDGE", "Intersection_1_1_5"), model.selection("EDGE", "Intersection_1_1_1"), model.selection("EDGE", "Intersection_1_1_4"), model.selection("EDGE", "Intersection_1_1_2"), model.selection("EDGE", "Intersection_1_1_10"), model.selection("EDGE", "Intersection_1_1_9"), model.selection("EDGE", "Intersection_1_1_8")]
+Group_2 = model.addGroup(Part_1_doc, Group_2_objects)
+model.do()
 model.end()
 
 aGroupFeature = Group_1.feature()