mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
PR: update documentation and examples
This commit is contained in:
parent
373c03904b
commit
bf60d6c358
@ -34,16 +34,7 @@ guidoc_DATA = images/head.png
|
||||
DOC_PYTHONPATH=$(prefix)/bin/salome:$(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(MED_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(GEOM_ROOT_DIR)/bin/salome:$(GEOM_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages
|
||||
DOC_SMESH_MeshersList=StdMeshers
|
||||
|
||||
# to have smesh.py in the documentation instead of smeshDC.py
|
||||
# we create dummy smesh.py from the smeshDC.py
|
||||
smesh.py: ../../../../src/SMESH_SWIG/smeshDC.py
|
||||
@awk '/^class Mesh:/ { mesh_found=1 } // { if (mesh_found) {print $$0; next} } /^ +(def|#)/ { match( $$0, /^ +/); print substr( $$0, 1+RLENGTH ); next } /^class smeshDC/ { next } //' \
|
||||
$< > $@
|
||||
|
||||
tmp/smesh.py: $(top_srcdir)/src/SMESH_SWIG/StdMeshersDC.py $(srcdir)/collect_mesh_methods.py
|
||||
@mkdir -p tmp && PYTHONPATH=$(DOC_PYTHONPATH):${PYTHONPATH} SMESH_MeshersList=$(DOC_SMESH_MeshersList) $(PYTHON) $(srcdir)/collect_mesh_methods.py -o $@ StdMeshers
|
||||
|
||||
usr_docs: doxyfile_py doxyfile smesh.py tmp/smesh.py
|
||||
usr_docs: doxyfile_py doxyfile
|
||||
@$(DOXYGEN) doxyfile_py ; \
|
||||
$(DOXYGEN) doxyfile
|
||||
|
||||
|
@ -99,10 +99,9 @@ EXAMPLE_RECURSIVE = NO
|
||||
#---------------------------------------------------------------------------
|
||||
#Input related options
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = smesh.py \
|
||||
INPUT = @top_srcdir@/src/SMESH_SWIG/smeshBuilder.py \
|
||||
@top_srcdir@/src/SMESH_SWIG/smesh_algorithm.py \
|
||||
@top_srcdir@/src/SMESH_SWIG/StdMeshersDC.py \
|
||||
tmp/smesh.py
|
||||
@top_srcdir@/src/SMESH_SWIG/StdMeshersDC.py
|
||||
FILE_PATTERNS =
|
||||
IMAGE_PATH = @srcdir@/images
|
||||
RECURSIVE = NO
|
||||
|
@ -9,17 +9,17 @@ Documentation for SALOME %Mesh module Python API is available in two forms:
|
||||
- <a href="smeshpy_doc/modules.html">Structured documentation</a>, where all methods and
|
||||
classes are grouped by their functionality, like it is done in the GUI documentation
|
||||
- <a href="smeshpy_doc/namespaces.html">Linear documentation</a> grouped only by classes, declared
|
||||
in the \ref smesh and StdMeshersDC Python packages.
|
||||
in the \ref SMESH_SWIG.smeshBuilder "smeshBuilder" and \ref SMESH_SWIG.StdMeshersDC "StdMeshersDC" Python packages.
|
||||
|
||||
Python package \ref smesh provides an interface to create and handle
|
||||
Class \ref SMESH_SWIG.smeshBuilder.smeshBuilder "smeshBuilder" provides an interface to create and handle
|
||||
meshes. It can be used to create an empty mesh or to import mesh from the data file.
|
||||
|
||||
As soon as mesh is created, it is possible to manage it via its own
|
||||
methods, described in \ref smesh.Mesh "class Mesh" documentation.
|
||||
methods, described in \ref SMESH_SWIG.smeshBuilder.Mesh "class Mesh" documentation.
|
||||
|
||||
Class \ref smesh.Mesh "Mesh" allows assigning algorithms to a mesh.
|
||||
Class \ref SMESH_SWIG.smeshBuilder.Mesh "Mesh" allows assigning algorithms to a mesh.
|
||||
Please note that some algorithms, included in the standard SALOME
|
||||
distribution are always available. Python package \ref StdMeshersDC
|
||||
distribution are always available. Python package \ref SMESH_SWIG.StdMeshersDC "StdMeshersDC"
|
||||
provides an interface for standard meshing algorithms included into
|
||||
the SALOME %Mesh module distribution, like:
|
||||
- REGULAR (1D)
|
||||
|
@ -318,7 +318,7 @@ namespace {
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Convert python script using commands of smesh.py
|
||||
* \brief Convert python script using commands of smeshBuilder.py
|
||||
* \param theScript - Input script
|
||||
* \retval TCollection_AsciiString - Convertion result
|
||||
* \param theToKeepAllCommands - to keep all commands or
|
||||
@ -462,7 +462,7 @@ _pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief name of SMESH_Gen in smesh.py
|
||||
* \brief name of SMESH_Gen in smeshBuilder.py
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
@ -880,7 +880,7 @@ void _pyGen::Process( const Handle(_pyCommand)& theCommand )
|
||||
|
||||
// Replace name of SMESH_Gen
|
||||
|
||||
// names of SMESH_Gen methods fully equal to methods defined in smesh.py
|
||||
// names of SMESH_Gen methods fully equal to methods defined in smeshBuilder.py
|
||||
static TStringSet smeshpyMethods;
|
||||
if ( smeshpyMethods.empty() ) {
|
||||
const char * names[] =
|
||||
|
@ -47,8 +47,8 @@
|
||||
* This file was created in order to respond to requirement of bug PAL10494:
|
||||
* SMESH python dump uses idl interface.
|
||||
*
|
||||
* The creation reason is that smesh.py commands defining hypotheses encapsulate
|
||||
* several SMESH engine method calls. As well, the dependencies between smesh.py
|
||||
* The creation reason is that smeshBuilder.py commands defining hypotheses encapsulate
|
||||
* several SMESH engine method calls. As well, the dependencies between smeshBuilder.py
|
||||
* classes differ from ones between corresponding SMESH IDL interfaces.
|
||||
*
|
||||
* Everything here is for internal usage by SMESH_2smeshpy::ConvertScript()
|
||||
|
@ -881,9 +881,9 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
|
||||
|
||||
// Dump trace of restored study
|
||||
if (theSavedTrace.Length() > 0) {
|
||||
// For the convertion of IDL API calls -> smesh.py API, "smesh" standing for SMESH_Gen
|
||||
// For the convertion of IDL API calls -> smeshBuilder.py API, "smesh" standing for SMESH_Gen
|
||||
// was replaces with "smeshgen" (==TPythonDump::SMESHGenName()).
|
||||
// Change "smesh" -> "smeshgen" in the trace saved before passage to smesh.py API
|
||||
// Change "smesh" -> "smeshgen" in the trace saved before passage to smeshBuilder.py API
|
||||
bool isNewVersion =
|
||||
theSavedTrace.Location( anOldGen + ".", 1, theSavedTrace.Length() );
|
||||
if ( !isNewVersion ) {
|
||||
@ -911,7 +911,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
|
||||
aScript += helper + "\n" + aNewLines;
|
||||
}
|
||||
|
||||
// Convert IDL API calls into smesh.py API.
|
||||
// Convert IDL API calls into smeshBuilder.py API.
|
||||
// Some objects are wrapped with python classes and
|
||||
// Resource_DataMapOfAsciiStringAsciiString holds methods returning wrapped objects
|
||||
Resource_DataMapOfAsciiStringAsciiString anEntry2AccessorMethod;
|
||||
@ -1020,7 +1020,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
|
||||
for (int ir = 1; ir <= seqRemoved.Length(); ir++) {
|
||||
anUpdatedScript += "\n\tSO = theStudy.FindObjectIOR(theStudy.ConvertObjectToIOR(";
|
||||
anUpdatedScript += seqRemoved.Value(ir);
|
||||
// for object wrapped by class of smesh.py
|
||||
// for object wrapped by class of smeshBuilder.py
|
||||
anEntry = theObjectNames( seqRemoved.Value(ir) );
|
||||
if ( anEntry2AccessorMethod.IsBound( anEntry ) )
|
||||
anUpdatedScript += helper + "." + anEntry2AccessorMethod( anEntry );
|
||||
|
@ -49,7 +49,7 @@ class SMESH_2smeshpy
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Convert a python script using commands of smesh.py
|
||||
* \brief Convert a python script using commands of smeshBuilder.py
|
||||
* \param theScript - Input script
|
||||
* \param theEntry2AccessorMethod - The returning method names to access to
|
||||
* objects wrapped with python class
|
||||
|
@ -35,7 +35,6 @@ from salome import *
|
||||
import geompy
|
||||
import SMESH, SALOMEDS
|
||||
from salome.smesh import smeshBuilder
|
||||
#from smeshBuilder import *
|
||||
|
||||
# retrieve SMESH engine in try/except block
|
||||
# to avoid problems in some cases, e.g. when generating documentation
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user