Salome HOME
Replace horizontal / vertical constraints by perpendicular constraints for rectangle
[modules/shaper.git] / src / SketchPlugin / Test / Test1779.py
index 797248731414e585bcaa1c973c0984fb9b712737..79a08e009c040e0a9334b3e4911ef0a5cae63028 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
+#
 
 """
     Test1779.py
@@ -205,10 +204,10 @@ SketchConstraintTangent_10 = Sketch_1.setTangent(SketchLine_1.result(), SketchAr
 SketchConstraintTangent_10.setName("SketchConstraintTangent_13")
 SketchConstraintAngle_2 = Sketch_1.setAngle(SketchLine_11.result(), SketchLine_10.result(), 45)
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_13r-SketchLine_14f-SketchLine_2f-SketchArc_1_2f-SketchArc_2_2f-SketchLine_5r-SketchArc_3_2f-SketchCircle_1_2r-SketchCircle_2_2r-SketchCircle_3_2r-SketchArc_4_2f-SketchArc_5_2r-SketchArc_6_2r-SketchLine_21r-SketchCircle_4_2r")], model.selection(), "height", 0)
-Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face_14"))
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchArc_1_2f-SketchLine_2f-SketchArc_3_2f-SketchLine_5r-SketchArc_2_2f-SketchArc_4_2f-SketchLine_21r-SketchArc_6_2r-SketchLine_14f-SketchArc_5_2r-SketchLine_13r-SketchCircle_2_2r-SketchCircle_1_2r-SketchCircle_4_2r-SketchCircle_3_2r")], model.selection(), "height", 0)
+Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2"))
 SketchLine_12 = Sketch_2.addLine(38.24999999999999, 6.5, 13.75, 6.5)
-SketchLine_13 = Sketch_2.addLine(model.selection("EDGE", "Extrusion_1_1/Generated_Face_14&Extrusion_1_1/To_Face_1"))
+SketchLine_13 = Sketch_2.addLine(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2][Extrusion_1_1/To_Face_1]"))
 SketchLine_13.setName("SketchLine_15")
 SketchLine_13.result().setName("SketchLine_15")
 SketchConstraintCoincidence_25 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_13.result())
@@ -238,7 +237,7 @@ SketchConstraintLength_3 = Sketch_2.setLength(SketchLine_12.result(), "width_hol
 SketchConstraintDistance_13 = Sketch_2.setDistance(SketchLine_13.endPoint(), SketchLine_16.result(), "width_hole/2")
 SketchConstraintDistance_13.setName("SketchConstraintDistance_17")
 model.do()
-ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_12f-SketchLine_16f-SketchLine_17f-SketchLine_18f")], model.selection(), 0, 100, [model.selection("SOLID", "Extrusion_1_1")])
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_12r-SketchLine_16f-SketchLine_17f-SketchLine_18f")], model.selection(), 0, 100, [model.selection("SOLID", "Extrusion_1_1")])
 model.do()
 
 # check ExtrusionCut_1 is valid