X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FTest%2FTestRecover.py;h=4681616f520481a334217cbc40e9b0940fda2211;hb=06e7f5859095193fc7f498bd89a7d28009794f53;hp=1a2765bc9d3b50a406dcf8002c20f90e308dea76;hpb=ab55bcd64e3c21f7c5363168e52cf72c6953a765;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/Test/TestRecover.py b/src/FeaturesPlugin/Test/TestRecover.py index 1a2765bc9..4681616f5 100644 --- a/src/FeaturesPlugin/Test/TestRecover.py +++ b/src/FeaturesPlugin/Test/TestRecover.py @@ -1,7 +1,26 @@ +# 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 +# + # Test made with high level API # ----------------------------- -import model +from salome.shaper import model # Initialisation @@ -45,27 +64,23 @@ assert(mypart.size("Bodies") == 1) # check persistent flag of recover: never concealed model.begin() +recover = model.addRecover(mypart, cut, smallcyl.results()) +model.end() -recover = model.addRecover(mypart, cut, smallcyl.results(), True) assert(mypart.size("Bodies") == 2) + +model.begin() sk3 = model.addSketch(mypart, model.defaultPlane("XOY")) c3 = sk3.addCircle(0, 0, 90) model.do() big2 = model.addExtrusion(mypart, sk3.selectFace(), 110) -cut2 = model.addCut(mypart, big2.results(), smallcyl.results()) +smallcyl2 = model.addExtrusion(mypart, sk2.selectFace(), 150) +cut2 = model.addCut(mypart, big2.results(), smallcyl2.results()) model.end() # two booleans and small cylinder assert(mypart.size("Bodies") == 3) - -# make the flag as not-persistent => cylinder must be disappeared -model.begin() -recover.setIsPersistent(False) -model.end() -# only two booleans -assert(mypart.size("Bodies") == 2) - assert(model.checkPythonDump())