From: vsr Date: Tue, 21 Aug 2012 13:49:35 +0000 (+0000) Subject: 0021308: EDF 1923 SMESH: Remove hard-coded dependency of the external mesh plugins... X-Git-Tag: V6_6_0a1~204 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a22deee34cd1b497553886c68dd67a68b8d26700;p=modules%2Fsmesh.git 0021308: EDF 1923 SMESH: Remove hard-coded dependency of the external mesh plugins from the SMESH module * Improve documentation for meshing plug-ins (in particular, dynamically added methods) --- diff --git a/doc/salome/gui/SMESH/collect_mesh_methods.py b/doc/salome/gui/SMESH/collect_mesh_methods.py index 278ce2017..97fb9784e 100755 --- a/doc/salome/gui/SMESH/collect_mesh_methods.py +++ b/doc/salome/gui/SMESH/collect_mesh_methods.py @@ -44,11 +44,11 @@ def main(plugin, dummymeshhelp = True, output_file = "smesh.py"): 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 - 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" ) @@ -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 - 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." ) @@ -72,14 +70,14 @@ def main(plugin, dummymeshhelp = True, output_file = "smesh.py"): 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( " # @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" ) diff --git a/src/SMESH_SWIG/StdMeshersDC.py b/src/SMESH_SWIG/StdMeshersDC.py index 587f91070..da59111f3 100644 --- a/src/SMESH_SWIG/StdMeshersDC.py +++ b/src/SMESH_SWIG/StdMeshersDC.py @@ -345,7 +345,7 @@ class StdMeshersDC_Segment(Mesh_Algorithm): ## 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): @@ -373,7 +373,7 @@ class StdMeshersDC_CompositeSegment(StdMeshersDC_Segment): ## 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): @@ -415,7 +415,7 @@ class StdMeshersDC_Segment_Python(Mesh_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): @@ -954,7 +954,7 @@ class StdMeshersDC_Prism3D(Mesh_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):