From: mpv Date: Thu, 17 Oct 2019 07:06:22 +0000 (+0300) Subject: Merge remote-tracking branch 'origin/ngo/macros' X-Git-Tag: V9_4_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=88c988893fe05369021fb6e7f2d8c94fd230c6da;p=modules%2Fshaper.git Merge remote-tracking branch 'origin/ngo/macros' --- 88c988893fe05369021fb6e7f2d8c94fd230c6da diff --cc src/PythonAddons/Test/TestcompoundVertices.py index 000000000,05d3b2a2e..697225c9f mode 000000,100644..100644 --- a/src/PythonAddons/Test/TestcompoundVertices.py +++ b/src/PythonAddons/Test/TestcompoundVertices.py @@@ -1,0 -1,51 +1,50 @@@ + # 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 + from salome.shaper import geom + from ModelAPI import * + + import os + + aSession = ModelAPI_Session.get() + + def getFilePath(fileName): + path = os.path.join(os.getenv("SHAPER_ROOT_DIR"), "bin", "salome", "macros", "compoundVertices") + return os.path.join(path, fileName) + + theFile = getFilePath("compoundVertices.txt") + + aSession.startOperation("Create part for import") + aPartFeature = aSession.moduleDocument().addFeature("Part") + aSession.finishOperation() + aPart = aSession.activeDocument() + + aSession.startOperation("Import file") + aFeatureKind = "compoundVertices" + anImportFeature = aPart.addFeature(aFeatureKind) + + aFieldName = "file_path" + file = anImportFeature.string(aFieldName) + file.setValue(theFile) + + aSeparatorName = "separator" + separator = anImportFeature.string(aSeparatorName) + separator.setValue(" ") + aSession.finishOperation() - diff --cc src/PythonAddons/macros/importParameters/importParameters.txt index 000000000,c5babe823..a6d7d258d mode 000000,100644..100644 --- a/src/PythonAddons/macros/importParameters/importParameters.txt +++ b/src/PythonAddons/macros/importParameters/importParameters.txt @@@ -1,0 -1,4 +1,3 @@@ + a 10 + b 12 + c 15 -