X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test.models%2Fbracket32.py;h=bdcfb30994239e5980c9e92e828af2308a733d5a;hb=661d714d52967df831372fea0c79b810ffe55239;hp=3690c9d3b03974561cbb10fc7d30863bc1d36bcb;hpb=4f54ae9351159addc59c7ac74f2859555a4a86f9;p=modules%2Fshaper.git diff --git a/test.models/bracket32.py b/test.models/bracket32.py index 3690c9d3b..bdcfb3099 100644 --- a/test.models/bracket32.py +++ b/test.models/bracket32.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-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 @@ -389,7 +388,7 @@ SketchConstraintRadius_8 = Sketch_3.setRadius(SketchCircle_2.results()[1], "TDE/ SketchConstraintRadius_8.setName("SketchConstraintRadius_2") SketchConstraintDistance_15 = Sketch_3.setDistance(SketchCircle_2.center(), SketchCircle_1.center(), 30) SketchConstraintDistance_15.setName("SketchConstraintDistance_9") -SketchLine_36 = Sketch_3.addLine(model.selection("EDGE", "Sketch_1/Edge-SketchLine_1")) +SketchLine_36 = Sketch_3.addLine(model.selection("EDGE", "Sketch_1/SketchLine_1")) SketchLine_36.setName("SketchLine_25") SketchLine_36.result().setName("SketchLine_25") SketchConstraintDistance_16 = Sketch_3.setDistance(SketchCircle_1.center(), SketchLine_36.result(), 85) @@ -398,10 +397,10 @@ model.do() Sketch_4 = model.addSketch(Part_1_doc, model.defaultPlane("YOZ")) SketchCircle_3 = Sketch_4.addCircle(0, 85, 7) SketchCircle_4 = Sketch_4.addCircle(0, 55, 7) -SketchPoint_1 = Sketch_4.addPoint(model.selection("VERTEX", "Sketch_3/Vertex-SketchCircle_1")) +SketchPoint_1 = Sketch_4.addPoint(model.selection("VERTEX", "Sketch_3/SketchCircle_1_2__cc")) SketchConstraintCoincidence_61 = Sketch_4.setCoincident(SketchPoint_1.coordinates(), SketchCircle_3.center()) SketchConstraintCoincidence_61.setName("SketchConstraintCoincidence_19") -SketchPoint_2 = Sketch_4.addPoint(model.selection("VERTEX", "Sketch_3/Vertex-SketchCircle_2")) +SketchPoint_2 = Sketch_4.addPoint(model.selection("VERTEX", "Sketch_3/SketchCircle_2_2__cc")) SketchConstraintCoincidence_62 = Sketch_4.setCoincident(SketchPoint_2.coordinates(), SketchCircle_4.center()) SketchConstraintCoincidence_62.setName("SketchConstraintCoincidence_20") SketchConstraintRadius_9 = Sketch_4.setRadius(SketchCircle_3.results()[1], "TDI/2") @@ -411,11 +410,8 @@ SketchConstraintRadius_10.setName("SketchConstraintRadius_4") model.do() Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), "TL/2-3", "TL/2-3") ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), 100, 100, [model.selection("SOLID", "Extrusion_1_1")]) -ExtrusionCut_1.result().setName("ExtrusionCut_1_1") ExtrusionFuse_1 = model.addExtrusionFuse(Part_1_doc, [model.selection("COMPOUND", "Sketch_3")], model.selection(), "TL/2", "TL/2", [model.selection("SOLID", "ExtrusionCut_1_1")]) -ExtrusionFuse_1.result().setName("ExtrusionFuse_1_1") ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_4")], model.selection(), 60, 60, [model.selection("SOLID", "ExtrusionFuse_1_1")]) -ExtrusionCut_2.result().setName("ExtrusionCut_2_1") Sketch_5 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_5 = Sketch_5.addCircle(30, -41, 7.5) SketchLine_37 = Sketch_5.addLine(model.selection("EDGE", "PartSet/OX")) @@ -439,7 +435,7 @@ SketchConstraintMirror_2.setName("SketchConstraintMirror_3") model.do() Sketch_6 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchCircle_9 = Sketch_6.addCircle(30, -41, 4) -SketchPoint_3 = Sketch_6.addPoint(model.selection("VERTEX", "Sketch_5/Vertex-SketchCircle_5")) +SketchPoint_3 = Sketch_6.addPoint(model.selection("VERTEX", "Sketch_5/SketchCircle_5_2__cc")) SketchConstraintCoincidence_63 = Sketch_6.setCoincident(SketchPoint_3.coordinates(), SketchCircle_9.center()) SketchConstraintCoincidence_63.setName("SketchConstraintCoincidence_21") SketchConstraintRadius_12 = Sketch_6.setRadius(SketchCircle_9.results()[1], "BHD/2") @@ -460,7 +456,7 @@ model.do() Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), 30, False) Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1")) SketchLine_41 = Sketch_7.addLine(-41, 0, -41, 8) -SketchPoint_4 = Sketch_7.addPoint(model.selection("VERTEX", "Sketch_5/Vertex-SketchCircle_5")) +SketchPoint_4 = Sketch_7.addPoint(model.selection("VERTEX", "Sketch_5/SketchCircle_5_2__cc")) SketchConstraintCoincidence_64 = Sketch_7.setCoincident(SketchLine_41.startPoint(), SketchPoint_4.result()) SketchConstraintCoincidence_64.setName("SketchConstraintCoincidence_34") SketchLine_42 = Sketch_7.addLine(-41, 8, -34, 8) @@ -541,8 +537,7 @@ SketchConstraintCoincidence_77.setName("SketchConstraintCoincidence_47") SketchConstraintRadius_13 = Sketch_7.setRadius(SketchArc_7.results()[1], "BHPFR") SketchConstraintRadius_13.setName("SketchConstraintRadius_8") model.do() -RevolutionFuse_1 = model.addRevolutionFuse(Part_1_doc, [model.selection("COMPOUND", "Sketch_7")], model.selection("EDGE", "Sketch_7/Edge-SketchLine_41"), 360, 0, [model.selection("SOLID", "ExtrusionCut_2_1")]) -RevolutionFuse_1.result().setName("RevolutionFuse_1_1") +RevolutionFuse_1 = model.addRevolutionFuse(Part_1_doc, [model.selection("COMPOUND", "Sketch_7")], model.selection("EDGE", "Sketch_7/SketchLine_41"), 360, 0, [model.selection("SOLID", "ExtrusionCut_2_1")]) Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1")) SketchLine_49 = Sketch_8.addLine(32, 6, 32.50001476412091, 6.000000000000001) SketchLine_49.setName("SketchLine_55") @@ -550,7 +545,7 @@ SketchLine_49.result().setName("SketchLine_55") SketchLine_50 = Sketch_8.addLine(32, 0, 41, 0) SketchLine_50.setName("SketchLine_49") SketchLine_50.result().setName("SketchLine_49") -SketchPoint_5 = Sketch_8.addPoint(model.selection("VERTEX", "Sketch_6/Vertex-SketchCircle_10")) +SketchPoint_5 = Sketch_8.addPoint(model.selection("VERTEX", "Sketch_6/SketchCircle_10_2__cc")) SketchConstraintCoincidence_78 = Sketch_8.setCoincident(SketchLine_50.endPoint(), SketchPoint_5.result()) SketchConstraintCoincidence_78.setName("SketchConstraintCoincidence_50") SketchLine_51 = Sketch_8.addLine(41, 0, 41, 8) @@ -638,8 +633,7 @@ SketchConstraintCoincidence_94.setName("SketchConstraintCoincidence_66") SketchConstraintRadius_14 = Sketch_8.setRadius(SketchArc_8.results()[1], 1.5) SketchConstraintRadius_14.setName("SketchConstraintRadius_9") model.do() -RevolutionFuse_2 = model.addRevolutionFuse(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchLine_55r-SketchLine_49f-SketchLine_50f-SketchLine_56r-SketchLine_52f-SketchLine_53f-SketchArc_7_2r")], model.selection("EDGE", "Sketch_8/Edge-SketchLine_50"), 360, 0, [model.selection("SOLID", "RevolutionFuse_1_1")]) -RevolutionFuse_2.result().setName("RevolutionFuse_2_1") +RevolutionFuse_2 = model.addRevolutionFuse(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchLine_52f-SketchLine_49f-SketchLine_50f-SketchLine_53f-SketchLine_56r-SketchArc_7_2r-SketchLine_55r")], model.selection("EDGE", "Sketch_8/SketchLine_50"), 360, 0, [model.selection("SOLID", "RevolutionFuse_1_1")]) Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), 30, True) Sketch_9 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2")) SketchLine_57 = Sketch_9.addLine(-32.50001494742042, 5.999999999999998, -32, 6) @@ -648,7 +642,7 @@ SketchLine_57.result().setName("SketchLine_63") SketchLine_58 = Sketch_9.addLine(-32, 0, -41, 0) SketchLine_58.setName("SketchLine_57") SketchLine_58.result().setName("SketchLine_57") -SketchPoint_8 = Sketch_9.addPoint(model.selection("VERTEX", "Sketch_6/Vertex-SketchCircle_11")) +SketchPoint_8 = Sketch_9.addPoint(model.selection("VERTEX", "Sketch_6/SketchCircle_11_2__cc")) SketchConstraintCoincidence_95 = Sketch_9.setCoincident(SketchLine_58.endPoint(), SketchPoint_8.result()) SketchConstraintCoincidence_95.setName("SketchConstraintCoincidence_67") SketchLine_59 = Sketch_9.addLine(-41, 0, -41, 7.999999999999999) @@ -743,7 +737,7 @@ SketchLine_65.result().setName("SketchLine_71") SketchLine_66 = Sketch_10.addLine(32, 0, 41, 0) SketchLine_66.setName("SketchLine_65") SketchLine_66.result().setName("SketchLine_65") -SketchPoint_11 = Sketch_10.addPoint(model.selection("VERTEX", "Sketch_6/Vertex-SketchCircle_12")) +SketchPoint_11 = Sketch_10.addPoint(model.selection("VERTEX", "Sketch_6/SketchCircle_12_2__cc")) SketchConstraintCoincidence_112 = Sketch_10.setCoincident(SketchLine_66.endPoint(), SketchPoint_11.result()) SketchConstraintCoincidence_112.setName("SketchConstraintCoincidence_84") SketchLine_67 = Sketch_10.addLine(41, 0, 41, 7.999999999999999) @@ -831,11 +825,9 @@ SketchConstraintCoincidence_128.setName("SketchConstraintCoincidence_100") SketchConstraintRadius_16 = Sketch_10.setRadius(SketchArc_10.results()[1], 1.5) SketchConstraintRadius_16.setName("SketchConstraintRadius_11") model.do() -RevolutionFuse_3 = model.addRevolutionFuse(Part_1_doc, [model.selection("COMPOUND", "Sketch_9")], model.selection("EDGE", "Sketch_9/Edge-SketchLine_58"), 360, 0, [model.selection("SOLID", "RevolutionFuse_2_1")]) -RevolutionFuse_3.result().setName("RevolutionFuse_3_1") -RevolutionFuse_4 = model.addRevolutionFuse(Part_1_doc, [model.selection("COMPOUND", "Sketch_10")], model.selection("EDGE", "Sketch_10/Edge-SketchLine_66"), 360, 0, [model.selection("SOLID", "RevolutionFuse_3_1")]) -RevolutionFuse_4.result().setName("RevolutionFuse_4_1") -ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchCircle_11_2f"), model.selection("FACE", "Sketch_6/Face-SketchCircle_9_2f"), model.selection("WIRE", "Sketch_6/Wire-SketchCircle_10_2f"), model.selection("FACE", "Sketch_6/Face-SketchCircle_12_2f")], model.selection("EDGE", "PartSet/OZ"), "BPS+5", 5, [model.selection("SOLID", "RevolutionFuse_4_1")]) +RevolutionFuse_3 = model.addRevolutionFuse(Part_1_doc, [model.selection("COMPOUND", "Sketch_9")], model.selection("EDGE", "Sketch_9/SketchLine_58"), 360, 0, [model.selection("SOLID", "RevolutionFuse_2_1")]) +RevolutionFuse_4 = model.addRevolutionFuse(Part_1_doc, [model.selection("COMPOUND", "Sketch_10")], model.selection("EDGE", "Sketch_10/SketchLine_66"), 360, 0, [model.selection("SOLID", "RevolutionFuse_3_1")]) +ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchCircle_11_2f"), model.selection("FACE", "Sketch_6/Face-SketchCircle_9_2r"), model.selection("WIRE", "Sketch_6/Face-SketchCircle_10_2f_wire"), model.selection("FACE", "Sketch_6/Face-SketchCircle_12_2f")], model.selection("EDGE", "PartSet/OZ"), "BPS+5", 5, [model.selection("SOLID", "RevolutionFuse_4_1")]) # Test reexecution after parameter change Parameter_BPS.setValue(3)