Salome HOME
0021308: EDF 1923 SMESH: Remove hard-coded dependency of the external mesh plugins...
authorvsr <vsr@opencascade.com>
Tue, 21 Aug 2012 13:49:35 +0000 (13:49 +0000)
committervsr <vsr@opencascade.com>
Tue, 21 Aug 2012 13:49:35 +0000 (13:49 +0000)
* Improve documentation for meshing plug-ins (in particular, dynamically added methods)

doc/salome/gui/SMESH/collect_mesh_methods.py
src/SMESH_SWIG/StdMeshersDC.py

index 278ce201702286399406f0f8423ea5dc99896545..97fb9784e1943cd9cf39fc7c0d996f4e8c028c55 100755 (executable)
@@ -44,11 +44,11 @@ def main(plugin, dummymeshhelp = True, output_file = "smesh.py"):
             pass
         if methods:
             output = []
             pass
         if methods:
             output = []
+            output.append( "## This class allows defining and managing a mesh." )
+            output.append( "#" )
             if dummymeshhelp:
                 # Add dummy Mesh help
                 # This is supposed to be done when generating documentation for meshing plug-ins
             if dummymeshhelp:
                 # Add dummy Mesh help
                 # This is supposed to be done when generating documentation for meshing plug-ins
-                output.append( "## This class allows defining and managing a mesh." )
-                output.append( "#" )
                 output.append( "#  @note The documentation below does not provide complete description of class @b %Mesh" )
                 output.append( "#  from @b %smesh.py package. This documentation provides only information about" )
                 output.append( "#  the methods dynamically added to the %Mesh class by the " + plugin + " plugin" )
                 output.append( "#  @note The documentation below does not provide complete description of class @b %Mesh" )
                 output.append( "#  from @b %smesh.py package. This documentation provides only information about" )
                 output.append( "#  the methods dynamically added to the %Mesh class by the " + plugin + " plugin" )
@@ -58,8 +58,6 @@ def main(plugin, dummymeshhelp = True, output_file = "smesh.py"):
             else:
                 # Extend documentation for Mesh class with information about dynamically added methods.
                 # This is supposed to be done only when building documentation for SMESH module
             else:
                 # Extend documentation for Mesh class with information about dynamically added methods.
                 # This is supposed to be done only when building documentation for SMESH module
-                output.append( "## This class allows defining and managing a mesh." )
-                output.append( "#" )
                 output.append( "#  @note Some methods are dynamically added to the @b %Mesh class in runtime by meshing " )
                 output.append( "#  plug-in modules. If you fail to find help on some methods in the documentation of SMESH module, " )
                 output.append( "#  try to look into the documentation for the meshing plug-ins." )
                 output.append( "#  @note Some methods are dynamically added to the @b %Mesh class in runtime by meshing " )
                 output.append( "#  plug-in modules. If you fail to find help on some methods in the documentation of SMESH module, " )
                 output.append( "#  try to look into the documentation for the meshing plug-ins." )
@@ -72,14 +70,14 @@ def main(plugin, dummymeshhelp = True, output_file = "smesh.py"):
                     if docHelper: break
                     pass
                 if not docHelper: docHelper = "Creates new algorithm."
                     if docHelper: break
                     pass
                 if not docHelper: docHelper = "Creates new algorithm."
-                output.append( " ## %s." % docHelper )
+                output.append( " ## %s" % docHelper )
                 output.append( " #  This method is dynamically added to %Mesh class by the meshing plug-in(s). " )
                 output.append( " #" )
                 output.append( " #  If the optional @a geom_shape parameter is not set, this algorithm is global (applied to whole mesh)." )
                 output.append( " #  Otherwise, this algorithm defines a submesh based on @a geom_shape subshape." )
                 output.append( " #  @param algo_type type of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)" )
                 output.append( " #  @param geom_shape if defined, the subshape to be meshed (GEOM_Object)" )
                 output.append( " #  This method is dynamically added to %Mesh class by the meshing plug-in(s). " )
                 output.append( " #" )
                 output.append( " #  If the optional @a geom_shape parameter is not set, this algorithm is global (applied to whole mesh)." )
                 output.append( " #  Otherwise, this algorithm defines a submesh based on @a geom_shape subshape." )
                 output.append( " #  @param algo_type type of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)" )
                 output.append( " #  @param geom_shape if defined, the subshape to be meshed (GEOM_Object)" )
