Salome HOME
Update copyrights
[modules/shaper.git] / src / FeaturesPlugin / Test / Test1379.py
index a9d0762a96791ab2139ecaa7924c286ce3ceabb9..287caa88ca7bf7ddaf3b637ee164d2d6c2ac90dc 100644 (file)
@@ -1,25 +1,23 @@
-## 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-2019  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
+#
 
 # -*- coding: utf-8 -*-
-from SketchAPI import *
 
 from salome.shaper import model
 
@@ -30,7 +28,7 @@ SketchProjection_1 = Sketch_1.addProjection(model.selection("EDGE", "OZ"), False
 SketchLine_1 = SketchProjection_1.createdFeature()
 SketchLine_1.setName("SketchLine_5")
 SketchLine_1.result().setName("SketchLine_5")
-SketchLine_2 = Sketch_1.addLine(0.008, 0.0005000000000000006, 0.0075, -1.258295422426014e-035)
+SketchLine_2 = Sketch_1.addLine(0.008, 0.0005000000000000006, 0.0075, -1.258295422426014e-35)
 SketchLine_2.setName("SketchLine_9")
 SketchLine_2.result().setName("SketchLine_9")
 SketchProjection_2 = Sketch_1.addProjection(model.selection("EDGE", "OX"), False)
@@ -39,7 +37,7 @@ SketchLine_3.setName("SketchLine_10")
 SketchLine_3.result().setName("SketchLine_10")
 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.result())
 SketchConstraintCoincidence_1.setName("SketchConstraintCoincidence_12")
-SketchLine_4 = Sketch_1.addLine(0.0075, -1.258295422426014e-035, 0.005, 0)
+SketchLine_4 = Sketch_1.addLine(0.0075, -1.258295422426014e-35, 0.005, 0)
 SketchLine_4.setName("SketchLine_11")
 SketchLine_4.result().setName("SketchLine_11")
 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_4.startPoint())
@@ -60,7 +58,7 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_5.result())
 SketchConstraintVertical_1.setName("SketchConstraintVertical_3")
 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_6.result())
 SketchConstraintHorizontal_1.setName("SketchConstraintHorizontal_3")
-SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_3.result(), SketchLine_2.result(), 45)
+SketchConstraintAngle_1 = Sketch_1.setAngle(SketchLine_3.result(), SketchLine_2.result(), 45.00000000000001)
 SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_5.result(), 0.02)
 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_6.result(), 0.005)
 SketchConstraintLength_2.setName("SketchConstraintLength_4")
@@ -95,14 +93,14 @@ SketchLine_11.setName("SketchLine_16")
 SketchLine_11.result().setName("SketchLine_16")
 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchLine_11.startPoint())
 SketchConstraintCoincidence_12.setName("SketchConstraintCoincidence_17")
-SketchLine_12 = Sketch_1.addLine(0.008999999999999999, 0.042, -5.446629538236431e-036, 0.042)
+SketchLine_12 = Sketch_1.addLine(0.008999999999999999, 0.042, -5.446629538236431e-36, 0.042)
 SketchLine_12.setName("SketchLine_17")
 SketchLine_12.result().setName("SketchLine_17")
 SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint())
 SketchConstraintCoincidence_13.setName("SketchConstraintCoincidence_18")
 SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchLine_12.endPoint(), SketchLine_1.result())
 SketchConstraintCoincidence_14.setName("SketchConstraintCoincidence_19")
-SketchLine_13 = Sketch_1.addLine(-5.446629538236431e-036, 0.042, 0, 0.02)
+SketchLine_13 = Sketch_1.addLine(-5.446629538236431e-36, 0.042, 0, 0.02)
 SketchLine_13.setName("SketchLine_18")
 SketchLine_13.result().setName("SketchLine_18")
 SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint())
@@ -141,16 +139,16 @@ SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_22")
 model.do()
 Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
-Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "PartSet/Sketch_1/Face-SketchLine_9r-SketchLine_11r-SketchLine_12r-SketchLine_13r-SketchLine_7f-SketchLine_8f-SketchArc_1_2r-SketchLine_14f-SketchArc_2_2r-SketchLine_15f-SketchLine_16f-SketchLine_17f-SketchLine_18f")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
+Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "PartSet/Sketch_1/Face-SketchLine_7f-SketchLine_8f-SketchArc_1_2r-SketchLine_14f-SketchArc_2_2r-SketchLine_15f-SketchLine_16f-SketchLine_17f-SketchLine_18f-SketchLine_13r-SketchLine_12r-SketchLine_11r-SketchLine_9r")], model.selection("EDGE", "PartSet/OZ"), 360, 0)
 Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOZ"))
