From: jfa Date: Fri, 19 Mar 2021 14:36:27 +0000 (+0300) Subject: Test cases for bos #23885: OCCT 7.5 related regressions X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3730d06cbac32754e0a9e5fb9e79d9526ef1b62e;p=modules%2Fshaper.git Test cases for bos #23885: OCCT 7.5 related regressions --- diff --git a/src/FeaturesPlugin/Test/Test23885_Ciseaux.py b/src/FeaturesPlugin/Test/Test23885_Ciseaux.py new file mode 100644 index 000000000..3a8735d7d --- /dev/null +++ b/src/FeaturesPlugin/Test/Test23885_Ciseaux.py @@ -0,0 +1,417 @@ +# Copyright (C) 2021 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 +# + +import sys +import salome + +salome.salome_init() +import salome_notebook +notebook = salome_notebook.NoteBook() +sys.path.insert(0, r'/export/home/Shaper/Build') + +### +### SHAPER component +### + +from SketchAPI import * + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() + +### Create Part +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() + +### Create Sketch +Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("XOY")) + +### Create SketchProjection +SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False) +SketchPoint_1 = SketchProjection_1.createdFeature() + +### Create SketchProjection +SketchProjection_2 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False) +SketchLine_1 = SketchProjection_2.createdFeature() +SketchLine_1.setName("SketchLine_2") +SketchLine_1.result().setName("SketchLine_2") + +### Create SketchArc +SketchArc_1 = Sketch_1.addArc(5.769187715431377, -24.3252229816311, 1.288150416501811, 0.2699046806844986, 5.769187715431377, -49.3252229816311, False) +Sketch_1.setRadius(SketchArc_1.results()[1], 25) + +### Create SketchLine +SketchLine_2 = Sketch_1.addLine(5.769187715431377, -49.3252229816311, 110.7691877154314, -49.3252229816311) +SketchLine_2.setName("SketchLine_3") +SketchLine_2.result().setName("SketchLine_3") +Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_2.startPoint()) +Sketch_1.setHorizontal(SketchLine_2.result()) +Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_2.startPoint()) + +### Create SketchArc +SketchArc_2 = Sketch_1.addArc(110.7691877154314, -44.3252229816311, 110.7691877154314, -49.3252229816311, 115.7691877154314, -44.3252229816311, False) +Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchArc_2.startPoint()) +Sketch_1.setRadius(SketchArc_2.results()[1], 5) +Sketch_1.setHorizontalDistance(SketchArc_2.endPoint(), SketchArc_1.endPoint(), 110) + +### Create SketchLine +SketchLine_3 = Sketch_1.addLine(115.7691877154314, -44.3252229816311, 115.7691877154314, -29.3252229816311) +SketchLine_3.setName("SketchLine_4") +SketchLine_3.result().setName("SketchLine_4") +Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_3.startPoint()) +Sketch_1.setVertical(SketchLine_3.result()) + +### Create SketchArc +SketchArc_3 = Sketch_1.addArc(110.7691877154314, -29.3252229816311, 115.7691877154314, -29.3252229816311, 110.7691877154314, -24.3252229816311, False) +Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchArc_3.startPoint()) +Sketch_1.setRadius(SketchArc_3.results()[1], 5) +Sketch_1.setVerticalDistance(SketchArc_3.endPoint(), SketchLine_2.endPoint(), 25) + +### Create SketchLine +SketchLine_4 = Sketch_1.addLine(110.7691877154314, -24.3252229816311, 98.79659432401075, -24.3252229816311) +SketchLine_4.setName("SketchLine_5") +SketchLine_4.result().setName("SketchLine_5") +Sketch_1.setCoincident(SketchArc_3.endPoint(), SketchLine_4.startPoint()) +Sketch_1.setHorizontal(SketchLine_4.result()) + +### Create SketchArc +SketchArc_4 = Sketch_1.addArc(98.79659432401074, 5.674777018368899, 80.85123450211243, -18.3661060948322, 98.79659432401075, -24.3252229816311, False) +SketchArc_4.setName("SketchArc_5") +SketchArc_4.result().setName("SketchArc_5") +SketchArc_4.results()[1].setName("SketchArc_5_2") +Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchArc_4.endPoint()) +Sketch_1.setRadius(SketchArc_4.results()[1], 30) +Sketch_1.setTangent(SketchArc_1.results()[1], SketchLine_2.result()) +Sketch_1.setTangent(SketchLine_2.result(), SketchArc_2.results()[1]) +Sketch_1.setTangent(SketchArc_2.results()[1], SketchLine_3.result()) +Sketch_1.setTangent(SketchLine_3.result(), SketchArc_3.results()[1]) +Sketch_1.setTangent(SketchArc_3.results()[1], SketchLine_4.result()) +Sketch_1.setTangent(SketchLine_4.result(), SketchArc_4.results()[1]) + +### Create SketchArc +SketchArc_5 = Sketch_1.addArc(5.769187715431377, -24.3252229816311, 2.307649253892918, -9.730095319315502, 5.769187715431377, -39.3252229816311, False) +SketchArc_5.setName("SketchArc_6") +SketchArc_5.result().setName("SketchArc_6") +SketchArc_5.results()[1].setName("SketchArc_6_2") + +### Create SketchLine +SketchLine_5 = Sketch_1.addLine(5.769187715431377, -39.3252229816311, 35.76918771543138, -39.3252229816311) +SketchLine_5.setName("SketchLine_6") +SketchLine_5.result().setName("SketchLine_6") +Sketch_1.setCoincident(SketchArc_5.endPoint(), SketchLine_5.startPoint()) +Sketch_1.setHorizontal(SketchLine_5.result()) +Sketch_1.setVerticalDistance(SketchArc_5.startPoint(), SketchArc_1.startPoint(), 10) +Sketch_1.setTangent(SketchArc_5.results()[1], SketchLine_5.result()) +Sketch_1.setCoincident(SketchArc_5.center(), SketchArc_1.center()) + +### Create SketchPoint +SketchPoint_2 = Sketch_1.addPoint(170.7691877154314, -41.8252229816311) +Sketch_1.setHorizontalDistance(SketchArc_2.endPoint(), SketchPoint_2.coordinates(), 55) + +### Create SketchProjection +SketchProjection_3 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False) +SketchPoint_3 = SketchProjection_3.createdFeature() + +### Create SketchProjection +SketchProjection_4 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False) +SketchLine_6 = SketchProjection_4.createdFeature() +SketchLine_6.setName("SketchLine_7") +SketchLine_6.result().setName("SketchLine_7") + +### Create SketchProjection +SketchProjection_5 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False) +SketchPoint_4 = SketchProjection_5.createdFeature() + +### Create SketchProjection +SketchProjection_6 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False) +SketchLine_7 = SketchProjection_6.createdFeature() +SketchLine_7.setName("SketchLine_8") +SketchLine_7.result().setName("SketchLine_8") + +### Create SketchProjection +SketchProjection_7 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False) +SketchProjection_7.setName("SketchProjection_8") +SketchProjection_7.result().setName("SketchProjection_8") +SketchLine_8 = SketchProjection_7.createdFeature() +SketchLine_8.setName("SketchLine_9") +SketchLine_8.result().setName("SketchLine_9") + +### Create SketchProjection +SketchProjection_8 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False) +SketchProjection_8.setName("SketchProjection_9") +SketchProjection_8.result().setName("SketchProjection_9") +SketchPoint_5 = SketchProjection_8.createdFeature() +SketchPoint_5.setName("SketchPoint_6") +SketchPoint_5.result().setName("SketchPoint_6") + +### Create SketchProjection +SketchProjection_9 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False) +SketchProjection_9.setName("SketchProjection_10") +SketchProjection_9.result().setName("SketchProjection_10") +SketchLine_9 = SketchProjection_9.createdFeature() +SketchLine_9.setName("SketchLine_10") +SketchLine_9.result().setName("SketchLine_10") + +### Create SketchProjection +SketchProjection_10 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False) +SketchProjection_10.setName("SketchProjection_11") +SketchProjection_10.result().setName("SketchProjection_11") +SketchLine_10 = SketchProjection_10.createdFeature() +SketchLine_10.setName("SketchLine_11") +SketchLine_10.result().setName("SketchLine_11") + +### Create SketchProjection +SketchProjection_11 = Sketch_1.addProjection(model.selection("EDGE", "PartSet/OX"), False) +SketchProjection_11.setName("SketchProjection_12") +SketchProjection_11.result().setName("SketchProjection_12") +SketchLine_11 = SketchProjection_11.createdFeature() +SketchLine_11.setName("SketchLine_12") +SketchLine_11.result().setName("SketchLine_12") + +### Create SketchCircle +SketchCircle_1 = Sketch_1.addCircle(170.7691877154314, -41.8252229816311, 5) +Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchCircle_1.center()) +Sketch_1.setRadius(SketchCircle_1.results()[1], 5) + +### Create SketchLine +SketchLine_12 = Sketch_1.addLine(115.7691877154314, -29.3252229816311, 315.7691877154314, -29.3252229816311) +SketchLine_12.setName("SketchLine_13") +SketchLine_12.result().setName("SketchLine_13") +Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_12.startPoint()) +Sketch_1.setHorizontal(SketchLine_12.result()) +Sketch_1.setLength(SketchLine_12.result(), 200) + +### Create SketchArc +SketchArc_6 = Sketch_1.addArc(305.7691877154314, -29.3252229816311, 315.7691877154314, -29.3252229816311, 306.8253299980126, -39.26929475726426, True) +SketchArc_6.setName("SketchArc_9") +SketchArc_6.result().setName("SketchArc_9") +SketchArc_6.results()[1].setName("SketchArc_9_2") +Sketch_1.setCoincident(SketchLine_12.endPoint(), SketchArc_6.startPoint()) +Sketch_1.setRadius(SketchArc_6.results()[1], 10) +Sketch_1.setCoincident(SketchArc_6.center(), SketchLine_12.result()) + +### Create SketchLine +SketchLine_13 = Sketch_1.addLine(306.8253299980126, -39.26929475726426, 143.7691877154314, -56.58719935256279) +SketchLine_13.setName("SketchLine_14") +SketchLine_13.result().setName("SketchLine_14") +Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchLine_13.startPoint()) + +### Create SketchLine +SketchLine_14 = Sketch_1.addLine(129.0936803130578, -51.8252229816311, 120.7691877154314, -44.3252229816311) +SketchLine_14.setName("SketchLine_15") +SketchLine_14.result().setName("SketchLine_15") + +### Create SketchLine +SketchLine_15 = Sketch_1.addLine(120.7691877154314, -44.3252229816311, 115.7691877154314, -44.3252229816311) +SketchLine_15.setName("SketchLine_16") +SketchLine_15.result().setName("SketchLine_16") +Sketch_1.setCoincident(SketchLine_14.endPoint(), SketchLine_15.startPoint()) +Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_15.endPoint()) + +### Create SketchArc +SketchArc_7 = Sketch_1.addArc(141.7691877154314, -37.75626730933539, 129.0936803130578, -51.8252229816311, 143.7691877154314, -56.58719935256279, False) +SketchArc_7.setName("SketchArc_10") +SketchArc_7.result().setName("SketchArc_10") +SketchArc_7.results()[1].setName("SketchArc_10_2") +Sketch_1.setCoincident(SketchLine_14.startPoint(), SketchArc_7.startPoint()) +Sketch_1.setCoincident(SketchLine_13.endPoint(), SketchArc_7.endPoint()) +Sketch_1.setTangent(SketchArc_6.results()[1], SketchLine_13.result()) +Sketch_1.setTangent(SketchArc_7.results()[1], SketchLine_13.result()) +Sketch_1.setTangent(SketchArc_7.results()[1], SketchLine_14.result()) +Sketch_1.setHorizontal(SketchLine_15.result()) +Sketch_1.setHorizontalDistance(SketchArc_2.endPoint(), SketchLine_15.startPoint(), 5) +Sketch_1.setVerticalDistance(SketchLine_14.endPoint(), SketchLine_14.startPoint(), 7.5) +Sketch_1.setHorizontalDistance(SketchLine_3.startPoint(), SketchArc_7.endPoint(), 28) +Sketch_1.setHorizontalDistance(SketchArc_7.center(), SketchPoint_2.coordinates(), 29) + +### Create SketchLine +SketchLine_16 = Sketch_1.addLine(314.934339105343, -33.3252229816311, 115.7691877154314, -33.3252229816311) +SketchLine_16.setName("SketchLine_17") +SketchLine_16.result().setName("SketchLine_17") +Sketch_1.setHorizontal(SketchLine_16.result()) +Sketch_1.setCoincident(SketchLine_16.endPoint(), SketchLine_3.result()) +Sketch_1.setCoincident(SketchLine_16.startPoint(), SketchArc_6.results()[1]) +Sketch_1.setVerticalDistance(SketchLine_3.endPoint(), SketchLine_16.endPoint(), 4) + +### Create SketchPoint +SketchPoint_6 = Sketch_1.addPoint(170.7691877154314, -29.3252229816311) +SketchPoint_6.setName("SketchPoint_8") +SketchPoint_6.result().setName("SketchPoint_8") +Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_12.result()) +Sketch_1.setCoincident(SketchPoint_6.coordinates(), SketchLine_12.result()) +Sketch_1.setVerticalDistance(SketchPoint_6.coordinates(), SketchPoint_2.coordinates(), 12.5) +Sketch_1.setHorizontalDistance(SketchPoint_6.coordinates(), SketchLine_3.endPoint(), 55) + +### Create SketchLine +SketchLine_17 = Sketch_1.addLine(5.769187715431377, -24.3252229816311, 35.76918771543138, -24.3252229816311) +SketchLine_17.setName("SketchLine_18") +SketchLine_17.result().setName("SketchLine_18") +SketchLine_17.setAuxiliary(True) +Sketch_1.setCoincident(SketchArc_1.center(), SketchLine_17.startPoint()) +Sketch_1.setHorizontal(SketchLine_17.result()) +Sketch_1.setHorizontalDistance(SketchArc_5.center(), SketchLine_17.endPoint(), 30) + +### Create SketchArc +SketchArc_8 = Sketch_1.addArc(35.76918771543138, -24.3252229816311, 35.76918771543138, -39.3252229816311, 39.23072617696985, -9.730095319315502, False) +SketchArc_8.setName("SketchArc_11") +SketchArc_8.result().setName("SketchArc_11") +SketchArc_8.results()[1].setName("SketchArc_11_2") +Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchArc_8.startPoint()) + +### Create SketchArc +SketchArc_9 = Sketch_1.addArc(20.76918771543136, -87.57077618499868, 39.23072617696985, -9.730095319315502, 2.307649253892918, -9.730095319315502, False) +SketchArc_9.setName("SketchArc_12") +SketchArc_9.result().setName("SketchArc_12") +SketchArc_9.results()[1].setName("SketchArc_12_2") +Sketch_1.setCoincident(SketchArc_8.endPoint(), SketchArc_9.startPoint()) +Sketch_1.setCoincident(SketchArc_5.startPoint(), SketchArc_9.endPoint()) +Sketch_1.setCoincident(SketchAPI_Point(SketchPoint_1).coordinates(), SketchArc_1.results()[1]) +Sketch_1.setTangent(SketchArc_9.results()[1], SketchArc_5.results()[1]) +Sketch_1.setTangent(SketchArc_9.results()[1], SketchArc_8.results()[1]) +Sketch_1.setTangent(SketchArc_8.results()[1], SketchLine_5.result()) +Sketch_1.setCoincident(SketchLine_17.endPoint(), SketchArc_8.center()) + +### Create SketchArc +SketchArc_10 = Sketch_1.addArc(20.76918771543136, -87.57077618499868, 0, 0, 41.53838136414088, -1.407200488044206e-06, True) +SketchArc_10.setName("SketchArc_13") +SketchArc_10.result().setName("SketchArc_13") +SketchArc_10.results()[1].setName("SketchArc_13_2") +Sketch_1.setCoincident(SketchAPI_Point(SketchPoint_1).coordinates(), SketchArc_10.startPoint()) + +### Create SketchArc +SketchArc_11 = Sketch_1.addArc(16.84611780400845, -104.1119225319161, 41.53838136414088, -1.407200488044206e-06, 80.85123450211243, -18.3661060948322, True) +SketchArc_11.setName("SketchArc_14") +SketchArc_11.result().setName("SketchArc_14") +SketchArc_11.results()[1].setName("SketchArc_14_2") +Sketch_1.setCoincident(SketchArc_10.endPoint(), SketchArc_11.startPoint()) +Sketch_1.setCoincident(SketchArc_4.startPoint(), SketchArc_11.endPoint()) +Sketch_1.setTangent(SketchArc_1.results()[1], SketchArc_10.results()[1]) +Sketch_1.setTangent(SketchArc_10.results()[1], SketchArc_11.results()[1]) +Sketch_1.setTangent(SketchArc_11.results()[1], SketchArc_4.results()[1]) +Sketch_1.setRadius(SketchArc_11.results()[1], 107) +Sketch_1.setCoincident(SketchArc_9.center(), SketchArc_10.center()) +Sketch_1.setDistance(SketchArc_9.startPoint(), SketchArc_10.endPoint(), 10, True) +Sketch_1.setRadius(SketchArc_5.results()[1], 15) +Sketch_1.setRadius(SketchArc_10.results()[1], 90) +model.do() +Sketch_1.changeFacesOrder([[SketchLine_15.result(), SketchLine_14.result(), SketchArc_7.results()[1], SketchLine_13.result(), SketchArc_6.results()[1], SketchLine_16.result(), SketchLine_3.result(), SketchCircle_1.results()[1]], + [SketchLine_16.result(), SketchArc_6.results()[1], SketchLine_12.result(), SketchLine_3.result()], + [SketchArc_5.results()[1], SketchLine_5.result(), SketchArc_8.results()[1], SketchArc_9.results()[1]], + [SketchArc_1.results()[1], SketchLine_2.result(), SketchArc_2.results()[1], SketchLine_3.result(), SketchLine_3.result(), SketchArc_3.results()[1], SketchLine_4.result(), SketchArc_4.results()[1], SketchArc_11.results()[1], SketchArc_10.results()[1], SketchArc_9.results()[1], SketchArc_8.results()[1], SketchLine_5.result(), SketchArc_5.results()[1]], + [SketchCircle_1.results()[1]] + ]) +model.do() + +### Create Extrusion +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_16r-SketchLine_15r-SketchArc_10_2f-SketchLine_14r-SketchArc_9_2f-SketchLine_17f-SketchLine_4r-SketchCircle_1_2r"), model.selection("FACE", "Sketch_1/Face-SketchLine_17r-SketchArc_9_2f-SketchLine_13r-SketchLine_4r")], model.selection(), 3, 1) + +### Create Extrusion +Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchArc_1_2f-SketchLine_3f-SketchArc_2_2f-SketchLine_4f-SketchLine_4f-SketchArc_3_2f-SketchLine_5f-SketchArc_5_2r-SketchArc_14_2f-SketchArc_13_2f-SketchArc_12_2r-SketchArc_11_2r-SketchLine_6r-SketchArc_6_2r")], model.selection(), 6, 8) + +### Create Fillet +Fillet_1 = model.addFillet(Part_1_doc, [model.selection("FACE", "Extrusion_2_1/To_Face")], 2, keepSubResults = True) + +### Create Fillet +Fillet_2 = model.addFillet(Part_1_doc, [model.selection("FACE", "Extrusion_2_1/From_Face")], 2, keepSubResults = True) + +### Create Extrusion +Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchLine_16r-SketchLine_15r-SketchArc_10_2f-SketchLine_14r-SketchArc_9_2f-SketchLine_17f-SketchLine_4r-SketchCircle_1_2r_wire_2")], model.selection(), 4, 6) + +### Create Box +Box_1 = model.addBox(Part_1_doc, model.selection("VERTEX", "[Extrusion_1_1_1/Generated_Face&Sketch_1/SketchLine_14][Extrusion_1_1_1/Generated_Face&Sketch_1/SketchArc_9_2][Extrusion_1_1_1/To_Face]"), model.selection("VERTEX", "[Extrusion_1_1_2/Generated_Face&Sketch_1/SketchArc_9_2][Extrusion_1_1_2/Generated_Face&Sketch_1/SketchLine_13][Extrusion_1_1_2/From_Face]")) + +### Create Rotation +Rotation_1 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Box_1_1")], axis = model.selection("EDGE", "PartSet/OX"), angle = -45, keepSubResults = True) + +### Create Extrusion +Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Rotation_1_1/MF:Rotated&Box_1_1/Front")], model.selection(), 300, 0) + +### Create Translation +Translation_1 = model.addTranslation(Part_1_doc, [model.selection("COMPOUND", "all-in-Extrusion_4")], vector = [-200, -6, -23], keepSubResults = True) + +### Create Cut +Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "Extrusion_1_1_2")], [model.selection("SOLID", "Translation_1_1_1")], keepSubResults = True) + +### Create Fuse +Fuse_1_objects_1 = [model.selection("SOLID", "Cut_1_1_1"), + model.selection("SOLID", "Cut_1_1_2"), + model.selection("SOLID", "Fillet_2_1"), + model.selection("SOLID", "Extrusion_3_1")] +Fuse_1 = model.addFuse(Part_1_doc, Fuse_1_objects_1, removeEdges = True, keepSubResults = True) + +### Create Symmetry +Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Fuse_1_1")], model.selection("EDGE", "PartSet/OX"), keepOriginal = True, keepSubResults = True) + +### Create Sketch +Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Symmetry_1_1_2/MF:Symmetried&Extrusion_3_1/From_Face")) + +### Create SketchProjection +SketchProjection_12 = Sketch_2.addProjection(model.selection("EDGE", "[(Symmetry_1_1_2/MF:Symmetried&Extrusion_3_1/From_Face)(Symmetry_1_1_2/MF:Symmetried&Extrusion_1_1_2/From_Face&Extrusion_1_1_1/From_Face)][Symmetry_1_1_2/MF:Symmetried&Extrusion_3_1/From_Face]"), True) +SketchProjection_12.setName("SketchProjection_13") +SketchProjection_12.result().setName("SketchProjection_13") +SketchCircle_2 = SketchProjection_12.createdFeature() +model.do() + +### Create ExtrusionCut +ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchProjection_13r")], model.selection(), [model.selection("SOLID", "Symmetry_1_1_2")]) + +### Create Translation +Translation_2 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_1_1_2")], startPoint = model.selection("VERTEX", "[Symmetry_1_1_2/MF:Symmetried&Extrusion_1_1_2/From_Face&Extrusion_1_1_1/From_Face][ExtrusionCut_1_1_2/Generated_Face&Sketch_2/SketchProjection_13]"), endPoint = model.selection("VERTEX", "[(Symmetry_1_1_1/MF:Symmetried&Extrusion_3_1/From_Face)(Symmetry_1_1_1/MF:Symmetried&Extrusion_1_1_2/From_Face&Extrusion_1_1_1/From_Face)][Symmetry_1_1_1/MF:Symmetried&Extrusion_1_1_2/From_Face&Extrusion_1_1_1/From_Face]"), keepSubResults = True) + +### Create Axis +Axis_4 = model.addAxis(Part_1_doc, model.selection("FACE", "(Symmetry_1_1_1/MF:Symmetried&Extrusion_1_1_1/To_Face)(Symmetry_1_1_1/MF:Symmetried&Extrusion_3_1/To_Face)")) + +### Create Rotation +Rotation_2 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Translation_2_1_1")], axis = model.selection("EDGE", "Axis_1"), angle = 30, keepSubResults = True) + +### Create Fuse +Fuse_2 = model.addFuse(Part_1_doc, [model.selection("SOLID", "Rotation_2_1_1"), model.selection("SOLID", "Rotation_2_1_2")], removeEdges = True, keepSubResults = True) + +model.testHaveNamingSubshapes(Fuse_2, model, Part_1_doc) + +model.end() + +#model.generateTests(Fuse_2, "Fuse_2") + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Fuse_2, 1) +model.testNbSubResults(Fuse_2, [0]) +model.testNbSubShapes(Fuse_2, GeomAPI_Shape.SOLID, [1]) +model.testNbSubShapes(Fuse_2, GeomAPI_Shape.FACE, [106]) +model.testNbSubShapes(Fuse_2, GeomAPI_Shape.EDGE, [492]) +model.testNbSubShapes(Fuse_2, GeomAPI_Shape.VERTEX, [984]) +model.testResultsVolumes(Fuse_2, [128590.003649466452770866453647614]) + +from ModelAPI import * + +aFactory = ModelAPI_Session.get().validators() + +# Check that the features are not in error +for i in range(Part_1_doc.size("Features")): + feature = objectToFeature(Part_1_doc.object("Features", i)) + name = feature.name() + error = feature.error() + assert(error == ''), "The feature {0} is in error: {1}".format(name, error) + assert(aFactory.validate(feature)), "The feature {0} is in error: {1}".format(name, error) + +assert(Part_1_doc.size("Groups") == 3) + +#assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/Test/Test23885_grille_de_melange.py b/src/FeaturesPlugin/Test/Test23885_grille_de_melange.py new file mode 100644 index 000000000..ef7b4a4ca --- /dev/null +++ b/src/FeaturesPlugin/Test/Test23885_grille_de_melange.py @@ -0,0 +1,442 @@ +# Copyright (C) 2021 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 SketchAPI import * + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +model.addParameter(Part_1_doc, "ep", "0.00035") +model.addParameter(Part_1_doc, "n", "5") +model.addParameter(Part_1_doc, "cell_width", "0.01225") +model.addParameter(Part_1_doc, "grid_width", "(n+1)*ep+n*cell_width") +model.addParameter(Part_1_doc, "ailette_width", "0.0045") +Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_1.addLine(0.0633499999999998, 0, 0, 0) +SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False) +SketchPoint_1 = SketchProjection_1.createdFeature() +SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchPoint_1.result()) +SketchLine_2 = Sketch_1.addLine(0, 0, 0, 0.0633499999999998) +SketchLine_3 = Sketch_1.addLine(0, 0.0633499999999998, 0.06335, 0.0633499999999998) +SketchLine_4 = Sketch_1.addLine(0.06335, 0.0633499999999998, 0.0633499999999998, 0) +SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) +SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) +SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) +SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint()) +SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result()) +SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) +SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) +SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) +SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_1.result(), 0.06335) +SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_4.result(), 0.06335) +SketchLine_5 = Sketch_1.addLine(0.0126, 0.0126, 0.0003500000000000001, 0.0126) +SketchLine_6 = Sketch_1.addLine(0.0003500000000000001, 0.0126, 0.0003500000000000001, 0.0003500000000000001) +SketchLine_7 = Sketch_1.addLine(0.0003500000000000001, 0.0003500000000000001, 0.0126, 0.0003500000000000001) +SketchLine_8 = Sketch_1.addLine(0.0126, 0.0003500000000000001, 0.0126, 0.0126) +SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) +SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) +SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) +SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_7.endPoint(), SketchLine_8.startPoint()) +SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_5.result()) +SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_6.result()) +SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_7.result()) +SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result()) +SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_7.result(), 0.01225) +SketchConstraintEqual_1 = Sketch_1.setEqual(SketchLine_7.result(), SketchLine_8.result()) +SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_2.startPoint(), SketchLine_6.result(), "ep", True) +SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_7.startPoint(), SketchLine_1.result(), "ep", True) +SketchPoint_2 = Sketch_1.addPoint(0.01295, 0.00035) +SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_7.result()) +SketchConstraintDistance_3 = Sketch_1.setDistance(SketchPoint_2.coordinates(), SketchLine_8.result(), "ep", True) +SketchPoint_3 = Sketch_1.addPoint(0.00035, 0.01295) +SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchLine_6.result()) +SketchConstraintDistance_4 = Sketch_1.setDistance(SketchPoint_3.coordinates(), SketchLine_5.result(), "ep", True) +SketchMultiTranslation_1_objects = [SketchLine_6.result(), SketchLine_7.result(), SketchLine_5.result(), SketchLine_8.result()] +SketchMultiTranslation_1 = Sketch_1.addTranslation(SketchMultiTranslation_1_objects, SketchLine_6.endPoint(), SketchPoint_2.coordinates(), 5) +[SketchLine_9, SketchLine_10, SketchLine_11, SketchLine_12, SketchLine_13, SketchLine_14, SketchLine_15, SketchLine_16, SketchLine_17, SketchLine_18, SketchLine_19, SketchLine_20, SketchLine_21, SketchLine_22, SketchLine_23, SketchLine_24] = SketchMultiTranslation_1.translated() +SketchLine_21.setName("SketchLine_12") +SketchLine_21.result().setName("SketchLine_12") +SketchLine_20.setName("SketchLine_21") +SketchLine_20.result().setName("SketchLine_21") +SketchLine_19.setName("SketchLine_20") +SketchLine_19.result().setName("SketchLine_20") +SketchLine_18.setName("SketchLine_19") +SketchLine_18.result().setName("SketchLine_19") +SketchLine_17.setName("SketchLine_11") +SketchLine_17.result().setName("SketchLine_11") +SketchLine_16.setName("SketchLine_18") +SketchLine_16.result().setName("SketchLine_18") +SketchLine_15.setName("SketchLine_17") +SketchLine_15.result().setName("SketchLine_17") +SketchLine_14.setName("SketchLine_16") +SketchLine_14.result().setName("SketchLine_16") +SketchLine_13.setName("SketchLine_10") +SketchLine_13.result().setName("SketchLine_10") +SketchLine_12.setName("SketchLine_15") +SketchLine_12.result().setName("SketchLine_15") +SketchLine_11.setName("SketchLine_14") +SketchLine_11.result().setName("SketchLine_14") +SketchLine_10.setName("SketchLine_13") +SketchLine_10.result().setName("SketchLine_13") +SketchMultiTranslation_2_objects = [SketchLine_12.result(), SketchLine_7.result(), SketchLine_23.result(), SketchLine_6.result(), SketchLine_19.result(), SketchLine_5.result(), SketchLine_13.result(), SketchLine_15.result(), SketchLine_22.result(), SketchLine_11.result(), SketchLine_14.result(), SketchLine_18.result(), SketchLine_9.result(), SketchLine_21.result(), SketchLine_8.result(), SketchLine_10.result(), SketchLine_17.result(), SketchLine_20.result(), SketchLine_24.result(), SketchLine_16.result()] +SketchMultiTranslation_2 = Sketch_1.addTranslation(SketchMultiTranslation_2_objects, SketchLine_6.endPoint(), SketchPoint_3.coordinates(), 5) +[SketchLine_12, SketchLine_25, SketchLine_26, SketchLine_27, SketchLine_28, SketchLine_29, SketchLine_30, SketchLine_31, SketchLine_32, SketchLine_23, SketchLine_33, SketchLine_34, SketchLine_35, SketchLine_36, SketchLine_37, SketchLine_38, SketchLine_39, SketchLine_40, SketchLine_19, SketchLine_41, SketchLine_42, SketchLine_43, SketchLine_44, SketchLine_45, SketchLine_46, SketchLine_47, SketchLine_48, SketchLine_13, SketchLine_49, SketchLine_50, SketchLine_51, SketchLine_52, SketchLine_15, SketchLine_53, SketchLine_54, SketchLine_55, SketchLine_56, SketchLine_22, SketchLine_57, SketchLine_58, SketchLine_59, SketchLine_60, SketchLine_11, SketchLine_61, SketchLine_62, SketchLine_63, SketchLine_64, SketchLine_14, SketchLine_65, SketchLine_66, SketchLine_67, SketchLine_68, SketchLine_18, SketchLine_69, SketchLine_70, SketchLine_71, SketchLine_72, SketchLine_9, SketchLine_73, SketchLine_74, SketchLine_75, SketchLine_76, SketchLine_21, SketchLine_77, SketchLine_78, SketchLine_79, SketchLine_80, SketchLine_81, SketchLine_82, SketchLine_83, SketchLine_84, SketchLine_10, SketchLine_85, SketchLine_86, SketchLine_87, SketchLine_88, SketchLine_17, SketchLine_89, SketchLine_90, SketchLine_91, SketchLine_92, SketchLine_20, SketchLine_93, SketchLine_94, SketchLine_95, SketchLine_96, SketchLine_24, SketchLine_97, SketchLine_98, SketchLine_99, SketchLine_100, SketchLine_16, SketchLine_101, SketchLine_102, SketchLine_103, SketchLine_104] = SketchMultiTranslation_2.translated() +SketchLine_101.setName("SketchLine_44") +SketchLine_101.result().setName("SketchLine_44") +SketchLine_100.setName("SketchLine_101") +SketchLine_100.result().setName("SketchLine_101") +SketchLine_99.setName("SketchLine_100") +SketchLine_99.result().setName("SketchLine_100") +SketchLine_98.setName("SketchLine_99") +SketchLine_98.result().setName("SketchLine_99") +SketchLine_97.setName("SketchLine_43") +SketchLine_97.result().setName("SketchLine_43") +SketchLine_96.setName("SketchLine_98") +SketchLine_96.result().setName("SketchLine_98") +SketchLine_95.setName("SketchLine_97") +SketchLine_95.result().setName("SketchLine_97") +SketchLine_94.setName("SketchLine_96") +SketchLine_94.result().setName("SketchLine_96") +SketchLine_93.setName("SketchLine_42") +SketchLine_93.result().setName("SketchLine_42") +SketchLine_92.setName("SketchLine_95") +SketchLine_92.result().setName("SketchLine_95") +SketchLine_91.setName("SketchLine_94") +SketchLine_91.result().setName("SketchLine_94") +SketchLine_90.setName("SketchLine_93") +SketchLine_90.result().setName("SketchLine_93") +SketchLine_89.setName("SketchLine_41") +SketchLine_89.result().setName("SketchLine_41") +SketchLine_88.setName("SketchLine_92") +SketchLine_88.result().setName("SketchLine_92") +SketchLine_87.setName("SketchLine_91") +SketchLine_87.result().setName("SketchLine_91") +SketchLine_86.setName("SketchLine_90") +SketchLine_86.result().setName("SketchLine_90") +SketchLine_85.setName("SketchLine_40") +SketchLine_85.result().setName("SketchLine_40") +SketchLine_84.setName("SketchLine_89") +SketchLine_84.result().setName("SketchLine_89") +SketchLine_83.setName("SketchLine_88") +SketchLine_83.result().setName("SketchLine_88") +SketchLine_82.setName("SketchLine_87") +SketchLine_82.result().setName("SketchLine_87") +SketchLine_81.setName("SketchLine_39") +SketchLine_81.result().setName("SketchLine_39") +SketchLine_80.setName("SketchLine_86") +SketchLine_80.result().setName("SketchLine_86") +SketchLine_79.setName("SketchLine_85") +SketchLine_79.result().setName("SketchLine_85") +SketchLine_78.setName("SketchLine_84") +SketchLine_78.result().setName("SketchLine_84") +SketchLine_77.setName("SketchLine_38") +SketchLine_77.result().setName("SketchLine_38") +SketchLine_76.setName("SketchLine_83") +SketchLine_76.result().setName("SketchLine_83") +SketchLine_75.setName("SketchLine_82") +SketchLine_75.result().setName("SketchLine_82") +SketchLine_74.setName("SketchLine_81") +SketchLine_74.result().setName("SketchLine_81") +SketchLine_73.setName("SketchLine_37") +SketchLine_73.result().setName("SketchLine_37") +SketchLine_72.setName("SketchLine_80") +SketchLine_72.result().setName("SketchLine_80") +SketchLine_71.setName("SketchLine_79") +SketchLine_71.result().setName("SketchLine_79") +SketchLine_70.setName("SketchLine_78") +SketchLine_70.result().setName("SketchLine_78") +SketchLine_69.setName("SketchLine_36") +SketchLine_69.result().setName("SketchLine_36") +SketchLine_68.setName("SketchLine_77") +SketchLine_68.result().setName("SketchLine_77") +SketchLine_67.setName("SketchLine_76") +SketchLine_67.result().setName("SketchLine_76") +SketchLine_66.setName("SketchLine_75") +SketchLine_66.result().setName("SketchLine_75") +SketchLine_65.setName("SketchLine_35") +SketchLine_65.result().setName("SketchLine_35") +SketchLine_64.setName("SketchLine_74") +SketchLine_64.result().setName("SketchLine_74") +SketchLine_63.setName("SketchLine_73") +SketchLine_63.result().setName("SketchLine_73") +SketchLine_62.setName("SketchLine_72") +SketchLine_62.result().setName("SketchLine_72") +SketchLine_61.setName("SketchLine_34") +SketchLine_61.result().setName("SketchLine_34") +SketchLine_60.setName("SketchLine_71") +SketchLine_60.result().setName("SketchLine_71") +SketchLine_59.setName("SketchLine_70") +SketchLine_59.result().setName("SketchLine_70") +SketchLine_58.setName("SketchLine_69") +SketchLine_58.result().setName("SketchLine_69") +SketchLine_57.setName("SketchLine_33") +SketchLine_57.result().setName("SketchLine_33") +SketchLine_56.setName("SketchLine_68") +SketchLine_56.result().setName("SketchLine_68") +SketchLine_55.setName("SketchLine_67") +SketchLine_55.result().setName("SketchLine_67") +SketchLine_54.setName("SketchLine_66") +SketchLine_54.result().setName("SketchLine_66") +SketchLine_53.setName("SketchLine_32") +SketchLine_53.result().setName("SketchLine_32") +SketchLine_52.setName("SketchLine_65") +SketchLine_52.result().setName("SketchLine_65") +SketchLine_51.setName("SketchLine_64") +SketchLine_51.result().setName("SketchLine_64") +SketchLine_50.setName("SketchLine_63") +SketchLine_50.result().setName("SketchLine_63") +SketchLine_49.setName("SketchLine_31") +SketchLine_49.result().setName("SketchLine_31") +SketchLine_48.setName("SketchLine_62") +SketchLine_48.result().setName("SketchLine_62") +SketchLine_47.setName("SketchLine_61") +SketchLine_47.result().setName("SketchLine_61") +SketchLine_46.setName("SketchLine_60") +SketchLine_46.result().setName("SketchLine_60") +SketchLine_45.setName("SketchLine_30") +SketchLine_45.result().setName("SketchLine_30") +SketchLine_44.setName("SketchLine_59") +SketchLine_44.result().setName("SketchLine_59") +SketchLine_43.setName("SketchLine_58") +SketchLine_43.result().setName("SketchLine_58") +SketchLine_42.setName("SketchLine_57") +SketchLine_42.result().setName("SketchLine_57") +SketchLine_41.setName("SketchLine_29") +SketchLine_41.result().setName("SketchLine_29") +SketchLine_40.setName("SketchLine_56") +SketchLine_40.result().setName("SketchLine_56") +SketchLine_39.setName("SketchLine_55") +SketchLine_39.result().setName("SketchLine_55") +SketchLine_38.setName("SketchLine_54") +SketchLine_38.result().setName("SketchLine_54") +SketchLine_37.setName("SketchLine_28") +SketchLine_37.result().setName("SketchLine_28") +SketchLine_36.setName("SketchLine_53") +SketchLine_36.result().setName("SketchLine_53") +SketchLine_35.setName("SketchLine_52") +SketchLine_35.result().setName("SketchLine_52") +SketchLine_34.setName("SketchLine_51") +SketchLine_34.result().setName("SketchLine_51") +SketchLine_33.setName("SketchLine_27") +SketchLine_33.result().setName("SketchLine_27") +SketchLine_32.setName("SketchLine_50") +SketchLine_32.result().setName("SketchLine_50") +SketchLine_31.setName("SketchLine_49") +SketchLine_31.result().setName("SketchLine_49") +SketchLine_30.setName("SketchLine_48") +SketchLine_30.result().setName("SketchLine_48") +SketchLine_29.setName("SketchLine_26") +SketchLine_29.result().setName("SketchLine_26") +SketchLine_28.setName("SketchLine_47") +SketchLine_28.result().setName("SketchLine_47") +SketchLine_27.setName("SketchLine_46") +SketchLine_27.result().setName("SketchLine_46") +SketchLine_26.setName("SketchLine_45") +SketchLine_26.result().setName("SketchLine_45") +model.do() +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_4r-SketchLine_3r-SketchLine_2r-SketchLine_1r-SketchLine_76r-SketchLine_91r-SketchLine_79r-SketchLine_70r-SketchLine_77r-SketchLine_92r-SketchLine_80r-SketchLine_71r-SketchLine_96r-SketchLine_99r-SketchLine_102r-SketchLine_45r-SketchLine_35r-SketchLine_40r-SketchLine_36r-SketchLine_33r-SketchLine_82r-SketchLine_94r-SketchLine_85r-SketchLine_64r-SketchLine_68r-SketchLine_74r-SketchLine_59r-SketchLine_53r-SketchLine_55r-SketchLine_61r-SketchLine_88r-SketchLine_49r-SketchLine_97r-SketchLine_100r-SketchLine_103r-SketchLine_46r-SketchLine_67r-SketchLine_73r-SketchLine_58r-SketchLine_52r-SketchLine_81r-SketchLine_93r-SketchLine_84r-SketchLine_63r-SketchLine_75r-SketchLine_90r-SketchLine_78r-SketchLine_69r-SketchLine_37r-SketchLine_41r-SketchLine_38r-SketchLine_31r-SketchLine_28r-SketchLine_30r-SketchLine_39r-SketchLine_26r-SketchLine_83r-SketchLine_95r-SketchLine_86r-SketchLine_65r-SketchLine_21r-SketchLine_24r-SketchLine_18r-SketchLine_15r-SketchLine_19r-SketchLine_22r-SketchLine_16r-SketchLine_13r-SketchLine_8r-SketchLine_7r-SketchLine_6r-SketchLine_5r-SketchLine_42r-SketchLine_43r-SketchLine_44r-SketchLine_25r-SketchLine_54r-SketchLine_60r-SketchLine_87r-SketchLine_48r-SketchLine_98r-SketchLine_101r-SketchLine_104r-SketchLine_47r-SketchLine_56r-SketchLine_62r-SketchLine_89r-SketchLine_50r-SketchLine_20r-SketchLine_23r-SketchLine_17r-SketchLine_14r-SketchLine_66r-SketchLine_72r-SketchLine_57r-SketchLine_51r-SketchLine_32r-SketchLine_34r-SketchLine_29r-SketchLine_27r-SketchLine_11r-SketchLine_12r-SketchLine_10r-SketchLine_9r")], model.selection(), 0.033, 0) +Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2")) +SketchLine_105 = Sketch_2.addLine(0, -0.033, 0.0003499999999999992, -0.033) +SketchProjection_2 = Sketch_2.addProjection(model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_1][Extrusion_1_1/To_Face]"), False) +SketchPoint_4 = SketchProjection_2.createdFeature() +SketchConstraintCoincidence_12 = Sketch_2.setCoincident(SketchLine_105.startPoint(), SketchPoint_4.result()) +SketchProjection_3 = Sketch_2.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2][Extrusion_1_1/To_Face]"), False) +SketchLine_106 = SketchProjection_3.createdFeature() +SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_105.endPoint(), SketchLine_106.result()) +SketchArc_1 = Sketch_2.addArc(0.002, -0.033, 0.0003499999999999992, -0.033, 0.000571058083755674, -0.033825, False) +SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_106.result(), SketchArc_1.center()) +SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_105.endPoint(), SketchArc_1.startPoint()) +SketchArc_2 = Sketch_2.addArc(0.002, -0.033, 0, -0.033, 0.0002679491924311227, -0.034, False) +SketchConstraintCoincidence_16 = Sketch_2.setCoincident(SketchArc_1.center(), SketchArc_2.center()) +SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchLine_105.startPoint(), SketchArc_2.startPoint()) +SketchLine_107 = Sketch_2.addLine(0.002, -0.033, 0.0002679491924311227, -0.034) +SketchLine_107.setAuxiliary(True) +SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchArc_1.center(), SketchLine_107.startPoint()) +SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchArc_2.endPoint(), SketchLine_107.endPoint()) +SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchArc_1.endPoint(), SketchLine_107.result()) +SketchConstraintAngle_1 = Sketch_2.setAngleComplementary(SketchLine_106.result(), SketchLine_107.result(), 30) +SketchLine_108 = Sketch_2.addLine(0.000571058083755674, -0.033825, 0.003071058083755674, -0.03815512701892219) +SketchConstraintCoincidence_21 = Sketch_2.setCoincident(SketchArc_1.endPoint(), SketchLine_108.startPoint()) +SketchLine_109 = Sketch_2.addLine(0.003071058083755674, -0.03815512701892219, 0.002767949192431121, -0.03833012701892219) +SketchConstraintCoincidence_22 = Sketch_2.setCoincident(SketchLine_108.endPoint(), SketchLine_109.startPoint()) +SketchLine_110 = Sketch_2.addLine(0.002767949192431121, -0.03833012701892219, 0.0002679491924311227, -0.034) +SketchConstraintCoincidence_23 = Sketch_2.setCoincident(SketchLine_109.endPoint(), SketchLine_110.startPoint()) +SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchArc_2.endPoint(), SketchLine_110.endPoint()) +SketchConstraintParallel_1 = Sketch_2.setParallel(SketchLine_110.result(), SketchLine_108.result()) +SketchConstraintPerpendicular_1 = Sketch_2.setPerpendicular(SketchLine_108.result(), SketchLine_109.result()) +SketchConstraintTangent_1 = Sketch_2.setTangent(SketchArc_2.results()[1], SketchLine_110.result()) +SketchConstraintLength_4 = Sketch_2.setLength(SketchLine_109.result(), "ep") +SketchConstraintLength_5 = Sketch_2.setLength(SketchLine_108.result(), 0.005) +SketchConstraintRadius_1 = Sketch_2.setRadius(SketchArc_2.results()[1], 0.002) +model.do() +Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_2/Face-SketchArc_2_2f-SketchLine_110r-SketchLine_109r-SketchLine_108r-SketchArc_1_2r-SketchLine_105r_wire")], model.selection("EDGE", "PartSet/OX"), 0.0045, 0) +Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_2_1/Generated_Face&Sketch_2/SketchLine_110")) +SketchCircle_1 = Sketch_3.addCircle(-0.000271, 0.03434683832488648, 0.003237) +SketchProjection_4 = Sketch_3.addProjection(model.selection("EDGE", "[Extrusion_2_1/Generated_Face&Sketch_2/SketchLine_110][Extrusion_2_1/Generated_Face&Sketch_2/SketchLine_109]"), False) +SketchLine_111 = SketchProjection_4.createdFeature() +SketchConstraintDistance_5 = Sketch_3.setDistance(SketchCircle_1.center(), SketchLine_111.result(), 0.000232, True) +SketchProjection_5 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_2/SketchLine_110"), False) +SketchLine_112 = SketchProjection_5.createdFeature() +SketchConstraintDistance_6 = Sketch_3.setDistance(SketchCircle_1.center(), SketchLine_112.result(), 0.000271, True) +SketchConstraintRadius_2 = Sketch_3.setRadius(SketchCircle_1.results()[1], 0.003237) +SketchLine_113 = Sketch_3.addLine(0.004499999999999999, 0.03457883832488649, 0.00375, 0.03457883832488648) +SketchConstraintCoincidence_25 = Sketch_3.setCoincident(SketchAPI_Line(SketchLine_111).endPoint(), SketchLine_113.startPoint()) +SketchConstraintCoincidence_26 = Sketch_3.setCoincident(SketchLine_113.endPoint(), SketchLine_111.result()) +SketchLine_114 = Sketch_3.addLine(0.00375, 0.03457883832488648, 0.004499999999999996, 0.03382883832488648) +SketchConstraintCoincidence_27 = Sketch_3.setCoincident(SketchLine_113.endPoint(), SketchLine_114.startPoint()) +SketchProjection_6 = Sketch_3.addProjection(model.selection("EDGE", "[Extrusion_2_1/Generated_Face&Sketch_2/SketchLine_110][Extrusion_2_1/To_Face]"), False) +SketchLine_115 = SketchProjection_6.createdFeature() +SketchConstraintCoincidence_28 = Sketch_3.setCoincident(SketchLine_114.endPoint(), SketchLine_115.result()) +SketchLine_116 = Sketch_3.addLine(0.004499999999999996, 0.03382883832488648, 0.004499999999999998, 0.03457883832488649) +SketchConstraintCoincidence_29 = Sketch_3.setCoincident(SketchLine_114.endPoint(), SketchLine_116.startPoint()) +SketchConstraintCoincidence_30 = Sketch_3.setCoincident(SketchAPI_Line(SketchLine_111).endPoint(), SketchLine_116.endPoint()) +SketchConstraintLength_6 = Sketch_3.setLength(SketchLine_116.result(), 0.00075) +SketchConstraintLength_7 = Sketch_3.setLength(SketchLine_113.result(), 0.00075) +model.do() +ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_1_2r"), model.selection("FACE", "Sketch_3/Face-SketchLine_113f-SketchLine_114f-SketchLine_116f")], model.selection(), model.selection("FACE", "Extrusion_2_1/Generated_Face&Sketch_2/SketchLine_108"), 0, model.selection(), 0, [model.selection("SOLID", "Extrusion_2_1")]) +Sketch_4 = model.addSketch(Part_1_doc, model.standardPlane("XOZ")) +SketchProjection_7 = Sketch_4.addProjection(model.selection("EDGE", "[Extrusion_2_1/Generated_Face&Sketch_2/SketchArc_2_2][ExtrusionCut_1_1/Modified_Face&Sketch_2/SketchLine_110]"), False) +SketchLine_117 = SketchProjection_7.createdFeature() +SketchProjection_8 = Sketch_4.addProjection(model.selection("EDGE", "[ExtrusionCut_1_1/Modified_Face&Sketch_2/SketchLine_110][ExtrusionCut_1_1/Modified_Face&Extrusion_2_1/To_Face]"), False) +SketchLine_118 = SketchProjection_8.createdFeature() +SketchProjection_9 = Sketch_4.addProjection(model.selection("VERTEX", "[Extrusion_2_1/Generated_Face&Sketch_2/SketchArc_2_2][Extrusion_2_1/Generated_Face&Sketch_2/SketchLine_105][ExtrusionCut_1_1/Modified_Face&Extrusion_2_1/To_Face]"), False) +SketchPoint_5 = SketchProjection_9.createdFeature() +SketchArc_3 = Sketch_4.addArc(0.004774999999999999, 0.03447457621030586, 0.0045, 0.033, 0.003352053261498503, 0.034, True) +SketchConstraintCoincidence_31 = Sketch_4.setCoincident(SketchPoint_5.result(), SketchArc_3.startPoint()) +SketchConstraintCoincidence_32 = Sketch_4.setCoincident(SketchArc_3.endPoint(), SketchLine_117.result()) +SketchLine_119 = Sketch_4.addLine(0.003352053261498503, 0.034, 0.0045, 0.034) +SketchConstraintCoincidence_33 = Sketch_4.setCoincident(SketchArc_3.endPoint(), SketchLine_119.startPoint()) +SketchConstraintCoincidence_34 = Sketch_4.setCoincident(SketchAPI_Line(SketchLine_117).endPoint(), SketchLine_119.endPoint()) +SketchLine_120 = Sketch_4.addLine(0.0045, 0.034, 0.0045, 0.033) +SketchConstraintCoincidence_35 = Sketch_4.setCoincident(SketchAPI_Line(SketchLine_117).endPoint(), SketchLine_120.startPoint()) +SketchConstraintCoincidence_36 = Sketch_4.setCoincident(SketchAPI_Point(SketchPoint_5).coordinates(), SketchLine_120.endPoint()) +SketchConstraintDistance_7 = Sketch_4.setDistance(SketchArc_3.center(), SketchLine_118.result(), 0.000275, True) +SketchConstraintCoincidence_37 = Sketch_4.setCoincident(SketchArc_3.results()[1], SketchLine_120.endPoint()) +SketchConstraintRadius_3 = Sketch_4.setRadius(SketchArc_3.results()[1], 0.0015) +model.do() +ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchArc_3_2f-SketchLine_120r-SketchLine_119r")], model.selection(), 0, 10, [model.selection("SOLID", "ExtrusionCut_1_1")]) +Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchLine_110")) +SketchArc_4 = Sketch_5.addArc(0.004774999999999999, 0.02985585878282754, 0.003352053261498503, 0.02957883832488632, 0.003478326406039452, 0.03050405269320888, True) +SketchProjection_10 = Sketch_5.addProjection(model.selection("VERTEX", "Sketch_4/SketchArc_3"), False) +SketchPoint_6 = SketchProjection_10.createdFeature() +SketchConstraintCoincidence_38 = Sketch_5.setCoincident(SketchArc_4.center(), SketchAPI_Point(SketchPoint_6).coordinates()) +SketchProjection_11 = Sketch_5.addProjection(model.selection("VERTEX", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchArc_2_2][ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchLine_110][ExtrusionCut_2_1/Generated_Face&Sketch_4/SketchArc_3_2][ExtrusionCut_2_1/Generated_Face&Sketch_4/SketchLine_119]"), False) +SketchPoint_7 = SketchProjection_11.createdFeature() +SketchConstraintCoincidence_39 = Sketch_5.setCoincident(SketchArc_4.startPoint(), SketchAPI_Point(SketchPoint_7).coordinates()) +SketchLine_121 = Sketch_5.addLine(0.003478326406039452, 0.03050405269320888, 0.004499999999999993, 0.03254785031259024) +SketchConstraintCoincidence_40 = Sketch_5.setCoincident(SketchArc_4.endPoint(), SketchLine_121.startPoint()) +SketchProjection_12 = Sketch_5.addProjection(model.selection("EDGE", "[ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchLine_110][ExtrusionCut_2_1/Modified_Face&Extrusion_2_1/To_Face]"), False) +SketchLine_122 = SketchProjection_12.createdFeature() +SketchConstraintCoincidence_41 = Sketch_5.setCoincident(SketchLine_121.endPoint(), SketchLine_122.result()) +SketchLine_123 = Sketch_5.addLine(0.004499999999999993, 0.03254785031259024, 0.0045, 0.02957883832488649) +SketchConstraintCoincidence_42 = Sketch_5.setCoincident(SketchLine_121.endPoint(), SketchLine_123.startPoint()) +SketchConstraintCoincidence_43 = Sketch_5.setCoincident(SketchAPI_Line(SketchLine_122).endPoint(), SketchLine_123.endPoint()) +SketchLine_124 = Sketch_5.addLine(0.003352053261498503, 0.02957883832488632, 0.0045, 0.0295788383248865) +SketchConstraintCoincidence_44 = Sketch_5.setCoincident(SketchArc_4.startPoint(), SketchLine_124.startPoint()) +SketchConstraintCoincidence_45 = Sketch_5.setCoincident(SketchAPI_Line(SketchLine_122).endPoint(), SketchLine_124.endPoint()) +SketchConstraintTangent_2 = Sketch_5.setTangent(SketchArc_4.results()[1], SketchLine_121.result()) +SketchConstraintAngle_2 = Sketch_5.setAngleBackward(SketchLine_123.result(), SketchLine_121.result(), 26.56) +model.do() +ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchArc_4_2r-SketchLine_124f-SketchLine_123r-SketchLine_121r")], model.selection(), model.selection("FACE", "ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchLine_108"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")]) +Plane_4 = model.addPlane(Part_1_doc, model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_4/SketchArc_3_2][ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchLine_105][ExtrusionCut_3_1/Modified_Face&Sketch_2/SketchArc_1_2]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_4/SketchArc_3_2][ExtrusionCut_3_1/Modified_Face&Sketch_2/SketchArc_1_2][ExtrusionCut_3_1/Generated_Face&Sketch_5/SketchLine_124]"), model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_2/SketchArc_1_2][ExtrusionCut_3_1/Modified_Face&Sketch_2/SketchLine_108][ExtrusionCut_3_1/Generated_Face&Sketch_5/SketchArc_4_2][ExtrusionCut_3_1/Generated_Face&Sketch_5/SketchLine_124]")) +Sketch_6 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1")) +SketchProjection_13 = Sketch_6.addProjection(model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_4/SketchArc_3_2][ExtrusionCut_2_1/Modified_Face&Sketch_2/SketchLine_105][ExtrusionCut_3_1/Modified_Face&Sketch_2/SketchArc_1_2]"), False) +SketchPoint_8 = SketchProjection_13.createdFeature() +SketchArc_5 = Sketch_6.addArc(0.004810999263588865, 0.03358262726094011, 0.004499999999977898, 0.03196613893329727, 0.003352053261476404, 0.03282024178213547, True) +SketchConstraintCoincidence_46 = Sketch_6.setCoincident(SketchPoint_8.result(), SketchArc_5.startPoint()) +SketchProjection_14 = Sketch_6.addProjection(model.selection("VERTEX", "[ExtrusionCut_3_1/Modified_Face&Sketch_2/SketchArc_1_2][ExtrusionCut_3_1/Modified_Face&Sketch_2/SketchLine_108][ExtrusionCut_3_1/Generated_Face&Sketch_5/SketchArc_4_2][ExtrusionCut_3_1/Generated_Face&Sketch_5/SketchLine_124]"), False) +SketchPoint_9 = SketchProjection_14.createdFeature() +SketchConstraintCoincidence_47 = Sketch_6.setCoincident(SketchArc_5.endPoint(), SketchAPI_Point(SketchPoint_9).coordinates()) +SketchConstraintRadius_4 = Sketch_6.setRadius(SketchArc_5.results()[1], 0.001646133365) +model.do() +Filling_1 = model.addFilling(Part_1_doc, [model.selection("EDGE", "[ExtrusionCut_3_1/Modified_Face&Sketch_2/SketchArc_2_2][ExtrusionCut_3_1/Modified_Face&Sketch_4/SketchArc_3_2]"), model.selection("EDGE", "Sketch_6/SketchArc_5_2")]) +Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Filling_1_1")], model.selection("EDGE", "PartSet/OX"), 0.005, 0) +Extrusion_3.setName("Extrusion_4") +Extrusion_3.result().setName("Extrusion_4_1") +Cut_1 = model.addCut(Part_1_doc, [model.selection("SOLID", "ExtrusionCut_3_1")], [model.selection("SOLID", "Extrusion_4_1")]) +Cut_1.setName("Cut_2") +Cut_1.result().setName("Cut_2_1") +Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Cut_2_1")], model.selection("EDGE", "PartSet/OX"), "cell_width-ep-ailette_width") +LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Translation_1_1")], model.selection("EDGE", "PartSet/OX"), "2*(cell_width+ep)", 3, model.selection("EDGE", "PartSet/OY"), "2*(cell_width+ep)", 3) +Recover_1 = model.addRecover(Part_1_doc, LinearCopy_1, [Translation_1.result()]) +Translation_2 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Recover_1_1")], "ep+cell_width", "ep+cell_width", 0) +LinearCopy_2 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Translation_2_1")], model.selection("EDGE", "PartSet/OX"), "2*(ep+cell_width)", 2, model.selection("EDGE", "PartSet/OY"), "2*(ep+cell_width)", 2) +Point_2 = model.addPoint(Part_1_doc, "ep+cell_width/2", "ep+cell_width/2", "0") +Point_3 = model.addPoint(Part_1_doc, "ep+cell_width/2", "ep+cell_width/2", "0.01") +Axis_4 = model.addAxis(Part_1_doc, model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")) +Recover_2 = model.addRecover(Part_1_doc, LinearCopy_1, [Translation_1.result()]) +Rotation_1 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Recover_2_1")], model.selection("EDGE", "Axis_1"), 180) +LinearCopy_3 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Rotation_1_1")], model.selection("EDGE", "PartSet/OX"), "2*(ep+cell_width)", 3, model.selection("EDGE", "PartSet/OY"), "2*(ep+cell_width)", 3) +Recover_3 = model.addRecover(Part_1_doc, Rotation_1, [Recover_2.result()]) +Rotation_2 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Recover_3_1")], model.selection("EDGE", "Axis_1"), "3*90") +Plane_5 = model.addPlane(Part_1_doc, model.selection("EDGE", "PartSet/OX"), model.selection("VERTEX", "Point_1"), True) +Symmetry_1 = model.addSymmetry(Part_1_doc, [model.selection("SOLID", "Rotation_2_1")], model.selection("FACE", "Plane_2"), True) +Translation_3 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Symmetry_1_1_2")], 0, "cell_width+ep", 0) +LinearCopy_4 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Translation_3_1")], model.selection("EDGE", "PartSet/OX"), "2*(cell_width+ep)", 3, model.selection("EDGE", "PartSet/OY"), "2*(cell_width+ep)", 2) +Axis_5 = model.addAxis(Part_1_doc, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_8"), "ep/2", True, model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_5"), "ep/2", True) +Recover_4 = model.addRecover(Part_1_doc, LinearCopy_4, [Translation_3.result()]) +Rotation_3 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Recover_4_1")], model.selection("EDGE", "Axis_2"), 180) +LinearCopy_5 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Rotation_3_1")], model.selection("EDGE", "PartSet/OX"), "2*(cell_width+ep)", 2, model.selection("EDGE", "PartSet/OY"), "2*(cell_width+ep)", 3) +Recover_5 = model.addRecover(Part_1_doc, LinearCopy_5, [Rotation_3.result()]) +Rotation_4 = model.addRotation(Part_1_doc, [model.selection("SOLID", "Recover_5_1")], model.selection("EDGE", "Axis_1"), 180) +Translation_4 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Rotation_4_1")], model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_7][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_6][Extrusion_1_1/To_Face]"), model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_16][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_13][Extrusion_1_1/To_Face]")) +LinearCopy_6 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Translation_4_1")], model.selection("EDGE", "PartSet/OX"), "2*(cell_width+ep)", 2, model.selection("EDGE", "PartSet/OY"), "2*(cell_width+ep)", 3) +Recover_6 = model.addRecover(Part_1_doc, Rotation_4, [LinearCopy_5.result().subResult(0)]) +Translation_5 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Recover_6_1")], model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_11][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_9][Extrusion_1_1/To_Face]"), model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_28][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_30][Extrusion_1_1/To_Face]")) +LinearCopy_7 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Translation_5_1"), model.selection("COMPOUND", "all-in-Translation_5")], model.selection("EDGE", "PartSet/OX"), "2*(cell_width+ep)", 3, model.selection("EDGE", "PartSet/OY"), "2*(cell_width+ep)", 2) +Recover_7 = model.addRecover(Part_1_doc, LinearCopy_3, [Rotation_1.result()]) +Translation_6 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Recover_7_1")], model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_2][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_1][Extrusion_1_1/To_Face]"), model.selection("VERTEX", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_8][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_5][Extrusion_1_1/To_Face]")) +LinearCopy_8 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Translation_6_1")], model.selection("EDGE", "PartSet/OX"), "2*(cell_width+ep)", 2, model.selection("EDGE", "PartSet/OY"), "2*(cell_width+ep)", 2) +Fuse_1_objects_1 = [model.selection("SOLID", "Extrusion_1_1"), model.selection("COMPOUND", "LinearCopy_1_1"), model.selection("COMPOUND", "LinearCopy_2_1"), model.selection("COMPOUND", "LinearCopy_3_1"), model.selection("COMPOUND", "LinearCopy_4_1"), model.selection("COMPOUND", "LinearCopy_5_1"), model.selection("COMPOUND", "LinearCopy_6_1"), model.selection("COMPOUND", "LinearCopy_7_1"), model.selection("COMPOUND", "LinearCopy_7_2"), model.selection("COMPOUND", "LinearCopy_8_1")] +Fuse_1 = model.addFuse(Part_1_doc, Fuse_1_objects_1) +Point_4 = model.addPoint(Part_1_doc, "grid_width", "grid_width", "0.05") +Box_1 = model.addBox(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("VERTEX", "Point_3")) +Cut_2 = model.addCut(Part_1_doc, [model.selection("SOLID", "Box_1_1")], [model.selection("SOLID", "Fuse_1_1")]) +model.testHaveNamingSubshapes(Cut_2, model, Part_1_doc) +model.do() +model.end() + +#model.generateTests(Cut_2, "Cut_2") + +from GeomAPI import GeomAPI_Shape + +model.testNbResults(Cut_2, 1) +model.testNbSubResults(Cut_2, [0]) +model.testNbSubShapes(Cut_2, GeomAPI_Shape.SOLID, [1]) +model.testNbSubShapes(Cut_2, GeomAPI_Shape.FACE, [756]) +model.testNbSubShapes(Cut_2, GeomAPI_Shape.EDGE, [3924]) +model.testNbSubShapes(Cut_2, GeomAPI_Shape.VERTEX, [7848]) +model.testResultsVolumes(Cut_2, [0.000191752725860812079121051]) + +from ModelAPI import * +aFactory = ModelAPI_Session.get().validators() + +# Check that the features are not in error +for i in range(Part_1_doc.size("Features")): + feature = objectToFeature(Part_1_doc.object("Features", i)) + name = feature.name() + error = feature.error() + assert(error == ''), "The feature {0} is in error: {1}".format(name, error) + assert(aFactory.validate(feature)), "The feature {0} is in error: {1}".format(name, error) + +assert(Part_1_doc.size("Groups") == 3) + +#assert(model.checkPythonDump()) diff --git a/src/FeaturesPlugin/tests.set b/src/FeaturesPlugin/tests.set index 404476a40..d050a9296 100644 --- a/src/FeaturesPlugin/tests.set +++ b/src/FeaturesPlugin/tests.set @@ -521,4 +521,6 @@ SET(TEST_NAMES TestGeometryCalculation.py TestBoundingBox.py Test23885.py + Test23885_Ciseaux.py + Test23885_grille_de_melange.py )