-                output.append( " #  @return An instance of Mesh_Algorithm sub-class according to the specified @a algo_type:" )
+                output.append( " #  @return An instance of Mesh_Algorithm sub-class according to the specified @a algo_type, see " )
                 output.append( " #  %s" % ", ".join( [ "%s.%s" % ( plugin_module, algo.__name__ ) for algo in methods[ method ] ] ) )
                 output.append( " def %s(algo_type, geom_shape=0):" % method )
                 output.append( "   pass" )
                 output.append( " #  %s" % ", ".join( [ "%s.%s" % ( plugin_module, algo.__name__ ) for algo in methods[ method ] ] ) )
                 output.append( " def %s(algo_type, geom_shape=0):" % method )
                 output.append( "   pass" )
index 587f91070b98960a432ba0c56157743d68ae8d82..da59111f3306ffed71ae64851202c1f2b47022ca 100644 (file)
@@ -345,7 +345,7 @@ class StdMeshersDC_Segment(Mesh_Algorithm):
 
 ## Segment 1D algorithm for discretization of a set of adjacent edges as one edge.
 #
 
 ## Segment 1D algorithm for discretization of a set of adjacent edges as one edge.
 #
-#  It is created by calling smesh.Mesh.Segment(COMPOSITE,geom=0)
+#  It is created by calling smesh.Mesh.Segment(smesh.COMPOSITE,geom=0)
 #
 #  @ingroup l3_algos_basic
 class StdMeshersDC_CompositeSegment(StdMeshersDC_Segment):
 #
 #  @ingroup l3_algos_basic
 class StdMeshersDC_CompositeSegment(StdMeshersDC_Segment):
@@ -373,7 +373,7 @@ class StdMeshersDC_CompositeSegment(StdMeshersDC_Segment):
 
 ## Defines a segment 1D algorithm for discretization of edges with Python function
 #
 
 ## Defines a segment 1D algorithm for discretization of edges with Python function
 #
-#  It is created by calling smesh.Mesh.Segment(PYTHON,geom=0)
+#  It is created by calling smesh.Mesh.Segment(smesh.PYTHON,geom=0)
 #
 #  @ingroup l3_algos_basic
 class StdMeshersDC_Segment_Python(Mesh_Algorithm):
 #
 #  @ingroup l3_algos_basic
 class StdMeshersDC_Segment_Python(Mesh_Algorithm):
@@ -415,7 +415,7 @@ class StdMeshersDC_Segment_Python(Mesh_Algorithm):
 
 ## Triangle MEFISTO 2D algorithm
 #
 
 ## Triangle MEFISTO 2D algorithm
 #
-#  It is created by calling smesh.Mesh.Triangle(MEFISTO,geom=0)
+#  It is created by calling smesh.Mesh.Triangle(smesh.MEFISTO,geom=0)
 #
 #  @ingroup l3_algos_basic
 class StdMeshersDC_Triangle_MEFISTO(Mesh_Algorithm):
 #
 #  @ingroup l3_algos_basic
 class StdMeshersDC_Triangle_MEFISTO(Mesh_Algorithm):
@@ -954,7 +954,7 @@ class StdMeshersDC_Prism3D(Mesh_Algorithm):
 
 ## Defines a Radial Quadrangle 1D2D algorithm
 # 
 
 ## Defines a Radial Quadrangle 1D2D algorithm
 # 
-#  It is created by calling smesh.Mesh.Quadrangle(RADIAL_QUAD,geom=0)
+#  It is created by calling smesh.Mesh.Quadrangle(smesh.RADIAL_QUAD,geom=0)
 #
 #  @ingroup l2_algos_radialq
 class StdMeshersDC_RadialQuadrangle1D2D(Mesh_Algorithm):
 #
 #  @ingroup l2_algos_radialq
 class StdMeshersDC_RadialQuadrangle1D2D(Mesh_Algorithm):