-SketchLine_14 = Sketch_2.addLine(-5.446629538236431e-036, 0.042, 5.172728347136208e-022, 0.03963932022500211)
-SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "PartSet/Sketch_1/Vertex-SketchLine_18s-SketchLine_17e"), False)
+SketchLine_14 = Sketch_2.addLine(-5.446629538236431e-36, 0.042, 5.172728347136208e-22, 0.03963932022500211)
+SketchProjection_3 = Sketch_2.addProjection(model.selection("VERTEX", "PartSet/Sketch_1/SketchLine_17_EndVertex"), False)
 SketchPoint_1 = SketchProjection_3.createdFeature()
 SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchLine_14.startPoint(), SketchPoint_1.result())
-SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/Sketch_1/Edge-SketchLine_18"), False)
+SketchProjection_4 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/Sketch_1/SketchLine_18"), False)
 SketchLine_15 = SketchProjection_4.createdFeature()
 SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchLine_15.result())
-SketchArc_3 = Sketch_2.addArc(0.02, 0.062, 5.172728347136208e-022, 0.03963932022500211, 0.02, 0.032, False)
+SketchArc_3 = Sketch_2.addArc(0.02, 0.062, 5.172728347136208e-22, 0.03963932022500211, 0.02, 0.032, False)
 SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchArc_3.startPoint())
 SketchLine_16 = Sketch_2.addLine(0.02, 0.032, 0.02, 0.042)
 SketchConstraintCoincidence_21 = Sketch_2.setCoincident(SketchArc_3.endPoint(), SketchLine_16.startPoint())
@@ -166,9 +164,9 @@ SketchProjection_5 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OX"
 SketchLine_18 = SketchProjection_5.createdFeature()
 SketchConstraintDistance_7 = Sketch_2.setDistance(SketchLine_18.result(), SketchArc_3.center(), 0.062, True)
 model.do()
-Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchArc_1_2f-SketchLine_3f-SketchLine_4f")], model.selection(), 0.008999999999999999, 0.008999999999999999)
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchArc_1_2f-SketchLine_3f-SketchLine_4f")], model.selection(), 0.008999999999999999, 0.008999999999999999)
 Fuse_1 = model.addFuse(Part_1_doc, [model.selection("SOLID", "Revolution_1_1")], [model.selection("SOLID", "Extrusion_1_1")])
-Axis_4 = model.addAxis(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face_13"))
+Axis_4 = model.addAxis(Part_1_doc, model.selection("FACE", "Revolution_1_1/Generated_Face&PartSet/Sketch_1/SketchLine_7"))
 RevolutionCut_1 = model.addRevolutionCut(Part_1_doc, [], model.selection("EDGE", "PartSet/OZ"), 10, 28, [model.selection("SOLID", "Fuse_1_1")])
 Sketch_3 = model.addSketch(Part_1_doc, model.standardPlane("XOZ"))
 SketchLine_19 = Sketch_3.addLine(0.029, 0.042, 0.029, 0.03267384683690003)
@@ -183,7 +181,7 @@ SketchConstraintVertical_6 = Sketch_3.setVertical(SketchLine_19.result())
 SketchLine_21 = Sketch_3.addLine(0.008999999999999999, 0.042, 0.029, 0.042)
 SketchLine_21.setName("SketchLine_9")
 SketchLine_21.result().setName("SketchLine_9")
-SketchProjection_6 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), False)
+SketchProjection_6 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/SketchLine_4"), False)
 SketchLine_22 = SketchProjection_6.createdFeature()
 SketchLine_22.setName("SketchLine_10")
 SketchLine_22.result().setName("SketchLine_10")
@@ -195,9 +193,11 @@ SketchConstraintCoincidence_27 = Sketch_3.setCoincident(SketchLine_21.startPoint
 SketchConstraintCoincidence_27.setName("SketchConstraintCoincidence_11")
 SketchConstraintHorizontal_6 = Sketch_3.setHorizontal(SketchLine_21.result())
 SketchConstraintAngle_2 = Sketch_3.setAngle(SketchLine_20.result(), SketchLine_21.result(), 25)
-SketchProjection_7 = Sketch_3.addProjection(model.selection("VERTEX", "PartSet/Sketch_1/Vertex-SketchLine_17s-SketchLine_16e"), False)
+SketchProjection_7 = Sketch_3.addProjection(model.selection("VERTEX", "PartSet/Sketch_1/SketchLine_16_EndVertex"), False)
+SketchPoint_2 = SketchProjection_7.createdFeature()
 SketchConstraintLength_6 = Sketch_3.setLength(SketchLine_21.result(), 0.02)
 RevolutionCut_1.setNestedSketch(Sketch_3)
+model.do()
 model.end()
 
 # check that result was created