X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test.API%2FSHAPER%2FPrimitives%2FTestCylinder.py;h=850ce6733b0b66a0de2ab75bc687f1dcf57192c8;hb=97b96d6364082910df669b877938d6d561c02b56;hp=b1afa6e610e86693617bece4208efbea650a161b;hpb=4a80bb33cc89d29a22866dcf7e9b94b885cc6cfb;p=modules%2Fshaper.git diff --git a/test.API/SHAPER/Primitives/TestCylinder.py b/test.API/SHAPER/Primitives/TestCylinder.py index b1afa6e61..850ce6733 100644 --- a/test.API/SHAPER/Primitives/TestCylinder.py +++ b/test.API/SHAPER/Primitives/TestCylinder.py @@ -1,5 +1,25 @@ +## 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 +## + """ -Test case for Primitive Cylinder feature. +Test case for Primitive Cylinder feature. Written on High API. """ #from ModelAPI import * @@ -23,6 +43,7 @@ SketchLine_3 = Sketch_1.addLine(44.70109718071649, 32.40093347950982, 40.1917811 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_3.endPoint()) +model.do() # Extrusion Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f")], model.selection(), 100, 0) @@ -55,7 +76,7 @@ Cylinder_8 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "InvalidNam Cylinder_9 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "InvalidName"), 5, 10) Cylinder_10 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_3s-SketchLine_2e"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_3"), 50, 120) Cylinder_11 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Vertex_1_1"), model.selection("EDGE", "Edge_1_1"), 60, 100) -Cylinder_12 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Extrusion_1_1/Generated_Face_5&Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"), 5, 10) +Cylinder_12 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_1&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/To_Face_1"), 5, 10) Cylinder_13 = model.addCylinder(Part_1_doc, "r", "h") Cylinder_14 = model.addCylinder(Part_1_doc, 5, 10, 45) Cylinder_15 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Point_1"), model.selection("EDGE", "PartSet/OX"), 5, 10, 90) @@ -72,7 +93,7 @@ Cylinder_25 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "InvalidNa Cylinder_26 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "InvalidName"), 5, 10, 90) Cylinder_27 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Sketch_1/Vertex-SketchLine_2s-SketchLine_1e"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_3"), 50, 120, 90) Cylinder_28 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Vertex_1_1"), model.selection("EDGE", "Edge_2_1"), 60, 100, 180) -Cylinder_29 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Extrusion_2_1/Generated_Face_5&Extrusion_1_1/Generated_Face_4&Extrusion_1_1/To_Face_1"), model.selection("EDGE", "Extrusion_2_1/Generated_Face_2&Extrusion_2_1/To_Face_1"), 5, 10, 120) +Cylinder_29 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "Extrusion_2_1/Generated_Face_3&Extrusion_2_1/Generated_Face_2&Extrusion_2_1/To_Face_1"), model.selection("EDGE", "Extrusion_2_1/Generated_Face_2&Extrusion_2_1/To_Face_1"), 5, 10, 120) Cylinder_30 = model.addCylinder(Part_1_doc, "r2", "h2", "angle") model.do()