# 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")
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})
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
\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.
\mainpage Introduction to ACISPLUGIN
-<b> ACIS SAT </b> 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 <b>ACIS SAT </b> 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".
*/
# 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.
# 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