From 3de5605e442617ce09071d233feeea639eafe3c2 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 27 May 2015 11:34:14 +0300 Subject: [PATCH] Update documentation --- doc/salome/examples/ACISPlugindemo.py | 20 +++++++------------ doc/salome/gui/ACISPLUGIN/CMakeLists.txt | 7 +++++++ .../acisplugin_python_interface_page.doc | 4 ++-- doc/salome/gui/ACISPLUGIN/input/index.doc | 13 ++++++------ src/ACISPluginBuilder.py | 12 +++++++++++ 5 files changed, 34 insertions(+), 22 deletions(-) diff --git a/doc/salome/examples/ACISPlugindemo.py b/doc/salome/examples/ACISPlugindemo.py index 09ee7a0..e392d5f 100644 --- a/doc/salome/examples/ACISPlugindemo.py +++ b/doc/salome/examples/ACISPlugindemo.py @@ -1,23 +1,17 @@ # Import/Export ACIS +import os import salome salome.salome_init() import GEOM from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) -# Example of import from ACIS - -# get a path to SAMPLES_SRC -import os -thePath = os.getenv("DATA_DIR") -# create filenames -theFileName = thePath + "/Shapes/Sat/Bug841_Robot01_ACIS_15_Volumique.sat" - -# import shape -Shape1 = geompy.ImportACIS(theFileName) -geompy.addToStudy(Shape1, "Robot01_1") +# - path to the file +acisFile = os.getenv("DATA_DIR") + "/Shapes/Sat/Bug841_Robot01_ACIS_15_Volumique.sat" -# It is possible also to use next format of importing and publishing in study +# - import shape +shape = geompy.ImportACIS(acisFile) -Shape2 = geompy.ImportACIS(theFileName,"Robot01_2") +# - publish in study +geompy.addToStudy(shape, "Robot01") diff --git a/doc/salome/gui/ACISPLUGIN/CMakeLists.txt b/doc/salome/gui/ACISPLUGIN/CMakeLists.txt index c696421..9aea1ed 100755 --- a/doc/salome/gui/ACISPLUGIN/CMakeLists.txt +++ b/doc/salome/gui/ACISPLUGIN/CMakeLists.txt @@ -22,6 +22,12 @@ SALOME_CONFIGURE_FILE(doxyfile_py.in doxyfile_py) SALOME_CONFIGURE_FILE(static/header.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header.html) SALOME_CONFIGURE_FILE(static/header_py.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header_py.html) +# Generate a temporary python file, needed for the generation of the documentation +# of the plugin. +SALOME_ACCUMULATE_ENVIRONMENT(GEOM_PluginsList NOCHECK ACISPlugin) +SET(_plugins_cmd_options ${GEOM_ROOT_DIR}/bin/salome/collect_geom_methods.py -d -o tmp/geomBuilder.py ACISPlugin) +SALOME_GENERATE_ENVIRONMENT_SCRIPT(_plugins_cmd env_script "${PYTHON_EXECUTABLE}" "${_plugins_cmd_options}") + SET(kernel_file "$ENV{KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py") IF(WIN32) STRING(REPLACE "/" "\\" kernel_file ${kernel_file}) @@ -29,6 +35,7 @@ ENDIF(WIN32) ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp/ACISPluginBuilder.py ${CMAKE_SOURCE_DIR}/src/ACISPluginBuilder.py + COMMAND ${_plugins_cmd} COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py COMMAND ${DOXYGEN_EXECUTABLE} doxyfile COMMAND ${CMAKE_COMMAND} -E remove_directory tmp diff --git a/doc/salome/gui/ACISPLUGIN/input/acisplugin_python_interface_page.doc b/doc/salome/gui/ACISPLUGIN/input/acisplugin_python_interface_page.doc index 9a349dc..1c251be 100644 --- a/doc/salome/gui/ACISPLUGIN/input/acisplugin_python_interface_page.doc +++ b/doc/salome/gui/ACISPLUGIN/input/acisplugin_python_interface_page.doc @@ -2,8 +2,8 @@ \page acisplugin_python_interface_page Python Interface -Python package ACISPluginBuilder defines several classes, destined for -import and export CAD models in ACIS format (*.sat files). +Python package ACISPluginBuilder defines several functions that allow +importing and exporting CAD models in ACIS format (*.sat files). ACISPLUGIN dynamically adds several methods to the geomBuilder. diff --git a/doc/salome/gui/ACISPLUGIN/input/index.doc b/doc/salome/gui/ACISPLUGIN/input/index.doc index 58eb48c..3a273f5 100644 --- a/doc/salome/gui/ACISPLUGIN/input/index.doc +++ b/doc/salome/gui/ACISPLUGIN/input/index.doc @@ -2,16 +2,15 @@ \mainpage Introduction to ACISPLUGIN - ACIS SAT interface to be used as plugin for SALOME Geometry -module. -It is destined for: -- Importing CAD models stored in ACIS format (*.sat files) into -SALOME study; +The \b ACISPLUGIN implements ACIS SAT interface as a plugin for SALOME Geometry module. + +It can be used for: +- Importing CAD models stored in ACIS format (*.sat files) into SALOME study; - Exporting CAD models from SALOME to the *.sat files. -To manage parameters of the ACISPLUGIN use \subpage acisplugin_importexport_page. +To use functionality of the ACISPLUGIN refer to \subpage acisplugin_importexport_page. -Also all ACISPLUGIN functionalities are accessible via +Also all functionalities of the ACISPLUGIN are accessible via \subpage acisplugin_python_interface_page "ACISPLUGIN Python interface". */ diff --git a/src/ACISPluginBuilder.py b/src/ACISPluginBuilder.py index 273bdb8..3236b98 100644 --- a/src/ACISPluginBuilder.py +++ b/src/ACISPluginBuilder.py @@ -23,13 +23,22 @@ from ACISPlugin import IACISOperations # Engine Library Name __libraryName__ = "ACISPluginEngine" +## Get ACIS plugin operations interface +# @return an instance of ACIS plugin operations interface def GetACISPluginOperations(self): + """ + Get ACIS plugin operations interface. + + Returns: + An instance of ACIS plugin operations interface + """ anOp = self.GetPluginOperations(self.myStudyId, __libraryName__) return anOp._narrow(IACISOperations) ## Export the given shape into a file with given name in ACIS format. # @param theObject Shape to be stored in the file. # @param theFileName Name of the file to store the given shape in. +# @sa ImportACIS def ExportACIS(self, theObject, theFileName): """ Export the given shape into a file with given name in ACIS format. @@ -56,8 +65,11 @@ def ExportACIS(self, theObject, theFileName): # If material names are imported it returns the list of # objects. The first one is the imported object followed by # material groups. +# # @note Auto publishing is allowed for the shape itself. Imported # material groups are not automatically published. +# +# @sa ExportACIS def ImportACIS(self, theFileName, theName=None): """ Import a shape from the ACIS file -- 2.39.2