]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
piping -> pipeNetwork
authorGERALD NICOLAS <D68518@dsp0864451.atlas.edf.fr>
Thu, 17 Jun 2021 13:42:06 +0000 (15:42 +0200)
committerGERALD NICOLAS <D68518@dsp0864451.atlas.edf.fr>
Thu, 17 Jun 2021 13:42:06 +0000 (15:42 +0200)
src/PythonAddons/CMakeLists.txt
src/PythonAddons/Test/Testpiping.py
src/PythonAddons/addons_Features.py
src/PythonAddons/addons_Features.xml.in
src/PythonAddons/doc/addons_Features.rst
src/PythonAddons/doc/pipingFeature.rst
src/PythonAddons/macros/pipeNetwork/feature.py
src/PythonAddons/macros/pipeNetwork/widget.xml
src/PythonAddons/tests.set

index a4b0f4c266ffddd85ca5ad7a77559074d4a92974..07d9bbd5eb37cd0008d6ff776487b5232be2f436 100644 (file)
@@ -43,7 +43,7 @@ INSTALL(DIRECTORY macros DESTINATION ${SHAPER_INSTALL_ADDONS})
 INSTALL(DIRECTORY macros/rectangle/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
 INSTALL(DIRECTORY macros/compoundVertices/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
 INSTALL(DIRECTORY macros/importParameters/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
-INSTALL(DIRECTORY macros/piping/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
+INSTALL(DIRECTORY macros/pipeNetwork/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
 INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
 
 INCLUDE(UnitTest)
@@ -55,16 +55,16 @@ ADD_UNIT_TESTS(${TEST_NAMES})
 if(${HAVE_SALOME})
   enable_testing()
   set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/PythonAddons")
-  
+
   install(FILES CTestTestfileInstall.cmake
   DESTINATION ${TEST_INSTALL_DIRECTORY}
   RENAME CTestTestfile.cmake)
   install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
-  
+
   set(TMP_TESTS_NAMES)
   foreach(tfile ${TEST_NAMES})
     list(APPEND TMP_TESTS_NAMES "Test/${tfile}")
   endforeach(tfile ${TEST_NAMES})
-  
+
   install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
 endif(${HAVE_SALOME})
index 825d0bbae526338e69a42034312876926aaddca3..ec796f8f606976b05d1181c5ce06861e33f7d92b 100755 (executable)
@@ -26,10 +26,10 @@ import os
 aSession = ModelAPI_Session.get()
 
 def getFilePath(fileName):
-    path = os.path.join(os.getenv("SHAPER_ROOT_DIR"), "bin", "salome", "macros", "piping")
+    path = os.path.join(os.getenv("SHAPER_ROOT_DIR"), "bin", "salome", "macros", "pipeNetwork")
     return os.path.join(path, fileName)
 
-theFile = getFilePath("piping.txt")
+theFile = getFilePath("pipeNetwork.txt")
 
 aSession.startOperation("Create part for import")
 aPartFeature = aSession.moduleDocument().addFeature("Part")
@@ -37,7 +37,7 @@ aSession.finishOperation()
 aPart = aSession.activeDocument()
 
 aSession.startOperation("Import file")
-aFeatureKind = "piping"
+aFeatureKind = "pipeNetwork"
 anImportFeature = aPart.addFeature(aFeatureKind)
 aFieldName = "file_path"
 aFile = anImportFeature.string(aFieldName)
index bba4206025887a9b628f36a38478efc904816501..4cef6a72b58359cd9ce13af1128c99bea20bc32a 100644 (file)
@@ -23,7 +23,7 @@ import ModelAPI
 from macros.rectangle.feature import SketchPlugin_Rectangle
 from macros.compoundVertices.feature import compoundVertices
 from macros.importParameters.feature import importParameters
-from macros.piping.feature import piping
+from macros.pipeNetwork.feature import pipeNetwork
 
 
 class PythonFeaturesPlugin(ModelAPI.ModelAPI_Plugin):
@@ -49,8 +49,8 @@ class PythonFeaturesPlugin(ModelAPI.ModelAPI_Plugin):
             aFeature = compoundVertices().__disown__()
         elif theFeatureID == importParameters.ID():
             aFeature = importParameters().__disown__()
-        elif theFeatureID == piping.ID():
-            aFeature = piping().__disown__()
+        elif theFeatureID == pipeNetwork.ID():
+            aFeature = pipeNetwork().__disown__()
         else:
             raise Exception("No such feature %s" % theFeatureID)
 
index 83027f311fe6c6900eb0eda86a030d0f5c478daf..a164800b9b24c75bca3988509c7852a21c43b203 100644 (file)
@@ -2,5 +2,5 @@
   <source path="@ADDONS_FOLDER_PATH@/macros/rectangle/widget.xml"/>
   <source path="@ADDONS_FOLDER_PATH@/macros/compoundVertices/widget.xml"/>
   <source path="@ADDONS_FOLDER_PATH@/macros/importParameters/widget.xml"/>
-  <source path="@ADDONS_FOLDER_PATH@/macros/piping/widget.xml"/>
+  <source path="@ADDONS_FOLDER_PATH@/macros/pipeNetwork/widget.xml"/>
 </plugin>
index a5ec3d401904060d88981aa5e8bba0bb3e3b04cc..aa463c383edde1b2c1c192be270e3dcd711b2cc0 100644 (file)
@@ -10,7 +10,7 @@ A feature description includes 4 files:
 
 - widget.xml with a description of the property panel,
 -  __init__.py,
-- feature.py with python commands, 
+- feature.py with python commands,
 - icon.png with image of button in the toolbar (the file is located at sub-folder /icons).
 
 Some examples of already created custom features are:
@@ -22,4 +22,4 @@ Some examples of already created custom features are:
    rectangleFeature.rst
    compoundVerticesFeature.rst
    importParametersFeature.rst
-   pipingFeature.rst
+   pipeNetworkFeature.rst
index 7f04edb72f7a6b27926ffe8a630cf8e79c2b89d6..262cc3f2c1e5448ab908b3418be67404157f21c5 100644 (file)
@@ -1,4 +1,4 @@
-.. _piping:
+.. _pipeNetwork:
 .. |compoundVertices.icon|    image:: images/compound.png
 
 Piping
index bfadd47b4d9d500256a615c66f96e92e7260eefb..f2c11a48c3a47950cd2cea4406610227f16a7fc4 100644 (file)
@@ -18,7 +18,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-"""piping Feature
+"""pipeNetwork Feature
 Author: Nathalie Gore
 """
 
@@ -30,7 +30,7 @@ import ModelAPI
 import ParametersAPI
 from GeomAPI import *
 
-class piping(model.Feature):
+class pipeNetwork(model.Feature):
     """Import of Construction points
     """
     lfeatures = list()
@@ -51,7 +51,7 @@ class piping(model.Feature):
     @staticmethod
     def ID():
         """Return Id of the Feature."""
-        return "piping"
+        return "pipeNetwork"
 
     @staticmethod
     def FILE_ID():
@@ -65,7 +65,7 @@ class piping(model.Feature):
 
     def getKind(self):
         """Override Feature.getKind()"""
-        return piping.ID()
+        return pipeNetwork.ID()
 
 
 # Initialization of the dialog panel
@@ -325,7 +325,7 @@ class piping(model.Feature):
 
             from os.path import basename
             filename = basename(filepath)
-            nameRes = "piping_" + filename
+            nameRes = "pipeNetwork_" + filename
 
             # Creating the construction points in the current document
             lFeatures = []
@@ -461,7 +461,7 @@ class piping(model.Feature):
                                     self.infoPoints[id_noeud]["plane"] = plane.result()
 
 
-                # Création des paths pour le piping
+                # Création des paths pour le pipeNetwork
                 print("========================= Création des paths =========================")
                 for key, value in self.connectivities.items():
                     print("================================================================================= key = ", key, value['chainage'], value['fillet'])
@@ -485,7 +485,7 @@ class piping(model.Feature):
                             copy = model.addCopy(part, [model.selection(copy.defaultResult())], 1); copy.execute(True); self.lfeatures.append(copy)
 
 
-                # Création des sketchs pour le piping
+                # Création des sketchs pour le pipeNetwork
                 print("========================= Création des sketchs =========================")
                 for key, value in self.connectivities.items():
                     print("================================================================================= key = ", key)
@@ -535,7 +535,7 @@ class piping(model.Feature):
         """Override Feature.initAttributes().
         F.isMacro() -> True
 
-        piping feature is macro: removes itself on the creation transaction
+        pipeNetwork feature is macro: removes itself on the creation transaction
         finish.
         """
         return False
index 8f84a8acd69c0b91dd405be973fa2d6fedd5d733..9b3edc0c1e693aa49ffb27f3ea1efb80f8b7960c 100644 (file)
@@ -2,11 +2,11 @@
   <workbench id="Macros" document="Part">
     <group id="Samples">
       <feature
-        id="piping"
+        id="pipeNetwork"
         title="Piping"
         tooltip="Import a set of pipes"
-        icon="icons/Addons/piping.png"
-        helpfile="pipingFeature.html">
+        icon="icons/Addons/pipeNetwork.png"
+        helpfile="pipeNetworkFeature.html">
         <file_selector id="file_path" title="Import txt file (pipe)" path="">
         </file_selector>
         <boolvalue id="blocking" label="for hexa meshes" default="false" tooltip="To partition CAD for hexa meshes" obligatory="0"/>
index 051a027f597b15b757296cd32454bfb7fbbfb1c7..595ce0e44066bbcf2b0e224b591e60ddae275322 100644 (file)
@@ -22,5 +22,5 @@ SET(TEST_NAMES
   TestRectangleCentered.py
   TestcompoundVertices.py
   TestimportParameters.py
-  Testpiping.py
+  TestpipeNetwork.py
 )