X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test.hdfs%2FTest40160_NoName.py;fp=test.hdfs%2FTest40160_NoName.py;h=d36901311d71e1175e76e5b44571b8b0efbcdbc3;hb=4de8d53fef7532b6843d79c970f55ad46f98da62;hp=0000000000000000000000000000000000000000;hpb=8e2a17f0302f408fa06415fe70ba700a9183df48;p=modules%2Fshaper.git diff --git a/test.hdfs/Test40160_NoName.py b/test.hdfs/Test40160_NoName.py new file mode 100644 index 000000000..d36901311 --- /dev/null +++ b/test.hdfs/Test40160_NoName.py @@ -0,0 +1,49 @@ +# Copyright (C) 2020-2024 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 ModelAPI import * +from GeomDataAPI import * +from GeomAlgoAPI import * +from GeomAPI import * +import sys +import os + +if __name__ == "__main__": + session = ModelAPI.ModelAPI_Session.get() + aPartSet = session.moduleDocument() + + for aPartIndex in range(aPartSet.size("Parts")): + session.startOperation() + aPart = ModelAPI.modelAPI_ResultPart(ModelAPI.objectToResult(aPartSet.object("Parts", aPartIndex))) + aPart.activate() + session.finishOperation() + + session.startOperation() + session.setActiveDocument(aPartSet) + session.finishOperation() + + Part_1_doc = aPart.partDoc() + for aFeat in Part_1_doc.allFeatures(): + if aFeat.isInHistory(): + if(aFeat.data().name() == "Extrusion_1"): + aSelectionList = aFeat.selectionList("base") + for index in range(0, aSelectionList.size()): + attrSelection = aSelectionList.value(index) + shape = attrSelection.value() + name = attrSelection.namingName() + assert(name)