X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FTest%2FTestBooleanCommon_ShellCompound_ShellCompound.py;h=a6076c79844444ace3744818be69f5cf8a0d9198;hb=d9d68ad55d070600eac1027ac23575616edbe69c;hp=fe5ec1c339d16a00817475544ae9fd14f461ebca;hpb=0f5ecf0887261ef44c302dd1414924713fc481e1;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/Test/TestBooleanCommon_ShellCompound_ShellCompound.py b/src/FeaturesPlugin/Test/TestBooleanCommon_ShellCompound_ShellCompound.py index fe5ec1c33..a6076c798 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCommon_ShellCompound_ShellCompound.py +++ b/src/FeaturesPlugin/Test/TestBooleanCommon_ShellCompound_ShellCompound.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-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 +# from salome.shaper import model @@ -26,13 +25,9 @@ Part_1 = model.addPart(partSet) Part_1_doc = Part_1.document() Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_1 = Sketch_1.addLine(-11.4055110220441, 59.07236770836705, -90.54579158316633, 59.07236770836705) -SketchLine_1.result().setColor(225, 0, 0) SketchLine_2 = Sketch_1.addLine(-90.54579158316633, 59.07236770836705, -90.54579158316633, 18.29259905792451) -SketchLine_2.result().setColor(225, 0, 0) SketchLine_3 = Sketch_1.addLine(-90.54579158316633, 18.29259905792451, -11.4055110220441, 18.29259905792451) -SketchLine_3.result().setColor(225, 0, 0) SketchLine_4 = Sketch_1.addLine(-11.4055110220441, 18.29259905792451, -11.4055110220441, 59.07236770836705) -SketchLine_4.result().setColor(225, 0, 0) SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint()) SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint()) @@ -42,13 +37,9 @@ SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result()) SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result()) SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result()) SketchLine_5 = Sketch_1.addLine(116.15, 58.70699100906781, 29.5612224448898, 58.70699100906781) -SketchLine_5.result().setColor(225, 0, 0) SketchLine_6 = Sketch_1.addLine(29.5612224448898, 58.70699100906781, 29.5612224448898, 16.80919541788544) -SketchLine_6.result().setColor(225, 0, 0) SketchLine_7 = Sketch_1.addLine(29.5612224448898, 16.80919541788544, 116.15, 16.80919541788544) -SketchLine_7.result().setColor(225, 0, 0) SketchLine_8 = Sketch_1.addLine(116.15, 16.80919541788544, 116.15, 58.70699100906781) -SketchLine_8.result().setColor(225, 0, 0) SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_5.startPoint()) SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_6.startPoint()) SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchLine_7.startPoint()) @@ -58,23 +49,17 @@ SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_6.result()) SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_7.result()) SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_8.result()) SketchLine_9 = Sketch_1.addLine(-51.44118236472945, 59.07236770836705, -50.51012024048097, 18.29259905792451) -SketchLine_9.result().setColor(225, 0, 0) SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_9.startPoint(), SketchLine_1.result()) SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_9.endPoint(), SketchLine_3.result()) SketchLine_10 = Sketch_1.addLine(72.85561122244489, 16.80919541788544, 73.32114228456915, 58.70699100906781) -SketchLine_10.result().setColor(225, 0, 0) SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchLine_10.startPoint(), SketchLine_7.result()) SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchLine_5.result()) model.do() Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) SketchLine_11 = Sketch_2.addLine(-33.65512410802471, 32.35440881763527, -66.62101906518004, 32.35440881763527) -SketchLine_11.result().setColor(225, 0, 0) SketchLine_12 = Sketch_2.addLine(-66.62101906518004, 32.35440881763527, -66.62101906518004, -10.93997995991984) -SketchLine_12.result().setColor(225, 0, 0) SketchLine_13 = Sketch_2.addLine(-66.62101906518004, -10.93997995991984, -33.65512410802471, -10.93997995991984) -SketchLine_13.result().setColor(225, 0, 0) SketchLine_14 = Sketch_2.addLine(-33.65512410802471, -10.93997995991984, -33.65512410802471, 32.35440881763527) -SketchLine_14.result().setColor(225, 0, 0) SketchConstraintCoincidence_13 = Sketch_2.setCoincident(SketchLine_14.endPoint(), SketchLine_11.startPoint()) SketchConstraintCoincidence_14 = Sketch_2.setCoincident(SketchLine_11.endPoint(), SketchLine_12.startPoint()) SketchConstraintCoincidence_15 = Sketch_2.setCoincident(SketchLine_12.endPoint(), SketchLine_13.startPoint()) @@ -84,17 +69,12 @@ SketchConstraintVertical_5 = Sketch_2.setVertical(SketchLine_12.result()) SketchConstraintHorizontal_6 = Sketch_2.setHorizontal(SketchLine_13.result()) SketchConstraintVertical_6 = Sketch_2.setVertical(SketchLine_14.result()) SketchLine_15 = Sketch_2.addLine(-66.62101906518004, 10.47444889779559, -33.6551241080247, 9.543386773547091) -SketchLine_15.result().setColor(225, 0, 0) SketchConstraintCoincidence_17 = Sketch_2.setCoincident(SketchLine_15.startPoint(), SketchLine_12.result()) SketchConstraintCoincidence_18 = Sketch_2.setCoincident(SketchLine_15.endPoint(), SketchLine_14.result()) SketchLine_16 = Sketch_2.addLine(86.07316931157348, 30.95781563126252, 62.43123950606181, 30.95781563126252) -SketchLine_16.result().setColor(225, 0, 0) SketchLine_17 = Sketch_2.addLine(62.43123950606181, 30.95781563126252, 62.43123950606181, -14.66422845691383) -SketchLine_17.result().setColor(225, 0, 0) SketchLine_18 = Sketch_2.addLine(62.43123950606181, -14.66422845691383, 86.07316931157348, -14.66422845691383) -SketchLine_18.result().setColor(225, 0, 0) SketchLine_19 = Sketch_2.addLine(86.07316931157348, -14.66422845691383, 86.07316931157348, 30.95781563126252) -SketchLine_19.result().setColor(225, 0, 0) SketchConstraintCoincidence_19 = Sketch_2.setCoincident(SketchLine_19.endPoint(), SketchLine_16.startPoint()) SketchConstraintCoincidence_20 = Sketch_2.setCoincident(SketchLine_16.endPoint(), SketchLine_17.startPoint()) SketchConstraintCoincidence_21 = Sketch_2.setCoincident(SketchLine_17.endPoint(), SketchLine_18.startPoint()) @@ -104,13 +84,12 @@ SketchConstraintVertical_7 = Sketch_2.setVertical(SketchLine_17.result()) SketchConstraintHorizontal_8 = Sketch_2.setHorizontal(SketchLine_18.result()) SketchConstraintVertical_8 = Sketch_2.setVertical(SketchLine_19.result()) SketchLine_20 = Sketch_2.addLine(62.43123950606181, 3.491482965931855, 86.07316931157347, 4.888076152304602) -SketchLine_20.result().setColor(225, 0, 0) SketchConstraintCoincidence_23 = Sketch_2.setCoincident(SketchLine_20.startPoint(), SketchLine_17.result()) SketchConstraintCoincidence_24 = Sketch_2.setCoincident(SketchLine_20.endPoint(), SketchLine_19.result()) model.do() -Shell_1_objects = [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_9r"), model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_9f"), model.selection("FACE", "Sketch_1/Face-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_10f"), model.selection("FACE", "Sketch_1/Face-SketchLine_5f-SketchLine_7f-SketchLine_8f-SketchLine_10r")] +Shell_1_objects = [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_9r"), model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_9f-SketchLine_3f-SketchLine_4f"), model.selection("FACE", "Sketch_1/Face-SketchLine_5f-SketchLine_6f-SketchLine_7f-SketchLine_10f"), model.selection("FACE", "Sketch_1/Face-SketchLine_5f-SketchLine_10r-SketchLine_7f-SketchLine_8f")] Shell_1 = model.addShell(Part_1_doc, Shell_1_objects) -Shell_2_objects = [model.selection("FACE", "Sketch_2/Face-SketchLine_11f-SketchLine_12f-SketchLine_14f-SketchLine_15f"), model.selection("FACE", "Sketch_2/Face-SketchLine_12f-SketchLine_13f-SketchLine_14f-SketchLine_15r"), model.selection("FACE", "Sketch_2/Face-SketchLine_16f-SketchLine_17f-SketchLine_19f-SketchLine_20f"), model.selection("FACE", "Sketch_2/Face-SketchLine_17f-SketchLine_18f-SketchLine_19f-SketchLine_20r")] +Shell_2_objects = [model.selection("FACE", "Sketch_2/Face-SketchLine_11r-SketchLine_12f-SketchLine_15f-SketchLine_14f"), model.selection("FACE", "Sketch_2/Face-SketchLine_12f-SketchLine_13f-SketchLine_14f-SketchLine_15r"), model.selection("FACE", "Sketch_2/Face-SketchLine_16f-SketchLine_17f-SketchLine_20f-SketchLine_19f"), model.selection("FACE", "Sketch_2/Face-SketchLine_17f-SketchLine_18f-SketchLine_19f-SketchLine_20r")] Shell_2 = model.addShell(Part_1_doc, Shell_2_objects) Compound_1 = model.addCompound(Part_1_doc, [model.selection("SHELL", "Shell_1_1"), model.selection("SHELL", "Shell_1_2")]) Compound_2 = model.addCompound(Part_1_doc, [model.selection("SHELL", "Shell_2_1"), model.selection("SHELL", "Shell_2_2")])