Back to index

salome-kernel  6.5.0
Help.py
Go to the documentation of this file.
00001 #  -*- coding: iso-8859-1 -*-
00002 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00003 #
00004 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00005 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00006 #
00007 # This library is free software; you can redistribute it and/or
00008 # modify it under the terms of the GNU Lesser General Public
00009 # License as published by the Free Software Foundation; either
00010 # version 2.1 of the License.
00011 #
00012 # This library is distributed in the hope that it will be useful,
00013 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 # Lesser General Public License for more details.
00016 #
00017 # You should have received a copy of the GNU Lesser General Public
00018 # License along with this library; if not, write to the Free Software
00019 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00020 #
00021 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00022 #
00023 
00024 #  File   : Help.py
00025 #  Author : Paul RASCLE, EDF
00026 #  Module : SALOME
00027 #  $Header: /home/server/cvs/KERNEL/KERNEL_SRC/src/KERNEL_PY/Help.py,v 1.5.2.2.14.2.12.1 2012-04-12 14:05:13 vsr Exp $
00028 #
00029 class SalomeDoc:
00030     def __init__(self, aDoc):
00031         self.doc = aDoc
00032     def __repr__(self):
00033         print self.doc
00034         return "---"
00035     def salome(self):
00036         doc_salome = '''
00037 MODULE : salome
00038 ---------------
00039 module salome gives access to Salome ressources:
00040 variables:
00041 
00042   salome.orb             : CORBA
00043   salome.naming_service  : instance of naming Service class
00044       methods:
00045           Resolve(name)  : find a CORBA object (ior) by its pathname
00046           Register(name) : register a CORBA object under a pathname
00047   salome.lcc             : instance of lifeCycleCORBA class
00048       methods:
00049           FindOrLoadComponent(server,name) :
00050                            obtain an Engine (CORBA object)
00051                            or launch the Engine if not found,
00052                            with a Server name and an Engine name
00053   salome.sg
00054       methods:
00055          updateObjBrowser(bool):
00056          getActiveStudyId():
00057          getActiveStudyName():
00058          
00059          SelectedCount():      returns number of selected objects
00060          getSelected(i):       returns entry of selected object number i
00061          getAllSelected():     returns list of entry of selected objects
00062          AddIObject(Entry):    select an existing Interactive object
00063          RemoveIObject(Entry): remove object from selection
00064          ClearIObjects():      clear selection
00065          
00066          Display(*Entry):
00067          DisplayOnly(Entry):
00068          Erase(Entry):
00069          DisplayAll():
00070          EraseAll():
00071 
00072          IDToObject(Entry):    returns CORBA reference from entry
00073 
00074   salome.myStudyName     : active Study Name
00075   salome.myStudyId       : active Study Id
00076   salome.myStudy         : the active Study itself (CORBA ior)
00077                            methods : defined in SALOMEDS.idl
00078                                                          
00079 methods:
00080   salome.DumpStudy(study) : Dump a study, given the ior
00081 ---
00082 '''
00083         print doc_salome
00084         
00085     def geompy(self):
00086         doc_geompy = '''
00087 MODULE : geompy
00088 ---------------
00089 module geompy provides an encapsulation of GEOM Engine methods
00090 variables:
00091   geompy.geom               : a Geometry Engine, found or loaded
00092                               at first import of module geompy.
00093                               methods : defined in GEOM_Gen.idl
00094   geompy.myBuilder          : a study builder
00095   geompy.father             : GEOM root in current study (salome.myStudy)
00096 
00097 methods:
00098   addToStudy(aShape, aName) : add the shape into the current study
00099   --- all methods of GEOM_Gen.idl that returns a shape are encapsulated,
00100       with the same interface : shapes are named with their ior
00101 '''
00102         print doc_geompy
00103         
00104     def supervision(self):
00105         doc_supervision = '''
00106 MODULES : SALOME_SuperVisionEditor and SALOME_SuperVisionExecutor
00107 -----------------------------------------------------------------
00108 this modules provide access to Editor and Executor Engine methods
00109 
00110 See SUPERV.idl
00111 
00112 In order to run the example (supervisionexample.py)
00113 
00114     Type : from supervisionexample import *
00115            supervisionexample.py contains comments
00116 
00117 A new python example avoids references to LifeCycleCORBA
00118                      avoids references to NamingService
00119                      avoids references to ModuleCatalog
00120                      avoids SuperVisionComponent creation
00121                      allows G.Input(...) instead of AddInput(G,...)
00122                      replaces Editor/Executor with Graph
00123                      allows Nodes, Ports and Links CORBA objects
00124                      shortens methods names
00125                      ...
00126 
00127     See /SuperVisionTest/resources/GraphExample.py
00128                                    and GraphExample.xml
00129 ---
00130 '''
00131         print doc_supervision
00132         
00133     
00134 
00135 Help = SalomeDoc('''
00136 Availables modules:
00137   salome      : gives access to Salome ressources
00138   geompy      : encapsulation of GEOM Engine methods
00139   supervision : gives access to SuperVision Engine
00140 To obtain specific help on a module "truc", type: Help.truc()
00141 To run an example, type: import example3
00142 ''')
00143