X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FTest%2FTest2255.py;h=45ffc33404dec5c3fbed10b17c91c9f2df569d0b;hb=947f4a46a1cccd1b6fe1ca746629396b6a71f631;hp=92193a3a5dc60c0862c855a8e02c4426fa96859c;hpb=dc7d4d86b58b81684abc9b5a2be8ec30f210c2da;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/Test/Test2255.py b/src/FeaturesPlugin/Test/Test2255.py index 92193a3a5..45ffc3340 100644 --- a/src/FeaturesPlugin/Test/Test2255.py +++ b/src/FeaturesPlugin/Test/Test2255.py @@ -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 -## +# Copyright (C) 2014-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 +# from salome.shaper import model @@ -42,12 +41,13 @@ SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchCircle_1 = Sketch_1.addCircle(0, 0, 24.97092001270093) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchCircle_1.center()) model.do() -Wire_1 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_3"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_1")]) -Wire_2 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")]) +Wire_1_objects = [model.selection("EDGE", "Sketch_1/SketchLine_2"), model.selection("EDGE", "Sketch_1/SketchLine_3"), model.selection("EDGE", "Sketch_1/SketchLine_4"), model.selection("EDGE", "Sketch_1/SketchLine_1")] +Wire_1 = model.addWire(Part_1_doc, Wire_1_objects) +Wire_2 = model.addWire(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchCircle_1_2")]) Face_1 = model.addFace(Part_1_doc, [model.selection("WIRE", "Wire_1_1")]) Face_2 = model.addFace(Part_1_doc, [model.selection("WIRE", "Wire_2_1")]) Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Face_1_1"), model.selection("FACE", "Face_2_1")], model.selection(), 50, 0) -Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "PartSet/YOZ")) +Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("YOZ")) SketchLine_5 = Sketch_2.addLine(49.62901186301215, 25.3130971701971, 39.15939470736273, 25.3130971701971) SketchLine_6 = Sketch_2.addLine(39.15939470736273, 25.3130971701971, 39.15939470736273, 38.96586914453801) SketchLine_7 = Sketch_2.addLine(39.15939470736273, 38.96586914453801, 49.62901186301215, 38.96586914453801) @@ -61,7 +61,7 @@ SketchConstraintVertical_3 = Sketch_2.setVertical(SketchLine_6.result()) SketchConstraintHorizontal_4 = Sketch_2.setHorizontal(SketchLine_7.result()) SketchConstraintVertical_4 = Sketch_2.setVertical(SketchLine_8.result()) model.do() -ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_5r-SketchLine_6r-SketchLine_7r-SketchLine_8r")], model.selection(), 50, 50, [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_2")]) +ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchLine_8r-SketchLine_7r-SketchLine_6r-SketchLine_5r")], model.selection(), 50, 50, [model.selection("SOLID", "Extrusion_1_1"), model.selection("SOLID", "Extrusion_1_2")]) model.do() model.end()