]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
piping -> pipeNetwork
authorGERALD NICOLAS <D68518@dsp0864451.atlas.edf.fr>
Thu, 17 Jun 2021 13:43:39 +0000 (15:43 +0200)
committerGERALD NICOLAS <D68518@dsp0864451.atlas.edf.fr>
Thu, 17 Jun 2021 13:43:39 +0000 (15:43 +0200)
src/PythonAddons/Test/TestpipeNetwork.py [new file with mode: 0755]
src/PythonAddons/Test/Testpiping.py [deleted file]
src/PythonAddons/doc/pipeNetworkFeature.rst [new file with mode: 0644]
src/PythonAddons/doc/pipingFeature.rst [deleted file]
src/PythonAddons/macros/pipeNetwork/icons/pipeNetwork.png [new file with mode: 0644]
src/PythonAddons/macros/pipeNetwork/icons/piping.png [deleted file]
src/PythonAddons/macros/pipeNetwork/pipeNetwork.txt [new file with mode: 0644]
src/PythonAddons/macros/pipeNetwork/piping.txt [deleted file]

diff --git a/src/PythonAddons/Test/TestpipeNetwork.py b/src/PythonAddons/Test/TestpipeNetwork.py
new file mode 100755 (executable)
index 0000000..ec796f8
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright (C) 2014-2021  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", "pipeNetwork")
+    return os.path.join(path, fileName)
+
+theFile = getFilePath("pipeNetwork.txt")
+
+aSession.startOperation("Create part for import")
+aPartFeature = aSession.moduleDocument().addFeature("Part")
+aSession.finishOperation()
+aPart = aSession.activeDocument()
+
+aSession.startOperation("Import file")
+aFeatureKind = "pipeNetwork"
+anImportFeature = aPart.addFeature(aFeatureKind)
+aFieldName = "file_path"
+aFile = anImportFeature.string(aFieldName)
+aFile.setValue(theFile)
+aSession.finishOperation()
+
+assert(model.checkPythonDump())
diff --git a/src/PythonAddons/Test/Testpiping.py b/src/PythonAddons/Test/Testpiping.py
deleted file mode 100755 (executable)
index ec796f8..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (C) 2014-2021  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", "pipeNetwork")
-    return os.path.join(path, fileName)
-
-theFile = getFilePath("pipeNetwork.txt")
-
-aSession.startOperation("Create part for import")
-aPartFeature = aSession.moduleDocument().addFeature("Part")
-aSession.finishOperation()
-aPart = aSession.activeDocument()
-
-aSession.startOperation("Import file")
-aFeatureKind = "pipeNetwork"
-anImportFeature = aPart.addFeature(aFeatureKind)
-aFieldName = "file_path"
-aFile = anImportFeature.string(aFieldName)
-aFile.setValue(theFile)
-aSession.finishOperation()
-
-assert(model.checkPythonDump())
diff --git a/src/PythonAddons/doc/pipeNetworkFeature.rst b/src/PythonAddons/doc/pipeNetworkFeature.rst
new file mode 100644 (file)
index 0000000..262cc3f
--- /dev/null
@@ -0,0 +1,37 @@
+.. _pipeNetwork:
+.. |compoundVertices.icon|    image:: images/compound.png
+
+Piping
+======
+
+Compound Vertices is a feature and can be edited after execution.
+It allows creation of several points basing on XYZ coords file.
+
+.. warning::
+  Please note that it is better to limit yourself to create a maximum of 100 points.
+
+These set of points will be grouped in a compound and can be used for others features.
+
+To add a new set of points:
+
+#. select in the Main Menu *Macros - > Points set* item  or
+#. click |compoundVertices.icon| **Points set** button in Macros toolbar:
+
+The following property panel appears:
+
+.. figure:: images/compoundVerticesPanel.png
+   :align: center
+
+   set of Points
+
+Select your points file and define a separator if it's different that " " in your points file
+
+Result
+""""""
+
+A resulting compound will contain the points
+
+.. figure:: images/compoundVertices.png
+   :align: center
+
+   Points
diff --git a/src/PythonAddons/doc/pipingFeature.rst b/src/PythonAddons/doc/pipingFeature.rst
deleted file mode 100644 (file)
index 262cc3f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-.. _pipeNetwork:
-.. |compoundVertices.icon|    image:: images/compound.png
-
-Piping
-======
-
-Compound Vertices is a feature and can be edited after execution.
-It allows creation of several points basing on XYZ coords file.
-
-.. warning::
-  Please note that it is better to limit yourself to create a maximum of 100 points.
-
-These set of points will be grouped in a compound and can be used for others features.
-
-To add a new set of points:
-
-#. select in the Main Menu *Macros - > Points set* item  or
-#. click |compoundVertices.icon| **Points set** button in Macros toolbar:
-
-The following property panel appears:
-
-.. figure:: images/compoundVerticesPanel.png
-   :align: center
-
-   set of Points
-
-Select your points file and define a separator if it's different that " " in your points file
-
-Result
-""""""
-
-A resulting compound will contain the points
-
-.. figure:: images/compoundVertices.png
-   :align: center
-
-   Points
diff --git a/src/PythonAddons/macros/pipeNetwork/icons/pipeNetwork.png b/src/PythonAddons/macros/pipeNetwork/icons/pipeNetwork.png
new file mode 100644 (file)
index 0000000..7b265be
Binary files /dev/null and b/src/PythonAddons/macros/pipeNetwork/icons/pipeNetwork.png differ
diff --git a/src/PythonAddons/macros/pipeNetwork/icons/piping.png b/src/PythonAddons/macros/pipeNetwork/icons/piping.png
deleted file mode 100644 (file)
index 7b265be..0000000
Binary files a/src/PythonAddons/macros/pipeNetwork/icons/piping.png and /dev/null differ
diff --git a/src/PythonAddons/macros/pipeNetwork/pipeNetwork.txt b/src/PythonAddons/macros/pipeNetwork/pipeNetwork.txt
new file mode 100644 (file)
index 0000000..b569485
--- /dev/null
@@ -0,0 +1,10 @@
+21 16 224.00000000000003 1
+33 21 224.00000000000003 1
+35 0 224.00000000000003 1.1
+40 43 224.00000000000003 1
+53 43 224.00000000000003 1.2
+69 29 224.00000000000003 1
+97 58 224.00000000000003 1
+64 100 224.00000000000003 1.2
+100 127 224.00000000000003 1
+88 115 224.00000000000003 1.2
diff --git a/src/PythonAddons/macros/pipeNetwork/piping.txt b/src/PythonAddons/macros/pipeNetwork/piping.txt
deleted file mode 100644 (file)
index b569485..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-21 16 224.00000000000003 1
-33 21 224.00000000000003 1
-35 0 224.00000000000003 1.1
-40 43 224.00000000000003 1
-53 43 224.00000000000003 1.2
-69 29 224.00000000000003 1
-97 58 224.00000000000003 1
-64 100 224.00000000000003 1.2
-100 127 224.00000000000003 1
-88 115 224.00000000000003 1.2