X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FTest%2FTest1512.py;h=757f636455b5aaa24babeea97f11b1ea910c5cac;hb=50a8df0c6a66da8067b16155e5ae39f8f26a7ebc;hp=b9e7e44aef748229899c90e02e484b0fb4643e82;hpb=dc7d4d86b58b81684abc9b5a2be8ec30f210c2da;p=modules%2Fshaper.git diff --git a/src/ModelAPI/Test/Test1512.py b/src/ModelAPI/Test/Test1512.py old mode 100755 new mode 100644 index b9e7e44ae..757f63645 --- a/src/ModelAPI/Test/Test1512.py +++ b/src/ModelAPI/Test/Test1512.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-2020 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 +# """ Test1512.py @@ -104,10 +103,9 @@ aSession.finishOperation() # Do cut a hole from a box #========================================================================= aSession.startOperation() -aCut1 = aPart.addFeature("Boolean") +aCut1 = aPart.addFeature("Cut") aCut1.selectionList("main_objects").append(aBox.firstResult(), None) aCut1.selectionList("tool_objects").append(aHoleExt.firstResult(), None) -aCut1.integer("bool_type").setValue(0) # cut aSession.finishOperation() #========================================================================= @@ -136,10 +134,11 @@ aSession.finishOperation() # Do fuse with a tower. Tower must be an argument (not tool) to add the problem to the faces owners detection. #========================================================================= aSession.startOperation() -aFuse = aPart.addFeature("Boolean") +aFuse = aPart.addFeature("Fuse") +aFuse.string("creation_method").setValue("advanced") aFuse.selectionList("main_objects").append(aTower.firstResult(), None) aFuse.selectionList("tool_objects").append(aCut1.firstResult(), None) -aFuse.integer("bool_type").setValue(1) # fuse +aFuse.boolean("remove_intersection_edges").setValue(False) aSession.finishOperation() #========================================================================= @@ -155,13 +154,13 @@ def check_owner(selection, topology_type, feature): aSession.abortOperation() # check faces -check_owner("Extrusion_1_1/Generated_Face_1", "face", aBox) -check_owner("Boolean_2_1/Modified_Face_3", "face", aBox) -check_owner("Boolean_1_1/Modified_Face_1", "face", aHoleExt) -check_owner("Boolean_2_1/Modified_Face_2", "face", aTower) +check_owner("Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_4", "face", aBox) +check_owner("Fuse_1_1/Modified_Face&Extrusion_1_1/To_Face", "face", aBox) +check_owner("Cut_1_1/Modified_Face&Sketch_2/SketchCircle_1_2", "face", aHoleExt) +check_owner("Fuse_1_1/Modified_Face&Sketch_3/SketchCircle_2_2", "face", aTower) # check edges without ambiguity -check_owner("Boolean_2_1/Modified_Face_3&Extrusion_1_1/Generated_Face_2", "edge", aBox) -check_owner("Boolean_2_1/Modified_Face_2&Extrusion_3_1/To_Face_1_1", "edge", aTower) +check_owner("[Fuse_1_1/Modified_Face&Extrusion_1_1/To_Face][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_3]", "edge", aBox) +check_owner("[Fuse_1_1/Modified_Face&Sketch_3/SketchCircle_2_2][Extrusion_3_1/To_Face]", "edge", aTower) # check the connected topology method: solid is not a compound of connected topology assert(aFuse.firstResult().shape().isConnectedTopology() == False)